#include "run-time.h"

/* Typedefs for referenced classes */

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

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

typedef struct {
  D wrapper;
} _KLobjectGVKd;

typedef struct {
  D wrapper;
} _KLunboundGVKe;

typedef struct {
  D wrapper;
} _KLbooleanGVKd;

#define  define__KLsimple_object_vectorGVKd(nrepeated) \
  typedef struct { \
    D wrapper; \
    D size_; \
    D vector_element_[nrepeated+1]; \
  } _KLsimple_object_vectorGVKd_##nrepeated;
define__KLsimple_object_vectorGVKd(7);
define__KLsimple_object_vectorGVKd(1);
define__KLsimple_object_vectorGVKd(14);
define__KLsimple_object_vectorGVKd(256);
define__KLsimple_object_vectorGVKd(6);
define__KLsimple_object_vectorGVKd(0);

typedef struct {
  D wrapper;
  D xep_;
  D function_signature_;
  D Pgf_cache_;
  D debug_name_;
  D generic_function_methods_;
  D discriminator_;
  D incremental_gf_module_;
  D incremental_gf_domain_info_;
  D incremental_gf_method_libraries_;
  D incremental_gf_properties_;
} _KLincremental_generic_functionGVKe;

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

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

typedef struct {
  D wrapper;
  D symbol_name_;
} _KLsymbolGVKd;

#define  define__KLbyte_stringGVKd(nrepeated) \
  typedef struct { \
    D wrapper; \
    D size_; \
    char string_element_[nrepeated+1]; \
  } _KLbyte_stringGVKd_##nrepeated;
define__KLbyte_stringGVKd(5);
define__KLbyte_stringGVKd(38);
define__KLbyte_stringGVKd(6);
define__KLbyte_stringGVKd(8);
define__KLbyte_stringGVKd(7);

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

typedef struct {
  D wrapper;
  D xep_;
  D function_signature_;
  D mep_;
  D iep_;
  D keyword_specifiers_;
} _KLkeyword_methodGVKe;

typedef struct {
  D wrapper;
  D signature_properties_;
  D signature_required_;
  D signature_keys_;
  D signature_key_types_;
} _KLkeyword_signatureGVKe;

typedef struct {
  D wrapper;
  D dood_name_;
  D dood_given_stream_;
  D dood_backupsQ_;
  D dood_root_;
  D dood_state_;
  D dood_backup_;
  D dood_world_;
  D dood_read_onlyQ_;
  D dood_batch_modeQ_;
  D dood_specified_user_version_;
  D dood_forwarding_address_;
  D dood_walked_addresses_;
  D dood_back_pointers_;
  D dood_walked_count_;
  D dood_locator_;
  D dood_init_keys_;
  D dood_walk_queue_;
  D dood_work_;
  D dood_default_segment_;
  D dood_segments_;
} _KLdoodGVdood;


/* Typedefs for defined classes */


/* Referenced object declarations */

