/* generated by Id 1.0 at 2007-08-31 06:59:05 Z */
/* with the command: -I../stage1/ -c OrderedCollection.st -o ../stage2/OrderedCollection.o.c */

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <setjmp.h>
#include <string.h>
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <assert.h>
#define GC_DLL 1
#include <gc/gc.h>
#if defined(WIN32)
# include <malloc.h>
# include <windows.h>
  typedef HINSTANCE dlhandle_t;
# define dlopen(path, mode)	LoadLibrary(path)
# define dlsym(handle, name)	((void *)GetProcAddress(handle, name))
# define dlclose(handle)	FreeLibrary(handle)
# include <winbase.h>
  inline int gettimeofday(struct timeval *tp, void *tzp)
  {
     union {
       long long ns100;
       FILETIME ft;
     } _now;
     GetSystemTimeAsFileTime(&_now.ft);
     tp->tv_usec= (long)((_now.ns100 / 10LL) % 1000000LL);
     tp->tv_sec= (long)((_now.ns100 - (116444736000000000LL)) / 10000000LL);
     return 0;
   }
#else
# include <dlfcn.h>
  typedef void *dlhandle_t;
#endif
#ifndef O_BINARY
# define O_BINARY 0
#endif

typedef struct t__object *oop;

typedef oop (*_imp_t)(oop _thunk, oop receiver, ...);

struct __closure
{
  _imp_t method;
  oop	 data;
};

static void              *(*_local_param   )(int index)= 0;
static oop  		  (*_local_intern  )(const char *string)= 0;
static oop  		  (*_local_proto   )(oop base)= 0;
static oop  		  (*_local_import  )(const char *name)= 0;
static oop  		  (*_local_export  )(const char *name, oop value)= 0;
static void 		  (*_local_method  )(oop type, oop selector, _imp_t method)= 0;
static oop  		  (*_local_alloc   )(oop type, size_t size)= 0;
static oop  		 *(*_local_palloc  )(size_t size)= 0;
static void  		 *(*_local_balloc  )(size_t size)= 0;
static struct __closure  *(*_local_bind    )(oop selector, oop receiver)= 0;
static oop                (*_local_nlreturn)(oop nlr, oop result)= 0;
static oop                (*_local_nlresult)(void)= 0;
static oop  		    _local_object= 0;
static oop  		   *_local_tag_vtable= 0;
static oop  		   *_local_nil_vtable= 0;
static void               (*_local_gc_addRoots)(char *lo, char *hi)= 0;
static void	          (*_local_gc_unregisterDisappearingLink)(void *ptr)= 0;
static void		  (*_local_gc_generalRegisterDisappearingLink)(void *link, void *ptr)= 0;
static void		  (*_local_gc_gcollect)(void)= 0;
static void		 *(*_local_enter)(char *name, char *type, char *file)= 0;
static void		  (*_local_line)(int line)= 0;
static void		  (*_local_leave)(void *)= 0;
static char		 *(*_local_backtrace)(void)= 0;

#define _param(INDEX)		_local_param(INDEX)
#define _selector(NAME)		_local_intern(NAME)
#define _proto(BASE)		_local_proto(BASE)
#define _id_import(NAME)	_local_import(NAME)
#define _id_export(NAME, VAL)	_local_export((NAME), (VAL))
#define _method(TYPE, SEL, IMP)	_local_method((TYPE), (SEL), (_imp_t)(IMP))
#define _alloc(RCV, LBS)	_local_alloc((RCV), (LBS))
#define _palloc(LBS)		_local_palloc((LBS))
#define _balloc(LBS)		_local_balloc((LBS))
#define _nlreturn(NLR, ARG)	_local_nlreturn((NLR), (ARG))
#define _nlresult()		_local_nlresult()
#define _backtrace()		_local_backtrace()
#ifdef ID_DEBUG
# define _enter(NM, TYPE, FILE)	void *__id_debug= _local_enter(NM, TYPE, FILE)
# define _line(line)		_local_line(line)
# define _leave()		_local_leave(__id_debug)
#else
# define _enter(NM, TYPE, FILE)
# define _line(line)
# define _leave()
#endif
#define _return			_leave(); return

#define _send(MSG, RCV, ARG...) ({					\
  register oop _r= (RCV);						\
  struct __closure *_c= (struct __closure *)_local_bind((MSG), _r);	\
  (_c->method)((oop)_c, _r, _r, ##ARG);					\
})

#define _super(TYP, MSG, RCV, ARG...) ({				\
  register oop _r= (RCV);						\
  struct __closure *_c= (struct __closure *)_local_bind((MSG), (TYP));	\
  (_c->method)((oop)_c, _r, _r, ##ARG);					\
})

