#include "opendylan/run-time.h"

/* Generated by Open Dylan 2014.1 for x86_64-linux */

/* Typedefs for referenced classes */

#define  define__KLsimple_byte_vectorGVKe(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value size_; \
    dylan_value byte_vector_element_[nrepeated+1]; \
  } _KLsimple_byte_vectorGVKe_##nrepeated;

typedef struct {
  dylan_value wrapper;
  dylan_value instanceQ_iep_;
  dylan_value debug_name_;
  dylan_value class_implementation_class_;
  dylan_value class_subtype_bit_;
  dylan_value class_module_;
} _KLclassGVKd;

#define  define__KLmm_wrapperGVKi(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value mm_wrapper_implementation_class_; \
    dylan_value mm_wrapper_subtype_mask_; \
    DWORD mm_wrapper_fixed_part_; \
    DWORD mm_wrapper_variable_part_; \
    dylan_value mm_wrapper_number_patterns_; \
    DWORD mm_wrapper_pattern_element_[nrepeated+1]; \
  } _KLmm_wrapperGVKi_##nrepeated;
define__KLmm_wrapperGVKi(1);
define__KLmm_wrapperGVKi(0);

#define  define__KLsimple_object_vectorGVKd(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value size_; \
    dylan_value vector_element_[nrepeated+1]; \
  } _KLsimple_object_vectorGVKd_##nrepeated;
define__KLsimple_object_vectorGVKd(3);
define__KLsimple_object_vectorGVKd(16);
define__KLsimple_object_vectorGVKd(0);

typedef struct {
  dylan_value wrapper;
  dylan_value head_;
  dylan_value tail_;
} _KLempty_listGVKd;

typedef struct {
  dylan_value wrapper;
} _KLobjectGVKd;

typedef struct {
  dylan_value wrapper;
} _KLunboundGVKe;

typedef struct {
  dylan_value wrapper;
} _KLbooleanGVKd;

typedef struct {
  dylan_value wrapper;
  dylan_value xep_;
  dylan_value function_signature_;
  dylan_value mep_;
} _KLsimple_methodGVKe;

typedef struct {
  dylan_value wrapper;
  dylan_value instanceQ_iep_;
  dylan_value debug_name_;
  dylan_value class_implementation_class_;
  dylan_value class_subtype_bit_;
  dylan_value class_module_;
} _KLfunction_classGVKi;

typedef struct {
  dylan_value wrapper;
  dylan_value signature_properties_;
  dylan_value signature_required_;
  dylan_value signature_values_;
} _KLsignatureAvaluesGVKi;

#define  define__KLbyte_stringGVKd(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value size_; \
    char string_element_[nrepeated+1]; \
  } _KLbyte_stringGVKd_##nrepeated;

typedef struct {
  dylan_value wrapper;
} _KLintegerGVKd;


/* Typedefs for defined classes */


/* Referenced object declarations */

dylan_value KmakeVKdMM15I (dylan_value, dylan_value, dylan_value, dylan_value);
extern _KLclassGVKd KLsimple_byte_vectorGVKe;
extern _KLclassGVKd KLclassGVKd;
extern _KLmm_wrapperGVKi_0 KLclassGVKdW;
extern _KLclassGVKd KLmm_wrapperGVKi;
extern _KLmm_wrapperGVKi_1 KLmm_wrapperGVKiW;
extern _KLmm_wrapperGVKi_0 KLsimple_byte_vectorGVKeW;
extern _KLsimple_object_vectorGVKd_0 KPempty_vectorVKi;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
extern _KLempty_listGVKd KPempty_listVKi;
extern _KLclassGVKd KLempty_listGVKd;
extern _KLmm_wrapperGVKi_0 KLempty_listGVKdW;
extern _KLclassGVKd KLobjectGVKd;
extern _KLmm_wrapperGVKi_0 KLobjectGVKdW;
extern _KLunboundGVKe KPunboundVKi;
extern _KLclassGVKd KLunboundGVKe;
extern _KLmm_wrapperGVKi_0 KLunboundGVKeW;
extern _KLbooleanGVKd KPtrueVKi;
extern _KLclassGVKd KLbooleanGVKd;
extern _KLmm_wrapperGVKi_0 KLbooleanGVKdW;
extern _KLbooleanGVKd KPfalseVKi;
extern int unlink (DBSTR);
dylan_value Kunix_errnoYsystem_internalsVsystemI ();
extern _KLfunction_classGVKi KLsimple_methodGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLsimple_methodGVKeW;
extern _KLclassGVKd KLsignatureAvaluesGVKi;
extern _KLmm_wrapperGVKi_0 KLsignatureAvaluesGVKiW;
extern _KLsimple_object_vectorGVKd_16 KDsignature_Lbyte_stringG_typesVKi;
extern _KLsimple_object_vectorGVKd_16 KDsignature_LbooleanG_typesVKi;
extern int stat (DBSTR, D);
extern long io_lseek (int, long, int);
extern _KLsimple_object_vectorGVKd_16 KDsignature_LintegerG_typesVKi;
extern _KLclassGVKd KLbyte_stringGVKd;
extern _KLmm_wrapperGVKi_0 KLbyte_stringGVKdW;
extern _KLclassGVKd KLintegerGVKd;
extern _KLmm_wrapperGVKi_0 KLintegerGVKdW;
extern unsigned int open (DBSTR, unsigned int, unsigned int);
extern int close (unsigned int);
extern int read (unsigned int, D, unsigned long);