extern _KLclassGVKd KLclassGVKd;
extern _KLmm_wrapperGVKi_0 KLclassGVKdW;
extern _KLclassGVKd KLmm_wrapperGVKi;
extern _KLmm_wrapperGVKi_1 KLmm_wrapperGVKiW;
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;
D Kdood_initialize_walkerXVdoodMM0I (D, D, D);
extern _KLsimple_object_vectorGVKd_0 KPempty_vectorVKi;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
D Kdood_save_stateVdoodMM0I (D);
D Kdood_corruptedQ_setterVdoodMM0I (D, D);
D Kdood_disk_pointerAobjectVdoodI (D, D);
D Kmulti_buffered_stream_position_setterYstreams_internalsVioI (D, D);
D Kwrite_4_aligned_bytesYstreams_internalsVioI (D, D, D, D, D);
extern _KLincremental_generic_functionGVKe Kforce_outputYstreams_protocolVcommon_dylan;
extern _KLfunction_classGVKi KLincremental_generic_functionGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLincremental_generic_functionGVKeW;
D KdumpVdoodMM0I (D dood_);
D Kdood_clear_walked_objectsXVdoodI (D);
D Kdood_corruptedQVdoodMM0I (D);
D Kdood_restore_stateVdoodMM0I (D);
D Kdood_flush_backupVdoodMM0I (D);
D Kdood_statisticsVdoodI (D dood_, D Urest_, D filter_set_, D aggregate_set_);
D Kdood_walk_fromVdoodMM0I (D, D, D, D, D, D, D, D, D);
extern _KLsimple_methodGVKe KidentityVKd;
extern _KLfunction_classGVKi KLsimple_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLsimple_methodGVKeW;
extern _KLsimple_methodGVKe Kmaybe_walk_objectVdood;
extern _KLsimple_methodGVKe Kdood_write_atVdood;
extern _KLclassGVKd KLsymbolGVKd;
extern _KLmm_wrapperGVKi_0 KLsymbolGVKdW;
extern _KLclassGVKd KLbyte_stringGVKd;
extern _KLmm_wrapperGVKi_0 KLbyte_stringGVKdW;
D KerrorVKdMM1I (D, D);
extern _KLempty_listGVKd KPempty_listVKi;
extern _KLclassGVKd KLempty_listGVKd;
extern _KLmm_wrapperGVKi_0 KLempty_listGVKdW;
extern _KLfunction_classGVKi KLkeyword_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLkeyword_methodGVKeW;
extern _KLsymbolGVKd KJsize_;
extern _KLclassGVKd KLkeyword_signatureGVKe;
extern _KLmm_wrapperGVKi_0 KLkeyword_signatureGVKeW;
extern _KLsimple_object_vectorGVKd_256 KDsignature_LobjectG_typesVKi;
extern _KLclassGVKd KLdoodGVdood;
extern _KLmm_wrapperGVKi_0 KLdoodGVdoodW;
extern D Ddood_empty_stretchy_vectorVdood;
extern D Ddefault_walk_infoVdood;

/* Defined object declarations */

extern _KLkeyword_methodGVKe Kdood_commitVdoodMM0;
D Kdood_commitVdoodMM0I (D, D, D, D, D, D, D, D, D);
D Kcheck_not_read_onlyVdoodI (D);
static D Kcommit_rootF4I (D, D, D, D, D);
static _KLsymbolGVKd KJbatchQ_;
static _KLsymbolGVKd KJparentsQ_;
static _KLsymbolGVKd KJcommitQ_;
static _KLbyte_stringGVKd_7 K8;
static _KLbyte_stringGVKd_8 K9;
static _KLbyte_stringGVKd_6 K10;
static _KLbyte_stringGVKd_38 K11;
static _KLkeyword_signatureGVKe K12;
static _KLsimple_object_vectorGVKd_14 K13;
static _KLsymbolGVKd KJflushQ_;
static _KLsymbolGVKd KJdumpQ_;
static _KLsymbolGVKd KJbreakQ_;
static _KLsymbolGVKd KJclearQ_;
static _KLsymbolGVKd KJstatsQ_;
static _KLbyte_stringGVKd_6 K19;
static _KLbyte_stringGVKd_6 K20;
static _KLbyte_stringGVKd_6 K21;
static _KLbyte_stringGVKd_5 K22;
static _KLbyte_stringGVKd_6 K23;
static _KLsimple_object_vectorGVKd_1 K24;
static _KLsimple_object_vectorGVKd_7 K25;

/* Indirection variables */

static D IKJbatchQ_ = &KJbatchQ_;
static D IKJparentsQ_ = &KJparentsQ_;
static D IKJcommitQ_ = &KJcommitQ_;
static D IKJflushQ_ = &KJflushQ_;
static D IKJdumpQ_ = &KJdumpQ_;
static D IKJbreakQ_ = &KJbreakQ_;
static D IKJclearQ_ = &KJclearQ_;
static D IKJstatsQ_ = &KJstatsQ_;

/* Variables */

D dood_commitVdood = &Kdood_commitVdoodMM0;

/* Objects */

_KLkeyword_methodGVKe Kdood_commitVdoodMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_9,
  &K12,
  &key_mep_9,
  &Kdood_commitVdoodMM0I,
  &K13
};

static _KLsymbolGVKd KJbatchQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K10
};