static oop s_shiftToEnd= 0;
static oop s_yourself= 0;
static oop s_size= 0;
static oop s__5fdebugName= 0;
static oop s__2a= 0;
static oop s_new= 0;
static oop s_growSize= 0;
static oop s__5fsizeof= 0;
static oop s_max_= 0;
static oop s_new_= 0;
static oop s_new_5f_= 0;
static oop s_resetToEnd= 0;
static oop s_addFirst_= 0;
static oop s_value_5f_= 0;
static oop s_species= 0;
static oop s__5fimport_= 0;
static oop s_do_= 0;
static oop s__2d= 0;
static oop s_ifTrue_= 0;
static oop s__2b= 0;
static oop s__2f_2f= 0;
static oop s_emptyCheck= 0;
static oop s_to_do_= 0;
static oop s_downTo_do_= 0;
static oop s__3d_3d= 0;
static oop s_removeLast= 0;
static oop s_reset= 0;
static oop s_add_= 0;
static oop s__3d= 0;
static oop s_resetToBeginning= 0;
static oop s_shiftToBeginning= 0;
static oop s_initialize_= 0;
static oop s_setCollection_= 0;
static oop s_ifTrue_ifFalse_= 0;
static oop s__3c= 0;
static oop s__3e= 0;
static oop s_errorNoSuchElement= 0;
static oop s_addLast_= 0;
static oop s_makeRoomAtFirst= 0;
static oop s_makeRoomAtLast= 0;
static oop s_removeFirst= 0;
static oop s_or_= 0;
static oop s_copyFrom_to_= 0;
static oop s_function_5f_arity_5f_outer_state_nlr_5f_= 0;
static oop s_value_= 0;
static oop s_at_= 0;
static oop s_doWithIndex_= 0;
static oop s_value_value_= 0;
static oop s_and_= 0;
static oop s_replaceFrom_to_with_startingAt_= 0;
static oop s_resetToBegining= 0;
static oop s_at_put_= 0;
static struct _Selector { const char *name; oop *addr; } _Selectors[]= {
  { "shiftToEnd", &s_shiftToEnd },
  { "yourself", &s_yourself },
  { "size", &s_size },
  { "_debugName", &s__5fdebugName },
  { "*", &s__2a },
  { "new", &s_new },
  { "growSize", &s_growSize },
  { "_sizeof", &s__5fsizeof },
  { "max:", &s_max_ },
  { "new:", &s_new_ },
  { "new_:", &s_new_5f_ },
  { "resetToEnd", &s_resetToEnd },
  { "addFirst:", &s_addFirst_ },
  { "value_:", &s_value_5f_ },
  { "species", &s_species },
  { "_import:", &s__5fimport_ },
  { "do:", &s_do_ },
  { "-", &s__2d },
  { "ifTrue:", &s_ifTrue_ },
  { "+", &s__2b },
  { "//", &s__2f_2f },
  { "emptyCheck", &s_emptyCheck },
  { "to:do:", &s_to_do_ },
  { "downTo:do:", &s_downTo_do_ },
  { "==", &s__3d_3d },
  { "removeLast", &s_removeLast },
  { "reset", &s_reset },
  { "add:", &s_add_ },
  { "=", &s__3d },
  { "resetToBeginning", &s_resetToBeginning },
  { "shiftToBeginning", &s_shiftToBeginning },
  { "initialize:", &s_initialize_ },
  { "setCollection:", &s_setCollection_ },
  { "ifTrue:ifFalse:", &s_ifTrue_ifFalse_ },
  { "<", &s__3c },
  { ">", &s__3e },
  { "errorNoSuchElement", &s_errorNoSuchElement },
  { "addLast:", &s_addLast_ },
  { "makeRoomAtFirst", &s_makeRoomAtFirst },
  { "makeRoomAtLast", &s_makeRoomAtLast },
  { "removeFirst", &s_removeFirst },
  { "or:", &s_or_ },
  { "copyFrom:to:", &s_copyFrom_to_ },
  { "function_:arity_:outer:state:nlr_:", &s_function_5f_arity_5f_outer_state_nlr_5f_ },
  { "value:", &s_value_ },
  { "at:", &s_at_ },
  { "doWithIndex:", &s_doWithIndex_ },
  { "value:value:", &s_value_value_ },
  { "and:", &s_and_ },
  { "replaceFrom:to:with:startingAt:", &s_replaceFrom_to_with_startingAt_ },
  { "resetToBegining", &s_resetToBegining },
  { "at:put:", &s_at_put_ },
  { 0, 0 }
};
struct t__object {
  struct _vtable *_vtable[0];
};
struct t__selector {
  struct _vtable *_vtable[0];
  oop v__size;
  oop v__elements;
};
struct t__assoc {
  struct _vtable *_vtable[0];
  oop v_key;
  oop v_value;
};
struct t__closure {
  struct _vtable *_vtable[0];
  oop v__method;
  oop v_data;
};
struct t__vector {
  struct _vtable *_vtable[0];
  oop v__size;
};
struct t__vtable {
  struct _vtable *_vtable[0];
  oop v__tally;
  oop v_bindings;
  oop v_delegate;
};
struct t_Object {
  struct _vtable *_vtable[0];
};
struct t_UndefinedObject {
  struct _vtable *_vtable[0];
};
struct t_StaticBlockClosure {
  struct _vtable *_vtable[0];
  oop v__function;
  oop v__arity;
};
struct t_BlockClosure {
  struct _vtable *_vtable[0];
  oop v__function;
  oop v__arity;
  oop v_outer;
  oop v_state;
  oop v__nlr;
};
struct t_Magnitude {
  struct _vtable *_vtable[0];
};
struct t_Character {
  struct _vtable *_vtable[0];
  oop v_value;
};
struct t_Number {
  struct _vtable *_vtable[0];
};
struct t_Fraction {
  struct _vtable *_vtable[0];
  oop v_numerator;
  oop v_denominator;
};
struct t_Float {
  struct _vtable *_vtable[0];
};
struct t_Integer {
  struct _vtable *_vtable[0];
};
struct t_SmallInteger {
  struct _vtable *_vtable[0];
};
struct t_LargePositiveInteger {
  struct _vtable *_vtable[0];
  oop v_bytes;
};
struct t_LargeNegativeInteger {
  struct _vtable *_vtable[0];
  oop v_bytes;
};
struct t_Collection {
  struct _vtable *_vtable[0];
};
struct t_SequenceableCollection {
  struct _vtable *_vtable[0];
};
struct t_ArrayedCollection {
  struct _vtable *_vtable[0];
  oop v_size;
};
struct t_Array {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__pointers;
};
struct t_ImmutableArray {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__pointers;
};
struct t_WordArray {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__words;
};
struct t_ImmutableWordArray {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__words;
};
struct t_ByteArray {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__bytes;
};
struct t_ImmutableByteArray {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__bytes;
};
struct t_String {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__bytes;
};
struct t_ImmutableString {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__bytes;
};
struct t_Symbol {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__bytes;
};
struct t_nil {
  struct _vtable *_vtable[0];
};
struct t_true {
  struct _vtable *_vtable[0];
};
struct t_false {
  struct _vtable *_vtable[0];
};
struct t_CharacterTable {
  struct _vtable *_vtable[0];
  oop v_size;
  oop v__pointers;
};
struct t_OrderedCollection {
  struct _vtable *_vtable[0];
  oop v_array;
  oop v_firstIndex;
  oop v_lastIndex;
};
static oop l_1= 0;
static oop l_2= 0;
static oop l_3= 0;
static oop l_4= 0;
static oop l_5= 0;
static oop l_6= 0;
static oop l_7= 0;
static oop l_8= 0;
static oop l_9= 0;
static oop l_10= 0;
static oop l_11= 0;
static oop l_12= 0;
static oop l_14= 0;
static oop l_16= 0;
static oop l_18= 0;
static oop l_19= 0;
static oop l_20= 0;
static oop l_21= 0;
static oop l_22= 0;
static oop l_23= 0;
static oop l_26= 0;
static oop l_27= 0;
static oop v__object= 0;
static oop v__vector= 0;
static oop v_Object= 0;
static oop v_UndefinedObject= 0;
static oop v_StaticBlockClosure= 0;
static oop v_BlockClosure= 0;
static oop v_Magnitude= 0;
static oop v_Number= 0;
static oop v_Integer= 0;
static oop v_SmallInteger= 0;
static oop v_LargePositiveInteger= 0;
static oop v_Collection= 0;
static oop v_SequenceableCollection= 0;
static oop v_ArrayedCollection= 0;
static oop v_Array= 0;
static oop v_WordArray= 0;
static oop v_ByteArray= 0;
static oop v_String= 0;
static oop v_ImmutableString= 0;
static oop v_nil= 0;
static oop v_true= 0;
static oop v_false= 0;
static oop v_OrderedCollection= 0;
static size_t OrderedCollection___5fsizeof(oop _closure, oop v_self) { return sizeof(struct t_OrderedCollection); }
static char *OrderedCollection___5fdebugName(oop _closure, oop v_self) { return "OrderedCollection"; }
static oop OrderedCollection__species(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("species", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  _line(25);
  _1= v_OrderedCollection;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__new(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("new", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  _line(27);
  _1= v_self;
  _2= l_1;
  _line(27);
  _1=_send(s_new_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__new_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger)
 {
  _enter("new:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  _line(28);
  _1= v_self;
  _line(28);
  _1=_super(v_SequenceableCollection, s_new, _1);
  _2= v_anInteger;
  _line(28);
  _1=_send(s_initialize_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__initialize_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger)
 {
  _enter("initialize:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(30);
  _1= v_self;
  _2= v_Array;
  _3= v_anInteger;
  _line(30);
  _2=_send(s_new_, _2, _3);
  _line(30);
  _1=_send(s_setCollection_, _1, _2);
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__setCollection_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anArray)
 {
  _enter("setCollection:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  _line(32);
  _1= v_anArray;
  ((struct t_OrderedCollection *)v_stateful_self)->v_array= _1;
  _1= v_self;
  _line(35);
  _1=_send(s_reset, _1);
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__size(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("size", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  _line(38);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  _2= l_2;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__reset(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("reset", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  _line(40);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _line(40);
  _1=_send(s_size, _1);
  _2= l_3;
  _1= _send(s__2f_2f, _1, _2);
  _2= l_4;
  _line(40);
  _1=_send(s_max_, _1, _2);
  ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1;
  _2= l_4;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__at_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger)
 {
  _enter("at:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop v_position= 0;
  oop _1= 0;
  oop _2= 0;
  (void)v_position;
  _line(42);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _2= v_anInteger;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  _2= l_5;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  v_position= _1;
  /* ifTrue:ifFalse: */
  /* or: */
  _1= v_anInteger;
  _2= l_5;
  if (1 & (int)_1) {
    _1= (((int)_1 < (int)_2) ? v_true : v_false);
  } else _1= _send(s__3c, _1, _2);
  if (_1) goto _l3;
 {
  _1= v_position;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  if (1 & (int)_1 & (int)_2) {
    _1= (((int)_1 > (int)_2) ? v_true : v_false);
  } else _1= _send(s__3e, _1, _2);
 }
 _l3:;
  if (!_1) goto _l1;
 {
  _1= v_self;
  _line(46);
  _1=_send(s_errorNoSuchElement, _1);
 }
  goto _l2;
 _l1:;
 {
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _2= v_position;
  _line(46);
  _1=_send(s_at_, _1, _2);
 }
 _l2:;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__at_put_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anInteger, oop v_anObject)
 {
  _enter("at:put:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop v_position= 0;
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  (void)v_position;
  _line(49);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _2= v_anInteger;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  _2= l_6;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  v_position= _1;
  /* ifTrue:ifFalse: */
  /* or: */
  _1= v_anInteger;
  _2= l_6;
  if (1 & (int)_1) {
    _1= (((int)_1 < (int)_2) ? v_true : v_false);
  } else _1= _send(s__3c, _1, _2);
  if (_1) goto _l6;
 {
  _1= v_position;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  if (1 & (int)_1 & (int)_2) {
    _1= (((int)_1 > (int)_2) ? v_true : v_false);
  } else _1= _send(s__3e, _1, _2);
 }
 _l6:;
  if (!_1) goto _l4;
 {
  _1= v_self;
  _line(60);
  _1=_send(s_errorNoSuchElement, _1);
 }
  goto _l5;
 _l4:;
 {
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _2= v_position;
  _3= v_anObject;
  _line(60);
  _1=_send(s_at_put_, _1, _2, _3);
 }
 _l5:;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__add_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject)
 {
  _enter("add:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  _line(63);
  _1= v_self;
  _2= v_anObject;
  _line(63);
  _1=_send(s_addLast_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__addFirst_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject)
 {
  _enter("addFirst:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(65);
  /* ifTrue: */
  _1= 0;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _3= l_7;
  if (1 & (int)_2) {
    _2= (((int)_2 == (int)_3) ? v_true : v_false);
  } else _2= _send(s__3d, _2, _3);
  if (!_2) goto _l7;
 {
  _1= v_self;
  _line(67);
  _1=_send(s_makeRoomAtFirst, _1);
 }
 _l7:;
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _3= l_7;
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2d, _2, _3);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _2;
  _3= v_anObject;
  _line(68);
  _1=_send(s_at_put_, _1, _2, _3);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__addLast_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject)
 {
  _enter("addLast:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(71);
  /* ifTrue: */
  _1= 0;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _3= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _line(73);
  _3=_send(s_size, _3);
  if (1 & (int)_2 & (int)_3) {
    _2= (((int)_2 == (int)_3) ? v_true : v_false);
  } else _2= _send(s__3d, _2, _3);
  if (!_2) goto _l8;
 {
  _1= v_self;
  _line(73);
  _1=_send(s_makeRoomAtLast, _1);
 }
 _l8:;
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _3= l_8;
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2b, _2, _3);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _2;
  _3= v_anObject;
  _line(74);
  _1=_send(s_at_put_, _1, _2, _3);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__removeFirst(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("removeFirst", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop v_first= 0;
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  (void)v_first;
  _line(77);
  _1= v_self;
  _line(80);
  _1=_send(s_emptyCheck, _1);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _line(81);
  _1=_send(s_at_, _1, _2);
  v_first= _1;
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _3= v_nil;
  _line(82);
  _1=_send(s_at_put_, _1, _2, _3);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _2= l_9;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1;
  _1= v_first;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__removeLast(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("removeLast", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop v_last= 0;
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  (void)v_last;
  _line(87);
  _1= v_self;
  _line(90);
  _1=_send(s_emptyCheck, _1);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _line(91);
  _1=_send(s_at_, _1, _2);
  v_last= _1;
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _3= v_nil;
  _line(92);
  _1=_send(s_at_put_, _1, _2, _3);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _2= l_10;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1;
  _1= v_last;
  _leave();
  return _1;
  _leave();
 }
static oop b_13(oop v__closure, oop v__self, oop v_index)
 {
  _enter("[]", "?", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(102);
  _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1];  /* copy */
  _2= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2];  /* self */
  _3= v_index;
  _line(102);
  _2=_send(s_at_, _2, _3);
  _line(102);
  _1=_send(s_addLast_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__copyFrom_to_(oop v__closure, oop v_stateful_self, oop v_self, oop v_first, oop v_last)
 {
  _enter("copyFrom:to:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _state1= _send(s_new_5f_, v__vector, 7);
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  ((oop *)_state1)[3]= v_stateful_self;
  ((oop *)_state1)[2]= v_self;
  _line(97);
  /* ifTrue: */
  _1= 0;
  _2= v_last;
  _3= v_first;
  if (1 & (int)_2 & (int)_3) {
    _2= (((int)_2 < (int)_3) ? v_true : v_false);
  } else _2= _send(s__3c, _2, _3);
  if (!_2) goto _l9;
 {
  _1= ((oop *)_state1)[2];  /* self */
  _line(100);
  _1=_send(s_species, _1);
  _2= l_11;
  _line(100);
  _1=_send(s_new_, _1, _2);
  _leave();
  return _1;
 }
 _l9:;
  _1= ((oop *)_state1)[2];  /* self */
  _line(101);
  _1=_send(s_species, _1);
  _2= v_last;
  _3= l_12;
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2b, _2, _3);
  }
  _3= v_first;
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_2 & (int)_3) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2d, _2, _3);
  }
  _line(101);
  _1=_send(s_new_, _1, _2);
  ((oop *)_state1)[1]= _1;  /* copy */
  _1= v_first;
  _2= v_last;
  /* Scope('index'->ArgumentVariableNode) */
  /* Scope('copy'->TemporaryVariableNode 'stateful_self'->ArgumentVariableNode 'array'->SlotVariableNode 'first'->ArgumentVariableNode 'self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'last'->ArgumentVariableNode) */
  /* nil */
  /* 2 */
  /* 1 */
  _3= _send(s_function_5f_arity_5f_outer_state_nlr_5f_, v_BlockClosure, (oop)b_13, 1, 0, ((oop *)_state1), 0);
  _line(102);
  _1=_send(s_to_do_, _1, _2, _3);
  _1= ((oop *)_state1)[1];  /* copy */
  _leave();
  return _1;
  _leave();
 }
static oop b_15(oop v__closure, oop v__self, oop v_offset)
 {
  _enter("[]", "?", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  oop _4= 0;
  _line(108);
  _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1];  /* unaryBlock */
  _2= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_array;  /* array */
  _3= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_firstIndex;  /* firstIndex */
  _4= v_offset;
  {
    int _l= (int)_3 >> 1;
    int _r= (int)_4 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_3 & (int)_4) && ((_s ^ (_s << 1)) >= 0))  _3= (oop)(_s << 1 | 1);  else _3= _send(s__2b, _3, _4);
  }
  _line(108);
  _2=_send(s_at_, _2, _3);
  _line(108);
  _1=_send(s_value_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__do_(oop v__closure, oop v_stateful_self, oop v_self, oop v_unaryBlock)
 {
  _enter("do:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _state1= _send(s_new_5f_, v__vector, 6);
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  ((oop *)_state1)[2]= v_stateful_self;
  ((oop *)_state1)[1]= v_unaryBlock;
  _line(106);
  _1= l_14;
  _2= ((struct t_OrderedCollection *)((oop *)_state1)[2])->v_lastIndex;  /* lastIndex */
  _3= ((struct t_OrderedCollection *)((oop *)_state1)[2])->v_firstIndex;  /* firstIndex */
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_2 & (int)_3) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2d, _2, _3);
  }
  /* Scope('offset'->ArgumentVariableNode) */
  /* Scope('self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'unaryBlock'->ArgumentVariableNode 'stateful_self'->ArgumentVariableNode 'array'->SlotVariableNode) */
  /* nil */
  /* 2 */
  /* 1 */
  _3= _send(s_function_5f_arity_5f_outer_state_nlr_5f_, v_BlockClosure, (oop)b_15, 1, 0, ((oop *)_state1), 0);
  _line(108);
  _1=_send(s_to_do_, _1, _2, _3);
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop b_17(oop v__closure, oop v__self, oop v_offset)
 {
  _enter("[]", "?", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  oop _4= 0;
  _line(113);
  _1= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1];  /* binaryBlock */
  _2= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_array;  /* array */
  _3= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2])->v_firstIndex;  /* firstIndex */
  _4= v_offset;
  {
    int _l= (int)_3 >> 1;
    int _r= (int)_4 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_3 & (int)_4) && ((_s ^ (_s << 1)) >= 0))  _3= (oop)(_s << 1 | 1);  else _3= _send(s__2b, _3, _4);
  }
  _line(113);
  _2=_send(s_at_, _2, _3);
  _3= v_offset;
  _4= l_18;
  {
    int _l= (int)_3 >> 1;
    int _r= (int)_4 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_3) && ((_s ^ (_s << 1)) >= 0))  _3= (oop)(_s << 1 | 1);  else _3= _send(s__2b, _3, _4);
  }
  _line(113);
  _1=_send(s_value_value_, _1, _2, _3);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__doWithIndex_(oop v__closure, oop v_stateful_self, oop v_self, oop v_binaryBlock)
 {
  _enter("doWithIndex:", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _state1= _send(s_new_5f_, v__vector, 6);
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  ((oop *)_state1)[2]= v_stateful_self;
  ((oop *)_state1)[1]= v_binaryBlock;
  _line(111);
  _1= l_16;
  _2= ((struct t_OrderedCollection *)((oop *)_state1)[2])->v_lastIndex;  /* lastIndex */
  _3= ((struct t_OrderedCollection *)((oop *)_state1)[2])->v_firstIndex;  /* firstIndex */
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_2 & (int)_3) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2d, _2, _3);
  }
  /* Scope('offset'->ArgumentVariableNode) */
  /* Scope('stateful_self'->ArgumentVariableNode 'self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'binaryBlock'->ArgumentVariableNode 'array'->SlotVariableNode) */
  /* nil */
  /* 2 */
  /* 1 */
  _3= _send(s_function_5f_arity_5f_outer_state_nlr_5f_, v_BlockClosure, (oop)b_17, 1, 0, ((oop *)_state1), 0);
  _line(113);
  _1=_send(s_to_do_, _1, _2, _3);
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__makeRoomAtFirst(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("makeRoomAtFirst", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop v_delta= 0;
  oop v_newArray= 0;
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  oop _4= 0;
  oop _5= 0;
  (void)v_delta;
  (void)v_newArray;
  _line(125);
  /* ifTrue: */
  _1= 0;
  /* and: */
  _2= v_self;
  _line(128);
  _2=_send(s_size, _2);
  _3= l_19;
  _2= (_2 == _3) ? v_true : v_false;
  if (!_2) goto _l11;
 {
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _line(128);
  _2=_send(s_size, _2);
  _3= l_19;
  if (1 & (int)_2) {
    _2= (((int)_2 > (int)_3) ? v_true : v_false);
  } else _2= _send(s__3e, _2, _3);
 }
 _l11:;
  if (!_2) goto _l10;
 {
  _1= v_self;
  _line(128);
  _1=_send(s_resetToEnd, _1);
  _leave();
  return _1;
 }
 _l10:;
  /* ifTrue: */
  _1= 0;
  _2= v_self;
  _line(129);
  _2=_send(s_size, _2);
  _3= l_20;
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= (_l * _r);
    if ((1 & (int)_2) && ((_r == 0) || (_s / _r == _l)) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2a, _2, _3);
  }
  _3= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _line(129);
  _3=_send(s_size, _3);
  if (1 & (int)_2 & (int)_3) {
    _2= (((int)_2 < (int)_3) ? v_true : v_false);
  } else _2= _send(s__3c, _2, _3);
  if (!_2) goto _l12;
 {
  _1= v_self;
  _line(129);
  _1=_send(s_shiftToEnd, _1);
  _leave();
  return _1;
 }
 _l12:;
  _1= v_self;
  _line(130);
  _1=_send(s_growSize, _1);
  v_delta= _1;
  _1= v_Array;
  _2= v_self;
  _line(131);
  _2=_send(s_size, _2);
  _3= v_delta;
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_2 & (int)_3) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2b, _2, _3);
  }
  _line(131);
  _1=_send(s_new_, _1, _2);
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _3= v_delta;
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_2 & (int)_3) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2b, _2, _3);
  }
  _3= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _4= v_delta;
  {
    int _l= (int)_3 >> 1;
    int _r= (int)_4 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_3 & (int)_4) && ((_s ^ (_s << 1)) >= 0))  _3= (oop)(_s << 1 | 1);  else _3= _send(s__2b, _3, _4);
  }
  _4= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _5= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _line(131);
  _1=_send(s_replaceFrom_to_with_startingAt_, _1, _2, _3, _4, _5);
  v_newArray= _1;
  _1= v_newArray;
  ((struct t_OrderedCollection *)v_stateful_self)->v_array= _1;
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _2= v_delta;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1;
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _2= v_delta;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__makeRoomAtLast(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("makeRoomAtLast", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  oop _4= 0;
  oop _5= 0;
  _line(137);
  /* ifTrue: */
  _1= 0;
  /* and: */
  _2= v_self;
  _line(139);
  _2=_send(s_size, _2);
  _3= l_21;
  _2= (_2 == _3) ? v_true : v_false;
  if (!_2) goto _l14;
 {
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _line(139);
  _2=_send(s_size, _2);
  _3= l_21;
  if (1 & (int)_2) {
    _2= (((int)_2 > (int)_3) ? v_true : v_false);
  } else _2= _send(s__3e, _2, _3);
 }
 _l14:;
  if (!_2) goto _l13;
 {
  _1= v_self;
  _line(139);
  _1=_send(s_resetToBeginning, _1);
  _leave();
  return _1;
 }
 _l13:;
  /* ifTrue: */
  _1= 0;
  _2= v_self;
  _line(140);
  _2=_send(s_size, _2);
  _3= l_22;
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= (_l * _r);
    if ((1 & (int)_2) && ((_r == 0) || (_s / _r == _l)) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2a, _2, _3);
  }
  _3= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _line(140);
  _3=_send(s_size, _3);
  if (1 & (int)_2 & (int)_3) {
    _2= (((int)_2 < (int)_3) ? v_true : v_false);
  } else _2= _send(s__3c, _2, _3);
  if (!_2) goto _l15;
 {
  _1= v_self;
  _line(140);
  _1=_send(s_shiftToBeginning, _1);
  _leave();
  return _1;
 }
 _l15:;
  _1= v_Array;
  _2= v_self;
  _line(141);
  _2=_send(s_size, _2);
  _3= v_self;
  _line(141);
  _3=_send(s_growSize, _3);
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_2 & (int)_3) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2b, _2, _3);
  }
  _line(141);
  _1=_send(s_new_, _1, _2);
  _2= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _3= ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex;
  _4= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _5= ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex;
  _line(142);
  _send(s_replaceFrom_to_with_startingAt_, _1, _2, _3, _4, _5);
  _1=_send(s_yourself, _1);
  ((struct t_OrderedCollection *)v_stateful_self)->v_array= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop b_24(oop v__closure, oop v__self, oop v_index)
 {
  _enter("[]", "?", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  oop _4= 0;
  oop _5= 0;
  _line(150);
  _1= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_array;  /* array */
  _2= v_index;
  _3= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_array;  /* array */
  _4= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2];  /* delta */
  _5= v_index;
  {
    int _l= (int)_4 >> 1;
    int _r= (int)_5 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_4 & (int)_5) && ((_s ^ (_s << 1)) >= 0))  _4= (oop)(_s << 1 | 1);  else _4= _send(s__2b, _4, _5);
  }
  _line(150);
  _3=_send(s_at_, _3, _4);
  _line(150);
  _1=_send(s_at_put_, _1, _2, _3);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__shiftToBeginning(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("shiftToBeginning", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _state1= _send(s_new_5f_, v__vector, 6);
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  ((oop *)_state1)[1]= v_stateful_self;
  _line(146);
  _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex;  /* firstIndex */
  _2= l_23;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  ((oop *)_state1)[2]= _1;  /* delta */
  _1= l_23;
  _2= v_self;
  _line(150);
  _2=_send(s_size, _2);
  /* Scope('index'->ArgumentVariableNode) */
  /* Scope('self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'delta'->TemporaryVariableNode 'stateful_self'->ArgumentVariableNode 'array'->SlotVariableNode) */
  /* nil */
  /* 2 */
  /* 1 */
  _3= _send(s_function_5f_arity_5f_outer_state_nlr_5f_, v_BlockClosure, (oop)b_24, 1, 0, ((oop *)_state1), 0);
  _line(150);
  _1=_send(s_to_do_, _1, _2, _3);
  _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex;  /* firstIndex */
  _2= ((oop *)_state1)[2];  /* delta */
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex= _1;  /* firstIndex */
  _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex;  /* lastIndex */
  _2= ((oop *)_state1)[2];  /* delta */
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex= _1;  /* lastIndex */
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop b_25(oop v__closure, oop v__self, oop v_index)
 {
  _enter("[]", "?", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  oop _4= 0;
  _line(159);
  _1= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_array;  /* array */
  _2= v_index;
  _3= ((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[2];  /* delta */
  {
    int _l= (int)_2 >> 1;
    int _r= (int)_3 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_2 & (int)_3) && ((_s ^ (_s << 1)) >= 0))  _2= (oop)(_s << 1 | 1);  else _2= _send(s__2b, _2, _3);
  }
  _3= ((struct t_OrderedCollection *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_array;  /* array */
  _4= v_index;
  _line(159);
  _3=_send(s_at_, _3, _4);
  _line(159);
  _1=_send(s_at_put_, _1, _2, _3);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__shiftToEnd(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("shiftToEnd", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _state1= _send(s_new_5f_, v__vector, 6);
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  ((oop *)_state1)[1]= v_stateful_self;
  _line(155);
  _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_array;  /* array */
  _line(158);
  _1=_send(s_size, _1);
  _2= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex;  /* lastIndex */
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  ((oop *)_state1)[2]= _1;  /* delta */
  _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex;  /* lastIndex */
  _2= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex;  /* firstIndex */
  /* Scope('index'->ArgumentVariableNode) */
  /* Scope('self'->ArgumentVariableNode 'firstIndex'->SlotVariableNode 'lastIndex'->SlotVariableNode 'delta'->TemporaryVariableNode 'stateful_self'->ArgumentVariableNode 'array'->SlotVariableNode) */
  /* nil */
  /* 2 */
  /* 1 */
  _3= _send(s_function_5f_arity_5f_outer_state_nlr_5f_, v_BlockClosure, (oop)b_25, 1, 0, ((oop *)_state1), 0);
  _line(159);
  _1=_send(s_downTo_do_, _1, _2, _3);
  _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex;  /* firstIndex */
  _2= ((oop *)_state1)[2];  /* delta */
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_firstIndex= _1;  /* firstIndex */
  _1= ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex;  /* lastIndex */
  _2= ((oop *)_state1)[2];  /* delta */
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1 & (int)_2) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  ((struct t_OrderedCollection *)((oop *)_state1)[1])->v_lastIndex= _1;  /* lastIndex */
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__growSize(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("growSize", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  _line(164);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _line(164);
  _1=_send(s_size, _1);
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__resetToBegining(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("resetToBegining", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  _line(166);
  _1= l_26;
  ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1;
  _2= l_26;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= (_l - _r);
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2d, _1, _2);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop OrderedCollection__resetToEnd(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("resetToEnd", "OrderedCollection", "/home/saintiss/source/svn/stIdst_278/object/st80/OrderedCollection.st");
  oop _1= 0;
  oop _2= 0;
  _line(167);
  _1= ((struct t_OrderedCollection *)v_stateful_self)->v_array;
  _line(167);
  _1=_send(s_size, _1);
  ((struct t_OrderedCollection *)v_stateful_self)->v_lastIndex= _1;
  _2= l_27;
  {
    int _l= (int)_1 >> 1;
    int _r= (int)_2 >> 1;
    int _s= _l + _r;
    if ((1 & (int)_1) && ((_s ^ (_s << 1)) >= 0))  _1= (oop)(_s << 1 | 1);  else _1= _send(s__2b, _1, _2);
  }
  ((struct t_OrderedCollection *)v_stateful_self)->v_firstIndex= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }

void __id__init__OrderedCollection(void)
{
  if (_local_object) return;
  { 
    dlhandle_t global= dlopen(0, RTLD_LAZY);
    _local_object= *(oop *)dlsym(global, "_libid_object");
    _local_param= dlsym(global, "_libid_param");
    _local_intern= dlsym(global, "_libid_intern");
    _local_proto= dlsym(global, "_libid_proto");
    _local_import= dlsym(global, "_libid_import");
    _local_export= dlsym(global, "_libid_export");
    _local_method= dlsym(global, "_libid_method");
    _local_alloc= dlsym(global, "_libid_alloc");
    _local_palloc= dlsym(global, "_libid_palloc");
    _local_balloc= dlsym(global, "_libid_balloc");
    _local_bind= dlsym(global, "_libid_bind");
    _local_nlreturn= dlsym(global, "_libid_nlreturn");
    _local_nlresult= dlsym(global, "_libid_nlresult");
    _local_enter= dlsym(global, "_libid_enter");
    _local_line= dlsym(global, "_libid_line");
    _local_leave= dlsym(global, "_libid_leave");
    _local_backtrace= dlsym(global, "_libid_backtrace");
    _local_tag_vtable= dlsym(global, "_libid_tag_vtable");
    _local_nil_vtable= dlsym(global, "_libid_nil_vtable");
    _local_gc_addRoots= dlsym(global, "GC_add_roots");
    _local_gc_unregisterDisappearingLink= dlsym(global, "GC_unregister_disappearing_link");
    _local_gc_generalRegisterDisappearingLink= dlsym(global, "GC_general_register_disappearing_link");
    _local_gc_gcollect= dlsym(global, "GC_gcollect");
    dlclose(global);
  }
# define GC_add_roots _local_gc_addRoots
  GC_INIT();
  {
    struct _Selector *s= 0;
    for (s= _Selectors;  s->name;  ++s)
      *s->addr= _selector(s->name);
  }
  _enter("__id__init__", "<initialisation>", "OrderedCollection.st");

  _send(s__5fimport_, _local_object, "SequenceableCollection", "__id__init__SequenceableCollection");
  _send(s__5fimport_, _local_object, "Collection", "__id__init__Collection");
  _send(s__5fimport_, _local_object, "Object", "__id__init__Object");
  _send(s__5fimport_, _local_object, "_object", "__id__init___5fobject");
  v__object= _id_import("_object");
  v__vector= _id_import("_vector");
  v_Object= _id_import("Object");
  v_UndefinedObject= _id_import("UndefinedObject");
  v_StaticBlockClosure= _id_import("StaticBlockClosure");
  v_BlockClosure= _id_import("BlockClosure");
  v_Magnitude= _id_import("Magnitude");
  v_Number= _id_import("Number");
  v_Integer= _id_import("Integer");
  v_SmallInteger= _id_import("SmallInteger");
  v_LargePositiveInteger= _id_import("LargePositiveInteger");
  v_Collection= _id_import("Collection");
  v_SequenceableCollection= _id_import("SequenceableCollection");
  v_ArrayedCollection= _id_import("ArrayedCollection");
  v_Array= _id_import("Array");
  v_WordArray= _id_import("WordArray");
  v_ByteArray= _id_import("ByteArray");
  v_String= _id_import("String");
  v_ImmutableString= _id_import("ImmutableString");
  v_nil= _id_import("nil");
  v_true= _id_import("true");
  v_false= _id_import("false");
  _send(s__5fimport_, _local_object, "BlockClosure", "__id__init__BlockClosure");
  _send(s__5fimport_, _local_object, "SmallInteger", "__id__init__SmallInteger");
  _send(s__5fimport_, _local_object, "Integer", "__id__init__Integer");
  _send(s__5fimport_, _local_object, "Number", "__id__init__Number");
  _send(s__5fimport_, _local_object, "Magnitude", "__id__init__Magnitude");
  _send(s__5fimport_, _local_object, "Array", "__id__init__Array");
  _send(s__5fimport_, _local_object, "ArrayedCollection", "__id__init__ArrayedCollection");
  _send(s__5fimport_, _local_object, "Character", "__id__init__Character");
  _send(s__5fimport_, _local_object, "String", "__id__init__String");
  _send(s__5fimport_, _local_object, "ByteArray", "__id__init__ByteArray");
  _send(s__5fimport_, _local_object, "WordArray", "__id__init__WordArray");
  v_OrderedCollection= _proto(v_SequenceableCollection);
  _method(v_OrderedCollection, s__5fsizeof, OrderedCollection___5fsizeof);
  _method(v_OrderedCollection, s__5fdebugName, OrderedCollection___5fdebugName);
  _id_export("OrderedCollection", v_OrderedCollection);
  _method(v_OrderedCollection, s_species, OrderedCollection__species);
  l_1= _send(s_value_5f_, v_SmallInteger, 2);
  _method(v_OrderedCollection, s_new, OrderedCollection__new);
  _method(v_OrderedCollection, s_new_, OrderedCollection__new_);
  _method(v_OrderedCollection, s_initialize_, OrderedCollection__initialize_);
  _method(v_OrderedCollection, s_setCollection_, OrderedCollection__setCollection_);
  l_2= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_size, OrderedCollection__size);
  l_3= _send(s_value_5f_, v_SmallInteger, 3);
  l_4= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_reset, OrderedCollection__reset);
  l_5= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_at_, OrderedCollection__at_);
  l_6= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_at_put_, OrderedCollection__at_put_);
  _method(v_OrderedCollection, s_add_, OrderedCollection__add_);
  l_7= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_addFirst_, OrderedCollection__addFirst_);
  l_8= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_addLast_, OrderedCollection__addLast_);
  l_9= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_removeFirst, OrderedCollection__removeFirst);
  l_10= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_removeLast, OrderedCollection__removeLast);
  l_11= _send(s_value_5f_, v_SmallInteger, 0);
  l_12= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_copyFrom_to_, OrderedCollection__copyFrom_to_);
  l_14= _send(s_value_5f_, v_SmallInteger, 0);
  _method(v_OrderedCollection, s_do_, OrderedCollection__do_);
  l_16= _send(s_value_5f_, v_SmallInteger, 0);
  l_18= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_doWithIndex_, OrderedCollection__doWithIndex_);
  l_19= _send(s_value_5f_, v_SmallInteger, 0);
  l_20= _send(s_value_5f_, v_SmallInteger, 2);
  _method(v_OrderedCollection, s_makeRoomAtFirst, OrderedCollection__makeRoomAtFirst);
  l_21= _send(s_value_5f_, v_SmallInteger, 0);
  l_22= _send(s_value_5f_, v_SmallInteger, 2);
  _method(v_OrderedCollection, s_makeRoomAtLast, OrderedCollection__makeRoomAtLast);
  l_23= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_shiftToBeginning, OrderedCollection__shiftToBeginning);
  _method(v_OrderedCollection, s_shiftToEnd, OrderedCollection__shiftToEnd);
  _method(v_OrderedCollection, s_growSize, OrderedCollection__growSize);
  l_26= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_resetToBegining, OrderedCollection__resetToBegining);
  l_27= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_OrderedCollection, s_resetToEnd, OrderedCollection__resetToEnd);
  _leave();
}