/* Defined object declarations */

dylan_value Kunix_raw_readYsystem_internalsVsystemI (dylan_value, dylan_value, dylan_value);
dylan_value Kunix_closeYsystem_internalsVsystemI (dylan_value);
dylan_value Kunix_openYsystem_internalsVsystemI (dylan_value, dylan_value, dylan_value);
extern _KLsimple_methodGVKe Kunix_openYsystem_internalsVsystem;
extern _KLsimple_methodGVKe Kunix_closeYsystem_internalsVsystem;
dylan_value Kunix_lseekYsystem_internalsVsystemI (dylan_value, dylan_value, dylan_value);
extern _KLsimple_methodGVKe Kunix_file_existsQYsystem_internalsVsystem;
dylan_value Kunix_file_existsQYsystem_internalsVsystemI (dylan_value);
extern _KLsimple_methodGVKe Kunix_delete_fileYsystem_internalsVsystem;
dylan_value Kunix_delete_fileYsystem_internalsVsystemI (dylan_value);
static _KLsignatureAvaluesGVKi K11;
static _KLsignatureAvaluesGVKi K12;
static _KLsignatureAvaluesGVKi K13;
static _KLsimple_object_vectorGVKd_3 K14;

/* Indirection variables */


/* Variables */

dylan_value unix_openYsystem_internalsVsystem = &Kunix_openYsystem_internalsVsystem;
dylan_value unix_closeYsystem_internalsVsystem = &Kunix_closeYsystem_internalsVsystem;
dylan_value Tstat_bufferTYsystem_internalsVsystem = &KPunboundVKi;
dylan_value unix_file_existsQYsystem_internalsVsystem = &Kunix_file_existsQYsystem_internalsVsystem;
dylan_value unix_delete_fileYsystem_internalsVsystem = &Kunix_delete_fileYsystem_internalsVsystem;

/* Objects */

_KLsimple_methodGVKe Kunix_openYsystem_internalsVsystem = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_3,
  &K13,
  &Kunix_openYsystem_internalsVsystemI
};

_KLsimple_methodGVKe Kunix_closeYsystem_internalsVsystem = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K12,
  &Kunix_closeYsystem_internalsVsystemI
};

_KLsimple_methodGVKe Kunix_file_existsQYsystem_internalsVsystem = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K11,
  &Kunix_file_existsQYsystem_internalsVsystemI
};

_KLsimple_methodGVKe Kunix_delete_fileYsystem_internalsVsystem = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K11,
  &Kunix_delete_fileYsystem_internalsVsystemI
};

static _KLsignatureAvaluesGVKi K11 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33555461,
  &KDsignature_Lbyte_stringG_typesVKi,
  &KDsignature_LbooleanG_typesVKi
};

static _KLsignatureAvaluesGVKi K12 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33555461,
  &KDsignature_LintegerG_typesVKi,
  &KDsignature_LintegerG_typesVKi
};

static _KLsignatureAvaluesGVKi K13 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33555469,
  &K14,
  &KDsignature_LintegerG_typesVKi
};

static _KLsimple_object_vectorGVKd_3 K14 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 13,
  &KLbyte_stringGVKd,
  &KLintegerGVKd,
  &KLintegerGVKd
};

/* Code */