static _KLsymbolGVKd KJparentsQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K9
};

static _KLsymbolGVKd KJcommitQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K8
};

static _KLbyte_stringGVKd_7 K8 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 29,
  "commit?"
};

static _KLbyte_stringGVKd_8 K9 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 33,
  "parents?"
};

static _KLbyte_stringGVKd_6 K10 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 25,
  "batch?"
};

static _KLbyte_stringGVKd_38 K11 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 153,
  "Bug: attempt to write a read-only dood"
};

static _KLkeyword_signatureGVKe K12 = {
  &KLkeyword_signatureGVKeW /* wrapper */,
  (D) 42205189,
  &K24,
  &K25,
  &KDsignature_LobjectG_typesVKi
};

static _KLsimple_object_vectorGVKd_14 K13 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 57,
  &KJflushQ_,
  &KPfalseVKi,
  &KJdumpQ_,
  &KPfalseVKi,
  &KJbreakQ_,
  &KPfalseVKi,
  &KJparentsQ_,
  &KPfalseVKi,
  &KJclearQ_,
  &KPtrueVKi,
  &KJstatsQ_,
  &KPfalseVKi,
  &KJsize_,
  &KPfalseVKi
};

static _KLsymbolGVKd KJflushQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K23
};

static _KLsymbolGVKd KJdumpQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K22
};

static _KLsymbolGVKd KJbreakQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K21
};

static _KLsymbolGVKd KJclearQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K20
};

static _KLsymbolGVKd KJstatsQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K19
};

static _KLbyte_stringGVKd_6 K19 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 25,
  "stats?"
};

static _KLbyte_stringGVKd_6 K20 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 25,
  "clear?"
};

static _KLbyte_stringGVKd_6 K21 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 25,
  "break?"
};

static _KLbyte_stringGVKd_5 K22 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 21,
  "dump?"
};

static _KLbyte_stringGVKd_6 K23 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 25,
  "flush?"
};

static _KLsimple_object_vectorGVKd_1 K24 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 5,
  &KLdoodGVdood
};

static _KLsimple_object_vectorGVKd_7 K25 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 29,
  &KJflushQ_,
  &KJdumpQ_,
  &KJbreakQ_,
  &KJparentsQ_,
  &KJclearQ_,
  &KJstatsQ_,
  &KJsize_
};

/* Code */

