/* generated by Id 1.0 at 2007-08-31 06:58:52 Z */
/* with the command: -I../stage1/ -c AVLTree.st -o ../stage2/AVLTree.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_removeNode_= 0;
static oop s_print= 0;
static oop s_delta= 0;
static oop s_nextPut_= 0;
static oop s_height= 0;
static oop s__5fdebugName= 0;
static oop s_depth= 0;
static oop s_new= 0;
static oop s_with_= 0;
static oop s_reverseDo_= 0;
static oop s_notNil= 0;
static oop s_right= 0;
static oop s_printOn_= 0;
static oop s_not= 0;
static oop s__5fsizeof= 0;
static oop s_balance= 0;
static oop s_new_5f_= 0;
static oop s_value_5f_= 0;
static oop s_addNode_= 0;
static oop s__5fimport_= 0;
static oop s_left_= 0;
static oop s_print_= 0;
static oop s_find_= 0;
static oop s_findNode_= 0;
static oop s_do_= 0;
static oop s_remove_= 0;
static oop s_initialize= 0;
static oop s__2d= 0;
static oop s_ifTrue_= 0;
static oop s__2b= 0;
static oop s_isNil= 0;
static oop s_left= 0;
static oop s_add_= 0;
static oop s_isEmpty= 0;
static oop s_avlTreeNodeMoveRight_= 0;
static oop s_function_5f_arity_5f_outer_state_nlr_5f_= 0;
static oop s_avlTreeNodeDo_= 0;
static oop s_avlTreeNodeReverseDo_= 0;
static oop s_withSortBlock_= 0;
static oop s_function_5f_arity_5f_= 0;
static oop s_precedes_orderedBy_= 0;
static oop s_value_value_= 0;
static oop s_equals_orderedBy_= 0;
static oop s_and_= 0;
static oop s_avlTreeNodeInsert_orderedBy_= 0;
static oop s_ifTrue_ifFalse_= 0;
static oop s_avlTreeNodeHeight= 0;
static oop s__3c= 0;
static oop s_value_= 0;
static oop s__3e= 0;
static oop s_right_= 0;
static oop s_or_= 0;
static oop s_withValue_= 0;
static oop s_rotateRight= 0;
static oop s_rotateLeft= 0;
static oop s_avlTreeNodeFind_= 0;
static oop s_avlTreeNodeFind_orderedBy_= 0;
static oop s_value= 0;
static oop s_avlTreeNodeRemove_orderedBy_= 0;
static oop s_remove_orderedBy_= 0;
static struct _Selector { const char *name; oop *addr; } _Selectors[]= {
  { "removeNode:", &s_removeNode_ },
  { "print", &s_print },
  { "delta", &s_delta },
  { "nextPut:", &s_nextPut_ },
  { "height", &s_height },
  { "_debugName", &s__5fdebugName },
  { "depth", &s_depth },
  { "new", &s_new },
  { "with:", &s_with_ },
  { "reverseDo:", &s_reverseDo_ },
  { "notNil", &s_notNil },
  { "right", &s_right },
  { "printOn:", &s_printOn_ },
  { "not", &s_not },
  { "_sizeof", &s__5fsizeof },
  { "balance", &s_balance },
  { "new_:", &s_new_5f_ },
  { "value_:", &s_value_5f_ },
  { "addNode:", &s_addNode_ },
  { "_import:", &s__5fimport_ },
  { "left:", &s_left_ },
  { "print:", &s_print_ },
  { "find:", &s_find_ },
  { "findNode:", &s_findNode_ },
  { "do:", &s_do_ },
  { "remove:", &s_remove_ },
  { "initialize", &s_initialize },
  { "-", &s__2d },
  { "ifTrue:", &s_ifTrue_ },
  { "+", &s__2b },
  { "isNil", &s_isNil },
  { "left", &s_left },
  { "add:", &s_add_ },
  { "isEmpty", &s_isEmpty },
  { "avlTreeNodeMoveRight:", &s_avlTreeNodeMoveRight_ },
  { "function_:arity_:outer:state:nlr_:", &s_function_5f_arity_5f_outer_state_nlr_5f_ },
  { "avlTreeNodeDo:", &s_avlTreeNodeDo_ },
  { "avlTreeNodeReverseDo:", &s_avlTreeNodeReverseDo_ },
  { "withSortBlock:", &s_withSortBlock_ },
  { "function_:arity_:", &s_function_5f_arity_5f_ },
  { "precedes:orderedBy:", &s_precedes_orderedBy_ },
  { "value:value:", &s_value_value_ },
  { "equals:orderedBy:", &s_equals_orderedBy_ },
  { "and:", &s_and_ },
  { "avlTreeNodeInsert:orderedBy:", &s_avlTreeNodeInsert_orderedBy_ },
  { "ifTrue:ifFalse:", &s_ifTrue_ifFalse_ },
  { "avlTreeNodeHeight", &s_avlTreeNodeHeight },
  { "<", &s__3c },
  { "value:", &s_value_ },
  { ">", &s__3e },
  { "right:", &s_right_ },
  { "or:", &s_or_ },
  { "withValue:", &s_withValue_ },
  { "rotateRight", &s_rotateRight },
  { "rotateLeft", &s_rotateLeft },
  { "avlTreeNodeFind:", &s_avlTreeNodeFind_ },
  { "avlTreeNodeFind:orderedBy:", &s_avlTreeNodeFind_orderedBy_ },
  { "value", &s_value },
  { "avlTreeNodeRemove:orderedBy:", &s_avlTreeNodeRemove_orderedBy_ },
  { "remove:orderedBy:", &s_remove_orderedBy_ },
  { 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_AVLTreeNode {
  struct _vtable *_vtable[0];
  oop v_left;
  oop v_right;
  oop v_height;
  oop v_value;
};
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_7= 0;
static oop l_8= 0;
struct t_AVLTree {
  struct _vtable *_vtable[0];
  oop v_rootNode;
  oop v_orderBlock;
};
static oop l_9= 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_Character= 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_AVLTreeNode= 0;
static oop v_AVLTree= 0;
static size_t AVLTreeNode___5fsizeof(oop _closure, oop v_self) { return sizeof(struct t_AVLTreeNode); }
static char *AVLTreeNode___5fdebugName(oop _closure, oop v_self) { return "AVLTreeNode"; }
static oop AVLTreeNode__left(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("left", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(25);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__left_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode)
 {
  _enter("left:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(26);
  _1= v_aNode;
  ((struct t_AVLTreeNode *)v_stateful_self)->v_left= _1;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__right(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("right", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(27);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__right_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode)
 {
  _enter("right:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(28);
  _1= v_aNode;
  ((struct t_AVLTreeNode *)v_stateful_self)->v_right= _1;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__height(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("height", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(29);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_height;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__value(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("value", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(30);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_value;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__initialize(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("initialize", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(32);
  _1= v_self;
  _line(34);
  _1=_super(v_Object, s_initialize, _1);
  _1= v_nil;
  ((struct t_AVLTreeNode *)v_stateful_self)->v_right= _1;
  ((struct t_AVLTreeNode *)v_stateful_self)->v_left= _1;
  _1= l_1;
  ((struct t_AVLTreeNode *)v_stateful_self)->v_height= _1;
  _1= v_nil;
  ((struct t_AVLTreeNode *)v_stateful_self)->v_value= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__withValue_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject)
 {
  _enter("withValue:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(40);
  _1= v_self;
  _line(42);
  _1=_send(s_new, _1);
  v_self= _1;
  v_stateful_self= _1;
  _1= v_anObject;
  ((struct t_AVLTreeNode *)v_stateful_self)->v_value= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__precedes_orderedBy_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode, oop v_binaryBlock)
 {
  _enter("precedes:orderedBy:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(46);
  _1= v_binaryBlock;
  _2= v_self;
  _line(46);
  _2=_send(s_value, _2);
  _3= v_aNode;
  _line(46);
  _3=_send(s_value, _3);
  _line(46);
  _1=_send(s_value_value_, _1, _2, _3);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__equals_orderedBy_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode, oop v_binaryBlock)
 {
  _enter("equals:orderedBy:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop v_l= 0;
  oop v_r= 0;
  oop v_lr= 0;
  oop v_rl= 0;
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  (void)v_l;
  (void)v_r;
  (void)v_lr;
  (void)v_rl;
  _line(48);
  _1= v_self;
  _line(51);
  _1=_send(s_value, _1);
  v_l= _1;
  _1= v_aNode;
  _line(52);
  _1=_send(s_value, _1);
  v_r= _1;
  _1= v_binaryBlock;
  _2= v_l;
  _3= v_r;
  _line(53);
  _1=_send(s_value_value_, _1, _2, _3);
  v_lr= _1;
  _1= v_binaryBlock;
  _2= v_r;
  _3= v_l;
  _line(54);
  _1=_send(s_value_value_, _1, _2, _3);
  v_rl= _1;
  /* or: */
  /* and: */
  _1= v_lr;
  if (!_1) goto _l2;
 {
  _1= v_rl;
 }
 _l2:;
  if (_1) goto _l1;
 {
  /* or: */
  _1= v_lr;
  if (_1) goto _l3;
 {
  _1= v_rl;
 }
 _l3:;
  _line(58);
  _1=_send(s_not, _1);
 }
 _l1:;
  _leave();
  return _1;
  _leave();
 }