dylan_value Kunix_raw_readYsystem_internalsVsystemI (dylan_value fd_, dylan_value address_, dylan_value count_) {
  DWORD T3;
  D T4;
  int T5;
  dylan_value T6;
  dylan_value T7;
  dylan_value T8;
  dylan_value T9;
  DWORD T10;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;
  DWORD T15;
  dylan_value T16;
  dylan_value T17;
  dylan_value T18;
  dylan_value T19;

  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:60
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
L0: ;
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:69
    T10 = primitive_cast_integer_as_raw(fd_);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:69
    T11 = primitive_machine_word_shift_right(T10,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:71
    T3 = primitive_unwrap_machine_word(address_);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:70
    T4 = primitive_cast_raw_as_pointer(T3);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:72
    T12 = primitive_cast_integer_as_raw(count_);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:72
    T13 = primitive_machine_word_shift_right(T12,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:65
    T5 = read(T11, T4, T13);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:64
    T14 = primitive_machine_word_shift_left_signal_overflow(T5,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:64
    T15 = primitive_machine_word_logior(T14,1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:64
    T16 = primitive_cast_raw_as_integer(T15);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
    T17 = primitive_machine_word_less_thanQ(T15,1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
    if (T17 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
      T6 = Kunix_errnoYsystem_internalsVsystemI();
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
      T18 = primitive_idQ(T6,(dylan_value) 17);
      T7 = T18;
    } else {
      T7 = &KPfalseVKi;
    }
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
    if (T7 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
      goto L0;
      T9 = T19;
    } else {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
      T8 = T16;
      MV_SET_ELT(0, T16);
      MV_SET_COUNT(1);
      T9 = T8;
    }
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:63
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:60
  return(T9);
}

dylan_value Kunix_closeYsystem_internalsVsystemI (dylan_value fd_) {
  int T1;
  dylan_value T2;
  dylan_value T3;
  dylan_value T4;
  dylan_value T5;
  DWORD T6;
  DWORD T7;
  DWORD T8;
  DWORD T9;
  dylan_value T10;
  dylan_value T11;
  dylan_value T12;
  dylan_value T13;

  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:40
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
L0: ;
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:45
    T6 = primitive_cast_integer_as_raw(fd_);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:45
    T7 = primitive_machine_word_shift_right(T6,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:43
    T1 = close(T7);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:42
    T8 = primitive_machine_word_shift_left_signal_overflow(T1,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:42
    T9 = primitive_machine_word_logior(T8,1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:42
    T10 = primitive_cast_raw_as_integer(T9);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
    T11 = primitive_machine_word_less_thanQ(T9,1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
    if (T11 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
      T2 = Kunix_errnoYsystem_internalsVsystemI();
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
      T12 = primitive_idQ(T2,(dylan_value) 17);
      T3 = T12;
    } else {
      T3 = &KPfalseVKi;
    }
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
    if (T3 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
      goto L0;
      T5 = T13;
    } else {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
      T4 = T10;
      MV_SET_ELT(0, T10);
      MV_SET_COUNT(1);
      T5 = T4;
    }
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:41
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:40
  return(T5);
}

dylan_value Kunix_openYsystem_internalsVsystemI (dylan_value path_, dylan_value mode_, dylan_value create_flags_) {
  DBSTR T3;
  unsigned int T4;
  dylan_value T5;
  dylan_value T6;
  dylan_value T7;
  dylan_value T8;
  DWORD T9;
  DWORD T10;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;
  dylan_value T15;
  dylan_value T16;
  dylan_value T17;
  dylan_value T18;

  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:25
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
L0: ;
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:33
    T3 = primitive_string_as_raw(path_);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:34
    T9 = primitive_cast_integer_as_raw(mode_);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:34
    T10 = primitive_machine_word_shift_right(T9,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:35
    T11 = primitive_cast_integer_as_raw(create_flags_);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:35
    T12 = primitive_machine_word_shift_right(T11,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:29
    T4 = open(T3, T10, T12);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:28
    T13 = primitive_machine_word_shift_left_signal_overflow(T4,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:28
    T14 = primitive_machine_word_logior(T13,1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:28
    T15 = primitive_cast_raw_as_integer(T14);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
    T16 = primitive_machine_word_less_thanQ(T14,1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
    if (T16 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
      T5 = Kunix_errnoYsystem_internalsVsystemI();
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
      T17 = primitive_idQ(T5,(dylan_value) 17);
      T6 = T17;
    } else {
      T6 = &KPfalseVKi;
    }
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
    if (T6 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
      goto L0;
      T8 = T18;
    } else {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
      T7 = T15;
      MV_SET_ELT(0, T15);
      MV_SET_COUNT(1);
      T8 = T7;
    }
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:27
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:25
  return(T8);
}

dylan_value Kunix_lseekYsystem_internalsVsystemI (dylan_value fd_, dylan_value position_, dylan_value mode_) {
  long T3;
  DWORD T4;
  DWORD T5;
  DWORD T6;
  DWORD T7;
  DWORD T8;
  DWORD T9;
  DWORD T10;
  DWORD T11;
  dylan_value T12;
  dylan_value T13_0;

  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:49
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:56
  T4 = primitive_cast_integer_as_raw(fd_);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:56
  T5 = primitive_machine_word_shift_right(T4,2);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:56
  T6 = primitive_cast_integer_as_raw(position_);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:56
  T7 = primitive_machine_word_shift_right(T6,2);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:56
  T8 = primitive_cast_integer_as_raw(mode_);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:56
  T9 = primitive_machine_word_shift_right(T8,2);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:52
  T3 = io_lseek(T5, T7, T9);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:51
  T10 = primitive_machine_word_shift_left_signal_overflow(T3,2);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:51
  T11 = primitive_machine_word_logior(T10,1);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:51
  T12 = primitive_cast_raw_as_integer(T11);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:51
  T13_0 = T12;
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:49
  MV_SET_COUNT(1);
  return(T13_0);
}

dylan_value Kunix_file_existsQYsystem_internalsVsystemI (dylan_value path_) {
  DBSTR T1;
  dylan_value T2;
  DBSTR T3;
  D T4;
  int T5;
  dylan_value T6;
  dylan_value T7;
  dylan_value T8_0;

  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:81
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:86
  T1 = primitive_string_as_raw(path_);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:87
  T2 = primitive_read_thread_variable(Tstat_bufferTYsystem_internalsVsystem);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:87
  T3 = primitive_string_as_raw(T2);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:87
  T4 = primitive_cast_raw_as_pointer(T3);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:83
  T5 = stat(T1, T4);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:82
  T6 = primitive_raw_as_boolean(T5);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:82
  T7 = primitive_not(T6);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:82
  T8_0 = T7;
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:81
  MV_SET_COUNT(1);
  return(T8_0);
}

dylan_value Kunix_delete_fileYsystem_internalsVsystemI (dylan_value path_) {
  DBSTR T1;
  int T2;
  dylan_value T3;
  dylan_value T4;
  DWORD T5;
  DWORD T6;
  dylan_value T7;
  dylan_value T8;
  dylan_value T9;
  dylan_value T10;
  DWORD T11;
  dylan_value T12;
  dylan_value T13_0;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:91
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
L0: ;
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:95
    T1 = primitive_string_as_raw(path_);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:93
    T2 = unlink(T1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:93
    T5 = primitive_machine_word_shift_left_signal_overflow(T2,2);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:93
    T6 = primitive_machine_word_logior(T5,1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
    T7 = primitive_machine_word_less_thanQ(T6,1);
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
    if (T7 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
      T3 = Kunix_errnoYsystem_internalsVsystemI();
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
      T8 = primitive_idQ(T3,(dylan_value) 17);
      T4 = T8;
    } else {
      T4 = &KPfalseVKi;
    }
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
    if (T4 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
      goto L0;
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
      T10 = T9;
      // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
      T14 = primitive_cast_integer_as_raw(T10);
      T11 = T14;
    } else {
      T11 = T6;
    }
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
    // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
  T12 = primitive_machine_word_equalQ(T11,1);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:92
  T13_0 = T12;
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:91
  MV_SET_COUNT(1);
  return(T13_0);
}


/* SYSTEM INIT CODE */

void _Init_system__X_16Eunix_interface_for_system () {
  extern dylan_value KPresolve_symbolVKiI(dylan_value);
  return;
}

/* USER INIT CODE */

void _Init_system__X_16Eunix_interface_for_user () {
{
  dylan_value T0;
  dylan_value T1;

  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:79
  T1 = KmakeVKdMM15I(&KLsimple_byte_vectorGVKe, &KPempty_vectorVKi, (dylan_value) 1, (dylan_value) 577);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:79
  Tstat_bufferTYsystem_internalsVsystem = primitive_allocate_thread_variable(T1);
  // /home/bruce/Development/dylan/opendylan/sources/system/file-system/unix-interface.dylan:79
  T0 = &KPfalseVKi;
  goto I0;
}
I0:

  return;
}


/* eof */