D Kdood_commitVdoodMM0I (D dood_, D Urest_, D flushQ_, D dumpQ_, D breakQ_, D parentsQ_, D clearQ_, D statsQ_, D size_) {
  D parentsQF10;
  D T11;
  D T12;
  D T13;
  D T14;
  D T15;
  D T16;
  D T17;
  D T18;
  D T19;
  D T20_0;
  D T21;
  DWORD T22;
  D T23;
  D T24;
  DWORD T25;
  DWORD T26;
  DWORD T27;
  DWORD T28;
  DWORD T29;
  DWORD T30;
  DWORD T31;
  D T32;
  D T33;
  DWORD T34;
  DWORD T35;
  D T36;
  DWORD T37;
  DWORD T38;
  D T39;
  DWORD T40;
  DWORD T41;
  D T42;
  DWORD T43;
  DWORD T44;
  D T45;
  D T46;
  D T47_0;
  D T48;
  DWORD T49;
  D T50;
  D T51;
  DWORD T52;
  DWORD T53;
  DWORD T54;
  DWORD T55;
  DWORD T56;
  DWORD T57;
  DWORD T58;
  D T59;
  D T60;
  DWORD T61;
  DWORD T62;
  D T63;
  DWORD T64;
  DWORD T65;
  D T66;
  DWORD T67;
  DWORD T68;
  D T69;
  DWORD T70;
  DWORD T71;
  D T72;
  D T73;
  D T74;
  D T75_0;
  D T76;
  DWORD T77;
  D T78;
  D T79;
  DWORD T80;
  DWORD T81;
  DWORD T82;
  DWORD T83;
  DWORD T84;
  DWORD T85;
  DWORD T86;
  D T87;
  D T88;
  DWORD T89;
  DWORD T90;
  D T91;
  DWORD T92;
  DWORD T93;
  D T94;
  DWORD T95;
  DWORD T96;
  D T97;
  DWORD T98;
  DWORD T99;
  D T100;
  D T101;
  D T102;
  D T103;
  D T104;
  D T105;
  D T106;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:16
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:19
  Kcheck_not_read_onlyVdoodI(dood_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:20
  Kdood_initialize_walkerXVdoodMM0I(dood_, &KPempty_vectorVKi, &KPfalseVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:21
  Kdood_save_stateVdoodMM0I(dood_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:22
  Kdood_corruptedQ_setterVdoodMM0I(&KPtrueVKi, dood_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:23
  T16 = SLOT_VALUE_INITD(dood_, 8);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:24
  if (T16 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:28
    T17 = SLOT_VALUE_INITD(dood_, 11);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:28
    T18 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:28
    SLOT_VALUE_SETTER(T17, T18, 3);
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:24
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:30
  if (parentsQ_ != &KPfalseVKi) {
    parentsQF10 = parentsQ_;
  } else {
    parentsQF10 = statsQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:30
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:31
  ENTER_UNWIND_FRAME(T11);
  if (!nlx_setjmp(FRAME_DEST(T11))) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:38
    Kcommit_rootF4I(T16, parentsQF10, dood_, Ddood_empty_stretchy_vectorVdood, (D) 21);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:40
    T19 = SLOT_VALUE_INITD(dood_, 3);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:40
    Kcommit_rootF4I(T16, parentsQF10, dood_, T19, (D) 17);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:42
    T20_0 = Kdood_disk_pointerAobjectVdoodI(dood_, (D) 17);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:42
    T21 = T20_0;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T22 = primitive_unwrap_abstract_integer(T21);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T23 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T24 = SLOT_VALUE(T23, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    Kmulti_buffered_stream_position_setterYstreams_internalsVioI((D) 1, T24);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T25 = primitive_machine_word_shift_right(T22,24);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T26 = primitive_machine_word_logand(T25,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T27 = primitive_machine_word_shift_right(T22,16);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T28 = primitive_machine_word_logand(T27,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T29 = primitive_machine_word_shift_right(T22,8);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T30 = primitive_machine_word_logand(T29,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T31 = primitive_machine_word_logand(T22,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T32 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T33 = SLOT_VALUE(T32, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T34 = primitive_machine_word_shift_left_signal_overflow(T26,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T35 = primitive_machine_word_logior(T34,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T36 = primitive_cast_raw_as_integer(T35);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T37 = primitive_machine_word_shift_left_signal_overflow(T28,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T38 = primitive_machine_word_logior(T37,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T39 = primitive_cast_raw_as_integer(T38);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T40 = primitive_machine_word_shift_left_signal_overflow(T30,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T41 = primitive_machine_word_logior(T40,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T42 = primitive_cast_raw_as_integer(T41);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T43 = primitive_machine_word_shift_left_signal_overflow(T31,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T44 = primitive_machine_word_logior(T43,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    T45 = primitive_cast_raw_as_integer(T44);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:41
    Kwrite_4_aligned_bytesYstreams_internalsVioI(T33, T36, T39, T42, T45);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:45
    T46 = SLOT_VALUE_INITD(dood_, 9);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:45
    T47_0 = Kdood_disk_pointerAobjectVdoodI(dood_, T46);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:45
    T48 = T47_0;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T49 = primitive_unwrap_abstract_integer(T48);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T50 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T51 = SLOT_VALUE(T50, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    Kmulti_buffered_stream_position_setterYstreams_internalsVioI((D) 17, T51);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T52 = primitive_machine_word_shift_right(T49,24);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T53 = primitive_machine_word_logand(T52,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T54 = primitive_machine_word_shift_right(T49,16);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T55 = primitive_machine_word_logand(T54,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T56 = primitive_machine_word_shift_right(T49,8);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T57 = primitive_machine_word_logand(T56,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T58 = primitive_machine_word_logand(T49,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T59 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T60 = SLOT_VALUE(T59, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T61 = primitive_machine_word_shift_left_signal_overflow(T53,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T62 = primitive_machine_word_logior(T61,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T63 = primitive_cast_raw_as_integer(T62);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T64 = primitive_machine_word_shift_left_signal_overflow(T55,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T65 = primitive_machine_word_logior(T64,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T66 = primitive_cast_raw_as_integer(T65);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T67 = primitive_machine_word_shift_left_signal_overflow(T57,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T68 = primitive_machine_word_logior(T67,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T69 = primitive_cast_raw_as_integer(T68);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T70 = primitive_machine_word_shift_left_signal_overflow(T58,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T71 = primitive_machine_word_logior(T70,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    T72 = primitive_cast_raw_as_integer(T71);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:44
    Kwrite_4_aligned_bytesYstreams_internalsVioI(T60, T63, T66, T69, T72);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:48
    T73 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:48
    T74 = SLOT_VALUE_INITD(T73, 2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:48
    T75_0 = Kdood_disk_pointerAobjectVdoodI(dood_, T74);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:48
    T76 = T75_0;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T77 = primitive_unwrap_abstract_integer(T76);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T78 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T79 = SLOT_VALUE(T78, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    Kmulti_buffered_stream_position_setterYstreams_internalsVioI((D) 49, T79);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T80 = primitive_machine_word_shift_right(T77,24);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T81 = primitive_machine_word_logand(T80,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T82 = primitive_machine_word_shift_right(T77,16);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T83 = primitive_machine_word_logand(T82,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T84 = primitive_machine_word_shift_right(T77,8);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T85 = primitive_machine_word_logand(T84,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T86 = primitive_machine_word_logand(T77,255);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T87 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T88 = SLOT_VALUE(T87, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T89 = primitive_machine_word_shift_left_signal_overflow(T81,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T90 = primitive_machine_word_logior(T89,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T91 = primitive_cast_raw_as_integer(T90);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T92 = primitive_machine_word_shift_left_signal_overflow(T83,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T93 = primitive_machine_word_logior(T92,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T94 = primitive_cast_raw_as_integer(T93);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T95 = primitive_machine_word_shift_left_signal_overflow(T85,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T96 = primitive_machine_word_logior(T95,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T97 = primitive_cast_raw_as_integer(T96);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T98 = primitive_machine_word_shift_left_signal_overflow(T86,2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T99 = primitive_machine_word_logior(T98,1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    T100 = primitive_cast_raw_as_integer(T99);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:47
    Kwrite_4_aligned_bytesYstreams_internalsVioI(T88, T91, T94, T97, T100);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:50
    T101 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:50
    T102 = SLOT_VALUE(T101, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:50
    CONGRUENT_CALL_PROLOG(&Kforce_outputYstreams_protocolVcommon_dylan, 2);
    CONGRUENT_CALL2(T102, &KPempty_vectorVKi);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:51
    if (breakQ_ == &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:52
      Kdood_corruptedQ_setterVdoodMM0I(&KPfalseVKi, dood_);
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:51
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:54
    T103 = SLOT_VALUE_INITD(dood_, 4);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:54
    T104 = SLOT_VALUE(T103, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:54
    CONGRUENT_CALL_PROLOG(&Kforce_outputYstreams_protocolVcommon_dylan, 2);
    CONGRUENT_CALL2(T104, &KPempty_vectorVKi);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:55
    if (dumpQ_ != &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:56
      T12 = KdumpVdoodMM0I(dood_);
      T14 = T12;
    } else {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:55
      T13 = &KPfalseVKi;
      T14 = T13;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:55
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:31
    FALL_THROUGH_UNWIND(T14);
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:59
  if (clearQ_ != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:60
    Kdood_clear_walked_objectsXVdoodI(dood_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:61
    if (T16 != &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:62
      T105 = SLOT_VALUE_INITD(dood_, 11);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:62
      T106 = SLOT_VALUE_INITD(dood_, 4);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:62
      SLOT_VALUE_SETTER(T105, T106, 3);
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:61
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:59
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:65
  T15 = Kdood_corruptedQVdoodMM0I(dood_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:65
  if (T15 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:66
    Kdood_restore_stateVdoodMM0I(dood_);
  } else {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:68
    Kdood_flush_backupVdoodMM0I(dood_);
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:65
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:70
  if (statsQ_ != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:71
    Kdood_statisticsVdoodI(dood_, &KPempty_vectorVKi, &KPempty_vectorVKi, &KPempty_vectorVKi);
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:70
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:31
  CONTINUE_UNWIND();
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:16
  MV_SET_COUNT(0);
  return(T14);
}

D Kcheck_not_read_onlyVdoodI (D dood_) {
  D T1;
  D T2;
  D T3;
  D T4;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:9
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:10
  T3 = SLOT_VALUE_INITD(dood_, 7);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:10
  if (T3 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:12
    T4 = KerrorVKdMM1I(&K11, &KPempty_vectorVKi);
    T2 = T4;
  } else {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:10
    T1 = &KPfalseVKi;
    MV_SET_ELT(0, &KPfalseVKi);
    MV_SET_COUNT(1);
    T2 = T1;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:10
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:9
  return(T2);
}

static D Kcommit_rootF4I (D implicit_argument_, D parentsQ_, D dood_, D object_, D id_) {
  D T5;
  _KLsimple_object_vectorGVKd_6 T6 = {&KLsimple_object_vectorGVKdW, (D) 25};
  D T7_0;
  D T8;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:32
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:33
  T6.vector_element_[0] = IKJbatchQ_;
  T6.vector_element_[1] = implicit_argument_;
  T6.vector_element_[2] = IKJparentsQ_;
  T6.vector_element_[3] = parentsQ_;
  T6.vector_element_[4] = IKJcommitQ_;
  T6.vector_element_[5] = &KPtrueVKi;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:33
  Kdood_walk_fromVdoodMM0I(dood_, &KidentityVKd, object_, &T6, &KPfalseVKi, &KPtrueVKi, parentsQ_, implicit_argument_, &KPtrueVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:36
  T7_0 = CALL5(&Kmaybe_walk_objectVdood, dood_, Ddefault_walk_infoVdood, &KPfalseVKi, object_, &KPfalseVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:36
  T8 = T7_0;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:36
  T5 = CALL3(&Kdood_write_atVdood, dood_, T8, id_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/dood/commit.dylan:32
  return(T5);
}


/* SYSTEM INIT CODE */

void _Init_dood__X_commit_for_system () {
  extern D KPresolve_symbolVKiI(D);
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJbatchQ_);
    if (T0 != &KJbatchQ_) {
      IKJbatchQ_ = T0;
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJparentsQ_);
    if (T0 != &KJparentsQ_) {
      primitive_repeated_slot_value_setter(T0, &K25, 1, 3);
      primitive_repeated_slot_value_setter(T0, &K13, 1, 6);
      IKJparentsQ_ = T0;
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJcommitQ_);
    if (T0 != &KJcommitQ_) {
      IKJcommitQ_ = T0;
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJflushQ_);
    if (T0 != &KJflushQ_) {
      primitive_repeated_slot_value_setter(T0, &K25, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K13, 1, 0);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJdumpQ_);
    if (T0 != &KJdumpQ_) {
      primitive_repeated_slot_value_setter(T0, &K25, 1, 1);
      primitive_repeated_slot_value_setter(T0, &K13, 1, 2);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJbreakQ_);
    if (T0 != &KJbreakQ_) {
      primitive_repeated_slot_value_setter(T0, &K25, 1, 2);
      primitive_repeated_slot_value_setter(T0, &K13, 1, 4);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJclearQ_);
    if (T0 != &KJclearQ_) {
      primitive_repeated_slot_value_setter(T0, &K25, 1, 4);
      primitive_repeated_slot_value_setter(T0, &K13, 1, 8);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJstatsQ_);
    if (T0 != &KJstatsQ_) {
      primitive_repeated_slot_value_setter(T0, &K25, 1, 5);
      primitive_repeated_slot_value_setter(T0, &K13, 1, 10);
    }
  }
  return;
}

/* USER INIT CODE */

void _Init_dood__X_commit_for_user () {
  return;
}


/* eof */