static oop UndefinedObject__avlTreeNodeInsert_orderedBy_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode, oop v_binaryBlock)
 {
  _enter("avlTreeNodeInsert:orderedBy:", "UndefinedObject", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(61);
  _1= v_aNode;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__avlTreeNodeInsert_orderedBy_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode, oop v_binaryBlock)
 {
  _enter("avlTreeNodeInsert:orderedBy:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(66);
  /* ifTrue:ifFalse: */
  _1= v_aNode;
  _2= v_self;
  _3= v_binaryBlock;
  _line(68);
  _1=_send(s_precedes_orderedBy_, _1, _2, _3);
  if (!_1) goto _l4;
 {
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _2= v_aNode;
  _3= v_binaryBlock;
  _line(69);
  _1=_send(s_avlTreeNodeInsert_orderedBy_, _1, _2, _3);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_left= _1;
 }
  goto _l5;
 _l4:;
 {
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _2= v_aNode;
  _3= v_binaryBlock;
  _line(70);
  _1=_send(s_avlTreeNodeInsert_orderedBy_, _1, _2, _3);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_right= _1;
 }
 _l5:;
  _1= v_self;
  _line(71);
  _1=_send(s_balance, _1);
  _leave();
  return _1;
  _leave();
 }
static oop UndefinedObject__avlTreeNodeHeight(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("avlTreeNodeHeight", "UndefinedObject", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(74);
  _1= l_2;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__avlTreeNodeHeight(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("avlTreeNodeHeight", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(75);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_height;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__delta(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("delta", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  _line(77);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _line(77);
  _1=_send(s_avlTreeNodeHeight, _1);
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _line(77);
  _2=_send(s_avlTreeNodeHeight, _2);
  {
    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);
  }
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__balance(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("balance", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop v_delta= 0;
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  (void)v_delta;
  _line(79);
  _1= v_self;
  _line(82);
  _1=_send(s_delta, _1);
  v_delta= _1;
  /* ifTrue: */
  _1= 0;
  _2= v_delta;
  _3= l_3;
  if (1 & (int)_2) {
    _2= (((int)_2 < (int)_3) ? v_true : v_false);
  } else _2= _send(s__3c, _2, _3);
  if (!_2) goto _l6;
 {
  /* ifTrue: */
  _1= 0;
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _line(85);
  _2=_send(s_delta, _2);
  _3= l_4;
  if (1 & (int)_2) {
    _2= (((int)_2 > (int)_3) ? v_true : v_false);
  } else _2= _send(s__3e, _2, _3);
  if (!_2) goto _l7;
 {
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _line(85);
  _1=_send(s_rotateRight, _1);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_right= _1;
 }
 _l7:;
  _1= v_self;
  _line(86);
  _1=_send(s_rotateLeft, _1);
  _leave();
  return _1;
 }
 _l6:;
  /* ifTrue: */
  _1= 0;
  _2= v_delta;
  _3= l_5;
  if (1 & (int)_2) {
    _2= (((int)_2 > (int)_3) ? v_true : v_false);
  } else _2= _send(s__3e, _2, _3);
  if (!_2) goto _l8;
 {
  /* ifTrue: */
  _1= 0;
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _line(89);
  _2=_send(s_delta, _2);
  _3= l_4;
  if (1 & (int)_2) {
    _2= (((int)_2 < (int)_3) ? v_true : v_false);
  } else _2= _send(s__3c, _2, _3);
  if (!_2) goto _l9;
 {
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _line(89);
  _1=_send(s_rotateLeft, _1);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_left= _1;
 }
 _l9:;
  _1= v_self;
  _line(90);
  _1=_send(s_rotateRight, _1);
  _leave();
  return _1;
 }
 _l8:;
  _1= l_4;
  ((struct t_AVLTreeNode *)v_stateful_self)->v_height= _1;
  /* ifTrue: */
  _1= 0;
  /* and: */
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _line(92);
  _2=_send(s_notNil, _2);
  if (!_2) goto _l11;
 {
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _line(92);
  _2=_send(s_height, _2);
  _3= ((struct t_AVLTreeNode *)v_stateful_self)->v_height;
  if (1 & (int)_2 & (int)_3) {
    _2= (((int)_2 > (int)_3) ? v_true : v_false);
  } else _2= _send(s__3e, _2, _3);
 }
 _l11:;
  if (!_2) goto _l10;
 {
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _line(92);
  _1=_send(s_height, _1);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_height= _1;
 }
 _l10:;
  /* ifTrue: */
  _1= 0;
  /* and: */
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _line(93);
  _2=_send(s_notNil, _2);
  if (!_2) goto _l13;
 {
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _line(93);
  _2=_send(s_height, _2);
  _3= ((struct t_AVLTreeNode *)v_stateful_self)->v_height;
  if (1 & (int)_2 & (int)_3) {
    _2= (((int)_2 > (int)_3) ? v_true : v_false);
  } else _2= _send(s__3e, _2, _3);
 }
 _l13:;
  if (!_2) goto _l12;
 {
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _line(93);
  _1=_send(s_height, _1);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_height= _1;
 }
 _l12:;
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_height;
  _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__2b, _1, _2);
  }
  ((struct t_AVLTreeNode *)v_stateful_self)->v_height= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__rotateLeft(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("rotateLeft", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop v_pivot= 0;
  oop _1= 0;
  oop _2= 0;
  (void)v_pivot;
  _line(97);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  v_pivot= _1;
  _1= v_pivot;
  _line(101);
  _1=_send(s_left, _1);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_right= _1;
  _1= v_pivot;
  _2= v_self;
  _line(102);
  _2=_send(s_balance, _2);
  _line(102);
  _1=_send(s_left_, _1, _2);
  _1= v_pivot;
  _line(103);
  _1=_send(s_balance, _1);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__rotateRight(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("rotateRight", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop v_pivot= 0;
  oop _1= 0;
  oop _2= 0;
  (void)v_pivot;
  _line(106);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  v_pivot= _1;
  _1= v_pivot;
  _line(110);
  _1=_send(s_right, _1);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_left= _1;
  _1= v_pivot;
  _2= v_self;
  _line(111);
  _2=_send(s_balance, _2);
  _line(111);
  _1=_send(s_right_, _1, _2);
  _1= v_pivot;
  _line(112);
  _1=_send(s_balance, _1);
  _leave();
  return _1;
  _leave();
 }
static oop UndefinedObject__avlTreeNodeFind_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode)
 {
  _enter("avlTreeNodeFind:", "UndefinedObject", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(115);
  _1= v_nil;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__avlTreeNodeFind_orderedBy_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode, oop v_binaryBlock)
 {
  _enter("avlTreeNodeFind:orderedBy:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  oop _4= 0;
  _line(120);
  /* ifTrue: */
  _1= 0;
  _2= v_self;
  _3= v_aNode;
  _4= v_binaryBlock;
  _line(122);
  _2=_send(s_equals_orderedBy_, _2, _3, _4);
  if (!_2) goto _l14;
 {
  _1= v_self;
  _leave();
  return _1;
 }
 _l14:;
  /* ifTrue:ifFalse: */
  _1= v_aNode;
  _2= v_self;
  _3= v_binaryBlock;
  _line(123);
  _1=_send(s_precedes_orderedBy_, _1, _2, _3);
  if (!_1) goto _l15;
 {
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _2= v_aNode;
  _3= v_binaryBlock;
  _line(124);
  _1=_send(s_avlTreeNodeFind_orderedBy_, _1, _2, _3);
 }
  goto _l16;
 _l15:;
 {
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _2= v_aNode;
  _3= v_binaryBlock;
  _line(125);
  _1=_send(s_avlTreeNodeFind_orderedBy_, _1, _2, _3);
 }
 _l16:;
  _leave();
  return _1;
  _leave();
 }
static oop UndefinedObject__avlTreeNodeRemove_orderedBy_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode, oop v_binaryBlock)
 {
  _enter("avlTreeNodeRemove:orderedBy:", "UndefinedObject", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(128);
  _1= v_nil;
  _leave();
  return _1;
  _leave();
 }
static oop b_6(oop v__closure, oop v__self)
 {
  _enter("[]", "?", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop v_temp= 0;
  oop _1= 0;
  oop _2= 0;
  (void)v_temp;
  _line(137);
  _1= ((struct t_AVLTreeNode *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_left;  /* left */
  _2= ((struct t_AVLTreeNode *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_right;  /* right */
  _line(138);
  _1=_send(s_avlTreeNodeMoveRight_, _1, _2);
  v_temp= _1;
  _1= v_nil;
  ((struct t_AVLTreeNode *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_right= _1;  /* right */
  ((struct t_AVLTreeNode *)((oop *)((struct t_BlockClosure *)((struct t_BlockClosure *)v__self)->v_state))[1])->v_left= _1;  /* left */
  _1= v_temp;
  _leave();
  return _nlreturn(((struct t_BlockClosure *)v__self)->v__nlr, _1);
  _leave();
 }
static oop AVLTreeNode__remove_orderedBy_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode, oop v_binaryBlock)
 {
  _enter("remove:orderedBy:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _state1= _send(s_new_5f_, v__vector, 6);
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  jmp_buf __nlr;
  oop _nlr;
  ((oop *)_state1)[1]= v_stateful_self;
  _nlr= (oop)&__nlr;
  if (setjmp(__nlr)) { return _nlresult(); }
  _line(133);
  _1= v_aNode;
  _2= v_self;
  _3= v_binaryBlock;
  _line(135);
  _1=_send(s_equals_orderedBy_, _1, _2, _3);
  /* Scope('temp'->TemporaryVariableNode) */
  /* Scope('right'->SlotVariableNode 'height'->SlotVariableNode 'aNode'->ArgumentVariableNode 'binaryBlock'->ArgumentVariableNode 'stateful_self'->ArgumentVariableNode 'self'->ArgumentVariableNode 'value'->SlotVariableNode 'left'->SlotVariableNode) */
  /* nil */
  /* 2 */
  /* 1 */
  _2= _send(s_function_5f_arity_5f_outer_state_nlr_5f_, v_BlockClosure, (oop)b_6, 0, 0, ((oop *)_state1), _nlr);
  _line(136);
  _1=_send(s_ifTrue_, _1, _2);
  /* ifTrue:ifFalse: */
  _1= v_aNode;
  _2= v_self;
  _3= v_binaryBlock;
  _line(141);
  _1=_send(s_precedes_orderedBy_, _1, _2, _3);
  if (!_1) goto _l17;
 {
  _1= ((struct t_AVLTreeNode *)((oop *)_state1)[1])->v_left;  /* left */
  _2= v_aNode;
  _3= v_binaryBlock;
  _line(142);
  _1=_send(s_avlTreeNodeRemove_orderedBy_, _1, _2, _3);
  ((struct t_AVLTreeNode *)((oop *)_state1)[1])->v_left= _1;  /* left */
 }
  goto _l18;
 _l17:;
 {
  _1= ((struct t_AVLTreeNode *)((oop *)_state1)[1])->v_right;  /* right */
  _2= v_aNode;
  _3= v_binaryBlock;
  _line(143);
  _1=_send(s_avlTreeNodeRemove_orderedBy_, _1, _2, _3);
  ((struct t_AVLTreeNode *)((oop *)_state1)[1])->v_right= _1;  /* right */
 }
 _l18:;
  _1= v_self;
  _line(144);
  _1=_send(s_balance, _1);
  _leave();
  return _1;
  _leave();
 }
static oop UndefinedObject__avlTreeNodeMoveRight_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode)
 {
  _enter("avlTreeNodeMoveRight:", "UndefinedObject", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(147);
  _1= v_aNode;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__avlTreeNodeMoveRight_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode)
 {
  _enter("avlTreeNodeMoveRight:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  _line(152);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _2= v_aNode;
  _line(154);
  _1=_send(s_avlTreeNodeMoveRight_, _1, _2);
  ((struct t_AVLTreeNode *)v_stateful_self)->v_right= _1;
  _1= v_self;
  _line(155);
  _1=_send(s_balance, _1);
  _leave();
  return _1;
  _leave();
 }
static oop UndefinedObject__avlTreeNodeDo_(oop v__closure, oop v_stateful_self, oop v_self, oop v_unaryBlock)
 {
  _enter("avlTreeNodeDo:", "UndefinedObject", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(158);
  _1= v_nil;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__avlTreeNodeDo_(oop v__closure, oop v_stateful_self, oop v_self, oop v_unaryBlock)
 {
  _enter("avlTreeNodeDo:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  _line(163);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _2= v_unaryBlock;
  _line(165);
  _1=_send(s_avlTreeNodeDo_, _1, _2);
  _1= v_unaryBlock;
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_value;
  _line(166);
  _1=_send(s_value_, _1, _2);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _2= v_unaryBlock;
  _line(167);
  _1=_send(s_avlTreeNodeDo_, _1, _2);
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop UndefinedObject__avlTreeNodeReverseDo_(oop v__closure, oop v_stateful_self, oop v_self, oop v_unaryBlock)
 {
  _enter("avlTreeNodeReverseDo:", "UndefinedObject", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(170);
  _1= v_nil;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__avlTreeNodeReverseDo_(oop v__closure, oop v_stateful_self, oop v_self, oop v_unaryBlock)
 {
  _enter("avlTreeNodeReverseDo:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  _line(175);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_right;
  _2= v_unaryBlock;
  _line(177);
  _1=_send(s_avlTreeNodeReverseDo_, _1, _2);
  _1= v_unaryBlock;
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_value;
  _line(178);
  _1=_send(s_value_, _1, _2);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_left;
  _2= v_unaryBlock;
  _line(179);
  _1=_send(s_avlTreeNodeReverseDo_, _1, _2);
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__print(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("print", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(182);
  _1= ((struct t_AVLTreeNode *)v_stateful_self)->v_value;
  _line(184);
  _1=_send(s_print, _1);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTreeNode__printOn_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aStream)
 {
  _enter("printOn:", "AVLTreeNode", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  _line(187);
  _1= v_self;
  _2= v_aStream;
  _line(189);
  _1=_super(v_Object, s_printOn_, _1, _2);
  _1= v_aStream;
  _2= l_7;
  _line(191);
  _send(s_nextPut_, _1, _2);
  _2= ((struct t_AVLTreeNode *)v_stateful_self)->v_value;
  _send(s_print_, _1, _2);
  _2= l_8;
  _1=_send(s_nextPut_, _1, _2);
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static size_t AVLTree___5fsizeof(oop _closure, oop v_self) { return sizeof(struct t_AVLTree); }
static char *AVLTree___5fdebugName(oop _closure, oop v_self) { return "AVLTree"; }
static oop AVLTree__withSortBlock_(oop v__closure, oop v_stateful_self, oop v_self, oop v_binaryBlock)
 {
  _enter("withSortBlock:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(199);
  _1= v_self;
  _line(201);
  _1=_send(s_new, _1);
  v_self= _1;
  v_stateful_self= _1;
  _1= v_binaryBlock;
  ((struct t_AVLTree *)v_stateful_self)->v_orderBlock= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop b_9(oop v__closure, oop v__self, oop v_a, oop v_b)
 {
  _enter("[]", "?", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  _line(209);
  _1= v_a;
  _2= v_b;
  if (1 & (int)_1 & (int)_2) {
    _1= (((int)_1 < (int)_2) ? v_true : v_false);
  } else _1= _send(s__3c, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__initialize(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("initialize", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(205);
  _1= v_self;
  _line(207);
  _1=_super(v_SequenceableCollection, s_initialize, _1);
  _1= v_nil;
  ((struct t_AVLTree *)v_stateful_self)->v_rootNode= _1;
  _1= l_9;
  ((struct t_AVLTree *)v_stateful_self)->v_orderBlock= _1;
  _1= v_self;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__isEmpty(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("isEmpty", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(212);
  _1= ((struct t_AVLTree *)v_stateful_self)->v_rootNode;
  _line(214);
  _1=_send(s_isNil, _1);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__add_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject)
 {
  _enter("add:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(217);
  _1= v_self;
  _2= v_AVLTreeNode;
  _3= v_anObject;
  _line(219);
  _2=_send(s_withValue_, _2, _3);
  _line(219);
  _1=_send(s_addNode_, _1, _2);
  _1= v_anObject;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__addNode_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode)
 {
  _enter("addNode:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(223);
  _1= ((struct t_AVLTree *)v_stateful_self)->v_rootNode;
  _2= v_aNode;
  _3= ((struct t_AVLTree *)v_stateful_self)->v_orderBlock;
  _line(225);
  _1=_send(s_avlTreeNodeInsert_orderedBy_, _1, _2, _3);
  ((struct t_AVLTree *)v_stateful_self)->v_rootNode= _1;
  _1= v_aNode;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__depth(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("depth", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(229);
  _1= ((struct t_AVLTree *)v_stateful_self)->v_rootNode;
  _line(229);
  _1=_send(s_avlTreeNodeHeight, _1);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__find_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject)
 {
  _enter("find:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(231);
  _1= v_self;
  _2= v_AVLTreeNode;
  _3= v_anObject;
  _line(231);
  _2=_send(s_with_, _2, _3);
  _line(231);
  _1=_send(s_findNode_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__findNode_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode)
 {
  _enter("findNode:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(232);
  _1= ((struct t_AVLTree *)v_stateful_self)->v_rootNode;
  _2= v_aNode;
  _3= ((struct t_AVLTree *)v_stateful_self)->v_orderBlock;
  _line(232);
  _1=_send(s_avlTreeNodeFind_orderedBy_, _1, _2, _3);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__remove_(oop v__closure, oop v_stateful_self, oop v_self, oop v_anObject)
 {
  _enter("remove:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(234);
  _1= v_self;
  _2= v_AVLTreeNode;
  _3= v_anObject;
  _line(234);
  _2=_send(s_withValue_, _2, _3);
  _line(234);
  _1=_send(s_removeNode_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__removeNode_(oop v__closure, oop v_stateful_self, oop v_self, oop v_aNode)
 {
  _enter("removeNode:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  oop _3= 0;
  _line(235);
  _1= ((struct t_AVLTree *)v_stateful_self)->v_rootNode;
  _2= v_aNode;
  _3= ((struct t_AVLTree *)v_stateful_self)->v_orderBlock;
  _line(235);
  _1=_send(s_avlTreeNodeRemove_orderedBy_, _1, _2, _3);
  ((struct t_AVLTree *)v_stateful_self)->v_rootNode= _1;
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__do_(oop v__closure, oop v_stateful_self, oop v_self, oop v_unaryBlock)
 {
  _enter("do:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  _line(237);
  _1= ((struct t_AVLTree *)v_stateful_self)->v_rootNode;
  _2= v_unaryBlock;
  _line(237);
  _1=_send(s_avlTreeNodeDo_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__reverseDo_(oop v__closure, oop v_stateful_self, oop v_self, oop v_unaryBlock)
 {
  _enter("reverseDo:", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  oop _2= 0;
  _line(238);
  _1= ((struct t_AVLTree *)v_stateful_self)->v_rootNode;
  _2= v_unaryBlock;
  _line(238);
  _1=_send(s_avlTreeNodeReverseDo_, _1, _2);
  _leave();
  return _1;
  _leave();
 }
static oop AVLTree__print(oop v__closure, oop v_stateful_self, oop v_self)
 {
  _enter("print", "AVLTree", "/home/saintiss/source/svn/stIdst_278/object/st80/AVLTree.st");
  oop _1= 0;
  _line(240);
  _1= ((struct t_AVLTree *)v_stateful_self)->v_rootNode;
  _line(240);
  _1=_send(s_print, _1);
  _leave();
  return _1;
  _leave();
 }

void __id__init__AVLTree(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>", "AVLTree.st");

  _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_Character= _id_import("Character");
  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, "SequenceableCollection", "__id__init__SequenceableCollection");
  _send(s__5fimport_, _local_object, "Collection", "__id__init__Collection");
  _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_AVLTreeNode= _proto(v_Object);
  _method(v_AVLTreeNode, s__5fsizeof, AVLTreeNode___5fsizeof);
  _method(v_AVLTreeNode, s__5fdebugName, AVLTreeNode___5fdebugName);
  _id_export("AVLTreeNode", v_AVLTreeNode);
  _method(v_AVLTreeNode, s_left, AVLTreeNode__left);
  _method(v_AVLTreeNode, s_left_, AVLTreeNode__left_);
  _method(v_AVLTreeNode, s_right, AVLTreeNode__right);
  _method(v_AVLTreeNode, s_right_, AVLTreeNode__right_);
  _method(v_AVLTreeNode, s_height, AVLTreeNode__height);
  _method(v_AVLTreeNode, s_value, AVLTreeNode__value);
  l_1= _send(s_value_5f_, v_SmallInteger, 0);
  _method(v_AVLTreeNode, s_initialize, AVLTreeNode__initialize);
  _method(v_AVLTreeNode, s_withValue_, AVLTreeNode__withValue_);
  _method(v_AVLTreeNode, s_precedes_orderedBy_, AVLTreeNode__precedes_orderedBy_);
  _method(v_AVLTreeNode, s_equals_orderedBy_, AVLTreeNode__equals_orderedBy_);
  _method(v_UndefinedObject, s_avlTreeNodeInsert_orderedBy_, UndefinedObject__avlTreeNodeInsert_orderedBy_);
  _method(v_AVLTreeNode, s_avlTreeNodeInsert_orderedBy_, AVLTreeNode__avlTreeNodeInsert_orderedBy_);
  l_2= _send(s_value_5f_, v_SmallInteger, 0);
  _method(v_UndefinedObject, s_avlTreeNodeHeight, UndefinedObject__avlTreeNodeHeight);
  _method(v_AVLTreeNode, s_avlTreeNodeHeight, AVLTreeNode__avlTreeNodeHeight);
  _method(v_AVLTreeNode, s_delta, AVLTreeNode__delta);
  l_3= _send(s_value_5f_, v_SmallInteger, -1);
  l_4= _send(s_value_5f_, v_SmallInteger, 0);
  l_5= _send(s_value_5f_, v_SmallInteger, 1);
  _method(v_AVLTreeNode, s_balance, AVLTreeNode__balance);
  _method(v_AVLTreeNode, s_rotateLeft, AVLTreeNode__rotateLeft);
  _method(v_AVLTreeNode, s_rotateRight, AVLTreeNode__rotateRight);
  _method(v_UndefinedObject, s_avlTreeNodeFind_, UndefinedObject__avlTreeNodeFind_);
  _method(v_AVLTreeNode, s_avlTreeNodeFind_orderedBy_, AVLTreeNode__avlTreeNodeFind_orderedBy_);
  _method(v_UndefinedObject, s_avlTreeNodeRemove_orderedBy_, UndefinedObject__avlTreeNodeRemove_orderedBy_);
  _method(v_AVLTreeNode, s_remove_orderedBy_, AVLTreeNode__remove_orderedBy_);
  _method(v_UndefinedObject, s_avlTreeNodeMoveRight_, UndefinedObject__avlTreeNodeMoveRight_);
  _method(v_AVLTreeNode, s_avlTreeNodeMoveRight_, AVLTreeNode__avlTreeNodeMoveRight_);
  _method(v_UndefinedObject, s_avlTreeNodeDo_, UndefinedObject__avlTreeNodeDo_);
  _method(v_AVLTreeNode, s_avlTreeNodeDo_, AVLTreeNode__avlTreeNodeDo_);
  _method(v_UndefinedObject, s_avlTreeNodeReverseDo_, UndefinedObject__avlTreeNodeReverseDo_);
  _method(v_AVLTreeNode, s_avlTreeNodeReverseDo_, AVLTreeNode__avlTreeNodeReverseDo_);
  _method(v_AVLTreeNode, s_print, AVLTreeNode__print);
  l_7= _send(s_value_5f_, v_Character, 40);
  l_8= _send(s_value_5f_, v_Character, 41);
  _method(v_AVLTreeNode, s_printOn_, AVLTreeNode__printOn_);
  v_AVLTree= _proto(v_SequenceableCollection);
  _method(v_AVLTree, s__5fsizeof, AVLTree___5fsizeof);
  _method(v_AVLTree, s__5fdebugName, AVLTree___5fdebugName);
  _id_export("AVLTree", v_AVLTree);
  _method(v_AVLTree, s_withSortBlock_, AVLTree__withSortBlock_);
  l_9= _send(s_function_5f_arity_5f_, v_StaticBlockClosure, b_9, 2);
  _method(v_AVLTree, s_initialize, AVLTree__initialize);
  _method(v_AVLTree, s_isEmpty, AVLTree__isEmpty);
  _method(v_AVLTree, s_add_, AVLTree__add_);
  _method(v_AVLTree, s_addNode_, AVLTree__addNode_);
  _method(v_AVLTree, s_depth, AVLTree__depth);
  _method(v_AVLTree, s_find_, AVLTree__find_);
  _method(v_AVLTree, s_findNode_, AVLTree__findNode_);
  _method(v_AVLTree, s_remove_, AVLTree__remove_);
  _method(v_AVLTree, s_removeNode_, AVLTree__removeNode_);
  _method(v_AVLTree, s_do_, AVLTree__do_);
  _method(v_AVLTree, s_reverseDo_, AVLTree__reverseDo_);
  _method(v_AVLTree, s_print, AVLTree__print);
  _leave();
}
