/* Automatically generated by
	CCodeGenerator VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194
   from
	StackToRegisterMappingCogit VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194
 */
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;



#include <stddef.h>
#include "sq.h"
#include "sqCogStackAlignment.h"
#include "dispdbg.h"
#include "cogmethod.h"
#if COGMTVM
#include "cointerpmt.h"
#else
#include "cointerp.h"
#endif
#include "cogit.h"


/*** Constants ***/
#define AddCqR 101
#define AddCwR 109
#define AddcCqR 115
#define AddcRR 114
#define AddRdRd 120
#define AddRR 95
#define AddRsRs 127
#define AlignmentNops 3
#define AltBlockCreationBytecodeSize 3
#define AltFirstSpecialSelector 96
#define AltNumSpecialSelectors 32
#define AndCqR 103
#define AndCqRR 118
#define AndCwR 111
#define AndRR 97
#define AnnotationShift 5
#define Arg0Reg 6
#define Arg1Reg 7
#define ArithmeticShiftRightCqR 86
#define ArithmeticShiftRightRR 87
#define BadRegisterSet 1
#define BlockCreationBytecodeSize 4
#define BytecodeSetHasDirectedSuperSend 1
#define Call 6
#define CallerSavedRegisterMask 0x7
#define CallFull 7
#define CallR 8
#define CDQ 145
#if !defined(CheckRememberedInTrampoline) /* Allow this to be overridden on the compiler command line */
# define CheckRememberedInTrampoline 0
#endif
#define CLD 160
#define ClassArray 7
#define ClassArrayCompactIndex 51
#define ClassBlockClosureCompactIndex 37
#define ClassFloatCompactIndex 34
#define ClassFullBlockClosureCompactIndex 38
#define ClassLargePositiveIntegerCompactIndex 33
#define ClassMethodContextCompactIndex 36
#define ClassReg 1
#define ClosureFirstCopiedValueIndex 3
#define ClosureIndex 4
#define ClosureNumArgsIndex 2
#define ClosureOuterContextIndex 0
#define ClosureStartPCIndex 1
#define CMBlock 3
#define CMClosedPIC 4
#define CMFree 1
#define CMMaxUsageCount 7
#define CMMethod 2
#define CMOpenPIC 5
#define CMPXCHGAwR 153
#define CMPXCHGMwrR 154
#define CmpC32R 108
#define CmpCqR 100
#define CmpCwR 107
#define CmpRdRd 119
#define CmpRR 94
#define CmpRsRs 126
#define CompletePrimitive 4
#define ConstZero 1
#define ConvertRdR 134
#define ConvertRdRs 136
#define ConvertRRd 133
#define ConvertRRs 138
#define ConvertRsR 137
#define ConvertRsRd 135
#define CPUID 148
#define Debug DEBUGVM
#define DisplacementMask 0x1F
#define DisplacementX2N 0
#define DivRdRd 123
#define DivRsRs 130
#define DPFPReg0 0
#define DPFPReg1 1
#define DPFPReg2 2
#define DPFPReg3 3
#define DPFPReg4 4
#define DPFPReg5 5
#define DPFPReg6 6
#define DPFPReg7 7
#define EAX 0
#define EBP 5
#define EBX 3
#define ECX 1
#define EDI 7
#define EDX 2
#define EncounteredUnknownBytecode -6
#define ESI 6
#define ESP 4
#undef Extra0Reg
#define Fill32 4
#define FirstAnnotation 64
#define FirstJump 12
#define FirstShortJump 16
#define FirstSpecialSelector 176
#define FoxCallerSavedIP 4
#define FoxMethod -4
#define FoxMFReceiver -12
#define FoxSavedFP 0
#define FoxThisContext -8
#define FPReg 5
#define FSTPD 159
#define FSTPS 158
#define FullClosureCompiledBlockIndex 1
#define FullClosureFirstCopiedValueIndex 4
#define FullClosureReceiverIndex 3
#define GCModeBecome 8
#define GCModeFull 1
#define GCModeNewSpace 2
#define HasBytecodePC 5
#define HashMultiplyConstant 1664525
#define HashMultiplyMask 0xFFFFFFF
#define HeaderIndex 0
#define IDIVR 146
#if !defined(IMMUTABILITY) /* Allow this to be overridden on the compiler command line */
# define IMMUTABILITY 1
#endif
#define IMULRR 147
#define InFullBlock 2
#define InstanceSpecificationIndex 2
#define InstructionPointerIndex 1
#define InsufficientCodeSpace -2
#define InVanillaBlock 1
#define IsAbsPCReference 3
#define IsAnnotationExtension 1
#define IsDirectedSuperBindingSend 10
#define IsDirectedSuperSend 9
#define IsDisplacementX2N 0
#define IsNSDynamicSuperSend null
#define IsNSSelfSend null
#define IsNSSendCall null
#define IsObjectReference 2
#define IsRelativeCall 4
#define IsSendCall 7
#define IsSuperSend 8
#define Jump 16
#define JumpAbove 31
#define JumpAboveOrEqual 30
#define JumpBelow 29
#define JumpBelowOrEqual 32
#define JumpCarry 23
#define JumpFPEqual 33
#define JumpFPGreater 37
#define JumpFPGreaterOrEqual 38
#define JumpFPLess 35
#define JumpFPLessOrEqual 36
#define JumpFPNotEqual 34
#define JumpFPOrdered 39
#define JumpFPUnordered 40
#define JumpFull 12
#define JumpGreater 27
#define JumpGreaterOrEqual 26
#define JumpLess 25
#define JumpLessOrEqual 28
#define JumpLong 13
#define JumpLongNonZero 15
#define JumpLongZero 14
#define JumpNegative 19
#define JumpNoCarry 24
#define JumpNonNegative 20
#define JumpNonZero 18
#define JumpNoOverflow 22
#define JumpOverflow 21
#define JumpR 10
#define JumpZero 17
#define Label 1
#define LargeContextSlots 62
#define LastJump 40
#define LFENCE 149
#undef LinkReg
#define Literal 2
#define LiteralStart 1
#define LOCK 152
#define LoadEffectiveAddressMwrR 83
#define LogicalShiftLeftCqR 90
#define LogicalShiftLeftRR 91
#define LogicalShiftRightCqR 88
#define LogicalShiftRightRR 89
#define LowcodeVM 0
#define MapEnd 0
#define MaxCompiledPrimitiveIndex 222
#define MaxCPICCases 6
#define MaxMethodSize 65535
#define MaxNegativeErrorCode -8
#define MaxNumArgs 15
#define MaxStackAllocSize 1572864
#define MaxStackCheckOffset 0xFFF
#define MaxX2NDisplacement 992
#define MethodCacheClass 2
#define MethodCacheMask 0xFFC
#define MethodCacheMethod 3
#define MethodCacheSelector 1
#define MethodIndex 3
#define MethodTooBig -4
#define MFENCE 150
#define MFMethodFlagHasContextFlag 1
#define MFMethodFlagIsBlockFlag 2
#define MOVSB 162
#define MOVSD 163
#define ModReg 3
#define ModRegInd 0
#define ModRegRegDisp32 2
#define ModRegRegDisp8 1
#define MoveAbR 46
#define MoveAwR 42
#define MoveC32R 69
#define MoveCqR 67
#define MoveCwR 68
#define MoveM16rR 55
#define MoveM32rR 59
#define MoveM32rRs 76
#define MoveM64rRd 73
#define MoveM8rR 52
#define MoveMbrR 63
#define MoveMwrR 48
#define MoveRAb 47
#define MoveRAw 44
#define MoveRdM64r 74
#define MoveRdRd 72
#define MoveRM16r 56
#define MoveRM32r 60
#define MoveRM8r 54
#define MoveRMbr 64
#define MoveRMwr 49
#define MoveRR 41
#define MoveRsM32r 77
#define MoveRsRs 75
#define MoveRXbrR 66
#define MoveRXwrR 51
#define MoveXbrRR 65
#define MoveXwrRR 50
#define MULTIPLEBYTECODESETS 1
#define MulRdRd 122
#define MulRsRs 129
#define NeedsMergeFixupFlag 2
#define NeedsNonMergeFixupFlag 1
#define NegateR 84
#define NewspeakVM 0
#define Nop 5
#define NoReg -1
#define NotFullyInitialized -1
#define NotR 85
#define NumObjRefsInRuntime 0
#define NumOopsPerNSC 6
#define NumSendTrampolines 4
#define NumSpecialSelectors 32
#define NumStoreTrampolines 5
#define NumTrampolines 74
#define OrCqR 104
#define OrCwR 112
#define OrRR 98
#undef PCReg
#define PopR 78
#define PrefetchAw 82
#define PrimCallCollectsProfileSamples 16
#define PrimCallDoNotJIT 64
#define PrimCallMayCallBack 4
#define PrimCallNeedsNewMethod 1
#define PrimCallNeedsPrimitiveFunction 2
#define PrimCallOnSmalltalkStack 8
#define PrimErrNoMemory 9
#define PrimErrWritePastObject 17
#define PushCq 80
#define PushCw 81
#define PushR 79
#define REP 161
#define ReceiverIndex 5
#define ReceiverResultReg 2
#define RetN 9
#undef RISCTempReg
#define SelectorCannotInterpret 34
#define SelectorDoesNotUnderstand 20
#define SenderIndex 0
#define SendNumArgsReg 3
#define SFENCE 151
#define ShouldNotJIT -8
#define SIB1 0
#define SIB4 2
#define SignExtend16RR 140
#define SignExtend8RR 139
#define SistaV1BytecodeSet 1
#define SistaVM 0
#define SmallContextSlots 22
#define SPReg 4
#define SPURVM 1
#define SqrtRd 124
#define SqrtRs 131
#define SSBaseOffset 1
#define SSConstant 2
#define SSRegister 3
#define SSSpill 4
#define StackPointerIndex 2
#define Stop 11
#define SubbRR 116
#define SubCqR 102
#define SubCwR 110
#define SubRdRd 121
#define SubRR 96
#define SubRsRs 128
#define TempReg 0
#define TempVectReadBarrier 0
#define TstCqR 105
#define UnfailingPrimitive 3
#define UnimplementedPrimitive -7
#define ValueIndex 1
#undef VarBaseReg
#define XCHGAwR 155
#define XCHGMwrR 156
#define XCHGRR 157
#define XorCwR 113
#define XorRdRd 125
#define XorRR 99
#define XorRsRs 132
#define YoungSelectorInPIC -5
#define ZeroExtend16RR 143
#define ZeroExtend8RR 142

typedef struct _AbstractInstruction {
	unsigned char	opcode;
	unsigned char	machineCodeSize;
	unsigned char	maxSize;
	unsigned char	annotation;
	usqInt		operands [3];
	usqInt	address;
	struct _AbstractInstruction *dependent;
	unsigned char		machineCode [10];
 } AbstractInstruction;

#define CogIA32Compiler AbstractInstruction
#define CogAbstractInstruction AbstractInstruction


typedef struct {
	AbstractInstruction *fakeHeader;
	AbstractInstruction *fillInstruction;
	sqInt	numArgs;
	sqInt	numCopied;
	sqInt	numInitialNils;
	sqInt	startpc;
	AbstractInstruction *entryLabel;
	AbstractInstruction *stackCheckLabel;
	sqInt	span;
	sqInt	hasInstVarRef;
 } BlockStart;

#define CogBlockStart BlockStart


typedef struct _BytecodeDescriptor {
	sqInt (*generator )(void);
	sqInt NoDbgRegParms (*spanFunction )(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt);
	sqInt NoDbgRegParms (*needsFrameFunction )(sqInt);
	signed char	stackDelta;
	unsigned char	opcode;
	unsigned char	numBytes;
	unsigned		isBranchTrue : 1;
	unsigned		isBranchFalse : 1;
	unsigned		isReturn : 1;
	unsigned		isBlockCreation : 1;
	unsigned		isMapped : 1;
	unsigned		isMappedInBlock : 1;
	unsigned		isExtension : 1;
	unsigned		isInstVarRef : 1;
	unsigned		is1ByteInstVarStore : 1;
	unsigned		hasUnsafeJump : 1;
 } BytecodeDescriptor;

#define CogBytecodeDescriptor BytecodeDescriptor


typedef struct {
	sqInt (*primitiveGenerator )(void);
	sqInt	primNumArgs;
 } PrimitiveDescriptor;

#define CogPrimitiveDescriptor PrimitiveDescriptor


typedef struct {
	char	type;
	char	spilled;
	signed char	liveRegister;
	signed char	registerr;
	sqInt	offset;
	sqInt	constant;
	sqInt	bcptr;
 } SimStackEntry;

#define CogSimStackEntry SimStackEntry


typedef struct {
	AbstractInstruction *targetInstruction;
	unsigned char	simStackPtr;
	char	isTargetOfBackwardBranch;
	unsigned short	instructionIndex;
#if LowcodeVM
	short	simNativeStackPtr;
	unsigned short	simNativeStackSize;
#endif
 } BytecodeFixup;

#define CogSSBytecodeFixup BytecodeFixup
#define CogBytecodeFixup BytecodeFixup


typedef struct {
	sqInt	isReceiverResultRegLive;
	CogSimStackEntry *ssEntry;
 } CogSSOptStatus;



/*** Function Prototypes ***/


#if !PRODUCTION && defined(PlatformNoDbgRegParms)
# define NoDbgRegParms PlatformNoDbgRegParms
#endif

#if !defined(NoDbgRegParms)
# define NoDbgRegParms /*empty*/
#endif



#if !defined(NeverInline)
# define NeverInline /*empty*/
#endif

static AbstractInstruction * NoDbgRegParms addDependent(AbstractInstruction * self_in_addDependent, AbstractInstruction *anInstruction);
static sqInt NoDbgRegParms availableFloatRegisterOrNoneFor(AbstractInstruction * self_in_availableFloatRegisterOrNoneFor, sqInt liveRegsMask);
static sqInt NoDbgRegParms availableRegisterOrNoneFor(AbstractInstruction * self_in_availableRegisterOrNoneFor, sqInt liveRegsMask);
static AbstractInstruction * NoDbgRegParms cloneLiteralFrom(AbstractInstruction * self_in_cloneLiteralFrom, AbstractInstruction *existingLiteral);
static sqInt NoDbgRegParms concretizeAt(AbstractInstruction * self_in_concretizeAt, sqInt actualAddress);
static AbstractInstruction * NoDbgRegParms genWriteCResultIntoReg(AbstractInstruction * self_in_genWriteCResultIntoReg, sqInt abstractRegister);
static AbstractInstruction * NoDbgRegParms initializeSharableLiteral(AbstractInstruction * self_in_initializeSharableLiteral, sqInt literal);
static AbstractInstruction * NoDbgRegParms initializeUniqueLiteral(AbstractInstruction * self_in_initializeUniqueLiteral, sqInt literal);
static sqInt NoDbgRegParms isJump(AbstractInstruction * self_in_isJump);
static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress);
static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta);
static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta);
static AbstractInstruction * NoDbgRegParms resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget);
static sqInt NoDbgRegParms rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress);
static sqInt NoDbgRegParms rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditionalJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress);
static sqInt NoDbgRegParms rewriteJumpFullAttarget(AbstractInstruction * self_in_rewriteJumpFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress);
static sqInt NoDbgRegParms wantsNearAddressFor(AbstractInstruction * self_in_wantsNearAddressFor, sqInt anObject);
static CogMethod * NoDbgRegParms cmHomeMethod(CogBlockMethod * self_in_cmHomeMethod);
static sqInt NoDbgRegParms isBranch(BytecodeDescriptor * self_in_isBranch);
static sqInt NoDbgRegParms callFullTargetFromReturnAddress(AbstractInstruction * self_in_callFullTargetFromReturnAddress, sqInt callSiteReturnAddress);
static sqInt NoDbgRegParms callInstructionByteSize(AbstractInstruction * self_in_callInstructionByteSize);
static sqInt NoDbgRegParms callTargetFromReturnAddress(AbstractInstruction * self_in_callTargetFromReturnAddress, sqInt callSiteReturnAddress);
static AbstractInstruction * NoDbgRegParms cFloatResultToRd(AbstractInstruction * self_in_cFloatResultToRd, sqInt reg);
static AbstractInstruction * NoDbgRegParms cFloatResultToRs(AbstractInstruction * self_in_cFloatResultToRs, sqInt reg);
static sqInt NoDbgRegParms cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize);
static sqInt NoDbgRegParms computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize);
static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize);
static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32);
static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode);
static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode);
static usqInt NoDbgRegParms concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR);
static sqInt NoDbgRegParms cResultRegisterHigh(AbstractInstruction * self_in_cResultRegisterHigh);
static sqInt NoDbgRegParms cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow);
static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize);
static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific);
static sqInt NoDbgRegParms fullCallsAreRelative(AbstractInstruction * self_in_fullCallsAreRelative);
static AbstractInstruction * NoDbgRegParms genDivRRQuoRem(AbstractInstruction * self_in_genDivRRQuoRem, sqInt abstractRegDivisor, sqInt abstractRegDividend, sqInt abstractRegQuotient, sqInt abstractRegRemainder);
static AbstractInstruction * NoDbgRegParms generateCheckFeatures(AbstractInstruction * self_in_generateCheckFeatures);
static AbstractInstruction * NoDbgRegParms generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, sqInt vmOwnerLockAddress);
static AbstractInstruction * NoDbgRegParms generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress);
static sqInt NoDbgRegParms genLoadCStackPointer(AbstractInstruction * self_in_genLoadCStackPointer);
static sqInt NoDbgRegParms genLoadCStackPointers(AbstractInstruction * self_in_genLoadCStackPointers);
static sqInt NoDbgRegParms genLoadStackPointers(AbstractInstruction * self_in_genLoadStackPointers);
static AbstractInstruction * NoDbgRegParms genMemCopytoconstantSize(AbstractInstruction * self_in_genMemCopytoconstantSize, sqInt originalSourceReg, sqInt originalDestReg, sqInt size);
static AbstractInstruction * NoDbgRegParms genMemCopytosize(AbstractInstruction * self_in_genMemCopytosize, sqInt originalSourceReg, sqInt originalDestReg, sqInt originalSize);
static AbstractInstruction * NoDbgRegParms genMulRR(AbstractInstruction * self_in_genMulRR, sqInt regSource, sqInt regDest);
static AbstractInstruction * NoDbgRegParms genPushRegisterArgsForAbortMissNumArgs(AbstractInstruction * self_in_genPushRegisterArgsForAbortMissNumArgs, sqInt numArgs);
static AbstractInstruction * NoDbgRegParms genPushRegisterArgsForNumArgsscratchReg(AbstractInstruction * self_in_genPushRegisterArgsForNumArgsscratchReg, sqInt numArgs, sqInt scratchReg);
static sqInt NoDbgRegParms genRestoreRegs(AbstractInstruction * self_in_genRestoreRegs, sqInt regMask);
static sqInt NoDbgRegParms genSaveRegs(AbstractInstruction * self_in_genSaveRegs, sqInt regMask);
static sqInt NoDbgRegParms genSaveStackPointers(AbstractInstruction * self_in_genSaveStackPointers);
static AbstractInstruction * NoDbgRegParms genSubstituteReturnAddress(AbstractInstruction * self_in_genSubstituteReturnAddress, sqInt retpc);
static AbstractInstruction * NoDbgRegParms genSwapRRScratch(AbstractInstruction * self_in_genSwapRRScratch, sqInt regA, sqInt regB, sqInt regTmp);
static sqInt NoDbgRegParms hasSSE2Instructions(AbstractInstruction * self_in_hasSSE2Instructions);
static sqInt NoDbgRegParms hasSSEInstructions(AbstractInstruction * self_in_hasSSEInstructions);
static sqInt NoDbgRegParms inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress);
static sqInt NoDbgRegParms instructionSizeAt(AbstractInstruction * self_in_instructionSizeAt, sqInt pc);
static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc);
static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc);
static sqInt NoDbgRegParms isPCDependent(AbstractInstruction * self_in_isPCDependent);
static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand);
static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction);
static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize);
static sqInt NoDbgRegParms jumpLongConditionalByteSize(AbstractInstruction * self_in_jumpLongConditionalByteSize);
static sqInt NoDbgRegParms jumpLongTargetBeforeFollowingAddress(AbstractInstruction * self_in_jumpLongTargetBeforeFollowingAddress, sqInt mcpc);
static sqInt NoDbgRegParms jumpShortByteSize(AbstractInstruction * self_in_jumpShortByteSize);
static usqInt NoDbgRegParms jumpTargetPCAt(AbstractInstruction * self_in_jumpTargetPCAt, sqInt pc);
static sqInt NoDbgRegParms leafCallStackPointerDelta(AbstractInstruction * self_in_leafCallStackPointerDelta);
static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress);
static sqInt NoDbgRegParms literalBeforeInlineCacheTagAt(AbstractInstruction * self_in_literalBeforeInlineCacheTagAt, sqInt callSiteReturnAddress);
static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize);
static sqInt NoDbgRegParms loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize);
static usqInt NoDbgRegParms machineCodeAt(AbstractInstruction * self_in_machineCodeAt, sqInt anOffset);
static sqInt NoDbgRegParms machineCodeBytes(AbstractInstruction * self_in_machineCodeBytes);
static sqInt NoDbgRegParms modRMRO(AbstractInstruction * self_in_modRMRO, sqInt mod, sqInt regMode, sqInt regOpcode);
static sqInt NoDbgRegParms numCheckFeaturesOpcodes(AbstractInstruction * self_in_numCheckFeaturesOpcodes);
static sqInt NoDbgRegParms numIntRegArgs(AbstractInstruction * self_in_numIntRegArgs);
static sqInt NoDbgRegParms numLowLevelLockOpcodes(AbstractInstruction * self_in_numLowLevelLockOpcodes);
static AbstractInstruction * NoDbgRegParms padIfPossibleWithStopsFromto(AbstractInstruction * self_in_padIfPossibleWithStopsFromto, sqInt startAddr, sqInt endAddr);
static AbstractInstruction * NoDbgRegParms relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta);
static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta);
static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress);
static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr);
static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress);
static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress);
static sqInt NoDbgRegParms rewriteJumpLongAttarget(AbstractInstruction * self_in_rewriteJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress);
static sqInt NoDbgRegParms setsConditionCodesFor(AbstractInstruction * self_in_setsConditionCodesFor, sqInt aConditionalJumpOpcode);
static sqInt NoDbgRegParms sizeHasModrmat(AbstractInstruction * self_in_sizeHasModrmat, sqInt op, sqInt pc);
static sqInt NoDbgRegParms sizeImmediateGroup1at(AbstractInstruction * self_in_sizeImmediateGroup1at, sqInt op, sqInt pc);
static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress);
static sqInt NoDbgRegParms stackBytesForNumArgs(AbstractInstruction * self_in_stackBytesForNumArgs, sqInt numArgs);
static sqInt NoDbgRegParms stackPageInterruptHeadroomBytes(AbstractInstruction * self_in_stackPageInterruptHeadroomBytes);
static AbstractInstruction * NoDbgRegParms stopsFromto(AbstractInstruction * self_in_stopsFromto, sqInt startAddr, sqInt endAddr);
static AbstractInstruction * NoDbgRegParms storeLiteralbeforeFollowingAddress(AbstractInstruction * self_in_storeLiteralbeforeFollowingAddress, sqInt literal, sqInt followingAddress);
static sqInt NoDbgRegParms sib(AbstractInstruction * self_in_sib, sqInt scale, sqInt indexReg, sqInt baseReg);
static sqInt NoDbgRegParms twoByteInstructionSizeAt(AbstractInstruction * self_in_twoByteInstructionSizeAt, sqInt pc);
static sqInt NoDbgRegParms unsignedShortAt(AbstractInstruction * self_in_unsignedShortAt, sqInt byteAddress);
static sqInt NoDbgRegParms zoneCallsAreRelative(AbstractInstruction * self_in_zoneCallsAreRelative);
static AbstractInstruction * NoDbgRegParms gAddCqR(sqInt quickConstant, sqInt reg);
static AbstractInstruction * NoDbgRegParms gAndCqR(sqInt quickConstant, sqInt reg);
static AbstractInstruction * NoDbgRegParms gAndCqRR(sqInt quickConstant, sqInt srcReg, sqInt destReg);
extern sqInt abortOffset(void);
static sqInt NoDbgRegParms abstractInstructionfollows(AbstractInstruction *theAbstractInstruction, AbstractInstruction *anAbstractInstruction);
static void addCleanBlockStarts(void);
extern void addCogMethodsToHeapMap(void);
static sqInt NoDbgRegParms addressIsInFixups(BytecodeFixup *address);
static sqInt NoDbgRegParms addressIsInInstructions(AbstractInstruction *address);
static sqInt NoDbgRegParms addressOfEndOfCaseinCPIC(sqInt n, CogMethod *cPIC);
static sqInt NoDbgRegParms alignUptoRoutineBoundary(sqInt anAddress);
static sqInt allMachineCodeObjectReferencesValid(void);
static sqInt allMethodsHaveCorrectHeader(void);
static AbstractInstruction * NoDbgRegParms annotateAbsolutePCRef(AbstractInstruction *abstractInstruction);
static AbstractInstruction * NoDbgRegParms annotateBytecode(AbstractInstruction *abstractInstruction);
static AbstractInstruction * NoDbgRegParms annotateobjRef(AbstractInstruction *abstractInstruction, sqInt anOop);
static void NoDbgRegParms assertSaneJumpTarget(AbstractInstruction *jumpTarget);
static sqInt NoDbgRegParms blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg);
extern sqInt bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
static AbstractInstruction * NoDbgRegParms CallRTregistersToBeSavedMask(sqInt callTarget, sqInt registersToBeSaved);
static AbstractInstruction * NoDbgRegParms gCall(sqInt callTarget);
static AbstractInstruction * NoDbgRegParms gCmpCqR(sqInt quickConstant, sqInt reg);
extern void callCogCodePopReceiver(void);
extern void callCogCodePopReceiverAndClassRegs(void);
extern sqInt ceCPICMissreceiver(CogMethod *cPIC, sqInt receiver);
extern void ceFree(void *pointer);
extern void* ceMalloc(size_t size);
extern sqInt ceSICMiss(sqInt receiver);
extern void checkAssertsEnabledInCogit(void);
static sqInt NoDbgRegParms checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod);
static sqInt NoDbgRegParms checkIfValidOopRefpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod);
extern sqInt checkIntegrityOfObjectReferencesInCode(sqInt gcModes);
static sqInt NoDbgRegParms checkMaybeObjRefInClosedPIC(sqInt maybeObject);
static sqInt NoDbgRegParms checkValidObjectReferencesInClosedPIC(CogMethod *cPIC);
static sqInt NoDbgRegParms NeverInline cleanUpFailingCogCodeConstituents(CogMethod *cogMethodArg);
static sqInt NoDbgRegParms closedPICRefersToUnmarkedObject(CogMethod *cPIC);
extern char * codeEntryFor(char *address);
extern char * codeEntryNameFor(char *address);
extern sqInt cogCodeBase(void);
extern sqInt cogCodeConstituents(sqInt withDetails);
static sqInt NoDbgRegParms cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt caseNTag, sqInt isMNUCase);
extern CogMethod * cogFullBlockMethodnumCopied(sqInt aMethodObj, sqInt numCopied);
extern void cogitPostGCAction(sqInt gcMode);
extern sqInt cogMethodDoesntLookKosher(CogMethod *cogMethod);
extern CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs);
static CogMethod * NoDbgRegParms cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs);
static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase);
extern CogMethod * cogselector(sqInt aMethodObj, sqInt aSelectorOop);
static sqInt NoDbgRegParms collectCogConstituentForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg);
static sqInt NoDbgRegParms collectCogMethodConstituent(CogMethod *cogMethod);
extern void compactCogCompiledCode(void);
static void compactPICsWithFreedTargets(void);
static AbstractInstruction * compileAbort(void);
static sqInt NoDbgRegParms compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex);
static void NoDbgRegParms compileBlockEntry(BlockStart *blockStart);
static void NoDbgRegParms compileCallFornumArgsargargargargresultRegregsToSave(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt resultRegOrNone, sqInt regMask);
static AbstractInstruction * compileCPICEntry(void);
static sqInt NoDbgRegParms compileEntireFullBlockMethod(sqInt numCopied);
static void compileEntry(void);
static sqInt compileFullBlockEntry(void);
static sqInt compileMethodBody(void);
static sqInt NoDbgRegParms compilePICAbort(sqInt numArgs);
static void NoDbgRegParms compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt regMask, sqInt pushLinkReg, sqInt resultRegOrNone);
static void computeEntryOffsets(void);
static void computeFullBlockEntryOffsets(void);
static void computeMaximumSizes(void);
static sqInt NoDbgRegParms configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs, sqInt addrDelta);
static sqInt NoDbgRegParms configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs, sqInt addrDelta);
static sqInt NoDbgRegParms cPICCompactAndIsNowEmpty(CogMethod *cPIC);
static sqInt NoDbgRegParms cPICHasForwardedClass(CogMethod *cPIC);
static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC);
static sqInt cPICPrototypeCaseOffset(void);
static sqInt NoDbgRegParms cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod);
static sqInt NoDbgRegParms createCPICData(CogMethod *cPIC);
static AbstractInstruction * NoDbgRegParms gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder);
extern sqInt defaultCogCodeSize(void);
static sqInt NoDbgRegParms deltaToSkipPrimAndErrorStoreInheader(sqInt aMethodObj, sqInt aMethodHeader);
static sqInt NoDbgRegParms endPCOf(sqInt aMethod);
extern void enterCogCodePopReceiver(void);
static sqInt NoDbgRegParms entryPointTagIsSelector(sqInt entryPoint);
static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC);
static sqInt extABytecode(void);
static sqInt extBBytecode(void);
static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress);
static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector);
static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc);
static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc);
static usqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod);
extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod);
static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc);
static sqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod);
static sqInt firstPrototypeMethodOop(void);
static BytecodeFixup * NoDbgRegParms fixupAt(sqInt fixupPC);
extern void followForwardedLiteralsIn(CogMethod *cogMethod);
extern void followForwardedMethods(void);
static sqInt NoDbgRegParms followMaybeObjRefInClosedPICAt(sqInt mcpc);
static sqInt NoDbgRegParms followMethodReferencesInClosedPIC(CogMethod *cPIC);
extern void freeUnmarkedMachineCode(void);
static AbstractInstruction * NoDbgRegParms genCallMustBeBooleanFor(sqInt boolean);
static sqInt genCheckForInterruptsTrampoline(void);
static AbstractInstruction * NoDbgRegParms genConditionalBranchoperand(sqInt opcode, sqInt operandOne);
static void (*genEnilopmartForandandforCallcalled(sqInt regArg1, sqInt regArg2OrNone, sqInt regArg3OrNone, sqInt forCall, char *trampolineName))(void) ;
static void NoDbgRegParms genEnilopmartReturn(sqInt forCall);
static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointer);
static void generateClosedPICPrototype(void);
static CogMethod * generateCogFullBlock(void);
static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector);
static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress);
static void generateOpenPICPrototype(void);
static void generateRunTimeTrampolines(void);
static void generateStackPointerCapture(void);
static void generateTrampolines(void);
static BytecodeDescriptor * NoDbgRegParms generatorForPC(sqInt pc);
static void genGetLeafCallStackPointer(void);
static sqInt NoDbgRegParms genInnerPICAbortTrampoline(char *name);
static sqInt genLoadCStackPointersForPrimCall(void);
static void NoDbgRegParms genLoadInlineCacheWithSelector(sqInt selectorIndex);
static sqInt genNonLocalReturnTrampoline(void);
static sqInt NoDbgRegParms genReturnTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0);
static sqInt NoDbgRegParms genSmalltalkToCStackSwitch(sqInt pushLinkReg);
static sqInt NoDbgRegParms genTrampolineForcalled(void *aRoutine, char *aString);
static sqInt NoDbgRegParms genTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0);
static sqInt NoDbgRegParms genTrampolineForcalledargargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt resultReg);
static sqInt NoDbgRegParms genTrampolineForcalledargargregsToSave(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regMask);
static sqInt NoDbgRegParms genTrampolineForcalledargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt resultReg);
static sqInt NoDbgRegParms genTrampolineForcalledargregsToSave(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regMask);
static sqInt NoDbgRegParms genTrampolineForcalledargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt resultReg);
static sqInt NoDbgRegParms genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt regMask, sqInt pushLinkReg, sqInt resultRegOrNone, sqInt appendBoolean);
static sqInt NoDbgRegParms genTrampolineForcalledregsToSave(void *aRoutine, char *aString, sqInt regMask);
static AbstractInstruction * NoDbgRegParms gen(sqInt opcode);
static AbstractInstruction * NoDbgRegParms genoperand(sqInt opcode, sqInt operand);
static AbstractInstruction * NoDbgRegParms genoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo);
static AbstractInstruction * NoDbgRegParms genoperandoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo, sqInt operandThree);
static sqInt NoDbgRegParms getLiteral(sqInt litIndex);
static sqInt NoDbgRegParms incrementUsageOfTargetIfLinkedSendmcpcignored(sqInt annotation, char *mcpc, sqInt superfluity);
static sqInt NoDbgRegParms indexForSelectorinat(sqInt selector, CogMethod *cogMethod, sqInt mcpc);
static sqInt initialClosedPICUsageCount(void);
static void initializeBackend(void);
extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress);
static sqInt initialMethodUsageCount(void);
static sqInt initialOpenPICUsageCount(void);
static sqInt NoDbgRegParms inlineCacheValueForSelectorinat(sqInt selector, CogMethod *aCogMethod, sqInt mcpc);
static sqInt NoDbgRegParms inverseBranchFor(sqInt opcode);
static sqInt NoDbgRegParms isPCMappedAnnotation(sqInt annotation);
extern sqInt isPCWithinMethodZone(void *address);
extern sqInt isSendReturnPC(sqInt retpc);
static AbstractInstruction * NoDbgRegParms gJumpFPEqual(void *jumpTarget);
static AbstractInstruction * NoDbgRegParms gJumpFPGreaterOrEqual(void *jumpTarget);
static AbstractInstruction * NoDbgRegParms gJumpFPGreater(void *jumpTarget);
static AbstractInstruction * NoDbgRegParms gJumpFPNotEqual(void *jumpTarget);
static AbstractInstruction * NoDbgRegParms gLogicalShiftLeftCqR(sqInt quickConstant, sqInt reg);
static AbstractInstruction * lastOpcode(void);
extern void linkSendAtintooffsetreceiver(sqInt callSiteReturnAddress, CogMethod *sendingMethod, CogMethod *targetMethod, sqInt theEntryOffset, sqInt receiver);
static BytecodeDescriptor * loadBytesAndGetDescriptor(void);
static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc);
static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg);
static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg);
static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod);
static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg);
static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC);
static void mapObjectReferencesInGeneratedRuntime(void);
static void mapObjectReferencesInMachineCodeForBecome(void);
static void mapObjectReferencesInMachineCodeForFullGC(void);
static void mapObjectReferencesInMachineCodeForYoungGC(void);
extern void mapObjectReferencesInMachineCode(sqInt gcMode);
extern void markAndTraceMachineCodeOfMarkedMethods(void);
static void markAndTraceObjectReferencesInGeneratedRuntime(void);
static sqInt NoDbgRegParms markAndTraceOrFreeCogMethodfirstVisit(CogMethod *cogMethod, sqInt firstVisit);
static sqInt NoDbgRegParms markAndTraceOrFreePICTargetin(sqInt entryPoint, CogMethod *cPIC);
static sqInt NoDbgRegParms markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
static sqInt NoDbgRegParms markLiteralspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
extern void markMethodAndReferents(CogBlockMethod *aCogMethod);
extern usqInt maxCogMethodAddress(void);
static sqInt maybeAllocAndInitIRCs(void);
static sqInt NoDbgRegParms maybeFreeCogMethodDoesntLookKosher(CogMethod *cogMethod);
static void NoDbgRegParms maybeMarkCountersIn(CogMethod *cogMethod);
static sqInt mclassIsSmallInteger(void);
extern usqInt mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
static sqInt NoDbgRegParms methodhasSameCodeAscheckPenultimate(sqInt methodA, sqInt methodB, sqInt comparePenultimateLiteral);
extern sqInt minCogMethodAddress(void);
extern sqInt mnuOffset(void);
static sqInt NoDbgRegParms needsFrameIfImmutability(sqInt stackDelta);
static sqInt NoDbgRegParms needsFrameIfInBlock(sqInt stackDelta);
static sqInt NoDbgRegParms needsFrameNever(sqInt stackDelta);
static sqInt NoDbgRegParms noAssertMethodClassAssociationOf(sqInt methodPointer);
static sqInt noCogMethodsMaximallyMarked(void);
static sqInt NoDbgRegParms noTargetsFreeInClosedPIC(CogMethod *cPIC);
static sqInt NoDbgRegParms outputInstructionsAt(sqInt startAddress);
static sqInt NoDbgRegParms outputInstructionsForGeneratedRuntimeAt(sqInt startAddress);
static AbstractInstruction * NoDbgRegParms gPushCw(sqInt wordConstant);
extern sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
static sqInt picAbortDiscriminatorValue(void);
static sqInt picInterpretAbortOffset(void);
extern void printCogMethodFor(void *address);
extern void printTrampolineTable(void);
static sqInt processorHasDivQuoRemAndMClassIsSmallInteger(void);
static sqInt processorHasDoublePrecisionFloatingPointSupport(void);
static sqInt processorHasMultiplyAndMClassIsSmallInteger(void);
static void NoDbgRegParms recordGeneratedRunTimeaddress(char *aString, sqInt address);
extern sqInt recordPrimTraceFunc(void);
static void recordRunTimeObjectReferences(void);
static sqInt NoDbgRegParms registerMaskFor(sqInt reg);
static sqInt NoDbgRegParms registerMaskForand(sqInt reg1, sqInt reg2);
static void NoDbgRegParms relocateCallsAndSelfReferencesInMethod(CogMethod *cogMethod);
static void NoDbgRegParms relocateCallsInClosedPIC(CogMethod *cPIC);
static sqInt NoDbgRegParms relocateIfCallOrMethodReferencemcpcdelta(sqInt annotation, char *mcpc, sqInt refDelta);
static sqInt NoDbgRegParms remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr);
static sqInt NoDbgRegParms remapMaybeObjRefInClosedPICAt(sqInt mcpc);
static void NoDbgRegParms rewriteCPICCaseAttagobjReftarget(sqInt followingAddress, sqInt newTag, sqInt newObjRef, sqInt newTarget);
static sqInt scanForCleanBlocks(void);
extern void setBreakMethod(sqInt anObj);
extern void setPostCompileHook(void (*aFunction)(CogMethod *));
extern void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);
static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC);
static sqInt subsequentPrototypeMethodOop(void);
extern sqInt traceLinkedSendOffset(void);
static sqInt NoDbgRegParms trampolineArgConstant(sqInt booleanOrInteger);
static char * NoDbgRegParms trampolineNamenumArgs(char *routinePrefix, sqInt numArgs);
static char * NoDbgRegParms trampolineNamenumArgslimit(char *routinePrefix, int numArgs, sqInt argsLimit);
static char * NoDbgRegParms trampolineNamenumRegArgs(char *routinePrefix, sqInt numArgs);
static sqInt unknownBytecode(void);
extern void unlinkAllSends(void);
static sqInt NoDbgRegParms unlinkIfFreeOrLinkedSendpcof(sqInt annotation, char *mcpc, sqInt theSelector);
static sqInt NoDbgRegParms unlinkIfInvalidClassSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity);
static sqInt NoDbgRegParms unlinkIfLinkedSendToFreepcignored(sqInt annotation, char *mcpc, sqInt superfluity);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod);
extern void unlinkSendsLinkedForInvalidClasses(void);
extern void unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector);
extern void unlinkSendsToFree(void);
extern void unlinkSendsToandFreeIf(sqInt targetMethodObject, sqInt freeIfTrue);
static void zeroOpcodeIndex(void);
static void zeroOpcodeIndexForNewOpcodes(void);
static sqInt NoDbgRegParms counters(CogMethod * self_in_counters);
extern void addAllToYoungReferrers(void);
static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC);
static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod);
static usqInt NoDbgRegParms allocate(sqInt numBytes);
static void clearCogCompiledCode(void);
static void compactCompiledCode(void);
static void NoDbgRegParms ensureInYoungReferrers(CogMethod *cogMethod);
static void followForwardedLiteralsInOpenPICList(void);
extern void freeMethod(CogMethod *cogMethod);
static void freeOlderMethodsForCompaction(void);
static sqInt kosherYoungReferrers(void);
static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress);
extern CogMethod * methodFor(void *address);
extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj);
extern sqInt numMethods(void);
extern sqInt numMethodsOfType(sqInt cogMethodType);
static sqInt NoDbgRegParms occurrencesInYoungReferrers(CogMethod *cogMethod);
static CogMethod * NoDbgRegParms openPICWithSelector(sqInt aSelector);
static void planCompaction(void);
extern void printCogMethods(void);
extern void printCogMethodsOfType(sqInt cmType);
extern void printCogMethodsWithMethod(sqInt methodOop);
extern void printCogMethodsWithPrimitive(sqInt primIdx);
extern void printCogMethodsWithSelector(sqInt selectorOop);
extern void printCogYoungReferrers(void);
extern sqInt printOpenPICList(void);
static sqInt pruneYoungReferrers(void);
static sqInt relocateAndPruneYoungReferrers(void);
static sqInt relocateMethodsPreCompaction(void);
static sqInt NoDbgRegParms removeFromOpenPICList(CogMethod *anOpenPIC);
static void voidOpenPICList(void);
static void voidYoungReferrersPostTenureAll(void);
extern char * whereIsMaybeCodeThing(sqInt anOop);
static sqInt NoDbgRegParms checkValidObjectReference(sqInt anOop);
static AbstractInstruction * NoDbgRegParms genCmpClassFloatCompactIndexR(sqInt reg);
static AbstractInstruction * NoDbgRegParms genCmpClassMethodContextCompactIndexR(sqInt reg);
static sqInt NoDbgRegParms genDoubleArithmeticpreOpCheck(sqInt arithmeticOperator, AbstractInstruction *(*preOpCheckOrNil)(int rcvrReg, int argReg));
static sqInt NoDbgRegParms genDoubleComparisoninvert(AbstractInstruction * NoDbgRegParms (*jumpOpcodeGenerator)(void *), sqInt invertComparison);
static sqInt NoDbgRegParms genGetMethodHeaderOfintoscratch(sqInt methodReg, sqInt headerReg, sqInt scratchReg);
static sqInt NoDbgRegParms genLoadSlotsourceRegdestReg(sqInt index, sqInt sourceReg, sqInt destReg);
static sqInt genPrimitiveAdd(void);
static sqInt genPrimitiveAsFloat(void);
static sqInt genPrimitiveBitAnd(void);
static sqInt genPrimitiveBitOr(void);
static sqInt genPrimitiveBitShift(void);
static sqInt genPrimitiveBitXor(void);
static sqInt genPrimitiveClass(void);
static sqInt genPrimitiveDiv(void);
static sqInt genPrimitiveDivide(void);
static sqInt genPrimitiveEqual(void);
static sqInt genPrimitiveFloatAdd(void);
static sqInt genPrimitiveFloatDivide(void);
static sqInt genPrimitiveFloatEqual(void);
static sqInt genPrimitiveFloatGreaterOrEqual(void);
static sqInt genPrimitiveFloatGreaterThan(void);
static sqInt genPrimitiveFloatLessOrEqual(void);
static sqInt genPrimitiveFloatLessThan(void);
static sqInt genPrimitiveFloatMultiply(void);
static sqInt genPrimitiveFloatNotEqual(void);
static sqInt genPrimitiveFloatSquareRoot(void);
static sqInt genPrimitiveFloatSubtract(void);
static sqInt genPrimitiveGreaterOrEqual(void);
static sqInt genPrimitiveGreaterThan(void);
static sqInt genPrimitiveIdentical(void);
static sqInt genPrimitiveLessOrEqual(void);
static sqInt genPrimitiveLessThan(void);
static sqInt genPrimitiveMod(void);
static sqInt genPrimitiveMultiply(void);
static sqInt genPrimitiveNewMethod(void);
static sqInt genPrimitiveNotEqual(void);
static sqInt genPrimitiveNotIdentical(void);
static sqInt genPrimitiveQuo(void);
static sqInt genPrimitiveSubtract(void);
static sqInt NoDbgRegParms genSmallIntegerComparison(sqInt jumpOpcode);
static sqInt NoDbgRegParms genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction * NoDbgRegParms (*jumpFPOpcodeGenerator)(void *), sqInt invertComparison);
static sqInt NoDbgRegParms isUnannotatableConstant(CogSimStackEntry *simStackEntry);
static sqInt NoDbgRegParms classForInlineCacheTag(sqInt inlineCacheTag);
static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister);
static sqInt NoDbgRegParms genClearAndSetSmallIntegerTagsIn(sqInt scratchReg);
static void NoDbgRegParms genConvertCharacterToSmallIntegerInReg(sqInt reg);
static sqInt NoDbgRegParms genConvertIntegerToSmallIntegerInReg(sqInt reg);
static void NoDbgRegParms genConvertSmallIntegerToCharacterInReg(sqInt reg);
static sqInt NoDbgRegParms genConvertSmallIntegerToIntegerInReg(sqInt reg);
static sqInt NoDbgRegParms genGetHashFieldNonImmOfasSmallIntegerInto(sqInt instReg, sqInt destReg);
static sqInt NoDbgRegParms genGetHashFieldNonImmOfinto(sqInt instReg, sqInt destReg);
static AbstractInstruction * NoDbgRegParms genGetInlineCacheClassTagFromintoforEntry(sqInt sourceReg, sqInt destReg, sqInt forEntry);
static sqInt NoDbgRegParms genGetNumBytesOfinto(sqInt srcReg, sqInt destReg);
static sqInt NoDbgRegParms genGetOverflowSlotsOfinto(sqInt srcReg, sqInt destReg);
static AbstractInstruction * NoDbgRegParms genJumpIsSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg);
static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerInScratchReg(sqInt aRegister);
static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg);
static AbstractInstruction * NoDbgRegParms genJumpNotSmallInteger(sqInt aRegister);
static AbstractInstruction * NoDbgRegParms genJumpSmallInteger(sqInt aRegister);
static sqInt genPrimitiveAtPut(void);
static sqInt NoDbgRegParms genPrimitiveAtPutSigned(sqInt signedVersion);
static sqInt NoDbgRegParms genPrimitiveAtSigned(sqInt signedVersion);
static sqInt genPrimitiveIdentityHash(void);
static sqInt genPrimitiveImmediateAsInteger(void);
static sqInt genPrimitiveNew(void);
static sqInt genPrimitiveNewWithArg(void);
static sqInt genPrimitiveShallowCopy(void);
static sqInt genPrimitiveStringAt(void);
static sqInt genPrimitiveStringAtPut(void);
static sqInt NoDbgRegParms genRemoveSmallIntegerTagsInScratchReg(sqInt scratchReg);
static sqInt NoDbgRegParms genShiftAwaySmallIntegerTagsInScratchReg(sqInt scratchReg);
static sqInt NoDbgRegParms getLiteralCountOfplusOneinBytesintoscratch(sqInt methodReg, sqInt plusOne, sqInt inBytes, sqInt litCountReg, sqInt scratchReg);
static sqInt NoDbgRegParms inlineCacheTagForInstance(sqInt oop);
static AbstractInstruction * NoDbgRegParms jumpNotSmallIntegerUnsignedValueInRegister(sqInt reg);
static sqInt NoDbgRegParms markAndTraceCacheTagLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqInt address);
static sqInt numSmallIntegerBits(void);
static sqInt NoDbgRegParms validInlineCacheTag(usqInt classIndexOrTagPattern);
static sqInt NoDbgRegParms cacheTagIsMarked(sqInt cacheTag);
static void callStoreCheckTrampoline(void);
static sqInt NoDbgRegParms checkValidDerivedObjectReference(sqInt bodyAddress);
static sqInt NoDbgRegParms checkValidOopReference(sqInt anOop);
static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress);
static sqInt NoDbgRegParms couldBeObject(sqInt literal);
static sqInt NoDbgRegParms genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString);
static AbstractInstruction * NoDbgRegParms genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt scratch1, sqInt scratch2);
static AbstractInstruction * NoDbgRegParms genCheckRememberedBitOfscratch(sqInt objReg, sqInt scratchReg);
static sqInt NoDbgRegParms genConvertCharacterToCodeInReg(sqInt reg);
static sqInt NoDbgRegParms genConvertIntegerToCharacterInReg(sqInt reg);
static sqInt NoDbgRegParms genCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sqInt numArgs, sqInt numCopied, sqInt ctxtNumArgs, sqInt isLargeCtxt, sqInt isInBlock);
static sqInt NoDbgRegParms genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqInt compiledBlock, sqInt numArgs, sqInt numCopied, sqInt ignoreContext, sqInt contextNumArgs, sqInt contextIsLarge, sqInt contextIsBlock);
static sqInt NoDbgRegParms genEnsureObjInRegNotForwardedscratchReg(sqInt reg, sqInt scratch);
static sqInt NoDbgRegParms genEnsureOopInRegNotForwardedscratchReg(sqInt reg, sqInt scratch);
static sqInt NoDbgRegParms genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder(sqInt reg, sqInt scratch, sqInt fwdJumpTarget, sqInt nonFwdJumpTargetOrZero);
static sqInt NoDbgRegParms genEnsureOopInRegNotForwardedscratchRegupdatingSlotin(sqInt reg, sqInt scratch, sqInt index, sqInt objReg);
static void generateObjectRepresentationTrampolines(void);
static sqInt NoDbgRegParms genGetActiveContextLargeinBlock(sqInt isLarge, sqInt isInBlock);
static sqInt NoDbgRegParms genGetActiveContextNumArgslargeinBlock(sqInt numArgs, sqInt isLargeContext, sqInt isInBlock);
static sqInt NoDbgRegParms genGetBitsofFormatByteOfinto(sqInt mask, sqInt sourceReg, sqInt destReg);
static sqInt NoDbgRegParms genGetClassIndexOfNonImminto(sqInt sourceReg, sqInt destReg);
static sqInt NoDbgRegParms genGetClassObjectOfClassIndexintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg);
static sqInt NoDbgRegParms genGetClassObjectOfintoscratchReginstRegIsReceiver(sqInt instReg, sqInt destReg, sqInt scratchReg, sqInt instRegIsReceiver);
static AbstractInstruction * NoDbgRegParms genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg);
static sqInt NoDbgRegParms genGetCompactClassIndexNonImmOfinto(sqInt instReg, sqInt destReg);
static sqInt NoDbgRegParms genGetDoubleValueOfinto(sqInt srcReg, sqInt destFPReg);
static sqInt NoDbgRegParms genGetFormatOfinto(sqInt srcReg, sqInt destReg);
static sqInt NoDbgRegParms genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(sqInt sourceReg, sqInt destReg, sqInt scratchRegOrNone);
static sqInt NoDbgRegParms genGetNumSlotsOfinto(sqInt srcReg, sqInt destReg);
static sqInt NoDbgRegParms genGetRawSlotSizeOfNonImminto(sqInt sourceReg, sqInt destReg);
static AbstractInstruction * NoDbgRegParms genJumpImmediate(sqInt aRegister);
#if IMMUTABILITY
static AbstractInstruction * NoDbgRegParms genJumpImmutablescratchReg(sqInt sourceReg, sqInt scratchReg);
#endif /* IMMUTABILITY */
#if IMMUTABILITY
static AbstractInstruction * NoDbgRegParms genJumpMutablescratchReg(sqInt sourceReg, sqInt scratchReg);
#endif /* IMMUTABILITY */
static AbstractInstruction * NoDbgRegParms genJumpNotCharacterInScratchReg(sqInt reg);
static sqInt NoDbgRegParms genNewArrayOfSizeinitialized(sqInt size, sqInt initialized);
static sqInt NoDbgRegParms genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sqInt numArgs, sqInt numCopied, sqInt ctxtNumArgs, sqInt isLargeCtxt, sqInt isInBlock);
static sqInt genPrimitiveAsCharacter(void);
static sqInt genPrimitiveAt(void);
static sqInt NoDbgRegParms genPrimitiveIdenticalOrNotIf(sqInt orNot);
static sqInt genPrimitiveIntegerAt(void);
static sqInt genPrimitiveIntegerAtPut(void);
static sqInt genPrimitiveObjectAt(void);
static sqInt genPrimitiveSize(void);
static sqInt genPrimitiveStringCompareWith(void);
static sqInt genPrimitiveStringReplace(void);
static sqInt NoDbgRegParms genSetSmallIntegerTagsIn(sqInt scratchReg);
static sqInt genStoreCheckContextReceiverTrampoline(void);
static sqInt NoDbgRegParms genStoreCheckReceiverRegvalueRegscratchReginFrame(sqInt destReg, sqInt valueReg, sqInt scratchReg, sqInt inFrame);
static sqInt NoDbgRegParms genStoreSourceRegslotIndexdestRegscratchReginFrameneedsStoreCheck(sqInt sourceReg, sqInt index, sqInt destReg, sqInt scratchReg, sqInt inFrame, sqInt needsStoreCheck);
static sqInt NoDbgRegParms genStoreSourceRegslotIndexintoNewObjectInDestReg(sqInt sourceReg, sqInt index, sqInt destReg);
#if IMMUTABILITY
static sqInt NoDbgRegParms genStoreTrampolineCalledinstVarIndex(char *trampolineName, sqInt instVarIndex);
#endif /* IMMUTABILITY */
#if IMMUTABILITY
static sqInt NoDbgRegParms genStoreWithImmutabilityAndStoreCheckSourceRegslotIndexdestRegscratchRegneedRestoreRcvr(sqInt sourceReg, sqInt index, sqInt destReg, sqInt scratchReg, sqInt needRestoreRcvr);
#endif /* IMMUTABILITY */
#if IMMUTABILITY
static sqInt NoDbgRegParms genStoreWithImmutabilityButNoStoreCheckSourceRegslotIndexdestRegscratchRegneedRestoreRcvr(sqInt sourceReg, sqInt index, sqInt destReg, sqInt scratchReg, sqInt needRestoreRcvr);
#endif /* IMMUTABILITY */
#if IMMUTABILITY
static sqInt NoDbgRegParms genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(sqInt sourceReg, sqInt index, sqInt destReg, sqInt scratchReg, sqInt needsStoreCheck, sqInt needRestoreRcvr);
#endif /* IMMUTABILITY */
static sqInt getActiveContextAllocatesInMachineCode(void);
static sqInt NoDbgRegParms inlineCacheTagIsYoung(sqInt cacheTag);
static AbstractInstruction * NoDbgRegParms jumpNotCharacterUnsignedValueInRegister(sqInt reg);
static sqInt NoDbgRegParms markAndTraceLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqInt address);
static void NoDbgRegParms markAndTraceLiteralinat(sqInt literal, CogMethod *cogMethod, sqInt *address);
static void NoDbgRegParms markAndTraceUpdatedLiteralin(sqInt objOop, CogMethod *cogMethodOrNil);
static sqInt NoDbgRegParms maybeCompileRetryOnPrimitiveFail(sqInt primIndex);
static sqInt NoDbgRegParms maybeShiftClassTagRegisterForMethodCacheProbe(sqInt classTagReg);
static sqInt numCharacterBits(void);
extern sqInt numRegArgs(void);
static sqInt NoDbgRegParms remapObject(sqInt objOop);
static sqInt NoDbgRegParms remapOop(sqInt objOop);
static sqInt NoDbgRegParms shouldAnnotateObjectReference(sqInt anOop);
static sqInt NoDbgRegParms slotOffsetOfInstVarIndex(sqInt index);
static SimStackEntry * NoDbgRegParms ensureSpilledAtfrom(SimStackEntry * self_in_ensureSpilledAtfrom, sqInt baseOffset, sqInt baseRegister);
static sqInt NoDbgRegParms isSameEntryAs(SimStackEntry * self_in_isSameEntryAs, CogSimStackEntry *ssEntry);
static SimStackEntry * NoDbgRegParms popToReg(SimStackEntry * self_in_popToReg, sqInt reg);
static sqInt NoDbgRegParms registerMask(SimStackEntry * self_in_registerMask);
static sqInt NoDbgRegParms registerMaskOrNone(SimStackEntry * self_in_registerMaskOrNone);
static sqInt NoDbgRegParms registerOrNone(SimStackEntry * self_in_registerOrNone);
static SimStackEntry * NoDbgRegParms storeToReg(SimStackEntry * self_in_storeToReg, sqInt reg);
static sqInt NoDbgRegParms isMergeFixup(BytecodeFixup * self_in_isMergeFixup);
static AbstractInstruction * NoDbgRegParms checkLiteralforInstruction(sqInt literal, AbstractInstruction *anInstruction);
static AbstractInstruction * NoDbgRegParms checkQuickConstantforInstruction(sqInt literal, AbstractInstruction *anInstruction);
static sqInt compileBlockDispatch(void);
static void compileGetErrorCode(void);
static sqInt compileInterpreterPrimitive(void);
static sqInt NoDbgRegParms compileInterpreterPrimitiveflags(void (*primitiveRoutine)(void), sqInt flags);
static sqInt NoDbgRegParms compileMachineCodeInterpreterPrimitive(void (*primitiveRoutine)(void));
static AbstractInstruction * NoDbgRegParms compileOpenPICMethodCacheProbeForwithShiftbaseRegOrNone(sqInt selector, sqInt shift, sqInt baseRegOrNone);
static void NoDbgRegParms compileOpenPICnumArgs(sqInt selector, sqInt numArgs);
static AbstractInstruction * NoDbgRegParms compilePerformMethodCacheProbeForwithShiftbaseRegOrNone(sqInt selectorReg, sqInt shift, sqInt baseRegOrNone);
static sqInt compilePrimitive(void);
static sqInt extendedPushBytecode(void);
static sqInt extendedStoreAndPopBytecode(void);
static sqInt extendedStoreBytecode(void);
static sqInt NoDbgRegParms frameOffsetOfTemporary(sqInt index);
static sqInt genCallMappedInlinedPrimitive(void);
static AbstractInstruction * NoDbgRegParms genDoubleFailIfZeroArgRcvrarg(int rcvrReg, int argReg);
static sqInt genExtendedSendBytecode(void);
static sqInt genExtendedSuperBytecode(void);
static sqInt genExtJumpIfFalse(void);
static sqInt genExtJumpIfTrue(void);
static sqInt genExtNopBytecode(void);
static sqInt genExtPushCharacterBytecode(void);
static sqInt genExtPushIntegerBytecode(void);
static sqInt genExtPushLiteralBytecode(void);
static sqInt genExtPushLiteralVariableBytecode(void);
static sqInt genExtPushPseudoVariable(void);
static sqInt genExtPushReceiverVariableBytecode(void);
static sqInt genExtSendBytecode(void);
static sqInt genExtSendSuperBytecode(void);
static sqInt genExtStoreAndPopLiteralVariableBytecode(void);
static sqInt genExtStoreAndPopReceiverVariableBytecode(void);
static sqInt genExtStoreLiteralVariableBytecode(void);
static sqInt genExtStoreReceiverVariableBytecode(void);
static sqInt genExtUnconditionalJump(void);
static sqInt genFastPrimFail(void);
static void NoDbgRegParms genFastPrimTraceUsingand(sqInt r1, sqInt r2);
static sqInt genLongJumpIfFalse(void);
static sqInt genLongJumpIfTrue(void);
static sqInt genLongPushTemporaryVariableBytecode(void);
static sqInt genLongStoreAndPopTemporaryVariableBytecode(void);
static sqInt genLongStoreTemporaryVariableBytecode(void);
static sqInt genLongUnconditionalBackwardJump(void);
static sqInt genLongUnconditionalForwardJump(void);
static sqInt NoDbgRegParms genLookupForPerformNumArgs(sqInt numArgs);
static AbstractInstruction * NoDbgRegParms genMoveConstantR(sqInt constant, sqInt reg);
static sqInt NoDbgRegParms genMustBeBooleanTrampolineForcalled(sqInt boolean, char *trampolineName);
static sqInt genPrimitiveHashMultiply(void);
static void NoDbgRegParms genPrimReturnEnterCogCodeEnilopmart(sqInt profiling);
static sqInt genPushConstantFalseBytecode(void);
static sqInt genPushConstantNilBytecode(void);
static sqInt genPushConstantOneBytecode(void);
static sqInt genPushConstantTrueBytecode(void);
static sqInt genPushConstantZeroBytecode(void);
static sqInt genPushLiteralConstantBytecode(void);
static sqInt genPushLiteralVariable16CasesBytecode(void);
static sqInt genPushLiteralVariableBytecode(void);
static sqInt genPushQuickIntegerConstantBytecode(void);
static sqInt genPushReceiverVariableBytecode(void);
static sqInt genPushTemporaryVariableBytecode(void);
extern sqInt genQuickReturnConst(void);
extern sqInt genQuickReturnInstVar(void);
extern sqInt genQuickReturnSelf(void);
static sqInt genReturnFalse(void);
static sqInt genReturnNil(void);
static sqInt genReturnNilFromBlock(void);
static sqInt genReturnTrue(void);
static sqInt genSecondExtendedSendBytecode(void);
static sqInt genSendLiteralSelector0ArgsBytecode(void);
static sqInt genSendLiteralSelector1ArgBytecode(void);
static sqInt genSendLiteralSelector2ArgsBytecode(void);
static sqInt genShortJumpIfFalse(void);
static sqInt genShortJumpIfTrue(void);
static sqInt genShortUnconditionalJump(void);
static sqInt genSpecialSelectorEqualsEquals(void);
static sqInt genSpecialSelectorNotEqualsEquals(void);
static sqInt genSpecialSelectorSend(void);
static sqInt genStoreAndPopReceiverVariableBytecode(void);
static sqInt genStoreAndPopRemoteTempLongBytecode(void);
static sqInt genStoreAndPopTemporaryVariableBytecode(void);
static sqInt genStoreRemoteTempLongBytecode(void);
static sqInt genUnconditionalTrapBytecode(void);
extern sqInt mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj);
static void maybeCompileAllocFillerCheck(void);
static sqInt numSpecialSelectors(void);
static usqInt NoDbgRegParms pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod);
static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg);
static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
extern void recordCallOffsetIn(CogMethod *cogMethod);
extern void rewritePrimInvocationInto(CogMethod *cogMethod, void (*primFunctionPointer)(void));
static sqInt NoDbgRegParms seemsToBeInstantiating(sqInt format);
static sqInt NoDbgRegParms v3BlockCodeSize(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
static sqInt NoDbgRegParms v3LongForwardBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
static sqInt NoDbgRegParms v3LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
static sqInt NoDbgRegParms v3ShortForwardBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
static sqInt NoDbgRegParms v4BlockCodeSize(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
static sqInt NoDbgRegParms v4LongForwardBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
static sqInt NoDbgRegParms v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
extern void voidCogCompiledCode(void);
static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span);
static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs);
static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask);
static sqInt NoDbgRegParms allocateRegNotConflictingWith(sqInt regMask);
static sqInt NoDbgRegParms anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n);
extern void callCogCodePopReceiverArg0Regs(void);
extern void callCogCodePopReceiverArg1Arg0Regs(void);
static sqInt NoDbgRegParms compileAbstractInstructionsFromthrough(sqInt start, sqInt end);
static sqInt compileBlockBodies(void);
static void NoDbgRegParms compileBlockFrameBuild(BlockStart *blockStart);
static void NoDbgRegParms compileBlockFramelessEntry(BlockStart *blockStart);
static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied);
static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector);
static sqInt compileEntireMethod(void);
static void compileFrameBuild(void);
static void NoDbgRegParms compileFullBlockFramelessEntry(sqInt numCopied);
static void NoDbgRegParms compileFullBlockMethodFrameBuild(sqInt numCopied);
#if IMMUTABILITY
static void compileTwoPathFrameBuild(void);
#endif /* IMMUTABILITY */
static void compileTwoPathFramelessInit(void);
static sqInt NoDbgRegParms cPICMissTrampolineFor(sqInt numArgs);
static sqInt doubleExtendedDoAnythingBytecode(void);
static sqInt duplicateTopBytecode(void);
static BytecodeFixup * NoDbgRegParms ensureFixupAt(sqInt targetPC);
static BytecodeFixup * NoDbgRegParms ensureNonMergeFixupAt(sqInt targetPC);
static void ensureReceiverResultRegContainsSelf(void);
static void NoDbgRegParms evaluateat(BytecodeDescriptor *descriptor, sqInt pc);
static sqInt NoDbgRegParms eventualTargetOf(sqInt targetBytecodePC);
static sqInt NoDbgRegParms freeAnyRegNotConflictingWith(sqInt regMask);
static sqInt genBlockReturn(void);
static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void) ;
static sqInt genCallPrimitiveBytecode(void);
static sqInt genExternalizePointersForPrimitiveCall(void);
static sqInt genExtPushClosureBytecode(void);
static sqInt genExtPushFullClosureBytecode(void);
static void generateEnilopmarts(void);
static sqInt NoDbgRegParms generateInstructionsAt(sqInt eventualAbsoluteAddress);
static void generateMissAbortTrampolines(void);
static void generateSendTrampolines(void);
static void generateTracingTrampolines(void);
static sqInt NoDbgRegParms genForwardersInlinedIdenticalOrNotIf(sqInt orNot);
static sqInt NoDbgRegParms genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(sqInt argIsConstant, sqInt rcvrIsConstant, sqInt argReg, sqInt rcvrRegOrNone, sqInt orNot);
static sqInt NoDbgRegParms genInlinedIdenticalOrNotIf(sqInt orNot);
static sqInt NoDbgRegParms genJumpBackTo(sqInt targetBytecodePC);
static sqInt NoDbgRegParms genJumpIfto(sqInt boolean, sqInt targetBytecodePC);
static sqInt NoDbgRegParms genJumpTo(sqInt targetBytecodePC);
static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable);
static sqInt NoDbgRegParms genMethodAbortTrampolineFor(sqInt numArgs);
static sqInt NoDbgRegParms genPICAbortTrampolineFor(sqInt numArgs);
static sqInt NoDbgRegParms genPICMissTrampolineFor(sqInt numArgs);
static sqInt genPopStackBytecode(void);
static sqInt genPrimitiveClosureValue(void);
static sqInt genPrimitiveFullClosureValue(void);
static sqInt genPrimitivePerform(void);
static sqInt genPushActiveContextBytecode(void);
static sqInt genPushClosureCopyCopiedValuesBytecode(void);
static sqInt NoDbgRegParms genPushLiteralIndex(sqInt literalIndex);
static sqInt NoDbgRegParms genPushLiteralVariable(sqInt literalIndex);
static sqInt NoDbgRegParms genPushLiteral(sqInt literal);
static sqInt NoDbgRegParms genPushMaybeContextReceiverVariable(sqInt slotIndex);
static sqInt genPushNewArrayBytecode(void);
static sqInt genPushReceiverBytecode(void);
static sqInt NoDbgRegParms genPushReceiverVariable(sqInt index);
static void genPushRegisterArgs(void);
static sqInt genPushRemoteTempLongBytecode(void);
static sqInt NoDbgRegParms genPushTemporaryVariable(sqInt index);
static sqInt genReturnReceiver(void);
static sqInt genReturnTopFromBlock(void);
static sqInt genReturnTopFromMethod(void);
static sqInt NoDbgRegParms genSendDirectedSupernumArgs(sqInt selectorIndex, sqInt numArgs);
static sqInt NoDbgRegParms genSendSupernumArgs(sqInt selectorIndex, sqInt numArgs);
static sqInt NoDbgRegParms genSendTrampolineFornumArgscalledargargargarg(void *aRoutine, sqInt numArgs, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3);
static sqInt NoDbgRegParms genSendnumArgs(sqInt selectorIndex, sqInt numArgs);
static sqInt genSpecialSelectorArithmetic(void);
static sqInt genSpecialSelectorClass(void);
static sqInt genSpecialSelectorComparison(void);
static sqInt genStaticallyResolvedSpecialSelectorComparison(void);
static sqInt NoDbgRegParms genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean, sqInt litVarIndex, sqInt needsStoreCheck, sqInt needsImmCheck);
static sqInt NoDbgRegParms genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean, sqInt slotIndex, sqInt needsStoreCheck, sqInt needsImmCheck);
static sqInt NoDbgRegParms genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean, sqInt slotIndex, sqInt needsStoreCheck, sqInt needsImmCheck);
static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck);
static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex);
static sqInt genUpArrowReturn(void);
static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc);
static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc);
static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc);
static sqInt liveRegisters(void);
static sqInt NoDbgRegParms mapDeadDescriptorIfNeeded(BytecodeDescriptor *descriptor);
static void NoDbgRegParms marshallSendArguments(sqInt numArgs);
static sqInt maybeCompilingFirstPassOfBlockWithInitialPushNil(void);
static sqInt NoDbgRegParms mergeWithFixupIfRequired(BytecodeFixup *fixup);
static sqInt NoDbgRegParms methodAbortTrampolineFor(sqInt numArgs);
static sqInt methodFoundInvalidPostScan(void);
static sqInt NoDbgRegParms needsFrameIfMod16GENumArgs(sqInt stackDelta);
static sqInt NoDbgRegParms needsFrameIfStackGreaterThanOne(sqInt stackDelta);
static sqInt NoDbgRegParms numberOfSpillsInTopNItems(sqInt n);
static sqInt NoDbgRegParms picAbortTrampolineFor(sqInt numArgs);
static sqInt prevInstIsPCAnnotated(void);
static sqInt receiverIsInReceiverResultReg(void);
static void NoDbgRegParms reinitializeFixupsFromthrough(sqInt start, sqInt end);
static sqInt NoDbgRegParms scanBlock(BlockStart *blockStart);
static sqInt scanMethod(void);
static sqInt NoDbgRegParms squeakV3orSistaV1PushNilSizenumInitialNils(sqInt aMethodObj, sqInt numInitialNils);
static sqInt NoDbgRegParms squeakV3orSistaV1NumPushNils(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj);
static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqInt requiredRegsMask, sqInt stackPtr, sqInt nativeStackPtr);
static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex);
static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex);
static void NoDbgRegParms ssPop(sqInt n);
static sqInt NoDbgRegParms ssPushAnnotatedConstant(sqInt literal);
static sqInt NoDbgRegParms ssPushBaseoffset(sqInt reg, sqInt offset);
static sqInt NoDbgRegParms ssPushConstant(sqInt literal);
static sqInt NoDbgRegParms ssPushDesc(SimStackEntry simStackEntry);
static sqInt NoDbgRegParms ssPushRegister(sqInt reg);
static void NoDbgRegParms ssPush(sqInt n);
static SimStackEntry ssSelfDescriptor(void);
static void NoDbgRegParms ssStoreAndReplacePoptoReg(sqInt popBoolean, sqInt reg);
static sqInt NoDbgRegParms ssStorePoptoPreferredReg(sqInt popBoolean, sqInt preferredReg);
static void NoDbgRegParms ssStorePoptoReg(sqInt popBoolean, sqInt reg);
static CogSimStackEntry * ssTop(void);
static CogSimStackEntry * NoDbgRegParms ssValue(sqInt n);
static sqInt NoDbgRegParms stackEntryIsBoolean(CogSimStackEntry *simStackEntry);
static sqInt tempsValidAndVolatileEntriesSpilled(void);
static sqInt NoDbgRegParms tryCollapseTempVectorInitializationOfSize(sqInt slots);
static sqInt violatesEnsureSpilledSpillAssert(void);
static void voidReceiverResultRegContainsSelf(void);


/*** Variables ***/
static AbstractInstruction * abstractOpcodes;
static AbstractInstruction aMethodLabel;
static AbstractInstruction * const backEnd = &aMethodLabel;
static usqInt baseAddress;
static sqInt blockCount;
static AbstractInstruction * blockEntryLabel;
static AbstractInstruction * blockEntryNoContextSwitch;
sqInt blockNoContextSwitchOffset;
static BlockStart * blockStarts;
static sqInt breakBlock;
static sqInt breakMethod;
sqInt breakPC;
static sqInt byte0;
static sqInt byte1;
static sqInt byte2;
static sqInt byte3;
static sqInt bytecodePC;
static sqInt bytecodeSetOffset;
void * CFramePointer;
void * CStackPointer;
sqInt cbEntryOffset;
sqInt cbNoSwitchEntryOffset;
sqInt ceBaseFrameReturnTrampoline;
static sqInt ceByteSizeOfTrampoline;
void (*ceCall0ArgsPIC)(void);
void (*ceCall1ArgsPIC)(void);
void (*ceCall2ArgsPIC)(void);
void (*ceCallCogCodePopReceiverAndClassRegs)(void);
void (*ceCallCogCodePopReceiverArg0Regs)(void);
void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void);
void (*ceCallCogCodePopReceiverReg)(void);
sqInt ceCannotResumeTrampoline;
void (*ceCaptureCStackPointers)(void);
static usqIntptr_t (*ceCheckFeaturesFunction)(void);
sqInt ceCheckForInterruptTrampoline;
static sqInt ceCPICMissTrampoline;
void (*ceEnterCogCodePopReceiverReg)(void);
static sqInt ceFetchContextInstVarTrampoline;
static sqInt ceFFICalloutTrampoline;
static sqInt ceFloatObjectOfTrampoline;
static sqInt ceFloatValueOfTrampoline;
static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to);
static sqInt ceFreeTrampoline;
usqIntptr_t (*ceGetFP)(void);
usqIntptr_t (*ceGetSP)(void);
static sqInt ceInlineNewHashTrampoline;
static sqInt ceInstantiateClassIndexableSizeTrampoline;
static sqInt ceInstantiateClassTrampoline;
static sqInt ceLargeActiveContextInBlockTrampoline;
static sqInt ceLargeActiveContextInFullBlockTrampoline;
static sqInt ceLargeActiveContextInMethodTrampoline;
static sqInt ceMallocTrampoline;
static sqInt ceMethodAbortTrampoline;
static sqInt ceNewHashTrampoline;
static sqInt ceNonLocalReturnTrampoline;
static sqInt cePICAbortTrampoline;
static sqInt cePositive32BitIntegerTrampoline;
static sqInt cePositive32BitValueOfTrampoline;
static sqInt cePositive64BitIntegerTrampoline;
static sqInt cePositive64BitValueOfTrampoline;
static sqInt cePrimReturnEnterCogCode;
static sqInt cePrimReturnEnterCogCodeProfiling;
static sqInt ceReapAndResetErrorCodeTrampoline;
sqInt ceReturnToInterpreterTrampoline;
static sqInt ceScheduleScavengeTrampoline;
static sqInt ceSendMustBeBooleanAddFalseTrampoline;
static sqInt ceSendMustBeBooleanAddTrueTrampoline;
static sqInt ceSigned32BitIntegerTrampoline;
static sqInt ceSigned32BitValueOfTrampoline;
static sqInt ceSigned64BitIntegerTrampoline;
static sqInt ceSigned64BitValueOfTrampoline;
static sqInt ceSmallActiveContextInBlockTrampoline;
static sqInt ceSmallActiveContextInFullBlockTrampoline;
static sqInt ceSmallActiveContextInMethodTrampoline;
static sqInt ceStoreCheckContextReceiverTrampoline;
static sqInt ceStoreCheckTrampoline;
static sqInt ceStoreContextInstVarTrampoline;
#if IMMUTABILITY
sqInt ceStoreTrampolines[5];
#endif
static sqInt ceTraceBlockActivationTrampoline;
static sqInt ceTraceLinkedSendTrampoline;
static sqInt ceTraceStoreTrampoline;
usqIntptr_t (*ceTryLockVMOwner)(void);
void (*ceUnlockVMOwner)(void);
sqInt cFramePointerInUse;
static sqInt checkedEntryAlignment;
static sqInt closedPICSize;
sqInt cmEntryOffset;
sqInt cmNoCheckEntryOffset;
static sqInt codeBase;
static sqInt codeModified;
static sqInt cogConstituentIndex;
static sqInt compactionInProgress;
static sqInt compilationPass;
static sqInt compilationTrace;
static sqInt cPICCaseSize;
static sqInt cPICEndOfCodeOffset;
static sqInt cPICEndSize;
static sqInt cPICPrototype;
static sqInt currentCallCleanUpSize;
static sqInt deadCode;
static sqInt debugBytecodePointers;
static sqInt debugFixupBreaks;
static sqInt debugOpcodeIndices;
usqIntptr_t debugPrimCallStackOffset;
static sqInt debugStackPointers;
static sqInt directedSendUsesBinding;
static sqInt directedSuperBindingSendTrampolines[NumSendTrampolines];
static sqInt directedSuperSendTrampolines[NumSendTrampolines];
static sqInt disassemblingMethod;
static AbstractInstruction * endCPICCase0;
static sqInt endPC;
static AbstractInstruction * entry;
static sqInt entryPointMask;
static CogMethod * enumeratingCogMethod;
static sqInt expectedFPAlignment;
static sqInt expectedSPAlignment;
static sqInt extA;
static sqInt extB;
static sqInt externalPrimCallOffsets[MaxNumArgs + 1];
static sqInt externalPrimJumpOffsets[MaxNumArgs + 1];
static sqInt externalSetPrimOffsets[MaxNumArgs + 1];
static sqInt firstCPICCaseOffset;
static sqInt firstSend;
static BytecodeFixup * fixups;
static AbstractInstruction * fullBlockEntry;
static AbstractInstruction * fullBlockNoContextSwitchEntry;
static BytecodeDescriptor generatorTable[512] = {
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushReceiverBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushConstantTrueBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushConstantFalseBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushConstantNilBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushQuickIntegerConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushQuickIntegerConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushQuickIntegerConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushQuickIntegerConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genReturnReceiver, 0, needsFrameIfInBlock, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnTrue, 0, needsFrameIfInBlock, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnFalse, 0, needsFrameIfInBlock, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnNil, 0, needsFrameIfInBlock, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnTopFromMethod, 0, needsFrameIfInBlock, -1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnTopFromBlock, 0, needsFrameNever, -1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ extendedPushBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ extendedStoreBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 0, 0 },
	{ extendedStoreAndPopBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 0, 0 },
	{ genExtendedSendBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ doubleExtendedDoAnythingBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genExtendedSuperBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0 },
	{ genSecondExtendedSendBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genPopStackBytecode, 0, needsFrameNever, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ duplicateTopBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushActiveContextBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushNewArrayBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genCallPrimitiveBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushClosureCopyCopiedValuesBytecode, v3BlockCodeSize, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongUnconditionalBackwardJump, v3LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongUnconditionalBackwardJump, v3LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongUnconditionalBackwardJump, v3LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongUnconditionalBackwardJump, v3LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongUnconditionalForwardJump, v3LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genLongUnconditionalForwardJump, v3LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genLongUnconditionalForwardJump, v3LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genLongUnconditionalForwardJump, v3LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genLongJumpIfTrue, v3LongForwardBranchDistance, 0, 0, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongJumpIfTrue, v3LongForwardBranchDistance, 0, 0, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongJumpIfTrue, v3LongForwardBranchDistance, 0, 0, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongJumpIfTrue, v3LongForwardBranchDistance, 0, 0, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongJumpIfFalse, v3LongForwardBranchDistance, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongJumpIfFalse, v3LongForwardBranchDistance, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongJumpIfFalse, v3LongForwardBranchDistance, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genLongJumpIfFalse, v3LongForwardBranchDistance, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorArithmetic, 0, 0, 0, AddRR, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorArithmetic, 0, 0, 0, SubRR, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpLess, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpGreater, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpLessOrEqual, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpGreaterOrEqual, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpZero, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpNonZero, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorArithmetic, 0, 0, 0, AndRR, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorArithmetic, 0, 0, 0, OrRR, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorEqualsEquals, 0, needsFrameNever, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorClass, 0, needsFrameIfStackGreaterThanOne, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorNotEqualsEquals, 0, needsFrameNever, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushReceiverVariableBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralVariable16CasesBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushLiteralConstantBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushTemporaryVariableBytecode, 0, needsFrameIfMod16GENumArgs, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushReceiverBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushConstantTrueBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushConstantFalseBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushConstantNilBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushConstantZeroBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPushConstantOneBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genExtPushPseudoVariable, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ duplicateTopBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ genReturnReceiver, 0, needsFrameIfInBlock, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnTrue, 0, needsFrameIfInBlock, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnFalse, 0, needsFrameIfInBlock, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnNil, 0, needsFrameIfInBlock, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnTopFromMethod, 0, needsFrameIfInBlock, -1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 },
	{ genReturnNilFromBlock, 0, needsFrameNever, -1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
	{ genReturnTopFromBlock, 0, needsFrameNever, -1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
	{ genExtNopBytecode, 0, needsFrameNever, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorArithmetic, 0, 0, 0, AddRR, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorArithmetic, 0, 0, 0, SubRR, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpLess, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpGreater, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpLessOrEqual, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpGreaterOrEqual, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpZero, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorComparison, 0, 0, 0, JumpNonZero, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorArithmetic, 0, 0, 0, AndRR, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorArithmetic, 0, 0, 0, OrRR, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorEqualsEquals, 0, needsFrameNever, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorClass, 0, needsFrameIfStackGreaterThanOne, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorNotEqualsEquals, 0, needsFrameNever, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSpecialSelectorSend, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector0ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector1ArgBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genSendLiteralSelector2ArgsBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortUnconditionalJump, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genShortJumpIfTrue, v3ShortForwardBranchDistance, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfTrue, v3ShortForwardBranchDistance, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfTrue, v3ShortForwardBranchDistance, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfTrue, v3ShortForwardBranchDistance, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfTrue, v3ShortForwardBranchDistance, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfTrue, v3ShortForwardBranchDistance, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfTrue, v3ShortForwardBranchDistance, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfTrue, v3ShortForwardBranchDistance, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genShortJumpIfFalse, v3ShortForwardBranchDistance, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopReceiverVariableBytecode, 0, needsFrameIfImmutability, -1, 0, 1, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 1, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genPopStackBytecode, 0, needsFrameNever, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genUnconditionalTrapBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ extABytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ extBBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ genExtPushReceiverVariableBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
	{ genExtPushLiteralVariableBytecode, 0, needsFrameNever, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genExtPushLiteralBytecode, 0, needsFrameNever, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genLongPushTemporaryVariableBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ genPushNewArrayBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genExtPushIntegerBytecode, 0, needsFrameNever, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genExtPushCharacterBytecode, 0, needsFrameNever, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genExtSendBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genExtSendSuperBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genCallMappedInlinedPrimitive, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 },
	{ genExtUnconditionalJump, v4LongBranchDistance, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genExtJumpIfTrue, v4LongBranchDistance, 0, 0, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genExtJumpIfFalse, v4LongBranchDistance, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
	{ genExtStoreAndPopReceiverVariableBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 0, 0 },
	{ genExtStoreAndPopLiteralVariableBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 0, 0, 0 },
	{ genLongStoreAndPopTemporaryVariableBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genExtStoreReceiverVariableBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 1, 0, 0 },
	{ genExtStoreLiteralVariableBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, IMMUTABILITY, 0, 0, 0, 0, 0 },
	{ genLongStoreTemporaryVariableBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ genCallPrimitiveBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
	{ genExtPushFullClosureBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genExtPushClosureBytecode, v4BlockCodeSize, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
	{ genPushRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ genStoreAndPopRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
	{ unknownBytecode, 0, 0, 0, Nop, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }
};
static sqInt guardPageSize;
static sqInt hasNativeFrame;
static sqInt hasYoungReferent;
static sqInt inBlock;
static sqInt initialPC;
static sqInt introspectionData;
static sqInt introspectionDataIndex;
static int labelCounter;
static sqInt lastSend;
static usqInt limitAddress;
static sqInt maxLitIndex;
static sqInt methodAbortTrampolines[4];
static sqInt methodBytesFreedSinceLastCompaction;
static sqInt methodCount;
static sqInt methodHeader;
static AbstractInstruction * const methodLabel = &aMethodLabel;
static sqInt methodObj;
static sqInt methodOrBlockNumArgs;
static sqInt methodOrBlockNumTemps;
static sqInt methodZoneBase;
static usqIntptr_t minValidCallAddress;
sqInt missOffset;
static usqInt mzFreeStart;
static sqInt needsFrame;
static AbstractInstruction * noCheckEntry;
static sqInt numAbstractOpcodes;
static sqInt numExtB;
static usqInt objectReferencesInRuntime[NumObjRefsInRuntime+1];
static sqInt opcodeIndex;
static CogMethod *openPICList = 0;
static sqInt openPICSize;
static sqInt ordinarySendTrampolines[NumSendTrampolines];
static sqInt picAbortTrampolines[4];
static AbstractInstruction * picInterpretAbort;
static sqInt picMissTrampolines[4];
static AbstractInstruction * picMNUAbort;
static void (*postCompileHook)(CogMethod *);
static BytecodeDescriptor * prevBCDescriptor;
static AbstractInstruction * primInvokeInstruction;
static sqInt primitiveIndex;
static AbstractInstruction * primSetFunctionLabel;
void (*realCECallCogCodePopReceiverAndClassRegs)(void);
void (*realCECallCogCodePopReceiverArg0Regs)(void);
void (*realCECallCogCodePopReceiverArg1Arg0Regs)(void);
void (*realCECallCogCodePopReceiverReg)(void);
void (*realCEEnterCogCodePopReceiverReg)(void);
static sqInt receiverTags;
static sqInt regArgsHaveBeenPushed;
static sqInt runtimeObjectRefIndex;
static AbstractInstruction * sendMiss;
static sqInt simNativeSpillBase;
static sqInt simNativeStack;
static sqInt simNativeStackPtr;
static sqInt simNativeStackSize;
static sqInt simSpillBase;
static SimStackEntry simStack[70];
static sqInt simStackPtr;
static AbstractInstruction * stackCheckLabel;
static AbstractInstruction * stackOverflowCall;
static sqInt superSendTrampolines[NumSendTrampolines];
static sqInt tempOop;
int traceFlags = 8 /* prim trace log on by default */;
sqInt traceStores;
static char *trampolineAddresses[NumTrampolines*2];
static sqInt trampolineTableIndex;
static sqInt uncheckedEntryAlignment;
static usqInt unpairedMethodList;
static sqInt useTwoPaths;
static usqInt youngReferrers;


/*** Macros ***/
#define cPICNumCases stackCheckOffset
#define cPICNumCasesHack hack hack hack i.e. the getter macro does all the work
#define flushICacheFromto(me,startAddress,endAddress) 0
#define unalignedLongAt(byteAddress) longAt(byteAddress)
#define unalignedLongAtput(byteAddress,aWord) longAtput(byteAddress,aWord)
#define abstractInstructionAt(index) (&abstractOpcodes[index])
#define allocateBlockStarts(numBlocks) do { \
		blockStarts = (numBlocks) ? alloca(sizeof(BlockStart) * (numBlocks)) : 0; \
} while (0)
#define backEnd() backEnd
#define blockAlignment() 8
#define blockStartAt(index) (&blockStarts[index])
#define breakOnImplicitReceiver() (traceFlags & 64)
#define ceBaseFrameReturnPC() ceBaseFrameReturnTrampoline
#define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline)
#define ceCheckFeatures() ceCheckFeaturesFunction()
#define ceReturnToInterpreterPC() ((usqInt)ceReturnToInterpreterTrampoline)
#define cFramePointerAddress() ((usqIntptr_t)&CFramePointer)
#define compileSendTrace() ((traceFlags & 258) == 258)
#define cr() putchar('\n')
#define cStackPointerAddress() ((usqIntptr_t)&CStackPointer)
#define entryOffset() cmEntryOffset
#define generatorAt(index) (&generatorTable[index])
#define getCFramePointer() CFramePointer
#define getCStackPointer() CStackPointer
#define getIsObjectReference() 2
#define halt() warning("halt")
#define haltmsg(msg) warning("halt: " msg)
#define interpretOffset() missOffset
#define maxCogCodeSize() (16*1024*1024)
#define maybeBreakGeneratingAt(address) 0
#define maybeHaltIfDebugPC() 0
#define methodLabel() methodLabel
#define methodZoneBase() methodZoneBase
#define minCallAddress() minValidCallAddress
#define noCheckEntryOffset() cmNoCheckEntryOffset
#define noContextSwitchBlockEntryOffset() blockNoContextSwitchOffset
#define notYetImplemented() warning("not yet implemented")
#define printNum(n) printf("%" PRIdSQINT, (sqInt) (n))
#define printOnTrace() (traceFlags & 1)
#define print(aString) printf("%s", aString)
#define recordBlockTrace() (traceFlags & 4)
#define recordEventTrace() (traceFlags & 16)
#define recordOverflowTrace() (traceFlags & 32)
#define recordPrimTrace() (traceFlags & 8)
#define recordSendTrace() (traceFlags & 2)
#define reportError(n) warning("compilation error")
#define setCFramePointer(theFP) (CFramePointer = (void *)(theFP))
#define setCStackPointer(theSP) (CStackPointer = (void *)(theSP))
#define tryLockVMOwner() (ceTryLockVMOwner() != 0)
#define unlockVMOwner() ceUnlockVMOwner()
#define nextOpenPIC methodObject
#define nextOpenPICHack hack hack hack i.e. the getter macro does all the work
#define freeStart() mzFreeStart
#define limitZony() ((CogMethod *)mzFreeStart)
#define methodBytesFreedSinceLastCompaction() methodBytesFreedSinceLastCompaction
#define roundUpLength(numBytes) ((numBytes) + 7 & -8)
#define youngReferrers() youngReferrers
#define maybeConstant(sse) ((sse)->constant)
#define fullBlockEntryOffset() cbEntryOffset
#define fullBlockNoContextSwitchEntryOffset() cbNoSwitchEntryOffset
#define fixupAtIndex(index) (&fixups[index])
#define simNativeStackAt(index) (simNativeStack + (index))
#define simSelf() simStack
#define simStackAt(index) (simStack + (index))
#define traceDescriptor(ign) 0
#define traceFixupmerge(igu,ana) 0
#define traceMerge(ign) 0
#define traceSimStack() 0
#define traceSpill(ign) 0
#define allocatype(numElements, elementType) alloca((numElements)*sizeof(elementType))
#define numElementsIn(anArray) (sizeof(anArray)/sizeof(anArray[0]))
#define oopisGreaterThanOrEqualTo(anOop,otherOop) ((usqInt)(anOop) >= (usqInt)(otherOop))
#define oopisGreaterThanOrEqualToandLessThanOrEqualTo(anOop,baseOop,limitOop) ((usqInt)(anOop) >= (usqInt)(baseOop) && (usqInt)(anOop) <= (usqInt)(limitOop))
#define oopisGreaterThanOrEqualToandLessThan(anOop,baseOop,limitOop) ((usqInt)(anOop) >= (usqInt)(baseOop) && (usqInt)(anOop) < (usqInt)(limitOop))
#define oopisGreaterThan(anOop,otherOop) ((usqInt)(anOop) > (usqInt)(otherOop))
#define oopisGreaterThanandLessThan(anOop,baseOop,limitOop) ((usqInt)(anOop) > (usqInt)(baseOop) && (usqInt)(anOop) < (usqInt)(limitOop))
#define oopisLessThanOrEqualTo(anOop,otherOop) ((usqInt)(anOop) <= (usqInt)(otherOop))
#define oopisLessThan(anOop,otherOop) ((usqInt)(anOop) < (usqInt)(otherOop))


	/* CogAbstractInstruction>>#addDependent: */
static AbstractInstruction * NoDbgRegParms
addDependent(AbstractInstruction * self_in_addDependent, AbstractInstruction *anInstruction)
{
	if (!(((self_in_addDependent->dependent)) == null)) {
		(anInstruction->dependent = (self_in_addDependent->dependent));
	}
	return ((self_in_addDependent->dependent) = anInstruction);
}


/*	Answer an unused abstract register in the liveRegMask.
	Subclasses with more registers can override to answer them. */

	/* CogAbstractInstruction>>#availableFloatRegisterOrNoneFor: */
static sqInt NoDbgRegParms
availableFloatRegisterOrNoneFor(AbstractInstruction * self_in_availableFloatRegisterOrNoneFor, sqInt liveRegsMask)
{
	if (!(liveRegsMask & (1U << DPFPReg0))) {
		return DPFPReg0;
	}
	if (!(liveRegsMask & (1U << DPFPReg1))) {
		return DPFPReg1;
	}
	if (!(liveRegsMask & (1U << DPFPReg2))) {
		return DPFPReg2;
	}
	if (!(liveRegsMask & (1U << DPFPReg3))) {
		return DPFPReg3;
	}
	if (!(liveRegsMask & (1U << DPFPReg4))) {
		return DPFPReg4;
	}
	if (!(liveRegsMask & (1U << DPFPReg5))) {
		return DPFPReg5;
	}
	if (!(liveRegsMask & (1U << DPFPReg6))) {
		return DPFPReg6;
	}
	if (!(liveRegsMask & (1U << DPFPReg7))) {
		return DPFPReg7;
	}
	return NoReg;
}


/*	Answer an unused abstract register in the liveRegMask.
	Subclasses with more registers can override to answer them.
	N.B. Do /not/ allocate TempReg. */

	/* CogAbstractInstruction>>#availableRegisterOrNoneFor: */
static sqInt NoDbgRegParms
availableRegisterOrNoneFor(AbstractInstruction * self_in_availableRegisterOrNoneFor, sqInt liveRegsMask)
{
	if (!(liveRegsMask & (1U << Arg1Reg))) {
		return Arg1Reg;
	}
	if (!(liveRegsMask & (1U << Arg0Reg))) {
		return Arg0Reg;
	}
	if (!(liveRegsMask & (1U << SendNumArgsReg))) {
		return SendNumArgsReg;
	}
	if (!(liveRegsMask & (1U << ClassReg))) {
		return ClassReg;
	}
	if (!(liveRegsMask & (1U << ReceiverResultReg))) {
		return ReceiverResultReg;
	}
	return NoReg;
}


/*	For out-of-line literal support, clone a literal from a literal. */

	/* CogAbstractInstruction>>#cloneLiteralFrom: */
static AbstractInstruction * NoDbgRegParms
cloneLiteralFrom(AbstractInstruction * self_in_cloneLiteralFrom, AbstractInstruction *existingLiteral)
{
	assert((((existingLiteral->opcode)) == Literal)
	 && ((((self_in_cloneLiteralFrom->dependent)) == null)
	 && (((self_in_cloneLiteralFrom->address)) == null)));
	(self_in_cloneLiteralFrom->opcode) = Literal;
	(self_in_cloneLiteralFrom->annotation) = (existingLiteral->annotation);
	((self_in_cloneLiteralFrom->operands))[0] = (((existingLiteral->operands))[0]);
	((self_in_cloneLiteralFrom->operands))[1] = (((existingLiteral->operands))[1]);
	((self_in_cloneLiteralFrom->operands))[2] = (((existingLiteral->operands))[2]);
	return self_in_cloneLiteralFrom;
}


/*	Generate concrete machine code for the instruction at actualAddress,
	setting machineCodeSize, and answer the following address. */

	/* CogAbstractInstruction>>#concretizeAt: */
static sqInt NoDbgRegParms
concretizeAt(AbstractInstruction * self_in_concretizeAt, sqInt actualAddress)
{
	(self_in_concretizeAt->address) = actualAddress;
	dispatchConcretize(self_in_concretizeAt);
	assert((((self_in_concretizeAt->maxSize)) == null)
	 || (((self_in_concretizeAt->maxSize)) >= ((self_in_concretizeAt->machineCodeSize))));
	return actualAddress + ((self_in_concretizeAt->machineCodeSize));
}

	/* CogAbstractInstruction>>#genWriteCResultIntoReg: */
static AbstractInstruction * NoDbgRegParms
genWriteCResultIntoReg(AbstractInstruction * self_in_genWriteCResultIntoReg, sqInt abstractRegister)
{
    sqInt cResultReg;

	cResultReg = EAX;
	if (abstractRegister != cResultReg) {
		genoperandoperand(MoveRR, cResultReg, abstractRegister);
	}
	return self_in_genWriteCResultIntoReg;
}


/*	For out-of-line literal support, initialize a sharable literal. */

	/* CogAbstractInstruction>>#initializeSharableLiteral: */
static AbstractInstruction * NoDbgRegParms
initializeSharableLiteral(AbstractInstruction * self_in_initializeSharableLiteral, sqInt literal)
{
	(self_in_initializeSharableLiteral->opcode) = Literal;

	/* separate := nil for Slang */
	(self_in_initializeSharableLiteral->annotation) = null;
	(self_in_initializeSharableLiteral->address) = null;
	(self_in_initializeSharableLiteral->dependent) = null;
	((self_in_initializeSharableLiteral->operands))[0] = literal;
	((self_in_initializeSharableLiteral->operands))[1] = 1;
	((self_in_initializeSharableLiteral->operands))[2] = -1;
	return self_in_initializeSharableLiteral;
}


/*	For out-of-line literal support, initialize an unsharable literal. */

	/* CogAbstractInstruction>>#initializeUniqueLiteral: */
static AbstractInstruction * NoDbgRegParms
initializeUniqueLiteral(AbstractInstruction * self_in_initializeUniqueLiteral, sqInt literal)
{
	(self_in_initializeUniqueLiteral->opcode) = Literal;

	/* separate := nil for Slang */
	(self_in_initializeUniqueLiteral->annotation) = null;
	(self_in_initializeUniqueLiteral->address) = null;
	(self_in_initializeUniqueLiteral->dependent) = null;
	((self_in_initializeUniqueLiteral->operands))[0] = literal;
	((self_in_initializeUniqueLiteral->operands))[1] = 0;
	((self_in_initializeUniqueLiteral->operands))[2] = -1;
	return self_in_initializeUniqueLiteral;
}

	/* CogAbstractInstruction>>#isJump */
static sqInt NoDbgRegParms
isJump(AbstractInstruction * self_in_isJump)
{
	return ((((self_in_isJump->opcode)) >= FirstJump) && (((self_in_isJump->opcode)) <= LastJump));
}


/*	Answer if an address can be accessed using the offset in a MoveMw:r:R: or
	similar instruction.
	We assume this is true for 32-bit processors and expect 64-bit processors
	to answer false
	for values in the interpreter or the object memory. */

	/* CogAbstractInstruction>>#isWithinMwOffsetRange: */
static sqInt NoDbgRegParms
isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress)
{
	return 1;
}


/*	We assume here that calls and jumps look the same as regards their
	displacement. This works on at least x86, ARM and x86_64. Processors on
	which that isn't the
	case can override as necessary. */

	/* CogAbstractInstruction>>#relocateJumpLongBeforeFollowingAddress:by: */
static AbstractInstruction * NoDbgRegParms
relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta)
{
	relocateCallBeforeReturnPCby(self_in_relocateJumpLongBeforeFollowingAddressby, pc, delta);
	return self_in_relocateJumpLongBeforeFollowingAddressby;
}


/*	Relocate a long conditional jump before pc. Default to relocating a
	non-conditional jump.
	Processors that have different formats for conditional and unconditional
	jumps override. */

	/* CogAbstractInstruction>>#relocateJumpLongConditionalBeforeFollowingAddress:by: */
static AbstractInstruction * NoDbgRegParms
relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongConditionalBeforeFollowingAddressby, sqInt pc, sqInt delta)
{
	relocateJumpLongBeforeFollowingAddressby(self_in_relocateJumpLongConditionalBeforeFollowingAddressby, pc, delta);
	return self_in_relocateJumpLongConditionalBeforeFollowingAddressby;
}

	/* CogAbstractInstruction>>#resolveJumpTarget */
static AbstractInstruction * NoDbgRegParms
resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget)
{
    BytecodeFixup *fixup;

	assert(isJump(self_in_resolveJumpTarget));
	fixup = ((BytecodeFixup *) (((self_in_resolveJumpTarget->operands))[0]));
	if (addressIsInFixups(fixup)) {
		assert(addressIsInInstructions((fixup->targetInstruction)));
		jmpTarget(self_in_resolveJumpTarget, (fixup->targetInstruction));
	}
	return self_in_resolveJumpTarget;
}


/*	Rewrite a CallFull instruction to call a different target. This variant is
	used to rewrite cached primitive calls.
	Answer the extent of the code change which is used to compute the range of
	the icache to flush.
	This defaults to rewriteCallAt:target:; processors that differentiate
	between Call and CallFull will override. */

	/* CogAbstractInstruction>>#rewriteCallFullAt:target: */
static sqInt NoDbgRegParms
rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress)
{
	return rewriteCallAttarget(self_in_rewriteCallFullAttarget, callSiteReturnAddress, callTargetAddress);
}


/*	Rewrite a conditional jump long to jump to target. This version defaults
	to using
	rewriteJumpLongAt:, which works for many ISAs. Subclasses override if
	necessary.  */

	/* CogAbstractInstruction>>#rewriteConditionalJumpLongAt:target: */
static sqInt NoDbgRegParms
rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditionalJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress)
{
	return rewriteJumpLongAttarget(self_in_rewriteConditionalJumpLongAttarget, callSiteReturnAddress, callTargetAddress);
}


/*	Rewrite a JumpFull instruction to jump to a different target. This variant
	is used to rewrite cached primitive calls.
	Answer the extent of the code change which is used to compute the range of
	the icache to flush.
	This defaults to rewriteJumpLongAt:target:; processors that differentiate
	between Jump and JumpFull will override. */

	/* CogAbstractInstruction>>#rewriteJumpFullAt:target: */
static sqInt NoDbgRegParms
rewriteJumpFullAttarget(AbstractInstruction * self_in_rewriteJumpFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress)
{
	return rewriteJumpLongAttarget(self_in_rewriteJumpFullAttarget, callSiteReturnAddress, callTargetAddress);
}


/*	A hack hook to allow ARM to override the simulated address for the
	short-cut trampolines,
	and to allow x64 to address CStackPointer and CFramePointer relative to
	VarBaseReg. 
 */

	/* CogAbstractInstruction>>#wantsNearAddressFor: */
static sqInt NoDbgRegParms
wantsNearAddressFor(AbstractInstruction * self_in_wantsNearAddressFor, sqInt anObject)
{
	return 0;
}

	/* CogBlockMethod>>#cmHomeMethod */
static CogMethod * NoDbgRegParms
cmHomeMethod(CogBlockMethod * self_in_cmHomeMethod)
{
	return ((self_in_cmHomeMethod->cpicHasMNUCaseOrCMIsFullBlock)
		? ((CogMethod *) self_in_cmHomeMethod)
		: ((CogMethod *) ((((usqInt)self_in_cmHomeMethod)) - ((self_in_cmHomeMethod->homeOffset)))));
}

	/* CogBytecodeDescriptor>>#isBranch */
static sqInt NoDbgRegParms
isBranch(BytecodeDescriptor * self_in_isBranch)
{
	return (((self_in_isBranch->spanFunction)) != null)
	 && (!((self_in_isBranch->isBlockCreation)));
}


/*	Answer the address the call immediately preceding callSiteReturnAddress
	will jump to.
 */

	/* CogIA32Compiler>>#callFullTargetFromReturnAddress: */
static sqInt NoDbgRegParms
callFullTargetFromReturnAddress(AbstractInstruction * self_in_callFullTargetFromReturnAddress, sqInt callSiteReturnAddress)
{
	return callTargetFromReturnAddress(self_in_callFullTargetFromReturnAddress, callSiteReturnAddress);
}

	/* CogIA32Compiler>>#callInstructionByteSize */
static sqInt NoDbgRegParms
callInstructionByteSize(AbstractInstruction * self_in_callInstructionByteSize)
{
	return 5;
}


/*	Answer the address the call immediately preceding callSiteReturnAddress
	will jump to.
 */

	/* CogIA32Compiler>>#callTargetFromReturnAddress: */
static sqInt NoDbgRegParms
callTargetFromReturnAddress(AbstractInstruction * self_in_callTargetFromReturnAddress, sqInt callSiteReturnAddress)
{
    sqInt callDistance;

	callDistance = literalBeforeFollowingAddress(self_in_callTargetFromReturnAddress, callSiteReturnAddress);
	return callSiteReturnAddress + (((int) callDistance));
}

	/* CogIA32Compiler>>#cFloatResultToRd: */
static AbstractInstruction * NoDbgRegParms
cFloatResultToRd(AbstractInstruction * self_in_cFloatResultToRd, sqInt reg)
{
    AbstractInstruction *anInstruction;

	genoperandoperand(FSTPD, -8, SPReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveM64rRd, -8, SPReg, reg);
	return self_in_cFloatResultToRd;
}

	/* CogIA32Compiler>>#cFloatResultToRs: */
static AbstractInstruction * NoDbgRegParms
cFloatResultToRs(AbstractInstruction * self_in_cFloatResultToRs, sqInt reg)
{
    AbstractInstruction *anInstruction;

	genoperandoperand(FSTPS, -4, SPReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveM32rRs, -4, SPReg, reg);
	return self_in_cFloatResultToRs;
}

	/* CogIA32Compiler>>#cmpC32RTempByteSize */
static sqInt NoDbgRegParms
cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize)
{
	return 5;
}


/*	Compute the maximum size for each opcode. This allows jump offsets to
	be determined, provided that all backward branches are long branches. */
/*	N.B. The ^N forms are to get around the bytecode compiler's long branch
	limits which are exceeded when each case jumps around the otherwise. */

	/* CogIA32Compiler>>#computeMaximumSize */
static sqInt NoDbgRegParms
computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize)
{
	
	switch ((self_in_computeMaximumSize->opcode)) {
	case Label:
		return 0;

	case AlignmentNops:
		return (((self_in_computeMaximumSize->operands))[0]) - 1;

	case Fill32:
	case AddRdRd:
	case CmpRdRd:
	case SubRdRd:
	case MulRdRd:
	case DivRdRd:
	case SqrtRd:
	case XorRdRd:
	case AddRsRs:
	case SubRsRs:
	case MulRsRs:
	case DivRsRs:
	case SqrtRs:
	case MoveRdRd:
	case MoveRsRs:
	case ConvertRRd:
	case ConvertRdR:
	case ConvertRsRd:
	case ConvertRdRs:
	case ConvertRsR:
	case ConvertRRs:
		return 4;

	case Nop:
	case REP:
	case CLD:
	case MOVSB:
	case MOVSD:
	case CDQ:
	case LOCK:
	case Stop:
	case PopR:
	case PushR:
		return 1;

	case IDIVR:
	case CPUID:
	case CallR:
	case JumpR:
	case AddRR:
	case AndRR:
	case CmpRR:
	case OrRR:
	case XorRR:
	case SubRR:
	case NegateR:
	case NotR:
	case MoveRR:
		return 2;

	case IMULRR:
	case LFENCE:
	case MFENCE:
	case SFENCE:
	case CmpRsRs:
	case XorRsRs:
	case SignExtend8RR:
	case SignExtend16RR:
	case ZeroExtend8RR:
	case ZeroExtend16RR:
		return 3;

	case CMPXCHGAwR:
	case FSTPS:
	case FSTPD:
	case MoveAbR:
		return 7;

	case CMPXCHGMwrR:
	case MoveMbrR:
	case MoveM8rR:
	case MoveM16rR:
		return ((((self_in_computeMaximumSize->operands))[1]) == ESP
			? (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
					? 5
					: 8)
			: (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
					? 4
					: 7));

	case XCHGAwR:
		return 6;

	case XCHGMwrR:
		return ((((self_in_computeMaximumSize->operands))[1]) == ESP
			? (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
					? 4
					: 7)
			: (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
					? 3
					: 6));

	case XCHGRR:
		return (((((self_in_computeMaximumSize->operands))[0]) == EAX)
		 || ((((self_in_computeMaximumSize->operands))[1]) == EAX)
			? 1
			: 2);

	case CallFull:
	case Call:
	case MoveCwR:
	case PushCw:
		return 5;

	case JumpFull:
	case JumpLong:
	case Jump:
		resolveJumpTarget(self_in_computeMaximumSize);
		return 5;

	case JumpZero:
	case JumpNonZero:
	case JumpNegative:
	case JumpNonNegative:
	case JumpOverflow:
	case JumpNoOverflow:
	case JumpCarry:
	case JumpNoCarry:
	case JumpLess:
	case JumpGreaterOrEqual:
	case JumpGreater:
	case JumpLessOrEqual:
	case JumpBelow:
	case JumpAboveOrEqual:
	case JumpAbove:
	case JumpBelowOrEqual:
	case JumpLongZero:
	case JumpLongNonZero:
	case JumpFPEqual:
	case JumpFPNotEqual:
	case JumpFPLess:
	case JumpFPGreaterOrEqual:
	case JumpFPGreater:
	case JumpFPLessOrEqual:
	case JumpFPOrdered:
	case JumpFPUnordered:
		resolveJumpTarget(self_in_computeMaximumSize);
		return 6;

	case RetN:
		return ((((self_in_computeMaximumSize->operands))[0]) == 0
			? 1
			: 3);

	case AddCqR:
	case AddcCqR:
	case AndCqR:
	case CmpCqR:
	case OrCqR:
	case SubCqR:
		return (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
			? 3
			: ((((self_in_computeMaximumSize->operands))[1]) == EAX
					? 5
					: 6));

	case TstCqR:
		return ((isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0]))
		 && ((((self_in_computeMaximumSize->operands))[1]) < 4)
			? 3
			: ((((self_in_computeMaximumSize->operands))[1]) == EAX
					? 5
					: 6));

	case AddCwR:
	case AndCwR:
	case CmpCwR:
	case OrCwR:
	case SubCwR:
	case XorCwR:
	case MoveAwR:
		return ((((self_in_computeMaximumSize->operands))[1]) == EAX
			? 5
			: 6);

	case LoadEffectiveAddressMwrR:
		return ((isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
	? 3
	: 6)) + (((((self_in_computeMaximumSize->operands))[1]) == ESP
	? 1
	: 0));

	case LogicalShiftLeftCqR:
	case LogicalShiftRightCqR:
	case ArithmeticShiftRightCqR:
		return ((((self_in_computeMaximumSize->operands))[0]) == 1
			? 2
			: 3);

	case LogicalShiftLeftRR:
	case LogicalShiftRightRR:
	case ArithmeticShiftRightRR:
		return computeShiftRRSize(self_in_computeMaximumSize);

	case MoveCqR:
		return ((((self_in_computeMaximumSize->operands))[0]) == 0
			? 2
			: 5);

	case MoveRAw:
	case MoveRAb:
		return ((((self_in_computeMaximumSize->operands))[0]) == EAX
			? 5
			: 6);

	case MoveRM32r:
	case MoveRMwr:
		return ((isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[1])
	? (((((self_in_computeMaximumSize->operands))[1]) == 0)
		 && ((((self_in_computeMaximumSize->operands))[2]) != EBP)
			? 2
			: 3)
	: 6)) + (((((self_in_computeMaximumSize->operands))[2]) == ESP
	? 1
	: 0));

	case MoveRdM64r:
	case MoveRsM32r:
		return ((isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[1])
	? 5
	: 8)) + (((((self_in_computeMaximumSize->operands))[2]) == ESP
	? 1
	: 0));

	case MoveRMbr:
	case MoveRM8r:
		return ((((self_in_computeMaximumSize->operands))[2]) == ESP
			? 7
			: (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[1])
					? 3
					: 6));

	case MoveRM16r:
		return ((((self_in_computeMaximumSize->operands))[2]) == ESP
			? 8
			: (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[1])
					? 4
					: 7));

	case MoveM64rRd:
	case MoveM32rRs:
		return ((isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
	? 5
	: 8)) + (((((self_in_computeMaximumSize->operands))[1]) == ESP
	? 1
	: 0));

	case MoveM32rR:
	case MoveMwrR:
		return ((isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
	? (((((self_in_computeMaximumSize->operands))[0]) == 0)
		 && ((((self_in_computeMaximumSize->operands))[1]) != EBP)
			? 2
			: 3)
	: 6)) + (((((self_in_computeMaximumSize->operands))[1]) == ESP
	? 1
	: 0));

	case MoveXbrRR:
		assert((((self_in_computeMaximumSize->operands))[0]) != ESP);
		return ((((self_in_computeMaximumSize->operands))[1]) == EBP
			? 5
			: 4);

	case MoveRXbrR:
		assert((((self_in_computeMaximumSize->operands))[1]) != ESP);
		return (((((self_in_computeMaximumSize->operands))[2]) == EBP
	? 4
	: 3)) + (((((self_in_computeMaximumSize->operands))[0]) >= 4
	? 2
	: 0));

	case MoveXwrRR:
		assert((((self_in_computeMaximumSize->operands))[0]) != ESP);
		return ((((self_in_computeMaximumSize->operands))[1]) == EBP
			? 4
			: 3);

	case MoveRXwrR:
		assert((((self_in_computeMaximumSize->operands))[1]) != ESP);
		return ((((self_in_computeMaximumSize->operands))[2]) == EBP
			? 4
			: 3);

	case PushCq:
		return (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
			? 2
			: 5);

	case PrefetchAw:
		return (hasSSEInstructions(self_in_computeMaximumSize)
			? 7
			: 0);

	default:
		error("Case not found and no otherwise clause");
	}
	return 0;
}


/*	On the x86 the only instructions that shift by the value of a
	register require the shift count to be in %ecx. So we may
	have to use swap instructions to get the count into ecx. */

	/* CogIA32Compiler>>#computeShiftRRSize */
static sqInt NoDbgRegParms
computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize)
{
    usqInt shiftCountReg;

	shiftCountReg = ((self_in_computeShiftRRSize->operands))[0];
	return (shiftCountReg == ECX
		? 2
		: (shiftCountReg == EAX
				? (1 + 2) + 1
				: (2 + 2) + 2));
}

	/* CogIA32Compiler>>#concretizeFill32 */
static usqInt NoDbgRegParms
concretizeFill32(AbstractInstruction * self_in_concretizeFill32)
{
    usqIntptr_t word;

	word = ((self_in_concretizeFill32->operands))[0];
	((self_in_concretizeFill32->machineCode))[0] = (word & 0xFF);
	((self_in_concretizeFill32->machineCode))[1] = ((((usqInt) word) >> 8) & 0xFF);
	((self_in_concretizeFill32->machineCode))[2] = ((((usqInt) word) >> 16) & 0xFF);
	((self_in_concretizeFill32->machineCode))[3] = ((((usqInt) word) >> 24) & 0xFF);
	return ((self_in_concretizeFill32->machineCodeSize) = 4);
}

	/* CogIA32Compiler>>#concretizeOpRR: */
static usqInt NoDbgRegParms
concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode)
{
    usqInt regLHS;
    usqInt regRHS;

	regLHS = ((self_in_concretizeOpRR->operands))[0];
	regRHS = ((self_in_concretizeOpRR->operands))[1];
	((self_in_concretizeOpRR->machineCode))[0] = x86opcode;
	((self_in_concretizeOpRR->machineCode))[1] = (modRMRO(self_in_concretizeOpRR, ModReg, regLHS, regRHS));
	return ((self_in_concretizeOpRR->machineCodeSize) = 2);
}

	/* CogIA32Compiler>>#concretizeReverseOpRR: */
static usqInt NoDbgRegParms
concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode)
{
    usqInt regLHS;
    usqInt regRHS;

	regRHS = ((self_in_concretizeReverseOpRR->operands))[0];
	regLHS = ((self_in_concretizeReverseOpRR->operands))[1];
	((self_in_concretizeReverseOpRR->machineCode))[0] = x86opcode;
	((self_in_concretizeReverseOpRR->machineCode))[1] = (modRMRO(self_in_concretizeReverseOpRR, ModReg, regLHS, regRHS));
	return ((self_in_concretizeReverseOpRR->machineCodeSize) = 2);
}


/*	Will get inlined into concretizeAt: switch. */
/*	movzwl */

	/* CogIA32Compiler>>#concretizeZeroExtend16RR */
static usqInt NoDbgRegParms
concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR)
{
    usqInt destReg;
    usqInt srcReg;

	srcReg = ((self_in_concretizeZeroExtend16RR->operands))[0];
	destReg = ((self_in_concretizeZeroExtend16RR->operands))[1];
	((self_in_concretizeZeroExtend16RR->machineCode))[0] = 15;
	((self_in_concretizeZeroExtend16RR->machineCode))[1] = 183;
	((self_in_concretizeZeroExtend16RR->machineCode))[2] = (modRMRO(self_in_concretizeZeroExtend16RR, ModReg, srcReg, destReg));
	return ((self_in_concretizeZeroExtend16RR->machineCodeSize) = 3);
}


/*	Answer the abstract register for the C result register.
	Only partially implemented. Works on x86 since TempReg = EAX = C result
	reg.  */

	/* CogIA32Compiler>>#cResultRegisterHigh */
static sqInt NoDbgRegParms
cResultRegisterHigh(AbstractInstruction * self_in_cResultRegisterHigh)
{
	return EDX;
}


/*	Answer the abstract register for the C result register.
	Only partially implemented. Works on x86 since TempReg = EAX = C result
	reg.  */

	/* CogIA32Compiler>>#cResultRegisterLow */
static sqInt NoDbgRegParms
cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow)
{
	return EAX;
}


/*	Attempt to generate concrete machine code for the instruction at address.
	This is the inner dispatch of concretizeAt: actualAddress which exists
	only to get around the branch size limits in the SqueakV3 (blue book
	derived) bytecode set. */

	/* CogIA32Compiler>>#dispatchConcretize */
static void NoDbgRegParms
dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize)
{
    usqInt addressOperand;
    usqInt addressOperand1;
    usqInt addressOperand2;
    usqInt addressOperand3;
    usqInt addressOperand4;
    usqInt base;
    usqInt base1;
    usqInt base2;
    usqInt base3;
    AbstractInstruction *dependentChain;
    usqInt dest;
    usqInt dest1;
    usqInt destReg;
    usqInt destReg1;
    usqInt destReg10;
    usqInt destReg11;
    usqInt destReg12;
    usqInt destReg13;
    usqInt destReg14;
    usqInt destReg15;
    usqInt destReg16;
    usqInt destReg17;
    usqInt destReg18;
    usqInt destReg19;
    usqInt destReg2;
    usqInt destReg20;
    usqInt destReg21;
    usqInt destReg22;
    usqInt destReg23;
    usqInt destReg24;
    usqInt destReg3;
    usqInt destReg4;
    usqInt destReg5;
    usqInt destReg6;
    usqInt destReg7;
    usqInt destReg8;
    usqInt destReg9;
    sqInt distance;
    sqInt distance1;
    sqInt i;
    usqInt index;
    usqInt index1;
    usqInt index2;
    usqInt index3;
    AbstractInstruction *jumpTarget;
    AbstractInstruction *jumpTarget1;
    AbstractInstruction *jumpTarget10;
    AbstractInstruction *jumpTarget11;
    AbstractInstruction *jumpTarget110;
    AbstractInstruction *jumpTarget111;
    AbstractInstruction *jumpTarget1110;
    AbstractInstruction *jumpTarget1111;
    AbstractInstruction *jumpTarget1112;
    AbstractInstruction *jumpTarget1113;
    AbstractInstruction *jumpTarget1114;
    AbstractInstruction *jumpTarget1115;
    AbstractInstruction *jumpTarget1116;
    AbstractInstruction *jumpTarget112;
    AbstractInstruction *jumpTarget113;
    AbstractInstruction *jumpTarget114;
    AbstractInstruction *jumpTarget115;
    AbstractInstruction *jumpTarget116;
    AbstractInstruction *jumpTarget117;
    AbstractInstruction *jumpTarget118;
    AbstractInstruction *jumpTarget119;
    AbstractInstruction *jumpTarget12;
    AbstractInstruction *jumpTarget120;
    AbstractInstruction *jumpTarget121;
    AbstractInstruction *jumpTarget122;
    AbstractInstruction *jumpTarget123;
    AbstractInstruction *jumpTarget124;
    AbstractInstruction *jumpTarget125;
    AbstractInstruction *jumpTarget13;
    AbstractInstruction *jumpTarget14;
    AbstractInstruction *jumpTarget15;
    AbstractInstruction *jumpTarget16;
    AbstractInstruction *jumpTarget17;
    AbstractInstruction *jumpTarget18;
    AbstractInstruction *jumpTarget19;
    AbstractInstruction *jumpTarget2;
    AbstractInstruction *jumpTarget20;
    AbstractInstruction *jumpTarget21;
    AbstractInstruction *jumpTarget210;
    AbstractInstruction *jumpTarget211;
    AbstractInstruction *jumpTarget212;
    AbstractInstruction *jumpTarget213;
    AbstractInstruction *jumpTarget214;
    AbstractInstruction *jumpTarget215;
    AbstractInstruction *jumpTarget216;
    AbstractInstruction *jumpTarget22;
    AbstractInstruction *jumpTarget23;
    AbstractInstruction *jumpTarget24;
    AbstractInstruction *jumpTarget25;
    AbstractInstruction *jumpTarget26;
    AbstractInstruction *jumpTarget27;
    AbstractInstruction *jumpTarget28;
    AbstractInstruction *jumpTarget29;
    AbstractInstruction *jumpTarget3;
    AbstractInstruction *jumpTarget30;
    AbstractInstruction *jumpTarget31;
    AbstractInstruction *jumpTarget32;
    AbstractInstruction *jumpTarget33;
    AbstractInstruction *jumpTarget34;
    AbstractInstruction *jumpTarget35;
    AbstractInstruction *jumpTarget4;
    AbstractInstruction *jumpTarget5;
    AbstractInstruction *jumpTarget6;
    AbstractInstruction *jumpTarget7;
    AbstractInstruction *jumpTarget8;
    AbstractInstruction *jumpTarget9;
    usqInt mask;
    usqInt mask1;
    usqInt mask2;
    sqInt mcIdx;
    sqInt offset;
    sqInt offset1;
    usqInt offset10;
    usqInt offset11;
    sqInt offset110;
    sqInt offset111;
    sqInt offset112;
    sqInt offset113;
    sqInt offset114;
    sqInt offset115;
    sqInt offset116;
    sqInt offset117;
    sqInt offset118;
    sqInt offset119;
    usqInt offset12;
    sqInt offset120;
    sqInt offset121;
    sqInt offset122;
    sqInt offset123;
    usqInt offset13;
    usqInt offset14;
    usqInt offset15;
    sqInt offset16;
    sqInt offset17;
    sqInt offset18;
    sqInt offset19;
    sqInt offset2;
    sqInt offset20;
    sqInt offset21;
    sqInt offset22;
    sqInt offset23;
    sqInt offset24;
    sqInt offset25;
    sqInt offset26;
    sqInt offset27;
    sqInt offset28;
    sqInt offset29;
    usqInt offset3;
    sqInt offset30;
    sqInt offset31;
    sqInt offset32;
    sqInt offset33;
    usqInt offset4;
    usqInt offset5;
    usqInt offset6;
    usqInt offset7;
    usqInt offset8;
    usqInt offset9;
    usqInt reg;
    usqInt reg1;
    usqInt reg10;
    usqInt reg11;
    usqInt reg12;
    usqInt reg13;
    usqInt reg14;
    usqInt reg15;
    usqInt reg16;
    usqInt reg17;
    usqInt reg18;
    usqInt reg19;
    usqInt reg2;
    usqInt reg20;
    usqInt reg21;
    usqInt reg22;
    usqInt reg23;
    usqInt reg24;
    usqInt reg25;
    usqInt reg26;
    usqInt reg3;
    usqInt reg4;
    usqInt reg5;
    usqInt reg6;
    usqInt reg7;
    usqInt reg8;
    usqInt reg9;
    usqInt regLHS;
    usqInt regLHS1;
    usqInt regLHS10;
    usqInt regLHS11;
    usqInt regLHS12;
    usqInt regLHS13;
    usqInt regLHS2;
    usqInt regLHS3;
    usqInt regLHS4;
    usqInt regLHS5;
    usqInt regLHS6;
    usqInt regLHS7;
    usqInt regLHS8;
    usqInt regLHS9;
    usqInt regRHS;
    usqInt regRHS1;
    usqInt regRHS10;
    usqInt regRHS11;
    usqInt regRHS12;
    usqInt regRHS13;
    usqInt regRHS2;
    usqInt regRHS3;
    usqInt regRHS4;
    usqInt regRHS5;
    usqInt regRHS6;
    usqInt regRHS7;
    usqInt regRHS8;
    usqInt regRHS9;
    sqInt regToShift;
    sqInt regToShift1;
    sqInt shiftCount;
    usqInt shiftCountReg;
    usqInt shiftCountReg1;
    usqInt src;
    usqInt src1;
    usqInt srcReg;
    usqInt srcReg1;
    usqInt srcReg10;
    usqInt srcReg11;
    usqInt srcReg12;
    usqInt srcReg13;
    usqInt srcReg14;
    usqInt srcReg15;
    usqInt srcReg16;
    usqInt srcReg17;
    usqInt srcReg18;
    usqInt srcReg19;
    usqInt srcReg2;
    usqInt srcReg20;
    usqInt srcReg21;
    usqInt srcReg22;
    usqInt srcReg3;
    usqInt srcReg4;
    usqInt srcReg5;
    usqInt srcReg6;
    usqInt srcReg7;
    usqInt srcReg8;
    usqInt srcReg9;
    sqInt swapreg;
    usqInt value;
    usqInt value1;
    usqInt value10;
    usqInt value11;
    usqInt value12;
    usqInt value13;
    usqInt value2;
    usqInt value3;
    usqInt value4;
    usqInt value5;
    usqInt value6;
    usqInt value7;
    usqInt value8;
    usqInt value9;
    usqIntptr_t word;

	if (((self_in_dispatchConcretize->opcode)) >= CDQ) {
		dispatchConcretizeProcessorSpecific(self_in_dispatchConcretize);
		return;
	}
	
	switch ((self_in_dispatchConcretize->opcode)) {
	case Label:
		/* begin concretizeLabel */
		dependentChain = (self_in_dispatchConcretize->dependent);
		while (!(dependentChain == null)) {
			/* begin updateLabel: */
			assert((((dependentChain->opcode)) == MoveCwR)
			 || (((dependentChain->opcode)) == PushCw));
			((dependentChain->operands))[0] = (((self_in_dispatchConcretize->address)) + (((self_in_dispatchConcretize->operands))[1]));
			dependentChain = (dependentChain->dependent);
		}
		(self_in_dispatchConcretize->machineCodeSize) = 0;
		return;

	case AlignmentNops:
		/* begin concretizeAlignmentNops */
		for (i = 0; i < ((self_in_dispatchConcretize->machineCodeSize)); i += 1) {
			((self_in_dispatchConcretize->machineCode))[i] = 144;
		}
		return;

	case Fill32:
		/* begin concretizeFill32 */
		word = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = (word & 0xFF);
		((self_in_dispatchConcretize->machineCode))[1] = ((((usqInt) word) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) word) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) word) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case Nop:
		/* begin concretizeNop */
		((self_in_dispatchConcretize->machineCode))[0] = 144;
		(self_in_dispatchConcretize->machineCodeSize) = 1;
		return;

	case Call:
	case CallFull:
		/* begin concretizeCall */
		assert((((self_in_dispatchConcretize->operands))[0]) != 0);
		offset = (((int) (((self_in_dispatchConcretize->operands))[0]))) - (((int) (((self_in_dispatchConcretize->address)) + 5)));
		((self_in_dispatchConcretize->machineCode))[0] = 232;
		((self_in_dispatchConcretize->machineCode))[1] = (offset & 0xFF);
		((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) offset) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 5;
		return;

	case CallR:
		/* begin concretizeCallR */
		reg = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = 0xFF;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg, 2));
		(self_in_dispatchConcretize->machineCodeSize) = 2;
		return;

	case JumpR:
		/* begin concretizeJumpR */
		reg1 = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = 0xFF;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg1, 4));
		(self_in_dispatchConcretize->machineCodeSize) = 2;
		return;

	case JumpFull:
	case JumpLong:
		/* begin concretizeJumpLong */
		jumpTarget = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		if ((addressIsInInstructions(jumpTarget))
		 || (jumpTarget == (methodLabel()))) {
			jumpTarget = ((AbstractInstruction *) ((jumpTarget->address)));
		}
		assert(jumpTarget != 0);
		offset1 = (((int) jumpTarget)) - (((int) (((self_in_dispatchConcretize->address)) + 5)));
		((self_in_dispatchConcretize->machineCode))[0] = 233;
		((self_in_dispatchConcretize->machineCode))[1] = (offset1 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) offset1) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset1) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset1) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 5;
		return;

	case JumpLongZero:
	case JumpZero:
	case JumpFPEqual:
		/* begin concretizeConditionalJump: */
		jumpTarget12 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget12);
		if ((addressIsInInstructions(jumpTarget12))
		 || (jumpTarget12 == (methodLabel()))) {
			jumpTarget12 = ((AbstractInstruction *) ((jumpTarget12->address)));
		}
		assert(jumpTarget12 != 0);
		jumpTarget3 = jumpTarget12;
		offset16 = (((int) jumpTarget3)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset16)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 4);
			((self_in_dispatchConcretize->machineCode))[1] = (offset16 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l90;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget11 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget11);
		if ((addressIsInInstructions(jumpTarget11))
		 || (jumpTarget11 == (methodLabel()))) {
			jumpTarget11 = ((AbstractInstruction *) ((jumpTarget11->address)));
		}
		assert(jumpTarget11 != 0);
		jumpTarget2 = jumpTarget11;
		offset17 = (((int) jumpTarget2)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 4);
		((self_in_dispatchConcretize->machineCode))[2] = (offset17 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset17) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset17) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset17) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l90:	/* end concretizeConditionalJump: */;
		return;

	case JumpLongNonZero:
	case JumpNonZero:
	case JumpFPNotEqual:
		/* begin concretizeConditionalJump: */
		jumpTarget13 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget13);
		if ((addressIsInInstructions(jumpTarget13))
		 || (jumpTarget13 == (methodLabel()))) {
			jumpTarget13 = ((AbstractInstruction *) ((jumpTarget13->address)));
		}
		assert(jumpTarget13 != 0);
		jumpTarget4 = jumpTarget13;
		offset18 = (((int) jumpTarget4)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset18)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 5);
			((self_in_dispatchConcretize->machineCode))[1] = (offset18 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l95;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget111 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget111);
		if ((addressIsInInstructions(jumpTarget111))
		 || (jumpTarget111 == (methodLabel()))) {
			jumpTarget111 = ((AbstractInstruction *) ((jumpTarget111->address)));
		}
		assert(jumpTarget111 != 0);
		jumpTarget21 = jumpTarget111;
		offset19 = (((int) jumpTarget21)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 5);
		((self_in_dispatchConcretize->machineCode))[2] = (offset19 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset19) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset19) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset19) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l95:	/* end concretizeConditionalJump: */;
		return;

	case Jump:
		/* begin concretizeJump */
		jumpTarget1 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget1);
		if ((addressIsInInstructions(jumpTarget1))
		 || (jumpTarget1 == (methodLabel()))) {
			jumpTarget1 = ((AbstractInstruction *) ((jumpTarget1->address)));
		}
		assert(jumpTarget1 != 0);
		offset2 = (((int) jumpTarget1)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset2)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = 235;
			((self_in_dispatchConcretize->machineCode))[1] = (offset2 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l8;
		}
		offset2 = (((int) jumpTarget1)) - (((int) (((self_in_dispatchConcretize->address)) + 5)));
		((self_in_dispatchConcretize->machineCode))[0] = 233;
		((self_in_dispatchConcretize->machineCode))[1] = (offset2 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) offset2) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset2) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset2) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 5;
	l8:	/* end concretizeJump */;
		return;

	case JumpNegative:
		/* begin concretizeConditionalJump: */
		jumpTarget14 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget14);
		if ((addressIsInInstructions(jumpTarget14))
		 || (jumpTarget14 == (methodLabel()))) {
			jumpTarget14 = ((AbstractInstruction *) ((jumpTarget14->address)));
		}
		assert(jumpTarget14 != 0);
		jumpTarget5 = jumpTarget14;
		offset20 = (((int) jumpTarget5)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset20)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 8);
			((self_in_dispatchConcretize->machineCode))[1] = (offset20 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l100;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget112 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget112);
		if ((addressIsInInstructions(jumpTarget112))
		 || (jumpTarget112 == (methodLabel()))) {
			jumpTarget112 = ((AbstractInstruction *) ((jumpTarget112->address)));
		}
		assert(jumpTarget112 != 0);
		jumpTarget22 = jumpTarget112;
		offset110 = (((int) jumpTarget22)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 8);
		((self_in_dispatchConcretize->machineCode))[2] = (offset110 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset110) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset110) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset110) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l100:	/* end concretizeConditionalJump: */;
		return;

	case JumpNonNegative:
		/* begin concretizeConditionalJump: */
		jumpTarget15 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget15);
		if ((addressIsInInstructions(jumpTarget15))
		 || (jumpTarget15 == (methodLabel()))) {
			jumpTarget15 = ((AbstractInstruction *) ((jumpTarget15->address)));
		}
		assert(jumpTarget15 != 0);
		jumpTarget6 = jumpTarget15;
		offset21 = (((int) jumpTarget6)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset21)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 9);
			((self_in_dispatchConcretize->machineCode))[1] = (offset21 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l105;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget113 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget113);
		if ((addressIsInInstructions(jumpTarget113))
		 || (jumpTarget113 == (methodLabel()))) {
			jumpTarget113 = ((AbstractInstruction *) ((jumpTarget113->address)));
		}
		assert(jumpTarget113 != 0);
		jumpTarget23 = jumpTarget113;
		offset111 = (((int) jumpTarget23)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 9);
		((self_in_dispatchConcretize->machineCode))[2] = (offset111 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset111) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset111) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset111) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l105:	/* end concretizeConditionalJump: */;
		return;

	case JumpOverflow:
		/* begin concretizeConditionalJump: */
		jumpTarget16 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget16);
		if ((addressIsInInstructions(jumpTarget16))
		 || (jumpTarget16 == (methodLabel()))) {
			jumpTarget16 = ((AbstractInstruction *) ((jumpTarget16->address)));
		}
		assert(jumpTarget16 != 0);
		jumpTarget7 = jumpTarget16;
		offset22 = (((int) jumpTarget7)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset22)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112);
			((self_in_dispatchConcretize->machineCode))[1] = (offset22 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l110;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget114 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget114);
		if ((addressIsInInstructions(jumpTarget114))
		 || (jumpTarget114 == (methodLabel()))) {
			jumpTarget114 = ((AbstractInstruction *) ((jumpTarget114->address)));
		}
		assert(jumpTarget114 != 0);
		jumpTarget24 = jumpTarget114;
		offset112 = (((int) jumpTarget24)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128);
		((self_in_dispatchConcretize->machineCode))[2] = (offset112 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset112) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset112) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset112) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l110:	/* end concretizeConditionalJump: */;
		return;

	case JumpNoOverflow:
		/* begin concretizeConditionalJump: */
		jumpTarget17 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget17);
		if ((addressIsInInstructions(jumpTarget17))
		 || (jumpTarget17 == (methodLabel()))) {
			jumpTarget17 = ((AbstractInstruction *) ((jumpTarget17->address)));
		}
		assert(jumpTarget17 != 0);
		jumpTarget8 = jumpTarget17;
		offset23 = (((int) jumpTarget8)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset23)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 1);
			((self_in_dispatchConcretize->machineCode))[1] = (offset23 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l115;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget115 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget115);
		if ((addressIsInInstructions(jumpTarget115))
		 || (jumpTarget115 == (methodLabel()))) {
			jumpTarget115 = ((AbstractInstruction *) ((jumpTarget115->address)));
		}
		assert(jumpTarget115 != 0);
		jumpTarget25 = jumpTarget115;
		offset113 = (((int) jumpTarget25)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 1);
		((self_in_dispatchConcretize->machineCode))[2] = (offset113 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset113) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset113) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset113) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l115:	/* end concretizeConditionalJump: */;
		return;

	case JumpCarry:
	case JumpBelow:
	case JumpFPLess:
		/* begin concretizeConditionalJump: */
		jumpTarget18 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget18);
		if ((addressIsInInstructions(jumpTarget18))
		 || (jumpTarget18 == (methodLabel()))) {
			jumpTarget18 = ((AbstractInstruction *) ((jumpTarget18->address)));
		}
		assert(jumpTarget18 != 0);
		jumpTarget9 = jumpTarget18;
		offset24 = (((int) jumpTarget9)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset24)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 2);
			((self_in_dispatchConcretize->machineCode))[1] = (offset24 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l120;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget116 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget116);
		if ((addressIsInInstructions(jumpTarget116))
		 || (jumpTarget116 == (methodLabel()))) {
			jumpTarget116 = ((AbstractInstruction *) ((jumpTarget116->address)));
		}
		assert(jumpTarget116 != 0);
		jumpTarget26 = jumpTarget116;
		offset114 = (((int) jumpTarget26)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 2);
		((self_in_dispatchConcretize->machineCode))[2] = (offset114 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset114) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset114) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset114) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l120:	/* end concretizeConditionalJump: */;
		return;

	case JumpNoCarry:
	case JumpAboveOrEqual:
	case JumpFPGreaterOrEqual:
		/* begin concretizeConditionalJump: */
		jumpTarget19 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget19);
		if ((addressIsInInstructions(jumpTarget19))
		 || (jumpTarget19 == (methodLabel()))) {
			jumpTarget19 = ((AbstractInstruction *) ((jumpTarget19->address)));
		}
		assert(jumpTarget19 != 0);
		jumpTarget10 = jumpTarget19;
		offset25 = (((int) jumpTarget10)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset25)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 3);
			((self_in_dispatchConcretize->machineCode))[1] = (offset25 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l125;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget117 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget117);
		if ((addressIsInInstructions(jumpTarget117))
		 || (jumpTarget117 == (methodLabel()))) {
			jumpTarget117 = ((AbstractInstruction *) ((jumpTarget117->address)));
		}
		assert(jumpTarget117 != 0);
		jumpTarget27 = jumpTarget117;
		offset115 = (((int) jumpTarget27)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 3);
		((self_in_dispatchConcretize->machineCode))[2] = (offset115 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset115) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset115) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset115) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l125:	/* end concretizeConditionalJump: */;
		return;

	case JumpLess:
		/* begin concretizeConditionalJump: */
		jumpTarget110 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget110);
		if ((addressIsInInstructions(jumpTarget110))
		 || (jumpTarget110 == (methodLabel()))) {
			jumpTarget110 = ((AbstractInstruction *) ((jumpTarget110->address)));
		}
		assert(jumpTarget110 != 0);
		jumpTarget20 = jumpTarget110;
		offset26 = (((int) jumpTarget20)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset26)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 12);
			((self_in_dispatchConcretize->machineCode))[1] = (offset26 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l130;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget118 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget118);
		if ((addressIsInInstructions(jumpTarget118))
		 || (jumpTarget118 == (methodLabel()))) {
			jumpTarget118 = ((AbstractInstruction *) ((jumpTarget118->address)));
		}
		assert(jumpTarget118 != 0);
		jumpTarget28 = jumpTarget118;
		offset116 = (((int) jumpTarget28)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 12);
		((self_in_dispatchConcretize->machineCode))[2] = (offset116 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset116) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset116) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset116) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l130:	/* end concretizeConditionalJump: */;
		return;

	case JumpGreaterOrEqual:
		/* begin concretizeConditionalJump: */
		jumpTarget119 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget119);
		if ((addressIsInInstructions(jumpTarget119))
		 || (jumpTarget119 == (methodLabel()))) {
			jumpTarget119 = ((AbstractInstruction *) ((jumpTarget119->address)));
		}
		assert(jumpTarget119 != 0);
		jumpTarget29 = jumpTarget119;
		offset27 = (((int) jumpTarget29)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset27)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 13);
			((self_in_dispatchConcretize->machineCode))[1] = (offset27 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l135;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget1110 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget1110);
		if ((addressIsInInstructions(jumpTarget1110))
		 || (jumpTarget1110 == (methodLabel()))) {
			jumpTarget1110 = ((AbstractInstruction *) ((jumpTarget1110->address)));
		}
		assert(jumpTarget1110 != 0);
		jumpTarget210 = jumpTarget1110;
		offset117 = (((int) jumpTarget210)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 13);
		((self_in_dispatchConcretize->machineCode))[2] = (offset117 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset117) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset117) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset117) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l135:	/* end concretizeConditionalJump: */;
		return;

	case JumpGreater:
		/* begin concretizeConditionalJump: */
		jumpTarget120 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget120);
		if ((addressIsInInstructions(jumpTarget120))
		 || (jumpTarget120 == (methodLabel()))) {
			jumpTarget120 = ((AbstractInstruction *) ((jumpTarget120->address)));
		}
		assert(jumpTarget120 != 0);
		jumpTarget30 = jumpTarget120;
		offset28 = (((int) jumpTarget30)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset28)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 15);
			((self_in_dispatchConcretize->machineCode))[1] = (offset28 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l140;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget1111 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget1111);
		if ((addressIsInInstructions(jumpTarget1111))
		 || (jumpTarget1111 == (methodLabel()))) {
			jumpTarget1111 = ((AbstractInstruction *) ((jumpTarget1111->address)));
		}
		assert(jumpTarget1111 != 0);
		jumpTarget211 = jumpTarget1111;
		offset118 = (((int) jumpTarget211)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 15);
		((self_in_dispatchConcretize->machineCode))[2] = (offset118 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset118) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset118) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset118) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l140:	/* end concretizeConditionalJump: */;
		return;

	case JumpLessOrEqual:
		/* begin concretizeConditionalJump: */
		jumpTarget121 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget121);
		if ((addressIsInInstructions(jumpTarget121))
		 || (jumpTarget121 == (methodLabel()))) {
			jumpTarget121 = ((AbstractInstruction *) ((jumpTarget121->address)));
		}
		assert(jumpTarget121 != 0);
		jumpTarget31 = jumpTarget121;
		offset29 = (((int) jumpTarget31)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset29)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 14);
			((self_in_dispatchConcretize->machineCode))[1] = (offset29 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l145;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget1112 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget1112);
		if ((addressIsInInstructions(jumpTarget1112))
		 || (jumpTarget1112 == (methodLabel()))) {
			jumpTarget1112 = ((AbstractInstruction *) ((jumpTarget1112->address)));
		}
		assert(jumpTarget1112 != 0);
		jumpTarget212 = jumpTarget1112;
		offset119 = (((int) jumpTarget212)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 14);
		((self_in_dispatchConcretize->machineCode))[2] = (offset119 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset119) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset119) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset119) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l145:	/* end concretizeConditionalJump: */;
		return;

	case JumpAbove:
	case JumpFPGreater:
		/* begin concretizeConditionalJump: */
		jumpTarget122 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget122);
		if ((addressIsInInstructions(jumpTarget122))
		 || (jumpTarget122 == (methodLabel()))) {
			jumpTarget122 = ((AbstractInstruction *) ((jumpTarget122->address)));
		}
		assert(jumpTarget122 != 0);
		jumpTarget32 = jumpTarget122;
		offset30 = (((int) jumpTarget32)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset30)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 7);
			((self_in_dispatchConcretize->machineCode))[1] = (offset30 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l150;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget1113 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget1113);
		if ((addressIsInInstructions(jumpTarget1113))
		 || (jumpTarget1113 == (methodLabel()))) {
			jumpTarget1113 = ((AbstractInstruction *) ((jumpTarget1113->address)));
		}
		assert(jumpTarget1113 != 0);
		jumpTarget213 = jumpTarget1113;
		offset120 = (((int) jumpTarget213)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 7);
		((self_in_dispatchConcretize->machineCode))[2] = (offset120 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset120) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset120) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset120) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l150:	/* end concretizeConditionalJump: */;
		return;

	case JumpBelowOrEqual:
	case JumpFPLessOrEqual:
		/* begin concretizeConditionalJump: */
		jumpTarget123 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget123);
		if ((addressIsInInstructions(jumpTarget123))
		 || (jumpTarget123 == (methodLabel()))) {
			jumpTarget123 = ((AbstractInstruction *) ((jumpTarget123->address)));
		}
		assert(jumpTarget123 != 0);
		jumpTarget33 = jumpTarget123;
		offset31 = (((int) jumpTarget33)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset31)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 6);
			((self_in_dispatchConcretize->machineCode))[1] = (offset31 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l155;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget1114 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget1114);
		if ((addressIsInInstructions(jumpTarget1114))
		 || (jumpTarget1114 == (methodLabel()))) {
			jumpTarget1114 = ((AbstractInstruction *) ((jumpTarget1114->address)));
		}
		assert(jumpTarget1114 != 0);
		jumpTarget214 = jumpTarget1114;
		offset121 = (((int) jumpTarget214)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 6);
		((self_in_dispatchConcretize->machineCode))[2] = (offset121 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset121) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset121) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset121) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l155:	/* end concretizeConditionalJump: */;
		return;

	case JumpFPOrdered:
		/* begin concretizeConditionalJump: */
		jumpTarget124 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget124);
		if ((addressIsInInstructions(jumpTarget124))
		 || (jumpTarget124 == (methodLabel()))) {
			jumpTarget124 = ((AbstractInstruction *) ((jumpTarget124->address)));
		}
		assert(jumpTarget124 != 0);
		jumpTarget34 = jumpTarget124;
		offset32 = (((int) jumpTarget34)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset32)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 11);
			((self_in_dispatchConcretize->machineCode))[1] = (offset32 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l160;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget1115 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget1115);
		if ((addressIsInInstructions(jumpTarget1115))
		 || (jumpTarget1115 == (methodLabel()))) {
			jumpTarget1115 = ((AbstractInstruction *) ((jumpTarget1115->address)));
		}
		assert(jumpTarget1115 != 0);
		jumpTarget215 = jumpTarget1115;
		offset122 = (((int) jumpTarget215)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 11);
		((self_in_dispatchConcretize->machineCode))[2] = (offset122 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset122) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset122) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset122) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l160:	/* end concretizeConditionalJump: */;
		return;

	case JumpFPUnordered:
		/* begin concretizeConditionalJump: */
		jumpTarget125 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget125);
		if ((addressIsInInstructions(jumpTarget125))
		 || (jumpTarget125 == (methodLabel()))) {
			jumpTarget125 = ((AbstractInstruction *) ((jumpTarget125->address)));
		}
		assert(jumpTarget125 != 0);
		jumpTarget35 = jumpTarget125;
		offset33 = (((int) jumpTarget35)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
		if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
			? isQuick(self_in_dispatchConcretize, offset33)
			: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
			((self_in_dispatchConcretize->machineCode))[0] = (112 + 10);
			((self_in_dispatchConcretize->machineCode))[1] = (offset33 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l165;
		}
		/* begin concretizeConditionalJumpLong: */
		jumpTarget1116 = ((AbstractInstruction *) (((self_in_dispatchConcretize->operands))[0]));
		assertSaneJumpTarget(jumpTarget1116);
		if ((addressIsInInstructions(jumpTarget1116))
		 || (jumpTarget1116 == (methodLabel()))) {
			jumpTarget1116 = ((AbstractInstruction *) ((jumpTarget1116->address)));
		}
		assert(jumpTarget1116 != 0);
		jumpTarget216 = jumpTarget1116;
		offset123 = (((int) jumpTarget216)) - (((int) (((self_in_dispatchConcretize->address)) + 6)));
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = (128 + 10);
		((self_in_dispatchConcretize->machineCode))[2] = (offset123 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset123) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset123) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset123) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l165:	/* end concretizeConditionalJump: */;
		return;

	case RetN:
		/* begin concretizeRetN */
		offset3 = ((self_in_dispatchConcretize->operands))[0];
		if (offset3 == 0) {
			((self_in_dispatchConcretize->machineCode))[0] = 195;
			(self_in_dispatchConcretize->machineCodeSize) = 1;
			goto l9;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 194;
		((self_in_dispatchConcretize->machineCode))[1] = (offset3 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[2] = (((usqInt) offset3) >> 8);
		(self_in_dispatchConcretize->machineCodeSize) = 3;
	l9:	/* end concretizeRetN */;
		return;

	case Stop:
		/* begin concretizeStop */
		((self_in_dispatchConcretize->machineCode))[0] = 204;
		(self_in_dispatchConcretize->machineCodeSize) = 1;
		return;

	case AddCqR:
		/* begin concretizeAddCqR */
		value = ((self_in_dispatchConcretize->operands))[0];
		reg2 = ((self_in_dispatchConcretize->operands))[1];
		if (isQuick(self_in_dispatchConcretize, value)) {
			((self_in_dispatchConcretize->machineCode))[0] = 131;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg2, 0));
			((self_in_dispatchConcretize->machineCode))[2] = (value & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l11;
		}
		if (reg2 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 5;
			((self_in_dispatchConcretize->machineCode))[1] = (value & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l11;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg2, 0));
		((self_in_dispatchConcretize->machineCode))[2] = (value & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l11:	/* end concretizeAddCqR */;
		return;

	case AddCwR:
		/* begin concretizeAddCwR */
		value1 = ((self_in_dispatchConcretize->operands))[0];
		reg3 = ((self_in_dispatchConcretize->operands))[1];
		if (reg3 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 5;
			((self_in_dispatchConcretize->machineCode))[1] = (value1 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value1) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value1) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value1) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l12;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg3, 0));
		((self_in_dispatchConcretize->machineCode))[2] = (value1 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value1) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value1) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value1) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l12:	/* end concretizeAddCwR */;
		return;

	case AddRR:
		concretizeOpRR(self_in_dispatchConcretize, 3);
		return;

	case AddcRR:
		/* begin concretizeAddcRR */
		regLHS = ((self_in_dispatchConcretize->operands))[0];
		regRHS = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 19;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, regLHS, regRHS));
		(self_in_dispatchConcretize->machineCodeSize) = 2;
		return;

	case AddcCqR:
		/* begin concretizeAddcCqR */
		value2 = ((self_in_dispatchConcretize->operands))[0];
		reg4 = ((self_in_dispatchConcretize->operands))[1];
		if (isQuick(self_in_dispatchConcretize, value2)) {
			((self_in_dispatchConcretize->machineCode))[0] = 131;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg4, 2));
			((self_in_dispatchConcretize->machineCode))[2] = (value2 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l14;
		}
		if (reg4 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 21;
			((self_in_dispatchConcretize->machineCode))[1] = (value2 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value2) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value2) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value2) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l14;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg4, 2));
		((self_in_dispatchConcretize->machineCode))[2] = (value2 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value2) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value2) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value2) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l14:	/* end concretizeAddcCqR */;
		return;

	case AddRdRd:
		/* begin concretizeSEE2OpRdRd: */
		regRHS1 = ((self_in_dispatchConcretize->operands))[0];
		regLHS1 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 88;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS1, regLHS1));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case AddRsRs:
		/* begin concretizeSEEOpRsRs: */
		regRHS2 = ((self_in_dispatchConcretize->operands))[0];
		regLHS2 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 88;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS2, regLHS2));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case AndCqR:
		/* begin concretizeAndCqR */
		mask = ((self_in_dispatchConcretize->operands))[0];
		reg5 = ((self_in_dispatchConcretize->operands))[1];
		if (isQuick(self_in_dispatchConcretize, mask)) {
			((self_in_dispatchConcretize->machineCode))[0] = 131;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg5, 4));
			((self_in_dispatchConcretize->machineCode))[2] = (mask & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l17;
		}
		if (reg5 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 37;
			((self_in_dispatchConcretize->machineCode))[1] = (mask & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) mask) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) mask) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) mask) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l17;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg5, 4));
		((self_in_dispatchConcretize->machineCode))[2] = (mask & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) mask) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) mask) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) mask) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l17:	/* end concretizeAndCqR */;
		return;

	case AndCwR:
		/* begin concretizeAndCwR */
		value3 = ((self_in_dispatchConcretize->operands))[0];
		reg6 = ((self_in_dispatchConcretize->operands))[1];
		if (reg6 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 37;
			((self_in_dispatchConcretize->machineCode))[1] = (value3 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value3) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value3) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value3) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l18;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 131;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg6, 4));
		((self_in_dispatchConcretize->machineCode))[2] = (value3 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value3) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value3) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value3) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l18:	/* end concretizeAndCwR */;
		return;

	case AndRR:
		concretizeOpRR(self_in_dispatchConcretize, 35);
		return;

	case TstCqR:
		/* begin concretizeTstCqR */
		mask1 = ((self_in_dispatchConcretize->operands))[0];
		reg7 = ((self_in_dispatchConcretize->operands))[1];
		if ((isQuick(self_in_dispatchConcretize, mask1))
		 && (reg7 < 4)) {
			((self_in_dispatchConcretize->machineCode))[0] = 246;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg7, 0));
			((self_in_dispatchConcretize->machineCode))[2] = (mask1 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l19;
		}
		if (reg7 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 169;
			((self_in_dispatchConcretize->machineCode))[1] = (mask1 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) mask1) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) mask1) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) mask1) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l19;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 247;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg7, 0));
		((self_in_dispatchConcretize->machineCode))[2] = (mask1 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) mask1) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) mask1) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) mask1) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l19:	/* end concretizeTstCqR */;
		return;

	case CmpCqR:
		/* begin concretizeCmpCqR */
		value4 = ((self_in_dispatchConcretize->operands))[0];
		reg8 = ((self_in_dispatchConcretize->operands))[1];
		if (isQuick(self_in_dispatchConcretize, value4)) {
			((self_in_dispatchConcretize->machineCode))[0] = 131;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg8, 7));
			((self_in_dispatchConcretize->machineCode))[2] = (value4 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l20;
		}
		if (reg8 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 61;
			((self_in_dispatchConcretize->machineCode))[1] = (value4 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value4) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value4) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value4) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l20;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg8, 7));
		((self_in_dispatchConcretize->machineCode))[2] = (value4 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value4) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value4) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value4) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l20:	/* end concretizeCmpCqR */;
		return;

	case CmpCwR:
		/* begin concretizeCmpCwR */
		value5 = ((self_in_dispatchConcretize->operands))[0];
		reg9 = ((self_in_dispatchConcretize->operands))[1];
		if (reg9 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 61;
			((self_in_dispatchConcretize->machineCode))[1] = (value5 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value5) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value5) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value5) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l21;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg9, 7));
		((self_in_dispatchConcretize->machineCode))[2] = (value5 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value5) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value5) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value5) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l21:	/* end concretizeCmpCwR */;
		return;

	case CmpRR:
		concretizeReverseOpRR(self_in_dispatchConcretize, 57);
		return;

	case CmpRdRd:
		/* begin concretizeCmpRdRd */
		regRHS3 = ((self_in_dispatchConcretize->operands))[0];
		regLHS3 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 102;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 46;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS3, regLHS3));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case CmpRsRs:
		/* begin concretizeCmpRsRs */
		regRHS4 = ((self_in_dispatchConcretize->operands))[0];
		regLHS4 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 46;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS4, regLHS4));
		(self_in_dispatchConcretize->machineCodeSize) = 3;
		return;

	case DivRdRd:
		/* begin concretizeSEE2OpRdRd: */
		regRHS5 = ((self_in_dispatchConcretize->operands))[0];
		regLHS5 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 94;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS5, regLHS5));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case DivRsRs:
		/* begin concretizeSEEOpRsRs: */
		regRHS6 = ((self_in_dispatchConcretize->operands))[0];
		regLHS6 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 94;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS6, regLHS6));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case MulRdRd:
		/* begin concretizeSEE2OpRdRd: */
		regRHS7 = ((self_in_dispatchConcretize->operands))[0];
		regLHS7 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 89;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS7, regLHS7));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case MulRsRs:
		/* begin concretizeSEEOpRsRs: */
		regRHS8 = ((self_in_dispatchConcretize->operands))[0];
		regLHS8 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 89;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS8, regLHS8));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case OrCqR:
		/* begin concretizeOrCqR */
		mask2 = ((self_in_dispatchConcretize->operands))[0];
		reg10 = ((self_in_dispatchConcretize->operands))[1];
		if (isQuick(self_in_dispatchConcretize, mask2)) {
			((self_in_dispatchConcretize->machineCode))[0] = 131;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg10, 1));
			((self_in_dispatchConcretize->machineCode))[2] = (mask2 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l28;
		}
		if (reg10 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 13;
			((self_in_dispatchConcretize->machineCode))[1] = (mask2 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) mask2) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) mask2) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) mask2) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l28;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg10, 1));
		((self_in_dispatchConcretize->machineCode))[2] = (mask2 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) mask2) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) mask2) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) mask2) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l28:	/* end concretizeOrCqR */;
		return;

	case OrCwR:
		/* begin concretizeOrCwR */
		value6 = ((self_in_dispatchConcretize->operands))[0];
		reg11 = ((self_in_dispatchConcretize->operands))[1];
		if (reg11 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 13;
			((self_in_dispatchConcretize->machineCode))[1] = (value6 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value6) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value6) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value6) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l29;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 131;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg11, 1));
		((self_in_dispatchConcretize->machineCode))[2] = (value6 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value6) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value6) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value6) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l29:	/* end concretizeOrCwR */;
		return;

	case OrRR:
		concretizeOpRR(self_in_dispatchConcretize, 11);
		return;

	case SubCqR:
		/* begin concretizeSubCqR */
		value7 = ((self_in_dispatchConcretize->operands))[0];
		reg12 = ((self_in_dispatchConcretize->operands))[1];
		if (isQuick(self_in_dispatchConcretize, value7)) {
			((self_in_dispatchConcretize->machineCode))[0] = 131;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg12, 5));
			((self_in_dispatchConcretize->machineCode))[2] = (value7 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l30;
		}
		if (reg12 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 45;
			((self_in_dispatchConcretize->machineCode))[1] = (value7 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value7) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value7) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value7) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l30;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg12, 5));
		((self_in_dispatchConcretize->machineCode))[2] = (value7 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value7) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value7) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value7) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l30:	/* end concretizeSubCqR */;
		return;

	case SubCwR:
		/* begin concretizeSubCwR */
		value8 = ((self_in_dispatchConcretize->operands))[0];
		reg13 = ((self_in_dispatchConcretize->operands))[1];
		if (reg13 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 45;
			((self_in_dispatchConcretize->machineCode))[1] = (value8 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value8) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value8) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value8) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l31;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg13, 5));
		((self_in_dispatchConcretize->machineCode))[2] = (value8 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value8) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value8) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value8) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l31:	/* end concretizeSubCwR */;
		return;

	case SubRR:
		concretizeOpRR(self_in_dispatchConcretize, 43);
		return;

	case SubbRR:
		/* begin concretizeSubbRR */
		regLHS9 = ((self_in_dispatchConcretize->operands))[0];
		regRHS9 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 27;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, regLHS9, regRHS9));
		(self_in_dispatchConcretize->machineCodeSize) = 2;
		return;

	case SubRdRd:
		/* begin concretizeSEE2OpRdRd: */
		regRHS10 = ((self_in_dispatchConcretize->operands))[0];
		regLHS10 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 92;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS10, regLHS10));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case SubRsRs:
		/* begin concretizeSEEOpRsRs: */
		regRHS11 = ((self_in_dispatchConcretize->operands))[0];
		regLHS11 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 92;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS11, regLHS11));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case SqrtRd:
		/* begin concretizeSqrtRd */
		reg14 = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 81;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, reg14, reg14));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case SqrtRs:
		/* begin concretizeSqrtRs */
		reg15 = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 81;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, reg15, reg15));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case XorCwR:
		/* begin concretizeXorCwR */
		value9 = ((self_in_dispatchConcretize->operands))[0];
		reg16 = ((self_in_dispatchConcretize->operands))[1];
		if (reg16 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 53;
			((self_in_dispatchConcretize->machineCode))[1] = (value9 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value9) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value9) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value9) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l37;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 129;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg16, 6));
		((self_in_dispatchConcretize->machineCode))[2] = (value9 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value9) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value9) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value9) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l37:	/* end concretizeXorCwR */;
		return;

	case XorRR:
		concretizeOpRR(self_in_dispatchConcretize, 51);
		return;

	case XorRdRd:
		/* begin concretizeXorRdRd */
		regRHS12 = ((self_in_dispatchConcretize->operands))[0];
		regLHS12 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 102;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 87;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS12, regLHS12));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case XorRsRs:
		/* begin concretizeXorRsRs */
		regRHS13 = ((self_in_dispatchConcretize->operands))[0];
		regLHS13 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 87;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModReg, regRHS13, regLHS13));
		(self_in_dispatchConcretize->machineCodeSize) = 3;
		return;

	case NegateR:
		/* begin concretizeNegateR */
		reg17 = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = 247;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg17, 3));
		(self_in_dispatchConcretize->machineCodeSize) = 2;
		return;

	case NotR:
		/* begin concretizeNotR */
		reg18 = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = 247;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg18, 2));
		(self_in_dispatchConcretize->machineCodeSize) = 2;
		return;

	case LoadEffectiveAddressMwrR:
		/* begin concretizeLoadEffectiveAddressMwrR */
		offset4 = ((self_in_dispatchConcretize->operands))[0];
		srcReg = ((self_in_dispatchConcretize->operands))[1];
		destReg = ((self_in_dispatchConcretize->operands))[2];
		if (srcReg != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset4)) {
				((self_in_dispatchConcretize->machineCode))[0] = 141;
				((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg, destReg));
				((self_in_dispatchConcretize->machineCode))[2] = (offset4 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 3;
				goto l42;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 141;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg, destReg));
			((self_in_dispatchConcretize->machineCode))[2] = (offset4 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset4) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset4) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset4) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 6;
			goto l42;
		}
		if (isQuick(self_in_dispatchConcretize, offset4)) {
			((self_in_dispatchConcretize->machineCode))[0] = 141;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg, destReg));
			((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg));
			((self_in_dispatchConcretize->machineCode))[3] = (offset4 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 4;
			goto l42;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 141;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg, destReg));
		((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg));
		((self_in_dispatchConcretize->machineCode))[3] = (offset4 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset4) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset4) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset4) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 7;
	l42:	/* end concretizeLoadEffectiveAddressMwrR */;
		return;

	case ArithmeticShiftRightCqR:
		/* begin concretizeArithmeticShiftRightCqR */
		shiftCount = (((((self_in_dispatchConcretize->operands))[0]) < 0x1F) ? (((self_in_dispatchConcretize->operands))[0]) : 0x1F);
		reg19 = ((self_in_dispatchConcretize->operands))[1];
		if (shiftCount == 1) {
			((self_in_dispatchConcretize->machineCode))[0] = 209;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg19, 7));
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l43;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 193;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg19, 7));
		((self_in_dispatchConcretize->machineCode))[2] = shiftCount;
		(self_in_dispatchConcretize->machineCodeSize) = 3;
	l43:	/* end concretizeArithmeticShiftRightCqR */;
		return;

	case LogicalShiftRightCqR:
		/* begin concretizeLogicalShiftRightCqR */
		distance = (((((self_in_dispatchConcretize->operands))[0]) < 0x1F) ? (((self_in_dispatchConcretize->operands))[0]) : 0x1F);
		reg20 = ((self_in_dispatchConcretize->operands))[1];
		if (distance == 1) {
			((self_in_dispatchConcretize->machineCode))[0] = 209;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg20, 5));
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l44;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 193;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg20, 5));
		((self_in_dispatchConcretize->machineCode))[2] = distance;
		(self_in_dispatchConcretize->machineCodeSize) = 3;
	l44:	/* end concretizeLogicalShiftRightCqR */;
		return;

	case LogicalShiftLeftCqR:
		/* begin concretizeLogicalShiftLeftCqR */
		distance1 = (((((self_in_dispatchConcretize->operands))[0]) < 0x1F) ? (((self_in_dispatchConcretize->operands))[0]) : 0x1F);
		reg21 = ((self_in_dispatchConcretize->operands))[1];
		if (distance1 == 1) {
			((self_in_dispatchConcretize->machineCode))[0] = 209;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg21, 4));
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l45;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 193;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg21, 4));
		((self_in_dispatchConcretize->machineCode))[2] = distance1;
		(self_in_dispatchConcretize->machineCodeSize) = 3;
	l45:	/* end concretizeLogicalShiftLeftCqR */;
		return;

	case ArithmeticShiftRightRR:
		/* begin concretizeArithmeticShiftRightRR */
		shiftCountReg = ((self_in_dispatchConcretize->operands))[0];
		destReg1 = ((self_in_dispatchConcretize->operands))[1];
		if (shiftCountReg == ECX) {
			((self_in_dispatchConcretize->machineCode))[0] = 211;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, destReg1, 7));
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l46;
		}
		regToShift = (destReg1 == shiftCountReg
			? ECX
			: (destReg1 == ECX
					? shiftCountReg
					: destReg1));
		if (shiftCountReg == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = (144 + ECX);
			((self_in_dispatchConcretize->machineCode))[1] = 211;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModReg, regToShift, 7));
			((self_in_dispatchConcretize->machineCode))[3] = (144 + ECX);
			(self_in_dispatchConcretize->machineCodeSize) = 4;
			goto l46;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 135;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, ECX, shiftCountReg));
		((self_in_dispatchConcretize->machineCode))[2] = 211;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regToShift, 7));
		((self_in_dispatchConcretize->machineCode))[4] = 135;
		((self_in_dispatchConcretize->machineCode))[5] = (modRMRO(self_in_dispatchConcretize, ModReg, ECX, shiftCountReg));
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l46:	/* end concretizeArithmeticShiftRightRR */;
		return;

	case LogicalShiftLeftRR:
		/* begin concretizeLogicalShiftLeftRR */
		shiftCountReg1 = ((self_in_dispatchConcretize->operands))[0];
		destReg2 = ((self_in_dispatchConcretize->operands))[1];
		if (shiftCountReg1 == ECX) {
			((self_in_dispatchConcretize->machineCode))[0] = 211;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, destReg2, 4));
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l47;
		}
		regToShift1 = (destReg2 == shiftCountReg1
			? ECX
			: (destReg2 == ECX
					? shiftCountReg1
					: destReg2));
		if (shiftCountReg1 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = (144 + ECX);
			((self_in_dispatchConcretize->machineCode))[1] = 211;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModReg, regToShift1, 4));
			((self_in_dispatchConcretize->machineCode))[3] = (144 + ECX);
			(self_in_dispatchConcretize->machineCodeSize) = 4;
			goto l47;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 135;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, ECX, shiftCountReg1));
		((self_in_dispatchConcretize->machineCode))[2] = 211;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, regToShift1, 4));
		((self_in_dispatchConcretize->machineCode))[4] = 135;
		((self_in_dispatchConcretize->machineCode))[5] = (modRMRO(self_in_dispatchConcretize, ModReg, ECX, shiftCountReg1));
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l47:	/* end concretizeLogicalShiftLeftRR */;
		return;

	case MoveCqR:
		/* begin concretizeMoveCqR */
		if ((((self_in_dispatchConcretize->operands))[0]) != 0) {
			/* begin concretizeMoveCwR */
			value13 = ((self_in_dispatchConcretize->operands))[0];
			((self_in_dispatchConcretize->machineCode))[0] = (184 + (((self_in_dispatchConcretize->operands))[1]));
			((self_in_dispatchConcretize->machineCode))[1] = (value13 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value13) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value13) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value13) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l166;
		}
		reg26 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 49;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModReg, reg26, reg26));
		(self_in_dispatchConcretize->machineCodeSize) = 2;
	l166:	/* end concretizeMoveCqR */;
		return;

	case MoveCwR:
		/* begin concretizeMoveCwR */
		value10 = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = (184 + (((self_in_dispatchConcretize->operands))[1]));
		((self_in_dispatchConcretize->machineCode))[1] = (value10 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value10) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value10) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value10) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 5;
		return;

	case MoveRR:
		concretizeReverseOpRR(self_in_dispatchConcretize, 137);
		return;

	case MoveRdRd:
		/* begin concretizeMoveRdRd */
		srcReg1 = ((self_in_dispatchConcretize->operands))[0];
		destReg3 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 17;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, destReg3, srcReg1));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case MoveRsRs:
		/* begin concretizeMoveRsRs */
		srcReg2 = ((self_in_dispatchConcretize->operands))[0];
		destReg4 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 17;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, destReg4, srcReg2));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case MoveAwR:
		/* begin concretizeMoveAwR */
		addressOperand = ((self_in_dispatchConcretize->operands))[0];
		if ((addressIsInInstructions(((AbstractInstruction *) addressOperand)))
		 || ((((AbstractInstruction *) addressOperand)) == (methodLabel()))) {
			addressOperand = ((((AbstractInstruction *) addressOperand))->address);
		}
		reg22 = ((self_in_dispatchConcretize->operands))[1];
		if (reg22 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 161;
			((self_in_dispatchConcretize->machineCode))[1] = (addressOperand & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) addressOperand) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) addressOperand) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) addressOperand) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l51;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 139;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 5, reg22));
		((self_in_dispatchConcretize->machineCode))[2] = (addressOperand & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) addressOperand) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) addressOperand) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) addressOperand) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l51:	/* end concretizeMoveAwR */;
		return;

	case MoveRAw:
		/* begin concretizeMoveRAw */
		reg23 = ((self_in_dispatchConcretize->operands))[0];
		addressOperand1 = ((self_in_dispatchConcretize->operands))[1];
		if ((addressIsInInstructions(((AbstractInstruction *) addressOperand1)))
		 || ((((AbstractInstruction *) addressOperand1)) == (methodLabel()))) {
			addressOperand1 = ((((AbstractInstruction *) addressOperand1))->address);
		}
		if (reg23 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 163;
			((self_in_dispatchConcretize->machineCode))[1] = (addressOperand1 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) addressOperand1) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) addressOperand1) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) addressOperand1) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l52;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 137;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 5, reg23));
		((self_in_dispatchConcretize->machineCode))[2] = (addressOperand1 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) addressOperand1) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) addressOperand1) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) addressOperand1) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l52:	/* end concretizeMoveRAw */;
		return;

	case MoveAbR:
		/* begin concretizeMoveAbR */
		addressOperand2 = ((self_in_dispatchConcretize->operands))[0];
		if ((addressIsInInstructions(((AbstractInstruction *) addressOperand2)))
		 || ((((AbstractInstruction *) addressOperand2)) == (methodLabel()))) {
			addressOperand2 = ((((AbstractInstruction *) addressOperand2))->address);
		}
		reg24 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 182;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 5, reg24));
		((self_in_dispatchConcretize->machineCode))[3] = (addressOperand2 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) addressOperand2) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) addressOperand2) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) addressOperand2) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 7;
		return;

	case MoveRAb:
		/* begin concretizeMoveRAb */
		reg25 = ((self_in_dispatchConcretize->operands))[0];
		addressOperand3 = ((self_in_dispatchConcretize->operands))[1];
		if ((addressIsInInstructions(((AbstractInstruction *) addressOperand3)))
		 || ((((AbstractInstruction *) addressOperand3)) == (methodLabel()))) {
			addressOperand3 = ((((AbstractInstruction *) addressOperand3))->address);
		}
		if (reg25 == EAX) {
			((self_in_dispatchConcretize->machineCode))[0] = 162;
			((self_in_dispatchConcretize->machineCode))[1] = (addressOperand3 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) addressOperand3) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) addressOperand3) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) addressOperand3) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l54;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 136;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 5, reg25));
		((self_in_dispatchConcretize->machineCode))[2] = (addressOperand3 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) addressOperand3) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) addressOperand3) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) addressOperand3) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 6;
	l54:	/* end concretizeMoveRAb */;
		return;

	case MoveMbrR:
		/* begin concretizeMoveMbrR */
		offset5 = ((self_in_dispatchConcretize->operands))[0];
		srcReg3 = ((self_in_dispatchConcretize->operands))[1];
		destReg5 = ((self_in_dispatchConcretize->operands))[2];
		if (srcReg3 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset5)) {
				((self_in_dispatchConcretize->machineCode))[0] = 15;
				((self_in_dispatchConcretize->machineCode))[1] = 182;
				((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg3, destReg5));
				((self_in_dispatchConcretize->machineCode))[3] = (offset5 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 4;
				goto l55;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 15;
			((self_in_dispatchConcretize->machineCode))[1] = 182;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg3, destReg5));
			((self_in_dispatchConcretize->machineCode))[3] = (offset5 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset5) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset5) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset5) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 7;
			goto l55;
		}
		if (isQuick(self_in_dispatchConcretize, offset5)) {
			((self_in_dispatchConcretize->machineCode))[0] = 15;
			((self_in_dispatchConcretize->machineCode))[1] = 182;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg3, destReg5));
			((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg3));
			((self_in_dispatchConcretize->machineCode))[4] = (offset5 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l55;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 182;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg3, destReg5));
		((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg3));
		((self_in_dispatchConcretize->machineCode))[4] = (offset5 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset5) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset5) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset5) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 8;
	l55:	/* end concretizeMoveMbrR */;
		return;

	case MoveRMbr:
	case MoveRM8r:
		/* begin concretizeMoveRMbr */
		offset6 = ((self_in_dispatchConcretize->operands))[1];
		srcReg4 = ((self_in_dispatchConcretize->operands))[0];
		destReg6 = ((self_in_dispatchConcretize->operands))[2];
		if (srcReg4 >= 4) {
			error("invalid register");
		}
		if (destReg6 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset6)) {
				((self_in_dispatchConcretize->machineCode))[0] = 136;
				((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, destReg6, srcReg4));
				((self_in_dispatchConcretize->machineCode))[2] = (offset6 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 3;
				goto l56;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 136;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg6, srcReg4));
			((self_in_dispatchConcretize->machineCode))[2] = (offset6 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset6) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset6) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset6) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 6;
			goto l56;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 136;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg6, srcReg4));
		((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg6));
		((self_in_dispatchConcretize->machineCode))[3] = (offset6 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset6) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset6) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset6) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 7;
	l56:	/* end concretizeMoveRMbr */;
		return;

	case MoveM8rR:
		/* begin concretizeMoveM8rR */
		offset7 = ((self_in_dispatchConcretize->operands))[0];
		srcReg5 = ((self_in_dispatchConcretize->operands))[1];
		destReg7 = ((self_in_dispatchConcretize->operands))[2];
		if (srcReg5 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset7)) {
				((self_in_dispatchConcretize->machineCode))[0] = 15;
				((self_in_dispatchConcretize->machineCode))[1] = 182;
				((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg5, destReg7));
				((self_in_dispatchConcretize->machineCode))[3] = (offset7 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 4;
				goto l57;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 15;
			((self_in_dispatchConcretize->machineCode))[1] = 182;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg5, destReg7));
			((self_in_dispatchConcretize->machineCode))[3] = (offset7 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset7) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset7) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset7) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 7;
			goto l57;
		}
		if (isQuick(self_in_dispatchConcretize, offset7)) {
			((self_in_dispatchConcretize->machineCode))[0] = 15;
			((self_in_dispatchConcretize->machineCode))[1] = 182;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg5, destReg7));
			((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg5));
			((self_in_dispatchConcretize->machineCode))[4] = (offset7 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l57;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 182;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg5, destReg7));
		((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg5));
		((self_in_dispatchConcretize->machineCode))[4] = (offset7 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset7) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset7) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset7) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 8;
	l57:	/* end concretizeMoveM8rR */;
		return;

	case MoveM16rR:
		/* begin concretizeMoveM16rR */
		offset8 = ((self_in_dispatchConcretize->operands))[0];
		srcReg6 = ((self_in_dispatchConcretize->operands))[1];
		destReg8 = ((self_in_dispatchConcretize->operands))[2];
		if (srcReg6 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset8)) {
				((self_in_dispatchConcretize->machineCode))[0] = 15;
				((self_in_dispatchConcretize->machineCode))[1] = 183;
				((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg6, destReg8));
				((self_in_dispatchConcretize->machineCode))[3] = (offset8 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 4;
				goto l58;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 15;
			((self_in_dispatchConcretize->machineCode))[1] = 183;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg6, destReg8));
			((self_in_dispatchConcretize->machineCode))[3] = (offset8 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset8) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset8) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset8) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 7;
			goto l58;
		}
		if (isQuick(self_in_dispatchConcretize, offset8)) {
			((self_in_dispatchConcretize->machineCode))[0] = 15;
			((self_in_dispatchConcretize->machineCode))[1] = 183;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg6, destReg8));
			((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg6));
			((self_in_dispatchConcretize->machineCode))[4] = (offset8 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 5;
			goto l58;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 183;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg6, destReg8));
		((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg6));
		((self_in_dispatchConcretize->machineCode))[4] = (offset8 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset8) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset8) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset8) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 8;
	l58:	/* end concretizeMoveM16rR */;
		return;

	case MoveRM16r:
		/* begin concretizeMoveRM16r */
		offset9 = ((self_in_dispatchConcretize->operands))[1];
		srcReg7 = ((self_in_dispatchConcretize->operands))[0];
		destReg9 = ((self_in_dispatchConcretize->operands))[2];
		if (destReg9 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset9)) {
				((self_in_dispatchConcretize->machineCode))[0] = 102;
				((self_in_dispatchConcretize->machineCode))[1] = 137;
				((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, destReg9, srcReg7));
				((self_in_dispatchConcretize->machineCode))[3] = (offset9 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 4;
				goto l59;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 102;
			((self_in_dispatchConcretize->machineCode))[1] = 137;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg9, srcReg7));
			((self_in_dispatchConcretize->machineCode))[3] = (offset9 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset9) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset9) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset9) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 7;
			goto l59;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 102;
		((self_in_dispatchConcretize->machineCode))[1] = 137;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg9, srcReg7));
		((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg9));
		((self_in_dispatchConcretize->machineCode))[4] = (offset9 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset9) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset9) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset9) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 8;
	l59:	/* end concretizeMoveRM16r */;
		return;

	case MoveM32rR:
	case MoveMwrR:
		/* begin concretizeMoveMwrR */
		offset10 = ((self_in_dispatchConcretize->operands))[0];
		srcReg8 = ((self_in_dispatchConcretize->operands))[1];
		destReg10 = ((self_in_dispatchConcretize->operands))[2];
		if (srcReg8 != ESP) {
			if ((offset10 == 0)
			 && (srcReg8 != EBP)) {
				((self_in_dispatchConcretize->machineCode))[0] = 139;
				((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, srcReg8, destReg10));
				(self_in_dispatchConcretize->machineCodeSize) = 2;
				goto l60;
			}
			if (isQuick(self_in_dispatchConcretize, offset10)) {
				((self_in_dispatchConcretize->machineCode))[0] = 139;
				((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg8, destReg10));
				((self_in_dispatchConcretize->machineCode))[2] = (offset10 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 3;
				goto l60;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 139;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg8, destReg10));
			((self_in_dispatchConcretize->machineCode))[2] = (offset10 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset10) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset10) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset10) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 6;
			goto l60;
		}
		if (offset10 == 0) {
			((self_in_dispatchConcretize->machineCode))[0] = 139;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, srcReg8, destReg10));
			((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg8));
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l60;
		}
		if (isQuick(self_in_dispatchConcretize, offset10)) {
			((self_in_dispatchConcretize->machineCode))[0] = 139;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg8, destReg10));
			((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg8));
			((self_in_dispatchConcretize->machineCode))[3] = (offset10 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 4;
			goto l60;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 139;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg8, destReg10));
		((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg8));
		((self_in_dispatchConcretize->machineCode))[3] = (offset10 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset10) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset10) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset10) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 7;
	l60:	/* end concretizeMoveMwrR */;
		return;

	case MoveRM32r:
	case MoveRMwr:
		/* begin concretizeMoveRMwr */
		srcReg9 = ((self_in_dispatchConcretize->operands))[0];
		offset11 = ((self_in_dispatchConcretize->operands))[1];
		destReg11 = ((self_in_dispatchConcretize->operands))[2];
		if (destReg11 != ESP) {
			if ((offset11 == 0)
			 && (destReg11 != EBP)) {
				((self_in_dispatchConcretize->machineCode))[0] = 137;
				((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, destReg11, srcReg9));
				(self_in_dispatchConcretize->machineCodeSize) = 2;
				goto l61;
			}
			if (isQuick(self_in_dispatchConcretize, offset11)) {
				((self_in_dispatchConcretize->machineCode))[0] = 137;
				((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, destReg11, srcReg9));
				((self_in_dispatchConcretize->machineCode))[2] = (offset11 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 3;
				goto l61;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 137;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg11, srcReg9));
			((self_in_dispatchConcretize->machineCode))[2] = (offset11 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset11) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset11) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset11) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 6;
			goto l61;
		}
		if (offset11 == 0) {
			((self_in_dispatchConcretize->machineCode))[0] = 137;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, destReg11, srcReg9));
			((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg11));
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l61;
		}
		if (isQuick(self_in_dispatchConcretize, offset11)) {
			((self_in_dispatchConcretize->machineCode))[0] = 137;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, destReg11, srcReg9));
			((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg11));
			((self_in_dispatchConcretize->machineCode))[3] = (offset11 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 4;
			goto l61;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 137;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg11, srcReg9));
		((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg11));
		((self_in_dispatchConcretize->machineCode))[3] = (offset11 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset11) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset11) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset11) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 7;
	l61:	/* end concretizeMoveRMwr */;
		return;

	case MoveM32rRs:
		/* begin concretizeMoveM32rRs */
		offset12 = ((self_in_dispatchConcretize->operands))[0];
		srcReg10 = ((self_in_dispatchConcretize->operands))[1];
		destReg12 = ((self_in_dispatchConcretize->operands))[2];
		if (srcReg10 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset12)) {
				((self_in_dispatchConcretize->machineCode))[0] = 243;
				((self_in_dispatchConcretize->machineCode))[1] = 15;
				((self_in_dispatchConcretize->machineCode))[2] = 16;
				((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg10, destReg12));
				((self_in_dispatchConcretize->machineCode))[4] = (offset12 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 5;
				goto l62;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 243;
			((self_in_dispatchConcretize->machineCode))[1] = 15;
			((self_in_dispatchConcretize->machineCode))[2] = 16;
			((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg10, destReg12));
			((self_in_dispatchConcretize->machineCode))[4] = (offset12 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset12) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset12) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset12) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 8;
			goto l62;
		}
		if (isQuick(self_in_dispatchConcretize, offset12)) {
			((self_in_dispatchConcretize->machineCode))[0] = 243;
			((self_in_dispatchConcretize->machineCode))[1] = 15;
			((self_in_dispatchConcretize->machineCode))[2] = 16;
			((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg10, destReg12));
			((self_in_dispatchConcretize->machineCode))[4] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg10));
			((self_in_dispatchConcretize->machineCode))[5] = (offset12 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 6;
			goto l62;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 16;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg10, destReg12));
		((self_in_dispatchConcretize->machineCode))[4] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg10));
		((self_in_dispatchConcretize->machineCode))[5] = (offset12 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset12) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset12) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[8] = ((((usqInt) offset12) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 9;
	l62:	/* end concretizeMoveM32rRs */;
		return;

	case MoveRsM32r:
		/* begin concretizeMoveRsM32r */
		srcReg11 = ((self_in_dispatchConcretize->operands))[0];
		offset13 = ((self_in_dispatchConcretize->operands))[1];
		destReg13 = ((self_in_dispatchConcretize->operands))[2];
		if (destReg13 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset13)) {

				/* MOVSD destReg, srcReg */
				((self_in_dispatchConcretize->machineCode))[0] = 243;
				((self_in_dispatchConcretize->machineCode))[1] = 15;
				((self_in_dispatchConcretize->machineCode))[2] = 17;
				((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, destReg13, srcReg11));
				((self_in_dispatchConcretize->machineCode))[4] = (offset13 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 5;
				goto l63;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 243;
			((self_in_dispatchConcretize->machineCode))[1] = 15;
			((self_in_dispatchConcretize->machineCode))[2] = 17;
			((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg13, srcReg11));
			((self_in_dispatchConcretize->machineCode))[4] = (offset13 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset13) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset13) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset13) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 8;
			goto l63;
		}
		if (isQuick(self_in_dispatchConcretize, offset13)) {
			((self_in_dispatchConcretize->machineCode))[0] = 243;
			((self_in_dispatchConcretize->machineCode))[1] = 15;
			((self_in_dispatchConcretize->machineCode))[2] = 17;
			((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, destReg13, srcReg11));
			((self_in_dispatchConcretize->machineCode))[4] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg13));
			((self_in_dispatchConcretize->machineCode))[5] = (offset13 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 6;
			goto l63;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 17;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg13, srcReg11));
		((self_in_dispatchConcretize->machineCode))[4] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg13));
		((self_in_dispatchConcretize->machineCode))[5] = (offset13 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset13) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset13) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[8] = ((((usqInt) offset13) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 9;
	l63:	/* end concretizeMoveRsM32r */;
		return;

	case MoveM64rRd:
		/* begin concretizeMoveM64rRd */
		offset14 = ((self_in_dispatchConcretize->operands))[0];
		srcReg12 = ((self_in_dispatchConcretize->operands))[1];
		destReg14 = ((self_in_dispatchConcretize->operands))[2];
		if (srcReg12 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset14)) {
				((self_in_dispatchConcretize->machineCode))[0] = 242;
				((self_in_dispatchConcretize->machineCode))[1] = 15;
				((self_in_dispatchConcretize->machineCode))[2] = 16;
				((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg12, destReg14));
				((self_in_dispatchConcretize->machineCode))[4] = (offset14 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 5;
				goto l64;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 242;
			((self_in_dispatchConcretize->machineCode))[1] = 15;
			((self_in_dispatchConcretize->machineCode))[2] = 16;
			((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg12, destReg14));
			((self_in_dispatchConcretize->machineCode))[4] = (offset14 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset14) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset14) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset14) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 8;
			goto l64;
		}
		if (isQuick(self_in_dispatchConcretize, offset14)) {
			((self_in_dispatchConcretize->machineCode))[0] = 242;
			((self_in_dispatchConcretize->machineCode))[1] = 15;
			((self_in_dispatchConcretize->machineCode))[2] = 16;
			((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg12, destReg14));
			((self_in_dispatchConcretize->machineCode))[4] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg12));
			((self_in_dispatchConcretize->machineCode))[5] = (offset14 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 6;
			goto l64;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 16;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg12, destReg14));
		((self_in_dispatchConcretize->machineCode))[4] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg12));
		((self_in_dispatchConcretize->machineCode))[5] = (offset14 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset14) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset14) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[8] = ((((usqInt) offset14) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 9;
	l64:	/* end concretizeMoveM64rRd */;
		return;

	case MoveXbrRR:
		/* begin concretizeMoveXbrRR */
		index = ((self_in_dispatchConcretize->operands))[0];
		base = ((self_in_dispatchConcretize->operands))[1];
		dest = ((self_in_dispatchConcretize->operands))[2];
		if (base != EBP) {
			((self_in_dispatchConcretize->machineCode))[0] = 15;
			((self_in_dispatchConcretize->machineCode))[1] = 182;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 4, dest));
			((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, index, base));
			(self_in_dispatchConcretize->machineCodeSize) = 4;
			goto l65;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 182;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, 4, dest));
		((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, index, base));
		((self_in_dispatchConcretize->machineCode))[4] = 0;
		(self_in_dispatchConcretize->machineCodeSize) = 5;
	l65:	/* end concretizeMoveXbrRR */;
		return;

	case MoveRXbrR:
		/* begin concretizeMoveRXbrR */
		src = ((self_in_dispatchConcretize->operands))[0];
		index1 = ((self_in_dispatchConcretize->operands))[1];
		base1 = ((self_in_dispatchConcretize->operands))[2];
		mcIdx = 0;
		swapreg = NoReg;
		if (src >= 4) {

			/* x86 allows movb %rl, mem only with %al, %bl, %cl, %dl, so swap with the first one that isn't used. */
			swapreg = src;
			if (index1 == EAX) {
				index1 = swapreg;
			}
			if (base1 == EAX) {
				base1 = swapreg;
			}
			src = EAX;
			mcIdx = 1;
			((self_in_dispatchConcretize->machineCode))[0] = (144 + swapreg);
		}
		if (base1 != EBP) {
			((self_in_dispatchConcretize->machineCode))[mcIdx] = 136;
			((self_in_dispatchConcretize->machineCode))[mcIdx + 1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 4, src));
			((self_in_dispatchConcretize->machineCode))[mcIdx + 2] = (sib(self_in_dispatchConcretize, SIB1, index1, base1));
			if (swapreg != NoReg) {
				((self_in_dispatchConcretize->machineCode))[mcIdx + 3] = (144 + swapreg);
			}
			(self_in_dispatchConcretize->machineCodeSize) = 3 + (2 * mcIdx);
			goto l66;
		}
		((self_in_dispatchConcretize->machineCode))[mcIdx] = 136;
		((self_in_dispatchConcretize->machineCode))[mcIdx + 1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, 4, src));
		((self_in_dispatchConcretize->machineCode))[mcIdx + 2] = (sib(self_in_dispatchConcretize, SIB1, index1, base1));
		((self_in_dispatchConcretize->machineCode))[mcIdx + 3] = 0;
		if (swapreg != NoReg) {
			((self_in_dispatchConcretize->machineCode))[mcIdx + 4] = (144 + swapreg);
		}
		(self_in_dispatchConcretize->machineCodeSize) = 4 + (2 * mcIdx);
	l66:	/* end concretizeMoveRXbrR */;
		return;

	case MoveXwrRR:
		/* begin concretizeMoveXwrRR */
		index2 = ((self_in_dispatchConcretize->operands))[0];
		base2 = ((self_in_dispatchConcretize->operands))[1];
		dest1 = ((self_in_dispatchConcretize->operands))[2];
		if (base2 != EBP) {
			((self_in_dispatchConcretize->machineCode))[0] = 139;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 4, dest1));
			((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB4, index2, base2));
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l67;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 139;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, 4, dest1));
		((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB4, index2, base2));
		((self_in_dispatchConcretize->machineCode))[3] = 0;
		(self_in_dispatchConcretize->machineCodeSize) = 4;
	l67:	/* end concretizeMoveXwrRR */;
		return;

	case MoveRXwrR:
		/* begin concretizeMoveRXwrR */
		src1 = ((self_in_dispatchConcretize->operands))[0];
		index3 = ((self_in_dispatchConcretize->operands))[1];
		base3 = ((self_in_dispatchConcretize->operands))[2];
		if (base3 != EBP) {
			((self_in_dispatchConcretize->machineCode))[0] = 137;
			((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 4, src1));
			((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB4, index3, base3));
			(self_in_dispatchConcretize->machineCodeSize) = 3;
			goto l68;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 137;
		((self_in_dispatchConcretize->machineCode))[1] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, 4, src1));
		((self_in_dispatchConcretize->machineCode))[2] = (sib(self_in_dispatchConcretize, SIB4, index3, base3));
		((self_in_dispatchConcretize->machineCode))[3] = 0;
		(self_in_dispatchConcretize->machineCodeSize) = 4;
	l68:	/* end concretizeMoveRXwrR */;
		return;

	case MoveRdM64r:
		/* begin concretizeMoveRdM64r */
		srcReg13 = ((self_in_dispatchConcretize->operands))[0];
		offset15 = ((self_in_dispatchConcretize->operands))[1];
		destReg15 = ((self_in_dispatchConcretize->operands))[2];
		if (destReg15 != ESP) {
			if (isQuick(self_in_dispatchConcretize, offset15)) {
				((self_in_dispatchConcretize->machineCode))[0] = 242;
				((self_in_dispatchConcretize->machineCode))[1] = 15;
				((self_in_dispatchConcretize->machineCode))[2] = 17;
				((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, destReg15, srcReg13));
				((self_in_dispatchConcretize->machineCode))[4] = (offset15 & 0xFF);
				(self_in_dispatchConcretize->machineCodeSize) = 5;
				goto l69;
			}
			((self_in_dispatchConcretize->machineCode))[0] = 242;
			((self_in_dispatchConcretize->machineCode))[1] = 15;
			((self_in_dispatchConcretize->machineCode))[2] = 17;
			((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg15, srcReg13));
			((self_in_dispatchConcretize->machineCode))[4] = (offset15 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset15) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset15) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset15) >> 24) & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 8;
			goto l69;
		}
		if (isQuick(self_in_dispatchConcretize, offset15)) {
			((self_in_dispatchConcretize->machineCode))[0] = 242;
			((self_in_dispatchConcretize->machineCode))[1] = 15;
			((self_in_dispatchConcretize->machineCode))[2] = 17;
			((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, destReg15, srcReg13));
			((self_in_dispatchConcretize->machineCode))[4] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg15));
			((self_in_dispatchConcretize->machineCode))[5] = (offset15 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 6;
			goto l69;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 17;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, destReg15, srcReg13));
		((self_in_dispatchConcretize->machineCode))[4] = (sib(self_in_dispatchConcretize, SIB1, 4, destReg15));
		((self_in_dispatchConcretize->machineCode))[5] = (offset15 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset15) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset15) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[8] = ((((usqInt) offset15) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 9;
	l69:	/* end concretizeMoveRdM64r */;
		return;

	case PopR:
		/* begin concretizePopR */
		((self_in_dispatchConcretize->machineCode))[0] = (88 + (((self_in_dispatchConcretize->operands))[0]));
		(self_in_dispatchConcretize->machineCodeSize) = 1;
		return;

	case PushR:
		/* begin concretizePushR */
		((self_in_dispatchConcretize->machineCode))[0] = (80 + (((self_in_dispatchConcretize->operands))[0]));
		(self_in_dispatchConcretize->machineCodeSize) = 1;
		return;

	case PushCq:
		/* begin concretizePushCq */
		value11 = ((self_in_dispatchConcretize->operands))[0];
		if (isQuick(self_in_dispatchConcretize, value11)) {
			((self_in_dispatchConcretize->machineCode))[0] = 106;
			((self_in_dispatchConcretize->machineCode))[1] = (value11 & 0xFF);
			(self_in_dispatchConcretize->machineCodeSize) = 2;
			goto l72;
		}
		((self_in_dispatchConcretize->machineCode))[0] = 104;
		((self_in_dispatchConcretize->machineCode))[1] = (value11 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value11) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value11) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value11) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 5;
	l72:	/* end concretizePushCq */;
		return;

	case PushCw:
		/* begin concretizePushCw */
		value12 = ((self_in_dispatchConcretize->operands))[0];
		((self_in_dispatchConcretize->machineCode))[0] = 104;
		((self_in_dispatchConcretize->machineCode))[1] = (value12 & 0xFF);
		((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value12) >> 8) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value12) >> 16) & 0xFF);
		((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value12) >> 24) & 0xFF);
		(self_in_dispatchConcretize->machineCodeSize) = 5;
		return;

	case PrefetchAw:
		/* begin concretizePrefetchAw */
		if (((self_in_dispatchConcretize->maxSize)) > 0) {
			addressOperand4 = ((self_in_dispatchConcretize->operands))[0];
			((self_in_dispatchConcretize->machineCode))[0] = 15;
			((self_in_dispatchConcretize->machineCode))[1] = 24;
			((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, 0, 5, 1));
			((self_in_dispatchConcretize->machineCode))[3] = (addressOperand4 & 0xFF);
			((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) addressOperand4) >> 8) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) addressOperand4) >> 16) & 0xFF);
			((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) addressOperand4) >> 24) & 0xFF);
		}
		(self_in_dispatchConcretize->machineCodeSize) = (self_in_dispatchConcretize->maxSize);
		return;

	case ConvertRRd:
		/* begin concretizeConvertRRd */
		srcReg14 = ((self_in_dispatchConcretize->operands))[0];
		destReg16 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 42;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg14, destReg16));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case ConvertRdR:
		/* begin concretizeConvertRdR */
		srcReg15 = ((self_in_dispatchConcretize->operands))[0];
		destReg17 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 45;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg15, destReg17));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case ConvertRsRd:
		/* begin concretizeConvertRsRd */
		srcReg16 = ((self_in_dispatchConcretize->operands))[0];
		destReg18 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 90;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg16, destReg18));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case ConvertRdRs:
		/* begin concretizeConvertRdRs */
		srcReg17 = ((self_in_dispatchConcretize->operands))[0];
		destReg19 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 242;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 90;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg17, destReg19));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case ConvertRsR:
		/* begin concretizeConvertRsR */
		srcReg18 = ((self_in_dispatchConcretize->operands))[0];
		destReg20 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 45;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg18, destReg20));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case ConvertRRs:
		/* begin concretizeConvertRRs */
		srcReg19 = ((self_in_dispatchConcretize->operands))[0];
		destReg21 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 243;
		((self_in_dispatchConcretize->machineCode))[1] = 15;
		((self_in_dispatchConcretize->machineCode))[2] = 42;
		((self_in_dispatchConcretize->machineCode))[3] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg19, destReg21));
		(self_in_dispatchConcretize->machineCodeSize) = 4;
		return;

	case SignExtend8RR:
		/* begin concretizeSignExtend8RR */
		srcReg20 = ((self_in_dispatchConcretize->operands))[0];
		destReg22 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 190;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg20, destReg22));
		(self_in_dispatchConcretize->machineCodeSize) = 3;
		return;

	case SignExtend16RR:
		/* begin concretizeSignExtend16RR */
		srcReg21 = ((self_in_dispatchConcretize->operands))[0];
		destReg23 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 191;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg21, destReg23));
		(self_in_dispatchConcretize->machineCodeSize) = 3;
		return;

	case ZeroExtend8RR:
		/* begin concretizeZeroExtend8RR */
		srcReg22 = ((self_in_dispatchConcretize->operands))[0];
		destReg24 = ((self_in_dispatchConcretize->operands))[1];
		((self_in_dispatchConcretize->machineCode))[0] = 15;
		((self_in_dispatchConcretize->machineCode))[1] = 182;
		((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModReg, srcReg22, destReg24));
		(self_in_dispatchConcretize->machineCodeSize) = 3;
		return;

	case ZeroExtend16RR:
		concretizeZeroExtend16RR(self_in_dispatchConcretize);
		return;

	default:
		error("Case not found and no otherwise clause");
	}
	return;
}


/*	Attempt to generate concrete machine code for the instruction at address.
	This is part of the inner dispatch of concretizeAt: actualAddress which
	exists only
	to get around the number of literals limits in the SqueakV3 (blue book
	derived) bytecode set. */

	/* CogIA32Compiler>>#dispatchConcretizeProcessorSpecific */
static void NoDbgRegParms
dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific)
{
    usqInt addressOperand;
    usqInt addressOperand1;
    usqInt destReg;
    usqInt destReg1;
    usqInt destReg2;
    usqInt destReg3;
    usqInt offset;
    usqInt offset1;
    usqInt offset2;
    usqInt offset3;
    usqInt reg;
    usqInt reg1;
    usqInt reg11;
    usqInt reg2;
    usqInt reg21;
    usqInt reg3;
    usqInt regDivisor;
    usqInt srcReg;
    usqInt srcReg1;
    sqInt srcReg2;
    sqInt srcReg3;

	
	switch ((self_in_dispatchConcretizeProcessorSpecific->opcode)) {
	case CDQ:
		/* begin concretizeCDQ */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 153;
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 1;
		return;

	case IDIVR:
		/* begin concretizeIDIVR */
		regDivisor = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 247;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModReg, regDivisor, 7));
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 2;
		return;

	case IMULRR:
		/* begin concretizeMulRR */
		reg1 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		reg2 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[1];
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 175;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModReg, reg1, reg2));
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 3;
		return;

	case CPUID:
		/* begin concretizeCPUID */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 162;
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 2;
		return;

	case CMPXCHGAwR:
		/* begin concretizeCMPXCHGAwR */
		addressOperand = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		reg = ((self_in_dispatchConcretizeProcessorSpecific->operands))[1];
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 177;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegInd, 5, reg));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (addressOperand & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) addressOperand) >> 8) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) addressOperand) >> 16) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[6] = ((((usqInt) addressOperand) >> 24) & 0xFF);
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 7;
		return;

	case CMPXCHGMwrR:
		/* begin concretizeCMPXCHGMwrR */
		offset = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		srcReg = ((self_in_dispatchConcretizeProcessorSpecific->operands))[1];
		destReg = ((self_in_dispatchConcretizeProcessorSpecific->operands))[2];
		if (srcReg != ESP) {
			if (isQuick(self_in_dispatchConcretizeProcessorSpecific, offset)) {
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 177;
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp8, srcReg, destReg));
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (offset & 0xFF);
				(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 4;
				goto l6;
			}
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 177;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp32, srcReg, destReg));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (offset & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) offset) >> 8) & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) offset) >> 16) & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[6] = ((((usqInt) offset) >> 24) & 0xFF);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 7;
			goto l6;
		}
		if (isQuick(self_in_dispatchConcretizeProcessorSpecific, offset)) {
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 177;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp8, srcReg, destReg));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (sib(self_in_dispatchConcretizeProcessorSpecific, SIB1, 4, srcReg));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = (offset & 0xFF);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 5;
			goto l6;
		}
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 177;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp32, srcReg, destReg));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (sib(self_in_dispatchConcretizeProcessorSpecific, SIB1, 4, srcReg));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = (offset & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) offset) >> 8) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[6] = ((((usqInt) offset) >> 16) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[7] = ((((usqInt) offset) >> 24) & 0xFF);
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 8;
	l6:	/* end concretizeCMPXCHGMwrR */;
		return;

	case LFENCE:
		/* begin concretizeFENCE: */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 174;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModReg, 0, 5));
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 3;
		return;

	case MFENCE:
		/* begin concretizeFENCE: */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 174;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModReg, 0, 6));
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 3;
		return;

	case SFENCE:
		/* begin concretizeFENCE: */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 15;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = 174;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModReg, 0, 7));
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 3;
		return;

	case LOCK:
		/* begin concretizeLOCK */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 240;
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 1;
		return;

	case XCHGAwR:
		/* begin concretizeXCHGAwR */
		addressOperand1 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		reg3 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[1];
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 135;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegInd, 5, reg3));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (addressOperand1 & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = ((((usqInt) addressOperand1) >> 8) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) addressOperand1) >> 16) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) addressOperand1) >> 24) & 0xFF);
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 6;
		return;

	case XCHGMwrR:
		/* begin concretizeXCHGMwrR */
		offset1 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		srcReg1 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[1];
		destReg1 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[2];
		if (srcReg1 != ESP) {
			if (isQuick(self_in_dispatchConcretizeProcessorSpecific, offset1)) {
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 135;
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp8, srcReg1, destReg1));
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (offset1 & 0xFF);
				(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 3;
				goto l12;
			}
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 135;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp32, srcReg1, destReg1));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (offset1 & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = ((((usqInt) offset1) >> 8) & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) offset1) >> 16) & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) offset1) >> 24) & 0xFF);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 6;
			goto l12;
		}
		if (isQuick(self_in_dispatchConcretizeProcessorSpecific, offset1)) {
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 135;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp8, srcReg1, destReg1));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (sib(self_in_dispatchConcretizeProcessorSpecific, SIB1, 4, srcReg1));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (offset1 & 0xFF);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 4;
			goto l12;
		}
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 135;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp32, srcReg1, destReg1));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (sib(self_in_dispatchConcretizeProcessorSpecific, SIB1, 4, srcReg1));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (offset1 & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) offset1) >> 8) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) offset1) >> 16) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[6] = ((((usqInt) offset1) >> 24) & 0xFF);
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 7;
	l12:	/* end concretizeXCHGMwrR */;
		return;

	case XCHGRR:
		/* begin concretizeXCHGRR */
		reg11 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		reg21 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[1];
		if (reg21 == EAX) {
			reg21 = reg11;
			reg11 = EAX;
		}
		if (reg11 == EAX) {
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = (144 + reg21);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 1;
			goto l13;
		}
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 135;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModReg, reg11, reg21));
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 2;
	l13:	/* end concretizeXCHGRR */;
		return;

	case FSTPS:
		/* begin concretizeFSTPS */
		srcReg2 = 3;
		offset2 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		destReg2 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[1];
		if (destReg2 != ESP) {
			if (isQuick(self_in_dispatchConcretizeProcessorSpecific, offset2)) {

				/* FSTP dest */
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 217;
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp8, destReg2, srcReg2));
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (offset2 & 0xFF);
				(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 3;
				goto l14;
			}
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 217;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp32, destReg2, srcReg2));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (offset2 & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = ((((usqInt) offset2) >> 8) & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) offset2) >> 16) & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) offset2) >> 24) & 0xFF);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 6;
			goto l14;
		}
		if (isQuick(self_in_dispatchConcretizeProcessorSpecific, offset2)) {
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 217;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp8, destReg2, srcReg2));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (sib(self_in_dispatchConcretizeProcessorSpecific, SIB1, 4, destReg2));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (offset2 & 0xFF);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 4;
			goto l14;
		}
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 217;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp32, destReg2, srcReg2));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (sib(self_in_dispatchConcretizeProcessorSpecific, SIB1, 4, destReg2));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (offset2 & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) offset2) >> 8) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) offset2) >> 16) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[6] = ((((usqInt) offset2) >> 24) & 0xFF);
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 7;
	l14:	/* end concretizeFSTPS */;
		return;

	case FSTPD:
		/* begin concretizeFSTPD */
		srcReg3 = 3;
		offset3 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[0];
		destReg3 = ((self_in_dispatchConcretizeProcessorSpecific->operands))[1];
		if (destReg3 != ESP) {
			if (isQuick(self_in_dispatchConcretizeProcessorSpecific, offset3)) {

				/* FSTP dest */
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 221;
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp8, destReg3, srcReg3));
				((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (offset3 & 0xFF);
				(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 3;
				goto l15;
			}
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 221;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp32, destReg3, srcReg3));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (offset3 & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = ((((usqInt) offset3) >> 8) & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) offset3) >> 16) & 0xFF);
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) offset3) >> 24) & 0xFF);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 6;
			goto l15;
		}
		if (isQuick(self_in_dispatchConcretizeProcessorSpecific, offset3)) {
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 221;
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp8, destReg3, srcReg3));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (sib(self_in_dispatchConcretizeProcessorSpecific, SIB1, 4, destReg3));
			((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (offset3 & 0xFF);
			(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 4;
			goto l15;
		}
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 221;
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[1] = (modRMRO(self_in_dispatchConcretizeProcessorSpecific, ModRegRegDisp32, destReg3, srcReg3));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[2] = (sib(self_in_dispatchConcretizeProcessorSpecific, SIB1, 4, destReg3));
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[3] = (offset3 & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[4] = ((((usqInt) offset3) >> 8) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[5] = ((((usqInt) offset3) >> 16) & 0xFF);
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[6] = ((((usqInt) offset3) >> 24) & 0xFF);
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 7;
	l15:	/* end concretizeFSTPD */;
		return;

	case REP:
		/* begin concretizeREP */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 243;
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 1;
		return;

	case CLD:
		/* begin concretizeCLD */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 0xFC;
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 1;
		return;

	case MOVSB:
		/* begin concretizeMOVSB */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 164;
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 1;
		return;

	case MOVSD:
		/* begin concretizeMOVSD */
		((self_in_dispatchConcretizeProcessorSpecific->machineCode))[0] = 165;
		(self_in_dispatchConcretizeProcessorSpecific->machineCodeSize) = 1;
		return;

	default:
		error("Case not found and no otherwise clause");
	}
	return;
}


/*	Answer if CallFull and/or JumpFull are relative and hence need relocating
	on method
	compation. If so, they are annotated with IsRelativeCall in methods and
	relocated in
	relocateIfCallOrMethodReference:mcpc:delta: */

	/* CogIA32Compiler>>#fullCallsAreRelative */
static sqInt NoDbgRegParms
fullCallsAreRelative(AbstractInstruction * self_in_fullCallsAreRelative)
{
	return 1;
}

	/* CogIA32Compiler>>#genDivR:R:Quo:Rem: */
static AbstractInstruction * NoDbgRegParms
genDivRRQuoRem(AbstractInstruction * self_in_genDivRRQuoRem, sqInt abstractRegDivisor, sqInt abstractRegDividend, sqInt abstractRegQuotient, sqInt abstractRegRemainder)
{
    sqInt rDividend;
    sqInt rDivisor;
    sqInt reg;
    sqInt rQuotient;
    sqInt rRemainder;
    sqInt rUnused;
    sqInt saveRestoreEAX;
    sqInt saveRestoreEDX;
    sqInt saveRestoreExchanged;

	assert(abstractRegDividend != abstractRegDivisor);
	assert(abstractRegQuotient != abstractRegRemainder);
	rDividend = abstractRegDividend;
	rDivisor = abstractRegDivisor;
	rQuotient = abstractRegQuotient;

	/* IDIV r does a signed divide of EDX:EAX by r, EAX := Quotient, EDX := Remainder.
	   Since we must sign extend the dividend into EDX we must substitute another register if EDX is an input */
	rRemainder = abstractRegRemainder;
	if ((rDividend == EDX)
	 || (rDivisor == EDX)) {

		/* Slang, sigh... */
		rUnused = EAX;
		while (rUnused <= EDI) {
			if ((rUnused != ESP)
			 && ((rUnused != EBP)
			 && ((rUnused != EDX)
			 && ((rUnused != rDividend)
			 && ((rUnused != rDivisor)
			 && ((rUnused != rQuotient)
			 && (rUnused != rRemainder))))))) {
				genoperand(PushR, rUnused);
				genoperandoperand(MoveRR, EDX, rUnused);
				if (rDividend == EDX) {
					genDivRRQuoRem(self_in_genDivRRQuoRem, rDivisor, rUnused, rQuotient, rRemainder);
				}
				else {
					genDivRRQuoRem(self_in_genDivRRQuoRem, rUnused, rDividend, rQuotient, rRemainder);
				}
				genoperand(PopR, rUnused);
				return self_in_genDivRRQuoRem;
			}
			rUnused += 1;
		}
		error("couldn't find unused register in genDivR:R:Quo:Rem:");
	}
	if ((saveRestoreEAX = (rQuotient != EAX)
	 && (rRemainder != EAX))) {
		genoperand(PushR, EAX);
	}
	if ((saveRestoreEDX = (rQuotient != EDX)
	 && (rRemainder != EDX))) {
		genoperand(PushR, EDX);
	}
	saveRestoreExchanged = -1;
	if (rDividend != EAX) {
		if (rDivisor == EAX) {
			if (((rDividend != rQuotient)
			 && (rDividend != rRemainder))
			 && ((rDividend != EDX)
			 || (!saveRestoreEDX))) {
				/* begin PushR: */
				reg = (saveRestoreExchanged = rDividend);
				genoperand(PushR, reg);
			}
			genoperandoperand(XCHGRR, rDivisor, rDividend);
		}
		else {
			genoperandoperand(MoveRR, rDividend, EAX);
		}
	}
	gen(CDQ);
	genoperand(IDIVR, (rDivisor == EAX
		? rDividend
		: rDivisor));
	if ((rQuotient == EDX)
	 && (rRemainder == EAX)) {
		genoperandoperand(XCHGRR, rQuotient, rRemainder);
	}
	else {
		if (rQuotient == EDX) {
			if (rRemainder != EDX) {
				genoperandoperand(MoveRR, EDX, rRemainder);
			}
			if (rQuotient != EAX) {
				genoperandoperand(MoveRR, EAX, rQuotient);
			}
		}
		else {
			if (rQuotient != EAX) {
				genoperandoperand(MoveRR, EAX, rQuotient);
			}
			if (rRemainder != EDX) {
				genoperandoperand(MoveRR, EDX, rRemainder);
			}
		}
	}
	if (saveRestoreExchanged >= 0) {
		genoperand(PopR, saveRestoreExchanged);
	}
	if (saveRestoreEDX) {
		genoperand(PopR, EDX);
	}
	if (saveRestoreEAX) {
		genoperand(PopR, EAX);
	}
	return self_in_genDivRRQuoRem;
}

	/* CogIA32Compiler>>#generateCheckFeatures */
static AbstractInstruction * NoDbgRegParms
generateCheckFeatures(AbstractInstruction * self_in_generateCheckFeatures)
{
    AbstractInstruction *anInstruction;

	genoperand(PushR, EDX);
	genoperand(PushR, ECX);
	genoperand(PushR, EBX);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(MoveCqR, 1, EAX);
	gen(CPUID);
	genoperandoperand(MoveRR, EDX, EAX);
	genoperand(PopR, EBX);
	genoperand(PopR, ECX);
	genoperand(PopR, EDX);
	genoperand(RetN, 0);
	return self_in_generateCheckFeatures;
}


/*	Generate a function that attempts to lock the vmOwnerLock and answers
	true if it succeeded. */

	/* CogIA32Compiler>>#generateLowLevelTryLock: */
static AbstractInstruction * NoDbgRegParms
generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, sqInt vmOwnerLockAddress)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;

	if (vmOwnerLockAddress == 0) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, 1, EAX);
		genoperand(RetN, 0);
		return self_in_generateLowLevelTryLock;
	}
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(MoveCqR, 1, EAX);
	gen(MFENCE);
	genoperandoperand(XCHGAwR, vmOwnerLockAddress, EAX);
	gen(SFENCE);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(SubCqR, 1, EAX);
	genoperand(RetN, 0);
	return self_in_generateLowLevelTryLock;
}

	/* CogIA32Compiler>>#generateLowLevelUnlock: */
static AbstractInstruction * NoDbgRegParms
generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;

	if (vmOwnerLockAddress != 0) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, 0, EAX);
		/* begin checkLiteral:forInstruction: */
		anInstruction1 = genoperandoperand(MoveRAw, EAX, vmOwnerLockAddress);
		gen(SFENCE);
	}
	genoperand(RetN, 0);
	return self_in_generateLowLevelUnlock;
}


/*	Load the stack pointer register with that of the C stack, effecting
	a switch to the C stack. Used when machine code calls into the
	CoInterpreter run-time (e.g. to invoke interpreter primitives). */

	/* CogIA32Compiler>>#genLoadCStackPointer */
static sqInt NoDbgRegParms
genLoadCStackPointer(AbstractInstruction * self_in_genLoadCStackPointer)
{
    sqInt address;
    AbstractInstruction *anInstruction;

	/* begin MoveAw:R: */
	address = cStackPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, SPReg);
	return 0;
}


/*	Load the frame and stack pointer registers with those of the C stack,
	effecting a switch to the C stack. Used when machine code calls into
	the CoInterpreter run-time (e.g. to invoke interpreter primitives). */

	/* CogIA32Compiler>>#genLoadCStackPointers */
static sqInt NoDbgRegParms
genLoadCStackPointers(AbstractInstruction * self_in_genLoadCStackPointers)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;

	/* begin MoveAw:R: */
	address = cStackPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, SPReg);
	/* begin MoveAw:R: */
	address1 = cFramePointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveAwR, address1, FPReg);
	return 0;
}


/*	Switch back to the Smalltalk stack. Assign SPReg first
	because typically it is used immediately afterwards. */

	/* CogIA32Compiler>>#genLoadStackPointers */
static sqInt NoDbgRegParms
genLoadStackPointers(AbstractInstruction * self_in_genLoadStackPointers)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;

	/* begin MoveAw:R: */
	address = stackPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, SPReg);
	/* begin MoveAw:R: */
	address1 = framePointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveAwR, address1, FPReg);
	return 0;
}


/*	Get the abstract registers for ECX, EDI and ESI */

	/* CogIA32Compiler>>#genMemCopy:to:constantSize: */
static AbstractInstruction * NoDbgRegParms
genMemCopytoconstantSize(AbstractInstruction * self_in_genMemCopytoconstantSize, sqInt originalSourceReg, sqInt originalDestReg, sqInt size)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt countReg;
    sqInt destReg;
    AbstractInstruction * inst;
    sqInt numbytes;
    sqInt numwords;
    sqInt sourceReg;

	sourceReg = ESI;
	destReg = EDI;

	/* Put the source in ESI and the dest in EDI */
	countReg = ECX;
	inst = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	if (originalSourceReg != sourceReg) {
		if (originalDestReg == sourceReg) {
			genoperandoperand(MoveRR, originalDestReg, TempReg);
		}
		genoperandoperand(MoveRR, originalSourceReg, sourceReg);
	}
	if (originalDestReg != destReg) {
		if (originalDestReg == sourceReg) {
			genoperandoperand(MoveRR, TempReg, destReg);
		}
		else {
			genoperandoperand(MoveRR, originalDestReg, destReg);
		}
	}
	gen(CLD);
	numbytes = size & 3;
	if (numbytes > 0) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, numbytes, countReg);
		gen(REP);
		gen(MOVSB);
	}
	numwords = size / 4;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(MoveCqR, numwords, countReg);
	gen(REP);
	gen(MOVSD);
	return self_in_genMemCopytoconstantSize;
}


/*	Get the abstract registers for ECX, EDI and ESI */

	/* CogIA32Compiler>>#genMemCopy:to:size: */
static AbstractInstruction * NoDbgRegParms
genMemCopytosize(AbstractInstruction * self_in_genMemCopytosize, sqInt originalSourceReg, sqInt originalDestReg, sqInt originalSize)
{
    AbstractInstruction *anInstruction;
    sqInt countReg;
    sqInt destReg;
    AbstractInstruction * inst;
    sqInt size;
    sqInt sourceReg;
    sqInt spilledSize;

	sourceReg = ESI;
	destReg = EDI;

	/* TODO: Avoid spilling */
	countReg = ECX;
	spilledSize = 0;
	if ((originalSize == sourceReg)
	 || (originalSize == destReg)) {
		genoperand(PushR, originalSize);
		spilledSize = 1;
	}
	inst = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	if (originalSourceReg != sourceReg) {
		if (originalDestReg == sourceReg) {
			genoperandoperand(MoveRR, originalDestReg, TempReg);
		}
		genoperandoperand(MoveRR, originalSourceReg, sourceReg);
	}
	if (originalDestReg != destReg) {
		if (originalDestReg == sourceReg) {
			genoperandoperand(MoveRR, TempReg, destReg);
		}
		else {
			genoperandoperand(MoveRR, originalDestReg, destReg);
		}
	}
	if (spilledSize) {
		genoperand(PopR, TempReg);
		size = TempReg;
	}
	else {
		if (originalSize == countReg) {
			genoperandoperand(MoveRR, originalSize, TempReg);
			size = TempReg;
		}
		else {
			size = originalSize;
		}
	}
	gen(CLD);
	genoperandoperand(MoveRR, size, countReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AndCqR, 3, countReg);
	gen(REP);
	gen(MOVSB);
	genoperandoperand(MoveRR, size, countReg);
	genoperandoperand(LogicalShiftRightCqR, 2, countReg);
	gen(REP);
	gen(MOVSD);
	return self_in_genMemCopytosize;
}

	/* CogIA32Compiler>>#genMulR:R: */
static AbstractInstruction * NoDbgRegParms
genMulRR(AbstractInstruction * self_in_genMulRR, sqInt regSource, sqInt regDest)
{
	return genoperandoperand(IMULRR, regSource, regDest);
}


/*	Ensure that the register args are pushed before the outer and
	inner retpcs at an entry miss for arity <= self numRegArgs. The
	outer retpc is that of a call at a send site. The inner is the call
	from a method or PIC abort/miss to the trampoline. */
/*	This won't be as clumsy on a RISC. But putting the receiver and
	args above the return address means the CoInterpreter has a
	single machine-code frame format which saves us a lot of work. */
/*	Iff there are register args convert
	base	->	outerRetpc		(send site retpc)
	sp		->	innerRetpc		(PIC abort/miss retpc)
	to
	base	->	receiver
	(arg0)
	(arg1)
	outerRetpc
	sp		->	innerRetpc		(PIC abort/miss retpc) */

	/* CogIA32Compiler>>#genPushRegisterArgsForAbortMissNumArgs: */
static AbstractInstruction * NoDbgRegParms
genPushRegisterArgsForAbortMissNumArgs(AbstractInstruction * self_in_genPushRegisterArgsForAbortMissNumArgs, sqInt numArgs)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt literal;
    sqInt literal1;
    sqInt literal10;
    sqInt literal2;
    sqInt literal3;
    sqInt literal4;
    sqInt literal5;
    sqInt literal6;
    sqInt literal7;
    sqInt literal8;
    sqInt literal9;

	if (numArgs <= 2 /* numRegArgs */) {
		assert((numRegArgs()) <= 2);
		if (numArgs == 0) {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction = genoperandoperandoperand(MoveMwrR, 0, SPReg, TempReg);
			genoperand(PushR, TempReg);
			/* begin checkQuickConstant:forInstruction: */
			literal = BytesPerWord * 2;
			anInstruction1 = genoperandoperandoperand(MoveMwrR, BytesPerWord * 2, SPReg, TempReg);
			/* begin checkQuickConstant:forInstruction: */
			literal1 = BytesPerWord;
			anInstruction2 = genoperandoperandoperand(MoveRMwr, TempReg, BytesPerWord, SPReg);
			/* begin checkQuickConstant:forInstruction: */
			literal2 = 2 * BytesPerWord;
			anInstruction3 = genoperandoperandoperand(MoveRMwr, ReceiverResultReg, 2 * BytesPerWord, SPReg);
			return self_in_genPushRegisterArgsForAbortMissNumArgs;
		}
		if (numArgs == 1) {
			/* begin checkQuickConstant:forInstruction: */
			literal3 = BytesPerWord;
			anInstruction4 = genoperandoperandoperand(MoveMwrR, BytesPerWord, SPReg, TempReg);
			genoperand(PushR, TempReg);
			/* begin checkQuickConstant:forInstruction: */
			literal4 = BytesPerWord;
			anInstruction5 = genoperandoperandoperand(MoveMwrR, BytesPerWord, SPReg, TempReg);
			genoperand(PushR, TempReg);
			/* begin checkQuickConstant:forInstruction: */
			literal5 = 3 * BytesPerWord;
			anInstruction6 = genoperandoperandoperand(MoveRMwr, ReceiverResultReg, 3 * BytesPerWord, SPReg);
			/* begin checkQuickConstant:forInstruction: */
			literal6 = 2 * BytesPerWord;
			anInstruction7 = genoperandoperandoperand(MoveRMwr, Arg0Reg, 2 * BytesPerWord, SPReg);
			return self_in_genPushRegisterArgsForAbortMissNumArgs;
		}
		if (numArgs == 2) {
			genoperand(PushR, Arg1Reg);
			/* begin checkQuickConstant:forInstruction: */
			literal7 = BytesPerWord * 2;
			anInstruction8 = genoperandoperandoperand(MoveMwrR, BytesPerWord * 2, SPReg, TempReg);
			genoperand(PushR, TempReg);
			/* begin checkQuickConstant:forInstruction: */
			literal8 = BytesPerWord * 2;
			anInstruction9 = genoperandoperandoperand(MoveMwrR, BytesPerWord * 2, SPReg, TempReg);
			genoperand(PushR, TempReg);
			/* begin checkQuickConstant:forInstruction: */
			literal9 = 4 * BytesPerWord;
			anInstruction10 = genoperandoperandoperand(MoveRMwr, ReceiverResultReg, 4 * BytesPerWord, SPReg);
			/* begin checkQuickConstant:forInstruction: */
			literal10 = 3 * BytesPerWord;
			anInstruction11 = genoperandoperandoperand(MoveRMwr, Arg0Reg, 3 * BytesPerWord, SPReg);
			return self_in_genPushRegisterArgsForAbortMissNumArgs;
		}
	}
	return self_in_genPushRegisterArgsForAbortMissNumArgs;
}


/*	Ensure that the register args are pushed before the retpc for arity <=
	self numRegArgs. This
	isn't as clumsy on a RISC. But putting the receiver and args above the
	return address
	means the CoInterpreter has a single machine-code frame format which saves
	us a lot of work.
	N.B. Take great care to /not/ smash TempReg, which is used in directed
	send marshalling.
	We could use XCHG to swap the ReceiverResultReg and top-of-stack return
	address, pushing the
	the ret pc (now in ReceiverResultReg) later, but XCHG is very slow. We can
	use SendNumArgsReg
	because it is only live in sends of arity >= (NumSendTrampolines - 1). */

	/* CogIA32Compiler>>#genPushRegisterArgsForNumArgs:scratchReg: */
static AbstractInstruction * NoDbgRegParms
genPushRegisterArgsForNumArgsscratchReg(AbstractInstruction * self_in_genPushRegisterArgsForNumArgsscratchReg, sqInt numArgs, sqInt scratchReg)
{
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;

	assert((numRegArgs()) < (NumSendTrampolines - 1));
	if (numArgs <= 2 /* numRegArgs */) {
		assert((numRegArgs()) <= 2);
		
		/* a.k.a.
		   cogit gen: XCHGMwrR operand: 0 operand: SPReg operand: ReceiverResultReg.
		   but XCHG is slow. */
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperandoperand(MoveMwrR, 0, SPReg, scratchReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction3 = genoperandoperandoperand(MoveRMwr, ReceiverResultReg, 0, SPReg);
		if (numArgs > 0) {
			genoperand(PushR, Arg0Reg);
			if (numArgs > 1) {
				genoperand(PushR, Arg1Reg);
			}
		}
		genoperand(PushR, scratchReg);
	}
	return self_in_genPushRegisterArgsForNumArgsscratchReg;
}


/*	Restore the registers in regMask as saved by genSaveRegs:. */

	/* CogIA32Compiler>>#genRestoreRegs: */
static sqInt NoDbgRegParms
genRestoreRegs(AbstractInstruction * self_in_genRestoreRegs, sqInt regMask)
{
    sqInt reg;

	assert(!((regMask & (registerMaskForand(ESP, EBP)))));
	for (reg = EAX; reg <= EDI; reg += 1) {
		if (regMask & (1U << reg)) {
			genoperand(PopR, reg);
		}
	}
	return 0;
}


/*	Save the registers in regMask for a call into the C run-time from a
	trampoline. 
 */

	/* CogIA32Compiler>>#genSaveRegs: */
static sqInt NoDbgRegParms
genSaveRegs(AbstractInstruction * self_in_genSaveRegs, sqInt regMask)
{
    sqInt reg;

	assert(((EDI - EAX) + 1) == 8);
	assert(!((regMask & (registerMaskForand(ESP, EBP)))));
	for (reg = EDI; reg >= EAX; reg += -1) {
		if (regMask & (1U << reg)) {
			genoperand(PushR, reg);
		}
	}
	return 0;
}


/*	Save the frame and stack pointer registers to the framePointer
	and stackPointer variables. Used to save the machine code frame
	for use by the run-time when calling into the CoInterpreter run-time. */

	/* CogIA32Compiler>>#genSaveStackPointers */
static sqInt NoDbgRegParms
genSaveStackPointers(AbstractInstruction * self_in_genSaveStackPointers)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;

	/* begin MoveR:Aw: */
	address = framePointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveRAw, FPReg, address);
	/* begin MoveR:Aw: */
	address1 = stackPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveRAw, SPReg, address1);
	return 0;
}

	/* CogIA32Compiler>>#genSubstituteReturnAddress: */
static AbstractInstruction * NoDbgRegParms
genSubstituteReturnAddress(AbstractInstruction * self_in_genSubstituteReturnAddress, sqInt retpc)
{
    AbstractInstruction *anInstruction;

	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperand(PushCw, retpc);
	return anInstruction;
}

	/* CogIA32Compiler>>#genSwapR:R:Scratch: */
static AbstractInstruction * NoDbgRegParms
genSwapRRScratch(AbstractInstruction * self_in_genSwapRRScratch, sqInt regA, sqInt regB, sqInt regTmp)
{
	return genoperandoperand(XCHGRR, regA, regB);
}


/*	Answer if we support SSE2 */

	/* CogIA32Compiler>>#hasSSE2Instructions */
static sqInt NoDbgRegParms
hasSSE2Instructions(AbstractInstruction * self_in_hasSSE2Instructions)
{
	return ((ceCheckFeatures()) & (1U << 26)) != 0;
}


/*	Answer if we support SSE */

	/* CogIA32Compiler>>#hasSSEInstructions */
static sqInt NoDbgRegParms
hasSSEInstructions(AbstractInstruction * self_in_hasSSEInstructions)
{
	return ((ceCheckFeatures()) & (1U << 25)) != 0;
}


/*	Answer the inline cache tag for the return address of a send. */

	/* CogIA32Compiler>>#inlineCacheTagAt: */
static sqInt NoDbgRegParms
inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress)
{
	return literalBeforeFollowingAddress(self_in_inlineCacheTagAt, callSiteReturnAddress - 5);
}


/*	Answer the instruction size at pc. This is very far from a full decode.
	It only has to cope with the instructions generated in a block dispatch. */

	/* CogIA32Compiler>>#instructionSizeAt: */
static sqInt NoDbgRegParms
instructionSizeAt(AbstractInstruction * self_in_instructionSizeAt, sqInt pc)
{
    sqInt op;

	op = byteAt(pc);
	
	switch (op) {
	case 15:
		return twoByteInstructionSizeAt(self_in_instructionSizeAt, pc);

	case 61:
	case 233:
		return 5;

	case 112:
	case 113:
	case 114:
	case 115:
	case 116:
	case 117:
	case 118:
	case 119:
	case 120:
	case 121:
	case 122:
	case 123:
	case 0x7C:
	case 125:
	case 0x7E:
	case 0x7F:
	case 137:
	case 235:
		return 2;

	case 131:
		return sizeImmediateGroup1at(self_in_instructionSizeAt, op, pc);

	case 139:
		return sizeHasModrmat(self_in_instructionSizeAt, op, pc);

	case 144:
	case 204:
		return 1;

	default:
		error("Case not found and no otherwise clause");
		return -1;
	}
}


/*	Assuming mcpc is a send return pc answer if the instruction before it is a
	call (not a CallFull).
 */

	/* CogIA32Compiler>>#isCallPrecedingReturnPC: */
static sqInt NoDbgRegParms
isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc)
{
	return (byteAt(mcpc - 5)) == 232;
}

	/* CogIA32Compiler>>#isJumpAt: */
static sqInt NoDbgRegParms
isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc)
{
    sqInt op;

	op = byteAt(pc);
	return (((op >= 112) && (op <= 0x7F)))
	 || ((op == 233)
	 || ((op == 235)
	 || ((op == 15)
	 && ((((byteAt(pc + 1)) >= 128) && ((byteAt(pc + 1)) <= 143))))));
}


/*	Answer if the receiver is a pc-dependent instruction. */

	/* CogIA32Compiler>>#isPCDependent */
static sqInt NoDbgRegParms
isPCDependent(AbstractInstruction * self_in_isPCDependent)
{
	return (isJump(self_in_isPCDependent))
	 || (((self_in_isPCDependent->opcode)) == AlignmentNops);
}

	/* CogIA32Compiler>>#isQuick: */
static sqInt NoDbgRegParms
isQuick(AbstractInstruction * self_in_isQuick, usqIntptr_t operand)
{
	return (((((int) operand)) >= -128) && ((((int) operand)) <= 0x7F));
}


/*	Set the target of a jump instruction. These all have the target in the
	first operand. */
/*	Set the target of a jump instruction. These all have the target in the
	first operand.
	Override to cope with JumpFPNotEqual where because of IEEE NaN conformance
	and the behaviour of COMISD/UCOMISD we generate two jumps to the same
	target.  */

	/* CogIA32Compiler>>#jmpTarget: */
static AbstractInstruction * NoDbgRegParms
jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction)
{
    AbstractInstruction *aDependent;

	aDependent = (self_in_jmpTarget->dependent);
	while (aDependent != null) {
		jmpTarget(aDependent, anAbstractInstruction);
		aDependent = (aDependent->dependent);
	}
	((self_in_jmpTarget->operands))[0] = (((usqInt)anAbstractInstruction));
	return anAbstractInstruction;
}


/*	Branch/Call ranges. Jump[Cond] can be generated as short as possible.
	Call/Jump[Cond]Long must be generated
	in the same number of bytes irrespective of displacement since their
	targets may be updated, but they need only
	span 16Mb, the maximum size of the code zone. This allows e.g. ARM to use
	single-word call and jump instructions
	for most calls and jumps. CallFull/JumpFull must also be generated in the
	same number of bytes irrespective of
	displacement for the same reason, but they must be able to span the full
	(32-bit or 64-bit) address space because
	they are used to call code in the C runtime, which may be distant from the
	code zone
 */

	/* CogIA32Compiler>>#jumpLongByteSize */
static sqInt NoDbgRegParms
jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize)
{
	return 5;
}

	/* CogIA32Compiler>>#jumpLongConditionalByteSize */
static sqInt NoDbgRegParms
jumpLongConditionalByteSize(AbstractInstruction * self_in_jumpLongConditionalByteSize)
{
	return 6;
}


/*	Answer the target address for the long jump immediately preceding mcpc */

	/* CogIA32Compiler>>#jumpLongTargetBeforeFollowingAddress: */
static sqInt NoDbgRegParms
jumpLongTargetBeforeFollowingAddress(AbstractInstruction * self_in_jumpLongTargetBeforeFollowingAddress, sqInt mcpc)
{
	return callTargetFromReturnAddress(self_in_jumpLongTargetBeforeFollowingAddress, mcpc);
}

	/* CogIA32Compiler>>#jumpShortByteSize */
static sqInt NoDbgRegParms
jumpShortByteSize(AbstractInstruction * self_in_jumpShortByteSize)
{
	return 2;
}

	/* CogIA32Compiler>>#jumpTargetPCAt: */
static usqInt NoDbgRegParms
jumpTargetPCAt(AbstractInstruction * self_in_jumpTargetPCAt, sqInt pc)
{
    sqInt byte;
    sqInt offset;
    sqInt size;

	size = instructionSizeAt(self_in_jumpTargetPCAt, pc);
	if (size == 2) {
		byte = byteAt(pc + 1);
		offset = ((byte & 128) == 0
			? byte
			: byte - 256);
	}
	else {
		byte = byteAt((pc + size) - 1);
		offset = ((byte & 128) == 0
			? byte
			: byte - 256);
		offset = (((sqInt)((usqInt)(offset) << 8))) + (byteAt((pc + size) - 2));
		offset = (((sqInt)((usqInt)(offset) << 8))) + (byteAt((pc + size) - 3));
		offset = (((sqInt)((usqInt)(offset) << 8))) + (byteAt((pc + size) - 4));
	}
	return (pc + size) + offset;
}


/*	Answer the delta from the stack pointer after a call to the stack pointer
	immediately prior to the call. This is used to compute the stack pointer
	immediately prior to call from within a leaf routine, which in turn is
	used to capture the c stack pointer to use in trampolines back into the C
	run-time.  */

	/* CogIA32Compiler>>#leafCallStackPointerDelta */
static sqInt NoDbgRegParms
leafCallStackPointerDelta(AbstractInstruction * self_in_leafCallStackPointerDelta)
{
	return 4;
}


/*	Answer the literal embedded in the instruction immediately preceding
	followingAddress. 
 */

	/* CogIA32Compiler>>#literalBeforeFollowingAddress: */
static sqInt NoDbgRegParms
literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress)
{
	return (((((sqInt)((usqInt)((byteAt(followingAddress - 1))) << 24))) + (((sqInt)((usqInt)((byteAt(followingAddress - 2))) << 16)))) + (((sqInt)((usqInt)((byteAt(followingAddress - 3))) << 8)))) + (byteAt(followingAddress - 4));
}


/*	Answer a literal loaded before the inline cache tag load for the return
	address of a send.
 */

	/* CogIA32Compiler>>#literalBeforeInlineCacheTagAt: */
static sqInt NoDbgRegParms
literalBeforeInlineCacheTagAt(AbstractInstruction * self_in_literalBeforeInlineCacheTagAt, sqInt callSiteReturnAddress)
{
	return literalBeforeFollowingAddress(self_in_literalBeforeInlineCacheTagAt, callSiteReturnAddress - 10);
}


/*	Answer the byte size of a MoveCwR opcode's corresponding machine code */

	/* CogIA32Compiler>>#loadLiteralByteSize */
static sqInt NoDbgRegParms
loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize)
{
	return 5;
}


/*	Answer the byte size of a MoveCwR opcode's corresponding machine code
	when the argument is a PIC. This is for the self-reference at the end of a
	closed PIC. */

	/* CogIA32Compiler>>#loadPICLiteralByteSize */
static sqInt NoDbgRegParms
loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize)
{
	/* begin loadLiteralByteSize */
	return 5;
}

	/* CogIA32Compiler>>#machineCodeAt: */
static usqInt NoDbgRegParms
machineCodeAt(AbstractInstruction * self_in_machineCodeAt, sqInt anOffset)
{
	return ((self_in_machineCodeAt->machineCode))[anOffset];
}


/*	Answer the maximum number of bytes of machine code generated for any
	abstract instruction.
	e.g. lock movsd 0x400(%esp),%xmm4 => f0 f2 0f 10 a4 24 00 04 00 00 */

	/* CogIA32Compiler>>#machineCodeBytes */
static sqInt NoDbgRegParms
machineCodeBytes(AbstractInstruction * self_in_machineCodeBytes)
{
	return 10;
}


/*	See ModR/M byte & opcode syntax
	In addition to the notation shown above in 'Mnemonic Syntax' on page 43,
	the following notation indicates the size and type of operands in the
	syntax of an instruction opcode:
	/digit	Indicates that the ModRM byte specifies only one register or memory
	(r/m) operand.
	The digit is specified by the ModRM reg field and is used as an
	instruction-opcode extension.
	Valid digit values range from 0 to 7.
	/r		Indicates that the ModRM byte specifies both a register operand and a
	reg/mem (register or memory) operand. */

	/* CogIA32Compiler>>#mod:RM:RO: */
static sqInt NoDbgRegParms
modRMRO(AbstractInstruction * self_in_modRMRO, sqInt mod, sqInt regMode, sqInt regOpcode)
{
	return ((((sqInt)((usqInt)(mod) << 6))) + (((sqInt)((usqInt)(regOpcode) << 3)))) + regMode;
}


/*	Answer the number of opcodes required to compile the CPUID call to extract
	the extended features information.
 */

	/* CogIA32Compiler>>#numCheckFeaturesOpcodes */
static sqInt NoDbgRegParms
numCheckFeaturesOpcodes(AbstractInstruction * self_in_numCheckFeaturesOpcodes)
{
	return 11;
}

	/* CogIA32Compiler>>#numIntRegArgs */
static sqInt NoDbgRegParms
numIntRegArgs(AbstractInstruction * self_in_numIntRegArgs)
{
	return 0;
}


/*	push $ebx
	movl #0, %eax
	movl 1, $ebx
	mfence
	lock cmpxchg %eax, &vmOwnerLock; # N.B. 2 instructions
	pop $ebx
	jnz locked
	sfence
	movl 1, $eax
	ret
	locked:								; N.B. Requires an instruction
	movl 0, $eax
	ret */

	/* CogIA32Compiler>>#numLowLevelLockOpcodes */
static sqInt NoDbgRegParms
numLowLevelLockOpcodes(AbstractInstruction * self_in_numLowLevelLockOpcodes)
{
	return 14;
}

	/* CogIA32Compiler>>#padIfPossibleWithStopsFrom:to: */
static AbstractInstruction * NoDbgRegParms
padIfPossibleWithStopsFromto(AbstractInstruction * self_in_padIfPossibleWithStopsFromto, sqInt startAddr, sqInt endAddr)
{
	stopsFromto(self_in_padIfPossibleWithStopsFromto, startAddr, endAddr);
	return self_in_padIfPossibleWithStopsFromto;
}

	/* CogIA32Compiler>>#relocateCallBeforeReturnPC:by: */
static AbstractInstruction * NoDbgRegParms
relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta)
{
    sqInt distance;

	if (delta != 0) {
		distance = (((((sqInt)((usqInt)((byteAt(retpc - 1))) << 24))) + (((sqInt)((usqInt)((byteAt(retpc - 2))) << 16)))) + (((sqInt)((usqInt)((byteAt(retpc - 3))) << 8)))) + (byteAt(retpc - 4));
		distance += delta;
		byteAtput(retpc - 1, (((usqInt) distance) >> 24) & 0xFF);
		byteAtput(retpc - 2, (((usqInt) distance) >> 16) & 0xFF);
		byteAtput(retpc - 3, (((usqInt) distance) >> 8) & 0xFF);
		byteAtput(retpc - 4, distance & 0xFF);
	}
	return self_in_relocateCallBeforeReturnPCby;
}

	/* CogIA32Compiler>>#relocateMethodReferenceBeforeAddress:by: */
static AbstractInstruction * NoDbgRegParms
relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta)
{
	relocateCallBeforeReturnPCby(self_in_relocateMethodReferenceBeforeAddressby, pc, delta);
	return self_in_relocateMethodReferenceBeforeAddressby;
}


/*	Rewrite a call instruction to call a different target. This variant is
	used to link PICs
	in ceSendMiss et al, and to rewrite cached primitive calls. Answer the
	extent of
	the code change which is used to compute the range of the icache to flush. */
/*	self cCode: ''
	inSmalltalk: [cogit disassembleFrom: callSiteReturnAddress - 10 to:
	callSiteReturnAddress - 1]. */

	/* CogIA32Compiler>>#rewriteCallAt:target: */
static sqInt NoDbgRegParms
rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress)
{
    usqInt callDistance;

	if (!(callTargetAddress >= (minCallAddress()))) {
		error("linking callsite to invalid address");
	}
	callDistance = ((usqInt) (callTargetAddress - callSiteReturnAddress));
	byteAtput(callSiteReturnAddress - 1, (((usqInt) callDistance) >> 24) & 0xFF);
	byteAtput(callSiteReturnAddress - 2, (((usqInt) callDistance) >> 16) & 0xFF);
	byteAtput(callSiteReturnAddress - 3, (((usqInt) callDistance) >> 8) & 0xFF);
	byteAtput(callSiteReturnAddress - 4, callDistance & 0xFF);
	assert((callTargetFromReturnAddress(self_in_rewriteCallAttarget, callSiteReturnAddress)) == callTargetAddress);
	return 5;
}


/*	Rewrite the short jump instruction to jump to a new cpic case target. */
/*	prevent type inference for avoiding warning on abs */

	/* CogIA32Compiler>>#rewriteCPICJumpAt:target: */
static AbstractInstruction * NoDbgRegParms
rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr)
{
    sqInt callDistance;

	callDistance = jumpTargetAddr - addressFollowingJump;
	assert((SQABS(callDistance)) < 128);
	byteAtput(addressFollowingJump - 1, callDistance & 0xFF);
	return self_in_rewriteCPICJumpAttarget;
}


/*	Rewrite an inline cache to call a different target for a new tag. This
	variant is used
	to link unlinked sends in ceSend:to:numArgs: et al. Answer the extent of
	the code
	change which is used to compute the range of the icache to flush. */
/*	self cCode: ''
	inSmalltalk: [cogit disassembleFrom: callSiteReturnAddress - 10 to:
	callSiteReturnAddress - 1]. */

	/* CogIA32Compiler>>#rewriteInlineCacheAt:tag:target: */
static sqInt NoDbgRegParms
rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress)
{
    usqInt callDistance;

	if (!(callTargetAddress >= (minCallAddress()))) {
		error("linking callsite to invalid address");
	}
	callDistance = ((usqInt) (callTargetAddress - callSiteReturnAddress));
	byteAtput(callSiteReturnAddress - 1, (((usqInt) callDistance) >> 24) & 0xFF);
	byteAtput(callSiteReturnAddress - 2, (((usqInt) callDistance) >> 16) & 0xFF);
	byteAtput(callSiteReturnAddress - 3, (((usqInt) callDistance) >> 8) & 0xFF);
	byteAtput(callSiteReturnAddress - 4, callDistance & 0xFF);
	byteAtput(callSiteReturnAddress - 6, (((usqInt) cacheTag) >> 24) & 0xFF);
	byteAtput(callSiteReturnAddress - 7, (((usqInt) cacheTag) >> 16) & 0xFF);
	byteAtput(callSiteReturnAddress - 8, (((usqInt) cacheTag) >> 8) & 0xFF);
	byteAtput(callSiteReturnAddress - 9, cacheTag & 0xFF);
	assert((callTargetFromReturnAddress(self_in_rewriteInlineCacheAttagtarget, callSiteReturnAddress)) == callTargetAddress);
	return 10;
}


/*	Rewrite an inline cache with a new tag. This variant is used
	by the garbage collector. */

	/* CogIA32Compiler>>#rewriteInlineCacheTag:at: */
static AbstractInstruction * NoDbgRegParms
rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress)
{
	byteAtput(callSiteReturnAddress - 6, (((usqInt) cacheTag) >> 24) & 0xFF);
	byteAtput(callSiteReturnAddress - 7, (((usqInt) cacheTag) >> 16) & 0xFF);
	byteAtput(callSiteReturnAddress - 8, (((usqInt) cacheTag) >> 8) & 0xFF);
	byteAtput(callSiteReturnAddress - 9, cacheTag & 0xFF);
	return self_in_rewriteInlineCacheTagat;
}


/*	Rewrite a long jump instruction to jump to a different target. This
	variant is used to rewrite cached primitive calls. Answer the extent of
	the code change which is used to compute the range of the icache to flush. */

	/* CogIA32Compiler>>#rewriteJumpLongAt:target: */
static sqInt NoDbgRegParms
rewriteJumpLongAttarget(AbstractInstruction * self_in_rewriteJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress)
{
	return rewriteCallAttarget(self_in_rewriteJumpLongAttarget, callSiteReturnAddress, callTargetAddress);
}


/*	to save Slang from having to be a real compiler (it can't inline switches
	that return)
 */
/*	Answer if the receiver's opcode sets the condition codes correctly for the
	given conditional jump opcode.
 */

	/* CogIA32Compiler>>#setsConditionCodesFor: */
static sqInt NoDbgRegParms
setsConditionCodesFor(AbstractInstruction * self_in_setsConditionCodesFor, sqInt aConditionalJumpOpcode)
{
	
	switch ((self_in_setsConditionCodesFor->opcode)) {
	case ArithmeticShiftRightCqR:
	case ArithmeticShiftRightRR:
	case LogicalShiftLeftCqR:
	case LogicalShiftLeftRR:
		return ((aConditionalJumpOpcode >= JumpZero) && (aConditionalJumpOpcode <= JumpNonNegative));

	case XorRR:
		return 1;

	default:
		haltmsg("unhandled opcode in setsConditionCodesFor:");
		return 0;

	}
}

	/* CogIA32Compiler>>#sizeHasModrm:at: */
static sqInt NoDbgRegParms
sizeHasModrmat(AbstractInstruction * self_in_sizeHasModrmat, sqInt op, sqInt pc)
{
    sqInt mod;
    sqInt modrm;
    sqInt rm;
    sqInt ro;

	modrm = byteAt(pc + 1);
	mod = ((usqInt) modrm) >> 6;
	ro = (((usqInt) modrm) >> 3) & 7;
	rm = modrm & 7;
	if (mod == 3) {
		return 2;
	}
	if (rm != 4) {

		/* no SIB byte */
		
		switch (mod) {
		case 0:
			return (rm == 5
				? 6
				: 3);

		case 1:
			return 3;

		case 2:
			return 6;

		default:
			error("Case not found and no otherwise clause");
			return -1;
		}
	}
	haltmsg("fall through in sizeHasModrm:at:");
	return 0;
}


/*	see [1] p A-7, p A-13 */

	/* CogIA32Compiler>>#sizeImmediateGroup1:at: */
static sqInt NoDbgRegParms
sizeImmediateGroup1at(AbstractInstruction * self_in_sizeImmediateGroup1at, sqInt op, sqInt pc)
{
    sqInt mod;
    sqInt modrm;
    sqInt rm;
    sqInt ro;

	modrm = byteAt(pc + 1);
	mod = ((usqInt) modrm) >> 6;
	ro = (((usqInt) modrm) >> 3) & 7;
	rm = modrm & 7;
	
	switch (ro) {
	case 7:
		return (op == 129
			? 6
			: 3);

	default:
		error("Case not found and no otherwise clause");
		return -1;
	}
}


/*	Size a jump and set its address. The target may be another instruction
	or an absolute address. On entry the address inst var holds our virtual
	address. On exit address is set to eventualAbsoluteAddress, which is
	where this instruction will be output. The span of a jump to a following
	instruction is therefore between that instruction's address and this
	instruction's address ((which are both still their virtual addresses), but
	the span of a jump to a preceding instruction or to an absolute address is
	between that instruction's address (which by now is its eventual absolute
	address) or absolute address and eventualAbsoluteAddress. */

	/* CogIA32Compiler>>#sizePCDependentInstructionAt: */
static usqInt NoDbgRegParms
sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress)
{
    AbstractInstruction *abstractInstruction;
    usqInt alignment;
    sqInt maximumSpan;
    usqInt target;

	if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) {
		(self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress;
		alignment = ((self_in_sizePCDependentInstructionAt->operands))[0];
		return ((self_in_sizePCDependentInstructionAt->machineCodeSize) = ((eventualAbsoluteAddress + (alignment - 1)) & (-alignment)) - eventualAbsoluteAddress);
	}
	assert(isJump(self_in_sizePCDependentInstructionAt));
	target = ((self_in_sizePCDependentInstructionAt->operands))[0];
	abstractInstruction = ((AbstractInstruction *) target);
	if ((addressIsInInstructions(abstractInstruction))
	 || (abstractInstruction == (methodLabel()))) {
		maximumSpan = ((abstractInstruction->address)) - (((abstractInstructionfollows(self_in_sizePCDependentInstructionAt, abstractInstruction)
	? eventualAbsoluteAddress
	: (self_in_sizePCDependentInstructionAt->address))) + 2);
	}
	else {
		maximumSpan = target - (eventualAbsoluteAddress + 2);
	}
	(self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress;
	return ((self_in_sizePCDependentInstructionAt->machineCodeSize) = (((self_in_sizePCDependentInstructionAt->opcode)) >= FirstShortJump
		? (isQuick(self_in_sizePCDependentInstructionAt, maximumSpan)
				? 2
				: (((self_in_sizePCDependentInstructionAt->opcode)) == Jump
						? 5
						: 6))
		: ((((self_in_sizePCDependentInstructionAt->opcode)) == JumpLong)
			 || (((self_in_sizePCDependentInstructionAt->opcode)) == JumpFull)
				? 5
				: 6)));
}

	/* CogIA32Compiler>>#stackBytesForNumArgs: */
static sqInt NoDbgRegParms
stackBytesForNumArgs(AbstractInstruction * self_in_stackBytesForNumArgs, sqInt numArgs)
{
	return numArgs * 4;
}


/*	Return a minimum amount of headroom for each stack page (in bytes). In a
	JIT the stack has to have room for interrupt handlers which will run on
	the stack.
	See [1] pp 6-13 to 6-14. On an interrupt or exception the maximum state
	that an IA32 CPU will push is SS, ESP, EFLAGS, CS, EIP and an error code.
	It may then
	call an interrupt procedure. Leave some room above the minimum state. */

	/* CogIA32Compiler>>#stackPageInterruptHeadroomBytes */
static sqInt NoDbgRegParms
stackPageInterruptHeadroomBytes(AbstractInstruction * self_in_stackPageInterruptHeadroomBytes)
{
	return 256;
}

	/* CogIA32Compiler>>#stopsFrom:to: */
static AbstractInstruction * NoDbgRegParms
stopsFromto(AbstractInstruction * self_in_stopsFromto, sqInt startAddr, sqInt endAddr)
{
	memset(startAddr, 204 /* stop */, (endAddr - startAddr) + 1);
	return self_in_stopsFromto;
}


/*	Rewrite the literal in the instruction immediately preceding
	followingAddress. 
 */

	/* CogIA32Compiler>>#storeLiteral:beforeFollowingAddress: */
static AbstractInstruction * NoDbgRegParms
storeLiteralbeforeFollowingAddress(AbstractInstruction * self_in_storeLiteralbeforeFollowingAddress, sqInt literal, sqInt followingAddress)
{
	byteAtput(followingAddress - 1, (((usqInt) literal) >> 24) & 0xFF);
	byteAtput(followingAddress - 2, (((usqInt) literal) >> 16) & 0xFF);
	byteAtput(followingAddress - 3, (((usqInt) literal) >> 8) & 0xFF);
	byteAtput(followingAddress - 4, literal & 0xFF);
	return self_in_storeLiteralbeforeFollowingAddress;
}

	/* CogIA32Compiler>>#s:i:b: */
static sqInt NoDbgRegParms
sib(AbstractInstruction * self_in_sib, sqInt scale, sqInt indexReg, sqInt baseReg)
{
	return ((((sqInt)((usqInt)(scale) << 6))) + (((sqInt)((usqInt)(indexReg) << 3)))) + baseReg;
}

	/* CogIA32Compiler>>#twoByteInstructionSizeAt: */
static sqInt NoDbgRegParms
twoByteInstructionSizeAt(AbstractInstruction * self_in_twoByteInstructionSizeAt, sqInt pc)
{
    sqInt op;

	op = byteAt(pc + 1);
	
	switch (op & 240) {
	case 128:
		
		/* long conditional jumps */
		return 6;

	default:
		error("Case not found and no otherwise clause");
		return -1;
	}
}

	/* CogIA32Compiler>>#unsignedShortAt: */
static sqInt NoDbgRegParms
unsignedShortAt(AbstractInstruction * self_in_unsignedShortAt, sqInt byteAddress)
{
	return (byteAt(byteAddress)) + (((usqInt) (byteAt(byteAddress + 1)) << 8));
}


/*	Answer if Call and JumpLong are relative and hence need to take the
	caller's relocation delta into account during code compaction, rather than
	just the
	callee's delta. */

	/* CogIA32Compiler>>#zoneCallsAreRelative */
static sqInt NoDbgRegParms
zoneCallsAreRelative(AbstractInstruction * self_in_zoneCallsAreRelative)
{
	return 1;
}

	/* Cogit>>#AddCq:R: */
static AbstractInstruction * NoDbgRegParms
gAddCqR(sqInt quickConstant, sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AddCqR, quickConstant, reg);
	return anInstruction;
}

	/* Cogit>>#AndCq:R: */
static AbstractInstruction * NoDbgRegParms
gAndCqR(sqInt quickConstant, sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AndCqR, quickConstant, reg);
	return anInstruction;
}

	/* Cogit>>#AndCq:R:R: */
static AbstractInstruction * NoDbgRegParms
gAndCqRR(sqInt quickConstant, sqInt srcReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *first;

	if (srcReg == destReg) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(AndCqR, quickConstant, destReg);
		return anInstruction;
	}
	first = genoperandoperand(MoveRR, srcReg, destReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant, destReg);
	return first;
}

	/* Cogit>>#abortOffset */
sqInt
abortOffset(void)
{
	return missOffset;
}

	/* Cogit>>#abstractInstruction:follows: */
static sqInt NoDbgRegParms
abstractInstructionfollows(AbstractInstruction *theAbstractInstruction, AbstractInstruction *anAbstractInstruction)
{
	return theAbstractInstruction > anAbstractInstruction;
}

	/* Cogit>>#addCleanBlockStarts */
static void
addCleanBlockStarts(void)
{
    sqInt i;
    sqInt iLimiT;
    sqInt lit;
    sqInt startPCOrNil;

	for (i = 1, iLimiT = (literalCountOf(methodObj)); i <= iLimiT; i += 1) {
		lit = fetchPointerofObject(i, methodObj);
		startPCOrNil = startPCOrNilOfLiteralin(lit, methodObj);
		if (!(startPCOrNil == null)) {
			maxLitIndex = ((maxLitIndex < i) ? i : maxLitIndex);
			addBlockStartAtnumArgsnumCopiedspan(startPCOrNil - 1, argumentCountOfClosure(lit), copiedValueCountOfClosure(lit), spanForCleanBlockStartingAt(startPCOrNil - 1));
		}
	}
}


/*	Perform an integrity/leak check using the heapMap.
	Set a bit at each cog method's header. */

	/* Cogit>>#addCogMethodsToHeapMap */
void
addCogMethodsToHeapMap(void)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			heapMapAtWordPut(cogMethod, 1);
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
}

	/* Cogit>>#addressIsInFixups: */
static sqInt NoDbgRegParms
addressIsInFixups(BytecodeFixup *address)
{
	return (BytecodeFixup *)address >= fixups && (BytecodeFixup *)address < (fixups + numAbstractOpcodes);
}

	/* Cogit>>#addressIsInInstructions: */
static sqInt NoDbgRegParms
addressIsInInstructions(AbstractInstruction *address)
{
	return !((usqInt)(address) & BytesPerWord-1) \
				&& (address) >= &abstractOpcodes[0] \
				&& (address) < &abstractOpcodes[opcodeIndex];
}


/*	calculate the end of the n'th case statement - which is complicated
	because we have case 1 right at the top of our CPIC and then build up from
	the last one. Yes I know this sounds strange, but trust me - I'm an
	Engineer, we do things backwards all the emit
 */

	/* Cogit>>#addressOfEndOfCase:inCPIC: */
static sqInt NoDbgRegParms
addressOfEndOfCaseinCPIC(sqInt n, CogMethod *cPIC)
{
	assert((n >= 1)
	 && (n <= MaxCPICCases));
	return (n == 1
		? (((sqInt)cPIC)) + firstCPICCaseOffset
		: ((((sqInt)cPIC)) + firstCPICCaseOffset) + (((MaxCPICCases + 1) - n) * cPICCaseSize));
}

	/* Cogit>>#alignUptoRoutineBoundary: */
static sqInt NoDbgRegParms
alignUptoRoutineBoundary(sqInt anAddress)
{
	return (((anAddress + 7) | 7) - 7);
}


/*	Check that all methods have valid selectors, and that all linked sends are
	to valid targets and have valid cache tags
 */

	/* Cogit>>#allMachineCodeObjectReferencesValid */
static sqInt
allMachineCodeObjectReferencesValid(void)
{
    CogMethod *cogMethod;
    sqInt ok;

	ok = 1;
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) != CMFree) {
			if (!(asserta(checkValidOopReference((cogMethod->selector))))) {
				ok = 0;
			}
			if (!(asserta((cogMethodDoesntLookKosher(cogMethod)) == 0))) {
				ok = 0;
			}
		}
		if ((((cogMethod->cmType)) == CMMethod)
		 || (((cogMethod->cmType)) == CMOpenPIC)) {
			if (!(asserta((mapForperformUntilarg(cogMethod, checkIfValidOopRefAndTargetpccogMethod, ((sqInt)cogMethod))) == 0))) {
				ok = 0;
			}
		}
		if (((cogMethod->cmType)) == CMClosedPIC) {
			if (!(asserta(noTargetsFreeInClosedPIC(cogMethod)))) {
				ok = 0;
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	return ok;
}

	/* Cogit>>#allMethodsHaveCorrectHeader */
static sqInt
allMethodsHaveCorrectHeader(void)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			if (!(((cogMethod->objectHeader)) == (nullHeaderForMachineCodeMethod()))) {
				return 0;
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	return 1;
}

	/* Cogit>>#annotateAbsolutePCRef: */
static AbstractInstruction * NoDbgRegParms
annotateAbsolutePCRef(AbstractInstruction *abstractInstruction)
{
	(abstractInstruction->annotation = IsAbsPCReference);
	return abstractInstruction;
}

	/* Cogit>>#annotateBytecode: */
static AbstractInstruction * NoDbgRegParms
annotateBytecode(AbstractInstruction *abstractInstruction)
{
	(abstractInstruction->annotation = HasBytecodePC);
	return abstractInstruction;
}

	/* Cogit>>#annotate:objRef: */
static AbstractInstruction * NoDbgRegParms
annotateobjRef(AbstractInstruction *abstractInstruction, sqInt anOop)
{
	if (shouldAnnotateObjectReference(anOop)) {
		if (isYoungObject(anOop)) {
			hasYoungReferent = 1;
		}
		(abstractInstruction->annotation = IsObjectReference);
	}
	return abstractInstruction;
}

	/* Cogit>>#assertSaneJumpTarget: */
static void NoDbgRegParms
assertSaneJumpTarget(AbstractInstruction *jumpTarget)
{
	assert((closedPICSize == null)
	 || ((openPICSize == null)
	 || ((addressIsInInstructions(jumpTarget))
	 || ((((((usqInt)jumpTarget)) >= codeBase) && ((((usqInt)jumpTarget)) <= ((((sqInt)(limitZony()))) + (((closedPICSize < openPICSize) ? openPICSize : closedPICSize)))))))));
}


/*	Evaluate binaryFunction with the block start mcpc and supplied arg for
	each entry in the block dispatch. If the function answers non-zero answer
	the value
	it answered. Used to update back-references to the home method in
	compaction.  */

	/* Cogit>>#blockDispatchTargetsFor:perform:arg: */
static sqInt NoDbgRegParms
blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg)
{
    sqInt blockEntry;
    usqInt end;
    sqInt pc;
    sqInt result;
    usqInt targetpc;

	if (((cogMethod->blockEntryOffset)) == 0) {
		return null;
	}
	blockEntry = ((cogMethod->blockEntryOffset)) + (((sqInt)cogMethod));
	pc = blockEntry;
	end = (mapEndFor(cogMethod)) - 1;
	while (pc < end) {
		if (isJumpAt(backEnd, pc)) {
			targetpc = jumpTargetPCAt(backEnd, pc);
			if (targetpc < blockEntry) {
				result = binaryFunction(targetpc, arg);
				if (result != 0) {
					return result;
				}
			}
		}
		pc += instructionSizeAt(backEnd, pc);
	}
	return 0;
}


/*	Answer the zero-relative bytecode pc matching the machine code pc argument
	in cogMethod, given the start of the bytecodes for cogMethod's block or
	method object. */

	/* Cogit>>#bytecodePCFor:startBcpc:in: */
sqInt
bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod)
{
    sqInt aMethodHeader;
    sqInt aMethodHeader1;
    sqInt aMethodObj;
    sqInt annotation;
    sqInt bcpc;
    sqInt bsOffset;
    sqInt byte;
    BytecodeDescriptor *descriptor;
    sqInt distance;
    sqInt endbcpc;
    CogMethod *homeMethod;
    sqInt isBackwardBranch;
    sqInt isInBlock;
    sqInt latestContinuation;
    usqInt map;
    sqInt mapByte;
    usqInt mcpc1;
    sqInt nExts;
    sqInt nextBcpc;
    sqInt result;
    sqInt targetPC;

	latestContinuation = 0;
	/* begin mapFor:bcpc:performUntil:arg: */
	assert(((cogMethod->stackCheckOffset)) > 0);

	/* The stack check maps to the start of the first bytecode,
	   the first bytecode being effectively after frame build. */
	mcpc1 = (((usqInt)cogMethod)) + ((cogMethod->stackCheckOffset));
	result = findIsBackwardBranchMcpcBcpcMatchingMcpc(null, (0 + (((int)((usqInt)(HasBytecodePC) << 1)))), (((char *) mcpc1)), startbcpc, (((void *)mcpc)));
	if (result != 0) {
		return result;
	}

	/* In both CMMethod and CMBlock cases find the start of the map and
	   skip forward to the bytecode pc map entry for the stack check. */
	bcpc = startbcpc;
	if (((cogMethod->cmType)) == CMMethod) {
		/* begin cmIsFullBlock */
		isInBlock = (cogMethod->cpicHasMNUCaseOrCMIsFullBlock);
		homeMethod = ((CogMethod *) cogMethod);
		assert(startbcpc == (startPCOfMethodHeader((homeMethod->methodHeader))));
		map = ((((usqInt)homeMethod)) + ((homeMethod->blockSize))) - 1;
		annotation = ((usqInt) (byteAt(map))) >> AnnotationShift;
		assert((annotation == IsAbsPCReference)
		 || ((annotation == IsObjectReference)
		 || ((annotation == IsRelativeCall)
		 || (annotation == IsDisplacementX2N))));
		latestContinuation = startbcpc;
		aMethodObj = (homeMethod->methodObject);
		endbcpc = (numBytesOf(aMethodObj)) - 1;
		/* begin bytecodeSetOffsetForHeader: */
		aMethodHeader = (homeMethod->methodHeader);
		bsOffset = 
#    if MULTIPLEBYTECODESETS
			(headerIndicatesAlternateBytecodeSet(aMethodHeader)
						? 256
						: 0)
#    else /* MULTIPLEBYTECODESETS */
			0
#    endif /* MULTIPLEBYTECODESETS */
			;
		bcpc += deltaToSkipPrimAndErrorStoreInheader(aMethodObj, (homeMethod->methodHeader));
	}
	else {
		isInBlock = 1;
		assert(bcpc == ((cogMethod->startpc)));
		homeMethod = cmHomeMethod(cogMethod);
		map = findMapLocationForMcpcinMethod((((usqInt)cogMethod)) + (sizeof(CogBlockMethod)), homeMethod);
		assert(map != 0);
		annotation = ((usqInt) (byteAt(map))) >> AnnotationShift;
		assert(((((usqInt) annotation) >> AnnotationShift) == HasBytecodePC)
		 || ((((usqInt) annotation) >> AnnotationShift) == IsDisplacementX2N));
		while (((annotation = ((usqInt) (byteAt(map))) >> AnnotationShift)) != HasBytecodePC) {
			map -= 1;
		}

		/* skip fiducial; i.e. the map entry for the pc immediately following the method header. */
		map -= 1;
		aMethodObj = (homeMethod->methodObject);
		bcpc = startbcpc - (
#if MULTIPLEBYTECODESETS
	(headerIndicatesAlternateBytecodeSet((homeMethod->methodHeader))
		? AltBlockCreationBytecodeSize
		: BlockCreationBytecodeSize)
#else /* MULTIPLEBYTECODESETS */
	BlockCreationBytecodeSize
#endif /* MULTIPLEBYTECODESETS */
	);
		/* begin bytecodeSetOffsetForHeader: */
		aMethodHeader1 = (homeMethod->methodHeader);
		bsOffset = 
#    if MULTIPLEBYTECODESETS
			(headerIndicatesAlternateBytecodeSet(aMethodHeader1)
						? 256
						: 0)
#    else /* MULTIPLEBYTECODESETS */
			0
#    endif /* MULTIPLEBYTECODESETS */
			;
		byte = (fetchByteofObject(bcpc, aMethodObj)) + bsOffset;
		descriptor = generatorAt(byte);
		endbcpc = (bcpc + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? (/* begin spanFor:at:exts:in: */
		((descriptor->spanFunction))(descriptor, bcpc, -1, aMethodObj))
	: 0));
		bcpc = startbcpc;
	}
	nExts = 0;
	while ((((usqInt) (byteAt(map))) >> AnnotationShift) != HasBytecodePC) {
		map -= 1;
	}
	map -= 1;
	while (((mapByte = byteAt(map))) != MapEnd) {

		/* defensive; we exit on bcpc */
		if (mapByte >= FirstAnnotation) {
			annotation = ((usqInt) mapByte) >> AnnotationShift;
			mcpc1 += (mapByte & DisplacementMask);
			if (annotation >= HasBytecodePC) {
				if ((annotation == IsSendCall)
				 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
					annotation += mapByte & DisplacementMask;
					map -= 1;
				}
				while (1) {
					byte = (fetchByteofObject(bcpc, aMethodObj)) + bsOffset;
					descriptor = generatorAt(byte);
					if (isInBlock) {
						if (bcpc >= endbcpc) {
							return 0;
						}
					}
					else {
						if (((descriptor->isReturn))
						 && (bcpc >= latestContinuation)) {
							return 0;
						}
						if ((isBranch(descriptor))
						 || ((descriptor->isBlockCreation))) {
							/* begin latestContinuationPCFor:at:exts:in: */
							distance = ((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj);
							targetPC = (bcpc + ((descriptor->numBytes))) + (((distance < 0) ? 0 : distance));
							latestContinuation = ((latestContinuation < targetPC) ? targetPC : latestContinuation);
						}
						latestContinuation = latestContinuation;
					}
					nextBcpc = (bcpc + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? (/* begin spanFor:at:exts:in: */
		((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj))
	: 0));
					if (((descriptor->isMapped))
					 || (isInBlock
					 && ((descriptor->isMappedInBlock)))) break;
					bcpc = nextBcpc;
					nExts = ((descriptor->isExtension)
						? nExts + 1
						: 0);
				}
				isBackwardBranch = (isBranch(descriptor))
				 && ((assert(((descriptor->spanFunction)) != null),
				(((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj)) < 0));
				result = findIsBackwardBranchMcpcBcpcMatchingMcpc(descriptor, ((isBackwardBranch
	? (((sqInt)((usqInt)(annotation) << 1))) + 1
	: ((sqInt)((usqInt)(annotation) << 1)))), (((char *) mcpc1)), ((isBackwardBranch
	? bcpc - (2 * nExts)
	: bcpc)), (((void *)mcpc)));
				if (result != 0) {
					return result;
				}
				bcpc = nextBcpc;
				nExts = ((descriptor->isExtension)
					? nExts + 1
					: 0);
			}
		}
		else {
			assert(((((usqInt) mapByte) >> AnnotationShift) == IsDisplacementX2N)
			 || ((((usqInt) mapByte) >> AnnotationShift) == IsAnnotationExtension));
			if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
				mcpc1 += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
			}
		}
		map -= 1;
	}
	return 0;
}

	/* Cogit>>#CallRT:registersToBeSavedMask: */
static AbstractInstruction * NoDbgRegParms
CallRTregistersToBeSavedMask(sqInt callTarget, sqInt registersToBeSaved)
{
    AbstractInstruction *abstractInstruction;
    sqInt callerSavedRegsToBeSaved;
    AbstractInstruction *lastInst;
    sqInt reg;
    sqInt registersToBePushed;

	reg = 0;
	callerSavedRegsToBeSaved = CallerSavedRegisterMask & registersToBeSaved;
	registersToBePushed = callerSavedRegsToBeSaved;
	reg = 0;
	while (registersToBePushed != 0) {
		if (registersToBePushed & 1) {
			genoperand(PushR, reg);
		}
		reg += 1;
		registersToBePushed = ((sqInt) registersToBePushed) >> 1;
	}
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, callTarget);
	(abstractInstruction->annotation = IsRelativeCall);
	lastInst = abstractInstruction;
	while (reg > 0) {
		reg -= 1;
		if (callerSavedRegsToBeSaved & (1U << reg)) {
			lastInst = genoperand(PopR, reg);
		}
	}
	return lastInst;
}

	/* Cogit>>#Call: */
static AbstractInstruction * NoDbgRegParms
gCall(sqInt callTarget)
{
	return genoperand(Call, callTarget);
}

	/* Cogit>>#CmpCq:R: */
static AbstractInstruction * NoDbgRegParms
gCmpCqR(sqInt quickConstant, sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, quickConstant, reg);
	return anInstruction;
}


/*	This is a static version of ceCallCogCodePopReceiverReg
	for break-pointing when debugging in C. */
/*	This exists only for break-pointing. */

	/* Cogit>>#callCogCodePopReceiver */
void
callCogCodePopReceiver(void)
{
	realCECallCogCodePopReceiverReg();
	error("what??");
}


/*	This is a static version of ceCallCogCodePopReceiverAndClassRegs
	for break-pointing when debugging in C. */
/*	This exists only for break-pointing. */

	/* Cogit>>#callCogCodePopReceiverAndClassRegs */
void
callCogCodePopReceiverAndClassRegs(void)
{
	realCECallCogCodePopReceiverAndClassRegs();
}


/*	Code entry closed PIC miss. A send has fallen
	through a closed (finite) polymorphic inline cache.
	Either extend it or patch the send site to an open PIC.
	The stack looks like:
	receiver
	args
	sp=>	sender return address */

	/* Cogit>>#ceCPICMiss:receiver: */
sqInt
ceCPICMissreceiver(CogMethod *cPIC, sqInt receiver)
{
    sqInt cacheTag;
    sqInt errorSelectorOrNil;
    sqInt methodOrSelectorIndex;
    sqInt newTargetMethodOrNil;
    sqInt outerReturn;
    sqInt result;
    sqInt selector;

	if (isOopForwarded(receiver)) {
		return ceSendFromInLineCacheMiss(cPIC);
	}
	outerReturn = stackTop();
	assert(!(((inlineCacheTagAt(backEnd, outerReturn)) == (picAbortDiscriminatorValue()))));
	if (((cPIC->cPICNumCases)) < MaxCPICCases) {
		/* begin lookup:for:methodAndErrorSelectorInto: */
		selector = (cPIC->selector);
		methodOrSelectorIndex = lookupOrdinaryreceiver(selector, receiver);
		if ((((usqInt)methodOrSelectorIndex)) > (maxLookupNoMNUErrorCode())) {
			if (!(isOopCompiledMethod(methodOrSelectorIndex))) {
				newTargetMethodOrNil = methodOrSelectorIndex;
				errorSelectorOrNil = SelectorCannotInterpret;
				goto l1;
			}
			if ((!(methodHasCogMethod(methodOrSelectorIndex)))
			 && (methodShouldBeCogged(methodOrSelectorIndex))) {

				/* We assume cog:selector: will *not* reclaim the method zone */
				cogselector(methodOrSelectorIndex, selector);
			}
			newTargetMethodOrNil = methodOrSelectorIndex;
			errorSelectorOrNil = null;
			goto l1;
		}
		if (methodOrSelectorIndex == SelectorDoesNotUnderstand) {
			methodOrSelectorIndex = lookupMNUreceiver(splObj(SelectorDoesNotUnderstand), receiver);
			if ((((usqInt)methodOrSelectorIndex)) > (maxLookupNoMNUErrorCode())) {
				assert(isOopCompiledMethod(methodOrSelectorIndex));
				if ((!(methodHasCogMethod(methodOrSelectorIndex)))
				 && (methodShouldBeCogged(methodOrSelectorIndex))) {

					/* We assume cog:selector: will *not* reclaim the method zone */
					cogselector(methodOrSelectorIndex, splObj(SelectorDoesNotUnderstand));
				}
				newTargetMethodOrNil = methodOrSelectorIndex;
				errorSelectorOrNil = SelectorDoesNotUnderstand;
				goto l1;
			}
			newTargetMethodOrNil = null;
			errorSelectorOrNil = SelectorDoesNotUnderstand;
			goto l1;
		}
		newTargetMethodOrNil = null;
		errorSelectorOrNil = methodOrSelectorIndex;
	l1:	/* end lookup:for:methodAndErrorSelectorInto: */;
	}
	else {
		newTargetMethodOrNil = (errorSelectorOrNil = null);
	}
	assert(outerReturn == (stackTop()));
	cacheTag = inlineCacheTagForInstance(receiver);
	if ((((cPIC->cPICNumCases)) >= MaxCPICCases)
	 || (((errorSelectorOrNil != null)
	 && (errorSelectorOrNil != SelectorDoesNotUnderstand))
	 || ((newTargetMethodOrNil == null)
	 || (isYoung(newTargetMethodOrNil))))) {
		result = patchToOpenPICFornumArgsreceiver((cPIC->selector), (cPIC->cmNumArgs), receiver);
		assert(!result);
		return ceSendFromInLineCacheMiss(cPIC);
	}
	cogExtendPICCaseNMethodtagisMNUCase(cPIC, newTargetMethodOrNil, cacheTag, errorSelectorOrNil == SelectorDoesNotUnderstand);
	executeCogPICfromLinkedSendWithReceiverandCacheTag(cPIC, receiver, inlineCacheTagAt(backEnd, outerReturn));
	return null;
}

	/* Cogit>>#ceFree: */
void
ceFree(void *pointer)
{
	free(pointer);
}

	/* Cogit>>#ceMalloc: */
void*
ceMalloc(size_t size)
{
	return malloc(size);
}


/*	An in-line cache check in a method has failed. The failing entry check has
	jumped to the ceMethodAbort abort call at the start of the method which
	has called this routine.
	If possible allocate a closed PIC for the current and existing classes.
	The stack looks like:
	receiver
	args
	sender return address
	sp=>	ceMethodAbort call return address
	So we can find the method that did the failing entry check at
	ceMethodAbort call return address - missOffset
	and we can find the send site from the outer return address. */

	/* Cogit>>#ceSICMiss: */
sqInt
ceSICMiss(sqInt receiver)
{
    sqInt cacheTag;
    sqInt entryPoint;
    sqInt errorSelectorOrNil;
    sqInt extent;
    usqInt innerReturn;
    sqInt methodOrSelectorIndex;
    sqInt newTargetMethodOrNil;
    usqInt outerReturn;
    CogMethod *pic;
    sqInt result;
    sqInt selector;
    CogMethod *targetMethod;


	/* Whether we can relink to a PIC or not we need to pop off the inner return and identify the target method. */
	innerReturn = ((usqInt)(popStack()));
	targetMethod = ((CogMethod *) (innerReturn - missOffset));
	if (isOopForwarded(receiver)) {
		return ceSendFromInLineCacheMiss(targetMethod);
	}
	outerReturn = ((usqInt)(stackTop()));
	assert(((outerReturn >= methodZoneBase) && (outerReturn <= (freeStart()))));
	entryPoint = callTargetFromReturnAddress(backEnd, outerReturn);
	assert(((targetMethod->selector)) != (nilObject()));
	assert(((((sqInt)targetMethod)) + cmEntryOffset) == entryPoint);
	/* begin lookup:for:methodAndErrorSelectorInto: */
	selector = (targetMethod->selector);
	methodOrSelectorIndex = lookupOrdinaryreceiver(selector, receiver);
	if ((((usqInt)methodOrSelectorIndex)) > (maxLookupNoMNUErrorCode())) {
		if (!(isOopCompiledMethod(methodOrSelectorIndex))) {
			newTargetMethodOrNil = methodOrSelectorIndex;
			errorSelectorOrNil = SelectorCannotInterpret;
			goto l1;
		}
		if ((!(methodHasCogMethod(methodOrSelectorIndex)))
		 && (methodShouldBeCogged(methodOrSelectorIndex))) {

			/* We assume cog:selector: will *not* reclaim the method zone */
			cogselector(methodOrSelectorIndex, selector);
		}
		newTargetMethodOrNil = methodOrSelectorIndex;
		errorSelectorOrNil = null;
		goto l1;
	}
	if (methodOrSelectorIndex == SelectorDoesNotUnderstand) {
		methodOrSelectorIndex = lookupMNUreceiver(splObj(SelectorDoesNotUnderstand), receiver);
		if ((((usqInt)methodOrSelectorIndex)) > (maxLookupNoMNUErrorCode())) {
			assert(isOopCompiledMethod(methodOrSelectorIndex));
			if ((!(methodHasCogMethod(methodOrSelectorIndex)))
			 && (methodShouldBeCogged(methodOrSelectorIndex))) {

				/* We assume cog:selector: will *not* reclaim the method zone */
				cogselector(methodOrSelectorIndex, splObj(SelectorDoesNotUnderstand));
			}
			newTargetMethodOrNil = methodOrSelectorIndex;
			errorSelectorOrNil = SelectorDoesNotUnderstand;
			goto l1;
		}
		newTargetMethodOrNil = null;
		errorSelectorOrNil = SelectorDoesNotUnderstand;
		goto l1;
	}
	newTargetMethodOrNil = null;
	errorSelectorOrNil = methodOrSelectorIndex;
	l1:	/* end lookup:for:methodAndErrorSelectorInto: */;
	assert(outerReturn == (stackTop()));
	cacheTag = inlineCacheTagForInstance(receiver);
	if (((errorSelectorOrNil != null)
	 && (errorSelectorOrNil != SelectorDoesNotUnderstand))
	 || (((inlineCacheTagAt(backEnd, outerReturn)) == 0 /* picAbortDiscriminatorValue */)
	 || ((newTargetMethodOrNil == null)
	 || (isYoung(newTargetMethodOrNil))))) {
		result = patchToOpenPICFornumArgsreceiver((targetMethod->selector), (targetMethod->cmNumArgs), receiver);
		assert(!result);
		return ceSendFromInLineCacheMiss(targetMethod);
	}
	pic = openPICWithSelector((targetMethod->selector));
	if ((pic == null)
	 || (!1)) {

		/* otherwise attempt to create a closed PIC for the two cases. */
		pic = cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase((targetMethod->selector), (targetMethod->cmNumArgs), targetMethod, newTargetMethodOrNil, cacheTag, errorSelectorOrNil == SelectorDoesNotUnderstand);
		if ((((((sqInt)pic)) >= MaxNegativeErrorCode) && ((((sqInt)pic)) <= -1))) {

			/* For some reason the PIC couldn't be generated, most likely a lack of code memory.
			   Continue as if this is an unlinked send. */
			if ((((sqInt)pic)) == InsufficientCodeSpace) {
				callForCogCompiledCodeCompaction();
			}
			return ceSendFromInLineCacheMiss(targetMethod);
		}
		flushICacheFromto(processor, ((usqInt)pic), (((usqInt)pic)) + closedPICSize);
	}
	extent = (((pic->cmType)) == CMOpenPIC
		? rewriteInlineCacheAttagtarget(backEnd, outerReturn, inlineCacheValueForSelectorinat((targetMethod->selector), mframeHomeMethodExport(), outerReturn), (((sqInt)pic)) + cmEntryOffset)
		: rewriteCallAttarget(backEnd, outerReturn, (((sqInt)pic)) + cmEntryOffset));
	flushICacheFromto(processor, (((usqInt)outerReturn)) - extent, ((usqInt)outerReturn));
	executeCogPICfromLinkedSendWithReceiverandCacheTag(pic, receiver, inlineCacheTagAt(backEnd, outerReturn));
	return null;
}

	/* Cogit>>#checkAssertsEnabledInCogit */
void
checkAssertsEnabledInCogit(void)
{
    sqInt assertsAreEnabledInCogit;

	assertsAreEnabledInCogit = 0;
	assert(assertsAreEnabledInCogit);
}


/*	Check for a valid object reference, if any, at a map entry. Answer a code
	unique to each error for debugging. */

	/* Cogit>>#checkIfValidOopRefAndTarget:pc:cogMethod: */
static sqInt NoDbgRegParms
checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod)
{
    sqInt cacheTag1;
    sqInt entryPoint;
    sqInt entryPoint1;
    sqInt literal;
    sqInt offset1;
    sqInt *sendTable1;
    sqInt tagCouldBeObj;
    CogMethod *targetMethod1;

	if (annotation == IsObjectReference) {
		literal = literalBeforeFollowingAddress(backEnd, ((usqInt)mcpc));
		if (!(asserta(checkValidOopReference(literal)))) {
			return 1;
		}
		if ((couldBeObject(literal))
		 && (isReallyYoungObject(literal))) {
			if (!(asserta(((((CogMethod *) cogMethod))->cmRefersToYoung)))) {
				return 2;
			}
		}
	}
	if (annotation >= IsSendCall) {
		if (!(asserta((((((CogMethod *) cogMethod))->cmType)) == CMMethod))) {
			return 3;
		}
		/* begin entryCacheTagAndCouldBeObjectAt:annotation:into: */
		cacheTag1 = inlineCacheTagAt(backEnd, ((sqInt)mcpc));

		/* in-line cache tags are the selectors of sends if sends are unlinked,
		   the selectors of super sends (entry offset = cmNoCheckEntryOffset),
		   the selectors of open PIC sends (entry offset = cmEntryOffset, target is an Open PIC)
		   or in-line cache tags (classes, class indices, immediate bit patterns, etc).
		   Note that selectors can be immediate so there is no guarantee that they
		   are markable/remappable objects. */
		entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		tagCouldBeObj = entryPointTagIsSelector(entryPoint1);
		entryPoint = entryPoint1;
		if (tagCouldBeObj) {
			if (couldBeObject(cacheTag1)) {
				if (!(asserta(checkValidOopReference(cacheTag1)))) {
					return 4;
				}
			}
			else {
				if (!(asserta(validInlineCacheTag(cacheTag1)))) {
					return 5;
				}
			}
			if ((couldBeObject(cacheTag1))
			 && (isReallyYoungObject(cacheTag1))) {
				if (!(asserta(((((CogMethod *) cogMethod))->cmRefersToYoung)))) {
					return 6;
				}
			}
		}
		else {
			if (!(asserta(validInlineCacheTag(cacheTag1)))) {
				return 9;
			}
		}
		if (entryPoint > methodZoneBase) {

			/* It's a linked send; find which kind. */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint - offset1));
			if (!(asserta((((targetMethod1->cmType)) == CMMethod)
				 || ((((targetMethod1->cmType)) == CMClosedPIC)
				 || (((targetMethod1->cmType)) == CMOpenPIC))))) {
				return 10;
			}
		}
	}
	return 0;
}


/*	Check for a valid object reference, if any, at a map entry. Answer a code
	unique to each error for debugging. */

	/* Cogit>>#checkIfValidOopRef:pc:cogMethod: */
static sqInt NoDbgRegParms
checkIfValidOopRefpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod)
{
    sqInt entryPoint;
    sqInt literal;
    sqInt offset;
    sqInt offset1;
    sqInt selectorOrCacheTag;
    sqInt *sendTable;

	if (annotation == IsObjectReference) {
		literal = literalBeforeFollowingAddress(backEnd, ((usqInt)mcpc));
		if (!(checkValidOopReference(literal))) {
			print("object ref leak in CM ");
			printHex(((sqInt)cogMethod));
			print(" @ ");
			printHex(((sqInt)mcpc));
			cr();
			return 1;
		}
	}
	if (annotation >= IsSendCall) {
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint <= methodZoneBase) {
			offset = entryPoint;
		}
		else {
			/* begin offsetAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable = superSendTrampolines;
					}
				}
			}
			offset = offset1;
		}
		selectorOrCacheTag = inlineCacheTagAt(backEnd, ((sqInt)mcpc));
		if ((entryPoint > methodZoneBase)
		 && ((offset != cmNoCheckEntryOffset)
		 && ((((((CogMethod *) (entryPoint - offset)))->cmType)) != CMOpenPIC))) {

			/* linked non-super send, cacheTag is a cacheTag */
			if (!(validInlineCacheTag(selectorOrCacheTag))) {
				print("cache tag leak in CM ");
				printHex(((sqInt)cogMethod));
				print(" @ ");
				printHex(((sqInt)mcpc));
				cr();
				return 1;
			}
		}
		else {

			/* unlinked send or super send; cacheTag is a selector unless 64-bit, in which case it is an index. */
			if (!(checkValidOopReference(selectorOrCacheTag))) {
				print("selector leak in CM ");
				printHex(((sqInt)cogMethod));
				print(" @ ");
				printHex(((sqInt)mcpc));
				cr();
				return 1;
			}
		}
	}
	return 0;
}


/*	Answer if all references to objects in machine-code are valid. */

	/* Cogit>>#checkIntegrityOfObjectReferencesInCode: */
sqInt
checkIntegrityOfObjectReferencesInCode(sqInt gcModes)
{
    CogMethod *cogMethod;
    sqInt count;
    sqInt ok;

	cogMethod = ((CogMethod *) methodZoneBase);
	ok = 1;
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) != CMFree) {
			if ((cogMethod->cmRefersToYoung)) {
				if (((count = occurrencesInYoungReferrers(cogMethod))) != 1) {
					print("young referrer CM ");
					printHex(((sqInt)cogMethod));
					if (count == 0) {
						print(" is not in youngReferrers");
						cr();
					}
					else {
						print(" is in youngReferrers ");
						printNum(count);
						print(" times!");
						cr();
					}
					ok = 0;
				}
			}
			if (!(checkValidOopReference((cogMethod->selector)))) {
				print("object leak in CM ");
				printHex(((sqInt)cogMethod));
				print(" selector");
				cr();
				ok = 0;
			}
			if (((cogMethod->cmType)) == CMMethod) {
				assert(((cogMethod->objectHeader)) == (nullHeaderForMachineCodeMethod()));
				if (!(checkValidObjectReference((cogMethod->methodObject)))) {
					print("object leak in CM ");
					printHex(((sqInt)cogMethod));
					print(" methodObject");
					cr();
					ok = 0;
				}
				if (!(isOopCompiledMethod((cogMethod->methodObject)))) {
					print("non-method in CM ");
					printHex(((sqInt)cogMethod));
					print(" methodObject");
					cr();
					ok = 0;
				}
				if ((mapForperformUntilarg(cogMethod, checkIfValidOopRefpccogMethod, ((sqInt)cogMethod))) != 0) {
					ok = 0;
				}
				if (((isYoungObject((cogMethod->methodObject)))
				 || (isYoung((cogMethod->selector))))
				 && (!((cogMethod->cmRefersToYoung)))) {
					print("CM ");
					printHex(((sqInt)cogMethod));
					print(" refers to young but not marked as such");
					cr();
					ok = 0;
				}
			}
			else {
				if (((cogMethod->cmType)) == CMClosedPIC) {
					if (!(checkValidObjectReferencesInClosedPIC(cogMethod))) {
						ok = 0;
					}
				}
				else {
					if (((cogMethod->cmType)) == CMOpenPIC) {
						if ((mapForperformUntilarg(cogMethod, checkIfValidOopRefpccogMethod, ((sqInt)cogMethod))) != 0) {
							ok = 0;
						}
					}
				}
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	return ok;
}

	/* Cogit>>#checkMaybeObjRefInClosedPIC: */
static sqInt NoDbgRegParms
checkMaybeObjRefInClosedPIC(sqInt maybeObject)
{
	if (maybeObject == 0) {
		return 1;
	}
	if (!(couldBeObject(maybeObject))) {
		return 1;
	}
	return checkValidObjectReference(maybeObject);
}

	/* Cogit>>#checkValidObjectReferencesInClosedPIC: */
static sqInt NoDbgRegParms
checkValidObjectReferencesInClosedPIC(CogMethod *cPIC)
{
    sqInt i;
    sqInt ok;
    sqInt pc;

	ok = 1;

	/* first we check the obj ref at the beginning of the CPIC */
	pc = (((sqInt)cPIC)) + firstCPICCaseOffset;
	if (!(checkMaybeObjRefInClosedPIC(literalBeforeFollowingAddress(backEnd, pc - 5 /* jumpLongByteSize */)))) {
		print("object leak in CPIC ");
		printHex(((sqInt)cPIC));
		print(" @ ");
		printHex(pc - 5 /* jumpLongByteSize */);
		cr();
		ok = 0;
	}

	/* For each case we check any object reference at the end address - sizeof(conditional instruction) and then increment the end address by case size */
	pc = addressOfEndOfCaseinCPIC((cPIC->cPICNumCases), cPIC);
	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
		if (!(checkMaybeObjRefInClosedPIC(literalBeforeFollowingAddress(backEnd, (pc - 6 /* jumpLongConditionalByteSize */) - 5 /* cmpC32RTempByteSize */)))) {
			print("object leak in CPIC ");
			printHex(((sqInt)cPIC));
			print(" @ ");
			printHex(pc - 6 /* jumpLongConditionalByteSize */);
			cr();
			ok = 0;
		}
		pc += cPICCaseSize;
	}
	return ok;
}


/*	i.e. this should never be called, so keep it out of the main path. */

	/* Cogit>>#cleanUpFailingCogCodeConstituents: */
static sqInt NoDbgRegParms NeverInline
cleanUpFailingCogCodeConstituents(CogMethod *cogMethodArg)
{
    CogMethod *cogMethod;

	cogMethod = cogMethodArg;
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMClosedPIC) {
			(cogMethod->methodObject = 0);
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	popRemappableOop();
	return null;
}


/*	Answer if the ClosedPIC refers to any unmarked objects or freed/freeable
	target methods,
	applying markAndTraceOrFreeCogMethod:firstVisit: to those targets to
	determine if freed/freeable.
 */

	/* Cogit>>#closedPICRefersToUnmarkedObject: */
static sqInt NoDbgRegParms
closedPICRefersToUnmarkedObject(CogMethod *cPIC)
{
    sqInt i;
    sqInt object;
    sqInt pc;

	if (!((isImmediate((cPIC->selector)))
		 || (isMarked((cPIC->selector))))) {
		return 1;
	}
	pc = addressOfEndOfCaseinCPIC(1, cPIC);
	if (couldBeObject((object = literalBeforeFollowingAddress(backEnd, pc - 5 /* jumpLongByteSize */)))) {
		if (!(isMarked(object))) {
			return 1;
		}
	}
	if (markAndTraceOrFreePICTargetin(jumpLongTargetBeforeFollowingAddress(backEnd, pc), cPIC)) {
		return 1;
	}
	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
		pc = addressOfEndOfCaseinCPIC(i, cPIC);
		if (couldBeObject((object = literalBeforeFollowingAddress(backEnd, (pc - 6 /* jumpLongConditionalByteSize */) - 5 /* cmpC32RTempByteSize */)))) {
			if (!(isMarked(object))) {
				return 1;
			}
		}
		if (markAndTraceOrFreePICTargetin(jumpLongTargetBeforeFollowingAddress(backEnd, pc), cPIC)) {
			return 1;
		}
	}
	return 0;
}

	/* Cogit>>#codeEntryFor: */
char *
codeEntryFor(char *address)
{
    sqInt i;

	for (i = 0; i <= (trampolineTableIndex - 3); i += 2) {
		if (((address >= (trampolineAddresses[i + 1])) && (address <= ((trampolineAddresses[i + 3]) - 1)))) {
			return trampolineAddresses[i + 1];
		}
	}
	return null;
}

	/* Cogit>>#codeEntryNameFor: */
char *
codeEntryNameFor(char *address)
{
    sqInt i;

	for (i = 0; i <= (trampolineTableIndex - 3); i += 2) {
		if (((address >= (trampolineAddresses[i + 1])) && (address <= ((trampolineAddresses[i + 3]) - 1)))) {
			return trampolineAddresses[i];
		}
	}
	return null;
}

	/* Cogit>>#cogCodeBase */
sqInt
cogCodeBase(void)
{
	return codeBase;
}


/*	Answer the contents of the code zone as an array of pair-wise element,
	address in ascending address order.
	Answer a string for a runtime routine or abstract label (beginning, end,
	etc), a CompiledMethod for a CMMethod,
	or a selector (presumably a Symbol) for a PIC.
	If withDetails is true
	- answer machine-code to bytecode pc mapping information for methods
	- answer class, target pair information for closed PIC
	N.B. Since the class tag for the first case of a closed PIC is stored at
	the send site, it must be collected
	by scanning methods (see
	collectCogConstituentFor:Annotation:Mcpc:Bcpc:Method:). Since closed PICs
	are never shared they always come after the method that references them,
	so we don't need an extra pass
	to collect the first case class tags, which are (temporarily) assigned to
	each closed PIC's methodObject field.
	But we do need to reset the methodObject fields to zero. This is done in
	createPICData:, unless memory
	runs out, in which case it is done by cleanUpFailingCogCodeConstituents:. */

	/* Cogit>>#cogCodeConstituents: */
sqInt
cogCodeConstituents(sqInt withDetails)
{
    CogMethod *cogMethod;
    sqInt constituents;
    sqInt count;
    sqInt i;
    sqInt label;
    sqInt profileData;
    sqInt value;


	/* + 3 for start, freeStart and end */
	count = (trampolineTableIndex / 2) + 3;
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) != CMFree) {
			count += 1;
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	constituents = instantiateClassindexableSize(classArray(), count * 2);
	if (!(constituents)) {
		return constituents;
	}
	pushRemappableOop(constituents);
	if ((((label = stringForCString("CogCode"))) == null)
	 || (((value = positive32BitIntegerFor(codeBase))) == null)) {
		popRemappableOop();
		return null;
	}
	storePointerUncheckedofObjectwithValue(0, constituents, label);
	storePointerUncheckedofObjectwithValue(1, constituents, value);
	for (i = 0; i < trampolineTableIndex; i += 2) {
		if ((((label = stringForCString(trampolineAddresses[i]))) == null)
		 || (((value = positive32BitIntegerFor(((usqInt)(trampolineAddresses[i + 1]))))) == null)) {
			popRemappableOop();
			return null;
		}
		storePointerUncheckedofObjectwithValue(2 + i, constituents, label);
		storePointerUncheckedofObjectwithValue(3 + i, constituents, value);
	}
	count = trampolineTableIndex + 2;
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) != CMFree) {
			profileData = (((cogMethod->cmType)) == CMMethod
				? (cogMethod->methodObject)
				: (withDetails
					 && (((cogMethod->cmType)) == CMClosedPIC)
						? createCPICData(cogMethod)
						: (cogMethod->selector)));
			if (!(profileData)) {
				return cleanUpFailingCogCodeConstituents(cogMethod);
			}
			storePointerUncheckedofObjectwithValue(count, constituents, profileData);
			if (withDetails) {
				value = collectCogMethodConstituent(cogMethod);
			}
			else {
				value = positive32BitIntegerFor(((usqInt)cogMethod));
			}
			if (!(value)) {
				return cleanUpFailingCogCodeConstituents(cogMethod);
			}
			storePointerUncheckedofObjectwithValue(count + 1, constituents, value);
			count += 2;
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	if ((((label = stringForCString("CCFree"))) == null)
	 || (((value = positive32BitIntegerFor(mzFreeStart))) == null)) {
		popRemappableOop();
		return null;
	}
	storePointerUncheckedofObjectwithValue(count, constituents, label);
	storePointerUncheckedofObjectwithValue(count + 1, constituents, value);
	if ((((label = stringForCString("CCEnd"))) == null)
	 || (((value = positive32BitIntegerFor(limitAddress))) == null)) {
		popRemappableOop();
		return null;
	}
	storePointerUncheckedofObjectwithValue(count + 2, constituents, label);
	storePointerUncheckedofObjectwithValue(count + 3, constituents, value);
	constituents = popRemappableOop();
	beRootIfOld(constituents);
	return constituents;
}


/*	Extend the cPIC with the supplied case. If caseNMethod is cogged dispatch
	direct to
	its unchecked entry-point. If caseNMethod is not cogged, jump to the fast
	interpreter dispatch, and if isMNUCase then dispatch to fast MNU
	invocation and mark the cPIC as
	having the MNU case for cache flushing. */

	/* Cogit>>#cogExtendPIC:CaseNMethod:tag:isMNUCase: */
static sqInt NoDbgRegParms
cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt caseNTag, sqInt isMNUCase)
{
    sqInt address;
    sqInt operand;
    sqInt target;

	compilationBreakpointisMNUCase((cPIC->selector), numBytesOf((cPIC->selector)), isMNUCase);
	assert(!(inlineCacheTagIsYoung(caseNTag)));
	assert((caseNMethod != null)
	 && (!(isYoung(caseNMethod))));
	if ((!isMNUCase)
	 && (methodHasCogMethod(caseNMethod))) {

		/* this isn't an MNU and we have an already cogged method to jump to */
		operand = 0;
		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
	}
	else {
		operand = caseNMethod;
		if (isMNUCase) {

			/* this is an MNU so tag the CPIC header and setup a jump to the MNUAbort */
			/* begin cpicHasMNUCase: */
			((((CogBlockMethod *) cPIC))->cpicHasMNUCaseOrCMIsFullBlock) = 1;
			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
		}
		else {

			/* setup a jump to the interpretAborth so we can cog the target method */
			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
		}
	}
	address = addressOfEndOfCaseinCPIC(((cPIC->cPICNumCases)) + 1, cPIC);
	rewriteCPICCaseAttagobjReftarget(address, caseNTag, operand, target);
	/* begin rewriteCPIC:caseJumpTo: */
	rewriteCPICJumpAttarget(backEnd, (((((sqInt)cPIC)) + firstCPICCaseOffset) - 5 /* jumpLongByteSize */) - 5 /* loadLiteralByteSize */, address - cPICCaseSize);
	flushICacheFromto(processor, ((usqInt)cPIC), (((usqInt)cPIC)) + closedPICSize);
	(cPIC->cPICNumCases = ((cPIC->cPICNumCases)) + 1);
	return 0;
}


/*	Attempt to produce a machine code method for the bytecode method
	object aMethodObj. N.B. If there is no code memory available do *NOT*
	attempt to reclaim the method zone. Certain clients (e.g. ceSICMiss:)
	depend on the zone remaining constant across method generation. */

	/* Cogit>>#cogFullBlockMethod:numCopied: */
CogMethod *
cogFullBlockMethodnumCopied(sqInt aMethodObj, sqInt numCopied)
{
    CogMethod *cogMethod;


	/* inline exclude: */
	assert(!((methodHasCogMethod(aMethodObj))));
	assert(isOopCompiledMethod(ultimateLiteralOf(aMethodObj)));
	if (aMethodObj == breakMethod) {
		haltmsg("Compilation of breakMethod");
	}
	if (methodUsesAlternateBytecodeSet(aMethodObj)) {
		if ((numElementsIn(generatorTable)) <= 256) {
			return null;
		}
		bytecodeSetOffset = 256;
	}
	else {
		bytecodeSetOffset = 0;
	}
	ensureNoForwardedLiteralsIn(aMethodObj);
	methodObj = aMethodObj;
	methodHeader = methodHeaderOf(aMethodObj);
	receiverTags = receiverTagBitsForMethod(methodObj);
	cogMethod = compileCogFullBlockMethod(numCopied);
	if ((((((sqInt)cogMethod)) >= MaxNegativeErrorCode) && ((((sqInt)cogMethod)) <= -1))) {
		if ((((sqInt)cogMethod)) == InsufficientCodeSpace) {
			callForCogCompiledCodeCompaction();
		}
		return null;
	}
	return cogMethod;
}

	/* Cogit>>#cogitPostGCAction: */
void
cogitPostGCAction(sqInt gcMode)
{
	
#  if SPURVM
	if (gcMode == GCModeBecome) {
		followForwardedLiteralsInOpenPICList();
	}
#  endif /* SPURVM */
	assert(allMethodsHaveCorrectHeader());
	assert(((gcMode & (GCModeFull + GCModeNewSpace)) == 0)
	 || (kosherYoungReferrers()));
}


/*	Check that the header fields onf a non-free method are consistent with
	the type. Answer 0 if it is ok, otherwise answer a code for the error. */

	/* Cogit>>#cogMethodDoesntLookKosher: */
sqInt
cogMethodDoesntLookKosher(CogMethod *cogMethod)
{
	if (((((cogMethod->blockSize)) & (BytesPerWord - 1)) != 0)
	 || ((((cogMethod->blockSize)) < (sizeof(CogMethod)))
	 || (((cogMethod->blockSize)) >= 32768))) {
		return 1;
	}
	if (((cogMethod->cmType)) == CMFree) {
		return 2;
	}
	if (((cogMethod->cmType)) == CMMethod) {
		if (!((((cogMethod->methodHeader)) & 1))) {
			return 11;
		}
		if (!(couldBeObject((cogMethod->methodObject)))) {
			return 12;
		}
		if ((((cogMethod->stackCheckOffset)) > 0)
		 && (((cogMethod->stackCheckOffset)) < cmNoCheckEntryOffset)) {
			return 13;
		}
		return 0;
	}
	if (((cogMethod->cmType)) == CMOpenPIC) {
		if (((cogMethod->blockSize)) != openPICSize) {
			return 21;
		}
		if (((cogMethod->methodHeader)) != 0) {
			return 22;
		}
		if (((cogMethod->objectHeader)) >= 0) {
			if (!((((cogMethod->methodObject)) == 0)
				 || (compactionInProgress
				 || (((cogMethod->methodObject)) == (((usqInt)(methodFor((cogMethod->methodObject))))))))) {
				return 23;
			}
		}
		if (((cogMethod->stackCheckOffset)) != 0) {
			return 24;
		}
		return 0;
	}
	if (((cogMethod->cmType)) == CMClosedPIC) {
		if (((cogMethod->blockSize)) != closedPICSize) {
			return 0x1F;
		}
		if (!(((((cogMethod->cPICNumCases)) >= 1) && (((cogMethod->cPICNumCases)) <= MaxCPICCases)))) {
			return 32;
		}
		if (((cogMethod->methodHeader)) != 0) {
			return 33;
		}
		if (((cogMethod->methodObject)) != 0) {
			return 34;
		}
		return 0;
	}
	return 9;
}


/*	Attempt to create a one-case PIC for an MNU.
	The tag for the case is at the send site and so doesn't need to be
	generated. 
 */

	/* Cogit>>#cogMNUPICSelector:receiver:methodOperand:numArgs: */
CogMethod *
cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs)
{
    CogMethod *pic;
    usqInt startAddress;

	if ((isYoung(selector))
	 || ((inlineCacheTagForInstance(rcvr)) == 0 /* picAbortDiscriminatorValue */)) {
		return 0;
	}
	compilationBreakpointisMNUCase(selector, numBytesOf(selector), 1);
	assert(endCPICCase0 != null);
	startAddress = allocate(closedPICSize);
	if (startAddress == 0) {
		callForCogCompiledCodeCompaction();
		return 0;
	}
	memcpy(((CogMethod *) startAddress), ((CogMethod *) cPICPrototype), closedPICSize);
	configureMNUCPICmethodOperandnumArgsdelta(((CogMethod *) startAddress), methodOperand, numArgs, startAddress - cPICPrototype);
	/* begin fillInCPICHeader:numArgs:numCases:hasMNUCase:selector: */
	pic = ((CogMethod *) startAddress);
	assert(!(isYoung(selector)));
	(pic->cmType = CMClosedPIC);
	(pic->objectHeader = 0);
	(pic->blockSize = closedPICSize);
	(pic->methodObject = 0);
	(pic->methodHeader = 0);
	(pic->selector = selector);
	(pic->cmNumArgs = numArgs);
	(pic->cmRefersToYoung = 0);
	(pic->cmUsageCount = initialClosedPICUsageCount());
	/* begin cpicHasMNUCase: */
	((((CogBlockMethod *) pic))->cpicHasMNUCaseOrCMIsFullBlock) = 1;
	(pic->cPICNumCases = 1);
	(pic->blockEntryOffset = 0);
	assert(((pic->cmType)) == CMClosedPIC);
	assert(((pic->selector)) == selector);
	assert(((pic->cmNumArgs)) == numArgs);
	assert(((pic->cPICNumCases)) == 1);
	assert((callTargetFromReturnAddress(backEnd, (((sqInt)pic)) + missOffset)) == (picAbortTrampolineFor(numArgs)));
	assert(closedPICSize == (roundUpLength(closedPICSize)));
	flushICacheFromto(processor, ((usqInt)pic), (((usqInt)pic)) + closedPICSize);
	/* begin maybeEnableSingleStep */
	return pic;
}


/*	Create an Open PIC. Temporarily create a direct call of
	ceSendFromOpenPIC:. Should become a probe of the first-level method lookup
	cache followed by a
	call of ceSendFromOpenPIC: if the probe fails. */

	/* Cogit>>#cogOpenPICSelector:numArgs: */
static CogMethod * NoDbgRegParms
cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs)
{
    sqInt codeSize;
    sqInt end;
    sqInt fixupSize;
    sqInt mapSize;
    sqInt opcodeSize;
    CogMethod *pic;
    usqInt startAddress;

	compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0);
	startAddress = allocate(openPICSize);
	if (startAddress == 0) {
		return ((CogMethod *) InsufficientCodeSpace);
	}
	(methodLabel->address = startAddress);
	(methodLabel->dependent = null);
	/* begin allocateOpcodes:bytecodes: */
	numAbstractOpcodes = 100;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	compileOpenPICnumArgs(selector, numArgs);
	computeMaximumSizes();
	concretizeAt(methodLabel, startAddress);
	codeSize = generateInstructionsAt(startAddress + (sizeof(CogMethod)));
	mapSize = generateMapAtstart((startAddress + openPICSize) - 1, startAddress + cmNoCheckEntryOffset);
	assert((((entry->address)) - startAddress) == cmEntryOffset);
	assert(((roundUpLength((sizeof(CogMethod)) + codeSize)) + (roundUpLength(mapSize))) <= openPICSize);
	end = outputInstructionsAt(startAddress + (sizeof(CogMethod)));
	/* begin fillInOPICHeader:numArgs:selector: */
	pic = ((CogMethod *) startAddress);
	(pic->cmType = CMOpenPIC);
	(pic->objectHeader = 0);
	(pic->blockSize = openPICSize);
	addToOpenPICList(pic);
	(pic->methodHeader = 0);
	(pic->selector = selector);
	(pic->cmNumArgs = numArgs);
	if ((pic->cmRefersToYoung = isYoung(selector))) {
		addToYoungReferrers(pic);
	}
	(pic->cmUsageCount = initialOpenPICUsageCount());
	/* begin cpicHasMNUCase: */
	((((CogBlockMethod *) pic))->cpicHasMNUCaseOrCMIsFullBlock) = 0;
	(pic->cPICNumCases = 0);
	(pic->blockEntryOffset = 0);
	assert(((pic->cmType)) == CMOpenPIC);
	assert(((pic->selector)) == selector);
	assert(((pic->cmNumArgs)) == numArgs);
	assert((callTargetFromReturnAddress(backEnd, (((sqInt)pic)) + missOffset)) == (picAbortTrampolineFor(numArgs)));
	assert(openPICSize == (roundUpLength(openPICSize)));
	flushICacheFromto(processor, ((usqInt)pic), (((usqInt)pic)) + openPICSize);
	/* begin maybeEnableSingleStep */
	return pic;
}


/*	Attempt to create a two-case PIC for case0CogMethod and
	case1Method,case1Tag. The tag for case0CogMethod is at the send site and
	so doesn't need to be generated.
	case1Method may be any of
	- a Cog method; link to its unchecked entry-point
	- a CompiledMethod; link to ceInterpretMethodFromPIC:
	- a CompiledMethod; link to ceMNUFromPICMNUMethod:receiver: */

	/* Cogit>>#cogPICSelector:numArgs:Case0Method:Case1Method:tag:isMNUCase: */
static CogMethod * NoDbgRegParms
cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase)
{
    CogMethod *pic;
    usqInt startAddress;

	if (isYoung(selector)) {
		return ((CogMethod *) YoungSelectorInPIC);
	}
	compilationBreakpointisMNUCase(selector, numBytesOf(selector), isMNUCase);
	startAddress = allocate(closedPICSize);
	if (startAddress == 0) {
		return ((CogMethod *) InsufficientCodeSpace);
	}
	memcpy(((CogMethod *) startAddress), ((CogMethod *) cPICPrototype), closedPICSize);
	configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(((CogMethod *) startAddress), case0CogMethod, case1MethodOrNil, case1Tag, isMNUCase, numArgs, startAddress - cPICPrototype);
	/* begin fillInCPICHeader:numArgs:numCases:hasMNUCase:selector: */
	pic = ((CogMethod *) startAddress);
	assert(!(isYoung(selector)));
	(pic->cmType = CMClosedPIC);
	(pic->objectHeader = 0);
	(pic->blockSize = closedPICSize);
	(pic->methodObject = 0);
	(pic->methodHeader = 0);
	(pic->selector = selector);
	(pic->cmNumArgs = numArgs);
	(pic->cmRefersToYoung = 0);
	(pic->cmUsageCount = initialClosedPICUsageCount());
	/* begin cpicHasMNUCase: */
	((((CogBlockMethod *) pic))->cpicHasMNUCaseOrCMIsFullBlock) = isMNUCase;
	(pic->cPICNumCases = 2);
	(pic->blockEntryOffset = 0);
	assert(((pic->cmType)) == CMClosedPIC);
	assert(((pic->selector)) == selector);
	assert(((pic->cmNumArgs)) == numArgs);
	assert(((pic->cPICNumCases)) == 2);
	assert((callTargetFromReturnAddress(backEnd, (((sqInt)pic)) + missOffset)) == (picAbortTrampolineFor(numArgs)));
	assert(closedPICSize == (roundUpLength(closedPICSize)));
	flushICacheFromto(processor, ((usqInt)pic), (((usqInt)pic)) + closedPICSize);
	/* begin maybeEnableSingleStep */
	return pic;
}


/*	Attempt to produce a machine code method for the bytecode method
	object aMethodObj. N.B. If there is no code memory available do *NOT*
	attempt to reclaim the method zone. Certain clients (e.g. ceSICMiss:)
	depend on the zone remaining constant across method generation. */

	/* Cogit>>#cog:selector: */
CogMethod *
cogselector(sqInt aMethodObj, sqInt aSelectorOop)
{
    CogMethod *cogMethod;
    sqInt selector;


	/* inline exclude:selector: */
	assert(!((methodHasCogMethod(aMethodObj))));
	assert(!((isOopCompiledMethod(ultimateLiteralOf(aMethodObj)))));

	/* coInterpreter stringOf: selector */
	selector = (aSelectorOop == (nilObject())
		? maybeSelectorOfMethod(aMethodObj)
		: aSelectorOop);
	if (!(selector == null)) {
		compilationBreakpointisMNUCase(selector, lengthOf(selector), 0);
	}
	if (aMethodObj == breakMethod) {
		haltmsg("Compilation of breakMethod");
	}
	if (methodUsesAlternateBytecodeSet(aMethodObj)) {
		if ((numElementsIn(generatorTable)) <= 256) {
			return null;
		}
		bytecodeSetOffset = 256;
	}
	else {
		bytecodeSetOffset = 0;
	}
	ensureNoForwardedLiteralsIn(aMethodObj);
	methodObj = aMethodObj;
	methodHeader = methodHeaderOf(aMethodObj);
	receiverTags = receiverTagBitsForMethod(methodObj);
	cogMethod = compileCogMethod(aSelectorOop);
	if ((((((sqInt)cogMethod)) >= MaxNegativeErrorCode) && ((((sqInt)cogMethod)) <= -1))) {
		if ((((sqInt)cogMethod)) == InsufficientCodeSpace) {
			callForCogCompiledCodeCompaction();
		}
		return null;
	}
	return cogMethod;
}

	/* Cogit>>#collectCogConstituentFor:Annotation:Mcpc:Bcpc:Method: */
static sqInt NoDbgRegParms
collectCogConstituentForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg)
{
    sqInt address;
    sqInt annotation;
    sqInt entryPoint;
    sqInt offset1;
    sqInt *sendTable1;
    CogMethod *targetMethod1;

	if (!(descriptor)) {
		return 0;
	}
	if (!((descriptor->isMapped))) {
		return 0;
	}
	address = positive32BitIntegerFor(mcpc);
	if (!(address)) {
		return PrimErrNoMemory;
	}
	storePointerUncheckedofObjectwithValue(cogConstituentIndex, topRemappableOop(), address);
	storePointerUncheckedofObjectwithValue(cogConstituentIndex + 1, topRemappableOop(), (((usqInt)bcpc << 1) | 1));

	/* Collect any first case classTags for closed PICs. */
	cogConstituentIndex += 2;
	if (((isBackwardBranchAndAnnotation & 1) == 0)
	 && (((((usqInt) isBackwardBranchAndAnnotation) >> 1) >= IsSendCall)
	 || (0))) {
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint > methodZoneBase) {

			/* send is linked */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			annotation = ((usqInt) isBackwardBranchAndAnnotation) >> 1;
			/* begin offsetAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint - offset1));
			if (((targetMethod1->cmType)) == CMClosedPIC) {
				(targetMethod1->methodObject = classForInlineCacheTag(inlineCacheTagAt(backEnd, mcpc)));
			}
		}
	}
	return 0;
}


/*	Answer a description of the mapping between machine code pointers and
	bytecode pointers for the Cog Method.
	First value is the address of the cog method.
	Following values are pairs of machine code pc and bytecode pc */

	/* Cogit>>#collectCogMethodConstituent: */
static sqInt NoDbgRegParms
collectCogMethodConstituent(CogMethod *cogMethod)
{
    sqInt address;
    sqInt aMethodHeader;
    sqInt aMethodHeader1;
    sqInt aMethodObj;
    sqInt annotation;
    sqInt bcpc;
    sqInt bsOffset;
    sqInt byte;
    sqInt cm;
    CogBlockMethod *cogBlockMethod;
    sqInt data;
    BytecodeDescriptor *descriptor;
    sqInt distance;
    sqInt endbcpc;
    sqInt errCode;
    CogMethod *homeMethod;
    sqInt isBackwardBranch;
    sqInt isInBlock;
    sqInt latestContinuation;
    usqInt map;
    sqInt mapByte;
    usqInt mcpc;
    sqInt nExts;
    sqInt nextBcpc;
    sqInt nSlots;
    sqInt result;
    sqInt startbcpc;
    sqInt targetPC;

	latestContinuation = 0;
	if (!(((cogMethod->cmType)) == CMMethod)) {
		return positive32BitIntegerFor(((usqInt)cogMethod));
	}
	cogBlockMethod = ((CogBlockMethod *) cogMethod);
	if (((cogBlockMethod->stackCheckOffset)) == 0) {

		/* isFrameless ? */
		return positive32BitIntegerFor(((usqInt)cogMethod));
	}
	cm = (cogMethod->methodObject);

	/* +1 for first address */
	nSlots = ((((byteSizeOf(cm)) - (startPCOfMethod(cm))) * 2) + (minSlotsForShortening())) + 1;
	data = instantiateClassindexableSize(splObj(ClassArray), nSlots);
	if (!(data)) {
		return null;
	}
	pushRemappableOop(data);
	address = positive32BitIntegerFor(((usqInt)cogMethod));
	if (!(address)) {
		popRemappableOop();
		return null;
	}
	storePointerUncheckedofObjectwithValue(0, topRemappableOop(), address);
	cogConstituentIndex = 1;
	/* begin mapFor:bcpc:performUntil:arg: */
	startbcpc = startPCOfMethod((cogMethod->methodObject));
	assert(((cogBlockMethod->stackCheckOffset)) > 0);

	/* The stack check maps to the start of the first bytecode,
	   the first bytecode being effectively after frame build. */
	mcpc = (((usqInt)cogBlockMethod)) + ((cogBlockMethod->stackCheckOffset));
	result = collectCogConstituentForAnnotationMcpcBcpcMethod(null, (0 + (((int)((usqInt)(HasBytecodePC) << 1)))), (((char *) mcpc)), startbcpc, (((void *)cogMethod)));
	if (result != 0) {
		errCode = result;
		goto l7;
	}

	/* In both CMMethod and CMBlock cases find the start of the map and
	   skip forward to the bytecode pc map entry for the stack check. */
	bcpc = startbcpc;
	if (((cogBlockMethod->cmType)) == CMMethod) {
		/* begin cmIsFullBlock */
		isInBlock = (cogBlockMethod->cpicHasMNUCaseOrCMIsFullBlock);
		homeMethod = ((CogMethod *) cogBlockMethod);
		assert(startbcpc == (startPCOfMethodHeader((homeMethod->methodHeader))));
		map = ((((usqInt)homeMethod)) + ((homeMethod->blockSize))) - 1;
		annotation = ((usqInt) (byteAt(map))) >> AnnotationShift;
		assert((annotation == IsAbsPCReference)
		 || ((annotation == IsObjectReference)
		 || ((annotation == IsRelativeCall)
		 || (annotation == IsDisplacementX2N))));
		latestContinuation = startbcpc;
		aMethodObj = (homeMethod->methodObject);
		endbcpc = (numBytesOf(aMethodObj)) - 1;
		/* begin bytecodeSetOffsetForHeader: */
		aMethodHeader = (homeMethod->methodHeader);
		bsOffset = 
#    if MULTIPLEBYTECODESETS
			(headerIndicatesAlternateBytecodeSet(aMethodHeader)
						? 256
						: 0)
#    else /* MULTIPLEBYTECODESETS */
			0
#    endif /* MULTIPLEBYTECODESETS */
			;
		bcpc += deltaToSkipPrimAndErrorStoreInheader(aMethodObj, (homeMethod->methodHeader));
	}
	else {
		isInBlock = 1;
		assert(bcpc == ((cogBlockMethod->startpc)));
		homeMethod = cmHomeMethod(cogBlockMethod);
		map = findMapLocationForMcpcinMethod((((usqInt)cogBlockMethod)) + (sizeof(CogBlockMethod)), homeMethod);
		assert(map != 0);
		annotation = ((usqInt) (byteAt(map))) >> AnnotationShift;
		assert(((((usqInt) annotation) >> AnnotationShift) == HasBytecodePC)
		 || ((((usqInt) annotation) >> AnnotationShift) == IsDisplacementX2N));
		while (((annotation = ((usqInt) (byteAt(map))) >> AnnotationShift)) != HasBytecodePC) {
			map -= 1;
		}

		/* skip fiducial; i.e. the map entry for the pc immediately following the method header. */
		map -= 1;
		aMethodObj = (homeMethod->methodObject);
		bcpc = startbcpc - (
#if MULTIPLEBYTECODESETS
	(headerIndicatesAlternateBytecodeSet((homeMethod->methodHeader))
		? AltBlockCreationBytecodeSize
		: BlockCreationBytecodeSize)
#else /* MULTIPLEBYTECODESETS */
	BlockCreationBytecodeSize
#endif /* MULTIPLEBYTECODESETS */
	);
		/* begin bytecodeSetOffsetForHeader: */
		aMethodHeader1 = (homeMethod->methodHeader);
		bsOffset = 
#    if MULTIPLEBYTECODESETS
			(headerIndicatesAlternateBytecodeSet(aMethodHeader1)
						? 256
						: 0)
#    else /* MULTIPLEBYTECODESETS */
			0
#    endif /* MULTIPLEBYTECODESETS */
			;
		byte = (fetchByteofObject(bcpc, aMethodObj)) + bsOffset;
		descriptor = generatorAt(byte);
		endbcpc = (bcpc + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? (/* begin spanFor:at:exts:in: */
		((descriptor->spanFunction))(descriptor, bcpc, -1, aMethodObj))
	: 0));
		bcpc = startbcpc;
	}
	nExts = 0;
	while ((((usqInt) (byteAt(map))) >> AnnotationShift) != HasBytecodePC) {
		map -= 1;
	}
	map -= 1;
	while (((mapByte = byteAt(map))) != MapEnd) {

		/* defensive; we exit on bcpc */
		if (mapByte >= FirstAnnotation) {
			annotation = ((usqInt) mapByte) >> AnnotationShift;
			mcpc += (mapByte & DisplacementMask);
			if (annotation >= HasBytecodePC) {
				if ((annotation == IsSendCall)
				 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
					annotation += mapByte & DisplacementMask;
					map -= 1;
				}
				while (1) {
					byte = (fetchByteofObject(bcpc, aMethodObj)) + bsOffset;
					descriptor = generatorAt(byte);
					if (isInBlock) {
						if (bcpc >= endbcpc) {
							errCode = 0;
							goto l7;
						}
					}
					else {
						if (((descriptor->isReturn))
						 && (bcpc >= latestContinuation)) {
							errCode = 0;
							goto l7;
						}
						if ((isBranch(descriptor))
						 || ((descriptor->isBlockCreation))) {
							/* begin latestContinuationPCFor:at:exts:in: */
							distance = ((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj);
							targetPC = (bcpc + ((descriptor->numBytes))) + (((distance < 0) ? 0 : distance));
							latestContinuation = ((latestContinuation < targetPC) ? targetPC : latestContinuation);
						}
						latestContinuation = latestContinuation;
					}
					nextBcpc = (bcpc + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? (/* begin spanFor:at:exts:in: */
		((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj))
	: 0));
					if (((descriptor->isMapped))
					 || (isInBlock
					 && ((descriptor->isMappedInBlock)))) break;
					bcpc = nextBcpc;
					nExts = ((descriptor->isExtension)
						? nExts + 1
						: 0);
				}
				isBackwardBranch = (isBranch(descriptor))
				 && ((assert(((descriptor->spanFunction)) != null),
				(((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj)) < 0));
				result = collectCogConstituentForAnnotationMcpcBcpcMethod(descriptor, ((isBackwardBranch
	? (((sqInt)((usqInt)(annotation) << 1))) + 1
	: ((sqInt)((usqInt)(annotation) << 1)))), (((char *) mcpc)), ((isBackwardBranch
	? bcpc - (2 * nExts)
	: bcpc)), (((void *)cogMethod)));
				if (result != 0) {
					errCode = result;
					goto l7;
				}
				bcpc = nextBcpc;
				nExts = ((descriptor->isExtension)
					? nExts + 1
					: 0);
			}
		}
		else {
			assert(((((usqInt) mapByte) >> AnnotationShift) == IsDisplacementX2N)
			 || ((((usqInt) mapByte) >> AnnotationShift) == IsAnnotationExtension));
			if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
				mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
			}
		}
		map -= 1;
	}
	errCode = 0;
	l7:	/* end mapFor:bcpc:performUntil:arg: */;
	if (errCode != 0) {
		popRemappableOop();
		return null;
	}
	if (cogConstituentIndex < nSlots) {
		shortentoIndexableSize(topRemappableOop(), cogConstituentIndex);
	}
	return popRemappableOop();
}

	/* Cogit>>#compactCogCompiledCode */
void
compactCogCompiledCode(void)
{
	assert(noCogMethodsMaximallyMarked());
	markActiveMethodsAndReferents();
	freeOlderMethodsForCompaction();
	compactPICsWithFreedTargets();
	planCompaction();
	updateStackZoneReferencesToCompiledCodePreCompaction();
	relocateMethodsPreCompaction();
	compactCompiledCode();
	assert(allMethodsHaveCorrectHeader());
	assert(kosherYoungReferrers());
	stopsFromto(backEnd, freeStart(), (youngReferrers()) - 1);
	flushICacheFromto(processor, ((usqInt)methodZoneBase), ((usqInt)(youngReferrers())));
}

	/* Cogit>>#compactPICsWithFreedTargets */
static void
compactPICsWithFreedTargets(void)
{
    CogMethod *cogMethod;
    sqInt count;

	cogMethod = ((CogMethod *) methodZoneBase);
	count = 0;
	while (cogMethod < (limitZony())) {
		if ((((cogMethod->cmType)) == CMClosedPIC)
		 && (cPICCompactAndIsNowEmpty(cogMethod))) {
			(cogMethod->cmType = CMFree);
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
		count += 1;
	}
	assert(count == (numMethods()));
}


/*	The start of a CogMethod has a call to a run-time abort routine that
	either handles an in-line cache failure or a stack overflow. The routine
	selects the
	path depending on ReceiverResultReg; if zero it takes the stack overflow
	path; if nonzero the in-line cache miss path. Neither of these paths
	returns. The abort routine must be called; In the callee the method is
	located by
	adding the relevant offset to the return address of the call.
	
	N.B. This code must match that in compilePICAbort: so that the offset of
	the return address of the call is the same in methods and closed PICs. */

	/* Cogit>>#compileAbort */
static AbstractInstruction *
compileAbort(void)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(MoveCqR, 0, ReceiverResultReg);
	stackOverflowCall = anInstruction;
	return (sendMiss = gCall(methodAbortTrampolineFor(methodOrBlockNumArgs)));
}

	/* Cogit>>#compileBlockDispatchFrom:to: */
static sqInt NoDbgRegParms
compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex)
{
    AbstractInstruction *anInstruction;
    BlockStart *blockStart;
    sqInt halfWay;
    AbstractInstruction *jmp;
    sqInt literal;

	if (lowBlockStartIndex == highBlockStartIndex) {
		blockStart = blockStartAt(lowBlockStartIndex);
		genoperand(Jump, ((sqInt)((blockStart->entryLabel))));
		return null;
	}
	halfWay = (highBlockStartIndex + lowBlockStartIndex) / 2;
	assert(((halfWay >= lowBlockStartIndex) && (halfWay <= highBlockStartIndex)));

	/* N.B. FLAGS := TempReg - startpc */
	blockStart = blockStartAt(halfWay);
	/* begin checkQuickConstant:forInstruction: */
	literal = (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1);
	anInstruction = genoperandoperand(CmpCqR, (((usqInt)(((blockStart->startpc)) + 1) << 1) | 1), TempReg);
	if (lowBlockStartIndex == halfWay) {
		genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)((blockStart->entryLabel))));
		compileBlockDispatchFromto(halfWay + 1, highBlockStartIndex);
		return null;
	}
	if ((halfWay + 1) == highBlockStartIndex) {
		blockStart = blockStartAt(highBlockStartIndex);
		genConditionalBranchoperand(JumpGreater, ((sqInt)((blockStart->entryLabel))));
		return compileBlockDispatchFromto(lowBlockStartIndex, halfWay);
	}
	jmp = genConditionalBranchoperand(JumpGreater, ((sqInt)0));
	compileBlockDispatchFromto(lowBlockStartIndex, halfWay);
	if (halfWay == highBlockStartIndex) {
		blockStart = blockStartAt(highBlockStartIndex);
		jmpTarget(jmp, (blockStart->entryLabel));
	}
	else {
		jmpTarget(jmp, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
		compileBlockDispatchFromto(halfWay + 1, highBlockStartIndex);
	}
	return 0;
}


/*	Compile a block's entry. This looks like a dummy CogBlockMethod header
	(for frame parsing)
	followed by either a frame build, if a frame is required, or nothing. The
	CogMethodHeader's objectHeader field is a back pointer to the method, but
	this can't be filled in until code generation. */

	/* Cogit>>#compileBlockEntry: */
static void NoDbgRegParms
compileBlockEntry(BlockStart *blockStart)
{
    AbstractInstruction *abstractInstruction;
    sqInt alignment;

	/* begin AlignmentNops: */
	alignment = blockAlignment();
	genoperand(AlignmentNops, alignment);
	(blockStart->fakeHeader = genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	
	switch (sizeof(CogBlockMethod)) {
	case 8:
		genoperand(Fill32, 0);
		genoperand(Fill32, 0);
		break;
	case 12:
		genoperand(Fill32, 0);
		genoperand(Fill32, 0);
		genoperand(Fill32, 0);
		break;
	case 16:
		genoperand(Fill32, 0);
		genoperand(Fill32, 0);
		genoperand(Fill32, 0);
		genoperand(Fill32, 0);
		break;
	default:
		error("Case not found and no otherwise clause");
	}
	(blockStart->entryLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	if (needsFrame) {
		compileBlockFrameBuild(blockStart);
		if (recordBlockTrace()) {
			/* begin CallRT: */
			abstractInstruction = genoperand(Call, ceTraceBlockActivationTrampoline);
			(abstractInstruction->annotation = IsRelativeCall);
		}
	}
	else {
		compileBlockFramelessEntry(blockStart);
	}
}


/*	Generate a call to aRoutine with up to 4 arguments. If resultRegOrNone is
	not NoReg assign the C result to resultRegOrNone. If saveRegs, save all
	registers. Hack: a negative arg value indicates an abstract register, a
	non-negative value
	indicates a constant. */

	/* Cogit>>#compileCallFor:numArgs:arg:arg:arg:arg:resultReg:regsToSave: */
static void NoDbgRegParms
compileCallFornumArgsargargargargresultRegregsToSave(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt resultRegOrNone, sqInt regMask)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction7;
    const int cStackAlignment = STACK_ALIGN_BYTES;
    sqInt delta;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt literal3;
    sqInt literal4;
    sqInt literal5;
    sqInt literal7;
    sqInt numRegsPushed;
    usqInt regMaskCopy;
    sqInt regsToSave;
    sqInt wordsPushedModAlignment;

	regsToSave = (resultRegOrNone == NoReg
		? regMask
		: ((regMask | (1U << resultRegOrNone)) - (1U << resultRegOrNone)));
	if (cStackAlignment > BytesPerWord) {
		/* begin genAlignCStackSavingRegisters:numArgs:wordAlignment: */
		regMaskCopy = ((usqInt)regsToSave);
		numRegsPushed = 0;
		while (regMaskCopy != 0) {
			numRegsPushed += regMaskCopy & 1;
			regMaskCopy = ((usqInt) regMaskCopy >> 1);
		}
		if ((numRegsPushed == 0)
		 && (0 /* numIntRegArgs */ >= numArgs)) {
			goto l1;
		}
		wordsPushedModAlignment = (numRegsPushed + numArgs) % (cStackAlignment / BytesPerWord);
		if (wordsPushedModAlignment != 0) {
			delta = (cStackAlignment / BytesPerWord) - wordsPushedModAlignment;
			/* begin checkQuickConstant:forInstruction: */
			literal = delta * BytesPerWord;
			anInstruction = genoperandoperand(SubCqR, delta * BytesPerWord, SPReg);
		}
	l1:	/* end genAlignCStackSavingRegisters:numArgs:wordAlignment: */;
	}
	genSaveRegs(backEnd, regsToSave);
	/* begin genMarshallNArgs:arg:arg:arg:arg: */
	if (numArgs == 0) {
		((AbstractInstruction *) backEnd);
		goto l2;
	}
	if (numArgs > 1) {
		if (numArgs > 2) {
			if (numArgs > 3) {
				if (regOrConst3 < NoReg) {
					/* begin checkQuickConstant:forInstruction: */
					literal1 = -2 - regOrConst3;
					anInstruction1 = genoperand(PushCq, -2 - regOrConst3);
				}
				else {
					genoperand(PushR, regOrConst3);
				}
			}
			if (regOrConst2 < NoReg) {
				/* begin checkQuickConstant:forInstruction: */
				literal2 = -2 - regOrConst2;
				anInstruction2 = genoperand(PushCq, -2 - regOrConst2);
			}
			else {
				genoperand(PushR, regOrConst2);
			}
		}
		if (regOrConst1 < NoReg) {
			/* begin checkQuickConstant:forInstruction: */
			literal3 = -2 - regOrConst1;
			anInstruction3 = genoperand(PushCq, -2 - regOrConst1);
		}
		else {
			genoperand(PushR, regOrConst1);
		}
	}
	if (regOrConst0 < NoReg) {
		/* begin checkQuickConstant:forInstruction: */
		literal4 = -2 - regOrConst0;
		anInstruction4 = genoperand(PushCq, -2 - regOrConst0);
	}
	else {
		genoperand(PushR, regOrConst0);
	}
	((AbstractInstruction *) backEnd);
	l2:	/* end genMarshallNArgs:arg:arg:arg:arg: */;
	/* begin annotateCall: */
	literal5 = ((usqInt)aRoutine);
	anInstruction5 = genoperand(CallFull, ((usqInt)aRoutine));
	abstractInstruction = anInstruction5;
	(abstractInstruction->annotation = IsRelativeCall);
	if (resultRegOrNone != NoReg) {
		genWriteCResultIntoReg(backEnd, resultRegOrNone);
	}
	/* begin genRemoveNArgsFromStack: */
	if (!(numArgs == 0)) {
		/* begin checkQuickConstant:forInstruction: */
		literal7 = numArgs * 4;
		anInstruction7 = genoperandoperand(AddCqR, numArgs * 4, ESP);
	}
	genRestoreRegs(backEnd, regsToSave);
}


/*	Compile the cache tag computation and the first comparison. Answer the
	address of that comparison. */

	/* Cogit>>#compileCPICEntry */
static AbstractInstruction *
compileCPICEntry(void)
{
	entry = genGetInlineCacheClassTagFromintoforEntry(ReceiverResultReg, TempReg, 1);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, ClassReg, TempReg);
	return genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
}


/*	Compile the abstract instructions for the entire full block method. */

	/* Cogit>>#compileEntireFullBlockMethod: */
static sqInt NoDbgRegParms
compileEntireFullBlockMethod(sqInt numCopied)
{
    sqInt result;

	/* begin preenMethodLabel */
	(((((AbstractInstruction *) methodLabel))->operands))[1] = 0;
	compileFullBlockEntry();
	compileFullBlockMethodFrameBuild(numCopied);
	if (((result = compileMethodBody())) < 0) {
		return result;
	}
	assert(blockCount == 0);
	return 0;
}


/*	The entry code to a method checks that the class of the current receiver
	matches that in the inline cache. Other non-obvious elements are that its
	alignment must be
	different from the alignment of the noCheckEntry so that the method map
	machinery can distinguish normal and super sends (super sends bind to the
	noCheckEntry).  */

	/* Cogit>>#compileEntry */
static void
compileEntry(void)
{
    AbstractInstruction *abstractInstruction;

	entry = genGetInlineCacheClassTagFromintoforEntry(ReceiverResultReg, TempReg, 1);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, ClassReg, TempReg);
	genConditionalBranchoperand(JumpNonZero, ((sqInt)sendMiss));
	noCheckEntry = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	if (compileSendTrace()) {
		/* begin saveAndRestoreLinkRegAround: */
		/* begin CallRT: */
		abstractInstruction = genoperand(Call, ceTraceLinkedSendTrampoline);
		(abstractInstruction->annotation = IsRelativeCall);
	}
}


/*	Compile the abstract instructions for the entire method, including blocks. */
/*	Abort for stack overflow on full block activation (no inline cache miss
	possible). The flag is SendNumArgsReg. */

	/* Cogit>>#compileFullBlockEntry */
static sqInt
compileFullBlockEntry(void)
{
    sqInt alignment;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt callTarget;
    AbstractInstruction * jumpNoContextSwitch;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(MoveCqR, 0, ReceiverResultReg);
	stackOverflowCall = anInstruction;
	/* begin Call: */
	callTarget = methodAbortTrampolineFor(methodOrBlockNumArgs);
	genoperand(Call, callTarget);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(MoveCqR, 0, SendNumArgsReg);
	fullBlockNoContextSwitchEntry = anInstruction1;
	jumpNoContextSwitch = genoperand(Jump, ((sqInt)0));
	/* begin AlignmentNops: */
	alignment = ((BytesPerWord < 8) ? 8 : BytesPerWord);
	genoperand(AlignmentNops, alignment);
	fullBlockEntry = genoperandoperand(MoveRR, ReceiverResultReg, SendNumArgsReg);
	jmpTarget(jumpNoContextSwitch, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}


/*	Compile the top-level method body. */

	/* Cogit>>#compileMethodBody */
static sqInt
compileMethodBody(void)
{
	if (endPC < initialPC) {
		return 0;
	}
	return compileAbstractInstructionsFromthrough(initialPC + (deltaToSkipPrimAndErrorStoreInheader(methodObj, methodHeader)), endPC);
}


/*	The start of a PIC has a call to a run-time abort routine that either
	handles a dispatch to an
	interpreted method or a dispatch of an MNU case. The routine selects the
	path by testing
	ClassReg, which holds the inline cache tag; if equal to the
	picAbortDiscriminatorValue (zero)
	it takes the MNU path; if nonzero the dispatch to interpreter path.
	Neither of these paths
	returns. The abort routine must be called; In the callee the PIC is
	located by adding the
	relevant offset to the return address of the call.
	
	N.B. This code must match that in compileAbort so that the offset of the
	return address of
	the call is the same in methods and closed PICs. */

	/* Cogit>>#compilePICAbort: */
static sqInt NoDbgRegParms
compilePICAbort(sqInt numArgs)
{
    AbstractInstruction *anInstruction;
    sqInt callTarget1;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(MoveCqR, 0 /* picAbortDiscriminatorValue */, ClassReg);
	picMNUAbort = anInstruction;
	/* begin Call: */
	callTarget1 = picAbortTrampolineFor(numArgs);
	picInterpretAbort = genoperand(Call, callTarget1);
	return 0;
}


/*	Generate a trampoline with up to four arguments. Generate either a call or
	a jump to aRoutine
	as requested by callJumpBar. If generating a call and resultRegOrNone is
	not NoReg pass the C
	result back in resultRegOrNone.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* Cogit>>#compileTrampolineFor:numArgs:arg:arg:arg:arg:regsToSave:pushLinkReg:resultReg: */
static void NoDbgRegParms
compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt regMask, sqInt pushLinkReg, sqInt resultRegOrNone)
{
	genSmalltalkToCStackSwitch(pushLinkReg);
	compileCallFornumArgsargargargargresultRegregsToSave(aRoutine, numArgs, regOrConst0, regOrConst1, regOrConst2, regOrConst3, resultRegOrNone, regMask);
	genLoadStackPointers(backEnd);
	genoperand(RetN, 0);
}


/*	Generate the entry code for a method to determine cmEntryOffset and
	cmNoCheckEntryOffset. We
	need cmNoCheckEntryOffset up front to be able to generate the map starting
	from cmNoCheckEntryOffset */
/*	stack allocate the various collections so that they
	are effectively garbage collected on return. */

	/* Cogit>>#computeEntryOffsets */
static void
computeEntryOffsets(void)
{
    sqInt fixupSize;
    sqInt opcodeSize;
    AbstractInstruction *sendMissCall;

	/* begin allocateOpcodes:bytecodes: */
	numAbstractOpcodes = 24;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	methodOrBlockNumArgs = 0;
	sendMissCall = compileAbort();
	compileEntry();
	computeMaximumSizes();
	generateInstructionsAt(methodZoneBase + (sizeof(CogMethod)));
	cmEntryOffset = ((entry->address)) - methodZoneBase;
	cmNoCheckEntryOffset = ((noCheckEntry->address)) - methodZoneBase;
	missOffset = (((sendMissCall->address)) + ((sendMissCall->machineCodeSize))) - methodZoneBase;
	entryPointMask = BytesPerWord - 1;
	while ((cmEntryOffset & entryPointMask) == (cmNoCheckEntryOffset & entryPointMask)) {
		entryPointMask = (entryPointMask + entryPointMask) + 1;
	}
	if (entryPointMask >= (roundUpLength(1))) {
		error("cannot differentiate checked and unchecked entry-points with current cog method alignment");
	}
	checkedEntryAlignment = cmEntryOffset & entryPointMask;
	uncheckedEntryAlignment = cmNoCheckEntryOffset & entryPointMask;
	assert(checkedEntryAlignment != uncheckedEntryAlignment);
}


/*	Generate the entry code for a method to determine cmEntryOffset and
	cmNoCheckEntryOffset. We
	need cmNoCheckEntryOffset up front to be able to generate the map starting
	from cmNoCheckEntryOffset */
/*	stack allocate the various collections so that they
	are effectively garbage collected on return. */

	/* Cogit>>#computeFullBlockEntryOffsets */
static void
computeFullBlockEntryOffsets(void)
{
    sqInt fixupSize;
    sqInt opcodeSize;

	/* begin allocateOpcodes:bytecodes: */
	numAbstractOpcodes = 24;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	methodOrBlockNumArgs = 0;
	compileFullBlockEntry();
	computeMaximumSizes();
	generateInstructionsAt(methodZoneBase + (sizeof(CogMethod)));
	cbEntryOffset = ((fullBlockEntry->address)) - methodZoneBase;
	cbNoSwitchEntryOffset = ((fullBlockNoContextSwitchEntry->address)) - methodZoneBase;
}


/*	This pass assigns maximum sizes to all abstract instructions and
	eliminates jump fixups.
	It hence assigns the maximum address an instruction will occur at which
	allows the next
	pass to conservatively size jumps. */

	/* Cogit>>#computeMaximumSizes */
static void
computeMaximumSizes(void)
{
    AbstractInstruction *abstractInstruction;
    sqInt i;
    sqInt relativeAddress;

	relativeAddress = 0;
	for (i = 0; i < opcodeIndex; i += 1) {
		abstractInstruction = abstractInstructionAt(i);
		(abstractInstruction->address = relativeAddress);
		(abstractInstruction->maxSize = computeMaximumSize(abstractInstruction));
		relativeAddress += (abstractInstruction->maxSize);
	}
}


/*	Configure a copy of the prototype CPIC for a two-case PIC for 
	case0CogMethod and
	case1Method
	case1Tag.
	The tag for case0CogMethod is at the send site and so doesn't need to be
	generated. case1Method may be any of
	- a Cog method; jump to its unchecked entry-point
	- a CompiledMethod; jump to the ceInterpretFromPIC trampoline
	- nil; call ceMNUFromPIC
	addDelta is the address change from the prototype to the new CPIC
	location, needed
	because the loading of the CPIC label at the end may use a literal instead
	of a pc relative load. */
/*	self disassembleFrom: cPIC asInteger + (self sizeof: CogMethod) to: cPIC
	asInteger + closedPICSize
 */

	/* Cogit>>#configureCPIC:Case0:Case1Method:tag:isMNUCase:numArgs:delta: */
static sqInt NoDbgRegParms
configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs, sqInt addrDelta)
{
    sqInt caseEndAddress;
    sqInt operand;
    sqInt pc;
    sqInt targetEntry;

	assert(case1Method != null);
	rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs));
	assert(!(inlineCacheTagIsYoung(case1Tag)));
	if ((!isMNUCase)
	 && (methodHasCogMethod(case1Method))) {
		operand = 0;
		targetEntry = (((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset;
	}
	else {

		/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
		operand = ((case1Method == null)
		 || (isYoungObject(case1Method))
			? 0
			: case1Method);
		targetEntry = (case1Method == null
			? (((sqInt)cPIC)) + (sizeof(CogMethod))
			: (((sqInt)cPIC)) + (picInterpretAbortOffset()));
	}
	rewriteJumpLongAttarget(backEnd, (((sqInt)cPIC)) + firstCPICCaseOffset, (((sqInt)case0CogMethod)) + cmNoCheckEntryOffset);

	/* update the cpic case */
	caseEndAddress = addressOfEndOfCaseinCPIC(2, cPIC);
	rewriteCPICCaseAttagobjReftarget(caseEndAddress, case1Tag, operand, ((sqInt)((isMNUCase
	? (((sqInt)cPIC)) + (sizeof(CogMethod))
	: targetEntry))));
	/* begin relocateMethodReferenceBeforeAddress:by: */
	pc = ((((sqInt)cPIC)) + cPICEndOfCodeOffset) - 5 /* jumpLongByteSize */;
	relocateCallBeforeReturnPCby(((AbstractInstruction *) backEnd), pc, addrDelta);
	((AbstractInstruction *) backEnd);
	rewriteJumpLongAttarget(backEnd, (((sqInt)cPIC)) + cPICEndOfCodeOffset, cPICMissTrampolineFor(numArgs));
	return 0;
}


/*	Configure a copy of the prototype CPIC for a one-case MNU CPIC that calls
	ceMNUFromPIC for
	case0Tag The tag for case0 is at the send site and so doesn't need to be
	generated. addDelta is the address change from the prototype to the new
	CPIC location, needed
	because the loading of the CPIC label at the end may be a literal instead
	of a pc-relative load. */
/*	adjust the jump at missOffset, the ceAbortXArgs */

	/* Cogit>>#configureMNUCPIC:methodOperand:numArgs:delta: */
static sqInt NoDbgRegParms
configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs, sqInt addrDelta)
{
    int operand;
    sqInt pc;
    sqInt target;

	rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs));

	/* set the jump to the case0 method */
	operand = ((methodOperand == null)
	 || (isYoungObject(methodOperand))
		? 0
		: methodOperand);
	rewriteJumpLongAttarget(backEnd, (((sqInt)cPIC)) + firstCPICCaseOffset, (((sqInt)cPIC)) + (sizeof(CogMethod)));
	storeLiteralbeforeFollowingAddress(backEnd, operand, ((((sqInt)cPIC)) + firstCPICCaseOffset) - 5 /* jumpLongByteSize */);
	rewriteJumpLongAttarget(backEnd, (((sqInt)cPIC)) + cPICEndOfCodeOffset, cPICMissTrampolineFor(numArgs));
	/* begin relocateMethodReferenceBeforeAddress:by: */
	pc = ((((sqInt)cPIC)) + cPICEndOfCodeOffset) - 5 /* jumpLongByteSize */;
	relocateCallBeforeReturnPCby(((AbstractInstruction *) backEnd), pc, addrDelta);
	((AbstractInstruction *) backEnd);
	/* begin rewriteCPIC:caseJumpTo: */
	target = addressOfEndOfCaseinCPIC(2, cPIC);
	rewriteCPICJumpAttarget(backEnd, (((((sqInt)cPIC)) + firstCPICCaseOffset) - 5 /* jumpLongByteSize */) - 5 /* loadLiteralByteSize */, target);
	return 0;
}


/*	Scan the CPIC for target methods that have been freed and eliminate them.
	Since the first entry cannot be eliminated, answer that the PIC should be
	freed if the first entry is to a free target. Answer if the PIC is now
	empty or should be freed. */

	/* Cogit>>#cPICCompactAndIsNowEmpty: */
static sqInt NoDbgRegParms
cPICCompactAndIsNowEmpty(CogMethod *cPIC)
{
    sqInt entryPoint;
    sqInt followingAddress;
    sqInt i;
    sqInt methods[MaxCPICCases];
    sqInt pc;
    int tags[MaxCPICCases];
    CogMethod *targetMethod;
    sqInt targets[MaxCPICCases];
    sqInt used;
    sqInt valid;

	used = 0;
	for (i = 1; i <= ((cPIC->cPICNumCases)); i += 1) {
		pc = addressOfEndOfCaseinCPIC(i, cPIC);
		if (i == 1) {
			entryPoint = jumpLongTargetBeforeFollowingAddress(backEnd, pc);
		}
		else {
			/* begin jumpLongConditionalTargetBeforeFollowingAddress: */
			entryPoint = jumpLongTargetBeforeFollowingAddress(((AbstractInstruction *) backEnd), pc);
		}

		/* Collect all target triples except for triples whose entry-point is a freed method */
		valid = 1;
		if (!(((((usqInt)cPIC)) <= (((usqInt)entryPoint)))
			 && (((((usqInt)cPIC)) + ((cPIC->blockSize))) >= (((usqInt)entryPoint))))) {
			targetMethod = ((CogMethod *) (entryPoint - cmNoCheckEntryOffset));
			assert((((targetMethod->cmType)) == CMMethod)
			 || (((targetMethod->cmType)) == CMFree));
			if (((targetMethod->cmType)) == CMFree) {
				if (i == 1) {
					return 1;
				}
				valid = 0;
			}
		}
		if (valid) {
			tags[used] = ((i > 1
	? (/* begin literal32BeforeFollowingAddress: */
		(followingAddress = pc - 6 /* jumpLongConditionalByteSize */),
		literalBeforeFollowingAddress(((AbstractInstruction *) backEnd), followingAddress))
	: 0));
			targets[used] = entryPoint;
			methods[used] = (literalBeforeFollowingAddress(backEnd, pc - ((i == 1
	? /* begin jumpLongByteSize */ 5
	: 6 /* jumpLongConditionalByteSize */ + 5 /* cmpC32RTempByteSize */))));
			used += 1;
		}
	}
	if (used == ((cPIC->cPICNumCases))) {
		return 0;
	}
	if (used == 0) {
		return 1;
	}
	(cPIC->cPICNumCases = used);
	if (used == 1) {
		pc = addressOfEndOfCaseinCPIC(2, cPIC);
		/* begin rewriteCPIC:caseJumpTo: */
		rewriteCPICJumpAttarget(backEnd, (((((sqInt)cPIC)) + firstCPICCaseOffset) - 5 /* jumpLongByteSize */) - 5 /* loadLiteralByteSize */, pc);
		return 0;
	}
	for (i = 1; i < used; i += 1) {
		pc = addressOfEndOfCaseinCPIC(i + 1, cPIC);
		rewriteCPICCaseAttagobjReftarget(pc, tags[i], methods[i], targets[i]);
	}
	/* begin rewriteCPIC:caseJumpTo: */
	rewriteCPICJumpAttarget(backEnd, (((((sqInt)cPIC)) + firstCPICCaseOffset) - 5 /* jumpLongByteSize */) - 5 /* loadLiteralByteSize */, pc - cPICCaseSize);
	return 0;
}


/*	The first case in a CPIC doesn't have a class reference so we need only
	step over actually usd subsequent cases.
 */

	/* Cogit>>#cPICHasForwardedClass: */
static sqInt NoDbgRegParms
cPICHasForwardedClass(CogMethod *cPIC)
{
    sqInt classIndex;
    sqInt i;
    sqInt pc;


	/* start by finding the address of the topmost case, the cPICNumCases'th one */
	pc = (addressOfEndOfCaseinCPIC((cPIC->cPICNumCases), cPIC)) - 6 /* jumpLongConditionalByteSize */;
	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
		/* begin literal32BeforeFollowingAddress: */
		classIndex = literalBeforeFollowingAddress(((AbstractInstruction *) backEnd), pc);
		if (isForwardedClassIndex(classIndex)) {
			return 1;
		}
		pc += cPICCaseSize;
	}
	return 0;
}


/*	scan the CPIC for target methods that have been freed. */

	/* Cogit>>#cPICHasFreedTargets: */
static sqInt NoDbgRegParms
cPICHasFreedTargets(CogMethod *cPIC)
{
    sqInt entryPoint;
    sqInt i;
    sqInt pc;
    CogMethod *targetMethod;

	for (i = 1; i <= ((cPIC->cPICNumCases)); i += 1) {
		pc = addressOfEndOfCaseinCPIC(i, cPIC);
		if (i == 1) {
			entryPoint = jumpLongTargetBeforeFollowingAddress(backEnd, pc);
		}
		else {
			/* begin jumpLongConditionalTargetBeforeFollowingAddress: */
			entryPoint = jumpLongTargetBeforeFollowingAddress(((AbstractInstruction *) backEnd), pc);
		}
		if (!(((((usqInt)cPIC)) <= (((usqInt)entryPoint)))
			 && (((((usqInt)cPIC)) + ((cPIC->blockSize))) >= (((usqInt)entryPoint))))) {
			targetMethod = ((CogMethod *) (entryPoint - cmNoCheckEntryOffset));
			assert((((targetMethod->cmType)) == CMMethod)
			 || (((targetMethod->cmType)) == CMFree));
			if (((targetMethod->cmType)) == CMFree) {
				return 1;
			}
		}
	}
	return 0;
}


/*	Whimsey; we want 16rCA5E10 + cPICPrototypeCaseOffset to be somewhere in
	the middle of the zone.
 */

	/* Cogit>>#cPICPrototypeCaseOffset */
static sqInt
cPICPrototypeCaseOffset(void)
{
	return ((methodZoneBase + (youngReferrers())) / 2) - 13262352;
}


/*	Are any of the jumps from this CPIC to targetMethod? */

	/* Cogit>>#cPIC:HasTarget: */
static sqInt NoDbgRegParms
cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod)
{
    sqInt i;
    sqInt pc;
    sqInt target;

	target = (((usqInt)targetMethod)) + cmNoCheckEntryOffset;

	/* Since this is a fast test doing simple compares we don't need to care that some
	   cases have nonsense addresses in there. Just zip on through. */
	/* First jump is unconditional; subsequent ones are conditional */
	pc = (((sqInt)cPIC)) + firstCPICCaseOffset;
	if (target == (jumpLongTargetBeforeFollowingAddress(backEnd, pc))) {
		return 1;
	}
	for (i = 2; i <= MaxCPICCases; i += 1) {
		pc += cPICCaseSize;
		if (target == (jumpLongTargetBeforeFollowingAddress(backEnd, pc))) {
			return 1;
		}
	}
	return 0;
}


/*	Answer an Array of the PIC's selector, followed by class and
	targetMethod/doesNotUnderstand: for each entry in the PIC.
 */

	/* Cogit>>#createCPICData: */
static sqInt NoDbgRegParms
createCPICData(CogMethod *cPIC)
{
    sqInt class;
    sqInt entryPoint;
    sqInt i;
    sqInt pc;
    sqInt picData;
    sqInt target;
    CogMethod *targetMethod;

	assert((((cPIC->methodObject)) == 0)
	 || (addressCouldBeOop((cPIC->methodObject))));
	picData = instantiateClassindexableSize(classArray(), (((cPIC->cPICNumCases)) * 2) + 1);
	if (!(picData)) {
		return picData;
	}
	storePointerUncheckedofObjectwithValue(0, picData, (cPIC->selector));
	for (i = 1; i <= ((cPIC->cPICNumCases)); i += 1) {
		pc = addressOfEndOfCaseinCPIC(i, cPIC);
		if (i == 1) {

			/* first case may have been collected and stored here by collectCogConstituentFor:Annotation:Mcpc:Bcpc:Method: */
			class = (cPIC->methodObject);
			if (class == 0) {
				class = nilObject();
			}
			entryPoint = jumpLongTargetBeforeFollowingAddress(backEnd, pc);
		}
		else {
			class = classForInlineCacheTag(literalBeforeFollowingAddress(backEnd, pc - 6 /* jumpLongConditionalByteSize */));
			/* begin jumpLongConditionalTargetBeforeFollowingAddress: */
			entryPoint = jumpLongTargetBeforeFollowingAddress(((AbstractInstruction *) backEnd), pc);
		}
		if (((((usqInt)cPIC)) <= (((usqInt)entryPoint)))
		 && (((((usqInt)cPIC)) + ((cPIC->blockSize))) >= (((usqInt)entryPoint)))) {
			target = splObj(SelectorDoesNotUnderstand);
		}
		else {
			targetMethod = ((CogMethod *) (entryPoint - cmNoCheckEntryOffset));
			assert(((targetMethod->cmType)) == CMMethod);
			target = (targetMethod->methodObject);
		}
		storePointerUncheckedofObjectwithValue((i * 2) - 1, picData, class);
		storePointerUncheckedofObjectwithValue(i * 2, picData, target);
	}
	beRootIfOld(picData);
	(cPIC->methodObject = 0);
	return picData;
}


/*	Division is a little weird on some processors. Defer to the backEnd
	to allow it to generate any special code it may need to. */

	/* Cogit>>#DivR:R:Quo:Rem: */
static AbstractInstruction * NoDbgRegParms
gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder)
{
	genDivRRQuoRem(backEnd, rDivisor, rDividend, rQuotient, rRemainder);
	return abstractInstructionAt(opcodeIndex - 1);
}


/*	Return the default number of bytes to allocate for native code at startup.
	The actual value can be set via vmParameterAt: and/or a preference in the
	ini file. */

	/* Cogit>>#defaultCogCodeSize */
sqInt
defaultCogCodeSize(void)
{
	/* begin getDefaultCogCodeSize */
	return 1024 * 1024;
}


/*	Answer the number of bytecodes to skip to get to the first bytecode
	past the primitive call and any store of the error code. */

	/* Cogit>>#deltaToSkipPrimAndErrorStoreIn:header: */
static sqInt NoDbgRegParms
deltaToSkipPrimAndErrorStoreInheader(sqInt aMethodObj, sqInt aMethodHeader)
{
	return (((primitiveIndexOfMethodheader(aMethodObj, aMethodHeader)) > 0)
	 && ((longStoreBytecodeForHeader(aMethodHeader)) == (fetchByteofObject((startPCOfMethod(aMethodObj)) + (sizeOfCallPrimitiveBytecode(aMethodHeader)), aMethodObj)))
		? (sizeOfCallPrimitiveBytecode(aMethodHeader)) + (sizeOfLongStoreTempBytecode(aMethodHeader))
		: 0);
}

	/* Cogit>>#endPCOf: */
static sqInt NoDbgRegParms
endPCOf(sqInt aMethod)
{
    sqInt bsOffset;
    sqInt byte;
    BytecodeDescriptor *descriptor;
    sqInt distance;
    sqInt end;
    sqInt latestContinuation;
    sqInt nExts;
    sqInt pc;
    sqInt prim;
    sqInt targetPC;

	pc = (latestContinuation = startPCOfMethod(aMethod));
	if (((prim = primitiveIndexOf(aMethod))) > 0) {
		if (isQuickPrimitiveIndex(prim)) {
			return pc - 1;
		}
	}
	/* begin bytecodeSetOffsetFor: */
	bsOffset = 
#  if MULTIPLEBYTECODESETS
		(methodUsesAlternateBytecodeSet(aMethod)
				? 256
				: 0)
#  else /* MULTIPLEBYTECODESETS */
		0
#  endif /* MULTIPLEBYTECODESETS */
		;
	nExts = 0;
	end = numBytesOf(aMethod);
	while (pc <= end) {
		byte = fetchByteofObject(pc, aMethod);
		descriptor = generatorAt(byte + bsOffset);
		if (((descriptor->isReturn))
		 && (pc >= latestContinuation)) {
			end = pc;
		}
		if ((isBranch(descriptor))
		 || ((descriptor->isBlockCreation))) {
			distance = ((descriptor->spanFunction))(descriptor, pc, nExts, aMethod);
			targetPC = (pc + ((descriptor->numBytes))) + distance;
			latestContinuation = ((latestContinuation < targetPC) ? targetPC : latestContinuation);
			if ((descriptor->isBlockCreation)) {
				pc += distance;
			}
		}
		else {
			latestContinuation = latestContinuation;
		}
		nExts = ((descriptor->isExtension)
			? nExts + 1
			: 0);
		pc += (descriptor->numBytes);
	}
	return end;
}


/*	This is a static version of ceEnterCogCodePopReceiverReg
	for break-pointing when debugging in C. */
/*	This exists only for break-pointing. */

	/* Cogit>>#enterCogCodePopReceiver */
void
enterCogCodePopReceiver(void)
{
	realCEEnterCogCodePopReceiverReg();
	error("what??");
}


/*	Answer if the entryPoint's tag is expected to be a selector reference, as
	opposed to a class tag.
 */

	/* Cogit>>#entryPointTagIsSelector: */
static sqInt NoDbgRegParms
entryPointTagIsSelector(sqInt entryPoint)
{
	return (entryPoint < methodZoneBase)
	 || (((entryPoint & entryPointMask) == uncheckedEntryAlignment)
	 || (((entryPoint & entryPointMask) == checkedEntryAlignment)
	 && ((((((CogMethod *) (entryPoint - cmEntryOffset)))->cmType)) == CMOpenPIC)));
}


/*	Use asserts to check if the ClosedPICPrototype is as expected from
	compileClosedPICPrototype, and can be updated as required via
	rewriteCPICCaseAt:tag:objRef:target:. If all asserts pass, answer
	0, otherwise answer a bit mask identifying all the errors. */
/*	self disassembleFrom: methodZoneBase + (self sizeof: CogMethod) to:
	methodZoneBase + closedPICSize
 */

	/* Cogit>>#expectedClosedPICPrototype: */
static sqInt NoDbgRegParms
expectedClosedPICPrototype(CogMethod *cPIC)
{
    sqInt classTag;
    sqInt classTagPC;
    sqInt entryPoint;
    sqInt errors;
    sqInt i;
    sqInt methodObjPC;
    sqInt object;
    sqInt pc;

	errors = 0;

	/* First jump is unconditional; subsequent ones are conditional */
	pc = (((usqInt)cPIC)) + firstCPICCaseOffset;
	object = literalBeforeFollowingAddress(backEnd, pc - 5 /* jumpLongByteSize */);
	if (!(asserta(object == (firstPrototypeMethodOop())))) {
		errors = 1;
	}
	entryPoint = jumpLongTargetBeforeFollowingAddress(backEnd, pc);
	if (!(asserta(entryPoint == ((cPICPrototypeCaseOffset()) + 13262352)))) {
		errors += 2;
	}
	for (i = 1; i < MaxCPICCases; i += 1) {

		/* verify information in case is as expected. */
		pc += cPICCaseSize;
		methodObjPC = (pc - 6 /* jumpLongConditionalByteSize */) - 5 /* cmpC32RTempByteSize */;
		object = literalBeforeFollowingAddress(backEnd, methodObjPC);
		if (!(asserta(object == ((subsequentPrototypeMethodOop()) + i)))) {
			errors = errors | 4;
		}
		classTagPC = pc - 6 /* jumpLongConditionalByteSize */;
		/* begin literal32BeforeFollowingAddress: */
		classTag = literalBeforeFollowingAddress(((AbstractInstruction *) backEnd), classTagPC);
		if (!(asserta(classTag == (3133021973U + i)))) {
			errors = errors | 8;
		}
		/* begin jumpLongConditionalTargetBeforeFollowingAddress: */
		entryPoint = jumpLongTargetBeforeFollowingAddress(((AbstractInstruction *) backEnd), pc);
		if (!(asserta(entryPoint == (((cPICPrototypeCaseOffset()) + 13262352) + (i * 16))))) {
			errors = errors | 16;
		}
		rewriteCPICCaseAttagobjReftarget(pc, classTag ^ 1515870810, object ^ 2779096485U, entryPoint ^ 5614160);
		object = literalBeforeFollowingAddress(backEnd, methodObjPC);
		if (!(asserta(object == (((subsequentPrototypeMethodOop()) + i) ^ 2779096485U)))) {
			errors = errors | 32;
		}
		/* begin literal32BeforeFollowingAddress: */
		classTag = literalBeforeFollowingAddress(((AbstractInstruction *) backEnd), classTagPC);
		if (!(asserta(classTag == ((3133021973U + i) ^ 1515870810)))) {
			errors = errors | 64;
		}
		/* begin jumpLongConditionalTargetBeforeFollowingAddress: */
		entryPoint = jumpLongTargetBeforeFollowingAddress(((AbstractInstruction *) backEnd), pc);
		if (!(asserta(entryPoint == ((((cPICPrototypeCaseOffset()) + 13262352) + (i * 16)) ^ 5614160)))) {
			errors = errors | 128;
		}
		rewriteCPICCaseAttagobjReftarget(pc, classTag ^ 1515870810, object ^ 2779096485U, entryPoint ^ 5614160);
	}
	entryPoint = jumpLongTargetBeforeFollowingAddress(backEnd, (pc + cPICEndSize));
	if (!(asserta(entryPoint == (cPICMissTrampolineFor(0))))) {
		errors += 256;
	}
	return errors;
}


/*	224		11100000	aaaaaaaa	Extend A (Ext A = Ext A prev * 256 + Ext A) */

	/* Cogit>>#extABytecode */
static sqInt
extABytecode(void)
{
	extA = (((usqInt) extA << 8)) + byte1;
	return 0;
}


/*	225		11100001	sbbbbbbb	Extend B (Ext B = Ext B prev * 256 + Ext B) */

	/* Cogit>>#extBBytecode */
static sqInt
extBBytecode(void)
{
	extB = ((numExtB == 0)
	 && (byte1 > 0x7F)
		? byte1 - 256
		: (((usqInt) extB << 8)) + byte1);
	numExtB += 1;
	return 0;
}


/*	Fill in the block headers now we know the exact layout of the code. */

	/* Cogit>>#fillInBlockHeadersAt: */
static sqInt NoDbgRegParms
fillInBlockHeadersAt(sqInt startAddress)
{
    CogBlockMethod *blockHeader;
    BlockStart *blockStart;
    sqInt i;

	if (!(needsFrame
		 && (blockCount > 0))) {
		return null;
	}
	if (blockNoContextSwitchOffset == null) {
		blockNoContextSwitchOffset = ((blockEntryLabel->address)) - ((blockEntryNoContextSwitch->address));
	}
	else {
		assert(blockNoContextSwitchOffset == (((blockEntryLabel->address)) - ((blockEntryNoContextSwitch->address))));
	}
	for (i = 0; i < blockCount; i += 1) {
		blockStart = blockStartAt(i);
		blockHeader = ((CogBlockMethod *) ((((blockStart->fakeHeader))->address)));
		(blockHeader->homeOffset = ((((blockStart->fakeHeader))->address)) - startAddress);
		(blockHeader->startpc = (blockStart->startpc));
		(blockHeader->cmType = CMBlock);
		(blockHeader->cmNumArgs = (blockStart->numArgs));
		(blockHeader->cbUsesInstVars = (blockStart->hasInstVarRef));
		(blockHeader->stackCheckOffset = (((blockStart->stackCheckLabel)) == null
			? 0
			: ((((blockStart->stackCheckLabel))->address)) - ((((blockStart->fakeHeader))->address))));
	}
	return 0;
}

	/* Cogit>>#fillInMethodHeader:size:selector: */
static CogMethod * NoDbgRegParms
fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector)
{
    CogMethod *originalMethod;
    sqInt rawHeader;

	(method->cmType = CMMethod);
	(method->objectHeader = nullHeaderForMachineCodeMethod());
	(method->blockSize = size);
	(method->methodObject = methodObj);

	/* If the method has already been cogged (e.g. Newspeak accessors) then
	   leave the original method attached to its cog method, but get the right header. */
	rawHeader = rawHeaderOf(methodObj);
	if (isCogMethodReference(rawHeader)) {
		originalMethod = ((CogMethod *) rawHeader);
		assert(((originalMethod->blockSize)) == size);
		assert(methodHeader == ((originalMethod->methodHeader)));
			}
	else {
		rawHeaderOfput(methodObj, ((sqInt)method));
			}
	(method->methodHeader = methodHeader);
	(method->selector = selector);
	(method->cmNumArgs = argumentCountOfMethodHeader(methodHeader));
	if ((method->cmRefersToYoung = hasYoungReferent)) {
		addToYoungReferrers(method);
	}
	(method->cmUsageCount = initialMethodUsageCount());
	/* begin cpicHasMNUCase: */
	((((CogBlockMethod *) method))->cpicHasMNUCaseOrCMIsFullBlock) = 0;
	(method->cmUsesPenultimateLit = maxLitIndex >= ((literalCountOfMethodHeader(methodHeader)) - 2));
	(method->blockEntryOffset = (blockEntryLabel != null
		? ((blockEntryLabel->address)) - (((sqInt)method))
		: 0));
	if (needsFrame) {
		if (!((((stackCheckLabel->address)) - (((sqInt)method))) <= MaxStackCheckOffset)) {
			error("too much code for stack check offset");
		}
	}
	(method->stackCheckOffset = (needsFrame
		? ((stackCheckLabel->address)) - (((sqInt)method))
		: 0));
	assert((callTargetFromReturnAddress(backEnd, (((sqInt)method)) + missOffset)) == (methodAbortTrampolineFor((method->cmNumArgs))));
	assert(size == (roundUpLength(size)));
	flushICacheFromto(processor, ((usqInt)method), (((usqInt)method)) + size);
	/* begin maybeEnableSingleStep */
	return method;
}

	/* Cogit>>#findBackwardBranch:IsBackwardBranch:Mcpc:Bcpc:MatchingBcpc: */
static sqInt NoDbgRegParms
findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc)
{
	return ((isBackwardBranchAndAnnotation & 1)
	 && ((((sqInt)targetBcpc)) == bcpc)
		? ((sqInt)mcpc)
		: 0);
}

	/* Cogit>>#findBlockMethodWithEntry:startBcpc: */
static usqInt NoDbgRegParms
findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc)
{
    CogBlockMethod *cogBlockMethod;

	cogBlockMethod = ((CogBlockMethod *) (blockEntryMcpc - (sizeof(CogBlockMethod))));
	if (((cogBlockMethod->startpc)) == startBcpc) {
		return ((usqInt)cogBlockMethod);
	}
	return 0;
}

	/* Cogit>>#findMapLocationForMcpc:inMethod: */
static usqInt NoDbgRegParms
findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod)
{
    sqInt annotation;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;

	mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
		? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
		: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
	map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
	if (mcpc == targetMcpc) {
		return map;
	}
	while (((mapByte = byteAt(map))) != MapEnd) {
		annotation = ((usqInt) mapByte) >> AnnotationShift;
		if (annotation != IsAnnotationExtension) {
			mcpc += 1 /* codeGranularity */ * ((annotation == IsDisplacementX2N
	? ((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift))
	: mapByte & DisplacementMask));
		}
		if (mcpc >= targetMcpc) {
			assert(mcpc == targetMcpc);
			if (annotation == IsDisplacementX2N) {
				map -= 1;
				mapByte = byteAt(map);
				annotation = ((usqInt) mapByte) >> AnnotationShift;
				assert(annotation > IsAnnotationExtension);
			}
			return map;
		}
		map -= 1;
	}
	return 0;
}


/*	Find the CMMethod or CMBlock that has zero-relative startbcpc as its first
	bytecode pc.
	As this is for cannot resume processing and/or conversion to machine-code
	on backward
	branch, it doesn't have to be fast. Enumerate block returns and map to
	bytecode pcs. */

	/* Cogit>>#findMethodForStartBcpc:inHomeMethod: */
CogBlockMethod *
findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod)
{
	assert(((cogMethod->cmType)) == CMMethod);
	if (startbcpc == (startPCOfMethodHeader((cogMethod->methodHeader)))) {
		return ((CogBlockMethod *) cogMethod);
	}
	assert(((cogMethod->blockEntryOffset)) != 0);
	return ((CogBlockMethod *) (blockDispatchTargetsForperformarg(cogMethod, findBlockMethodWithEntrystartBcpc, startbcpc)));
}


/*	Machine code addresses map to the following bytecode for all bytecodes
	except backward branches, where they map to the backward branch itself.
	This is so that loops continue, rather than terminate prematurely. */

	/* Cogit>>#find:IsBackwardBranch:Mcpc:Bcpc:MatchingMcpc: */
static sqInt NoDbgRegParms
findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc)
{
	return (targetMcpc == mcpc
		? ((descriptor == null)
			 || (isBackwardBranchAndAnnotation & 1)
				? bcpc
				: bcpc + ((descriptor->numBytes)))
		: 0);
}

	/* Cogit>>#firstMappedPCFor: */
static sqInt NoDbgRegParms
firstMappedPCFor(CogMethod *cogMethod)
{
	return ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
		? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
		: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
}


/*	Answer a fake value for the first method oop in the PIC prototype.
	Since we use MoveUniqueCw:R: it must not be confused with a
	method-relative address. */

	/* Cogit>>#firstPrototypeMethodOop */
static sqInt
firstPrototypeMethodOop(void)
{
	return (((((usqInt)99282957)) >= ((methodLabel->address)))
	 && ((((usqInt)99282957)) < (youngReferrers()))
		? 212332557
		: 99282957);
}

	/* Cogit>>#fixupAt: */
static BytecodeFixup * NoDbgRegParms
fixupAt(sqInt fixupPC)
{
	return fixupAtIndex(fixupPC - initialPC);
}

	/* Cogit>>#followForwardedLiteralsIn: */
void
followForwardedLiteralsIn(CogMethod *cogMethod)
{
    sqInt annotation;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;

	assert((((cogMethod->cmType)) != CMMethod)
	 || (!(isForwarded((cogMethod->methodObject)))));
	if (shouldRemapOop((cogMethod->selector))) {
		(cogMethod->selector = remapObj((cogMethod->selector)));
		if (isYoung((cogMethod->selector))) {
			ensureInYoungReferrers(cogMethod);
		}
	}
	/* begin mapFor:performUntil:arg: */
	mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
		? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
		: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
	map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
	while (((mapByte = byteAt(map))) != MapEnd) {
		if (mapByte >= FirstAnnotation) {

			/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
			mcpc += (mapByte & DisplacementMask);
			if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
			 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
				annotation += mapByte & DisplacementMask;
				map -= 1;
			}
			result = remapIfObjectRefpchasYoung(annotation, (((char *) mcpc)), 0);
			if (result != 0) {
				goto l2;
			}
		}
		else {
			if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
				mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
			}
		}
		map -= 1;
	}
	l2:	/* end mapFor:performUntil:arg: */;
}

	/* Cogit>>#followForwardedMethods */
void
followForwardedMethods(void)
{
    CogMethod *cogMethod;
    sqInt freedPIC;

	freedPIC = 0;
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			if (isForwarded((cogMethod->methodObject))) {
				(cogMethod->methodObject = followForwarded((cogMethod->methodObject)));
				if (isYoungObject((cogMethod->methodObject))) {
					ensureInYoungReferrers(cogMethod);
				}
			}
		}
		if (((cogMethod->cmType)) == CMClosedPIC) {
			if (followMethodReferencesInClosedPIC(cogMethod)) {
				freedPIC = 1;
				freeMethod(cogMethod);
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	if (freedPIC) {
		unlinkSendsToFree();
	}
}


/*	Follow a potential object reference from a closed PIC.
	This may be a method reference or null.
	Answer if the followed literal is young.
	'mcpc' refers to the jump/branch instruction at the end of
	each cpic case */

	/* Cogit>>#followMaybeObjRefInClosedPICAt: */
static sqInt NoDbgRegParms
followMaybeObjRefInClosedPICAt(sqInt mcpc)
{
    sqInt object;
    sqInt subject;

	object = literalBeforeFollowingAddress(backEnd, mcpc);
	if (!(couldBeObject(object))) {
		return 0;
	}
	if (!(isForwarded(object))) {
		return isYoungObject(object);
	}
	subject = followForwarded(object);
	storeLiteralbeforeFollowingAddress(backEnd, subject, mcpc);
	codeModified = 1;
	return isYoungObject(subject);
}


/*	Remap all object references in the closed PIC. Answer if any references
	are young.
	Set codeModified if any modifications are made. */

	/* Cogit>>#followMethodReferencesInClosedPIC: */
static sqInt NoDbgRegParms
followMethodReferencesInClosedPIC(CogMethod *cPIC)
{
    sqInt i;
    sqInt pc;
    sqInt refersToYoung;


	/* first we check the potential method oop load at the beginning of the CPIC */
	pc = addressOfEndOfCaseinCPIC(1, cPIC);

	/* We find the end address of the cPICNumCases'th case and can then just step forward by the case size thereafter */
	refersToYoung = followMaybeObjRefInClosedPICAt(pc - 5 /* jumpLongByteSize */);

	/* Next we check the potential potential method oop load for each case. */
	pc = addressOfEndOfCaseinCPIC((cPIC->cPICNumCases), cPIC);
	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
		if (followMaybeObjRefInClosedPICAt((pc - 6 /* jumpLongConditionalByteSize */) - 5 /* cmpC32RTempByteSize */)) {
			refersToYoung = 1;
		}
		pc += cPICCaseSize;
	}
	return refersToYoung;
}


/*	Free machine-code methods whose compiled methods are unmarked
	and open PICs whose selectors are not marked, and closed PICs that
	refer to unmarked objects. */

	/* Cogit>>#freeUnmarkedMachineCode */
void
freeUnmarkedMachineCode(void)
{
    CogMethod *cogMethod;
    sqInt freedMethod;

	freedMethod = 0;
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if ((((cogMethod->cmType)) == CMMethod)
		 && (!(isMarked((cogMethod->methodObject))))) {
			freedMethod = 1;
			freeMethod(cogMethod);
		}
		if ((((cogMethod->cmType)) == CMOpenPIC)
		 && ((!(isImmediate((cogMethod->selector))))
		 && (!(isMarked((cogMethod->selector)))))) {
			freedMethod = 1;
			freeMethod(cogMethod);
		}
		if ((((cogMethod->cmType)) == CMClosedPIC)
		 && (closedPICRefersToUnmarkedObject(cogMethod))) {
			freedMethod = 1;
			freeMethod(cogMethod);
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	if (freedMethod) {
		unlinkSendsToFree();
	}
}


/*	Call ceSendMustBeBooleanTo: via the relevant trampoline. */

	/* Cogit>>#genCallMustBeBooleanFor: */
static AbstractInstruction * NoDbgRegParms
genCallMustBeBooleanFor(sqInt boolean)
{
    AbstractInstruction *abstractInstruction;
    sqInt callTarget;

	/* begin CallRT: */
	callTarget = (boolean == (falseObject())
		? ceSendMustBeBooleanAddFalseTrampoline
		: ceSendMustBeBooleanAddTrueTrampoline);
	/* begin annotateCall: */
	abstractInstruction = genoperand(Call, callTarget);
	(abstractInstruction->annotation = IsRelativeCall);
	return abstractInstruction;
}

	/* Cogit>>#genCheckForInterruptsTrampoline */
static sqInt
genCheckForInterruptsTrampoline(void)
{
    sqInt address1;
    AbstractInstruction *anInstruction1;

	zeroOpcodeIndex();
	genoperand(PopR, TempReg);
	/* begin MoveR:Aw: */
	address1 = instructionPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveRAw, TempReg, address1);
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceCheckForInterrupts, "ceCheckForInterruptsTrampoline", 0, null, null, null, null, 0 /* emptyRegisterMask */, 0, NoReg, 1);
}

	/* Cogit>>#genConditionalBranch:operand: */
static AbstractInstruction * NoDbgRegParms
genConditionalBranchoperand(sqInt opcode, sqInt operandOne)
{
    AbstractInstruction *branch;

	/* begin noteFollowingConditionalBranch: */
	branch = genoperand(opcode, operandOne);
	return branch;
}


/*	An enilopmart (the reverse of a trampoline) is a piece of code that makes
	the system-call-like transition from the C runtime into generated machine
	code. The desired arguments and entry-point are pushed on a stackPage's
	stack. The enilopmart pops off the values to be loaded into registers and
	then executes a return instruction to pop off the entry-point and jump to
	it. 
	BEFORE				AFTER			(stacks grow down)
	whatever			stackPointer ->	whatever
	target address =>	reg1 = reg1val, etc
	reg1val				pc = target address
	reg2val
	stackPointer ->	reg3val */

	/* Cogit>>#genEnilopmartFor:and:and:forCall:called: */
static void (*genEnilopmartForandandforCallcalled(sqInt regArg1, sqInt regArg2OrNone, sqInt regArg3OrNone, sqInt forCall, char *trampolineName))(void)

{
    sqInt endAddress;
    sqInt enilopmart;
    sqInt size;

	zeroOpcodeIndex();
	genLoadStackPointers(backEnd);
	if (regArg3OrNone != NoReg) {
		genoperand(PopR, regArg3OrNone);
	}
	if (regArg2OrNone != NoReg) {
		genoperand(PopR, regArg2OrNone);
	}
	genoperand(PopR, regArg1);
	genEnilopmartReturn(forCall);
	computeMaximumSizes();
	size = generateInstructionsAt(methodZoneBase);
	endAddress = outputInstructionsAt(methodZoneBase);
	assert((methodZoneBase + size) == endAddress);
	enilopmart = methodZoneBase;
	methodZoneBase = alignUptoRoutineBoundary(endAddress);
	stopsFromto(backEnd, endAddress, methodZoneBase - 1);
	recordGeneratedRunTimeaddress(trampolineName, enilopmart);
	return ((void (*)(void)) enilopmart);
}


/*	An enilopmart (the reverse of a trampoline) is a piece of code that makes
	the system-call-like transition from the C runtime into generated machine
	code. At the point the enilopmart enters machine code via a return
	instruction, any argument registers have been loaded with their values and
	the stack, if
	for call, looks like
	ret pc
	stackPointer ->	target address
	
	and if not for call, looks like
	whatever
	stackPointer ->	target address
	
	If forCall and running on a CISC, ret pc must be left on the stack. If
	forCall and
	running on a RISC, ret pc must be popped into LinkReg. In either case,
	target address must be removed from the stack and jumped/returned to. */

	/* Cogit>>#genEnilopmartReturn: */
static void NoDbgRegParms
genEnilopmartReturn(sqInt forCall)
{
	genoperand(RetN, 0);
}


/*	Generate the routine that writes the current values of the C frame and
	stack pointers into
	variables. These are used to establish the C stack in trampolines back
	into the C run-time.
	
	This is a presumptuous quick hack for x86. It is presumptuous for two
	reasons. Firstly
	the system's frame and stack pointers may differ from those we use in
	generated code,
	e.g. on register-rich RISCs. Secondly the ABI may not support a simple
	frameless call
	as written here (for example 128-bit stack alignment on Mac OS X). */

	/* Cogit>>#generateCaptureCStackPointers: */
static void NoDbgRegParms
generateCaptureCStackPointers(sqInt captureFramePointer)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    sqInt fixupSize;
    sqInt opcodeSize;
    sqInt quickConstant;
    sqInt startAddress;

	/* begin allocateOpcodes:bytecodes: */
	numAbstractOpcodes = 32;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;

	/* Must happen first; value may be used in accessing any of the following addresses */
	startAddress = methodZoneBase;
	if (captureFramePointer) {
		/* begin MoveR:Aw: */
		address = cFramePointerAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction2 = genoperandoperand(MoveRAw, FPReg, address);
	}
	genoperandoperand(MoveRR, SPReg, TempReg);
	/* begin AddCq:R: */
	/* begin leafCallStackPointerDelta */
	quickConstant = 4;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AddCqR, quickConstant, TempReg);
	/* begin MoveR:Aw: */
	address1 = cStackPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction3 = genoperandoperand(MoveRAw, TempReg, address1);
	genoperand(RetN, 0);
	outputInstructionsForGeneratedRuntimeAt(startAddress);
	flushICacheFromto(processor, ((usqInt)startAddress), ((usqInt)methodZoneBase));
	recordGeneratedRunTimeaddress("ceCaptureCStackPointers", startAddress);
	ceCaptureCStackPointers = ((void (*)(void)) startAddress);
}


/*	Generate the prototype ClosedPIC to determine how much space as full PIC
	takes. When we first allocate a closed PIC it only has one or two cases
	and we want to grow it.
	So we have to determine how big a full one is before hand. */

	/* Cogit>>#generateClosedPICPrototype */
static void
generateClosedPICPrototype(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    CogMethod *cPIC;
    AbstractInstruction * cPICEndOfCodeLabel;
    sqInt endAddress;
    AbstractInstruction * endCPICCase1;
    sqInt fixupSize;
    sqInt h;
    AbstractInstruction *jumpNext;
    sqInt jumpTarget;
    sqInt jumpTarget1;
    sqInt jumpTarget2;
    sqInt literal;
    sqInt numArgs;
    sqInt opcode;
    sqInt opcodeSize;
    sqInt wordConstant;
    sqInt wordConstant1;


	/* stack allocate the various collections so that they
	   are effectively garbage collected on return. */
	/* begin allocateOpcodes:bytecodes: */
	numAbstractOpcodes = MaxCPICCases * 9;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	(methodLabel->address = methodZoneBase);
	(methodLabel->dependent = null);
	/* begin compileClosedPICPrototype */
	compilePICAbort((numArgs = 0));

	/* At the end of the entry code we need to jump to the first case code, which is actually the last chunk.
	   On each entension we must update this jump to move back one case. */
	jumpNext = compileCPICEntry();
	/* begin MoveUniqueCw:R: */
	wordConstant1 = firstPrototypeMethodOop();
	/* begin uniqueLiteral:forInstruction: */
	anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg);
	/* begin JumpLong: */
	jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352;
	genoperand(JumpLong, jumpTarget1);
	endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	for (h = 1; h < MaxCPICCases; h += 1) {
		if (h == (MaxCPICCases - 1)) {
			jmpTarget(jumpNext, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
		}
		/* begin MoveUniqueCw:R: */
		wordConstant = (subsequentPrototypeMethodOop()) + h;
		/* begin uniqueLiteral:forInstruction: */
		anInstruction = genoperandoperand(MoveCwR, wordConstant, SendNumArgsReg);
		/* begin gen:literal:operand: */
		opcode = CmpCwR;
		/* begin checkLiteral:forInstruction: */
		anInstruction1 = genoperandoperand(opcode, 3133021973U + h, TempReg);
		/* begin JumpLongZero: */
		jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16);
		genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget));
		if (h == 1) {
			endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		}
	}
	/* begin checkLiteral:forInstruction: */
	literal = (methodLabel->address);
	anInstruction3 = genoperandoperand(MoveCwR, (methodLabel->address), ClassReg);
	/* begin JumpLong: */
	jumpTarget2 = cPICMissTrampolineFor(numArgs);
	genoperand(JumpLong, jumpTarget2);
	cPICEndOfCodeLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	computeMaximumSizes();
	cPIC = ((CogMethod *) methodZoneBase);
	closedPICSize = (sizeof(CogMethod)) + (generateInstructionsAt(methodZoneBase + (sizeof(CogMethod))));
	endAddress = outputInstructionsAt(methodZoneBase + (sizeof(CogMethod)));
	assert((methodZoneBase + closedPICSize) == endAddress);
	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
	cPICEndOfCodeOffset = ((cPICEndOfCodeLabel->address)) - methodZoneBase;
	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
	cPICEndSize = closedPICSize - (((MaxCPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
	closedPICSize = roundUpLength(closedPICSize);
	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
	assert((expectedClosedPICPrototype(cPIC)) == 0);
	storeLiteralbeforeFollowingAddress(backEnd, 0, ((endCPICCase0->address)) - 5 /* jumpLongByteSize */);
	methodZoneBase = alignUptoRoutineBoundary(endAddress);
	cPICPrototype = cPIC;
}


/*	We handle jump sizing simply. First we make a pass that asks each
	instruction to compute its maximum size. Then we make a pass that
	sizes jumps based on the maxmimum sizes. Then we make a pass
	that fixes up jumps. When fixing up a jump the jump is not allowed to
	choose a smaller offset but must stick to the size set in the second pass. */

	/* Cogit>>#generateCogFullBlock */
static CogMethod *
generateCogFullBlock(void)
{
    sqInt codeSize;
    usqIntptr_t headerSize;
    sqInt mapSize;
    CogMethod *method;
    sqInt result;
    usqInt startAddress;
    sqInt totalSize;

	headerSize = sizeof(CogMethod);
	(methodLabel->address = freeStart());
	computeMaximumSizes();
	concretizeAt(methodLabel, freeStart());
	codeSize = generateInstructionsAt(((methodLabel->address)) + headerSize);
	mapSize = generateMapAtstart(null, ((methodLabel->address)) + cbNoSwitchEntryOffset);
	totalSize = roundUpLength((headerSize + codeSize) + mapSize);
	if (totalSize > MaxMethodSize) {
		return ((CogMethod *) MethodTooBig);
	}
	startAddress = allocate(totalSize);
	if (startAddress == 0) {
		return ((CogMethod *) InsufficientCodeSpace);
	}
	assert((startAddress + cbEntryOffset) == ((fullBlockEntry->address)));
	assert((startAddress + cbNoSwitchEntryOffset) == ((fullBlockNoContextSwitchEntry->address)));
	result = outputInstructionsAt(startAddress + headerSize);
	assert(((startAddress + headerSize) + codeSize) == result);
	padIfPossibleWithStopsFromto(backEnd, result, ((startAddress + totalSize) - mapSize) - 1);
	generateMapAtstart((startAddress + totalSize) - 1, startAddress + cbNoSwitchEntryOffset);
	flag("TOCHECK");
	method = fillInMethodHeadersizeselector(((CogMethod *) startAddress), totalSize, nilObject());
	(method->cpicHasMNUCaseOrCMIsFullBlock = 1);
	if (!(postCompileHook == null)) {
		postCompileHook(method);
		postCompileHook = null;
	}
	return method;
}


/*	We handle jump sizing simply. First we make a pass that asks each
	instruction to compute its maximum size. Then we make a pass that
	sizes jumps based on the maxmimum sizes. Then we make a pass
	that fixes up jumps. When fixing up a jump the jump is not allowed to
	choose a smaller offset but must stick to the size set in the second pass. */

	/* Cogit>>#generateCogMethod: */
static CogMethod * NoDbgRegParms
generateCogMethod(sqInt selector)
{
    sqInt codeSize;
    usqIntptr_t headerSize;
    sqInt mapSize;
    CogMethod *method;
    sqInt result;
    usqInt startAddress;
    sqInt totalSize;

	headerSize = sizeof(CogMethod);
	(methodLabel->address = freeStart());
	computeMaximumSizes();
	concretizeAt(methodLabel, freeStart());
	codeSize = generateInstructionsAt(((methodLabel->address)) + headerSize);
	mapSize = generateMapAtstart(null, ((methodLabel->address)) + cmNoCheckEntryOffset);
	totalSize = roundUpLength((headerSize + codeSize) + mapSize);
	if (totalSize > MaxMethodSize) {
		return ((CogMethod *) MethodTooBig);
	}
	startAddress = allocate(totalSize);
	if (startAddress == 0) {
		return ((CogMethod *) InsufficientCodeSpace);
	}
	assert((startAddress + cmEntryOffset) == ((entry->address)));
	assert((startAddress + cmNoCheckEntryOffset) == ((noCheckEntry->address)));
	result = outputInstructionsAt(startAddress + headerSize);
	assert(((startAddress + headerSize) + codeSize) == result);
	padIfPossibleWithStopsFromto(backEnd, result, ((startAddress + totalSize) - mapSize) - 1);
	generateMapAtstart((startAddress + totalSize) - 1, startAddress + cmNoCheckEntryOffset);
	fillInBlockHeadersAt(startAddress);
	method = fillInMethodHeadersizeselector(((CogMethod *) startAddress), totalSize, selector);
	if (!(postCompileHook == null)) {
		postCompileHook(method);
		postCompileHook = null;
	}
	return method;
}


/*	Generate the method map at addressrNull (or compute it if addressOrNull is
	null). Answer the length of the map in byes. Each entry in the map is in
	two parts. In the
	least signficant bits are a displacement of how far from the start or
	previous entry,
	unless it is an IsAnnotationExtension byte, in which case those bits are
	the extension.
	In the most signficant bits are the type of annotation at the point
	reached. A null
	byte ends the map. */

	/* Cogit>>#generateMapAt:start: */
static sqInt NoDbgRegParms
generateMapAtstart(usqInt addressOrNull, usqInt startAddress)
{
    unsigned char annotation;
    sqInt delta;
    sqInt i;
    AbstractInstruction *instruction;
    sqInt length;
    usqInt location;
    sqInt mapEntry;
    sqInt maxDelta;
    usqInt mcpc;

	length = 0;
	location = startAddress;
	for (i = 0; i < opcodeIndex; i += 1) {
		instruction = abstractInstructionAt(i);
		annotation = (instruction->annotation);
		if (!(annotation == null)) {
			/* begin mapEntryAddress */
			mcpc = ((instruction->address)) + ((instruction->machineCodeSize));
			while (((delta = (mcpc - location) / 1 /* codeGranularity */)) > DisplacementMask) {
				maxDelta = (((((delta < MaxX2NDisplacement) ? delta : MaxX2NDisplacement)) | DisplacementMask) - DisplacementMask);
				assert((((usqInt) maxDelta) >> AnnotationShift) <= DisplacementMask);
				if (!(addressOrNull == null)) {
					/* begin addToMap:instruction:byte:at:for: */
					byteAtput(addressOrNull - length, (((usqInt) maxDelta) >> AnnotationShift) + DisplacementX2N);
				}
				location += maxDelta;
				length += 1;
			}
			if (!(addressOrNull == null)) {
				mapEntry = delta + (((sqInt)((usqInt)((((annotation < IsSendCall) ? annotation : IsSendCall))) << AnnotationShift)));
				/* begin addToMap:instruction:byte:at:for: */
				byteAtput(addressOrNull - length, mapEntry);
			}
			location += delta;
			length += 1;
			if (annotation > IsSendCall) {

				/* Add the necessary IsAnnotationExtension */
				if (!(addressOrNull == null)) {
					mapEntry = (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift))) + (annotation - IsSendCall);
					/* begin addToMap:instruction:byte:at:for: */
					byteAtput(addressOrNull - length, mapEntry);
				}
				length += 1;
			}
		}
	}
	if (!(addressOrNull == null)) {
		/* begin addToMap:instruction:byte:at:for: */
		byteAtput(addressOrNull - length, MapEnd);
	}
	return length + 1;
}


/*	Generate the prototype ClosedPIC to determine how much space as full PIC
	takes. When we first allocate a closed PIC it only has one or two cases
	and we want to grow it.
	So we have to determine how big a full one is before hand. */
/*	stack allocate the various collections so that they
	are effectively garbage collected on return. */

	/* Cogit>>#generateOpenPICPrototype */
static void
generateOpenPICPrototype(void)
{
    sqInt codeSize;
    sqInt fixupSize;
    sqInt mapSize;
    sqInt opcodeSize;

	/* begin allocateOpcodes:bytecodes: */
	numAbstractOpcodes = 100;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	(methodLabel->address = methodZoneBase);
	(methodLabel->dependent = null);
	compileOpenPICnumArgs(specialSelector(0), 2 /* numRegArgs */);
	computeMaximumSizes();
	concretizeAt(methodLabel, methodZoneBase);
	codeSize = generateInstructionsAt(methodZoneBase + (sizeof(CogMethod)));
	mapSize = generateMapAtstart(null, methodZoneBase + cmNoCheckEntryOffset);
	openPICSize = (roundUpLength((sizeof(CogMethod)) + codeSize)) + (roundUpLength(mapSize));
}


/*	Generate the run-time entries at the base of the native code zone and
	update the base.
 */

	/* Cogit>>#generateRunTimeTrampolines */
static void
generateRunTimeTrampolines(void)
{
	ceSendMustBeBooleanAddFalseTrampoline = genMustBeBooleanTrampolineForcalled(falseObject(), "ceSendMustBeBooleanAddFalseTrampoline");
	ceSendMustBeBooleanAddTrueTrampoline = genMustBeBooleanTrampolineForcalled(trueObject(), "ceSendMustBeBooleanAddTrueTrampoline");
	ceNonLocalReturnTrampoline = genNonLocalReturnTrampoline();

	/* Neither of the context inst var access trampolines save registers.  Their operation could cause
	   arbitrary update of stack frames, so the assumption is that callers flush the stack before calling
	   the context inst var access trampolines, and that everything except the result is dead afterwards. */
	ceCheckForInterruptTrampoline = genCheckForInterruptsTrampoline();
	ceFetchContextInstVarTrampoline = genTrampolineForcalledargargresult(ceContextinstVar, "ceFetchContextInstVarTrampoline", ReceiverResultReg, SendNumArgsReg, SendNumArgsReg);
	ceStoreContextInstVarTrampoline = genTrampolineForcalledargargargresult(ceContextinstVarvalue, "ceStoreContextInstVarTrampoline", ReceiverResultReg, SendNumArgsReg, ClassReg, ReceiverResultReg);

	/* These two are unusual; they are reached by return instructions. */
	ceCannotResumeTrampoline = genTrampolineForcalled(ceCannotResume, "ceCannotResumeTrampoline");
	ceBaseFrameReturnTrampoline = genReturnTrampolineForcalledarg(ceBaseFrameReturn, "ceBaseFrameReturnTrampoline", ReceiverResultReg);
	ceReturnToInterpreterTrampoline = genReturnTrampolineForcalledarg(ceReturnToInterpreter, "ceReturnToInterpreterTrampoline", ReceiverResultReg);
	ceMallocTrampoline = genTrampolineForcalledargresult(ceMalloc, "ceMallocTrampoline", ReceiverResultReg, TempReg);
	ceFreeTrampoline = genTrampolineForcalledarg(ceFree, "ceFreeTrampoline", ReceiverResultReg);
	}


/*	Generate a routine ceCaptureCStackPointers that will capture the C stack
	pointer, and, if it is in use, the C frame pointer. These are used in
	trampolines to call
	run-time routines in the interpreter from machine-code. */

	/* Cogit>>#generateStackPointerCapture */
static void
generateStackPointerCapture(void)
{
    sqInt oldMethodZoneBase;
    sqInt oldTrampolineTableIndex;


	/* For the benefit of the following assert, assume the minimum at first. */
	cFramePointerInUse = 0;
	assertCStackWellAligned();
	oldMethodZoneBase = methodZoneBase;
	oldTrampolineTableIndex = trampolineTableIndex;
	generateCaptureCStackPointers(1);
	ceCaptureCStackPointers();
	if (!((cFramePointerInUse = isCFramePointerInUse()))) {
		methodZoneBase = oldMethodZoneBase;
		trampolineTableIndex = oldTrampolineTableIndex;
		generateCaptureCStackPointers(0);
	}
	assertCStackWellAligned();
}


/*	Generate the run-time entries and exits at the base of the native code
	zone and update the base.
	Read the class-side method trampolines for documentation on the various
	trampolines 
 */

	/* Cogit>>#generateTrampolines */
static void
generateTrampolines(void)
{
    sqInt fixupSize;
    sqInt methodZoneStart;
    sqInt opcodeSize;

	methodZoneStart = methodZoneBase;
	(methodLabel->address = methodZoneStart);
	/* begin allocateOpcodes:bytecodes: */
	numAbstractOpcodes = 80;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	hasYoungReferent = 0;
	generateSendTrampolines();
	generateMissAbortTrampolines();
	generateObjectRepresentationTrampolines();
	generateRunTimeTrampolines();
	generateEnilopmarts();
	generateTracingTrampolines();
	recordGeneratedRunTimeaddress("methodZoneBase", methodZoneBase);
	flushICacheFromto(processor, ((usqInt)methodZoneStart), ((usqInt)methodZoneBase));
}

	/* Cogit>>#generatorForPC: */
static BytecodeDescriptor * NoDbgRegParms
generatorForPC(sqInt pc)
{
	return generatorAt(bytecodeSetOffset + (fetchByteofObject(pc, methodObj)));
}


/*	Generate a routine that answers the stack pointer immedately
	after a leaf call, used for checking stack pointer alignment. */

	/* Cogit>>#genGetLeafCallStackPointer */
static void
genGetLeafCallStackPointer(void)
{
    AbstractInstruction *anInstruction;
    sqInt fixupSize;
    sqInt opcodeSize;
    sqInt startAddress;

	/* begin allocateOpcodes:bytecodes: */
	numAbstractOpcodes = 4;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	startAddress = methodZoneBase;
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, FPReg, EAX);
	genoperand(RetN, 0);
	outputInstructionsForGeneratedRuntimeAt(startAddress);
	recordGeneratedRunTimeaddress("ceGetFP", startAddress);
	ceGetFP = ((usqIntptr_t (*)(void)) startAddress);
	startAddress = methodZoneBase;
	zeroOpcodeIndex();
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SPReg, EAX);
	/* begin AddCq:R: */
	anInstruction = genoperandoperand(AddCqR, 4 /* leafCallStackPointerDelta */, EAX);
	genoperand(RetN, 0);
	outputInstructionsForGeneratedRuntimeAt(startAddress);
	recordGeneratedRunTimeaddress("ceGetSP", startAddress);
	ceGetSP = ((usqIntptr_t (*)(void)) startAddress);
}


/*	Generate the abort for a PIC. This abort performs either a call of
	ceInterpretMethodFromPIC:receiver: to handle invoking an uncogged target
	or a call of ceMNUFromPICMNUMethod:receiver: to handle an MNU dispatch
	in a closed PIC. It distinguishes the two by testing ClassReg. If the
	register is zero then this is an MNU.
	
	This poses a problem in 32-bit Spur, where zero is the cache tag for
	immediate characters (tag pattern 2r10) because SmallIntegers have tag
	patterns 2r11
	and 2r01, so anding with 1 reduces these to 0 & 1. We solve the ambiguity
	by patching send sites with a 0 cache tag to open PICs instead of closed
	PICs.  */

	/* Cogit>>#genInnerPICAbortTrampoline: */
static sqInt NoDbgRegParms
genInnerPICAbortTrampoline(char *name)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *jumpMNUCase;

	/* begin CmpCq:R: */
	anInstruction = genoperandoperand(CmpCqR, 0 /* picAbortDiscriminatorValue */, ClassReg);
	jumpMNUCase = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(ceInterpretMethodFromPICreceiver, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0 /* emptyRegisterMask */, 0, NoReg);
	jmpTarget(jumpMNUCase, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceMNUFromPICMNUMethodreceiver, name, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0 /* emptyRegisterMask */, 0, NoReg, 1);
}

	/* Cogit>>#genLoadCStackPointersForPrimCall */
static sqInt
genLoadCStackPointersForPrimCall(void)
{
    sqInt address;
    sqInt address1;
    sqInt address2;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;

	if (debugPrimCallStackOffset == 0) {
		/* begin MoveAw:R: */
		address = cStackPointerAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction = genoperandoperand(MoveAwR, address, SPReg);
	}
	else {
		/* begin MoveAw:R: */
		address1 = cStackPointerAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction1 = genoperandoperand(MoveAwR, address1, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperand(SubCqR, debugPrimCallStackOffset, TempReg);
		genoperandoperand(MoveRR, TempReg, SPReg);
	}
	if (cFramePointerInUse) {
		/* begin MoveAw:R: */
		address2 = cFramePointerAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction3 = genoperandoperand(MoveAwR, address2, FPReg);
	}
	return 0;
}


/*	The in-line cache for a send is implemented as a constant load into
	ClassReg. We always use a 32-bit load, even in 64-bits.
	
	In the initial (unlinked) state the in-line cache is notionally loaded
	with the selector.
	But since in 64-bits an arbitrary selector oop won't fit in a 32-bit
	constant load, we
	instead load the cache with the selector's index, either into the literal
	frame of the
	current method, or into the special selector array. Negative values are
	1-relative indices into the special selector array.
	
	When a send is linked, the load of the selector, or selector index, is
	overwritten with a
	load of the receiver's class, or class tag. Hence, the 64-bit VM is
	currently constrained
	to use class indices as cache tags. If out-of-line literals are used,
	distinct caches /must
	not/ share acche locations, for if they do, send cacheing will be confused
	by the sharing.
	Hence we use the MoveUniqueC32:R: instruction that will not share literal
	locations.  */

	/* Cogit>>#genLoadInlineCacheWithSelector: */
static void NoDbgRegParms
genLoadInlineCacheWithSelector(sqInt selectorIndex)
{
    AbstractInstruction *anInstruction;
    sqInt cacheValue;
    sqInt opcode;
    sqInt selector;

	assert((selectorIndex < 0
		? (((-selectorIndex) >= 1) && ((-selectorIndex) <= (numSpecialSelectors())))
		: ((selectorIndex >= 0) && (selectorIndex <= ((literalCountOf(methodObj)) - 1)))));
	selector = (selectorIndex < 0
		? specialSelector(-1 - selectorIndex)
		: getLiteral(selectorIndex));
	assert(addressCouldBeOop(selector));
	if (isYoung(selector)) {
		hasYoungReferent = 1;
	}
	cacheValue = selector;
	/* begin gen:uniqueLiteral:operand: */
	opcode = MoveCwR;
	/* begin uniqueLiteral:forInstruction: */
	anInstruction = genoperandoperand(opcode, cacheValue, ClassReg);
}

	/* Cogit>>#genNonLocalReturnTrampoline */
static sqInt
genNonLocalReturnTrampoline(void)
{
    sqInt address1;
    AbstractInstruction *anInstruction1;

	zeroOpcodeIndex();
	genoperand(PopR, TempReg);
	/* begin MoveR:Aw: */
	address1 = instructionPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveRAw, TempReg, address1);
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNonLocalReturn, "ceNonLocalReturnTrampoline", 1, ReceiverResultReg, null, null, null, 0 /* emptyRegisterMask */, 0, NoReg, 1);
}


/*	Generate a trampoline for a routine used as a return address, that has one
	argument. Hack: a negative value indicates an abstract register, a
	non-negative value indicates a constant. */

	/* Cogit>>#genReturnTrampolineFor:called:arg: */
static sqInt NoDbgRegParms
genReturnTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 1, regOrConst0, null, null, null, 0 /* emptyRegisterMask */, 0, NoReg, 0);
}


/*	If the client requires, then on an ARM-like RISC processor, the return
	address needs to
	be pushed to the stack so that the interpreter sees the same stack layout
	as on CISC.
 */

	/* Cogit>>#genSmalltalkToCStackSwitch: */
static sqInt NoDbgRegParms
genSmalltalkToCStackSwitch(sqInt pushLinkReg)
{
	genSaveStackPointers(backEnd);
	if (cFramePointerInUse) {
		genLoadCStackPointers(backEnd);
	}
	else {
		genLoadCStackPointer(backEnd);
	}
	return 0;
}


/*	Generate a trampoline with no arguments */

	/* Cogit>>#genTrampolineFor:called: */
static sqInt NoDbgRegParms
genTrampolineForcalled(void *aRoutine, char *aString)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 0, null, null, null, null, 0 /* emptyRegisterMask */, 1, NoReg, 0);
}


/*	Generate a trampoline with one argument.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* Cogit>>#genTrampolineFor:called:arg: */
static sqInt NoDbgRegParms
genTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 1, regOrConst0, null, null, null, 0 /* emptyRegisterMask */, 1, NoReg, 0);
}


/*	Generate a trampoline with two arguments that answers a result.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* Cogit>>#genTrampolineFor:called:arg:arg:arg:result: */
static sqInt NoDbgRegParms
genTrampolineForcalledargargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt resultReg)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 3, regOrConst0, regOrConst1, regOrConst2, null, 0 /* emptyRegisterMask */, 1, resultReg, 0);
}


/*	Generate a trampoline with two arguments.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* Cogit>>#genTrampolineFor:called:arg:arg:regsToSave: */
static sqInt NoDbgRegParms
genTrampolineForcalledargargregsToSave(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regMask)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 2, regOrConst0, regOrConst1, null, null, regMask, 1, NoReg, 0);
}


/*	Generate a trampoline with two arguments that answers a result.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* Cogit>>#genTrampolineFor:called:arg:arg:result: */
static sqInt NoDbgRegParms
genTrampolineForcalledargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt resultReg)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 2, regOrConst0, regOrConst1, null, null, 0 /* emptyRegisterMask */, 1, resultReg, 0);
}


/*	Generate a trampoline with one argument.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* Cogit>>#genTrampolineFor:called:arg:regsToSave: */
static sqInt NoDbgRegParms
genTrampolineForcalledargregsToSave(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regMask)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 1, regOrConst0, null, null, null, regMask, 1, NoReg, 0);
}


/*	Generate a trampoline with one argument that answers a result.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* Cogit>>#genTrampolineFor:called:arg:result: */
static sqInt NoDbgRegParms
genTrampolineForcalledargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt resultReg)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 1, regOrConst0, null, null, null, 0 /* emptyRegisterMask */, 1, resultReg, 0);
}


/*	Generate a trampoline with up to four arguments. Generate either a call or
	a jump to aRoutineOrNil
	as requested by callJumpBar. If generating a call and resultRegOrNone is
	not NoReg pass the C result
	back in resultRegOrNone.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* Cogit>>#genTrampolineFor:called:numArgs:arg:arg:arg:arg:regsToSave:pushLinkReg:resultReg:appendOpcodes: */
static sqInt NoDbgRegParms
genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt regMask, sqInt pushLinkReg, sqInt resultRegOrNone, sqInt appendBoolean)
{
    sqInt startAddress;

	startAddress = methodZoneBase;
	if (!appendBoolean) {
		zeroOpcodeIndex();
	}
	compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(aRoutine, numArgs, regOrConst0, regOrConst1, regOrConst2, regOrConst3, regMask, pushLinkReg, resultRegOrNone);
	outputInstructionsForGeneratedRuntimeAt(startAddress);
	recordGeneratedRunTimeaddress(trampolineName, startAddress);
	recordRunTimeObjectReferences();
	return startAddress;
}


/*	Generate a trampoline with no arguments */

	/* Cogit>>#genTrampolineFor:called:regsToSave: */
static sqInt NoDbgRegParms
genTrampolineForcalledregsToSave(void *aRoutine, char *aString, sqInt regMask)
{
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 0, null, null, null, null, regMask, 1, NoReg, 0);
}


/*	<Integer> */

	/* Cogit>>#gen: */
static AbstractInstruction * NoDbgRegParms
gen(sqInt opcode)
{
    AbstractInstruction *abstractInstruction;

	assert(opcodeIndex < numAbstractOpcodes);
	abstractInstruction = abstractInstructionAt(opcodeIndex);
	opcodeIndex += 1;
	(abstractInstruction->opcode = opcode);
	return abstractInstruction;
}


/*	<Integer> */
/*	<Integer|CogAbstractInstruction> */

	/* Cogit>>#gen:operand: */
static AbstractInstruction * NoDbgRegParms
genoperand(sqInt opcode, sqInt operand)
{
    AbstractInstruction *abstractInstruction;

	assert(opcodeIndex < numAbstractOpcodes);
	abstractInstruction = abstractInstructionAt(opcodeIndex);
	opcodeIndex += 1;
	(abstractInstruction->opcode = opcode);
	((abstractInstruction->operands))[0] = operand;
	return abstractInstruction;
}


/*	<Integer> */
/*	<Integer|CogAbstractInstruction> */
/*	<Integer|CogAbstractInstruction> */

	/* Cogit>>#gen:operand:operand: */
static AbstractInstruction * NoDbgRegParms
genoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo)
{
    AbstractInstruction *abstractInstruction;

	assert(opcodeIndex < numAbstractOpcodes);
	abstractInstruction = abstractInstructionAt(opcodeIndex);
	opcodeIndex += 1;
	(abstractInstruction->opcode = opcode);
	((abstractInstruction->operands))[0] = operandOne;
	((abstractInstruction->operands))[1] = operandTwo;
	return abstractInstruction;
}


/*	<Integer> */
/*	<Integer|CogAbstractInstruction> */
/*	<Integer|CogAbstractInstruction> */
/*	<Integer|CogAbstractInstruction> */

	/* Cogit>>#gen:operand:operand:operand: */
static AbstractInstruction * NoDbgRegParms
genoperandoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo, sqInt operandThree)
{
    AbstractInstruction *abstractInstruction;

	assert(opcodeIndex < numAbstractOpcodes);
	abstractInstruction = abstractInstructionAt(opcodeIndex);
	opcodeIndex += 1;
	(abstractInstruction->opcode = opcode);
	((abstractInstruction->operands))[0] = operandOne;
	((abstractInstruction->operands))[1] = operandTwo;
	((abstractInstruction->operands))[2] = operandThree;
	return abstractInstruction;
}

	/* Cogit>>#getLiteral: */
static sqInt NoDbgRegParms
getLiteral(sqInt litIndex)
{
	if (maxLitIndex < litIndex) {
		maxLitIndex = litIndex;
	}
	return literalofMethod(litIndex, methodObj);
}

	/* Cogit>>#incrementUsageOfTargetIfLinkedSend:mcpc:ignored: */
static sqInt NoDbgRegParms
incrementUsageOfTargetIfLinkedSendmcpcignored(sqInt annotation, char *mcpc, sqInt superfluity)
{
    sqInt entryPoint;
    sqInt offset1;
    sqInt *sendTable1;
    CogMethod *targetMethod1;

	if (annotation >= IsSendCall) {
		assert(annotation != IsNSSendCall);
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint > methodZoneBase) {

			/* It's a linked send. */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint - offset1));
			if (((targetMethod1->cmUsageCount)) < (CMMaxUsageCount / 2)) {
				(targetMethod1->cmUsageCount = ((targetMethod1->cmUsageCount)) + 1);
			}
		}
	}
	return 0;
}


/*	Answer the value to put in an inline-cache that is being loaded with the
	selector. Usually this is simply the selector, but in 64-bits the cache is
	only 32-bits wide
	and so the cache is loaded with the index of the selector. */

	/* Cogit>>#indexForSelector:in:at: */
static sqInt NoDbgRegParms
indexForSelectorinat(sqInt selector, CogMethod *cogMethod, sqInt mcpc)
{
    sqInt i;
    sqInt iLimiT;
    sqInt methodOop;

	assert(((((usqInt)mcpc)) > (((usqInt)cogMethod)))
	 && (mcpc < ((((usqInt)cogMethod)) + ((cogMethod->blockSize)))));
	for (i = 0; i < NumSpecialSelectors; i += 1) {
		if (selector == (specialSelector(i))) {
			return -1 - i;
		}
	}

	/* Then search the method's literal frame... open code fetchPointer:ofObject: for speed... */
	methodOop = (cogMethod->methodObject);
	for (i = LiteralStart, iLimiT = (literalCountOfMethodHeader((cogMethod->methodHeader))); i <= iLimiT; i += 1) {
		if ((longAt(((i * BytesPerOop) + BaseHeaderSize) + methodOop)) == selector) {
			assert(selector == (literalofMethod(i - 1, methodOop)));
			return i - 1;
		}
	}
	error("could not find selector in method when unlinking send site");
	return 0;
}


/*	Answer a usage count that reflects likely long-term usage. */

	/* Cogit>>#initialClosedPICUsageCount */
static sqInt
initialClosedPICUsageCount(void)
{
	return CMMaxUsageCount / 2;
}

	/* Cogit>>#initializeBackend */
static void
initializeBackend(void)
{
	(methodLabel->machineCodeSize = 0);
	(methodLabel->opcode = Label);
	((methodLabel->operands))[0] = 0;
	((methodLabel->operands))[1] = 0;
	}

	/* Cogit>>#initializeCodeZoneFrom:upTo: */
void
initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress)
{
    sqInt fixupSize;
    sqInt fixupSize1;
    sqInt numberOfAbstractOpcodes;
    sqInt numberOfAbstractOpcodes1;
    sqInt opcodeSize;
    sqInt opcodeSize1;
    sqInt startAddress1;
    sqInt startAddress2;

	initializeBackend();
	stopsFromto(backEnd, startAddress, endAddress - 1);
	sqMakeMemoryExecutableFromTo(startAddress, endAddress);
	codeBase = (methodZoneBase = startAddress);
	minValidCallAddress = (((((codeBase < (interpretAddress())) ? codeBase : (interpretAddress()))) < (primitiveFailAddress())) ? (((codeBase < (interpretAddress())) ? codeBase : (interpretAddress()))) : (primitiveFailAddress()));
	manageFromto(methodZoneBase, endAddress);
	/* begin maybeGenerateCheckFeatures */
	/* begin allocateOpcodes:bytecodes: */
	numberOfAbstractOpcodes1 = 11 /* numCheckFeaturesOpcodes */;
	numAbstractOpcodes = numberOfAbstractOpcodes1;
	opcodeSize1 = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize1 = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize1 + fixupSize1);
	bzero(abstractOpcodes, opcodeSize1 + fixupSize1);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize1));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	startAddress2 = methodZoneBase;
	generateCheckFeatures(backEnd);
	outputInstructionsForGeneratedRuntimeAt(startAddress2);
	recordGeneratedRunTimeaddress("ceCheckFeaturesFunction", startAddress2);
	ceCheckFeaturesFunction = ((usqIntptr_t (*)(void)) startAddress2);
	/* begin maybeGenerateICacheFlush */
	/* begin generateVMOwnerLockFunctions */
	
#  if COGMTVM
	/* begin allocateOpcodes:bytecodes: */
	numberOfAbstractOpcodes = 14 /* numLowLevelLockOpcodes */;
	numAbstractOpcodes = numberOfAbstractOpcodes;
	opcodeSize = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupSize = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;
	abstractOpcodes = alloca(opcodeSize + fixupSize);
	bzero(abstractOpcodes, opcodeSize + fixupSize);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	zeroOpcodeIndex();
	startAddress1 = methodZoneBase;
	generateLowLevelTryLock(backEnd, vmOwnerLockAddress());
	outputInstructionsForGeneratedRuntimeAt(startAddress1);
	recordGeneratedRunTimeaddress("ceTryLockVMOwner", startAddress1);
	ceTryLockVMOwner = ((usqIntptr_t (*)(void)) startAddress1);
	zeroOpcodeIndex();
	initialPC = 0;
	endPC = numAbstractOpcodes - 1;
	startAddress1 = methodZoneBase;
	generateLowLevelUnlock(backEnd, vmOwnerLockAddress());
	outputInstructionsForGeneratedRuntimeAt(startAddress1);
	recordGeneratedRunTimeaddress("ceUnlockVMOwner", startAddress1);
	ceUnlockVMOwner = ((void (*)(void)) startAddress1);
#  endif /* COGMTVM */
	genGetLeafCallStackPointer();
	generateStackPointerCapture();
	generateTrampolines();
	computeEntryOffsets();
	computeFullBlockEntryOffsets();
	generateClosedPICPrototype();
	manageFromto(methodZoneBase, endAddress);
	generateOpenPICPrototype();
}


/*	Answer a usage count that reflects likely long-term usage.
	Answer 1 for non-primitives or quick primitives (inst var accessors),
	2 for methods with interpreter primitives, and 3 for compiled primitives. */

	/* Cogit>>#initialMethodUsageCount */
static sqInt
initialMethodUsageCount(void)
{
	if ((primitiveIndex == 1)
	 || (isQuickPrimitiveIndex(primitiveIndex))) {
		return 1;
	}
	if (!(primitiveGeneratorOrNil())) {
		return 2;
	}
	return 3;
}


/*	Answer a usage count that reflects likely long-term usage. */

	/* Cogit>>#initialOpenPICUsageCount */
static sqInt
initialOpenPICUsageCount(void)
{
	return CMMaxUsageCount - 1;
}


/*	Answer the value to put in an inline-cache that is being loaded with the
	selector. Usually this is simply the selector, but in 64-bits the cache is
	only 32-bits wide
	and so the cache is loaded with the index of the selector. */

	/* Cogit>>#inlineCacheValueForSelector:in:at: */
static sqInt NoDbgRegParms
inlineCacheValueForSelectorinat(sqInt selector, CogMethod *aCogMethod, sqInt mcpc)
{
	return selector;
}

	/* Cogit>>#inverseBranchFor: */
static sqInt NoDbgRegParms
inverseBranchFor(sqInt opcode)
{
	
	switch (opcode) {
	case JumpLongZero:
		return JumpLongNonZero;

	case JumpLongNonZero:
		return JumpLongZero;

	case JumpZero:
		return JumpNonZero;

	case JumpNonZero:
		return JumpZero;

	case JumpNegative:
		return JumpNonNegative;

	case JumpNonNegative:
		return JumpNegative;

	case JumpOverflow:
		return JumpNoOverflow;

	case JumpNoOverflow:
		return JumpOverflow;

	case JumpCarry:
		return JumpNoCarry;

	case JumpNoCarry:
		return JumpCarry;

	case JumpLess:
		return JumpGreaterOrEqual;

	case JumpGreaterOrEqual:
		return JumpLess;

	case JumpGreater:
		return JumpLessOrEqual;

	case JumpLessOrEqual:
		return JumpGreater;

	case JumpBelow:
		return JumpAboveOrEqual;

	case JumpAboveOrEqual:
		return JumpBelow;

	case JumpAbove:
		return JumpBelowOrEqual;

	case JumpBelowOrEqual:
		return JumpAbove;

	default:
		error("Case not found and no otherwise clause");
	}
	error("invalid opcode for inverse");
	return 0;
}


/*	See Cogit class>>initializeAnnotationConstants */

	/* Cogit>>#isPCMappedAnnotation: */
static sqInt NoDbgRegParms
isPCMappedAnnotation(sqInt annotation)
{
	return annotation >= HasBytecodePC;
}

	/* Cogit>>#isPCWithinMethodZone: */
sqInt
isPCWithinMethodZone(void *address)
{
	return (((((usqInt)address)) >= methodZoneBase) && ((((usqInt)address)) <= (freeStart())));
}


/*	Answer if the instruction preceding retpc is a call instruction. */

	/* Cogit>>#isSendReturnPC: */
sqInt
isSendReturnPC(sqInt retpc)
{
    sqInt target;

	if (!(isCallPrecedingReturnPC(backEnd, retpc))) {
		return 0;
	}
	target = callTargetFromReturnAddress(backEnd, retpc);
	return (((target >= firstSend) && (target <= lastSend)))
	 || (((target >= methodZoneBase) && (target <= (freeStart()))));
}


/*	Floating-point jumps are a little weird on some processors. Defer to
	the backEnd to allow it to generate any special code it may need to. */

	/* Cogit>>#JumpFPEqual: */
static AbstractInstruction * NoDbgRegParms
gJumpFPEqual(void *jumpTarget)
{
    AbstractInstruction *jumpToTarget;
    AbstractInstruction *jumpUnordered;

	/* begin genJumpFPEqual: */
	jumpUnordered = gen(JumpFPUnordered);
	jumpToTarget = genoperand(JumpFPEqual, ((sqInt)jumpTarget));
	jmpTarget(jumpUnordered, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return jumpToTarget;
}


/*	Floating-point jumps are a little weird on some processors. Defer to
	the backEnd to allow it to generate any special code it may need to. */

	/* Cogit>>#JumpFPGreaterOrEqual: */
static AbstractInstruction * NoDbgRegParms
gJumpFPGreaterOrEqual(void *jumpTarget)
{
	/* begin genJumpFPGreaterOrEqual: */
	return genoperand(JumpFPGreaterOrEqual, ((sqInt)jumpTarget));
}


/*	Floating-point jumps are a little weird on some processors. Defer to
	the backEnd to allow it to generate any special code it may need to. */

	/* Cogit>>#JumpFPGreater: */
static AbstractInstruction * NoDbgRegParms
gJumpFPGreater(void *jumpTarget)
{
	/* begin genJumpFPGreater: */
	return genoperand(JumpFPGreater, ((sqInt)jumpTarget));
}


/*	Floating-point jumps are a little weird on some processors. Defer to
	the backEnd to allow it to generate any special code it may need to. */

	/* Cogit>>#JumpFPNotEqual: */
static AbstractInstruction * NoDbgRegParms
gJumpFPNotEqual(void *jumpTarget)
{
    AbstractInstruction *jumpToTarget;
    AbstractInstruction *jumpUnordered;

	/* begin genJumpFPNotEqual: */
	jumpToTarget = genoperand(JumpFPNotEqual, ((sqInt)jumpTarget));
	jumpUnordered = genoperand(JumpFPUnordered, ((sqInt)jumpTarget));
	addDependent(jumpToTarget, jumpUnordered);
	return jumpToTarget;
}

	/* Cogit>>#LogicalShiftLeftCq:R: */
static AbstractInstruction * NoDbgRegParms
gLogicalShiftLeftCqR(sqInt quickConstant, sqInt reg)
{
	return genoperandoperand(LogicalShiftLeftCqR, quickConstant, reg);
}

	/* Cogit>>#lastOpcode */
static AbstractInstruction *
lastOpcode(void)
{
	assert(opcodeIndex > 0);
	return abstractInstructionAt(opcodeIndex - 1);
}

	/* Cogit>>#linkSendAt:in:to:offset:receiver: */
void
linkSendAtintooffsetreceiver(sqInt callSiteReturnAddress, CogMethod *sendingMethod, CogMethod *targetMethod, sqInt theEntryOffset, sqInt receiver)
{
    sqInt address;
    sqInt extent;
    sqInt inlineCacheTag;

	assert((theEntryOffset == cmEntryOffset)
	 || (theEntryOffset == cmNoCheckEntryOffset));
	assert(((callSiteReturnAddress >= methodZoneBase) && (callSiteReturnAddress <= (freeStart()))));
	inlineCacheTag = (theEntryOffset == cmNoCheckEntryOffset
		? (targetMethod->selector)
		: inlineCacheTagForInstance(receiver));
	address = (((sqInt)targetMethod)) + theEntryOffset;
	extent = rewriteInlineCacheAttagtarget(backEnd, callSiteReturnAddress, inlineCacheTag, address);
	flushICacheFromto(processor, (((usqInt)callSiteReturnAddress)) - extent, ((usqInt)callSiteReturnAddress));
}

	/* Cogit>>#loadBytesAndGetDescriptor */
static BytecodeDescriptor *
loadBytesAndGetDescriptor(void)
{
    BytecodeDescriptor *descriptor;

	byte0 = (fetchByteofObject(bytecodePC, methodObj)) + bytecodeSetOffset;
	descriptor = generatorAt(byte0);
	loadSubsequentBytesForDescriptorat(descriptor, bytecodePC);
	return descriptor;
}

	/* Cogit>>#loadSubsequentBytesForDescriptor:at: */
static void NoDbgRegParms
loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc)
{
	if (((descriptor->numBytes)) > 1) {
		byte1 = fetchByteofObject(pc + 1, methodObj);
		if (((descriptor->numBytes)) > 2) {
			byte2 = fetchByteofObject(pc + 2, methodObj);
			if (((descriptor->numBytes)) > 3) {
				byte3 = fetchByteofObject(pc + 3, methodObj);
				if (((descriptor->numBytes)) > 4) {
					notYetImplemented();
				}
			}
		}
	}
}

	/* Cogit>>#MoveAw:R: */
static AbstractInstruction * NoDbgRegParms
gMoveAwR(sqInt address, sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, reg);
	return anInstruction;
}

	/* Cogit>>#MoveCw:R: */
static AbstractInstruction * NoDbgRegParms
gMoveCwR(sqInt wordConstant, sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveCwR, wordConstant, reg);
	return anInstruction;
}


/*	Answer the address of the null byte at the end of the method map. */

	/* Cogit>>#mapEndFor: */
static usqInt NoDbgRegParms
mapEndFor(CogMethod *cogMethod)
{
    usqInt end;

	end = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
	while ((byteAt(end)) != MapEnd) {
		end -= 1;
		assert(end > (firstMappedPCFor(cogMethod)));
	}
	return end;
}


/*	Unlinking/GC/Disassembly support */

	/* Cogit>>#mapFor:performUntil:arg: */
static sqInt NoDbgRegParms
mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg)
{
    sqInt annotation;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;

	/* begin firstMappedPCFor: */
	mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
		? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
		: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
	map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
	while (((mapByte = byteAt(map))) != MapEnd) {
		if (mapByte >= FirstAnnotation) {

			/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
			mcpc += (mapByte & DisplacementMask);
			if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
			 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
				annotation += mapByte & DisplacementMask;
				map -= 1;
			}
			result = functionSymbol(annotation, (((char *) mcpc)), arg);
			if (result != 0) {
				return result;
			}
		}
		else {
			if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
				mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
			}
		}
		map -= 1;
	}
	return 0;
}


/*	Remap all object references in the closed PIC. Answer if any references
	are young.
	Set codeModified if any modifications are made. */

	/* Cogit>>#mapObjectReferencesInClosedPIC: */
static sqInt NoDbgRegParms
mapObjectReferencesInClosedPIC(CogMethod *cPIC)
{
    sqInt i;
    sqInt pc;
    sqInt refersToYoung;


	/* first we check the potential method oop load at the beginning of the CPIC */
	pc = addressOfEndOfCaseinCPIC(1, cPIC);

	/* We find the end address of the cPICNumCases'th case and can then just step forward by the case size thereafter */
	refersToYoung = remapMaybeObjRefInClosedPICAt(pc - 5 /* jumpLongByteSize */);

	/* Next we check the potential class ref in the compare instruction, and the potential method oop load for each case. */
	pc = addressOfEndOfCaseinCPIC((cPIC->cPICNumCases), cPIC);
	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
		if (remapMaybeObjRefInClosedPICAt((pc - 6 /* jumpLongConditionalByteSize */) - 5 /* cmpC32RTempByteSize */)) {
			refersToYoung = 1;
		}
		pc += cPICCaseSize;
	}
	return refersToYoung;
}


/*	Update all references to objects in the generated runtime. */

	/* Cogit>>#mapObjectReferencesInGeneratedRuntime */
static void
mapObjectReferencesInGeneratedRuntime(void)
{
    sqInt i;
    sqInt literal;
    sqInt mappedLiteral;
    usqInt mcpc;

	for (i = 0; i < runtimeObjectRefIndex; i += 1) {
		mcpc = objectReferencesInRuntime[i];
		literal = literalBeforeFollowingAddress(backEnd, mcpc);
		mappedLiteral = remapObject(literal);
		if (mappedLiteral != literal) {
			storeLiteralbeforeFollowingAddress(backEnd, mappedLiteral, mcpc);
			codeModified = 1;
		}
	}
}


/*	Update all references to objects in machine code for a become.
	Unlike incrementalGC or fullGC a method that does not refer to young may
	refer to young as a result of the become operation. Unlike incrementalGC
	or fullGC the reference from a Cog method to its methodObject *must not*
	change since the two are two halves of the same object. */

	/* Cogit>>#mapObjectReferencesInMachineCodeForBecome */
static void
mapObjectReferencesInMachineCodeForBecome(void)
{
    sqInt annotation;
    CogMethod *cogMethod;
    sqInt freedPIC;
    sqInt hasYoungObj;
    sqInt hasYoungObjPtr;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt remappedMethod;
    sqInt result;
    sqInt val;

	val = 0;
	hasYoungObj = 0;
	hasYoungObjPtr = ((sqInt)((&hasYoungObj)));
	codeModified = (freedPIC = 0);
	mapObjectReferencesInGeneratedRuntime();
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		assert(!hasYoungObj);
		if (((cogMethod->cmType)) != CMFree) {
			assert((cogMethodDoesntLookKosher(cogMethod)) == 0);
			(cogMethod->selector = remapOop((cogMethod->selector)));
			if (((cogMethod->cmType)) == CMClosedPIC) {
				if ((isYoung((cogMethod->selector)))
				 || (mapObjectReferencesInClosedPIC(cogMethod))) {
					freedPIC = 1;
					freeMethod(cogMethod);
				}
			}
			else {
				if (isYoung((cogMethod->selector))) {
					hasYoungObj = 1;
				}
				if (((cogMethod->cmType)) == CMMethod) {
					assert(((cogMethod->objectHeader)) == (nullHeaderForMachineCodeMethod()));
					remappedMethod = remapOop((cogMethod->methodObject));
					if (remappedMethod != ((cogMethod->methodObject))) {
						if (methodHasCogMethod(remappedMethod)) {
							error("attempt to become two cogged methods");
						}
						if (!(withoutForwardingOnandwithsendToCogit((cogMethod->methodObject), remappedMethod, (cogMethod->cmUsesPenultimateLit), methodhasSameCodeAscheckPenultimate))) {
							error("attempt to become cogged method into different method");
						}
						if ((rawHeaderOf((cogMethod->methodObject))) == (((sqInt)cogMethod))) {
							rawHeaderOfput((cogMethod->methodObject), (cogMethod->methodHeader));
							(cogMethod->methodHeader = rawHeaderOf(remappedMethod));
							(cogMethod->methodObject = remappedMethod);
							rawHeaderOfput(remappedMethod, ((sqInt)cogMethod));
						}
						else {
							assert((noAssertMethodClassAssociationOf((cogMethod->methodObject))) == (nilObject()));
							(cogMethod->methodHeader = rawHeaderOf(remappedMethod));
							(cogMethod->methodObject = remappedMethod);
						}
					}
					if (isYoung((cogMethod->methodObject))) {
						hasYoungObj = 1;
					}
				}
				/* begin mapFor:performUntil:arg: */
				mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
					? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
					: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
				map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
				while (((mapByte = byteAt(map))) != MapEnd) {
					if (mapByte >= FirstAnnotation) {

						/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
						mcpc += (mapByte & DisplacementMask);
						if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
						 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
							annotation += mapByte & DisplacementMask;
							map -= 1;
						}
						result = remapIfObjectRefpchasYoung(annotation, (((char *) mcpc)), hasYoungObjPtr);
						if (result != 0) {
							goto l2;
						}
					}
					else {
						if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
							mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
						}
					}
					map -= 1;
				}
	l2:	/* end mapFor:performUntil:arg: */;
				if (hasYoungObj) {
					ensureInYoungReferrers(cogMethod);
					hasYoungObj = 0;
				}
				else {
					(cogMethod->cmRefersToYoung = 0);
				}
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	pruneYoungReferrers();
	if (freedPIC) {
		unlinkSendsToFree();
	}
	if (codeModified) {

		/* After updating oops in inline caches we need to flush the icache. */
		flushICacheFromto(processor, ((usqInt)codeBase), ((usqInt)(limitZony())));
	}
}


/*	Update all references to objects in machine code for a full gc. Since
	the current (New)ObjectMemory GC makes everything old in a full GC
	a method not referring to young will not refer to young afterwards */

	/* Cogit>>#mapObjectReferencesInMachineCodeForFullGC */
static void
mapObjectReferencesInMachineCodeForFullGC(void)
{
    sqInt annotation;
    CogMethod *cogMethod;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;

	codeModified = 0;
	mapObjectReferencesInGeneratedRuntime();
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) != CMFree) {
			assert((cogMethodDoesntLookKosher(cogMethod)) == 0);
			(cogMethod->selector = remapOop((cogMethod->selector)));
			if (((cogMethod->cmType)) == CMClosedPIC) {
				assert(!((cogMethod->cmRefersToYoung)));
				mapObjectReferencesInClosedPIC(cogMethod);
			}
			else {
				if (((cogMethod->cmType)) == CMMethod) {
					assert(((cogMethod->objectHeader)) == (nullHeaderForMachineCodeMethod()));
					(cogMethod->methodObject = remapOop((cogMethod->methodObject)));
				}
				/* begin mapFor:performUntil:arg: */
				mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
					? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
					: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
				map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
				while (((mapByte = byteAt(map))) != MapEnd) {
					if (mapByte >= FirstAnnotation) {

						/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
						mcpc += (mapByte & DisplacementMask);
						if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
						 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
							annotation += mapByte & DisplacementMask;
							map -= 1;
						}
						result = remapIfObjectRefpchasYoung(annotation, (((char *) mcpc)), 0);
						if (result != 0) {
							goto l2;
						}
					}
					else {
						if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
							mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
						}
					}
					map -= 1;
				}
	l2:	/* end mapFor:performUntil:arg: */;
							}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	pruneYoungReferrers();
	if (codeModified) {

		/* After updating oops in inline caches we need to flush the icache. */
		flushICacheFromto(processor, ((usqInt)codeBase), ((usqInt)(limitZony())));
	}
}


/*	Update all references to objects in machine code for either a Spur
	scavenging gc
	or a Squeak V3 incremental GC. Avoid scanning all code by using the
	youngReferrers list. In a young gc a method referring to young may no
	longer refer to young, but a
	method not referring to young cannot and will not refer to young
	afterwards.  */

	/* Cogit>>#mapObjectReferencesInMachineCodeForYoungGC */
static void
mapObjectReferencesInMachineCodeForYoungGC(void)
{
    sqInt annotation;
    CogMethod *cogMethod;
    sqInt hasYoungObj;
    sqInt hasYoungObjPtr;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    usqInt pointer;
    sqInt result;
    sqInt val;

	val = 0;
	hasYoungObj = 0;
	hasYoungObjPtr = ((sqInt)((&hasYoungObj)));
	codeModified = 0;
	pointer = youngReferrers();
	while (pointer < limitAddress) {
		assert(!hasYoungObj);
		cogMethod = ((CogMethod *) (longAt(pointer)));
		if (((cogMethod->cmType)) == CMFree) {
			assert(!((cogMethod->cmRefersToYoung)));
		}
		else {
			assert((cogMethodDoesntLookKosher(cogMethod)) == 0);
			if ((cogMethod->cmRefersToYoung)) {
				assert((((cogMethod->cmType)) == CMMethod)
				 || (((cogMethod->cmType)) == CMOpenPIC));
				(cogMethod->selector = remapOop((cogMethod->selector)));
				if (isYoung((cogMethod->selector))) {
					hasYoungObj = 1;
				}
				if (((cogMethod->cmType)) == CMMethod) {
					assert(((cogMethod->objectHeader)) == (nullHeaderForMachineCodeMethod()));
					(cogMethod->methodObject = remapOop((cogMethod->methodObject)));
					if (isYoung((cogMethod->methodObject))) {
						hasYoungObj = 1;
					}
				}
				/* begin mapFor:performUntil:arg: */
				mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
					? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
					: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
				map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
				while (((mapByte = byteAt(map))) != MapEnd) {
					if (mapByte >= FirstAnnotation) {

						/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
						mcpc += (mapByte & DisplacementMask);
						if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
						 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
							annotation += mapByte & DisplacementMask;
							map -= 1;
						}
						result = remapIfObjectRefpchasYoung(annotation, (((char *) mcpc)), hasYoungObjPtr);
						if (result != 0) {
							goto l2;
						}
					}
					else {
						if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
							mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
						}
					}
					map -= 1;
				}
	l2:	/* end mapFor:performUntil:arg: */;
				if (hasYoungObj) {
					hasYoungObj = 0;
				}
				else {
					(cogMethod->cmRefersToYoung = 0);
				}
			}
		}
		pointer += BytesPerWord;
	}
	pruneYoungReferrers();
	if (codeModified) {

		/* After updating oops in inline caches we need to flush the icache. */
		flushICacheFromto(processor, ((usqInt)methodZoneBase), ((usqInt)(limitZony())));
	}
}


/*	Update all references to objects in machine code. */

	/* Cogit>>#mapObjectReferencesInMachineCode: */
void
mapObjectReferencesInMachineCode(sqInt gcMode)
{
	
	switch (gcMode) {
	case GCModeNewSpace:
		mapObjectReferencesInMachineCodeForYoungGC();
		break;
	case GCModeFull:
		mapObjectReferencesInMachineCodeForFullGC();
		break;
	case GCModeBecome:
		mapObjectReferencesInMachineCodeForBecome();
		break;
	default:
		error("Case not found and no otherwise clause");
	}
	if (!(asserta((freeStart()) <= (youngReferrers())))) {
		error("youngReferrers list overflowed");
	}
}


/*	Mark objects in machine-code of marked methods (or open PICs with marked
	selectors). 
 */

	/* Cogit>>#markAndTraceMachineCodeOfMarkedMethods */
void
markAndTraceMachineCodeOfMarkedMethods(void)
{
    sqInt annotation;
    sqInt annotation1;
    CogMethod *cogMethod;
    usqInt map;
    usqInt map1;
    sqInt mapByte;
    sqInt mapByte1;
    sqInt mcpc;
    sqInt mcpc1;
    sqInt result;
    sqInt result1;
    sqInt val;
    sqInt val1;

	val = 0;
	val1 = 0;
	if (leakCheckFullGC()) {
		asserta(allMachineCodeObjectReferencesValid());
	}
	codeModified = 0;
	markAndTraceObjectReferencesInGeneratedRuntime();
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if ((((cogMethod->cmType)) == CMMethod)
		 && (isMarked((cogMethod->methodObject)))) {
			/* begin markAndTraceLiteralsIn: */
			assert(((((cogMethod->cmType)) == CMMethod)
			 && (isMarked((cogMethod->methodObject))))
			 || ((((cogMethod->cmType)) == CMOpenPIC)
			 && ((isImmediate((cogMethod->selector)))
			 || (isMarked((cogMethod->selector))))));
			markAndTraceLiteralinat((cogMethod->selector), cogMethod, (&((cogMethod->selector))));
			maybeMarkCountersIn(cogMethod);
			/* begin maybeMarkIRCsIn: */
			/* begin mapFor:performUntil:arg: */
			mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
				? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
				: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
			while (((mapByte = byteAt(map))) != MapEnd) {
				if (mapByte >= FirstAnnotation) {

					/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
					mcpc += (mapByte & DisplacementMask);
					if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
					 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
						annotation += mapByte & DisplacementMask;
						map -= 1;
					}
					result = markLiteralspcmethod(annotation, (((char *) mcpc)), (((sqInt)cogMethod)));
					if (result != 0) {
						goto l2;
					}
				}
				else {
					if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
						mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
					}
				}
				map -= 1;
			}
	l2:	/* end mapFor:performUntil:arg: */;
		}
		if ((((cogMethod->cmType)) == CMOpenPIC)
		 && ((isImmediate((cogMethod->selector)))
		 || (isMarked((cogMethod->selector))))) {
			/* begin markAndTraceLiteralsIn: */
			assert(((((cogMethod->cmType)) == CMMethod)
			 && (isMarked((cogMethod->methodObject))))
			 || ((((cogMethod->cmType)) == CMOpenPIC)
			 && ((isImmediate((cogMethod->selector)))
			 || (isMarked((cogMethod->selector))))));
			markAndTraceLiteralinat((cogMethod->selector), cogMethod, (&((cogMethod->selector))));
			maybeMarkCountersIn(cogMethod);
			/* begin maybeMarkIRCsIn: */
			/* begin mapFor:performUntil:arg: */
			mcpc1 = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
				? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
				: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
			map1 = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
			while (((mapByte1 = byteAt(map1))) != MapEnd) {
				if (mapByte1 >= FirstAnnotation) {

					/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
					mcpc1 += (mapByte1 & DisplacementMask);
					if ((((annotation1 = ((usqInt) mapByte1) >> AnnotationShift)) == IsSendCall)
					 && ((((usqInt) ((mapByte1 = byteAt(map1 - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
						annotation1 += mapByte1 & DisplacementMask;
						map1 -= 1;
					}
					result1 = markLiteralspcmethod(annotation1, (((char *) mcpc1)), (((sqInt)cogMethod)));
					if (result1 != 0) {
						goto l4;
					}
				}
				else {
					if (mapByte1 < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
						mcpc1 += (((sqInt)((usqInt)((mapByte1 - DisplacementX2N)) << AnnotationShift)));
					}
				}
				map1 -= 1;
			}
	l4:	/* end mapFor:performUntil:arg: */;
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	if (leakCheckFullGC()) {
		asserta(allMachineCodeObjectReferencesValid());
	}
	if (codeModified) {

		/* After updating oops in inline caches we need to flush the icache. */
		flushICacheFromto(processor, ((usqInt)methodZoneBase), ((usqInt)(limitZony())));
	}
}


/*	Mark and trace any object references in the generated run-time. */

	/* Cogit>>#markAndTraceObjectReferencesInGeneratedRuntime */
static void
markAndTraceObjectReferencesInGeneratedRuntime(void)
{
    sqInt i;
    sqInt literal;
    usqInt mcpc;

	for (i = 0; i < runtimeObjectRefIndex; i += 1) {
		mcpc = objectReferencesInRuntime[i];
		literal = literalBeforeFollowingAddress(backEnd, mcpc);
		markAndTraceLiteralinatpc(literal, ((CogMethod *) null), ((usqInt)mcpc));
	}
}


/*	Mark and trace objects in the argument and free if it is appropriate.
	Answer if the method has been freed. firstVisit is a hint used to avoid
	scanning methods we've already seen. False positives are fine.
	For a CMMethod this
	frees if the bytecode method isnt marked,
	marks and traces object literals and selectors,
	unlinks sends to targets that should be freed.
	For a CMClosedPIC this
	frees if it refers to anything that should be freed or isn't marked.
	For a CMOpenPIC this
	frees if the selector isn't marked. */
/*	this recurses at most one level down */

	/* Cogit>>#markAndTraceOrFreeCogMethod:firstVisit: */
static sqInt NoDbgRegParms
markAndTraceOrFreeCogMethodfirstVisit(CogMethod *cogMethod, sqInt firstVisit)
{
    sqInt annotation;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;
    sqInt val;

	val = 0;
	if (((cogMethod->cmType)) == CMFree) {
		return 1;
	}
	assert((cogMethodDoesntLookKosher(cogMethod)) == 0);
	if (((cogMethod->cmType)) == CMMethod) {
		if (!(isMarked((cogMethod->methodObject)))) {
			freeMethod(cogMethod);
			return 1;
		}
		if (firstVisit) {
			/* begin markLiteralsAndUnlinkUnmarkedSendsIn: */
			assert(((cogMethod->cmType)) == CMMethod);
			assert(isMarked((cogMethod->methodObject)));
			markAndTraceLiteralinat((cogMethod->selector), cogMethod, (&((cogMethod->selector))));
			maybeMarkCountersIn(cogMethod);
			/* begin maybeMarkIRCsIn: */
			/* begin mapFor:performUntil:arg: */
			mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
				? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
				: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
			while (((mapByte = byteAt(map))) != MapEnd) {
				if (mapByte >= FirstAnnotation) {

					/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
					mcpc += (mapByte & DisplacementMask);
					if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
					 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
						annotation += mapByte & DisplacementMask;
						map -= 1;
					}
					result = markLiteralsAndUnlinkIfUnmarkedSendpcmethod(annotation, (((char *) mcpc)), (((sqInt)cogMethod)));
					if (result != 0) {
						goto l2;
					}
				}
				else {
					if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
						mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
					}
				}
				map -= 1;
			}
	l2:	/* end mapFor:performUntil:arg: */;
		}
		return 0;
	}
	if (((cogMethod->cmType)) == CMClosedPIC) {
		if (!(closedPICRefersToUnmarkedObject(cogMethod))) {
			return 0;
		}
		freeMethod(cogMethod);
		return 1;
	}
	if (((cogMethod->cmType)) == CMOpenPIC) {
		if (isMarked((cogMethod->selector))) {
			return 0;
		}
		freeMethod(cogMethod);
		return 1;
	}
	assert((((cogMethod->cmType)) == CMMethod)
	 || ((((cogMethod->cmType)) == CMClosedPIC)
	 || (((cogMethod->cmType)) == CMOpenPIC)));
	return 0;
}


/*	If entryPoint is that of some method, then mark and trace objects in it
	and free if it is appropriate.
	Answer if the method has been freed. */

	/* Cogit>>#markAndTraceOrFreePICTarget:in: */
static sqInt NoDbgRegParms
markAndTraceOrFreePICTargetin(sqInt entryPoint, CogMethod *cPIC)
{
    CogMethod *targetMethod;

	assert((entryPoint > methodZoneBase)
	 && (entryPoint < (freeStart())));
	if (((((usqInt)cPIC)) <= (((usqInt)entryPoint)))
	 && (((((usqInt)cPIC)) + ((cPIC->blockSize))) >= (((usqInt)entryPoint)))) {
		return 0;
	}
	targetMethod = ((CogMethod *) (entryPoint - cmNoCheckEntryOffset));
	assert((((targetMethod->cmType)) == CMMethod)
	 || (((targetMethod->cmType)) == CMFree));
	return markAndTraceOrFreeCogMethodfirstVisit(targetMethod, (((usqInt)targetMethod)) > (((usqInt)cPIC)));
}


/*	Mark and trace literals. Unlink sends that have unmarked cache tags or
	targets. 
 */

	/* Cogit>>#markLiteralsAndUnlinkIfUnmarkedSend:pc:method: */
static sqInt NoDbgRegParms
markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod)
{
    sqInt cacheTag1;
    sqInt cacheTagMarked;
    sqInt entryPoint1;
    sqInt literal;
    sqInt offset1;
    sqInt *sendTable1;
    sqInt tagCouldBeObj1;
    CogMethod *targetMethod1;
    sqInt unlinkedRoutine;
    sqInt val;

	literal = 0;
	val = 0;
	if (annotation == IsObjectReference) {
		literal = literalBeforeFollowingAddress(backEnd, ((usqInt)mcpc));
		if (markAndTraceLiteralinatpc(literal, ((CogMethod *) cogMethod), ((usqInt)mcpc))) {
			codeModified = 1;
		}
	}
	if (annotation >= IsSendCall) {
		/* begin entryCacheTagAndCouldBeObjectAt:annotation:into: */
		cacheTag1 = inlineCacheTagAt(backEnd, ((sqInt)mcpc));

		/* in-line cache tags are the selectors of sends if sends are unlinked,
		   the selectors of super sends (entry offset = cmNoCheckEntryOffset),
		   the selectors of open PIC sends (entry offset = cmEntryOffset, target is an Open PIC)
		   or in-line cache tags (classes, class indices, immediate bit patterns, etc).
		   Note that selectors can be immediate so there is no guarantee that they
		   are markable/remappable objects. */
		entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		tagCouldBeObj1 = entryPointTagIsSelector(entryPoint1);
		cacheTagMarked = tagCouldBeObj1
		 && (cacheTagIsMarked(cacheTag1));
		if (entryPoint1 > methodZoneBase) {

			/* It's a linked send. */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint1 - offset1));
			if ((!cacheTagMarked)
			 || (markAndTraceOrFreeCogMethodfirstVisit(targetMethod1, (((usqInt)targetMethod1)) > (((usqInt)mcpc))))) {

				/* Either the cacheTag is unmarked (e.g. new class) or the target
				   has been freed (because it is unmarked), so unlink the send. */
				/* begin unlinkSendAt:targetMethod:sendTable: */
				unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
				rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), (targetMethod1->selector), unlinkedRoutine);
				codeModified = 1;
				markAndTraceLiteralinat((targetMethod1->selector), targetMethod1, (&((targetMethod1->selector))));
			}
		}
		else {

			/* cacheTag is selector */
			if (markAndTraceCacheTagLiteralinatpc(cacheTag1, ((CogMethod *) cogMethod), ((usqInt)mcpc))) {
				codeModified = 1;
			}
		}
	}
	return 0;
}


/*	Mark and trace literals.
	Additionally in Newspeak, void push implicits that have unmarked classes. */

	/* Cogit>>#markLiterals:pc:method: */
static sqInt NoDbgRegParms
markLiteralspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod)
{
    sqInt cacheTag1;
    sqInt entryPoint1;
    sqInt literal;
    sqInt tagCouldBeObj1;

	literal = 0;
	if (annotation == IsObjectReference) {
		literal = literalBeforeFollowingAddress(backEnd, ((usqInt)mcpc));
		if (markAndTraceLiteralinatpc(literal, ((CogMethod *) cogMethod), ((usqInt)mcpc))) {
			codeModified = 1;
		}
	}
	if (annotation >= IsSendCall) {
		/* begin entryCacheTagAndCouldBeObjectAt:annotation:into: */
		cacheTag1 = inlineCacheTagAt(backEnd, ((sqInt)mcpc));

		/* in-line cache tags are the selectors of sends if sends are unlinked,
		   the selectors of super sends (entry offset = cmNoCheckEntryOffset),
		   the selectors of open PIC sends (entry offset = cmEntryOffset, target is an Open PIC)
		   or in-line cache tags (classes, class indices, immediate bit patterns, etc).
		   Note that selectors can be immediate so there is no guarantee that they
		   are markable/remappable objects. */
		entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		tagCouldBeObj1 = entryPointTagIsSelector(entryPoint1);
		if (tagCouldBeObj1) {
			if (markAndTraceCacheTagLiteralinatpc(cacheTag1, ((CogMethod *) cogMethod), ((usqInt)mcpc))) {

				/* cacheTag is selector */
				codeModified = 1;
			}
		}
	}
	return 0;
}

	/* Cogit>>#markMethodAndReferents: */
void
markMethodAndReferents(CogBlockMethod *aCogMethod)
{
    sqInt annotation;
    CogMethod *cogMethod;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;

	assert((((aCogMethod->cmType)) == CMMethod)
	 || (((aCogMethod->cmType)) == CMBlock));
	cogMethod = (((aCogMethod->cmType)) == CMMethod
		? ((CogMethod *) aCogMethod)
		: cmHomeMethod(aCogMethod));
	(cogMethod->cmUsageCount = CMMaxUsageCount);
	/* begin mapFor:performUntil:arg: */
	mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
		? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
		: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
	map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
	while (((mapByte = byteAt(map))) != MapEnd) {
		if (mapByte >= FirstAnnotation) {

			/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
			mcpc += (mapByte & DisplacementMask);
			if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
			 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
				annotation += mapByte & DisplacementMask;
				map -= 1;
			}
			result = incrementUsageOfTargetIfLinkedSendmcpcignored(annotation, (((char *) mcpc)), 0);
			if (result != 0) {
				goto l2;
			}
		}
		else {
			if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
				mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
			}
		}
		map -= 1;
	}
	l2:	/* end mapFor:performUntil:arg: */;
}

	/* Cogit>>#maxCogMethodAddress */
usqInt
maxCogMethodAddress(void)
{
	return ((usqInt)(limitZony()));
}


/*	If this is the Newspeak VM and the objectRepresentation supports pinning
	then allocate space for the implicit receiver caches on the heap. */

	/* Cogit>>#maybeAllocAndInitIRCs */
static sqInt
maybeAllocAndInitIRCs(void)
{
	return 1;
}


/*	Check that the header fields are consistent with the type.
	Answer 0 if it is ok, otherwise answer a code for the error. */

	/* Cogit>>#maybeFreeCogMethodDoesntLookKosher: */
static sqInt NoDbgRegParms
maybeFreeCogMethodDoesntLookKosher(CogMethod *cogMethod)
{
    sqInt result;

	result = cogMethodDoesntLookKosher(cogMethod);
	return (result == 2
		? 0
		: result);
}


/*	In SIsta Spur counters are held on the heap in pinned objects which must
	be marked
	to avoid them being garbage collected. This is the hook through which that
	happens. 
 */

	/* Cogit>>#maybeMarkCountersIn: */
static void NoDbgRegParms
maybeMarkCountersIn(CogMethod *cogMethod)
{
}

	/* Cogit>>#mclassIsSmallInteger */
static sqInt
mclassIsSmallInteger(void)
{
	return (receiverTags & 1);
}


/*	Answer the absolute machine code pc matching the zero-relative
	bytecode pc of a backward branch in cogMethod, given the start
	of the bytecodes for cogMethod's block or method object. */

	/* Cogit>>#mcPCForBackwardBranch:startBcpc:in: */
usqInt
mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *cogMethod)
{
    sqInt aMethodHeader;
    sqInt aMethodHeader1;
    sqInt aMethodObj;
    sqInt annotation;
    sqInt bcpc1;
    sqInt bsOffset;
    sqInt byte;
    BytecodeDescriptor *descriptor;
    sqInt distance;
    sqInt endbcpc;
    CogMethod *homeMethod;
    sqInt isBackwardBranch;
    sqInt isInBlock;
    sqInt latestContinuation;
    usqInt map;
    sqInt mapByte;
    usqInt mcpc;
    sqInt nExts;
    sqInt nextBcpc;
    sqInt result;
    sqInt targetPC;

	latestContinuation = 0;
	/* begin mapFor:bcpc:performUntil:arg: */
	assert(((cogMethod->stackCheckOffset)) > 0);

	/* The stack check maps to the start of the first bytecode,
	   the first bytecode being effectively after frame build. */
	mcpc = (((usqInt)cogMethod)) + ((cogMethod->stackCheckOffset));
	result = (((0 + (((int)((usqInt)(HasBytecodePC) << 1)))) & 1)
	 && ((((sqInt)(((void *)bcpc)))) == startbcpc)
		? ((sqInt)(((char *) mcpc)))
		: 0);
	if (result != 0) {
		return result;
	}

	/* In both CMMethod and CMBlock cases find the start of the map and
	   skip forward to the bytecode pc map entry for the stack check. */
	bcpc1 = startbcpc;
	if (((cogMethod->cmType)) == CMMethod) {
		/* begin cmIsFullBlock */
		isInBlock = (cogMethod->cpicHasMNUCaseOrCMIsFullBlock);
		homeMethod = ((CogMethod *) cogMethod);
		assert(startbcpc == (startPCOfMethodHeader((homeMethod->methodHeader))));
		map = ((((usqInt)homeMethod)) + ((homeMethod->blockSize))) - 1;
		annotation = ((usqInt) (byteAt(map))) >> AnnotationShift;
		assert((annotation == IsAbsPCReference)
		 || ((annotation == IsObjectReference)
		 || ((annotation == IsRelativeCall)
		 || (annotation == IsDisplacementX2N))));
		latestContinuation = startbcpc;
		aMethodObj = (homeMethod->methodObject);
		endbcpc = (numBytesOf(aMethodObj)) - 1;
		/* begin bytecodeSetOffsetForHeader: */
		aMethodHeader = (homeMethod->methodHeader);
		bsOffset = 
#    if MULTIPLEBYTECODESETS
			(headerIndicatesAlternateBytecodeSet(aMethodHeader)
						? 256
						: 0)
#    else /* MULTIPLEBYTECODESETS */
			0
#    endif /* MULTIPLEBYTECODESETS */
			;
		bcpc1 += deltaToSkipPrimAndErrorStoreInheader(aMethodObj, (homeMethod->methodHeader));
	}
	else {
		isInBlock = 1;
		assert(bcpc1 == ((cogMethod->startpc)));
		homeMethod = cmHomeMethod(cogMethod);
		map = findMapLocationForMcpcinMethod((((usqInt)cogMethod)) + (sizeof(CogBlockMethod)), homeMethod);
		assert(map != 0);
		annotation = ((usqInt) (byteAt(map))) >> AnnotationShift;
		assert(((((usqInt) annotation) >> AnnotationShift) == HasBytecodePC)
		 || ((((usqInt) annotation) >> AnnotationShift) == IsDisplacementX2N));
		while (((annotation = ((usqInt) (byteAt(map))) >> AnnotationShift)) != HasBytecodePC) {
			map -= 1;
		}

		/* skip fiducial; i.e. the map entry for the pc immediately following the method header. */
		map -= 1;
		aMethodObj = (homeMethod->methodObject);
		bcpc1 = startbcpc - (
#if MULTIPLEBYTECODESETS
	(headerIndicatesAlternateBytecodeSet((homeMethod->methodHeader))
		? AltBlockCreationBytecodeSize
		: BlockCreationBytecodeSize)
#else /* MULTIPLEBYTECODESETS */
	BlockCreationBytecodeSize
#endif /* MULTIPLEBYTECODESETS */
	);
		/* begin bytecodeSetOffsetForHeader: */
		aMethodHeader1 = (homeMethod->methodHeader);
		bsOffset = 
#    if MULTIPLEBYTECODESETS
			(headerIndicatesAlternateBytecodeSet(aMethodHeader1)
						? 256
						: 0)
#    else /* MULTIPLEBYTECODESETS */
			0
#    endif /* MULTIPLEBYTECODESETS */
			;
		byte = (fetchByteofObject(bcpc1, aMethodObj)) + bsOffset;
		descriptor = generatorAt(byte);
		endbcpc = (bcpc1 + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? (/* begin spanFor:at:exts:in: */
		((descriptor->spanFunction))(descriptor, bcpc1, -1, aMethodObj))
	: 0));
		bcpc1 = startbcpc;
	}
	nExts = 0;
	while ((((usqInt) (byteAt(map))) >> AnnotationShift) != HasBytecodePC) {
		map -= 1;
	}
	map -= 1;
	while (((mapByte = byteAt(map))) != MapEnd) {

		/* defensive; we exit on bcpc */
		if (mapByte >= FirstAnnotation) {
			annotation = ((usqInt) mapByte) >> AnnotationShift;
			mcpc += (mapByte & DisplacementMask);
			if (annotation >= HasBytecodePC) {
				if ((annotation == IsSendCall)
				 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
					annotation += mapByte & DisplacementMask;
					map -= 1;
				}
				while (1) {
					byte = (fetchByteofObject(bcpc1, aMethodObj)) + bsOffset;
					descriptor = generatorAt(byte);
					if (isInBlock) {
						if (bcpc1 >= endbcpc) {
							return 0;
						}
					}
					else {
						if (((descriptor->isReturn))
						 && (bcpc1 >= latestContinuation)) {
							return 0;
						}
						if ((isBranch(descriptor))
						 || ((descriptor->isBlockCreation))) {
							/* begin latestContinuationPCFor:at:exts:in: */
							distance = ((descriptor->spanFunction))(descriptor, bcpc1, nExts, aMethodObj);
							targetPC = (bcpc1 + ((descriptor->numBytes))) + (((distance < 0) ? 0 : distance));
							latestContinuation = ((latestContinuation < targetPC) ? targetPC : latestContinuation);
						}
						latestContinuation = latestContinuation;
					}
					nextBcpc = (bcpc1 + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? (/* begin spanFor:at:exts:in: */
		((descriptor->spanFunction))(descriptor, bcpc1, nExts, aMethodObj))
	: 0));
					if (((descriptor->isMapped))
					 || (isInBlock
					 && ((descriptor->isMappedInBlock)))) break;
					bcpc1 = nextBcpc;
					nExts = ((descriptor->isExtension)
						? nExts + 1
						: 0);
				}
				isBackwardBranch = (isBranch(descriptor))
				 && ((assert(((descriptor->spanFunction)) != null),
				(((descriptor->spanFunction))(descriptor, bcpc1, nExts, aMethodObj)) < 0));
				result = findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(descriptor, ((isBackwardBranch
	? (((sqInt)((usqInt)(annotation) << 1))) + 1
	: ((sqInt)((usqInt)(annotation) << 1)))), (((char *) mcpc)), ((isBackwardBranch
	? bcpc1 - (2 * nExts)
	: bcpc1)), (((void *)bcpc)));
				if (result != 0) {
					return result;
				}
				bcpc1 = nextBcpc;
				nExts = ((descriptor->isExtension)
					? nExts + 1
					: 0);
			}
		}
		else {
			assert(((((usqInt) mapByte) >> AnnotationShift) == IsDisplacementX2N)
			 || ((((usqInt) mapByte) >> AnnotationShift) == IsAnnotationExtension));
			if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
				mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
			}
		}
		map -= 1;
	}
	return 0;
}


/*	For the purposes of become: see if the two methods are similar, i.e. can
	be safely becommed.
	This is pretty strict. All literals and bytecodes must be identical. Only
	trailer bytes and header
	flags can differ. */

	/* Cogit>>#method:hasSameCodeAs:checkPenultimate: */
static sqInt NoDbgRegParms
methodhasSameCodeAscheckPenultimate(sqInt methodA, sqInt methodB, sqInt comparePenultimateLiteral)
{
    sqInt bi;
    sqInt endPCA;
    sqInt headerA;
    sqInt headerB;
    sqInt li;
    sqInt numLitsA;

	headerA = methodHeaderOf(methodA);
	headerB = methodHeaderOf(methodB);
	numLitsA = literalCountOfMethodHeader(headerA);
	endPCA = endPCOf(methodA);
	if (((argumentCountOfMethodHeader(headerA)) != (argumentCountOfMethodHeader(headerB)))
	 || (((temporaryCountOfMethodHeader(headerA)) != (temporaryCountOfMethodHeader(headerB)))
	 || (((primitiveIndexOfMethodheader(methodA, headerA)) != (primitiveIndexOfMethodheader(methodB, headerB)))
	 || ((numLitsA != (literalCountOfMethodHeader(headerB)))
	 || (endPCA > (numBytesOf(methodB))))))) {
		return 0;
	}
	for (li = 1; li < numLitsA; li += 1) {
		if ((fetchPointerofObject(li, methodA)) != (fetchPointerofObject(li, methodB))) {
			if ((li < (numLitsA - 1))
			 || (comparePenultimateLiteral)) {
				return 0;
			}
		}
	}
	for (bi = (startPCOfMethod(methodA)); bi <= endPCA; bi += 1) {
		if ((fetchByteofObject(bi, methodA)) != (fetchByteofObject(bi, methodB))) {
			return 0;
		}
	}
	return 1;
}

	/* Cogit>>#minCogMethodAddress */
sqInt
minCogMethodAddress(void)
{
	return methodZoneBase;
}

	/* Cogit>>#mnuOffset */
sqInt
mnuOffset(void)
{
	return missOffset;
}

	/* Cogit>>#needsFrameIfImmutability: */
static sqInt NoDbgRegParms
needsFrameIfImmutability(sqInt stackDelta)
{
	return IMMUTABILITY;
}

	/* Cogit>>#needsFrameIfInBlock: */
static sqInt NoDbgRegParms
needsFrameIfInBlock(sqInt stackDelta)
{
	return inBlock > 0;
}

	/* Cogit>>#needsFrameNever: */
static sqInt NoDbgRegParms
needsFrameNever(sqInt stackDelta)
{
	return 0;
}

	/* Cogit>>#noAssertMethodClassAssociationOf: */
static sqInt NoDbgRegParms
noAssertMethodClassAssociationOf(sqInt methodPointer)
{
	return literalofMethod((literalCountOfMethodHeader(noAssertHeaderOf(methodPointer))) - 1, methodPointer);
}


/*	Check that no method is maximally marked. A maximal mark is an indication
	the method has been scanned to increase the usage count of its referent
	methods.  */

	/* Cogit>>#noCogMethodsMaximallyMarked */
static sqInt
noCogMethodsMaximallyMarked(void)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if ((((cogMethod->cmType)) != CMFree)
		 && (((cogMethod->cmUsageCount)) == CMMaxUsageCount)) {
			return 0;
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	return 1;
}


/*	Answer if all targets in the PIC are in-use methods. */

	/* Cogit>>#noTargetsFreeInClosedPIC: */
static sqInt NoDbgRegParms
noTargetsFreeInClosedPIC(CogMethod *cPIC)
{
	return !(cPICHasFreedTargets(cPIC));
}


/*	Store the generated machine code, answering the last address */

	/* Cogit>>#outputInstructionsAt: */
static sqInt NoDbgRegParms
outputInstructionsAt(sqInt startAddress)
{
    sqInt absoluteAddress;
    AbstractInstruction *abstractInstruction;
    sqInt i;
    sqInt j;

	absoluteAddress = startAddress;
	for (i = 0; i < opcodeIndex; i += 1) {
		abstractInstruction = abstractInstructionAt(i);
		assert(((abstractInstruction->address)) == absoluteAddress);
		/* begin outputMachineCodeAt: */
		for (j = 0; j < ((abstractInstruction->machineCodeSize)); j += 1) {
			byteAtput(absoluteAddress + j, ((abstractInstruction->machineCode))[j]);
		}
		absoluteAddress += (abstractInstruction->machineCodeSize);
	}
	return absoluteAddress;
}


/*	Output instructions generated for one of the generated run-time routines,
	a trampoline, etc
 */

	/* Cogit>>#outputInstructionsForGeneratedRuntimeAt: */
static sqInt NoDbgRegParms
outputInstructionsForGeneratedRuntimeAt(sqInt startAddress)
{
    sqInt endAddress;
    sqInt size;

	computeMaximumSizes();
	(methodLabel->address = startAddress);
	size = generateInstructionsAt(startAddress);
	endAddress = outputInstructionsAt(startAddress);
	assert((startAddress + size) == endAddress);
	methodZoneBase = alignUptoRoutineBoundary(endAddress);
	stopsFromto(backEnd, endAddress, methodZoneBase - 1);
	return startAddress;
}

	/* Cogit>>#PushCw: */
static AbstractInstruction * NoDbgRegParms
gPushCw(sqInt wordConstant)
{
    AbstractInstruction *anInstruction;

	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperand(PushCw, wordConstant);
	return anInstruction;
}


/*	Code entry closed PIC full or miss to an instance of a young class or to a
	young target method.
	Attempt to patch the send site to an open PIC. Answer if the attempt
	succeeded; in fact it will
	only return if the attempt failed.
	The stack looks like:
	receiver
	args
	sp=>	sender return address */

	/* Cogit>>#patchToOpenPICFor:numArgs:receiver: */
sqInt
patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver)
{
    sqInt extent;
    CogMethod *oPIC;
    sqInt outerReturn;


	/* See if an Open PIC is already available. */
	outerReturn = stackTop();
	oPIC = openPICWithSelector(selector);
	if (!(oPIC)) {

		/* otherwise attempt to create an Open PIC. */
		oPIC = cogOpenPICSelectornumArgs(selector, numArgs);
		if ((((((sqInt)oPIC)) >= MaxNegativeErrorCode) && ((((sqInt)oPIC)) <= -1))) {

			/* For some reason the PIC couldn't be generated, most likely a lack of code memory. */
			if ((((sqInt)oPIC)) == InsufficientCodeSpace) {
				callForCogCompiledCodeCompaction();
			}
			return 0;
		}
	}
	extent = rewriteInlineCacheAttagtarget(backEnd, outerReturn, inlineCacheValueForSelectorinat(selector, mframeHomeMethodExport(), outerReturn), (((sqInt)oPIC)) + cmEntryOffset);
	flushICacheFromto(processor, (((usqInt)outerReturn)) - extent, ((usqInt)outerReturn));
	flushICacheFromto(processor, ((usqInt)oPIC), (((usqInt)oPIC)) + openPICSize);
	executeCogMethodfromLinkedSendWithReceiver(oPIC, receiver);
	return 1;
}


/*	This value is used to decide between MNU processing
	or interpretation in the closed PIC aborts. */

	/* Cogit>>#picAbortDiscriminatorValue */
static sqInt
picAbortDiscriminatorValue(void)
{
	return 0;
}


/*	Answer the start of the abort sequence for invoking the interpreter in a
	closed PIC.
 */

	/* Cogit>>#picInterpretAbortOffset */
static sqInt
picInterpretAbortOffset(void)
{
	return (interpretOffset()) - (/* begin callInstructionByteSize */ 5);
}

	/* Cogit>>#printCogMethodFor: */
void
printCogMethodFor(void *address)
{
    CogMethod *cogMethod;

	cogMethod = methodFor(address);
	if (cogMethod == 0) {
		if ((codeEntryFor(address)) == null) {
			print("not a method");
			cr();
		}
		else {
			print("trampoline ");
			print(codeEntryNameFor(address));
			cr();
		}
	}
	else {
		printCogMethod(cogMethod);
	}
}

	/* Cogit>>#printTrampolineTable */
void
printTrampolineTable(void)
{
    sqInt i;

	for (i = 0; i < trampolineTableIndex; i += 2) {
		printHex(((sqInt)(trampolineAddresses[i + 1])));
		print(": ");
		print(((char *) (trampolineAddresses[i])));
		cr();
	}
}

	/* Cogit>>#processorHasDivQuoRemAndMClassIsSmallInteger */
static sqInt
processorHasDivQuoRemAndMClassIsSmallInteger(void)
{
	return mclassIsSmallInteger();
}

	/* Cogit>>#processorHasDoublePrecisionFloatingPointSupport */
static sqInt
processorHasDoublePrecisionFloatingPointSupport(void)
{
	/* begin hasDoublePrecisionFloatingPointSupport */
	return hasSSE2Instructions(((AbstractInstruction *) backEnd));
}

	/* Cogit>>#processorHasMultiplyAndMClassIsSmallInteger */
static sqInt
processorHasMultiplyAndMClassIsSmallInteger(void)
{
	return mclassIsSmallInteger();
}

	/* Cogit>>#recordGeneratedRunTime:address: */
static void NoDbgRegParms
recordGeneratedRunTimeaddress(char *aString, sqInt address)
{
	trampolineAddresses[trampolineTableIndex] = aString;
	trampolineAddresses[trampolineTableIndex + 1] = (((char *) address));
	trampolineTableIndex += 2;
}


/*	This one for C support code. */

	/* Cogit>>#recordPrimTraceFunc */
sqInt
recordPrimTraceFunc(void)
{
	return recordPrimTrace();
}

	/* Cogit>>#recordRunTimeObjectReferences */
static void
recordRunTimeObjectReferences(void)
{
    sqInt i;
    AbstractInstruction *instruction;

	for (i = 0; i < opcodeIndex; i += 1) {
		instruction = abstractInstructionAt(i);
		if (((instruction->annotation)) == IsObjectReference) {
			assert(runtimeObjectRefIndex < NumObjRefsInRuntime);
			assert(!hasYoungReferent);
			if (hasYoungReferent) {
				error("attempt to generate run-time routine containing young object reference.  Cannot initialize Cogit run-time.");
			}
			objectReferencesInRuntime[runtimeObjectRefIndex] = (((usqInt)(((instruction->address)) + ((instruction->machineCodeSize)))));
			runtimeObjectRefIndex += 1;
		}
	}
}

	/* Cogit>>#registerMaskFor: */
static sqInt NoDbgRegParms
registerMaskFor(sqInt reg)
{
	return 1U << reg;
}

	/* Cogit>>#registerMaskFor:and: */
static sqInt NoDbgRegParms
registerMaskForand(sqInt reg1, sqInt reg2)
{
	return (1U << reg1) | (1U << reg2);
}

	/* Cogit>>#relocateCallsAndSelfReferencesInMethod: */
static void NoDbgRegParms
relocateCallsAndSelfReferencesInMethod(CogMethod *cogMethod)
{
    sqInt annotation;
    sqInt callDelta;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqLong refDelta;
    sqInt result;

	refDelta = (cogMethod->objectHeader);
	callDelta = refDelta;
	assert((((cogMethod->cmType)) == CMMethod)
	 || (((cogMethod->cmType)) == CMOpenPIC));
	assert((callTargetFromReturnAddress(backEnd, (((sqInt)cogMethod)) + missOffset)) == ((((cogMethod->cmType)) == CMMethod
		? methodAbortTrampolineFor((cogMethod->cmNumArgs))
		: picAbortTrampolineFor((cogMethod->cmNumArgs)))));
	relocateCallBeforeReturnPCby(backEnd, (((sqInt)cogMethod)) + missOffset, -callDelta);
	/* begin mapFor:performUntil:arg: */
	mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
		? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
		: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
	map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
	while (((mapByte = byteAt(map))) != MapEnd) {
		if (mapByte >= FirstAnnotation) {

			/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
			mcpc += (mapByte & DisplacementMask);
			if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
			 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
				annotation += mapByte & DisplacementMask;
				map -= 1;
			}
			result = relocateIfCallOrMethodReferencemcpcdelta(annotation, (((char *) mcpc)), refDelta);
			if (result != 0) {
				goto l2;
			}
		}
		else {
			if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
				mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
			}
		}
		map -= 1;
	}
	l2:	/* end mapFor:performUntil:arg: */;
}

	/* Cogit>>#relocateCallsInClosedPIC: */
static void NoDbgRegParms
relocateCallsInClosedPIC(CogMethod *cPIC)
{
    sqInt callDelta;
    sqInt entryPoint;
    sqInt i;
    sqInt pc;
    sqInt pc1;
    sqLong refDelta;
    CogMethod *targetMethod;

	refDelta = (cPIC->objectHeader);
	callDelta = refDelta;
	assert((callTargetFromReturnAddress(backEnd, (((sqInt)cPIC)) + missOffset)) == (picAbortTrampolineFor((cPIC->cmNumArgs))));
	relocateCallBeforeReturnPCby(backEnd, (((sqInt)cPIC)) + missOffset, -callDelta);
	pc = (((sqInt)cPIC)) + firstCPICCaseOffset;
	for (i = 1; i <= ((cPIC->cPICNumCases)); i += 1) {
		pc = addressOfEndOfCaseinCPIC(i, cPIC);
		if (i == 1) {
			entryPoint = jumpLongTargetBeforeFollowingAddress(backEnd, pc);
		}
		else {
			/* begin jumpLongConditionalTargetBeforeFollowingAddress: */
			entryPoint = jumpLongTargetBeforeFollowingAddress(((AbstractInstruction *) backEnd), pc);
		}
		if (((((usqInt)cPIC)) <= (((usqInt)entryPoint)))
		 && (((((usqInt)cPIC)) + ((cPIC->blockSize))) >= (((usqInt)entryPoint)))) {

			/* Interpret/MNU */
					}
		else {
			targetMethod = ((CogMethod *) (entryPoint - cmNoCheckEntryOffset));
			assert(((targetMethod->cmType)) == CMMethod);
			if (i == 1) {
				relocateJumpLongBeforeFollowingAddressby(backEnd, pc, -(callDelta - ((targetMethod->objectHeader))));
			}
			else {
				relocateJumpLongConditionalBeforeFollowingAddressby(backEnd, pc, -(callDelta - ((targetMethod->objectHeader))));
			}
		}
	}
	assert(((cPIC->cPICNumCases)) > 0);
	/* begin relocateMethodReferenceBeforeAddress:by: */
	pc1 = (addressOfEndOfCaseinCPIC(2, cPIC)) + (loadPICLiteralByteSize(backEnd));
	relocateCallBeforeReturnPCby(((AbstractInstruction *) backEnd), pc1, refDelta);
	((AbstractInstruction *) backEnd);
	relocateJumpLongBeforeFollowingAddressby(backEnd, (((sqInt)cPIC)) + cPICEndOfCodeOffset, -callDelta);
}

	/* Cogit>>#relocateIfCallOrMethodReference:mcpc:delta: */
static sqInt NoDbgRegParms
relocateIfCallOrMethodReferencemcpcdelta(sqInt annotation, char *mcpc, sqInt refDelta)
{
    sqInt callDelta;
    sqInt entryPoint;
    sqInt offset1;
    sqInt *sendTable1;
    CogMethod *targetMethod;
    sqInt unlinkedRoutine;

	callDelta = refDelta;
	if (annotation >= IsSendCall) {
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint <= methodZoneBase) {

			/* send is not linked; just relocate */
			relocateCallBeforeReturnPCby(backEnd, ((sqInt)mcpc), -callDelta);
			return 0;
		}
		/* begin offsetAndSendTableFor:annotation:into: */
		if (annotation == IsSendCall) {
			offset1 = cmEntryOffset;
			sendTable1 = ordinarySendTrampolines;
		}
		else {
			if (annotation == IsDirectedSuperSend) {
				offset1 = cmNoCheckEntryOffset;
				sendTable1 = directedSuperSendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperBindingSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperBindingSendTrampolines;
				}
				else {
					assert(annotation == IsSuperSend);
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = superSendTrampolines;
				}
			}
		}
		targetMethod = ((CogMethod *) (entryPoint - offset1));
		if (((targetMethod->cmType)) != CMFree) {

			/* send target not freed; just relocate. */
			relocateCallBeforeReturnPCby(backEnd, ((sqInt)mcpc), -(callDelta - ((targetMethod->objectHeader))));
			return 0;
		}
		unlinkedRoutine = sendTable1[((((targetMethod->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod->cmNumArgs)) : (NumSendTrampolines - 1))];
		unlinkedRoutine -= callDelta;
		rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), (targetMethod->selector), unlinkedRoutine);
		return 0;
	}
	if (annotation == IsRelativeCall) {
		relocateCallBeforeReturnPCby(backEnd, ((sqInt)mcpc), -callDelta);
		return 0;
	}
	if (annotation == IsAbsPCReference) {
		/* begin relocateMethodReferenceBeforeAddress:by: */
		relocateCallBeforeReturnPCby(((AbstractInstruction *) backEnd), ((sqInt)mcpc), refDelta);
		((AbstractInstruction *) backEnd);
	}
	return 0;
}

	/* Cogit>>#remapIfObjectRef:pc:hasYoung: */
static sqInt NoDbgRegParms
remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr)
{
    sqInt cacheTag1;
    sqInt entryPoint1;
    sqInt literal;
    sqInt mappedCacheTag;
    sqInt mappedLiteral;
    sqInt offset1;
    sqInt *sendTable1;
    sqInt tagCouldBeObj1;
    CogMethod *targetMethod1;

	if (annotation == IsObjectReference) {
		literal = literalBeforeFollowingAddress(backEnd, ((usqInt)mcpc));
		if (couldBeObject(literal)) {
			mappedLiteral = remapObject(literal);
			if (literal != mappedLiteral) {
				storeLiteralbeforeFollowingAddress(backEnd, mappedLiteral, ((usqInt)mcpc));
				codeModified = 1;
			}
			if ((hasYoungPtr != 0)
			 && (isYoung(mappedLiteral))) {
				(((sqInt *) hasYoungPtr))[0] = 1;
			}
		}
	}
	if (annotation >= IsSendCall) {
		/* begin entryCacheTagAndCouldBeObjectAt:annotation:into: */
		cacheTag1 = inlineCacheTagAt(backEnd, ((sqInt)mcpc));

		/* in-line cache tags are the selectors of sends if sends are unlinked,
		   the selectors of super sends (entry offset = cmNoCheckEntryOffset),
		   the selectors of open PIC sends (entry offset = cmEntryOffset, target is an Open PIC)
		   or in-line cache tags (classes, class indices, immediate bit patterns, etc).
		   Note that selectors can be immediate so there is no guarantee that they
		   are markable/remappable objects. */
		entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		tagCouldBeObj1 = entryPointTagIsSelector(entryPoint1);
		if (tagCouldBeObj1
		 && (couldBeObject(cacheTag1))) {
			mappedCacheTag = remapObject(cacheTag1);
			if (cacheTag1 != mappedCacheTag) {
				rewriteInlineCacheTagat(backEnd, mappedCacheTag, ((usqInt)mcpc));
				codeModified = 1;
			}
			if ((hasYoungPtr != 0)
			 && (isYoung(mappedCacheTag))) {
				(((sqInt *) hasYoungPtr))[0] = 1;
			}
		}
		if (hasYoungPtr != 0) {

			/* Since the unlinking routines may rewrite the cacheTag to the send's selector, and
			   since they don't have the cogMethod to hand and can't add it to youngReferrers,
			   the method must remain in youngReferrers if the targetMethod's selector is young. */
			if (entryPoint1 > methodZoneBase) {

				/* It's a linked send. */
				/* begin targetMethodAndSendTableFor:annotation:into: */
				if (annotation == IsSendCall) {
					offset1 = cmEntryOffset;
					sendTable1 = ordinarySendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperSendTrampolines;
					}
					else {
						if (annotation == IsDirectedSuperBindingSend) {
							offset1 = cmNoCheckEntryOffset;
							sendTable1 = directedSuperBindingSendTrampolines;
						}
						else {
							assert(annotation == IsSuperSend);
							offset1 = cmNoCheckEntryOffset;
							sendTable1 = superSendTrampolines;
						}
					}
				}
				targetMethod1 = ((CogMethod *) (entryPoint1 - offset1));
				if (isYoung((targetMethod1->selector))) {
					(((sqInt *) hasYoungPtr))[0] = 1;
				}
			}
		}
	}
	return 0;
}


/*	Remap a potential object reference from a closed PIC.
	This may be an object reference, an inline cache tag or null.
	Answer if the updated literal is young.
	mcpc is the address of the next instruction following either
	the load of the method literal or the compare of the class tag. */

	/* Cogit>>#remapMaybeObjRefInClosedPICAt: */
static sqInt NoDbgRegParms
remapMaybeObjRefInClosedPICAt(sqInt mcpc)
{
    sqInt object;
    sqInt subject;

	object = literalBeforeFollowingAddress(backEnd, mcpc);
	if (!(couldBeObject(object))) {
		return 0;
	}
	subject = remapOop(object);
	if (object != subject) {
		storeLiteralbeforeFollowingAddress(backEnd, subject, mcpc);
		codeModified = 1;
	}
	return isYoungObject(subject);
}


/*	Rewrite the three values involved in a CPIC case. Used by the initialize &
	extend CPICs.
	c.f. expectedClosedPICPrototype: */
/*	write the obj ref/operand via the second ldr */

	/* Cogit>>#rewriteCPICCaseAt:tag:objRef:target: */
static void NoDbgRegParms
rewriteCPICCaseAttagobjReftarget(sqInt followingAddress, sqInt newTag, sqInt newObjRef, sqInt newTarget)
{
    sqInt classTagPC;
    sqInt methodObjPC;

	methodObjPC = (followingAddress - 6 /* jumpLongConditionalByteSize */) - 5 /* cmpC32RTempByteSize */;
	storeLiteralbeforeFollowingAddress(backEnd, newObjRef, methodObjPC);

	/* rewite the tag via the first ldr */
	classTagPC = followingAddress - 6 /* jumpLongConditionalByteSize */;
	/* begin storeLiteral32:beforeFollowingAddress: */
	storeLiteralbeforeFollowingAddress(((AbstractInstruction *) backEnd), newTag, classTagPC);
	((AbstractInstruction *) backEnd);
	rewriteConditionalJumpLongAttarget(backEnd, followingAddress, newTarget);
}


/*	Answer the number of clean blocks found in the literal frame */

	/* Cogit>>#scanForCleanBlocks */
static sqInt
scanForCleanBlocks(void)
{
    sqInt i;
    sqInt iLimiT;
    sqInt lit;
    sqInt numCleanBlocks;
    sqInt startPCOrNil;

	numCleanBlocks = 0;
	for (i = 1, iLimiT = (literalCountOf(methodObj)); i <= iLimiT; i += 1) {
		lit = fetchPointerofObject(i, methodObj);
		startPCOrNil = startPCOrNilOfLiteralin(lit, methodObj);
		if (!(startPCOrNil == null)) {
			numCleanBlocks += 1;
		}
	}
	return numCleanBlocks;
}

	/* Cogit>>#setBreakMethod: */
void
setBreakMethod(sqInt anObj)
{
	breakMethod = anObj;
}

	/* Cogit>>#setPostCompileHook: */
void
setPostCompileHook(void (*aFunction)(CogMethod *))
{
	postCompileHook = aFunction;
}


/*	If a method is compiled to machine code via a block entry it won't have a
	selector. A subsequent send can find the method and hence fill in the
	selector. 
 */
/*	self disassembleMethod: cogMethod */

	/* Cogit>>#setSelectorOf:to: */
void
setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop)
{
	compilationBreakpointisMNUCase(aSelectorOop, numBytesOf(aSelectorOop), 0);
	assert(((cogMethod->cmType)) == CMMethod);
	(cogMethod->selector = aSelectorOop);
	if (isYoung(aSelectorOop)) {
		ensureInYoungReferrers(cogMethod);
	}
}

	/* Cogit>>#spanForCleanBlockStartingAt: */
static sqInt NoDbgRegParms
spanForCleanBlockStartingAt(sqInt startPC)
{
    BytecodeDescriptor *descriptor;
    sqInt end;
    sqInt pc;

	pc = startPC;
	end = numBytesOf(methodObj);
	while (pc <= end) {
		/* begin generatorForPC: */
		descriptor = generatorAt(bytecodeSetOffset + (fetchByteofObject(pc, methodObj)));
		pc += (descriptor->numBytes);
		if ((descriptor->isReturn)) {
			return pc - startPC;
		}
	}
	error("couldn't locate end of clean block");
	return 0;
}


/*	Answer a fake value for the method oop in other than the first case in the
	PIC prototype.
	Since we use MoveUniqueCw:R: it must not be confused with a
	method-relative address.
 */

	/* Cogit>>#subsequentPrototypeMethodOop */
static sqInt
subsequentPrototypeMethodOop(void)
{
	return (((((usqInt)195929424)) >= ((methodLabel->address)))
	 && ((((usqInt)195929424)) < (youngReferrers()))
		? 233496237
		: 195929424);
}

	/* Cogit>>#traceLinkedSendOffset */
sqInt
traceLinkedSendOffset(void)
{
	return (cmNoCheckEntryOffset + 5 /* callInstructionByteSize */) + (0);
}


/*	Encode true and false and 0 to N such that they can't be confused for
	register numbers (including NoReg)
	and can be tested for by isTrampolineArgConstant: and decoded by
	trampolineArgValue: 
 */

	/* Cogit>>#trampolineArgConstant: */
static sqInt NoDbgRegParms
trampolineArgConstant(sqInt booleanOrInteger)
{
	assert(booleanOrInteger >= 0);
	return -2 - booleanOrInteger;
}

	/* Cogit>>#trampolineName:numArgs: */
static char * NoDbgRegParms
trampolineNamenumArgs(char *routinePrefix, sqInt numArgs)
{
    char *theString;

	/* begin trampolineName:numArgs:limit: */
	theString = malloc((strlen(routinePrefix)) + 6);
	sprintf(theString, "%s%cArgs", routinePrefix, (numArgs <= (NumSendTrampolines - 2)
		? '0' + numArgs
		: 'N'));
	return theString;
}


/*	Malloc a string with the contents for the trampoline table */

	/* Cogit>>#trampolineName:numArgs:limit: */
static char * NoDbgRegParms
trampolineNamenumArgslimit(char *routinePrefix, int numArgs, sqInt argsLimit)
{
    char *theString;

	theString = malloc((strlen(routinePrefix)) + 6);
	sprintf(theString, "%s%cArgs", routinePrefix, (numArgs <= argsLimit
		? '0' + numArgs
		: 'N'));
	return theString;
}

	/* Cogit>>#trampolineName:numRegArgs: */
static char * NoDbgRegParms
trampolineNamenumRegArgs(char *routinePrefix, sqInt numArgs)
{
    sqInt argsLimit;
    char *theString;

	/* begin trampolineName:numArgs:limit: */
	argsLimit = 2 /* numRegArgs */;
	theString = malloc((strlen(routinePrefix)) + 6);
	sprintf(theString, "%s%cArgs", routinePrefix, (numArgs <= argsLimit
		? '0' + numArgs
		: 'N'));
	return theString;
}

	/* Cogit>>#unknownBytecode */
static sqInt
unknownBytecode(void)
{
	return EncounteredUnknownBytecode;
}


/*	Unlink all sends in cog methods. */

	/* Cogit>>#unlinkAllSends */
void
unlinkAllSends(void)
{
    sqInt annotation;
    CogMethod *cogMethod;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;

	if (!(methodZoneBase)) {
		return;
	}
	cogMethod = ((CogMethod *) methodZoneBase);
	voidOpenPICList();
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			/* begin mapFor:performUntil:arg: */
			mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
				? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
				: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
			while (((mapByte = byteAt(map))) != MapEnd) {
				if (mapByte >= FirstAnnotation) {

					/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
					mcpc += (mapByte & DisplacementMask);
					if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
					 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
						annotation += mapByte & DisplacementMask;
						map -= 1;
					}
					result = unlinkIfLinkedSendpcignored(annotation, (((char *) mcpc)), 0);
					if (result != 0) {
						goto l2;
					}
				}
				else {
					if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
						mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
					}
				}
				map -= 1;
			}
	l2:	/* end mapFor:performUntil:arg: */;
		}
		else {
			if (((cogMethod->cmType)) != CMFree) {
				freeMethod(cogMethod);
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	flushICacheFromto(processor, ((usqInt)methodZoneBase), ((usqInt)(limitZony())));
}

	/* Cogit>>#unlinkIfFreeOrLinkedSend:pc:of: */
static sqInt NoDbgRegParms
unlinkIfFreeOrLinkedSendpcof(sqInt annotation, char *mcpc, sqInt theSelector)
{
    sqInt entryPoint;
    sqInt offset1;
    sqInt *sendTable1;
    CogMethod *targetMethod1;
    sqInt unlinkedRoutine;

	if (annotation >= IsSendCall) {
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint > methodZoneBase) {

			/* It's a linked send. */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint - offset1));
			if ((((targetMethod1->cmType)) == CMFree)
			 || (((targetMethod1->selector)) == theSelector)) {
				/* begin unlinkSendAt:targetMethod:sendTable: */
				unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
				rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), (targetMethod1->selector), unlinkedRoutine);
				codeModified = 1;
			}
		}
	}
	return 0;
}

	/* Cogit>>#unlinkIfInvalidClassSend:pc:ignored: */
static sqInt NoDbgRegParms
unlinkIfInvalidClassSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity)
{
    sqInt entryPoint;
    sqInt offset1;
    sqInt *sendTable1;
    CogMethod *targetMethod1;
    sqInt unlinkedRoutine;

	if (annotation >= IsSendCall) {
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint > methodZoneBase) {

			/* It's a linked send, but maybe a super send or linked to an OpenPIC, in which case the cache tag will be a selector.... */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint - offset1));
			if (!(((annotation == IsSuperSend)
				 || (((annotation >= IsDirectedSuperSend) && (annotation <= IsDirectedSuperBindingSend))))
				 || (((targetMethod1->cmType)) == CMOpenPIC))) {
				if (!(isValidClassTag(inlineCacheTagAt(backEnd, ((sqInt)mcpc))))) {
					/* begin unlinkSendAt:targetMethod:sendTable: */
					unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
					rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), inlineCacheValueForSelectorinat((targetMethod1->selector), enumeratingCogMethod, mcpc), unlinkedRoutine);
					codeModified = 1;
				}
			}
		}
	}
	return 0;
}

	/* Cogit>>#unlinkIfLinkedSendToFree:pc:ignored: */
static sqInt NoDbgRegParms
unlinkIfLinkedSendToFreepcignored(sqInt annotation, char *mcpc, sqInt superfluity)
{
    sqInt entryPoint;
    sqInt offset1;
    sqInt *sendTable1;
    CogMethod *targetMethod1;
    sqInt unlinkedRoutine;

	if (annotation >= IsSendCall) {
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint > methodZoneBase) {

			/* It's a linked send. */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint - offset1));
			if (((targetMethod1->cmType)) == CMFree) {
				/* begin unlinkSendAt:targetMethod:sendTable: */
				unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
				rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), inlineCacheValueForSelectorinat((targetMethod1->selector), enumeratingCogMethod, mcpc), unlinkedRoutine);
				codeModified = 1;
			}
		}
	}
	return 0;
}

	/* Cogit>>#unlinkIfLinkedSend:pc:ignored: */
static sqInt NoDbgRegParms
unlinkIfLinkedSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity)
{
    sqInt entryPoint;
    sqInt offset1;
    sqInt *sendTable1;
    CogMethod *targetMethod1;
    sqInt unlinkedRoutine;

	if (annotation >= IsSendCall) {
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint > methodZoneBase) {

			/* It's a linked send. */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint - offset1));
			/* begin unlinkSendAt:targetMethod:sendTable: */
			unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
			rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), inlineCacheValueForSelectorinat((targetMethod1->selector), enumeratingCogMethod, mcpc), unlinkedRoutine);
			codeModified = 1;
		}
	}
	return 0;
}

	/* Cogit>>#unlinkIfLinkedSend:pc:to: */
static sqInt NoDbgRegParms
unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod)
{
    sqInt entryPoint;
    sqInt offset1;
    sqInt *sendTable1;
    CogMethod *targetMethod1;
    sqInt unlinkedRoutine;

	if (annotation >= IsSendCall) {
		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
		if (entryPoint > methodZoneBase) {

			/* It's a linked send. */
			/* begin targetMethodAndSendTableFor:annotation:into: */
			if (annotation == IsSendCall) {
				offset1 = cmEntryOffset;
				sendTable1 = ordinarySendTrampolines;
			}
			else {
				if (annotation == IsDirectedSuperSend) {
					offset1 = cmNoCheckEntryOffset;
					sendTable1 = directedSuperSendTrampolines;
				}
				else {
					if (annotation == IsDirectedSuperBindingSend) {
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = directedSuperBindingSendTrampolines;
					}
					else {
						assert(annotation == IsSuperSend);
						offset1 = cmNoCheckEntryOffset;
						sendTable1 = superSendTrampolines;
					}
				}
			}
			targetMethod1 = ((CogMethod *) (entryPoint - offset1));
			if ((((sqInt)targetMethod1)) == theCogMethod) {
				/* begin unlinkSendAt:targetMethod:sendTable: */
				unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
				rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), inlineCacheValueForSelectorinat((targetMethod1->selector), enumeratingCogMethod, mcpc), unlinkedRoutine);
				codeModified = 1;
			}
		}
	}
	return 0;
}


/*	Unlink all sends in cog methods whose class tag is that of a forwarded
	class. 
 */

	/* Cogit>>#unlinkSendsLinkedForInvalidClasses */
void
unlinkSendsLinkedForInvalidClasses(void)
{
    sqInt annotation;
    CogMethod *cogMethod;
    sqInt freedPIC;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;

	if (!(methodZoneBase)) {
		return;
	}
	cogMethod = ((CogMethod *) methodZoneBase);
	codeModified = (freedPIC = 0);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			/* begin mapFor:performUntil:arg: */
			mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
				? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
				: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
			while (((mapByte = byteAt(map))) != MapEnd) {
				if (mapByte >= FirstAnnotation) {

					/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
					mcpc += (mapByte & DisplacementMask);
					if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
					 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
						annotation += mapByte & DisplacementMask;
						map -= 1;
					}
					result = unlinkIfInvalidClassSendpcignored(annotation, (((char *) mcpc)), 0);
					if (result != 0) {
						goto l2;
					}
				}
				else {
					if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
						mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
					}
				}
				map -= 1;
			}
	l2:	/* end mapFor:performUntil:arg: */;
		}
		else {
			if ((((cogMethod->cmType)) == CMClosedPIC)
			 && (cPICHasForwardedClass(cogMethod))) {
				freeMethod(cogMethod);
				freedPIC = 1;
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	if (freedPIC) {
		unlinkSendsToFree();
	}
	else {
		if (codeModified) {

			/* After possibly updating inline caches we need to flush the icache. */
			flushICacheFromto(processor, ((usqInt)methodZoneBase), ((usqInt)(limitZony())));
		}
	}
}


/*	Unlink all sends in cog methods. Free all Closed PICs with the selector,
	or with an MNU case if isMNUSelector. First check if any method actually
	has the selector; if not there can't be any linked send to it. This
	routine (including descendents) is performance critical. It contributes
	perhaps 30% of entire execution time in Compiler recompileAll. */

	/* Cogit>>#unlinkSendsOf:isMNUSelector: */
void
unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector)
{
    sqInt annotation;
    CogMethod *cogMethod;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt mustScanAndUnlink;
    sqInt result;

	if (!(methodZoneBase)) {
		return;
	}
	cogMethod = ((CogMethod *) methodZoneBase);
	mustScanAndUnlink = 0;
	if (isMNUSelector) {
		while (cogMethod < (limitZony())) {
			if (((cogMethod->cmType)) != CMFree) {
				if (((cogMethod->cpicHasMNUCaseOrCMIsFullBlock))
				 && (((cogMethod->cmType)) == CMClosedPIC)) {
					assert(((cogMethod->cmType)) == CMClosedPIC);
					freeMethod(cogMethod);
					mustScanAndUnlink = 1;
				}
				else {
					if (((cogMethod->selector)) == selector) {
						mustScanAndUnlink = 1;
						if (((cogMethod->cmType)) == CMClosedPIC) {
							freeMethod(cogMethod);
						}
					}
				}
			}
			cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
		}
	}
	else {
		while (cogMethod < (limitZony())) {
			if ((((cogMethod->cmType)) != CMFree)
			 && (((cogMethod->selector)) == selector)) {
				mustScanAndUnlink = 1;
				if (((cogMethod->cmType)) == CMClosedPIC) {
					freeMethod(cogMethod);
				}
			}
			cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
		}
	}
	if (!mustScanAndUnlink) {
		return;
	}
	codeModified = 0;
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			/* begin mapFor:performUntil:arg: */
			mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
				? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
				: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
			while (((mapByte = byteAt(map))) != MapEnd) {
				if (mapByte >= FirstAnnotation) {

					/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
					mcpc += (mapByte & DisplacementMask);
					if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
					 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
						annotation += mapByte & DisplacementMask;
						map -= 1;
					}
					result = unlinkIfFreeOrLinkedSendpcof(annotation, (((char *) mcpc)), selector);
					if (result != 0) {
						goto l2;
					}
				}
				else {
					if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
						mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
					}
				}
				map -= 1;
			}
	l2:	/* end mapFor:performUntil:arg: */;
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	if (codeModified) {

		/* After possibly updating inline caches we need to flush the icache. */
		flushICacheFromto(processor, ((usqInt)methodZoneBase), ((usqInt)(limitZony())));
	}
}


/*	Unlink all sends in cog methods to free methods and/or pics. */

	/* Cogit>>#unlinkSendsToFree */
void
unlinkSendsToFree(void)
{
    sqInt annotation;
    CogMethod *cogMethod;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;

	if (!(methodZoneBase)) {
		return;
	}
	codeModified = 0;
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			/* begin mapFor:performUntil:arg: */
			mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
				? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
				: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
			while (((mapByte = byteAt(map))) != MapEnd) {
				if (mapByte >= FirstAnnotation) {

					/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
					mcpc += (mapByte & DisplacementMask);
					if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
					 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
						annotation += mapByte & DisplacementMask;
						map -= 1;
					}
					result = unlinkIfLinkedSendToFreepcignored(annotation, (((char *) mcpc)), 0);
					if (result != 0) {
						goto l2;
					}
				}
				else {
					if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
						mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
					}
				}
				map -= 1;
			}
	l2:	/* end mapFor:performUntil:arg: */;
		}
		else {
			if (((cogMethod->cmType)) == CMClosedPIC) {
				assert(noTargetsFreeInClosedPIC(cogMethod));
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	if (codeModified) {

		/* After possibly updating inline caches we need to flush the icache. */
		flushICacheFromto(processor, ((usqInt)methodZoneBase), ((usqInt)(limitZony())));
	}
}


/*	Unlink all sends in cog methods to a particular target method.
	If targetMethodObject isn't actually a method (perhaps being
	used via invokeAsMethod) then there's nothing to do. */

	/* Cogit>>#unlinkSendsTo:andFreeIf: */
void
unlinkSendsToandFreeIf(sqInt targetMethodObject, sqInt freeIfTrue)
{
    sqInt annotation;
    CogMethod *cogMethod;
    sqInt freedPIC;
    usqInt map;
    sqInt mapByte;
    sqInt mcpc;
    sqInt result;
    CogMethod *targetMethod;

	if (!((isOopCompiledMethod(targetMethodObject))
		 && (methodHasCogMethod(targetMethodObject)))) {
		return;
	}
	targetMethod = cogMethodOf(targetMethodObject);
	if (!(methodZoneBase)) {
		return;
	}
	codeModified = (freedPIC = 0);
	cogMethod = ((CogMethod *) methodZoneBase);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			/* begin mapFor:performUntil:arg: */
			mcpc = ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)
				? (((usqInt)cogMethod)) + cbNoSwitchEntryOffset
				: (((usqInt)cogMethod)) + cmNoCheckEntryOffset);
			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
			while (((mapByte = byteAt(map))) != MapEnd) {
				if (mapByte >= FirstAnnotation) {

					/* If this is an IsSendCall annotation, peek ahead for an IsAnnotationExtension, and consume it. */
					mcpc += (mapByte & DisplacementMask);
					if ((((annotation = ((usqInt) mapByte) >> AnnotationShift)) == IsSendCall)
					 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
						annotation += mapByte & DisplacementMask;
						map -= 1;
					}
					result = unlinkIfLinkedSendpcto(annotation, (((char *) mcpc)), (((sqInt)targetMethod)));
					if (result != 0) {
						goto l2;
					}
				}
				else {
					if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
						mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
					}
				}
				map -= 1;
			}
	l2:	/* end mapFor:performUntil:arg: */;
		}
		else {
			if ((((cogMethod->cmType)) == CMClosedPIC)
			 && (cPICHasTarget(cogMethod, targetMethod))) {
				freeMethod(cogMethod);
				freedPIC = 1;
			}
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	if (freeIfTrue) {
		freeMethod(targetMethod);
	}
	if (freedPIC) {
		unlinkSendsToFree();
	}
	else {
		if (codeModified) {

			/* After possibly updating inline caches we need to flush the icache. */
			flushICacheFromto(processor, ((usqInt)methodZoneBase), ((usqInt)(limitZony())));
		}
	}
}


/*	Access for the object representations when they need to prepend code to
	trampolines. 
 */
/*	Eliminate stale dependent info. */

	/* Cogit>>#zeroOpcodeIndex */
static void
zeroOpcodeIndex(void)
{
    sqInt i;

	for (i = 0; i < opcodeIndex; i += 1) {
		((abstractOpcodes[i]).dependent = null);
	}
	zeroOpcodeIndexForNewOpcodes();
}


/*	Access for the object representations when they need to prepend code to
	trampolines. 
 */

	/* Cogit>>#zeroOpcodeIndexForNewOpcodes */
static void
zeroOpcodeIndexForNewOpcodes(void)
{
	opcodeIndex = 0;
}

	/* CogMethod>>#counters */
static sqInt NoDbgRegParms
counters(CogMethod * self_in_counters)
{
	return 0;
}

	/* CogMethodZone>>#addAllToYoungReferrers */
void
addAllToYoungReferrers(void)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) baseAddress);
	while (cogMethod < (limitZony())) {
		if ((((cogMethod->cmType)) == CMMethod)
		 || (((cogMethod->cmType)) == CMOpenPIC)) {
			ensureInYoungReferrers(cogMethod);
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
}

	/* CogMethodZone>>#addToOpenPICList: */
static void NoDbgRegParms
addToOpenPICList(CogMethod *anOpenPIC)
{
	assert(((anOpenPIC->cmType)) == CMOpenPIC);
	assert((openPICList == null)
	 || (((openPICList->cmType)) == CMOpenPIC));
	(anOpenPIC->nextOpenPIC = ((usqInt)openPICList));
	openPICList = anOpenPIC;
}

	/* CogMethodZone>>#addToYoungReferrers: */
static void NoDbgRegParms
addToYoungReferrers(CogMethod *cogMethod)
{
	assert(youngReferrers <= limitAddress);
	assert((occurrencesInYoungReferrers(cogMethod)) == 0);
	assert((cogMethod->cmRefersToYoung));
	assert((youngReferrers <= limitAddress)
	 && (youngReferrers >= (limitAddress - (methodCount * BytesPerWord))));
	if (!(asserta((limitAddress - (methodCount * BytesPerWord)) >= mzFreeStart))) {
		error("no room on youngReferrers list");
	}
	youngReferrers -= BytesPerWord;
	longAtput(youngReferrers, ((usqInt)cogMethod));
}

	/* CogMethodZone>>#allocate: */
static usqInt NoDbgRegParms
allocate(sqInt numBytes)
{
    usqInt allocation;
    sqInt roundedBytes;

	roundedBytes = (numBytes + 7) & -8;
	if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) {
		return 0;
	}
	allocation = mzFreeStart;
	mzFreeStart += roundedBytes;
	methodCount += 1;
	return allocation;
}


/*	Free all methods */

	/* CogMethodZone>>#clearCogCompiledCode */
static void
clearCogCompiledCode(void)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) baseAddress);
	while ((((usqInt)cogMethod)) < mzFreeStart) {
		if (((cogMethod->cmType)) == CMMethod) {
			freeMethod(cogMethod);
		}
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	manageFromto(baseAddress, limitAddress);
}

	/* CogMethodZone>>#compactCompiledCode */
static void
compactCompiledCode(void)
{
    unsigned short bytes;
    CogMethod *dest;
    sqLong objectHeaderValue;
    CogMethod *source;

	compactionInProgress = 1;
	objectHeaderValue = nullHeaderForMachineCodeMethod();
	source = ((CogMethod *) baseAddress);
	voidOpenPICList();
	methodCount = 0;
	while ((source < (limitZony()))
	 && (((source->cmType)) != CMFree)) {
		assert((cogMethodDoesntLookKosher(source)) == 0);
		(source->objectHeader = objectHeaderValue);
		if (((source->cmUsageCount)) > 0) {
			(source->cmUsageCount = ((source->cmUsageCount)) / 2);
		}
		if (((source->cmType)) == CMOpenPIC) {
			addToOpenPICList(source);
		}
		methodCount += 1;
		source = ((CogMethod *) (roundUpLength((((sqInt)source)) + ((source->blockSize)))));
	}
	if (source >= (limitZony())) {
		haltmsg("no free methods; cannot compact.");
		return;
	}
	dest = source;
	while (source < (limitZony())) {
		assert((maybeFreeCogMethodDoesntLookKosher(source)) == 0);
		bytes = (source->blockSize);
		if (((source->cmType)) != CMFree) {
			methodCount += 1;
			memmove(dest, source, bytes);
			(dest->objectHeader = objectHeaderValue);
			if (((dest->cmType)) == CMMethod) {

				/* For non-Newspeak there should be a one-to-one mapping between bytecoded and
				   cog methods.  For Newspeak not necessarily, but only for anonymous accessors. */
				/* Only update the original method's header if it is referring to this CogMethod. */
				if ((((sqInt)(rawHeaderOf((dest->methodObject))))) == (((sqInt)source))) {
					rawHeaderOfput((dest->methodObject), ((sqInt)dest));
				}
				else {
					assert((noAssertMethodClassAssociationOf((dest->methodObject))) == (nilObject()));
									}
			}
			else {
				if (((dest->cmType)) == CMOpenPIC) {
					addToOpenPICList(dest);
				}
			}
			if (((dest->cmUsageCount)) > 0) {
				(dest->cmUsageCount = ((dest->cmUsageCount)) / 2);
			}
			dest = ((CogMethod *) ((((usqInt)dest)) + bytes));
		}
		source = ((CogMethod *) ((((usqInt)source)) + bytes));
	}
	mzFreeStart = ((usqInt)dest);
	methodBytesFreedSinceLastCompaction = 0;
	compactionInProgress = 0;
}

	/* CogMethodZone>>#ensureInYoungReferrers: */
static void NoDbgRegParms
ensureInYoungReferrers(CogMethod *cogMethod)
{
	if (!((cogMethod->cmRefersToYoung))) {
		assert((occurrencesInYoungReferrers(cogMethod)) == 0);
		(cogMethod->cmRefersToYoung = 1);
		addToYoungReferrers(cogMethod);
	}
}

	/* CogMethodZone>>#followForwardedLiteralsInOpenPICList */
static void
followForwardedLiteralsInOpenPICList(void)
{
    CogMethod *openPIC;

	openPIC = openPICList;
	while (openPIC != null) {
		followForwardedLiteralsIn(openPIC);
		openPIC = ((CogMethod *) ((openPIC->nextOpenPIC)));
	}
}

	/* CogMethodZone>>#freeMethod: */
void
freeMethod(CogMethod *cogMethod)
{
	assert(((cogMethod->cmType)) != CMFree);
	assert((cogMethodDoesntLookKosher(cogMethod)) == 0);
	if (((cogMethod->cmType)) == CMMethod) {

		/* For non-Newspeak there should ne a one-to-one mapping between bytecoded and
		   cog methods.  For Newspeak not necessarily, but only for anonymous accessors. */
		/* Only reset the original method's header if it is referring to this CogMethod. */
		if ((((sqInt)(rawHeaderOf((cogMethod->methodObject))))) == (((sqInt)cogMethod))) {
			rawHeaderOfput((cogMethod->methodObject), (cogMethod->methodHeader));
					}
		else {
			assert((noAssertMethodClassAssociationOf((cogMethod->methodObject))) == (nilObject()));
					}
	}
	if (((cogMethod->cmType)) == CMOpenPIC) {
		removeFromOpenPICList(cogMethod);
	}
	(cogMethod->cmRefersToYoung = 0);
	(cogMethod->cmType = CMFree);
	methodBytesFreedSinceLastCompaction += (cogMethod->blockSize);
}


/*	Free methods, preferring older methods for compaction, up to some
	fraction, currently a quarter.
 */

	/* CogMethodZone>>#freeOlderMethodsForCompaction */
static void
freeOlderMethodsForCompaction(void)
{
    sqInt amountToFree;
    CogMethod *cogMethod;
    sqInt freeableUsage;
    sqInt freedSoFar;
    sqInt initialFreeSpace;
    sqInt zoneSize;

	zoneSize = limitAddress - baseAddress;
	initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction;
	freedSoFar = initialFreeSpace;

	/* 4 needs to be e.g. a start-up parameter */
	amountToFree = zoneSize / 4;
	freeableUsage = 0;
	do {
		cogMethod = ((CogMethod *) baseAddress);
		while (((((usqInt)cogMethod)) < mzFreeStart)
		 && (freedSoFar < amountToFree)) {
			if ((((cogMethod->cmType)) != CMFree)
			 && (((cogMethod->cmUsageCount)) <= freeableUsage)) {
				freeMethod(cogMethod);
				freedSoFar += (cogMethod->blockSize);
			}
			cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
		}
	} while((freedSoFar < amountToFree)
		 && (((freeableUsage += 1)) < CMMaxUsageCount));
}


/*	Answer that all entries in youngReferrers are in-use and have the
	cmRefersToYoung flag set.
	Used to check that the youngreferrers pruning routines work correctly. */

	/* CogMethodZone>>#kosherYoungReferrers */
static sqInt
kosherYoungReferrers(void)
{
    CogMethod *cogMethod;
    usqInt pointer;

	if ((youngReferrers > limitAddress)
	 || (youngReferrers < mzFreeStart)) {
		return 0;
	}
	pointer = youngReferrers;
	while (pointer < limitAddress) {
		cogMethod = ((CogMethod *) (longAt(pointer)));
		if (!((((cogMethod->cmType)) != CMFree)
			 && ((cogMethod->cmRefersToYoung)))) {
			return 0;
		}
		pointer += BytesPerWord;
	}
	return 1;
}

	/* CogMethodZone>>#manageFrom:to: */
static void NoDbgRegParms
manageFromto(sqInt theStartAddress, sqInt theLimitAddress)
{
	mzFreeStart = (baseAddress = theStartAddress);
	youngReferrers = (limitAddress = theLimitAddress);
	openPICList = null;
	methodBytesFreedSinceLastCompaction = 0;
	methodCount = 0;
}

	/* CogMethodZone>>#methodFor: */
CogMethod *
methodFor(void *address)
{
    CogMethod *cogMethod;
    CogMethod *nextMethod;

	cogMethod = ((CogMethod *) baseAddress);
	while ((cogMethod < (limitZony()))
	 && ((((usqInt)cogMethod)) <= (((usqInt)address)))) {
		/* begin methodAfter: */
		nextMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
		if (nextMethod == cogMethod) {
			return 0;
		}
		if (((((usqInt)address)) >= (((usqInt)cogMethod)))
		 && ((((usqInt)address)) < (((usqInt)nextMethod)))) {
			return cogMethod;
		}
		cogMethod = nextMethod;
	}
	return 0;
}

	/* CogMethodZone>>#methodsCompiledToMachineCodeInto: */
sqInt
methodsCompiledToMachineCodeInto(sqInt arrayObj)
{
    CogMethod *cogMethod;
    sqInt methodIndex;

	methodIndex = 0;
	cogMethod = ((CogMethod *) baseAddress);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == CMMethod) {
			storePointerUncheckedofObjectwithValue(methodIndex, arrayObj, (cogMethod->methodObject));
			methodIndex += 1;
		}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	return methodIndex;
}

	/* CogMethodZone>>#numMethods */
sqInt
numMethods(void)
{
	return methodCount;
}

	/* CogMethodZone>>#numMethodsOfType: */
sqInt
numMethodsOfType(sqInt cogMethodType)
{
    CogMethod *cogMethod;
    sqInt n;

	n = 0;
	cogMethod = ((CogMethod *) baseAddress);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == cogMethodType) {
			n += 1;
		}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	return n;
}

	/* CogMethodZone>>#occurrencesInYoungReferrers: */
static sqInt NoDbgRegParms
occurrencesInYoungReferrers(CogMethod *cogMethod)
{
    sqInt count;
    usqInt pointer;

	assert(youngReferrers <= limitAddress);
	count = 0;
	pointer = youngReferrers;
	while (pointer < limitAddress) {
		if ((((sqInt)cogMethod)) == (longAt(pointer))) {
			count += 1;
		}
		pointer += BytesPerWord;
	}
	return count;
}

	/* CogMethodZone>>#openPICWithSelector: */
static CogMethod * NoDbgRegParms
openPICWithSelector(sqInt aSelector)
{
    CogMethod *openPIC;

	openPIC = openPICList;
	do {
		if ((openPIC == null)
		 || (((openPIC->selector)) == aSelector)) {
			return openPIC;
		}
		openPIC = ((CogMethod *) ((openPIC->nextOpenPIC)));
	} while(1);
	return 0;
}


/*	Some methods have been freed. Compute how much each survivor needs to
	move during the ensuing compaction and record it in the objectHeader
	field. 
	For Sista, where we want PICs to last so they can be observed, we need to
	keep PICs unless
	they are definitely unused. So we need to identify unused PICs. So in
	planCompact, zero the
	usage counts of all PICs, saving the actual usage count in
	blockEntryOffset. Then in
	relocateMethodsPreCompaction (actually in
	relocateIfCallOrMethodReference:mcpc:delta:) restore the usage counts of
	used PICs. Finally in compactCompiledCode, clear the blockEntryOffset
	of the unused PICs; they will then have a zero count and be reclaimed in
	the next code compaction. */

	/* CogMethodZone>>#planCompaction */
static void
planCompaction(void)
{
    CogMethod *cogMethod;
    sqInt delta;

	delta = 0;
	cogMethod = ((CogMethod *) baseAddress);
	while ((((usqInt)cogMethod)) < mzFreeStart) {
		if (((cogMethod->cmType)) == CMFree) {
			delta -= (cogMethod->blockSize);
		}
		else {
			assert((cogMethodDoesntLookKosher(cogMethod)) == 0);
			(cogMethod->objectHeader = delta);
					}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
}

	/* CogMethodZone>>#printCogMethods */
void
printCogMethods(void)
{
    CogMethod *cogMethod;
    sqInt nc;
    sqInt nf;
    sqInt nm;
    sqInt no;
    sqInt nu;

	nm = (nc = (no = (nf = (nu = 0))));
	cogMethod = ((CogMethod *) baseAddress);
	while (cogMethod < (limitZony())) {
		printCogMethod(cogMethod);
		
		switch ((cogMethod->cmType)) {
		case CMFree:
			nf += 1;
			break;
		case CMMethod:
			nm += 1;
			break;
		case CMClosedPIC:
			nc += 1;
			break;
		case CMOpenPIC:
			no += 1;
			break;
		default:
			nu += 1;

		}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	print("CMMethod ");
	printNum(nm);
	print(" CMClosedPIC ");
	printNum(nc);
	print(" CMOpenPIC ");
	printNum(no);
	print(" CMFree ");
	printNum(nf);
	if (nu > 0) {
		print(" UNKNOWN ");
		printNum(nu);
	}
	print(" total ");
	printNum((((nm + nc) + no) + nf) + nu);
	cr();
}

	/* CogMethodZone>>#printCogMethodsOfType: */
void
printCogMethodsOfType(sqInt cmType)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) baseAddress);
	while (cogMethod < (limitZony())) {
		if (((cogMethod->cmType)) == cmType) {
			printCogMethod(cogMethod);
		}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
}

	/* CogMethodZone>>#printCogMethodsWithMethod: */
void
printCogMethodsWithMethod(sqInt methodOop)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) baseAddress);
	while (cogMethod < (limitZony())) {
		if ((((cogMethod->cmType)) != CMFree)
		 && (((cogMethod->methodObject)) == methodOop)) {
			printCogMethod(cogMethod);
		}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
}

	/* CogMethodZone>>#printCogMethodsWithPrimitive: */
void
printCogMethodsWithPrimitive(sqInt primIdx)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) baseAddress);
	while (cogMethod < (limitZony())) {
		if ((((cogMethod->cmType)) == CMMethod)
		 && (primIdx == (primitiveIndexOfMethodheader((cogMethod->methodObject), (cogMethod->methodHeader))))) {
			printCogMethod(cogMethod);
		}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
}

	/* CogMethodZone>>#printCogMethodsWithSelector: */
void
printCogMethodsWithSelector(sqInt selectorOop)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) baseAddress);
	while (cogMethod < (limitZony())) {
		if ((((cogMethod->cmType)) != CMFree)
		 && (((cogMethod->selector)) == selectorOop)) {
			printCogMethod(cogMethod);
		}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
}

	/* CogMethodZone>>#printCogYoungReferrers */
void
printCogYoungReferrers(void)
{
    CogMethod *cogMethod;
    usqInt pointer;

	pointer = youngReferrers;
	while (pointer < limitAddress) {
		cogMethod = ((CogMethod *) (longAt(pointer)));
		if (!((cogMethod->cmRefersToYoung))) {
			print("*");
		}
		if (((cogMethod->cmType)) == CMFree) {
			print("!");
		}
		if (!(((cogMethod->cmRefersToYoung))
			 && (((cogMethod->cmType)) != CMFree))) {
			print(" ");
		}
		printCogMethod(cogMethod);
		pointer += BytesPerWord;
	}
}

	/* CogMethodZone>>#printOpenPICList */
sqInt
printOpenPICList(void)
{
    sqInt n;
    CogMethod *openPIC;

	n = 0;
	openPIC = openPICList;
	while (!(openPIC == null)) {
		n += 1;
		printCogMethod(openPIC);
		openPIC = ((CogMethod *) ((openPIC->nextOpenPIC)));
	}
	return n;
}

	/* CogMethodZone>>#pruneYoungReferrers */
static sqInt
pruneYoungReferrers(void)
{
    usqInt dest;
    usqInt next;
    usqInt source;

	assert(youngReferrers <= limitAddress);
	if (youngReferrers == limitAddress) {
		return null;
	}
	dest = limitAddress;
	while (1) {
		next = dest - BytesPerWord;
		if (!((next >= youngReferrers)
		 && (((((CogMethod *) (longAt(next))))->cmRefersToYoung)))) break;
		dest = next;
	}
	assert(dest >= youngReferrers);
	source = dest - BytesPerWord;
	while (source >= youngReferrers) {
		if (((((CogMethod *) (longAt(source))))->cmRefersToYoung)) {
			assert(source < (dest - BytesPerWord));
			longAtput((dest -= BytesPerWord), longAt(source));
		}
		source -= BytesPerWord;
	}
	youngReferrers = dest;
	assert(kosherYoungReferrers());
	return 0;
}

	/* CogMethodZone>>#relocateAndPruneYoungReferrers */
static sqInt
relocateAndPruneYoungReferrers(void)
{
    CogMethod *cogMethod;
    usqInt dest;
    usqInt next;
    usqInt source;

	assert(youngReferrers <= limitAddress);
	if (youngReferrers == limitAddress) {
		return null;
	}
	dest = limitAddress;
	while (1) {
		next = dest - BytesPerWord;
		if (!((next >= youngReferrers)
		 && (((((cogMethod = ((CogMethod *) (longAt(next))))->cmType)) != CMFree)
		 && ((cogMethod->cmRefersToYoung))))) break;
		if (((cogMethod->objectHeader)) != 0) {
			longAtput(next, (((sqInt)cogMethod)) + ((cogMethod->objectHeader)));
		}
		dest = next;
	}
	assert(dest >= youngReferrers);
	source = dest - BytesPerWord;
	while (source >= youngReferrers) {
		cogMethod = ((CogMethod *) (longAt(source)));
		if ((((cogMethod->cmType)) != CMFree)
		 && ((cogMethod->cmRefersToYoung))) {
			assert(source < (dest - BytesPerWord));
			if (((cogMethod->objectHeader)) != 0) {
				cogMethod = ((CogMethod *) ((((sqInt)cogMethod)) + (((sqInt)((cogMethod->objectHeader))))));
			}
			longAtput((dest -= BytesPerWord), ((sqInt)cogMethod));
		}
		source -= BytesPerWord;
	}
	youngReferrers = dest;
	return 0;
}


/*	All surviving methods have had the amount they are going to relocate by
	stored in their objectHeader fields. Relocate all relative calls so that
	after the compaction of both the method containing each call and the call
	target the calls invoke the same target. */

	/* CogMethodZone>>#relocateMethodsPreCompaction */
static sqInt
relocateMethodsPreCompaction(void)
{
    CogMethod *cogMethod;

	cogMethod = ((CogMethod *) baseAddress);
	while ((((usqInt)cogMethod)) < mzFreeStart) {
		if (((cogMethod->cmType)) != CMFree) {
			if (((cogMethod->cmType)) == CMClosedPIC) {
				relocateCallsInClosedPIC(cogMethod);
			}
			else {
				relocateCallsAndSelfReferencesInMethod(cogMethod);
			}
		}
		/* begin methodAfter: */
		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
	}
	relocateAndPruneYoungReferrers();
	return 1;
}

	/* CogMethodZone>>#removeFromOpenPICList: */
static sqInt NoDbgRegParms
removeFromOpenPICList(CogMethod *anOpenPIC)
{
    CogMethod *prevPIC;

	assert(((anOpenPIC->cmType)) == CMOpenPIC);
	if (!(openPICList)) {
		return null;
	}
	assert((((openPICList->cmType)) == CMOpenPIC)
	 && ((((openPICList->nextOpenPIC)) == null)
	 || ((((((CogMethod *) ((openPICList->nextOpenPIC))))->cmType)) == CMOpenPIC)));
	if (anOpenPIC == openPICList) {

		/* N.B. Use self rather than coInterpreter to avoid attempting to cast nil.
		   Conversion to CogMethod done in the nextOpenPIC accessor. */
		openPICList = ((CogMethod *) ((anOpenPIC->nextOpenPIC)));
		return null;
	}
	prevPIC = openPICList;
	do {
		assert((prevPIC != null)
		 && (((prevPIC->cmType)) == CMOpenPIC));
		if (((prevPIC->nextOpenPIC)) == (((usqInt)anOpenPIC))) {
			(prevPIC->nextOpenPIC = (anOpenPIC->nextOpenPIC));
			return null;
		}
		prevPIC = ((CogMethod *) ((prevPIC->nextOpenPIC)));
	} while(1);
	return 0;
}

	/* CogMethodZone>>#voidOpenPICList */
static void
voidOpenPICList(void)
{
	openPICList = null;
}

	/* CogMethodZone>>#voidYoungReferrersPostTenureAll */
static void
voidYoungReferrersPostTenureAll(void)
{
    CogMethod *cogMethod;
    usqInt pointer;

	assert(youngReferrers <= limitAddress);
	pointer = youngReferrers;
	while (pointer < limitAddress) {
		cogMethod = ((CogMethod *) (longAt(pointer)));
		if (((cogMethod->cmType)) != CMFree) {
			(cogMethod->cmRefersToYoung = 0);
		}
		pointer += BytesPerWord;
	}
	youngReferrers = limitAddress;
}

	/* CogMethodZone>>#whereIsMaybeCodeThing: */
char *
whereIsMaybeCodeThing(sqInt anOop)
{
	if (oopisGreaterThanOrEqualToandLessThan(anOop, codeBase, limitAddress)) {
		if (oopisLessThan(anOop, methodZoneBase)) {
			return " is in generated runtime";
		}
		if (oopisLessThan(anOop, mzFreeStart)) {
			return " is in generated methods";
		}
		if (oopisLessThan(anOop, youngReferrers)) {
			return " is in code zone";
		}
		return " is in young referrers";
	}
	return null;
}

	/* CogObjectRepresentation>>#checkValidObjectReference: */
static sqInt NoDbgRegParms
checkValidObjectReference(sqInt anOop)
{
	return (!(isImmediate(anOop)))
	 && ((heapMapAtWord(pointerForOop(anOop))) != 0);
}

	/* CogObjectRepresentation>>#genCmpClassFloatCompactIndexR: */
static AbstractInstruction * NoDbgRegParms
genCmpClassFloatCompactIndexR(sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, ClassFloatCompactIndex, reg);
	return anInstruction;
}

	/* CogObjectRepresentation>>#genCmpClassMethodContextCompactIndexR: */
static AbstractInstruction * NoDbgRegParms
genCmpClassMethodContextCompactIndexR(sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, reg);
	return anInstruction;
}

	/* CogObjectRepresentation>>#genDoubleArithmetic:preOpCheck: */
static sqInt NoDbgRegParms
genDoubleArithmeticpreOpCheck(sqInt arithmeticOperator, AbstractInstruction *(*preOpCheckOrNil)(int rcvrReg, int argReg))
{
    AbstractInstruction *doOp;
    AbstractInstruction *jumpFailAlloc;
    AbstractInstruction *jumpFailCheck;
    AbstractInstruction *jumpFailClass;
    AbstractInstruction *jumpImmediate;
    AbstractInstruction *jumpNonInt;

	jumpFailCheck = ((AbstractInstruction *) 0);
	jumpNonInt = ((AbstractInstruction *) 0);
	if (!(processorHasDoublePrecisionFloatingPointSupport())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	genGetDoubleValueOfinto(ReceiverResultReg, DPFPReg0);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ClassReg);
	jumpImmediate = genJumpImmediate(Arg0Reg);
	genGetCompactClassIndexNonImmOfinto(Arg0Reg, SendNumArgsReg);
	genCmpClassFloatCompactIndexR(SendNumArgsReg);
	/* begin JumpNonZero: */
	jumpFailClass = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genGetDoubleValueOfinto(Arg0Reg, DPFPReg1);
	/* begin Label */
	doOp = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	if (!(preOpCheckOrNil == null)) {
		jumpFailCheck = preOpCheckOrNil(DPFPReg0, DPFPReg1);
	}
	genoperandoperand(arithmeticOperator, DPFPReg1, DPFPReg0);
	jumpFailAlloc = genAllocFloatValueintoscratchRegscratchReg(DPFPReg0, SendNumArgsReg, ClassReg, TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SendNumArgsReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpImmediate, genoperandoperand(Label, (labelCounter += 1), bytecodePC));

	/* maybeGenConvertIfSmallFloatIn:scratchReg:into:andJumpTo: */
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNonInt = genJumpNotSmallInteger(Arg0Reg);
	genConvertSmallIntegerToIntegerInReg(ClassReg);
	/* begin ConvertR:Rd: */
	genoperandoperand(ConvertRRd, ClassReg, DPFPReg1);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)doOp));
	jmpTarget(jumpFailAlloc, jmpTarget(jumpFailClass, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	jmpTarget(jumpNonInt, ((AbstractInstruction *) (((jumpFailClass->operands))[0])));
	if (!(preOpCheckOrNil == null)) {
		jmpTarget(jumpFailCheck, ((AbstractInstruction *) (((jumpFailClass->operands))[0])));
	}
	return 0;
}

	/* CogObjectRepresentation>>#genDoubleComparison:invert: */
static sqInt NoDbgRegParms
genDoubleComparisoninvert(AbstractInstruction * NoDbgRegParms (*jumpOpcodeGenerator)(void *), sqInt invertComparison)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *compare;
    sqInt constant;
    AbstractInstruction *jumpCond;
    AbstractInstruction *jumpFail;
    AbstractInstruction *jumpImmediate;
    AbstractInstruction *jumpNonInt;

	jumpNonInt = ((AbstractInstruction *) 0);
	if (!(processorHasDoublePrecisionFloatingPointSupport())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	genGetDoubleValueOfinto(ReceiverResultReg, DPFPReg0);
	jumpImmediate = genJumpImmediate(Arg0Reg);
	genGetCompactClassIndexNonImmOfinto(Arg0Reg, SendNumArgsReg);
	genCmpClassFloatCompactIndexR(SendNumArgsReg);
	/* begin JumpNonZero: */
	jumpFail = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genGetDoubleValueOfinto(Arg0Reg, DPFPReg1);
	if (invertComparison) {

		/* May need to invert for NaNs */
		/* begin CmpRd:Rd: */
		compare = genoperandoperand(CmpRdRd, DPFPReg0, DPFPReg1);
	}
	else {
		/* begin CmpRd:Rd: */
		compare = genoperandoperand(CmpRdRd, DPFPReg1, DPFPReg0);
	}

	/* FP jumps are a little weird */
	jumpCond = jumpOpcodeGenerator(0);
	/* begin genMoveConstant:R: */
	constant = falseObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpCond, genMoveConstantR(trueObject(), ReceiverResultReg));
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpImmediate, genoperandoperand(Label, (labelCounter += 1), bytecodePC));

	/* maybeGenConvertIfSmallFloatIn:scratchReg:into:andJumpTo: */
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNonInt = genJumpNotSmallInteger(Arg0Reg);
	genConvertSmallIntegerToIntegerInReg(Arg0Reg);
	/* begin ConvertR:Rd: */
	genoperandoperand(ConvertRRd, Arg0Reg, DPFPReg1);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)compare));
	jmpTarget(jumpFail, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	jmpTarget(jumpNonInt, ((AbstractInstruction *) (((jumpFail->operands))[0])));
	return CompletePrimitive;
}


/*	Get the method header (first word) of a CompiledMethod into headerReg.
	Deal with the method possibly being cogged. */

	/* CogObjectRepresentation>>#genGetMethodHeaderOf:into:scratch: */
static sqInt NoDbgRegParms
genGetMethodHeaderOfintoscratch(sqInt methodReg, sqInt headerReg, sqInt scratchReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *jumpNotCogged;
    sqInt literal;
    sqInt offset;

	/* begin checkQuickConstant:forInstruction: */
	literal = BaseHeaderSize;
	anInstruction = genoperandoperandoperand(MoveMwrR, BaseHeaderSize, methodReg, headerReg);
	jumpNotCogged = genJumpSmallInteger(headerReg);
	/* begin MoveMw:r:R: */
	offset = offsetof(CogMethod, methodHeader);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperandoperand(MoveMwrR, offset, headerReg, headerReg);
	jmpTarget(jumpNotCogged, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}

	/* CogObjectRepresentation>>#genLoadSlot:sourceReg:destReg: */
static sqInt NoDbgRegParms
genLoadSlotsourceRegdestReg(sqInt index, sqInt sourceReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    sqInt literal;

	/* begin checkQuickConstant:forInstruction: */
	literal = (index * BytesPerWord) + BaseHeaderSize;
	anInstruction = genoperandoperandoperand(MoveMwrR, (index * BytesPerWord) + BaseHeaderSize, sourceReg, destReg);
	return 0;
}

	/* CogObjectRepresentation>>#genPrimitiveAdd */
static sqInt
genPrimitiveAdd(void)
{
    AbstractInstruction *jumpNotSI;
    AbstractInstruction *jumpOvfl;

	if (!(mclassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ClassReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	genRemoveSmallIntegerTagsInScratchReg(ClassReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, ReceiverResultReg, ClassReg);
	/* begin JumpOverflow: */
	jumpOvfl = genConditionalBranchoperand(JumpOverflow, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ClassReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpOvfl, jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveAsFloat */
static sqInt
genPrimitiveAsFloat(void)
{
    AbstractInstruction *jumpFailAlloc;

	if (!(processorHasDoublePrecisionFloatingPointSupport())) {
		return UnimplementedPrimitive;
	}
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	/* begin ConvertR:Rd: */
	genoperandoperand(ConvertRRd, TempReg, DPFPReg0);
	jumpFailAlloc = genAllocFloatValueintoscratchRegscratchReg(DPFPReg0, SendNumArgsReg, ClassReg, TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SendNumArgsReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpFailAlloc, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}

	/* CogObjectRepresentation>>#genPrimitiveBitAnd */
static sqInt
genPrimitiveBitAnd(void)
{
    AbstractInstruction *jumpNotSI;

	if (!(mclassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	/* begin AndR:R: */
	genoperandoperand(AndRR, Arg0Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveBitOr */
static sqInt
genPrimitiveBitOr(void)
{
    AbstractInstruction *jumpNotSI;

	if (!(mclassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	/* begin OrR:R: */
	genoperandoperand(OrRR, Arg0Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return CompletePrimitive;
}


/*	rTemp := rArg0
	rClass := tTemp
	rTemp := rTemp & 1
	jz nonInt
	rClass >>= 1
	cmp 0,rClass
	jge neg
	cmp 31,rClass // numSmallIntegerBits, jge for sign
	jge tooBig
	rTemp := rReceiver
	rTemp <<= rClass
	rTemp >>= rClass (arithmetic)
	cmp rTemp,rReceiver
	jnz ovfl
	rReceiver := rReceiver - 1
	rReceiver := rReceiver <<= rClass
	rReceiver := rReceiver + 1
	ret
	neg:
	rClass := 0 - rClass
	cmp 31,rClass // numSmallIntegerBits
	jge inRange
	rClass := 31
	inRange
	rReceiver := rReceiver >>= rClass.
	rReceiver := rReceiver | smallIntegerTags.
	ret
	ovfl
	tooBig
	nonInt:
	fail
 */

	/* CogObjectRepresentation>>#genPrimitiveBitShift */
static sqInt
genPrimitiveBitShift(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *jumpInRange;
    AbstractInstruction *jumpNegative;
    AbstractInstruction *jumpNotSI;
    AbstractInstruction *jumpOvfl;
    AbstractInstruction *jumpTooBig;

	if (!(mclassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ClassReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	genConvertSmallIntegerToIntegerInReg(ClassReg);
	if (!(setsConditionCodesFor(lastOpcode(), JumpNegative))) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(CmpCqR, 0, ClassReg);
	}
	/* begin JumpNegative: */
	jumpNegative = genConditionalBranchoperand(JumpNegative, ((sqInt)0));
	/* begin CmpCq:R: */
	anInstruction1 = genoperandoperand(CmpCqR, 0x1F /* numSmallIntegerBits */, ClassReg);
	/* begin JumpGreaterOrEqual: */
	jumpTooBig = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
	/* begin LogicalShiftLeftR:R: */
	genoperandoperand(LogicalShiftLeftRR, ClassReg, TempReg);
	/* begin ArithmeticShiftRightR:R: */
	genoperandoperand(ArithmeticShiftRightRR, ClassReg, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, TempReg, ReceiverResultReg);
	/* begin JumpNonZero: */
	jumpOvfl = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genRemoveSmallIntegerTagsInScratchReg(ReceiverResultReg);
	/* begin LogicalShiftLeftR:R: */
	genoperandoperand(LogicalShiftLeftRR, ClassReg, ReceiverResultReg);
	genAddSmallIntegerTagsTo(ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNegative, genoperand(NegateR, ClassReg));
	/* begin CmpCq:R: */
	anInstruction2 = genoperandoperand(CmpCqR, 0x1F /* numSmallIntegerBits */, ClassReg);
	/* begin JumpLessOrEqual: */
	jumpInRange = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0));
	/* begin MoveCq:R: */
	anInstruction3 = genoperandoperand(MoveCqR, 0x1F /* numSmallIntegerBits */, ClassReg);
	jmpTarget(jumpInRange, genoperandoperand(ArithmeticShiftRightRR, ClassReg, ReceiverResultReg));
	genClearAndSetSmallIntegerTagsIn(ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNotSI, jmpTarget(jumpTooBig, jmpTarget(jumpOvfl, genoperandoperand(Label, (labelCounter += 1), bytecodePC))));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveBitXor */
static sqInt
genPrimitiveBitXor(void)
{
    AbstractInstruction *jumpNotSI;

	if (!(mclassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	genRemoveSmallIntegerTagsInScratchReg(Arg0Reg);
	/* begin XorR:R: */
	genoperandoperand(XorRR, Arg0Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveClass */
static sqInt
genPrimitiveClass(void)
{
    sqInt reg;
    sqInt reg1;

	reg = ReceiverResultReg;
	if (methodOrBlockNumArgs > 0) {
		if (methodOrBlockNumArgs > 1) {
			return UnimplementedPrimitive;
		}
		/* begin genLoadArgAtDepth:into: */
		reg1 = (reg = Arg0Reg);
		assert(0 < (numRegArgs()));
	}
	if ((genGetClassObjectOfintoscratchReginstRegIsReceiver(reg, ReceiverResultReg, TempReg, reg == ReceiverResultReg)) == BadRegisterSet) {
		genGetClassObjectOfintoscratchReginstRegIsReceiver(reg, ClassReg, TempReg, reg == ReceiverResultReg);
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, ClassReg, ReceiverResultReg);
	}
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	return UnfailingPrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveDiv */
static sqInt
genPrimitiveDiv(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *convert;
    AbstractInstruction *jumpExact;
    AbstractInstruction *jumpIsSI;
    AbstractInstruction *jumpNotSI;
    AbstractInstruction *jumpSameSign;
    AbstractInstruction *jumpZero;

	if (!(processorHasDivQuoRemAndMClassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ClassReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, Arg1Reg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
	if (!(setsConditionCodesFor(lastOpcode(), JumpZero))) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(CmpCqR, 0, ClassReg);
	}
	/* begin JumpZero: */
	jumpZero = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
	genShiftAwaySmallIntegerTagsInScratchReg(TempReg);
	gDivRRQuoRem(ClassReg, TempReg, TempReg, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, 0, ClassReg);
	/* begin JumpZero: */
	jumpExact = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin XorR:R: */
	genoperandoperand(XorRR, ClassReg, Arg1Reg);
	if (!(setsConditionCodesFor(lastOpcode(), JumpZero))) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(CmpCqR, 0, Arg1Reg);
	}
	/* begin JumpGreaterOrEqual: */
	jumpSameSign = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(SubCqR, 1, TempReg);
	jmpTarget(jumpSameSign, (convert = genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	genConvertIntegerToSmallIntegerInReg(TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpExact, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	jumpIsSI = genJumpIsSmallIntegerValuescratch(TempReg, Arg1Reg);
	jmpTarget(jumpIsSI, convert);
	jmpTarget(jumpZero, jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveDivide */
static sqInt
genPrimitiveDivide(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *jumpInexact;
    AbstractInstruction *jumpNotSI;
    AbstractInstruction *jumpOverflow;
    AbstractInstruction *jumpZero;

	if (!(processorHasDivQuoRemAndMClassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ClassReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
	/* begin JumpZero: */
	jumpZero = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
	genShiftAwaySmallIntegerTagsInScratchReg(TempReg);
	gDivRRQuoRem(ClassReg, TempReg, TempReg, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, 0, ClassReg);
	/* begin JumpNonZero: */
	jumpInexact = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	jumpOverflow = genJumpNotSmallIntegerValuescratch(TempReg, Arg1Reg);
	genConvertIntegerToSmallIntegerInReg(TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpOverflow, jmpTarget(jumpInexact, jmpTarget(jumpZero, jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveEqual */
static sqInt
genPrimitiveEqual(void)
{
	return genSmallIntegerComparisonorDoubleComparisoninvert(JumpZero, gJumpFPEqual, 0);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatAdd */
static sqInt
genPrimitiveFloatAdd(void)
{
	return genDoubleArithmeticpreOpCheck(AddRdRd, null);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatDivide */
static sqInt
genPrimitiveFloatDivide(void)
{
	return genDoubleArithmeticpreOpCheck(DivRdRd, genDoubleFailIfZeroArgRcvrarg);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatEqual */
static sqInt
genPrimitiveFloatEqual(void)
{
	return genDoubleComparisoninvert(gJumpFPEqual, 0);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatGreaterOrEqual */
static sqInt
genPrimitiveFloatGreaterOrEqual(void)
{
	return genDoubleComparisoninvert(gJumpFPGreaterOrEqual, 0);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatGreaterThan */
static sqInt
genPrimitiveFloatGreaterThan(void)
{
	return genDoubleComparisoninvert(gJumpFPGreater, 0);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatLessOrEqual */
static sqInt
genPrimitiveFloatLessOrEqual(void)
{
	return genDoubleComparisoninvert(gJumpFPGreaterOrEqual, 1);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatLessThan */
static sqInt
genPrimitiveFloatLessThan(void)
{
	return genDoubleComparisoninvert(gJumpFPGreater, 1);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatMultiply */
static sqInt
genPrimitiveFloatMultiply(void)
{
	return genDoubleArithmeticpreOpCheck(MulRdRd, null);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatNotEqual */
static sqInt
genPrimitiveFloatNotEqual(void)
{
	return genDoubleComparisoninvert(gJumpFPNotEqual, 0);
}

	/* CogObjectRepresentation>>#genPrimitiveFloatSquareRoot */
static sqInt
genPrimitiveFloatSquareRoot(void)
{
    AbstractInstruction *jumpFailAlloc;

	if (!(processorHasDoublePrecisionFloatingPointSupport())) {
		return UnimplementedPrimitive;
	}
	genGetDoubleValueOfinto(ReceiverResultReg, DPFPReg0);
	/* begin SqrtRd: */
	genoperand(SqrtRd, DPFPReg0);
	jumpFailAlloc = genAllocFloatValueintoscratchRegscratchReg(DPFPReg0, SendNumArgsReg, ClassReg, TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SendNumArgsReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpFailAlloc, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}

	/* CogObjectRepresentation>>#genPrimitiveFloatSubtract */
static sqInt
genPrimitiveFloatSubtract(void)
{
	return genDoubleArithmeticpreOpCheck(SubRdRd, null);
}

	/* CogObjectRepresentation>>#genPrimitiveGreaterOrEqual */
static sqInt
genPrimitiveGreaterOrEqual(void)
{
	return genSmallIntegerComparisonorDoubleComparisoninvert(JumpGreaterOrEqual, gJumpFPGreaterOrEqual, 0);
}

	/* CogObjectRepresentation>>#genPrimitiveGreaterThan */
static sqInt
genPrimitiveGreaterThan(void)
{
	return genSmallIntegerComparisonorDoubleComparisoninvert(JumpGreater, gJumpFPGreater, 0);
}

	/* CogObjectRepresentation>>#genPrimitiveIdentical */
static sqInt
genPrimitiveIdentical(void)
{
	return genPrimitiveIdenticalOrNotIf(0);
}

	/* CogObjectRepresentation>>#genPrimitiveLessOrEqual */
static sqInt
genPrimitiveLessOrEqual(void)
{
	return genSmallIntegerComparisonorDoubleComparisoninvert(JumpLessOrEqual, gJumpFPGreaterOrEqual, 1);
}

	/* CogObjectRepresentation>>#genPrimitiveLessThan */
static sqInt
genPrimitiveLessThan(void)
{
	return genSmallIntegerComparisonorDoubleComparisoninvert(JumpLess, gJumpFPGreater, 1);
}

	/* CogObjectRepresentation>>#genPrimitiveMod */
static sqInt
genPrimitiveMod(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *jumpExact;
    AbstractInstruction *jumpNotSI;
    AbstractInstruction *jumpSameSign;
    AbstractInstruction *jumpZero;

	if (!(processorHasDivQuoRemAndMClassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ClassReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	genRemoveSmallIntegerTagsInScratchReg(ClassReg);
	/* begin JumpZero: */
	jumpZero = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ClassReg, Arg1Reg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
	genRemoveSmallIntegerTagsInScratchReg(TempReg);
	gDivRRQuoRem(ClassReg, TempReg, TempReg, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, 0, ClassReg);
	/* begin JumpZero: */
	jumpExact = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin XorR:R: */
	genoperandoperand(XorRR, ClassReg, Arg1Reg);
	if (!(setsConditionCodesFor(lastOpcode(), JumpZero))) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(CmpCqR, 0, Arg1Reg);
	}
	/* begin JumpGreaterOrEqual: */
	jumpSameSign = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
	/* begin XorR:R: */
	genoperandoperand(XorRR, ClassReg, Arg1Reg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg1Reg, ClassReg);
	jmpTarget(jumpSameSign, jmpTarget(jumpExact, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	genSetSmallIntegerTagsIn(ClassReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ClassReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpZero, jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveMultiply */
static sqInt
genPrimitiveMultiply(void)
{
    AbstractInstruction *jumpNotSI;
    AbstractInstruction *jumpOvfl;

	if (!(processorHasMultiplyAndMClassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ClassReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, Arg1Reg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
	genRemoveSmallIntegerTagsInScratchReg(Arg1Reg);
	/* begin MulR:R: */
	genMulRR(backEnd, Arg1Reg, ClassReg);
	/* begin JumpOverflow: */
	jumpOvfl = genConditionalBranchoperand(JumpOverflow, ((sqInt)0));
	genSetSmallIntegerTagsIn(ClassReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ClassReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpOvfl, jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return CompletePrimitive;
}


/*	subclasses override if they can */

	/* CogObjectRepresentation>>#genPrimitiveNewMethod */
static sqInt
genPrimitiveNewMethod(void)
{
	return UnimplementedPrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveNotEqual */
static sqInt
genPrimitiveNotEqual(void)
{
	return genSmallIntegerComparisonorDoubleComparisoninvert(JumpNonZero, gJumpFPNotEqual, 0);
}

	/* CogObjectRepresentation>>#genPrimitiveNotIdentical */
static sqInt
genPrimitiveNotIdentical(void)
{
	return genPrimitiveIdenticalOrNotIf(1);
}

	/* CogObjectRepresentation>>#genPrimitiveQuo */
static sqInt
genPrimitiveQuo(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *convert;
    AbstractInstruction *jumpExact;
    AbstractInstruction *jumpIsSI;
    AbstractInstruction *jumpNotSI;
    AbstractInstruction *jumpZero;

	if (!(processorHasDivQuoRemAndMClassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ClassReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
	if (!(setsConditionCodesFor(lastOpcode(), JumpZero))) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(CmpCqR, 0, ClassReg);
	}
	/* begin JumpZero: */
	jumpZero = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
	genShiftAwaySmallIntegerTagsInScratchReg(TempReg);
	gDivRRQuoRem(ClassReg, TempReg, TempReg, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, 0, ClassReg);
	/* begin JumpZero: */
	jumpExact = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin Label */
	convert = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	genConvertIntegerToSmallIntegerInReg(TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpExact, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	jumpIsSI = genJumpIsSmallIntegerValuescratch(TempReg, Arg1Reg);
	jmpTarget(jumpIsSI, convert);
	jmpTarget(jumpZero, jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genPrimitiveSubtract */
static sqInt
genPrimitiveSubtract(void)
{
    AbstractInstruction *jumpNotSI;
    AbstractInstruction *jumpOvfl;

	if (!(mclassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, Arg0Reg, TempReg);
	/* begin JumpOverflow: */
	jumpOvfl = genConditionalBranchoperand(JumpOverflow, ((sqInt)0));
	genAddSmallIntegerTagsTo(TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpOvfl, jmpTarget(jumpNotSI, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#genSmallIntegerComparison: */
static sqInt NoDbgRegParms
genSmallIntegerComparison(sqInt jumpOpcode)
{
    AbstractInstruction *anInstruction;
    sqInt constant;
    AbstractInstruction *jumpFail;
    AbstractInstruction *jumpTrue;

	if (!(mclassIsSmallInteger())) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpFail = genJumpNotSmallInteger(Arg0Reg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, ReceiverResultReg);
	jumpTrue = genConditionalBranchoperand(jumpOpcode, 0);
	/* begin genMoveConstant:R: */
	constant = falseObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpTrue, genMoveConstantR(trueObject(), ReceiverResultReg));
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpFail, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return CompletePrimitive;
}


/*	Stack looks like
	return address */

	/* CogObjectRepresentation>>#genSmallIntegerComparison:orDoubleComparison:invert: */
static sqInt NoDbgRegParms
genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction * NoDbgRegParms (*jumpFPOpcodeGenerator)(void *), sqInt invertComparison)
{
    AbstractInstruction *anInstruction;
    sqInt constant;
    AbstractInstruction *jumpCond;
    AbstractInstruction *jumpFail;
    AbstractInstruction *jumpNonInt;
    sqInt r;

	jumpNonInt = ((AbstractInstruction *) 0);
	r = genSmallIntegerComparison(jumpOpcode);
	if (r < 0) {
		return r;
	}
	
#  if defined(DPFPReg0)

	/* Fall through on non-SmallInteger argument.  Argument may be a Float : let us check or fail */
	jumpNonInt = genJumpImmediate(Arg0Reg);
	genGetCompactClassIndexNonImmOfinto(Arg0Reg, SendNumArgsReg);
	genCmpClassFloatCompactIndexR(SendNumArgsReg);
	/* begin JumpNonZero: */
	jumpFail = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genConvertSmallIntegerToIntegerInReg(ReceiverResultReg);
	/* begin ConvertR:Rd: */
	genoperandoperand(ConvertRRd, ReceiverResultReg, DPFPReg0);
	genGetDoubleValueOfinto(Arg0Reg, DPFPReg1);
	if (invertComparison) {

		/* May need to invert for NaNs */
		/* begin CmpRd:Rd: */
		genoperandoperand(CmpRdRd, DPFPReg0, DPFPReg1);
	}
	else {
		/* begin CmpRd:Rd: */
		genoperandoperand(CmpRdRd, DPFPReg1, DPFPReg0);
	}

	/* FP jumps are a little weird */
	jumpCond = jumpFPOpcodeGenerator(0);
	/* begin genMoveConstant:R: */
	constant = falseObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpCond, genMoveConstantR(trueObject(), ReceiverResultReg));
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNonInt, jmpTarget(jumpFail, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
#  endif /* defined(DPFPReg0) */
	return CompletePrimitive;
}

	/* CogObjectRepresentation>>#isUnannotatableConstant: */
static sqInt NoDbgRegParms
isUnannotatableConstant(CogSimStackEntry *simStackEntry)
{
	return (((simStackEntry->type)) == SSConstant)
	 && ((isImmediate((simStackEntry->constant)))
	 || (!(shouldAnnotateObjectReference((simStackEntry->constant)))));
}


/*	Character gets mapped to zero. See inlineCacheTagForInstance:. */

	/* CogObjectRepresentationFor32BitSpur>>#classForInlineCacheTag: */
static sqInt NoDbgRegParms
classForInlineCacheTag(sqInt inlineCacheTag)
{
	return classOrNilAtIndex((inlineCacheTag == 0
		? characterTag()
		: inlineCacheTag));
}

	/* CogObjectRepresentationFor32BitSpur>>#genAddSmallIntegerTagsTo: */
static sqInt NoDbgRegParms
genAddSmallIntegerTagsTo(sqInt aRegister)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AddCqR, 1, aRegister);
	return 0;
}


/*	Set the SmallInteger tag bits when the tag bits may be filled with
	garbage. 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genClearAndSetSmallIntegerTagsIn: */
static sqInt NoDbgRegParms
genClearAndSetSmallIntegerTagsIn(sqInt scratchReg)
{
	return genSetSmallIntegerTagsIn(scratchReg);
}


/*	Convert the Character in reg to a SmallInteger, assuming
	the Character's value is a valid character. */
/*	self assume: objectMemory smallIntegerTag = 1 */

	/* CogObjectRepresentationFor32BitSpur>>#genConvertCharacterToSmallIntegerInReg: */
static void NoDbgRegParms
genConvertCharacterToSmallIntegerInReg(sqInt reg)
{
	assert(((numCharacterBits()) + 1) == (numSmallIntegerBits()));
	/* begin LogicalShiftRightCq:R: */
	genoperandoperand(LogicalShiftRightCqR, 1, reg);
}

	/* CogObjectRepresentationFor32BitSpur>>#genConvertIntegerToSmallIntegerInReg: */
static sqInt NoDbgRegParms
genConvertIntegerToSmallIntegerInReg(sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, 1, reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AddCqR, 1, reg);
	return 0;
}


/*	Convert the SmallInteger in reg to a Character, assuming
	the SmallInteger's value is a valid character. */
/*	self assume: objectMemory smallIntegerTag = 1 */

	/* CogObjectRepresentationFor32BitSpur>>#genConvertSmallIntegerToCharacterInReg: */
static void NoDbgRegParms
genConvertSmallIntegerToCharacterInReg(sqInt reg)
{
	assert(((numCharacterBits()) + 1) == (numSmallIntegerBits()));
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, 1, reg);
}

	/* CogObjectRepresentationFor32BitSpur>>#genConvertSmallIntegerToIntegerInReg: */
static sqInt NoDbgRegParms
genConvertSmallIntegerToIntegerInReg(sqInt reg)
{
	/* begin ArithmeticShiftRightCq:R: */
	genoperandoperand(ArithmeticShiftRightCqR, 1, reg);
	return 0;
}


/*	Fetch the instance's identity hash into destReg, encoded as a
	SmallInteger. 
 */
/*	Get header word in scratchReg */

	/* CogObjectRepresentationFor32BitSpur>>#genGetHashFieldNonImmOf:asSmallIntegerInto: */
static sqInt NoDbgRegParms
genGetHashFieldNonImmOfasSmallIntegerInto(sqInt instReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt quickConstant;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, 4, instReg, destReg);
	/* begin AndCq:R: */
	quickConstant = identityHashHalfWordMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant, destReg);
	genConvertIntegerToSmallIntegerInReg(destReg);
	return 0;
}


/*	Fetch the instance's identity hash into destReg, unencoded. */

	/* CogObjectRepresentationFor32BitSpur>>#genGetHashFieldNonImmOf:into: */
static sqInt NoDbgRegParms
genGetHashFieldNonImmOfinto(sqInt instReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt quickConstant;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, 4, instReg, destReg);
	/* begin AndCq:R: */
	quickConstant = identityHashHalfWordMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant, destReg);
	return 0;
}


/*	Extract the inline cache tag for the object in sourceReg into destReg. The
	inline cache tag for a given object is the value loaded in inline caches
	to distinguish
	objects of different classes. In Spur this is either the tags for
	immediates, (with
	1 & 3 collapsed to 1 for SmallIntegers, and 2 collapsed to 0 for
	Characters), or
	the receiver's classIndex.
	If forEntry is true answer the entry label at which control is to enter
	(cmEntryOffset). If forEntry is false, control enters at the start.
	If forEntry is true, generate something like this:
	Limm:
	andl $0x1, rDest
	j Lcmp
	Lentry:
	movl rSource, rDest
	andl $0x3, rDest
	jnz Limm
	movl 0(%edx), rDest
	andl $0x3fffff, rDest
	Lcmp:
	If forEntry is false, generate something like the following.
	At least on a 2.2GHz Intel Core i7 the following is slightly faster than
	the above,
	136m sends/sec vs 130m sends/sec for nfib in tinyBenchmarks
	Lentry:
	movl rSource, rDest
	andl $0x3, rDest
	jz LnotImm
	andl $1, rDest
	j Lcmp
	LnotImm:
	movl 0(%edx), rDest
	andl $0x3fffff, rDest
	Lcmp:
	But we expect most SmallInteger arithmetic to be performed in-line and so
	prefer the
	version that is faster for non-immediates (because it branches for
	immediates only). */

	/* CogObjectRepresentationFor32BitSpur>>#genGetInlineCacheClassTagFrom:into:forEntry: */
static AbstractInstruction * NoDbgRegParms
genGetInlineCacheClassTagFromintoforEntry(sqInt sourceReg, sqInt destReg, sqInt forEntry)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *entryLabel;
    AbstractInstruction *immLabel;
    AbstractInstruction *jumpCompare;
    AbstractInstruction *jumpNotImm;
    sqInt quickConstant;

	if (forEntry) {
		/* begin AlignmentNops: */
		genoperand(AlignmentNops, BytesPerWord);
		/* begin Label */
		immLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(AndCqR, 1, destReg);
		/* begin Jump: */
		jumpCompare = genoperand(Jump, ((sqInt)0));
		/* begin AlignmentNops: */
		genoperand(AlignmentNops, BytesPerWord);
		/* begin Label */
		entryLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		gAndCqRR(tagMask(), sourceReg, destReg);
		/* begin JumpNonZero: */
		genConditionalBranchoperand(JumpNonZero, ((sqInt)immLabel));
		flag("endianness");
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperandoperand(MoveMwrR, 0, sourceReg, destReg);
		/* begin AndCq:R: */
		quickConstant = classIndexMask();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperand(AndCqR, quickConstant, destReg);
		jmpTarget(jumpCompare, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	}
	else {
		/* begin Label */
		entryLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		gAndCqRR(tagMask(), sourceReg, destReg);
		/* begin JumpZero: */
		jumpNotImm = genConditionalBranchoperand(JumpZero, ((sqInt)0));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction3 = genoperandoperand(AndCqR, 1, destReg);
		/* begin Jump: */
		jumpCompare = genoperand(Jump, ((sqInt)0));
		flag("endianness");
		jmpTarget(jumpNotImm, checkQuickConstantforInstruction(0, genoperandoperandoperand(MoveMwrR, 0, sourceReg, destReg)));
		jmpTarget(jumpCompare, gAndCqR(classIndexMask(), destReg));
	}
	return entryLabel;
}


/*	Get the size in byte-sized slots of the object in srcReg into destReg.
	srcReg may equal destReg.
	destReg <- numSlots << self shiftForWord - (fmt bitAnd: 3).
	Assumes the object in srcReg has a byte format, i.e. 16 to 23 or 24 to 31 */

	/* CogObjectRepresentationFor32BitSpur>>#genGetNumBytesOf:into: */
static sqInt NoDbgRegParms
genGetNumBytesOfinto(sqInt srcReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *jmp;
    sqInt quickConstant;

	genGetRawSlotSizeOfNonImminto(srcReg, destReg);
	/* begin CmpCq:R: */
	quickConstant = numSlotsMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, quickConstant, destReg);
	/* begin JumpLess: */
	jmp = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	genGetOverflowSlotsOfinto(srcReg, destReg);
	jmpTarget(jmp, gLogicalShiftLeftCqR(shiftForWord(), destReg));
	genGetBitsofFormatByteOfinto(3, srcReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, TempReg, destReg);
	return 0;
}

	/* CogObjectRepresentationFor32BitSpur>>#genGetOverflowSlotsOf:into: */
static sqInt NoDbgRegParms
genGetOverflowSlotsOfinto(sqInt srcReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    sqInt literal;

	/* begin checkQuickConstant:forInstruction: */
	literal = -BaseHeaderSize;
	anInstruction = genoperandoperandoperand(MoveMwrR, -BaseHeaderSize, srcReg, destReg);
	return 0;
}


/*	Generate a test for aRegister containing an integer value in the
	SmallInteger range, and a jump if so, answering the jump.
	c.f. Spur32BitMemoryManager>>isIntegerValue: */

	/* CogObjectRepresentationFor32BitSpur>>#genJumpIsSmallIntegerValue:scratch: */
static AbstractInstruction * NoDbgRegParms
genJumpIsSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg)
{
	return (/* begin MoveR:R: */
		genoperandoperand(MoveRR, aRegister, scratchReg),
		/* begin LogicalShiftLeftCq:R: */
		genoperandoperand(LogicalShiftLeftCqR, 1, scratchReg),
		/* begin XorR:R: */
		genoperandoperand(XorRR, aRegister, scratchReg),
		/* begin JumpGreaterOrEqual: */
		genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)));
}

	/* CogObjectRepresentationFor32BitSpur>>#genJumpNotSmallIntegerInScratchReg: */
static AbstractInstruction * NoDbgRegParms
genJumpNotSmallIntegerInScratchReg(sqInt aRegister)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AndCqR, 1, aRegister);
	/* begin JumpZero: */
	return genConditionalBranchoperand(JumpZero, ((sqInt)0));
}


/*	Generate a test for aRegister containing an integer value outside the
	SmallInteger range, and a jump if so, answering the jump.
	c.f. Spur32BitMemoryManager>>isIntegerValue: */

	/* CogObjectRepresentationFor32BitSpur>>#genJumpNotSmallIntegerValue:scratch: */
static AbstractInstruction * NoDbgRegParms
genJumpNotSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg)
{
	return (/* begin MoveR:R: */
		genoperandoperand(MoveRR, aRegister, scratchReg),
		/* begin ArithmeticShiftRightCq:R: */
		genoperandoperand(ArithmeticShiftRightCqR, 1, scratchReg),
		/* begin XorR:R: */
		genoperandoperand(XorRR, aRegister, scratchReg),
		/* begin JumpLess: */
		genConditionalBranchoperand(JumpLess, ((sqInt)0)));
}

	/* CogObjectRepresentationFor32BitSpur>>#genJumpNotSmallInteger: */
static AbstractInstruction * NoDbgRegParms
genJumpNotSmallInteger(sqInt aRegister)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(TstCqR, 1, aRegister);
	/* begin JumpZero: */
	return genConditionalBranchoperand(JumpZero, ((sqInt)0));
}

	/* CogObjectRepresentationFor32BitSpur>>#genJumpSmallInteger: */
static AbstractInstruction * NoDbgRegParms
genJumpSmallInteger(sqInt aRegister)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(TstCqR, 1, aRegister);
	/* begin JumpNonZero: */
	return genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
}


/*	c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format:
	fixedFieldsOf:format:length: 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveAtPut */
static sqInt
genPrimitiveAtPut(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction16;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt formatReg;
    AbstractInstruction *jumpArrayOutOfBounds;
    AbstractInstruction *jumpBadIndex;
    AbstractInstruction *jumpBytesOutOfBounds;
    AbstractInstruction *jumpBytesOutOfRange;
    AbstractInstruction * jumpFixedFieldsOutOfBounds;
    AbstractInstruction *jumpHasFixedFields;
    AbstractInstruction *jumpImmediate;
    AbstractInstruction * jumpImmutable;
    AbstractInstruction *jumpIsBytes;
    AbstractInstruction * jumpIsCompiledMethod;
    AbstractInstruction *jumpIsContext;
    AbstractInstruction *jumpIsShorts;
    AbstractInstruction * jumpNonSmallIntegerValue;
    AbstractInstruction *jumpNotIndexableBits;
    AbstractInstruction *jumpNotIndexablePointers;
    AbstractInstruction * jumpNotPointers;
    AbstractInstruction *jumpShortsOutOfBounds;
    AbstractInstruction *jumpShortsOutOfRange;
    AbstractInstruction *jumpWordsOutOfBounds;
    AbstractInstruction *jumpWordsOutOfRange;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    AbstractInstruction *methodInBounds;
    sqInt nSlotsOrBytesReg;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt quickConstant6;
    sqInt quickConstant7;

	jumpImmutable = ((AbstractInstruction *) 0);
	nSlotsOrBytesReg = ClassReg;
	/* begin genLoadArgAtDepth:into: */
	assert(1 < (numRegArgs()));
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	jumpImmediate = genJumpImmediate(ReceiverResultReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
	genConvertSmallIntegerToIntegerInReg(Arg0Reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(SubCqR, 1, Arg0Reg);
	
#  if IMMUTABILITY
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), TempReg);
	/* begin genJumpBaseHeaderImmutable: */
	quickConstant7 = immutableBitMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction17 = genoperandoperand(TstCqR, quickConstant7, TempReg);
	/* begin JumpNonZero: */
	jumpImmutable = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
#  else /* IMMUTABILITY */
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), NoReg);
#  endif /* IMMUTABILITY */
	genGetNumSlotsOfinto(ReceiverResultReg, nSlotsOrBytesReg);
	/* begin CmpCq:R: */
	quickConstant = weakArrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant, formatReg);
	/* begin JumpAbove: */
	jumpNotPointers = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	genStoreCheckReceiverRegvalueRegscratchReginFrame(ReceiverResultReg, Arg1Reg, TempReg, 0);
	/* begin CmpCq:R: */
	quickConstant1 = arrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant1, formatReg);
	/* begin JumpBelow: */
	jumpNotIndexablePointers = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin JumpNonZero: */
	jumpHasFixedFields = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpArrayOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddCq:R: */
	anInstruction4 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg0Reg);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, Arg1Reg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpHasFixedFields, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	genGetClassIndexOfNonImminto(ReceiverResultReg, formatReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, formatReg);
	/* begin JumpZero: */
	jumpIsContext = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin PushR: */
	genoperand(PushR, nSlotsOrBytesReg);
	genGetClassObjectOfClassIndexintoscratchReg(formatReg, nSlotsOrBytesReg, TempReg);
	genLoadSlotsourceRegdestReg(InstanceSpecificationIndex, nSlotsOrBytesReg, formatReg);
	/* begin PopR: */
	genoperand(PopR, nSlotsOrBytesReg);
	genConvertSmallIntegerToIntegerInReg(formatReg);
	/* begin AndCq:R: */
	quickConstant2 = fixedFieldsOfClassFormatMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction6 = genoperandoperand(AndCqR, quickConstant2, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, nSlotsOrBytesReg);
	/* begin AddCq:R: */
	anInstruction7 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), formatReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpFixedFieldsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddR:R: */
	genoperandoperand(AddRR, formatReg, Arg0Reg);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, Arg1Reg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNotPointers, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNonSmallIntegerValue = genJumpNotSmallInteger(Arg1Reg);
	/* begin CmpCq:R: */
	quickConstant3 = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction8 = genoperandoperand(CmpCqR, quickConstant3, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsBytes = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant4 = firstShortFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction9 = genoperandoperand(CmpCqR, quickConstant4, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsShorts = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant5 = firstLongFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction10 = genoperandoperand(CmpCqR, quickConstant5, formatReg);
	/* begin JumpBelow: */
	jumpNotIndexableBits = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpWordsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	if (!(setsConditionCodesFor(lastOpcode(), JumpLess))) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(CmpCqR, 0, TempReg);
	}
	/* begin JumpLess: */
	jumpWordsOutOfRange = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	/* begin AddCq:R: */
	anInstruction11 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg0Reg);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, TempReg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsBytes, checkQuickConstantforInstruction((((usqInt)0xFF << 1) | 1), genoperandoperand(CmpCqR, (((usqInt)0xFF << 1) | 1), Arg1Reg)));
	/* begin JumpAbove: */
	jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), nSlotsOrBytesReg);
	gAndCqRR(BytesPerWord - 1, formatReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, TempReg, nSlotsOrBytesReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpBytesOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant6 = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction12 = genoperandoperand(CmpCqR, quickConstant6, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsCompiledMethod = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	methodInBounds = genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = BaseHeaderSize;
	anInstruction13 = genoperandoperand(AddCqR, BaseHeaderSize, Arg0Reg);
	/* begin MoveR:Xbr:R: */
	genoperandoperandoperand(MoveRXbrR, TempReg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsShorts, checkQuickConstantforInstruction((((usqInt)0xFFFF << 1) | 1), genoperandoperand(CmpCqR, (((usqInt)0xFFFF << 1) | 1), Arg1Reg)));
	/* begin JumpAbove: */
	jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, (shiftForWord()) - 1, nSlotsOrBytesReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = (BytesPerWord / 2) - 1;
	anInstruction14 = genoperandoperand(AndCqR, (BytesPerWord / 2) - 1, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, nSlotsOrBytesReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpShortsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg0Reg, ReceiverResultReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg0Reg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal2 = BaseHeaderSize;
	anInstruction15 = genoperandoperandoperand(MoveRM16r, TempReg, BaseHeaderSize, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsCompiledMethod, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	getLiteralCountOfplusOneinBytesintoscratch(ReceiverResultReg, 1, 1, nSlotsOrBytesReg, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelow: */
	genConditionalBranchoperand(JumpBelow, ((sqInt)methodInBounds));
	jmpTarget(jumpIsContext, jmpTarget(jumpNotIndexableBits, jmpTarget(jumpBytesOutOfRange, jmpTarget(jumpWordsOutOfRange, jmpTarget(jumpShortsOutOfRange, jmpTarget(jumpIsCompiledMethod, jmpTarget(jumpArrayOutOfBounds, jmpTarget(jumpBytesOutOfBounds, jmpTarget(jumpShortsOutOfBounds, jmpTarget(jumpWordsOutOfBounds, jmpTarget(jumpNotIndexablePointers, jmpTarget(jumpNonSmallIntegerValue, jmpTarget(jumpFixedFieldsOutOfBounds, genoperandoperand(Label, (labelCounter += 1), bytecodePC))))))))))))));
	
#  if IMMUTABILITY
	jmpTarget(jumpImmutable, ((AbstractInstruction *) (((jumpIsContext->operands))[0])));
#  endif /* IMMUTABILITY */
	/* begin checkQuickConstant:forInstruction: */
	anInstruction16 = genoperandoperand(AddCqR, 1, Arg0Reg);
	genConvertIntegerToSmallIntegerInReg(Arg0Reg);
	jmpTarget(jumpBadIndex, jmpTarget(jumpImmediate, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return 0;
}


/*	Generate the code for primitives 61 & 165, at:put:/basicAt:put: &
	integerAt:put:. If signedVersion is true
	then generate signed accesses to the bits classes (a la 164 & 165). If
	signedVersion is false,
	generate unsigned accesses (a la 60, 61, 63 & 64). */
/*	c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format:
	fixedFieldsOf:format:length: 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveAtPutSigned: */
static sqInt NoDbgRegParms
genPrimitiveAtPutSigned(sqInt signedVersion)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction16;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction18;
    AbstractInstruction *anInstruction19;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction20;
    AbstractInstruction *anInstruction21;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt formatReg;
    AbstractInstruction * jumpArrayOutOfBounds;
    AbstractInstruction * jumpBadIndex;
    AbstractInstruction * jumpBytesOutOfBounds;
    AbstractInstruction * jumpBytesOutOfRange;
    AbstractInstruction * jumpFixedFieldsOutOfBounds;
    AbstractInstruction * jumpHasFixedFields;
    AbstractInstruction * jumpImmediate;
    AbstractInstruction * jumpImmutable;
    AbstractInstruction * jumpIsBytes;
    AbstractInstruction * jumpIsCompiledMethod;
    AbstractInstruction * jumpIsContext;
    AbstractInstruction * jumpIsShorts;
    AbstractInstruction * jumpNonSmallIntegerValue;
    AbstractInstruction * jumpNotIndexableBits;
    AbstractInstruction * jumpNotIndexablePointers;
    AbstractInstruction * jumpNotPointers;
    AbstractInstruction * jumpShortsOutOfBounds;
    AbstractInstruction * jumpShortsOutOfRange;
    AbstractInstruction * jumpWordsOutOfBounds;
    AbstractInstruction * jumpWordsOutOfRange;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    AbstractInstruction * methodInBounds;
    sqInt nSlotsOrBytesReg;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt quickConstant6;
    sqInt quickConstant7;

	jumpImmutable = ((AbstractInstruction *) 0);
	jumpWordsOutOfRange = ((AbstractInstruction *) 0);
	nSlotsOrBytesReg = ClassReg;
	/* begin genLoadArgAtDepth:into: */
	assert(1 < (numRegArgs()));
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	jumpImmediate = genJumpImmediate(ReceiverResultReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
	genConvertSmallIntegerToIntegerInReg(Arg0Reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperand(SubCqR, 1, Arg0Reg);
	
#  if IMMUTABILITY
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), TempReg);
	/* begin genJumpBaseHeaderImmutable: */
	quickConstant7 = immutableBitMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction21 = genoperandoperand(TstCqR, quickConstant7, TempReg);
	/* begin JumpNonZero: */
	jumpImmutable = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
#  else /* IMMUTABILITY */
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), NoReg);
#  endif /* IMMUTABILITY */
	genGetNumSlotsOfinto(ReceiverResultReg, nSlotsOrBytesReg);
	/* begin CmpCq:R: */
	quickConstant = weakArrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction6 = genoperandoperand(CmpCqR, quickConstant, formatReg);
	/* begin JumpAbove: */
	jumpNotPointers = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	genStoreCheckReceiverRegvalueRegscratchReginFrame(ReceiverResultReg, Arg1Reg, TempReg, 0);
	/* begin CmpCq:R: */
	quickConstant1 = arrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction7 = genoperandoperand(CmpCqR, quickConstant1, formatReg);
	/* begin JumpBelow: */
	jumpNotIndexablePointers = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin JumpNonZero: */
	jumpHasFixedFields = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpArrayOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddCq:R: */
	anInstruction8 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg0Reg);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, Arg1Reg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpHasFixedFields, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	genGetClassIndexOfNonImminto(ReceiverResultReg, formatReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction9 = genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, formatReg);
	/* begin JumpZero: */
	jumpIsContext = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin PushR: */
	genoperand(PushR, nSlotsOrBytesReg);
	genGetClassObjectOfClassIndexintoscratchReg(formatReg, nSlotsOrBytesReg, TempReg);
	genLoadSlotsourceRegdestReg(InstanceSpecificationIndex, nSlotsOrBytesReg, formatReg);
	/* begin PopR: */
	genoperand(PopR, nSlotsOrBytesReg);
	genConvertSmallIntegerToIntegerInReg(formatReg);
	/* begin AndCq:R: */
	quickConstant2 = fixedFieldsOfClassFormatMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction10 = genoperandoperand(AndCqR, quickConstant2, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, nSlotsOrBytesReg);
	/* begin AddCq:R: */
	anInstruction11 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), formatReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpFixedFieldsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddR:R: */
	genoperandoperand(AddRR, formatReg, Arg0Reg);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, Arg1Reg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNotPointers, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNonSmallIntegerValue = genJumpNotSmallInteger(Arg1Reg);
	/* begin CmpCq:R: */
	quickConstant3 = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction12 = genoperandoperand(CmpCqR, quickConstant3, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsBytes = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant4 = firstShortFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction13 = genoperandoperand(CmpCqR, quickConstant4, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsShorts = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant5 = firstLongFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction14 = genoperandoperand(CmpCqR, quickConstant5, formatReg);
	/* begin JumpBelow: */
	jumpNotIndexableBits = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpWordsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	if (!signedVersion) {
		if (!(setsConditionCodesFor(lastOpcode(), JumpLess))) {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction = genoperandoperand(CmpCqR, 0, TempReg);
		}
		/* begin JumpLess: */
		jumpWordsOutOfRange = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	}
	/* begin AddCq:R: */
	anInstruction15 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg0Reg);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, TempReg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	if (signedVersion) {
		jmpTarget(jumpIsBytes, genoperandoperand(MoveRR, SendNumArgsReg, TempReg));
		/* begin ArithmeticShiftRightCq:R: */
		genoperandoperand(ArithmeticShiftRightCqR, 7, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(AddCqR, 1, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperand(CmpCqR, 1, TempReg);
	}
	else {
		jmpTarget(jumpIsBytes, checkQuickConstantforInstruction((((usqInt)0xFF << 1) | 1), genoperandoperand(CmpCqR, (((usqInt)0xFF << 1) | 1), Arg1Reg)));
	}
	/* begin JumpAbove: */
	jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), nSlotsOrBytesReg);
	gAndCqRR(BytesPerWord - 1, formatReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, TempReg, nSlotsOrBytesReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpBytesOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant6 = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction16 = genoperandoperand(CmpCqR, quickConstant6, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsCompiledMethod = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	methodInBounds = genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = BaseHeaderSize;
	anInstruction17 = genoperandoperand(AddCqR, BaseHeaderSize, Arg0Reg);
	/* begin MoveR:Xbr:R: */
	genoperandoperandoperand(MoveRXbrR, TempReg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	if (signedVersion) {
		jmpTarget(jumpIsShorts, genoperandoperand(MoveRR, SendNumArgsReg, TempReg));
		/* begin ArithmeticShiftRightCq:R: */
		genoperandoperand(ArithmeticShiftRightCqR, 15, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction3 = genoperandoperand(AddCqR, 1, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction4 = genoperandoperand(CmpCqR, 1, TempReg);
	}
	else {
		jmpTarget(jumpIsShorts, checkQuickConstantforInstruction((((usqInt)0xFFFF << 1) | 1), genoperandoperand(CmpCqR, (((usqInt)0xFFFF << 1) | 1), Arg1Reg)));
	}
	/* begin JumpAbove: */
	jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, (shiftForWord()) - 1, nSlotsOrBytesReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = (BytesPerWord / 2) - 1;
	anInstruction18 = genoperandoperand(AndCqR, (BytesPerWord / 2) - 1, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, nSlotsOrBytesReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpShortsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg0Reg, ReceiverResultReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg0Reg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal2 = BaseHeaderSize;
	anInstruction19 = genoperandoperandoperand(MoveRM16r, TempReg, BaseHeaderSize, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsCompiledMethod, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	getLiteralCountOfplusOneinBytesintoscratch(ReceiverResultReg, 1, 1, nSlotsOrBytesReg, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, nSlotsOrBytesReg);
	/* begin JumpBelow: */
	genConditionalBranchoperand(JumpBelow, ((sqInt)methodInBounds));
	jmpTarget(jumpIsContext, jmpTarget(jumpNotIndexableBits, jmpTarget(jumpBytesOutOfRange, jmpTarget(jumpShortsOutOfRange, jmpTarget(jumpIsCompiledMethod, jmpTarget(jumpArrayOutOfBounds, jmpTarget(jumpBytesOutOfBounds, jmpTarget(jumpShortsOutOfBounds, jmpTarget(jumpWordsOutOfBounds, jmpTarget(jumpNotIndexablePointers, jmpTarget(jumpNonSmallIntegerValue, jmpTarget(jumpFixedFieldsOutOfBounds, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))))))))))));
	if (!signedVersion) {
		jmpTarget(jumpWordsOutOfRange, ((AbstractInstruction *) (((jumpIsContext->operands))[0])));
	}
	
#  if IMMUTABILITY
	jmpTarget(jumpImmutable, ((AbstractInstruction *) (((jumpIsContext->operands))[0])));
#  endif /* IMMUTABILITY */
	/* begin checkQuickConstant:forInstruction: */
	anInstruction20 = genoperandoperand(AddCqR, 1, Arg0Reg);
	genConvertIntegerToSmallIntegerInReg(Arg0Reg);
	jmpTarget(jumpBadIndex, jmpTarget(jumpImmediate, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return 0;
}


/*	Generate the code for primitives 60 & 164, at:/basicAt: & integerAt:. If
	signedVersion is true
	then generate signed accesses to the bits classes (a la 164 & 165). If
	signedVersion is false,
	generate unsigned accesses (a la 60, 61, 63 & 64). */
/*	c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format:
	fixedFieldsOf:format:length: 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveAtSigned: */
static sqInt NoDbgRegParms
genPrimitiveAtSigned(sqInt signedVersion)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    AbstractInstruction * convertToIntAndReturn;
    sqInt formatReg;
    AbstractInstruction * jumpArrayOutOfBounds;
    AbstractInstruction * jumpBadIndex;
    AbstractInstruction * jumpBytesOutOfBounds;
    AbstractInstruction * jumpFixedFieldsOutOfBounds;
    AbstractInstruction * jumpHasFixedFields;
    AbstractInstruction * jumpImmediate;
    AbstractInstruction * jumpIsArray;
    AbstractInstruction * jumpIsBytes;
    AbstractInstruction * jumpIsContext;
    AbstractInstruction * jumpIsMethod;
    AbstractInstruction * jumpIsShorts;
    AbstractInstruction * jumpIsWords;
    AbstractInstruction * jumpNotIndexable;
    AbstractInstruction * jumpShortsOutOfBounds;
    AbstractInstruction * jumpWordsOutOfBounds;
    AbstractInstruction * jumpWordTooBig;
    sqInt literal;
    sqInt literal1;
    AbstractInstruction * methodInBounds;
    sqInt nSlotsOrBytesReg;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt quickConstant6;

	nSlotsOrBytesReg = ClassReg;
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	jumpImmediate = genJumpImmediate(ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, Arg1Reg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
	genConvertSmallIntegerToIntegerInReg(Arg1Reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(SubCqR, 1, Arg1Reg);
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), TempReg);
	genGetNumSlotsOfinto(ReceiverResultReg, nSlotsOrBytesReg);
	/* begin CmpCq:R: */
	quickConstant = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, quickConstant, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsBytes = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant1 = arrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant1, formatReg);
	/* begin JumpZero: */
	jumpIsArray = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin JumpBelow: */
	jumpNotIndexable = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant2 = weakArrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant2, formatReg);
	/* begin JumpBelowOrEqual: */
	jumpHasFixedFields = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant3 = firstShortFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(CmpCqR, quickConstant3, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsShorts = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant4 = firstLongFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperand(CmpCqR, quickConstant4, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsWords = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	jmpTarget(jumpNotIndexable, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin Jump: */
	jumpNotIndexable = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpIsArray, genoperandoperand(CmpRR, Arg1Reg, nSlotsOrBytesReg));
	/* begin JumpBelowOrEqual: */
	jumpArrayOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddCq:R: */
	anInstruction6 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg1Reg);
	/* begin MoveXwr:R:R: */
	genoperandoperandoperand(MoveXwrRR, Arg1Reg, ReceiverResultReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsBytes, gLogicalShiftLeftCqR(shiftForWord(), nSlotsOrBytesReg));
	gAndCqRR(BytesPerWord - 1, formatReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, TempReg, nSlotsOrBytesReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpBytesOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant5 = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction7 = genoperandoperand(CmpCqR, quickConstant5, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsMethod = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	literal = BaseHeaderSize;
	anInstruction8 = genoperandoperand(AddCqR, BaseHeaderSize, Arg1Reg);
	methodInBounds = anInstruction8;
	/* begin MoveXbr:R:R: */
	genoperandoperandoperand(MoveXbrRR, Arg1Reg, ReceiverResultReg, ReceiverResultReg);
	if (signedVersion) {
		/* begin SignExtend8R:R: */
		genoperandoperand(SignExtend8RR, ReceiverResultReg, ReceiverResultReg);
		goto l8;
	l8:	/* end SignExtend8R:R: */;
	}
	/* begin Label */
	convertToIntAndReturn = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	genConvertIntegerToSmallIntegerInReg(ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsShorts, gLogicalShiftLeftCqR((shiftForWord()) - 1, nSlotsOrBytesReg));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction9 = genoperandoperand(AndCqR, 1, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, nSlotsOrBytesReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpShortsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg1Reg, ReceiverResultReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg1Reg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BaseHeaderSize;
	anInstruction10 = genoperandoperandoperand(MoveM16rR, BaseHeaderSize, ReceiverResultReg, ReceiverResultReg);
	if (signedVersion) {
		/* begin SignExtend16R:R: */
		genoperandoperand(SignExtend16RR, ReceiverResultReg, ReceiverResultReg);
		goto l13;
	l13:	/* end SignExtend16R:R: */;
	}
	/* begin Jump: */
	genoperand(Jump, ((sqInt)convertToIntAndReturn));
	jmpTarget(jumpIsWords, genoperandoperand(CmpRR, Arg1Reg, nSlotsOrBytesReg));
	/* begin JumpBelowOrEqual: */
	jumpWordsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddCq:R: */
	anInstruction11 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg1Reg);
	/* begin MoveXwr:R:R: */
	genoperandoperandoperand(MoveXwrRR, Arg1Reg, ReceiverResultReg, TempReg);
	jumpWordTooBig = jumpNotSmallIntegerUnsignedValueInRegister(TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)convertToIntAndReturn));
	jmpTarget(jumpHasFixedFields, gAndCqR(classIndexMask(), TempReg));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, formatReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction12 = genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, TempReg);
	/* begin JumpZero: */
	jumpIsContext = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin PushR: */
	genoperand(PushR, nSlotsOrBytesReg);
	genGetClassObjectOfClassIndexintoscratchReg(formatReg, nSlotsOrBytesReg, TempReg);
	genLoadSlotsourceRegdestReg(InstanceSpecificationIndex, nSlotsOrBytesReg, formatReg);
	/* begin PopR: */
	genoperand(PopR, nSlotsOrBytesReg);
	genConvertSmallIntegerToIntegerInReg(formatReg);
	/* begin AndCq:R: */
	quickConstant6 = fixedFieldsOfClassFormatMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction13 = genoperandoperand(AndCqR, quickConstant6, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, nSlotsOrBytesReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, nSlotsOrBytesReg);
	/* begin JumpBelowOrEqual: */
	jumpFixedFieldsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddR:R: */
	genoperandoperand(AddRR, formatReg, Arg1Reg);
	/* begin AddCq:R: */
	anInstruction14 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg1Reg);
	/* begin MoveXwr:R:R: */
	genoperandoperandoperand(MoveXwrRR, Arg1Reg, ReceiverResultReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsMethod, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	getLiteralCountOfplusOneinBytesintoscratch(ReceiverResultReg, 1, 1, nSlotsOrBytesReg, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, nSlotsOrBytesReg);
	/* begin JumpBelow: */
	genConditionalBranchoperand(JumpBelow, ((sqInt)methodInBounds));
	jmpTarget(jumpWordTooBig, jmpTarget(jumpFixedFieldsOutOfBounds, jmpTarget(jumpArrayOutOfBounds, jmpTarget(jumpBytesOutOfBounds, jmpTarget(jumpShortsOutOfBounds, jmpTarget(jumpWordsOutOfBounds, jmpTarget(jumpNotIndexable, jmpTarget(jumpIsContext, jmpTarget(jumpBadIndex, jmpTarget(jumpImmediate, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))))))))));
	return 0;
}


/*	Arguably we should fail for immediates, but so far no one has complained,
	so... 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveIdentityHash */
static sqInt
genPrimitiveIdentityHash(void)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    AbstractInstruction *jumpImm;
    AbstractInstruction *jumpNotSet;
    AbstractInstruction *jumpSI;
    AbstractInstruction * ret;

	jumpImm = genJumpImmediate(ReceiverResultReg);
	genGetHashFieldNonImmOfasSmallIntegerInto(ReceiverResultReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, ConstZero, TempReg);
	/* begin JumpZero: */
	jumpNotSet = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		ret = genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		ret = genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpImm, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	jumpSI = genJumpSmallInteger(ReceiverResultReg);
	jmpTarget(jumpSI, ret);
	genConvertCharacterToSmallIntegerInReg(ReceiverResultReg);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)ret));
	jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	if (!(primitiveIndex == 75)) {
		return 0;
	}
	/* begin saveAndRestoreLinkRegAround: */
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceNewHashTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	return UnfailingPrimitive;
}


/*	:Assume the receiuver is never a SmallInteger. One would use ^self for
	that. 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveImmediateAsInteger */
static sqInt
genPrimitiveImmediateAsInteger(void)
{
	genConvertCharacterToSmallIntegerInReg(ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	return UnfailingPrimitive;
}


/*	Implement primitiveNew for convenient cases:
	- the receiver has a hash
	- the receiver is fixed size (excluding ephemerons to save instructions &
	miniscule time)
	- single word header/num slots < numSlotsMask
	- the result fits in eden (actually below scavengeThreshold)
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveNew */
static sqInt
genPrimitiveNew(void)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction16;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt byteSizeReg;
    AbstractInstruction *fillLoop;
    sqInt fillReg;
    sqInt halfHeaderReg;
    sqInt instSpecReg;
    AbstractInstruction *jumpHasSlots;
    AbstractInstruction *jumpNoSpace;
    AbstractInstruction *jumpTooBig;
    AbstractInstruction *jumpUnhashed;
    AbstractInstruction *jumpVariableOrEphemeron;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt quickConstant6;
    sqInt quickConstant7;
    AbstractInstruction *skip;

	if (methodOrBlockNumArgs != 0) {
		return UnimplementedPrimitive;
	}

	/* inst spec will hold class's instance specification, then byte size and finally end of new object. */
	halfHeaderReg = (fillReg = SendNumArgsReg);

	/* get freeStart as early as possible so as not to wait later... */
	instSpecReg = (byteSizeReg = ClassReg);
	/* begin MoveAw:R: */
	address = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, Arg1Reg);
	genGetHashFieldNonImmOfinto(ReceiverResultReg, halfHeaderReg);
	/* begin JumpZero: */
	jumpUnhashed = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	genLoadSlotsourceRegdestReg(InstanceSpecificationIndex, ReceiverResultReg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, instSpecReg);
	/* begin LogicalShiftRightCq:R: */
	quickConstant = fixedFieldsFieldWidth();
	genoperandoperand(LogicalShiftRightCqR, quickConstant, TempReg);
	/* begin AndCq:R: */
	quickConstant2 = formatMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant2, TempReg);
	/* begin AndCq:R: */
	quickConstant3 = fixedFieldsOfClassFormatMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(AndCqR, quickConstant3, instSpecReg);
	/* begin CmpCq:R: */
	quickConstant4 = nonIndexablePointerFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant4, TempReg);
	/* begin JumpAbove: */
	jumpVariableOrEphemeron = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant5 = numSlotsMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(CmpCqR, quickConstant5, instSpecReg);
	/* begin JumpAboveOrEqual: */
	jumpTooBig = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin LogicalShiftLeftCq:R: */
	quickConstant1 = formatShift();
	genoperandoperand(LogicalShiftLeftCqR, quickConstant1, TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, TempReg, halfHeaderReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperandoperand(MoveRMwr, halfHeaderReg, 0, Arg1Reg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, instSpecReg, halfHeaderReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction6 = genoperandoperand(CmpCqR, 0, byteSizeReg);
	/* begin JumpNonZero: */
	jumpHasSlots = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	literal = BaseHeaderSize * 2;
	anInstruction7 = genoperandoperand(MoveCqR, BaseHeaderSize * 2, byteSizeReg);
	/* begin Jump: */
	skip = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpHasSlots, genoperandoperand(MoveRR, byteSizeReg, TempReg));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction8 = genoperandoperand(AndCqR, 1, TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, TempReg, byteSizeReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BaseHeaderSize / BytesPerWord;
	anInstruction9 = genoperandoperand(AddCqR, BaseHeaderSize / BytesPerWord, byteSizeReg);
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), byteSizeReg);
	jmpTarget(skip, gLogicalShiftLeftCqR(numSlotsHalfShift(), halfHeaderReg));
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg1Reg, byteSizeReg);
	/* begin CmpCq:R: */
	quickConstant6 = getScavengeThreshold();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction10 = genoperandoperand(CmpCqR, quickConstant6, byteSizeReg);
	/* begin JumpAboveOrEqual: */
	jumpNoSpace = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin MoveR:Aw: */
	address1 = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction11 = genoperandoperand(MoveRAw, byteSizeReg, address1);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction12 = genoperandoperandoperand(MoveRMwr, halfHeaderReg, 4, Arg1Reg);
	/* begin checkQuickConstant:forInstruction: */
	literal2 = BaseHeaderSize;
	anInstruction13 = genoperandoperandoperand(LoadEffectiveAddressMwrR, BaseHeaderSize, ReceiverResultReg, Arg1Reg);
	/* begin MoveCq:R: */
	quickConstant7 = nilObject();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction14 = genoperandoperand(MoveCqR, quickConstant7, fillReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction15 = genoperandoperandoperand(MoveRMwr, fillReg, 0, Arg1Reg);
	fillLoop = anInstruction15;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction16 = genoperandoperandoperand(MoveRMwr, fillReg, 4, Arg1Reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction17 = genoperandoperand(AddCqR, 8, Arg1Reg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, byteSizeReg);
	/* begin JumpAbove: */
	genConditionalBranchoperand(JumpAbove, ((sqInt)fillLoop));
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpUnhashed, jmpTarget(jumpVariableOrEphemeron, jmpTarget(jumpTooBig, jmpTarget(jumpNoSpace, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))));
	return 0;
}


/*	Implement primitiveNewWithArg for convenient cases:
	- the receiver has a hash
	- the receiver is variable and not compiled method
	- single word header/num slots < numSlotsMask
	- the result fits in eden
	See superclass method for dynamic frequencies of formats.
	For the moment we implement only arrayFormat, firstByteFormat &
	firstLongFormat 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveNewWithArg */
static sqInt
genPrimitiveNewWithArg(void)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction16;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction18;
    AbstractInstruction *anInstruction19;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction20;
    AbstractInstruction *anInstruction21;
    AbstractInstruction *anInstruction22;
    AbstractInstruction *anInstruction23;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt byteSizeReg;
    AbstractInstruction *fillLoop;
    sqInt fillReg;
    sqInt halfHeaderReg;
    sqInt instSpecReg;
    AbstractInstruction *jumpArrayFormat;
    AbstractInstruction *jumpArrayTooBig;
    AbstractInstruction *jumpByteFormat;
    AbstractInstruction *jumpBytePrepDone;
    AbstractInstruction *jumpByteTooBig;
    AbstractInstruction *jumpFailCuzFixed;
    AbstractInstruction *jumpHasSlots;
    AbstractInstruction *jumpLongPrepDone;
    AbstractInstruction *jumpLongTooBig;
    AbstractInstruction *jumpNElementsNonInt;
    AbstractInstruction *jumpNoSpace;
    AbstractInstruction *jumpUnhashed;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt literal3;
    sqInt literal4;
    sqInt literal5;
    sqInt literal6;
    sqInt maxSlots;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt quickConstant6;
    sqInt quickConstant7;
    AbstractInstruction *skip;
    sqInt wordConstant;

	if (methodOrBlockNumArgs != 1) {
		return UnimplementedPrimitive;
	}
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));

	/* inst spec will hold class's instance specification and then byte size and finally numSlots half of header */
	halfHeaderReg = (fillReg = SendNumArgsReg);

	/* The max slots we'll allocate here are those for a single header */
	instSpecReg = (byteSizeReg = ClassReg);

	/* get freeStart as early as possible so as not to wait later... */
	maxSlots = (numSlotsMask()) - 1;
	/* begin MoveAw:R: */
	address = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, Arg1Reg);
	genGetHashFieldNonImmOfinto(ReceiverResultReg, halfHeaderReg);
	/* begin JumpZero: */
	jumpUnhashed = genConditionalBranchoperand(JumpZero, ((sqInt)0));

	/* get class's format inst var for inst spec (format field) */
	jumpNElementsNonInt = genJumpNotSmallInteger(Arg0Reg);
	genLoadSlotsourceRegdestReg(InstanceSpecificationIndex, ReceiverResultReg, instSpecReg);
	/* begin LogicalShiftRightCq:R: */
	quickConstant = (fixedFieldsFieldWidth()) + 1 /* numSmallIntegerTagBits */;
	genoperandoperand(LogicalShiftRightCqR, quickConstant, instSpecReg);
	/* begin AndCq:R: */
	quickConstant3 = formatMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant3, instSpecReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, instSpecReg, TempReg);
	/* begin LogicalShiftLeftCq:R: */
	quickConstant1 = formatShift();
	genoperandoperand(LogicalShiftLeftCqR, quickConstant1, TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, TempReg, halfHeaderReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	/* begin CmpCq:R: */
	quickConstant4 = arrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant4, instSpecReg);
	/* begin JumpZero: */
	jumpArrayFormat = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant5 = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant5, instSpecReg);
	/* begin JumpZero: */
	jumpByteFormat = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant6 = firstLongFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(CmpCqR, quickConstant6, instSpecReg);
	/* begin JumpNonZero: */
	jumpFailCuzFixed = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	literal = (((usqInt)maxSlots << 1) | 1);
	anInstruction5 = genoperandoperand(CmpCqR, (((usqInt)maxSlots << 1) | 1), Arg0Reg);
	/* begin JumpAbove: */
	jumpLongTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, instSpecReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction6 = genoperand(PushCq, 0);
	/* begin Jump: */
	jumpLongPrepDone = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpByteFormat, checkQuickConstantforInstruction((((usqInt)(maxSlots * BytesPerWord) << 1) | 1), genoperandoperand(CmpCqR, (((usqInt)(maxSlots * BytesPerWord) << 1) | 1), Arg0Reg)));
	/* begin JumpAbove: */
	jumpByteTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, instSpecReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BytesPerWord;
	anInstruction7 = genoperandoperand(MoveCqR, BytesPerWord, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, instSpecReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal2 = BytesPerWord - 1;
	anInstruction8 = genoperandoperand(AndCqR, BytesPerWord - 1, TempReg);
	/* begin LogicalShiftLeftCq:R: */
	quickConstant2 = formatShift();
	genoperandoperand(LogicalShiftLeftCqR, quickConstant2, TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, TempReg, halfHeaderReg);
	/* begin checkQuickConstant:forInstruction: */
	literal3 = BytesPerWord - 1;
	anInstruction9 = genoperandoperand(AddCqR, BytesPerWord - 1, instSpecReg);
	/* begin LogicalShiftRightCq:R: */
	genoperandoperand(LogicalShiftRightCqR, shiftForWord(), instSpecReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction10 = genoperand(PushCq, 0);
	/* begin Jump: */
	jumpBytePrepDone = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpArrayFormat, checkQuickConstantforInstruction((((usqInt)maxSlots << 1) | 1), genoperandoperand(CmpCqR, (((usqInt)maxSlots << 1) | 1), Arg0Reg)));
	/* begin JumpAbove: */
	jumpArrayTooBig = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, instSpecReg);
	/* begin PushCw: */
	wordConstant = nilObject();
	/* begin checkLiteral:forInstruction: */
	anInstruction11 = genoperand(PushCw, wordConstant);
	jmpTarget(jumpBytePrepDone, jmpTarget(jumpLongPrepDone, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction12 = genoperandoperandoperand(MoveRMwr, halfHeaderReg, 0, Arg1Reg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, instSpecReg, halfHeaderReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction13 = genoperandoperand(CmpCqR, 0, byteSizeReg);
	/* begin JumpNonZero: */
	jumpHasSlots = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	literal4 = BaseHeaderSize * 2;
	anInstruction14 = genoperandoperand(MoveCqR, BaseHeaderSize * 2, byteSizeReg);
	/* begin Jump: */
	skip = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpHasSlots, genoperandoperand(MoveRR, byteSizeReg, TempReg));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction15 = genoperandoperand(AndCqR, 1, TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, TempReg, byteSizeReg);
	/* begin checkQuickConstant:forInstruction: */
	literal5 = BaseHeaderSize / BytesPerWord;
	anInstruction16 = genoperandoperand(AddCqR, BaseHeaderSize / BytesPerWord, byteSizeReg);
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), byteSizeReg);
	jmpTarget(skip, gLogicalShiftLeftCqR(numSlotsHalfShift(), halfHeaderReg));
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg1Reg, byteSizeReg);
	/* begin CmpCq:R: */
	quickConstant7 = getScavengeThreshold();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction17 = genoperandoperand(CmpCqR, quickConstant7, byteSizeReg);
	/* begin JumpAboveOrEqual: */
	jumpNoSpace = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	/* begin MoveR:Aw: */
	address1 = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction18 = genoperandoperand(MoveRAw, byteSizeReg, address1);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction19 = genoperandoperandoperand(MoveRMwr, halfHeaderReg, 4, ReceiverResultReg);
	/* begin PopR: */
	genoperand(PopR, fillReg);
	/* begin checkQuickConstant:forInstruction: */
	literal6 = BaseHeaderSize;
	anInstruction20 = genoperandoperandoperand(LoadEffectiveAddressMwrR, BaseHeaderSize, ReceiverResultReg, Arg1Reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction21 = genoperandoperandoperand(MoveRMwr, fillReg, 0, Arg1Reg);
	fillLoop = anInstruction21;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction22 = genoperandoperandoperand(MoveRMwr, fillReg, 4, Arg1Reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction23 = genoperandoperand(AddCqR, 8, Arg1Reg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, byteSizeReg);
	/* begin JumpAbove: */
	genConditionalBranchoperand(JumpAbove, ((sqInt)fillLoop));
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNoSpace, genoperand(PopR, TempReg));
	jmpTarget(jumpUnhashed, jmpTarget(jumpFailCuzFixed, jmpTarget(jumpArrayTooBig, jmpTarget(jumpByteTooBig, jmpTarget(jumpLongTooBig, jmpTarget(jumpNElementsNonInt, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))))));
	return 0;
}


/*	Implement primitiveShallowCopy/primitiveClone for convenient cases:
	- the receiver is not a context
	- the receiver is not a compiled method
	- the result fits in eden (actually below scavengeThreshold) */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveShallowCopy */
static sqInt
genPrimitiveShallowCopy(void)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction16;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction18;
    AbstractInstruction *anInstruction19;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction20;
    AbstractInstruction *anInstruction21;
    AbstractInstruction *anInstruction22;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    AbstractInstruction *continuance;
    AbstractInstruction *copyLoop;
    sqInt formatReg;
    AbstractInstruction * jumpEmpty;
    AbstractInstruction *jumpImmediate;
    AbstractInstruction *jumpIsMethod;
    AbstractInstruction *jumpNoSpace;
    AbstractInstruction *jumpTooBig;
    AbstractInstruction *jumpVariable;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt literal3;
    sqInt literal4;
    sqInt literal5;
    sqInt literal6;
    sqInt literal7;
    sqInt ptrReg;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt resultReg;
    sqInt slotsReg;

	jumpImmediate = genJumpImmediate(ReceiverResultReg);
	resultReg = Arg0Reg;

	/* get freeStart as early as possible so as not to wait later... */
	slotsReg = Arg1Reg;
	/* begin MoveAw:R: */
	address = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, resultReg);
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (ptrReg = (formatReg = SendNumArgsReg)), NoReg);
	/* begin CmpCq:R: */
	quickConstant = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, quickConstant, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsMethod = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant1 = indexablePointersFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant1, formatReg);
	/* begin JumpZero: */
	jumpVariable = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin Label */
	continuance = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	genGetRawSlotSizeOfNonImminto(ReceiverResultReg, slotsReg);
	/* begin CmpCq:R: */
	quickConstant2 = numSlotsMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant2, slotsReg);
	/* begin JumpZero: */
	jumpTooBig = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(CmpCqR, 0, slotsReg);
	/* begin JumpZero: */
	jumpEmpty = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, slotsReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperand(AndCqR, 1, TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, TempReg, slotsReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = BaseHeaderSize / BytesPerWord;
	anInstruction6 = genoperandoperand(AddCqR, BaseHeaderSize / BytesPerWord, slotsReg);
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), slotsReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, resultReg, slotsReg);
	/* begin CmpCq:R: */
	quickConstant3 = getScavengeThreshold();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction7 = genoperandoperand(CmpCqR, quickConstant3, slotsReg);
	/* begin JumpAboveOrEqual: */
	jumpNoSpace = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, resultReg, ptrReg);
	/* begin MoveR:Aw: */
	address1 = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction8 = genoperandoperand(MoveRAw, slotsReg, address1);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BytesPerWord * 2;
	anInstruction9 = genoperandoperand(SubCqR, BytesPerWord * 2, slotsReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction10 = genoperandoperandoperand(MoveMwrR, 0, ReceiverResultReg, TempReg);
	/* begin AndCq:R: */
	quickConstant4 = (((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask());
	/* begin checkQuickConstant:forInstruction: */
	anInstruction11 = genoperandoperand(AndCqR, quickConstant4, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction12 = genoperandoperandoperand(MoveRMwr, TempReg, 0, resultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal2 = BytesPerWord;
	anInstruction13 = genoperandoperandoperand(MoveMwrR, BytesPerWord, ReceiverResultReg, TempReg);
	/* begin AndCq:R: */
	quickConstant5 = ((sqInt)((usqInt)((numSlotsMask())) << (numSlotsHalfShift())));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction14 = genoperandoperand(AndCqR, quickConstant5, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal3 = BytesPerWord;
	anInstruction15 = genoperandoperandoperand(MoveRMwr, TempReg, BytesPerWord, resultReg);
	/* begin Label */
	copyLoop = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	/* begin checkQuickConstant:forInstruction: */
	literal4 = BytesPerWord * 2;
	anInstruction16 = genoperandoperand(AddCqR, BytesPerWord * 2, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal5 = BytesPerWord * 2;
	anInstruction17 = genoperandoperand(AddCqR, BytesPerWord * 2, ptrReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction18 = genoperandoperandoperand(MoveMwrR, 0, ReceiverResultReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction19 = genoperandoperandoperand(MoveRMwr, TempReg, 0, ptrReg);
	/* begin checkQuickConstant:forInstruction: */
	literal6 = BytesPerWord;
	anInstruction20 = genoperandoperandoperand(MoveMwrR, BytesPerWord, ReceiverResultReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal7 = BytesPerWord;
	anInstruction21 = genoperandoperandoperand(MoveRMwr, TempReg, BytesPerWord, ptrReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, ptrReg, slotsReg);
	/* begin JumpAbove: */
	genConditionalBranchoperand(JumpAbove, ((sqInt)copyLoop));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, resultReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpVariable, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	genGetClassIndexOfNonImminto(ReceiverResultReg, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction22 = genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, ClassReg);
	/* begin JumpNonZero: */
	genConditionalBranchoperand(JumpNonZero, ((sqInt)continuance));
	jmpTarget(jumpImmediate, jmpTarget(jumpNoSpace, jmpTarget(jumpIsMethod, jmpTarget(jumpTooBig, jmpTarget(jumpEmpty, genoperandoperand(Label, (labelCounter += 1), bytecodePC))))));
	return 0;
}


/*	c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format:
	fixedFieldsOf:format:length: 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveStringAt */
static sqInt
genPrimitiveStringAt(void)
{
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    AbstractInstruction *done;
    sqInt formatReg;
    AbstractInstruction *jumpBadIndex;
    AbstractInstruction *jumpBytesOutOfBounds;
    AbstractInstruction *jumpIsBytes;
    AbstractInstruction *jumpIsShorts;
    AbstractInstruction *jumpNotIndexable;
    AbstractInstruction *jumpShortsOutOfBounds;
    AbstractInstruction *jumpWordsDone;
    AbstractInstruction *jumpWordsOutOfBounds;
    AbstractInstruction *jumpWordTooBig;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt literal3;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;

	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, Arg1Reg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
	genConvertSmallIntegerToIntegerInReg(Arg1Reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(SubCqR, 1, Arg1Reg);
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), NoReg);
	genGetNumSlotsOfinto(ReceiverResultReg, ClassReg);
	/* begin CmpCq:R: */
	quickConstant = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant, formatReg);
	/* begin JumpGreaterOrEqual: */
	jumpIsBytes = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant1 = firstShortFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant1, formatReg);
	/* begin JumpGreaterOrEqual: */
	jumpIsShorts = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant2 = firstLongFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(CmpCqR, quickConstant2, formatReg);
	/* begin JumpLess: */
	jumpNotIndexable = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, ClassReg);
	/* begin JumpBelowOrEqual: */
	jumpWordsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddCq:R: */
	anInstruction5 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg1Reg);
	/* begin MoveXwr:R:R: */
	genoperandoperandoperand(MoveXwrRR, Arg1Reg, ReceiverResultReg, TempReg);
	jumpWordTooBig = jumpNotCharacterUnsignedValueInRegister(TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
	/* begin Jump: */
	jumpWordsDone = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpIsBytes, gLogicalShiftLeftCqR(shiftForWord(), ClassReg));
	/* begin checkQuickConstant:forInstruction: */
	literal = BytesPerWord - 1;
	anInstruction6 = genoperandoperand(AndCqR, BytesPerWord - 1, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, ClassReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, ClassReg);
	/* begin JumpBelowOrEqual: */
	jumpBytesOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BaseHeaderSize;
	anInstruction7 = genoperandoperand(AddCqR, BaseHeaderSize, Arg1Reg);
	/* begin MoveXbr:R:R: */
	genoperandoperandoperand(MoveXbrRR, Arg1Reg, ReceiverResultReg, ReceiverResultReg);
	jmpTarget(jumpWordsDone, (done = genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	genConvertIntegerToCharacterInReg(ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsShorts, gLogicalShiftLeftCqR((shiftForWord()) - 1, ClassReg));
	/* begin checkQuickConstant:forInstruction: */
	literal2 = (BytesPerWord / 1) - 1;
	anInstruction8 = genoperandoperand(AndCqR, (BytesPerWord / 1) - 1, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, ClassReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg1Reg, ClassReg);
	/* begin JumpBelowOrEqual: */
	jumpShortsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg1Reg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal3 = BaseHeaderSize;
	anInstruction9 = genoperandoperandoperand(MoveM16rR, BaseHeaderSize, ReceiverResultReg, ReceiverResultReg);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)done));
	jmpTarget(jumpWordTooBig, jmpTarget(jumpBytesOutOfBounds, jmpTarget(jumpShortsOutOfBounds, jmpTarget(jumpWordsOutOfBounds, jmpTarget(jumpNotIndexable, jmpTarget(jumpBadIndex, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))))));
	return CompletePrimitive;
}


/*	c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format:
	fixedFieldsOf:format:length: 
 */

	/* CogObjectRepresentationFor32BitSpur>>#genPrimitiveStringAtPut */
static sqInt
genPrimitiveStringAtPut(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt formatReg;
    AbstractInstruction *jumpBadArg;
    AbstractInstruction *jumpBadIndex;
    AbstractInstruction *jumpBytesOutOfBounds;
    AbstractInstruction *jumpBytesOutOfRange;
    AbstractInstruction * jumpImmutable;
    AbstractInstruction *jumpIsBytes;
    AbstractInstruction * jumpIsCompiledMethod;
    AbstractInstruction *jumpIsShorts;
    AbstractInstruction * jumpNotString;
    AbstractInstruction *jumpShortsOutOfBounds;
    AbstractInstruction *jumpShortsOutOfRange;
    AbstractInstruction *jumpWordsOutOfBounds;
    AbstractInstruction *jumpWordsOutOfRange;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt literal3;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;

	jumpImmutable = ((AbstractInstruction *) 0);
	/* begin genLoadArgAtDepth:into: */
	assert(1 < (numRegArgs()));
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, TempReg);
	jumpBadArg = genJumpNotCharacterInScratchReg(TempReg);
	genConvertSmallIntegerToIntegerInReg(Arg0Reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(SubCqR, 1, Arg0Reg);
	
#  if IMMUTABILITY
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), TempReg);
	/* begin genJumpBaseHeaderImmutable: */
	quickConstant4 = immutableBitMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction12 = genoperandoperand(TstCqR, quickConstant4, TempReg);
	/* begin JumpNonZero: */
	jumpImmutable = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
#  else /* IMMUTABILITY */
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), NoReg);
#  endif /* IMMUTABILITY */
	genGetNumSlotsOfinto(ReceiverResultReg, ClassReg);
	/* begin CmpCq:R: */
	quickConstant = firstLongFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, quickConstant, formatReg);
	/* begin JumpBelow: */
	jumpNotString = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant1 = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant1, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsCompiledMethod = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant2 = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant2, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsBytes = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant3 = firstShortFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(CmpCqR, quickConstant3, formatReg);
	/* begin JumpAboveOrEqual: */
	jumpIsShorts = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperand(CmpCqR, 0, Arg1Reg);
	/* begin JumpLess: */
	jumpWordsOutOfRange = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, ClassReg);
	/* begin JumpBelowOrEqual: */
	jumpWordsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertCharacterToCodeInReg(TempReg);
	/* begin AddCq:R: */
	anInstruction6 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg0Reg);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, TempReg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsShorts, gCmpCqR(characterObjectOf(0xFFFF), Arg1Reg));
	/* begin JumpAbove: */
	jumpShortsOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, (shiftForWord()) - 1, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = (BytesPerWord / 2) - 1;
	anInstruction7 = genoperandoperand(AndCqR, (BytesPerWord / 2) - 1, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, ClassReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, ClassReg);
	/* begin JumpBelowOrEqual: */
	jumpShortsOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertCharacterToCodeInReg(TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, Arg0Reg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BaseHeaderSize;
	anInstruction8 = genoperandoperandoperand(MoveRM16r, TempReg, BaseHeaderSize, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIsBytes, gCmpCqR(characterObjectOf(0xFF), Arg1Reg));
	/* begin JumpAbove: */
	jumpBytesOutOfRange = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	literal2 = BytesPerWord - 1;
	anInstruction9 = genoperandoperand(AndCqR, BytesPerWord - 1, formatReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, formatReg, ClassReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, Arg0Reg, ClassReg);
	/* begin JumpBelowOrEqual: */
	jumpBytesOutOfBounds = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, TempReg);
	genConvertCharacterToCodeInReg(TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal3 = BaseHeaderSize;
	anInstruction10 = genoperandoperand(AddCqR, BaseHeaderSize, Arg0Reg);
	/* begin MoveR:Xbr:R: */
	genoperandoperandoperand(MoveRXbrR, TempReg, Arg0Reg, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg1Reg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNotString, jmpTarget(jumpBytesOutOfRange, jmpTarget(jumpShortsOutOfRange, jmpTarget(jumpWordsOutOfRange, jmpTarget(jumpIsCompiledMethod, jmpTarget(jumpBytesOutOfBounds, jmpTarget(jumpShortsOutOfBounds, jmpTarget(jumpWordsOutOfBounds, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))))))));
	
#  if IMMUTABILITY
	jmpTarget(jumpImmutable, ((AbstractInstruction *) (((jumpNotString->operands))[0])));
#  endif /* IMMUTABILITY */
	/* begin checkQuickConstant:forInstruction: */
	anInstruction11 = genoperandoperand(AddCqR, 1, Arg0Reg);
	genConvertIntegerToSmallIntegerInReg(Arg0Reg);
	jmpTarget(jumpBadArg, jmpTarget(jumpBadIndex, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return CompletePrimitive;
}

	/* CogObjectRepresentationFor32BitSpur>>#genRemoveSmallIntegerTagsInScratchReg: */
static sqInt NoDbgRegParms
genRemoveSmallIntegerTagsInScratchReg(sqInt scratchReg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(SubCqR, 1, scratchReg);
	return 0;
}

	/* CogObjectRepresentationFor32BitSpur>>#genShiftAwaySmallIntegerTagsInScratchReg: */
static sqInt NoDbgRegParms
genShiftAwaySmallIntegerTagsInScratchReg(sqInt scratchReg)
{
	/* begin ArithmeticShiftRightCq:R: */
	genoperandoperand(ArithmeticShiftRightCqR, 1, scratchReg);
	return 0;
}


/*	Get the literal count of a CompiledMethod into headerReg, plus one if
	requested. If inBytes is true, scale the count by the word size. Deal with
	the possibility of
	the method being cogged. */

	/* CogObjectRepresentationFor32BitSpur>>#getLiteralCountOf:plusOne:inBytes:into:scratch: */
static sqInt NoDbgRegParms
getLiteralCountOfplusOneinBytesintoscratch(sqInt methodReg, sqInt plusOne, sqInt inBytes, sqInt litCountReg, sqInt scratchReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;

	genGetMethodHeaderOfintoscratch(methodReg, litCountReg, scratchReg);
	if (inBytes) {
		/* begin AndCq:R: */
		quickConstant = ((sqInt)((usqInt)((alternateHeaderNumLiteralsMask())) << 1));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(AndCqR, quickConstant, litCountReg);
		/* begin LogicalShiftLeftCq:R: */
		genoperandoperand(LogicalShiftLeftCqR, 1, litCountReg);
	}
	else {
		/* begin LogicalShiftRightCq:R: */
		genoperandoperand(LogicalShiftRightCqR, 1, litCountReg);
		/* begin AndCq:R: */
		quickConstant1 = alternateHeaderNumLiteralsMask();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(AndCqR, quickConstant1, litCountReg);
	}
	if (plusOne) {
		/* begin AddCq:R: */
		quickConstant2 = (inBytes
			? BytesPerWord
			: 1);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperand(AddCqR, quickConstant2, litCountReg);
	}
	return 0;
}


/*	Answer the relevant inline cache tag for an instance.
	c.f. getInlineCacheClassTagFrom:into: & inlineCacheTagForClass: */

	/* CogObjectRepresentationFor32BitSpur>>#inlineCacheTagForInstance: */
static sqInt NoDbgRegParms
inlineCacheTagForInstance(sqInt oop)
{
	return (isImmediate(oop)
		? oop & 1
		: classIndexOf(oop));
}

	/* CogObjectRepresentationFor32BitSpur>>#jumpNotSmallIntegerUnsignedValueInRegister: */
static AbstractInstruction * NoDbgRegParms
jumpNotSmallIntegerUnsignedValueInRegister(sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, 0x3FFFFFFF, reg);
	/* begin JumpAbove: */
	return genConditionalBranchoperand(JumpAbove, ((sqInt)0));
}


/*	Mark and trace a literal in an inline cache preceding address in
	cogMethodOrNil. Answer if code was modified. */

	/* CogObjectRepresentationFor32BitSpur>>#markAndTraceCacheTagLiteral:in:atpc: */
static sqInt NoDbgRegParms
markAndTraceCacheTagLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqInt address)
{
    sqInt objOop;

	if (!(couldBeObject(literal))) {
		return 0;
	}
	assert(addressCouldBeObj(literal));
	if (!(isForwarded(literal))) {
		markAndTrace(literal);
		return 0;
	}
	objOop = followForwarded(literal);
	rewriteInlineCacheTagat(backEnd(), objOop, address);
	markAndTraceUpdatedLiteralin(objOop, cogMethodOrNil);
	return 1;
}

	/* CogObjectRepresentationFor32BitSpur>>#numSmallIntegerBits */
static sqInt
numSmallIntegerBits(void)
{
	return 0x1F;
}


/*	The two valid tag patterns are 0 (Character) and 1 (SmallInteger) */

	/* CogObjectRepresentationFor32BitSpur>>#validInlineCacheTag: */
static sqInt NoDbgRegParms
validInlineCacheTag(usqInt classIndexOrTagPattern)
{
	return (classIndexOrTagPattern <= 1)
	 || ((classAtIndex(classIndexOrTagPattern)) != null);
}


/*	Answer if the cacheTag is not unmarked, i.e. answer true for compact class
	indices and immediates; only answer false for unmarked objects. In Spur
	linked send cache tags are class indices so effectively they're always
	marked.  */

	/* CogObjectRepresentationForSpur>>#cacheTagIsMarked: */
static sqInt NoDbgRegParms
cacheTagIsMarked(sqInt cacheTag)
{
	return 1;
}

	/* CogObjectRepresentationForSpur>>#callStoreCheckTrampoline */
static void
callStoreCheckTrampoline(void)
{
    AbstractInstruction *abstractInstruction;

	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceStoreCheckTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
}

	/* CogObjectRepresentationForSpur>>#checkValidDerivedObjectReference: */
static sqInt NoDbgRegParms
checkValidDerivedObjectReference(sqInt bodyAddress)
{
	return (heapMapAtWord(pointerForOop(bodyAddress - BaseHeaderSize))) != 0;
}

	/* CogObjectRepresentationForSpur>>#checkValidOopReference: */
static sqInt NoDbgRegParms
checkValidOopReference(sqInt anOop)
{
	return (isImmediate(anOop))
	 || ((heapMapAtWord(pointerForOop(anOop))) != 0);
}

	/* CogObjectRepresentationForSpur>>#couldBeDerivedObject: */
static sqInt NoDbgRegParms
couldBeDerivedObject(sqInt bodyAddress)
{
	return oopisGreaterThanOrEqualTo(bodyAddress - BaseHeaderSize, startOfMemory());
}

	/* CogObjectRepresentationForSpur>>#couldBeObject: */
static sqInt NoDbgRegParms
couldBeObject(sqInt literal)
{
	return (isNonImmediate(literal))
	 && (oopisGreaterThanOrEqualTo(literal, startOfMemory()));
}


/*	Create a trampoline to answer the active context that will
	answer it if a frame is already married, and create it otherwise.
	Assume numArgs is in SendNumArgsReg and ClassReg is free. */

	/* CogObjectRepresentationForSpur>>#genActiveContextTrampolineLarge:inBlock:called: */
static sqInt NoDbgRegParms
genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString)
{
    sqInt startAddress;

	startAddress = methodZoneBase();
	zeroOpcodeIndex();
	genGetActiveContextLargeinBlock(isLarge, isInBlock);
	outputInstructionsForGeneratedRuntimeAt(startAddress);
	recordGeneratedRunTimeaddress(aString, startAddress);
	recordRunTimeObjectReferences();
	return startAddress;
}

	/* CogObjectRepresentationForSpur>>#genAllocFloatValue:into:scratchReg:scratchReg: */
static AbstractInstruction * NoDbgRegParms
genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt scratch1, sqInt scratch2)
{
    sqInt address;
    sqInt address1;
    usqIntptr_t allocSize;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction21;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction31;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *jumpFail;
    sqInt literal;
    sqInt literal1;
    usqLong newFloatHeader;
    sqInt quickConstant;
    sqInt quickConstant1;

	allocSize = BaseHeaderSize + (sizeof(double));
	newFloatHeader = headerForSlotsformatclassIndex((sizeof(double)) / BytesPerWord, firstLongFormat(), ClassFloatCompactIndex);
	/* begin MoveAw:R: */
	address = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, resultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperandoperand(LoadEffectiveAddressMwrR, allocSize, resultReg, scratch1);
	/* begin CmpCq:R: */
	quickConstant = getScavengeThreshold();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant, scratch1);
	/* begin JumpAboveOrEqual: */
	jumpFail = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin MoveR:Aw: */
	address1 = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction3 = genoperandoperand(MoveRAw, scratch1, address1);
	/* begin genStoreHeader:intoNewInstance:using: */
	quickConstant1 = ((usqInt) newFloatHeader);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(MoveCqR, quickConstant1, scratch1);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction11 = genoperandoperandoperand(MoveRMwr, scratch1, 0, resultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = newFloatHeader >> 32;
	anInstruction21 = genoperandoperand(MoveCqR, newFloatHeader >> 32, scratch1);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction31 = genoperandoperandoperand(MoveRMwr, scratch1, 4, resultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BaseHeaderSize;
	anInstruction5 = genoperandoperandoperand(MoveRdM64r, dpreg, BaseHeaderSize, resultReg);
	return jumpFail;
}


/*	Check the remembered bit of the object in objReg; answer the jump taken if
	the bit is already set.
	Only need to fetch the byte containing it, which reduces the size of the
	mask constant.
 */

	/* CogObjectRepresentationForSpur>>#genCheckRememberedBitOf:scratch: */
static AbstractInstruction * NoDbgRegParms
genCheckRememberedBitOfscratch(sqInt objReg, sqInt scratchReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    int mask;
    sqInt rememberedBitByteOffset;

	rememberedBitByteOffset = (rememberedBitShift()) / 8;
	mask = 1U << ((rememberedBitShift()) % 8);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMbrR, rememberedBitByteOffset, objReg, scratchReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(TstCqR, mask, scratchReg);
	/* begin JumpNonZero: */
	return genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
}

	/* CogObjectRepresentationForSpur>>#genConvertCharacterToCodeInReg: */
static sqInt NoDbgRegParms
genConvertCharacterToCodeInReg(sqInt reg)
{
    sqInt quickConstant;

	/* begin LogicalShiftRightCq:R: */
	quickConstant = numTagBits();
	genoperandoperand(LogicalShiftRightCqR, quickConstant, reg);
	return 0;
}

	/* CogObjectRepresentationForSpur>>#genConvertIntegerToCharacterInReg: */
static sqInt NoDbgRegParms
genConvertIntegerToCharacterInReg(sqInt reg)
{
    AbstractInstruction *anInstruction;
    sqInt quickConstant;
    sqInt quickConstant1;

	/* begin LogicalShiftLeftCq:R: */
	quickConstant = numTagBits();
	genoperandoperand(LogicalShiftLeftCqR, quickConstant, reg);
	/* begin AddCq:R: */
	quickConstant1 = characterTag();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AddCqR, quickConstant1, reg);
	return 0;
}


/*	Create a closure with the given startpc, numArgs and numCopied
	within a context with ctxtNumArgs, large if isLargeCtxt that is in a
	block if isInBlock. If numCopied > 0 pop those values off the stack. */

	/* CogObjectRepresentationForSpur>>#genCreateClosureAt:numArgs:numCopied:contextNumArgs:large:inBlock: */
static sqInt NoDbgRegParms
genCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sqInt numArgs, sqInt numCopied, sqInt ctxtNumArgs, sqInt isLargeCtxt, sqInt isInBlock)
{
    AbstractInstruction *anInstruction;
    sqInt i;
    sqInt literal;

	genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(bcpc, numArgs, numCopied, ctxtNumArgs, isLargeCtxt, isInBlock);
	for (i = 1; i <= numCopied; i += 1) {
		/* begin PopR: */
		genoperand(PopR, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		literal = (((numCopied - i) + ClosureFirstCopiedValueIndex) * BytesPerOop) + BaseHeaderSize;
		anInstruction = genoperandoperandoperand(MoveRMwr, TempReg, (((numCopied - i) + ClosureFirstCopiedValueIndex) * BytesPerOop) + BaseHeaderSize, ReceiverResultReg);
	}
	return 0;
}


/*	Create a full closure with the given values. */

	/* CogObjectRepresentationForSpur>>#genCreateFullClosure:numArgs:numCopied:ignoreContext:contextNumArgs:large:inBlock: */
static sqInt NoDbgRegParms
genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(sqInt compiledBlock, sqInt numArgs, sqInt numCopied, sqInt ignoreContext, sqInt contextNumArgs, sqInt contextIsLarge, sqInt contextIsBlock)
{
    AbstractInstruction *abstractInstruction;
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    usqInt byteSize;
    sqInt constant;
    usqLong header;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt literal3;
    sqInt literal4;
    sqInt numSlots;
    sqInt quickConstant;
    sqInt quickConstant1;
    AbstractInstruction *skip;


	/* First get thisContext into ReceiverResultReg and thence in ClassReg. */
	if (ignoreContext) {
		/* begin genMoveConstant:R: */
		constant = nilObject();
		if (shouldAnnotateObjectReference(constant)) {
			annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ClassReg)), constant);
		}
		else {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction13 = genoperandoperand(MoveCqR, constant, ClassReg);
		}
	}
	else {
		genGetActiveContextNumArgslargeinBlock(contextNumArgs, contextIsLarge, contextIsBlock);
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, ReceiverResultReg, ClassReg);
	}
	numSlots = FullClosureFirstCopiedValueIndex + numCopied;
	byteSize = smallObjectBytesForSlots(numSlots);
	assert(ClassFullBlockClosureCompactIndex != 0);
	header = headerForSlotsformatclassIndex(numSlots, indexablePointersFormat(), ClassFullBlockClosureCompactIndex);
	/* begin MoveAw:R: */
	address = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveAwR, address, ReceiverResultReg);
	/* begin genStoreHeader:intoNewInstance:using: */
	quickConstant = ((usqInt) header);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(MoveCqR, quickConstant, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction11 = genoperandoperandoperand(MoveRMwr, TempReg, 0, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = header >> 32;
	anInstruction2 = genoperandoperand(MoveCqR, header >> 32, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperandoperand(MoveRMwr, TempReg, 4, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperandoperand(LoadEffectiveAddressMwrR, byteSize, ReceiverResultReg, TempReg);
	/* begin MoveR:Aw: */
	address1 = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction6 = genoperandoperand(MoveRAw, TempReg, address1);
	/* begin CmpCq:R: */
	quickConstant1 = getScavengeThreshold();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction7 = genoperandoperand(CmpCqR, quickConstant1, TempReg);
	/* begin JumpBelow: */
	skip = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceScheduleScavengeTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
	jmpTarget(skip, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin checkQuickConstant:forInstruction: */
	literal1 = (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize;
	anInstruction8 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg);
	if (shouldAnnotateObjectReference(compiledBlock)) {
		annotateobjRef(gMoveCwR(compiledBlock, TempReg), compiledBlock);
	}
	else {
		/* begin MoveCq:R: */
		anInstruction = genoperandoperand(MoveCqR, compiledBlock, TempReg);
	}
	/* begin checkQuickConstant:forInstruction: */
	literal2 = (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize;
	anInstruction9 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal3 = (((usqInt)numArgs << 1) | 1);
	anInstruction10 = genoperandoperand(MoveCqR, (((usqInt)numArgs << 1) | 1), TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal4 = (ClosureNumArgsIndex * BytesPerOop) + BaseHeaderSize;
	anInstruction12 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureNumArgsIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg);
	return 0;
}


/*	Make sure that the object in reg is not forwarded. This routine assumes
	the object will
	never be forwarded to an immediate, as it is used to unforward literal
	variables (associations). 
	Use the fact that isForwardedObjectClassIndexPun is a power of two to save
	an instruction. */

	/* CogObjectRepresentationForSpur>>#genEnsureObjInRegNotForwarded:scratchReg: */
static sqInt NoDbgRegParms
genEnsureObjInRegNotForwardedscratchReg(sqInt reg, sqInt scratch)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *loop;
    AbstractInstruction *ok;
    sqInt quickConstant;

	assert(reg != scratch);
	/* begin Label */
	loop = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, 0, reg, scratch);
	/* begin AndCq:R: */
	quickConstant = (classIndexMask()) - (isForwardedObjectClassIndexPun());
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant, scratch);
	/* begin JumpNonZero: */
	ok = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genLoadSlotsourceRegdestReg(0, reg, reg);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)loop));
	jmpTarget(ok, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}

	/* CogObjectRepresentationForSpur>>#genEnsureOopInRegNotForwarded:scratchReg: */
static sqInt NoDbgRegParms
genEnsureOopInRegNotForwardedscratchReg(sqInt reg, sqInt scratch)
{
    AbstractInstruction *instruction;

	/* begin genEnsureOopInRegNotForwarded:scratchReg:jumpBackTo: */
	instruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	return genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder(reg, scratch, instruction, 0);
}


/*	Make sure that the oop in reg is not forwarded. 
	Use the fact that isForwardedObjectClassIndexPun is a power of two to save
	an instruction. */

	/* CogObjectRepresentationForSpur>>#genEnsureOopInRegNotForwarded:scratchReg:ifForwarder:ifNotForwarder: */
static sqInt NoDbgRegParms
genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder(sqInt reg, sqInt scratch, sqInt fwdJumpTarget, sqInt nonFwdJumpTargetOrZero)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction * finished;
    AbstractInstruction * imm;
    AbstractInstruction * ok;
    sqInt quickConstant;

	assert(reg != scratch);

	/* notionally
	   self genGetClassIndexOfNonImm: reg into: scratch.
	   cogit CmpCq: objectMemory isForwardedObjectClassIndexPun R: TempReg.
	   but the following is an instruction shorter: */
	imm = genJumpImmediate(reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, 0, reg, scratch);
	/* begin AndCq:R: */
	quickConstant = (classIndexMask()) - (isForwardedObjectClassIndexPun());
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant, scratch);
	/* begin JumpNonZero: */
	ok = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genLoadSlotsourceRegdestReg(0, reg, reg);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)(((void *) fwdJumpTarget))));
	if ((((usqInt)nonFwdJumpTargetOrZero)) == 0) {
		/* begin Label */
		finished = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	}
	else {
		finished = nonFwdJumpTargetOrZero;
	}
	jmpTarget(imm, jmpTarget(ok, finished));
	return 0;
}


/*	Make sure that the oop in reg is not forwarded, updating the slot in
	objReg with the value.
 */

	/* CogObjectRepresentationForSpur>>#genEnsureOopInRegNotForwarded:scratchReg:updatingSlot:in: */
static sqInt NoDbgRegParms
genEnsureOopInRegNotForwardedscratchRegupdatingSlotin(sqInt reg, sqInt scratch, sqInt index, sqInt objReg)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *imm;
    sqInt literal;
    AbstractInstruction *loop;
    AbstractInstruction *ok;
    sqInt quickConstant;


	/* Open-code
	   self genEnsureOopInRegNotForwarded: reg
	   scratchReg: scratch
	   updatingMw: index * objectMemory wordSize + objectMemory baseHeaderSize
	   r: objReg.
	   to avoid calling the store check unless the receiver is forwarded. */
	assert((reg != scratch)
	 && (objReg != scratch));
	/* begin Label */
	loop = genoperandoperand(Label, (labelCounter += 1), bytecodePC);

	/* notionally
	   self genGetClassIndexOfNonImm: reg into: scratch.
	   cogit CmpCq: objectMemory isForwardedObjectClassIndexPun R: TempReg.
	   but the following is an instruction shorter: */
	imm = genJumpImmediate(reg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, 0, reg, scratch);
	/* begin AndCq:R: */
	quickConstant = (classIndexMask()) - (isForwardedObjectClassIndexPun());
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant, scratch);
	/* begin JumpNonZero: */
	ok = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genLoadSlotsourceRegdestReg(0, reg, reg);
	/* begin checkQuickConstant:forInstruction: */
	literal = (index * BytesPerWord) + BaseHeaderSize;
	anInstruction2 = genoperandoperandoperand(MoveRMwr, reg, (index * BytesPerWord) + BaseHeaderSize, objReg);
	assert((reg == Arg0Reg)
	 && ((scratch == TempReg)
	 && (objReg == ReceiverResultReg)));
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceStoreCheckContextReceiverTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)loop));
	jmpTarget(ok, jmpTarget(imm, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return 0;
}


/*	Do the store check. Answer the argument for the benefit of the code
	generator; ReceiverResultReg may be caller-saved and hence smashed by this
	call. Answering
	it allows the code generator to reload ReceiverResultReg cheaply.
	In Spur the only thing we leave to the run-time is adding the receiver to
	the remembered set and setting its isRemembered bit. */

	/* CogObjectRepresentationForSpur>>#generateObjectRepresentationTrampolines */
static void
generateObjectRepresentationTrampolines(void)
{
    sqInt instVarIndex;
    AbstractInstruction *jumpSC;

	
#  if IMMUTABILITY
	for (instVarIndex = 0; instVarIndex < NumStoreTrampolines; instVarIndex += 1) {
		ceStoreTrampolines[instVarIndex] = (genStoreTrampolineCalledinstVarIndex(trampolineNamenumArgslimit("ceStoreTrampoline", instVarIndex, NumStoreTrampolines - 2), instVarIndex));
	}
#  endif /* IMMUTABILITY */
	ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, /* begin emptyRegisterMask */ 0, 1, ReceiverResultReg, 0);
	/* begin genStoreCheckTrampoline */
	if (CheckRememberedInTrampoline) {
		zeroOpcodeIndex();
		jumpSC = genCheckRememberedBitOfscratch(ReceiverResultReg, EAX);
		assert(((jumpSC->opcode)) == JumpNonZero);
		(jumpSC->opcode = JumpZero);
		/* begin RetN: */
		genoperand(RetN, 0);
		jmpTarget(jumpSC, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	}
	ceStoreCheckTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(remember, "ceStoreCheckTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, (CallerSavedRegisterMask & (1U << ReceiverResultReg)
		? ReceiverResultReg
		: /* begin cResultRegister */ EAX), CheckRememberedInTrampoline);
	ceStoreCheckContextReceiverTrampoline = genStoreCheckContextReceiverTrampoline();
	ceScheduleScavengeTrampoline = genTrampolineForcalledregsToSave(ceScheduleScavenge, "ceScheduleScavengeTrampoline", CallerSavedRegisterMask);
	ceSmallActiveContextInMethodTrampoline = genActiveContextTrampolineLargeinBlockcalled(0, 0, "ceSmallMethodContext");
	ceSmallActiveContextInBlockTrampoline = genActiveContextTrampolineLargeinBlockcalled(0, InVanillaBlock, "ceSmallBlockContext");
	ceSmallActiveContextInFullBlockTrampoline = genActiveContextTrampolineLargeinBlockcalled(0, InFullBlock, "ceSmallFullBlockContext");
	ceLargeActiveContextInMethodTrampoline = genActiveContextTrampolineLargeinBlockcalled(1, 0, "ceLargeMethodContext");
	ceLargeActiveContextInBlockTrampoline = genActiveContextTrampolineLargeinBlockcalled(1, InVanillaBlock, "ceLargeBlockContext");
	ceLargeActiveContextInFullBlockTrampoline = genActiveContextTrampolineLargeinBlockcalled(1, InFullBlock, "ceLargeFullBlockContext");
	}


/*	Create a trampoline to answer the active context that will
	answer it if a frame is already married, and create it otherwise.
	Assume numArgs is in SendNumArgsReg and ClassReg is free. */

	/* CogObjectRepresentationForSpur>>#genGetActiveContextLarge:inBlock: */
static sqInt NoDbgRegParms
genGetActiveContextLargeinBlock(sqInt isLarge, sqInt isInBlock)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction16;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction18;
    AbstractInstruction *anInstruction19;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction20;
    AbstractInstruction *anInstruction21;
    AbstractInstruction *anInstruction22;
    AbstractInstruction *anInstruction23;
    AbstractInstruction *anInstruction24;
    AbstractInstruction *anInstruction25;
    AbstractInstruction *anInstruction26;
    AbstractInstruction *anInstruction27;
    AbstractInstruction *anInstruction28;
    AbstractInstruction *anInstruction29;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction30;
    AbstractInstruction *anInstruction31;
    AbstractInstruction *anInstruction32;
    AbstractInstruction *anInstruction33;
    AbstractInstruction *anInstruction34;
    AbstractInstruction *anInstruction35;
    AbstractInstruction *anInstruction36;
    AbstractInstruction *anInstruction37;
    AbstractInstruction *anInstruction38;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt constant;
    AbstractInstruction *continuation;
    AbstractInstruction *exit;
    usqLong header;
    AbstractInstruction *jumpNeedScavenge;
    AbstractInstruction *jumpSingle;
    sqInt literal;
    sqInt literal1;
    sqInt literal10;
    sqInt literal2;
    sqInt literal3;
    sqInt literal4;
    sqInt literal5;
    sqInt literal6;
    sqInt literal7;
    sqInt literal8;
    sqInt literal9;
    AbstractInstruction *loopHead;
    sqInt offset;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt slotSize;


	/* load the flag; stash it in both TempReg & ClassReg; do the compare (a prime candidated for use of AndCq:R:R:) */
	/* begin checkQuickConstant:forInstruction: */
	anInstruction7 = genoperandoperandoperand(MoveMwrR, FoxMethod, FPReg, ClassReg);
	gAndCqRR(MFMethodFlagHasContextFlag, ClassReg, TempReg);
	/* begin JumpZero: */
	jumpSingle = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction8 = genoperandoperandoperand(MoveMwrR, FoxThisContext, FPReg, ReceiverResultReg);
	/* begin RetN: */
	genoperand(RetN, 0);
	jmpTarget(jumpSingle, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction9 = genoperandoperand(OrCqR, MFMethodFlagHasContextFlag, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction10 = genoperandoperandoperand(MoveRMwr, ClassReg, FoxMethod, FPReg);
	
	switch (isInBlock) {
	case InFullBlock:
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(SubCqR, 3, ClassReg);
		break;
	case InVanillaBlock:
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(SubCqR, 3, ClassReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperandoperand(MoveM16rR, 0, ClassReg, TempReg);
		/* begin SubR:R: */
		genoperandoperand(SubRR, TempReg, ClassReg);
		break;
	case 0:
		/* begin checkQuickConstant:forInstruction: */
		anInstruction3 = genoperandoperand(SubCqR, 1, ClassReg);
		break;
	default:
		error("Case not found and no otherwise clause");
	}
	slotSize = (isLarge
		? LargeContextSlots
		: SmallContextSlots);
	header = headerForSlotsformatclassIndex(slotSize, indexablePointersFormat(), ClassMethodContextCompactIndex);
	flag("endianness");
	/* begin MoveAw:R: */
	address = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction11 = genoperandoperand(MoveAwR, address, ReceiverResultReg);
	/* begin genStoreHeader:intoNewInstance:using: */
	quickConstant2 = ((usqInt) header);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction13 = genoperandoperand(MoveCqR, quickConstant2, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction12 = genoperandoperandoperand(MoveRMwr, TempReg, 0, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = header >> 32;
	anInstruction21 = genoperandoperand(MoveCqR, header >> 32, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction31 = genoperandoperandoperand(MoveRMwr, TempReg, 4, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
	/* begin AddCq:R: */
	quickConstant3 = smallObjectBytesForSlots(slotSize);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction14 = genoperandoperand(AddCqR, quickConstant3, TempReg);
	/* begin MoveR:Aw: */
	address1 = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction15 = genoperandoperand(MoveRAw, TempReg, address1);
	/* begin CmpCq:R: */
	quickConstant4 = getScavengeThreshold();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction16 = genoperandoperand(CmpCqR, quickConstant4, TempReg);
	/* begin JumpAboveOrEqual: */
	jumpNeedScavenge = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	/* begin MoveR:R: */
	continuation = genoperandoperand(MoveRR, FPReg, TempReg);
	genSetSmallIntegerTagsIn(TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BaseHeaderSize + (SenderIndex * BytesPerOop);
	anInstruction17 = genoperandoperandoperand(MoveRMwr, TempReg, BaseHeaderSize + (SenderIndex * BytesPerOop), ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction18 = genoperandoperandoperand(MoveMwrR, FoxSavedFP, FPReg, TempReg);
	genSetSmallIntegerTagsIn(TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal2 = BaseHeaderSize + (InstructionPointerIndex * BytesPerOop);
	anInstruction19 = genoperandoperandoperand(MoveRMwr, TempReg, BaseHeaderSize + (InstructionPointerIndex * BytesPerOop), ReceiverResultReg);
	/* begin MoveMw:r:R: */
	offset = offsetof(CogMethod, methodObject);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction20 = genoperandoperandoperand(MoveMwrR, offset, ClassReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal3 = BaseHeaderSize + (MethodIndex * BytesPerWord);
	anInstruction22 = genoperandoperandoperand(MoveRMwr, TempReg, BaseHeaderSize + (MethodIndex * BytesPerWord), ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction23 = genoperandoperandoperand(MoveRMwr, ReceiverResultReg, FoxThisContext, FPReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, FPReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, SPReg, TempReg);
	/* begin LogicalShiftRightCq:R: */
	quickConstant = 2 /* log2BytesPerWord */;
	genoperandoperand(LogicalShiftRightCqR, quickConstant, TempReg);
	/* begin SubCq:R: */
	quickConstant5 = 4;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction24 = genoperandoperand(SubCqR, quickConstant5, TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, SendNumArgsReg, TempReg);
	genConvertIntegerToSmallIntegerInReg(TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal4 = BaseHeaderSize + (StackPointerIndex * BytesPerOop);
	anInstruction25 = genoperandoperandoperand(MoveRMwr, TempReg, BaseHeaderSize + (StackPointerIndex * BytesPerOop), ReceiverResultReg);
	if (isInBlock > 0) {
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, SendNumArgsReg, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction4 = genoperandoperand(AddCqR, 2, TempReg);
		/* begin MoveXwr:R:R: */
		genoperandoperandoperand(MoveXwrRR, TempReg, FPReg, TempReg);
	}
	else {
		/* begin genMoveConstant:R: */
		constant = nilObject();
		if (shouldAnnotateObjectReference(constant)) {
			annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, TempReg)), constant);
		}
		else {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction38 = genoperandoperand(MoveCqR, constant, TempReg);
		}
	}
	/* begin checkQuickConstant:forInstruction: */
	literal5 = BaseHeaderSize + (ClosureIndex * BytesPerOop);
	anInstruction26 = genoperandoperandoperand(MoveRMwr, TempReg, BaseHeaderSize + (ClosureIndex * BytesPerOop), ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction27 = genoperandoperandoperand(MoveMwrR, FoxMFReceiver, FPReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal6 = BaseHeaderSize + (ReceiverIndex * BytesPerOop);
	anInstruction28 = genoperandoperandoperand(MoveRMwr, TempReg, BaseHeaderSize + (ReceiverIndex * BytesPerOop), ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction29 = genoperandoperand(MoveCqR, 1, ClassReg);
	/* begin CmpR:R: */
	loopHead = genoperandoperand(CmpRR, SendNumArgsReg, ClassReg);
	/* begin JumpGreater: */
	exit = genConditionalBranchoperand(JumpGreater, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SendNumArgsReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, ClassReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction30 = genoperandoperand(AddCqR, 2, TempReg);
	/* begin MoveXwr:R:R: */
	genoperandoperandoperand(MoveXwrRR, TempReg, FPReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal7 = ReceiverIndex + (BaseHeaderSize / BytesPerWord);
	anInstruction32 = genoperandoperand(AddCqR, ReceiverIndex + (BaseHeaderSize / BytesPerWord), ClassReg);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, TempReg, ClassReg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal8 = (ReceiverIndex + (BaseHeaderSize / BytesPerWord)) - 1;
	anInstruction33 = genoperandoperand(SubCqR, (ReceiverIndex + (BaseHeaderSize / BytesPerWord)) - 1, ClassReg);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)loopHead));
	jmpTarget(exit, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin MoveCq:R: */
	quickConstant1 = nilObject();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperand(MoveCqR, quickConstant1, TempReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, FPReg, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction34 = genoperandoperand(AddCqR, FoxMFReceiver, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	literal9 = (ReceiverIndex + 1) + (BaseHeaderSize / BytesPerWord);
	anInstruction35 = genoperandoperand(AddCqR, (ReceiverIndex + 1) + (BaseHeaderSize / BytesPerWord), SendNumArgsReg);
	/* begin checkQuickConstant:forInstruction: */
	literal10 = BytesPerWord;
	anInstruction36 = genoperandoperand(SubCqR, BytesPerWord, ClassReg);
	loopHead = anInstruction36;
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, SPReg, ClassReg);
	/* begin JumpBelowOrEqual: */
	exit = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0));
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, TempReg, SendNumArgsReg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction37 = genoperandoperand(AddCqR, 1, SendNumArgsReg);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)loopHead));
	jmpTarget(exit, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin RetN: */
	genoperand(RetN, 0);
	jmpTarget(jumpNeedScavenge, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin saveAndRestoreLinkRegAround: */
	CallRTregistersToBeSavedMask(ceScheduleScavengeTrampoline, ((1U << ReceiverResultReg) | (1U << SendNumArgsReg)) | (1U << ClassReg));
	/* begin Jump: */
	genoperand(Jump, ((sqInt)continuation));
	return 0;
}


/*	Get the active context into ReceiverResultReg, creating it if necessary. */

	/* CogObjectRepresentationForSpur>>#genGetActiveContextNumArgs:large:inBlock: */
static sqInt NoDbgRegParms
genGetActiveContextNumArgslargeinBlock(sqInt numArgs, sqInt isLargeContext, sqInt isInBlock)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    sqInt routine;

	if (isLargeContext) {
		
		switch (isInBlock) {
		case 0:
			routine = ceLargeActiveContextInMethodTrampoline;

			break;
		case InVanillaBlock:
			routine = ceLargeActiveContextInBlockTrampoline;

			break;
		case InFullBlock:
			routine = ceLargeActiveContextInFullBlockTrampoline;

			break;
		default:
			error("Case not found and no otherwise clause");
			routine = -1;
		}
	}
	else {
		
		switch (isInBlock) {
		case 0:
			routine = ceSmallActiveContextInMethodTrampoline;

			break;
		case InVanillaBlock:
			routine = ceSmallActiveContextInBlockTrampoline;

			break;
		case InFullBlock:
			routine = ceSmallActiveContextInFullBlockTrampoline;

			break;
		default:
			error("Case not found and no otherwise clause");
			routine = -1;
		}
	}
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(MoveCqR, numArgs, SendNumArgsReg);
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, routine);
	(abstractInstruction->annotation = IsRelativeCall);
	return 0;
}

	/* CogObjectRepresentationForSpur>>#genGetBits:ofFormatByteOf:into: */
static sqInt NoDbgRegParms
genGetBitsofFormatByteOfinto(sqInt mask, sqInt sourceReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;

	flag("endianness");
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMbrR, 3, sourceReg, destReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, mask, destReg);
	return 0;
}


/*	Fetch the instance's class index into destReg. */

	/* CogObjectRepresentationForSpur>>#genGetClassIndexOfNonImm:into: */
static sqInt NoDbgRegParms
genGetClassIndexOfNonImminto(sqInt sourceReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt quickConstant;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, 0, sourceReg, destReg);
	/* begin AndCq:R: */
	quickConstant = classIndexMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, quickConstant, destReg);
	return 0;
}


/*	Fetch the class object whose index is in instReg into destReg.
	It is non-obvious, but the Cogit assumes loading a class does not involve
	a runtime call, so do not call classAtIndex: */

	/* CogObjectRepresentationForSpur>>#genGetClassObjectOfClassIndex:into:scratchReg: */
static sqInt NoDbgRegParms
genGetClassObjectOfClassIndexintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    sqInt offset;
    sqInt quickConstant;
    sqInt quickConstant2;

	assert(instReg != destReg);
	assert(instReg != scratchReg);
	assert(destReg != scratchReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, instReg, scratchReg);
	/* begin LogicalShiftRightCq:R: */
	quickConstant = classTableMajorIndexShift();
	genoperandoperand(LogicalShiftRightCqR, quickConstant, scratchReg);
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), scratchReg);
	assert(!(shouldAnnotateObjectReference(classTableRootObj())));
	/* begin MoveMw:r:R: */
	offset = (classTableRootObj()) + BaseHeaderSize;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, offset, scratchReg, destReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, instReg, scratchReg);
	/* begin AndCq:R: */
	quickConstant2 = classTableMinorIndexMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(AndCqR, quickConstant2, scratchReg);
	/* begin AddCq:R: */
	anInstruction4 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), scratchReg);
	/* begin MoveXwr:R:R: */
	genoperandoperandoperand(MoveXwrRR, scratchReg, destReg, destReg);
	return 0;
}


/*	Fetch the instance's class into destReg. If the instance is not the
	receiver and is forwarded, follow forwarding. */

	/* CogObjectRepresentationForSpur>>#genGetClassObjectOf:into:scratchReg:instRegIsReceiver: */
static sqInt NoDbgRegParms
genGetClassObjectOfintoscratchReginstRegIsReceiver(sqInt instReg, sqInt destReg, sqInt scratchReg, sqInt instRegIsReceiver)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *jumpIsImm;
    AbstractInstruction *jumpNotForwarded;
    sqInt literal;
    AbstractInstruction *loop;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;

	if ((instReg == destReg)
	 || ((instReg == scratchReg)
	 || (destReg == scratchReg))) {
		return BadRegisterSet;
	}
	/* begin MoveR:R: */
	loop = genoperandoperand(MoveRR, instReg, scratchReg);
	/* begin AndCq:R: */
	quickConstant1 = tagMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(AndCqR, quickConstant1, scratchReg);
	/* begin JumpNonZero: */
	jumpIsImm = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	flag("endianness");
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperandoperand(MoveMwrR, 0, instReg, scratchReg);
	/* begin AndCq:R: */
	quickConstant2 = classIndexMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(AndCqR, quickConstant2, scratchReg);
	if (!instRegIsReceiver) {

		/* if it is forwarded... */
		/* begin CmpCq:R: */
		quickConstant = isForwardedObjectClassIndexPun();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(CmpCqR, quickConstant, scratchReg);
		/* begin JumpNonZero: */
		jumpNotForwarded = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
		/* begin checkQuickConstant:forInstruction: */
		literal = BaseHeaderSize;
		anInstruction1 = genoperandoperandoperand(MoveMwrR, BaseHeaderSize, instReg, instReg);
		/* begin Jump: */
		genoperand(Jump, ((sqInt)loop));
		jmpTarget(jumpNotForwarded, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	}
	jmpTarget(jumpIsImm, genoperandoperand(MoveRR, scratchReg, destReg));
	if (scratchReg == TempReg) {
		/* begin PushR: */
		genoperand(PushR, instReg);
		genGetClassObjectOfClassIndexintoscratchReg(destReg, instReg, TempReg);
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, instReg, destReg);
		/* begin PopR: */
		genoperand(PopR, instReg);
	}
	else {
		genGetClassObjectOfClassIndexintoscratchReg(destReg, scratchReg, TempReg);
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, scratchReg, destReg);
	}
	return 0;
}

	/* CogObjectRepresentationForSpur>>#genGetClassTagOf:into:scratchReg: */
static AbstractInstruction * NoDbgRegParms
genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg)
{
	return genGetInlineCacheClassTagFromintoforEntry(instReg, destReg, 1);
}


/*	Fetch the instance's class index into destReg. */

	/* CogObjectRepresentationForSpur>>#genGetCompactClassIndexNonImmOf:into: */
static sqInt NoDbgRegParms
genGetCompactClassIndexNonImmOfinto(sqInt instReg, sqInt destReg)
{
	return genGetClassIndexOfNonImminto(instReg, destReg);
}

	/* CogObjectRepresentationForSpur>>#genGetDoubleValueOf:into: */
static sqInt NoDbgRegParms
genGetDoubleValueOfinto(sqInt srcReg, sqInt destFPReg)
{
    AbstractInstruction *anInstruction;
    sqInt literal;

	/* begin checkQuickConstant:forInstruction: */
	literal = BaseHeaderSize;
	anInstruction = genoperandoperandoperand(MoveM64rRd, BaseHeaderSize, srcReg, destFPReg);
	return 0;
}


/*	Get the format field of the object in srcReg into destReg.
	srcReg may equal destReg. */

	/* CogObjectRepresentationForSpur>>#genGetFormatOf:into: */
static sqInt NoDbgRegParms
genGetFormatOfinto(sqInt srcReg, sqInt destReg)
{
	return genGetBitsofFormatByteOfinto(formatMask(), srcReg, destReg);
}


/*	Get the format of the object in sourceReg into destReg. If
	scratchRegOrNone is not NoReg, load at least the least significant 32-bits
	(64-bits in 64-bits) of the
	header word, which contains the format, into scratchRegOrNone. */

	/* CogObjectRepresentationForSpur>>#genGetFormatOf:into:leastSignificantHalfOfBaseHeaderIntoScratch: */
static sqInt NoDbgRegParms
genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(sqInt sourceReg, sqInt destReg, sqInt scratchRegOrNone)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    sqInt quickConstant;
    sqInt quickConstant1;

	if (scratchRegOrNone == NoReg) {
		flag("endianness");
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperandoperand(MoveMbrR, 3, sourceReg, destReg);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperandoperand(MoveMwrR, 0, sourceReg, destReg);
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, destReg, scratchRegOrNone);
		/* begin LogicalShiftRightCq:R: */
		quickConstant = formatShift();
		genoperandoperand(LogicalShiftRightCqR, quickConstant, destReg);
	}
	/* begin AndCq:R: */
	quickConstant1 = formatMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(AndCqR, quickConstant1, destReg);
	return 0;
}


/*	Get the size in word-sized slots of the object in srcReg into destReg.
	srcReg may equal destReg. */

	/* CogObjectRepresentationForSpur>>#genGetNumSlotsOf:into: */
static sqInt NoDbgRegParms
genGetNumSlotsOfinto(sqInt srcReg, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *jmp;
    sqInt quickConstant;

	assert(srcReg != destReg);
	genGetRawSlotSizeOfNonImminto(srcReg, destReg);
	/* begin CmpCq:R: */
	quickConstant = numSlotsMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, quickConstant, destReg);
	/* begin JumpLess: */
	jmp = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	genGetOverflowSlotsOfinto(srcReg, destReg);
	jmpTarget(jmp, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}


/*	The raw numSlots field is the most significant byte of the 64-bit header
	word. MoveMbrR zero-extends. */

	/* CogObjectRepresentationForSpur>>#genGetRawSlotSizeOfNonImm:into: */
static sqInt NoDbgRegParms
genGetRawSlotSizeOfNonImminto(sqInt sourceReg, sqInt destReg)
{
    AbstractInstruction *anInstruction1;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperandoperand(MoveMbrR, 7, sourceReg, destReg);
	return 0;
}

	/* CogObjectRepresentationForSpur>>#genJumpImmediate: */
static AbstractInstruction * NoDbgRegParms
genJumpImmediate(sqInt aRegister)
{
    AbstractInstruction *anInstruction;
    sqInt quickConstant;

	/* begin TstCq:R: */
	quickConstant = tagMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(TstCqR, quickConstant, aRegister);
	/* begin JumpNonZero: */
	return genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
}

	/* CogObjectRepresentationForSpur>>#genJumpImmutable:scratchReg: */
#if IMMUTABILITY
static AbstractInstruction * NoDbgRegParms
genJumpImmutablescratchReg(sqInt sourceReg, sqInt scratchReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt quickConstant;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, 0, sourceReg, scratchReg);
	/* begin genJumpBaseHeaderImmutable: */
	quickConstant = immutableBitMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(TstCqR, quickConstant, scratchReg);
	/* begin JumpNonZero: */
	return genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
}
#endif /* IMMUTABILITY */

	/* CogObjectRepresentationForSpur>>#genJumpMutable:scratchReg: */
#if IMMUTABILITY
static AbstractInstruction * NoDbgRegParms
genJumpMutablescratchReg(sqInt sourceReg, sqInt scratchReg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt quickConstant;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, 0, sourceReg, scratchReg);
	/* begin genJumpBaseHeaderMutable: */
	quickConstant = immutableBitMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(TstCqR, quickConstant, scratchReg);
	/* begin JumpZero: */
	return genConditionalBranchoperand(JumpZero, ((sqInt)0));
}
#endif /* IMMUTABILITY */

	/* CogObjectRepresentationForSpur>>#genJumpNotCharacterInScratchReg: */
static AbstractInstruction * NoDbgRegParms
genJumpNotCharacterInScratchReg(sqInt reg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt quickConstant;
    sqInt quickConstant1;

	/* begin AndCq:R: */
	quickConstant = tagMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AndCqR, quickConstant, reg);
	/* begin CmpCq:R: */
	quickConstant1 = characterTag();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, quickConstant1, reg);
	/* begin JumpNonZero: */
	return genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
}


/*	Generate a call to code that allocates a new Array of size.
	The Array should be initialized with nils iff initialized is true.
	The size arg is passed in SendNumArgsReg, the result
	must come back in ReceiverResultReg. */

	/* CogObjectRepresentationForSpur>>#genNewArrayOfSize:initialized: */
static sqInt NoDbgRegParms
genNewArrayOfSizeinitialized(sqInt size, sqInt initialized)
{
    AbstractInstruction *abstractInstruction;
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    sqInt constant;
    usqLong header;
    sqInt i;
    sqInt literal;
    sqInt literal1;
    sqInt offset;
    sqInt quickConstant;
    sqInt quickConstant1;
    AbstractInstruction *skip;

	assert(size < (numSlotsMask()));
	header = headerForSlotsformatclassIndex(size, arrayFormat(), ClassArrayCompactIndex);
	/* begin MoveAw:R: */
	address = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveAwR, address, ReceiverResultReg);
	/* begin genStoreHeader:intoNewInstance:using: */
	quickConstant = ((usqInt) header);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(MoveCqR, quickConstant, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction11 = genoperandoperandoperand(MoveRMwr, TempReg, 0, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = header >> 32;
	anInstruction2 = genoperandoperand(MoveCqR, header >> 32, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperandoperand(MoveRMwr, TempReg, 4, ReceiverResultReg);
	if (initialized
	 && (size > 0)) {
		/* begin genMoveConstant:R: */
		constant = nilObject();
		if (shouldAnnotateObjectReference(constant)) {
			annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, TempReg)), constant);
		}
		else {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction8 = genoperandoperand(MoveCqR, constant, TempReg);
		}
		for (i = 0; i < size; i += 1) {
			/* begin checkQuickConstant:forInstruction: */
			literal = (i * BytesPerWord) + BaseHeaderSize;
			anInstruction = genoperandoperandoperand(MoveRMwr, TempReg, (i * BytesPerWord) + BaseHeaderSize, ReceiverResultReg);
		}
	}
	/* begin LoadEffectiveAddressMw:r:R: */
	offset = smallObjectBytesForSlots(size);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperandoperand(LoadEffectiveAddressMwrR, offset, ReceiverResultReg, TempReg);
	/* begin MoveR:Aw: */
	address1 = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction6 = genoperandoperand(MoveRAw, TempReg, address1);
	/* begin CmpCq:R: */
	quickConstant1 = getScavengeThreshold();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction7 = genoperandoperand(CmpCqR, quickConstant1, TempReg);
	/* begin JumpBelow: */
	skip = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceScheduleScavengeTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
	jmpTarget(skip, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}


/*	Create a closure with the given startpc, numArgs and numCopied
	within a context with ctxtNumArgs, large if isLargeCtxt that is in a
	block if isInBlock. Do /not/ initialize the copied values. */

	/* CogObjectRepresentationForSpur>>#genNoPopCreateClosureAt:numArgs:numCopied:contextNumArgs:large:inBlock: */
static sqInt NoDbgRegParms
genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(sqInt bcpc, sqInt numArgs, sqInt numCopied, sqInt ctxtNumArgs, sqInt isLargeCtxt, sqInt isInBlock)
{
    AbstractInstruction *abstractInstruction;
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    usqInt byteSize;
    usqLong header;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt literal3;
    sqInt literal4;
    sqInt literal5;
    sqInt numSlots;
    sqInt quickConstant;
    sqInt quickConstant1;
    AbstractInstruction *skip;


	/* First get thisContext into ReceiverResultRega and thence in ClassReg. */
	genGetActiveContextNumArgslargeinBlock(ctxtNumArgs, isLargeCtxt, isInBlock);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, ClassReg);
	numSlots = ClosureFirstCopiedValueIndex + numCopied;
	byteSize = smallObjectBytesForSlots(numSlots);
	header = headerForSlotsformatclassIndex(numSlots, indexablePointersFormat(), ClassBlockClosureCompactIndex);
	/* begin MoveAw:R: */
	address = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, ReceiverResultReg);
	/* begin genStoreHeader:intoNewInstance:using: */
	quickConstant = ((usqInt) header);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(MoveCqR, quickConstant, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperandoperand(MoveRMwr, TempReg, 0, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = header >> 32;
	anInstruction2 = genoperandoperand(MoveCqR, header >> 32, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperandoperand(MoveRMwr, TempReg, 4, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperandoperand(LoadEffectiveAddressMwrR, byteSize, ReceiverResultReg, TempReg);
	/* begin MoveR:Aw: */
	address1 = freeStartAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction6 = genoperandoperand(MoveRAw, TempReg, address1);
	/* begin CmpCq:R: */
	quickConstant1 = getScavengeThreshold();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction7 = genoperandoperand(CmpCqR, quickConstant1, TempReg);
	/* begin JumpBelow: */
	skip = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceScheduleScavengeTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
	jmpTarget(skip, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin checkQuickConstant:forInstruction: */
	literal1 = (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize;
	anInstruction8 = genoperandoperandoperand(MoveRMwr, ClassReg, (ClosureOuterContextIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal2 = (((usqInt)bcpc << 1) | 1);
	anInstruction9 = genoperandoperand(MoveCqR, (((usqInt)bcpc << 1) | 1), TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal3 = (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize;
	anInstruction10 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureStartPCIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	literal4 = (((usqInt)numArgs << 1) | 1);
	anInstruction11 = genoperandoperand(MoveCqR, (((usqInt)numArgs << 1) | 1), TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal5 = (ClosureNumArgsIndex * BytesPerOop) + BaseHeaderSize;
	anInstruction12 = genoperandoperandoperand(MoveRMwr, TempReg, (ClosureNumArgsIndex * BytesPerOop) + BaseHeaderSize, ReceiverResultReg);
	return 0;
}

	/* CogObjectRepresentationForSpur>>#genPrimitiveAsCharacter */
static sqInt
genPrimitiveAsCharacter(void)
{
    AbstractInstruction *jumpNotInt;
    AbstractInstruction *jumpOutOfRange;
    sqInt reg;

	jumpNotInt = ((AbstractInstruction *) 0);
	if (methodOrBlockNumArgs == 0) {
		reg = ReceiverResultReg;
	}
	else {
		if (methodOrBlockNumArgs > 1) {
			return UnimplementedPrimitive;
		}
		reg = Arg0Reg;
		/* begin genLoadArgAtDepth:into: */
		assert(0 < (numRegArgs()));
		/* begin genJumpNotSmallInteger:scratchReg: */
		jumpNotInt = genJumpNotSmallInteger(reg);
	}
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, reg, TempReg);
	genConvertSmallIntegerToIntegerInReg(TempReg);
	jumpOutOfRange = jumpNotCharacterUnsignedValueInRegister(TempReg);
	genConvertSmallIntegerToCharacterInReg(reg);
	if (reg != ReceiverResultReg) {
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, reg, ReceiverResultReg);
	}
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpOutOfRange, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	if (reg != ReceiverResultReg) {
		jmpTarget(jumpNotInt, ((AbstractInstruction *) (((jumpOutOfRange->operands))[0])));
	}
	return CompletePrimitive;
}


/*	Generate primitive 60, at: with unsigned access for pure bits classes. */

	/* CogObjectRepresentationForSpur>>#genPrimitiveAt */
static sqInt
genPrimitiveAt(void)
{
	return genPrimitiveAtSigned(0);
}

	/* CogObjectRepresentationForSpur>>#genPrimitiveIdenticalOrNotIf: */
static sqInt NoDbgRegParms
genPrimitiveIdenticalOrNotIf(sqInt orNot)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *comp;
    sqInt constant;
    sqInt constant1;
    AbstractInstruction *jumpCmp;

	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin CmpR:R: */
	comp = genoperandoperand(CmpRR, Arg0Reg, ReceiverResultReg);
	if (orNot) {
		/* begin JumpZero: */
		jumpCmp = genConditionalBranchoperand(JumpZero, ((sqInt)0));
		/* begin genEnsureOopInRegNotForwarded:scratchReg:jumpBackTo: */
		genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder(Arg0Reg, TempReg, comp, 0);
	}
	else {
		/* begin JumpNonZero: */
		jumpCmp = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	}
	/* begin genMoveConstant:R: */
	constant = trueObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpCmp, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	if (!orNot) {
		/* begin genEnsureOopInRegNotForwarded:scratchReg:jumpBackTo: */
		genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder(Arg0Reg, TempReg, comp, 0);
	}
	/* begin genMoveConstant:R: */
	constant1 = falseObject();
	if (shouldAnnotateObjectReference(constant1)) {
		annotateobjRef(checkLiteralforInstruction(constant1, genoperandoperand(MoveCwR, constant1, ReceiverResultReg)), constant1);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(MoveCqR, constant1, ReceiverResultReg);
	}
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	return UnfailingPrimitive;
}


/*	Generate primitive 164, at: with signed access for pure bits classes. */

	/* CogObjectRepresentationForSpur>>#genPrimitiveIntegerAt */
static sqInt
genPrimitiveIntegerAt(void)
{
	return genPrimitiveAtSigned(1);
}


/*	Generate primitive 165, at:put: with signed access for pure bits classes. */

	/* CogObjectRepresentationForSpur>>#genPrimitiveIntegerAtPut */
static sqInt
genPrimitiveIntegerAtPut(void)
{
	return genPrimitiveAtPutSigned(1);
}

	/* CogObjectRepresentationForSpur>>#genPrimitiveObjectAt */
static sqInt
genPrimitiveObjectAt(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    sqInt headerReg;
    AbstractInstruction *jumpBadIndex;
    AbstractInstruction *jumpBounds;
    AbstractInstruction *jumpNotHeaderIndex;
    sqInt literal;
    sqInt quickConstant;

	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
	genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = (((usqInt)1 << 1) | 1);
	anInstruction = genoperandoperand(CmpCqR, (((usqInt)1 << 1) | 1), Arg0Reg);
	/* begin JumpNonZero: */
	jumpNotHeaderIndex = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, headerReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpNotHeaderIndex, gAndCqR((((usqInt)(alternateHeaderNumLiteralsMask()) << 1) | 1), headerReg));
	/* begin SubCq:R: */
	quickConstant = ((((usqInt)1 << 1) | 1)) - (smallIntegerTag());
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(SubCqR, quickConstant, Arg0Reg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, headerReg, Arg0Reg);
	/* begin JumpAbove: */
	jumpBounds = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
	genConvertSmallIntegerToIntegerInReg(Arg0Reg);
	/* begin AddCq:R: */
	anInstruction2 = genoperandoperand(AddCqR, ((usqInt) BaseHeaderSize) >> (shiftForWord()), Arg0Reg);
	/* begin MoveXwr:R:R: */
	genoperandoperandoperand(MoveXwrRR, Arg0Reg, ReceiverResultReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpBounds, gAddCqR(((((usqInt)1 << 1) | 1)) - (smallIntegerTag()), Arg0Reg));
	jmpTarget(jumpBadIndex, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return CompletePrimitive;
}


/*	c.f. StackInterpreter>>stSizeOf: lengthOf:baseHeader:format:
	fixedFieldsOf:format:length: 
 */

	/* CogObjectRepresentationForSpur>>#genPrimitiveSize */
static sqInt
genPrimitiveSize(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    AbstractInstruction * jump32BitLongsDone;
    AbstractInstruction * jump64BitLongsDone;
    AbstractInstruction * jumpArrayDone;
    AbstractInstruction * jumpBytesDone;
    AbstractInstruction * jumpHasFixedFields;
    AbstractInstruction *jumpImm;
    AbstractInstruction * jumpIs64BitLongs;
    AbstractInstruction * jumpIsBytes;
    AbstractInstruction *jumpIsContext;
    AbstractInstruction * jumpIsContext1;
    AbstractInstruction * jumpIsShorts;
    AbstractInstruction *jumpNotIndexable;
    AbstractInstruction * jumpNotIndexable1;
    AbstractInstruction * jumpShortsDone;
    sqInt literal;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt quickConstant6;

	jumpImm = genJumpImmediate(ReceiverResultReg);
	/* begin genGetSizeOf:into:formatReg:scratchReg:abortJumpsInto: */
	genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, SendNumArgsReg, TempReg);
	genGetNumSlotsOfinto(ReceiverResultReg, ClassReg);
	/* begin CmpCq:R: */
	quickConstant = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, quickConstant, SendNumArgsReg);
	/* begin JumpGreaterOrEqual: */
	jumpIsBytes = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant1 = arrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, quickConstant1, SendNumArgsReg);
	/* begin JumpZero: */
	jumpArrayDone = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin JumpLess: */
	jumpNotIndexable1 = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant2 = weakArrayFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant2, SendNumArgsReg);
	/* begin JumpLessOrEqual: */
	jumpHasFixedFields = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant3 = firstShortFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant3, SendNumArgsReg);
	/* begin JumpGreaterOrEqual: */
	jumpIsShorts = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant4 = firstLongFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperand(CmpCqR, quickConstant4, SendNumArgsReg);
	/* begin JumpGreaterOrEqual: */
	jump32BitLongsDone = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant5 = sixtyFourBitIndexableFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction5 = genoperandoperand(CmpCqR, quickConstant5, SendNumArgsReg);
	/* begin JumpZero: */
	jumpIs64BitLongs = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	jmpTarget(jumpNotIndexable1, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin Jump: */
	jumpNotIndexable1 = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpIsBytes, gLogicalShiftLeftCqR(shiftForWord(), ClassReg));
	/* begin checkQuickConstant:forInstruction: */
	literal = BytesPerWord - 1;
	anInstruction6 = genoperandoperand(AndCqR, BytesPerWord - 1, SendNumArgsReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, SendNumArgsReg, ClassReg);
	/* begin Jump: */
	jumpBytesDone = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpIsShorts, gLogicalShiftLeftCqR((shiftForWord()) - 1, ClassReg));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction7 = genoperandoperand(AndCqR, 1, SendNumArgsReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, SendNumArgsReg, ClassReg);
	/* begin Jump: */
	jumpShortsDone = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpIs64BitLongs, genoperandoperand(LogicalShiftRightCqR, 1, ClassReg));
	/* begin Jump: */
	jump64BitLongsDone = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpHasFixedFields, gAndCqR(classIndexMask(), TempReg));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, TempReg, SendNumArgsReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction8 = genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, TempReg);
	/* begin JumpZero: */
	jumpIsContext1 = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin PushR: */
	genoperand(PushR, ClassReg);
	genGetClassObjectOfClassIndexintoscratchReg(SendNumArgsReg, ClassReg, TempReg);
	genLoadSlotsourceRegdestReg(InstanceSpecificationIndex, ClassReg, SendNumArgsReg);
	genConvertSmallIntegerToIntegerInReg(SendNumArgsReg);
	/* begin PopR: */
	genoperand(PopR, ClassReg);
	/* begin AndCq:R: */
	quickConstant6 = fixedFieldsOfClassFormatMask();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction9 = genoperandoperand(AndCqR, quickConstant6, SendNumArgsReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, SendNumArgsReg, ClassReg);
	jmpTarget(jumpArrayDone, jmpTarget(jump64BitLongsDone, jmpTarget(jump32BitLongsDone, jmpTarget(jumpShortsDone, jmpTarget(jumpBytesDone, genoperandoperand(Label, (labelCounter += 1), bytecodePC))))));
	jumpNotIndexable = jumpNotIndexable1;
	jumpIsContext = jumpIsContext1;
	genConvertIntegerToSmallIntegerInReg(ClassReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ClassReg, ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpImm, jmpTarget(jumpNotIndexable, jmpTarget(jumpIsContext, genoperandoperand(Label, (labelCounter += 1), bytecodePC))));
	return CompletePrimitive;
}


/*	primitiveCompareWith: */

	/* CogObjectRepresentationForSpur>>#genPrimitiveStringCompareWith */
static sqInt
genPrimitiveStringCompareWith(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction * instr;
    AbstractInstruction *jump;
    AbstractInstruction *jumpAbove;
    AbstractInstruction *jumpIncorrectFormat1;
    AbstractInstruction *jumpIncorrectFormat2;
    AbstractInstruction *jumpIncorrectFormat3;
    AbstractInstruction *jumpIncorrectFormat4;
    AbstractInstruction *jumpMidFailure;
    AbstractInstruction *jumpSuccess;
    sqInt literal;
    sqInt literal1;
    sqInt minSizeReg;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt string1CharOrByteSizeReg;
    sqInt string1Reg;
    sqInt string2CharOrByteSizeReg;
    sqInt string2Reg;


	/* I redefine those name to ease program comprehension */
	string1Reg = ReceiverResultReg;
	string2Reg = Arg0Reg;
	string1CharOrByteSizeReg = Arg1Reg;
	string2CharOrByteSizeReg = ClassReg;

	/* Load arguments in reg */
	minSizeReg = SendNumArgsReg;
	/* begin genLoadArgAtDepth:into: */
	assert(0 < (numRegArgs()));
	genGetFormatOfinto(string1Reg, TempReg);
	/* begin CmpCq:R: */
	quickConstant = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg);
	/* begin JumpLess: */
	jumpIncorrectFormat1 = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant1 = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, quickConstant1, TempReg);
	/* begin JumpAboveOrEqual: */
	jumpIncorrectFormat2 = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	genGetNumSlotsOfinto(string1Reg, string1CharOrByteSizeReg);
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), string1CharOrByteSizeReg);
	gAndCqRR(BytesPerWord - 1, TempReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, TempReg, string1CharOrByteSizeReg);
	genGetFormatOfinto(string2Reg, TempReg);
	/* begin CmpCq:R: */
	quickConstant2 = firstByteFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant2, TempReg);
	/* begin JumpLess: */
	jumpIncorrectFormat3 = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	/* begin CmpCq:R: */
	quickConstant3 = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperand(CmpCqR, quickConstant3, TempReg);
	/* begin JumpAboveOrEqual: */
	jumpIncorrectFormat4 = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	genGetNumSlotsOfinto(string2Reg, string2CharOrByteSizeReg);
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), string2CharOrByteSizeReg);
	gAndCqRR(BytesPerWord - 1, TempReg, TempReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, TempReg, string2CharOrByteSizeReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, string1CharOrByteSizeReg, string2CharOrByteSizeReg);
	/* begin JumpBelow: */
	jumpAbove = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, string1CharOrByteSizeReg, minSizeReg);
	/* begin Jump: */
	jump = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpAbove, genoperandoperand(MoveRR, string2CharOrByteSizeReg, minSizeReg));
	jmpTarget(jump, checkQuickConstantforInstruction(0, genoperandoperand(CmpCqR, 0, minSizeReg)));
	/* begin JumpZero: */
	jumpSuccess = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	literal = BaseHeaderSize;
	anInstruction4 = genoperandoperand(MoveCqR, BaseHeaderSize, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal1 = BaseHeaderSize;
	anInstruction5 = genoperandoperand(AddCqR, BaseHeaderSize, minSizeReg);
	/* begin MoveXbr:R:R: */
	instr = genoperandoperandoperand(MoveXbrRR, TempReg, string1Reg, string1CharOrByteSizeReg);
	/* begin MoveXbr:R:R: */
	genoperandoperandoperand(MoveXbrRR, TempReg, string2Reg, string2CharOrByteSizeReg);
	/* begin SubR:R: */
	genoperandoperand(SubRR, string2CharOrByteSizeReg, string1CharOrByteSizeReg);
	/* begin JumpNonZero: */
	jumpMidFailure = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction6 = genoperandoperand(AddCqR, 1, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, TempReg, minSizeReg);
	/* begin JumpNonZero: */
	genConditionalBranchoperand(JumpNonZero, ((sqInt)instr));
	genGetNumBytesOfinto(string1Reg, string1CharOrByteSizeReg);
	genGetNumBytesOfinto(string2Reg, string2CharOrByteSizeReg);
	jmpTarget(jumpSuccess, genoperandoperand(SubRR, string2CharOrByteSizeReg, string1CharOrByteSizeReg));
	jmpTarget(jumpMidFailure, genoperandoperand(MoveRR, string1CharOrByteSizeReg, ReceiverResultReg));
	genConvertIntegerToSmallIntegerInReg(ReceiverResultReg);
	if (methodOrBlockNumArgs <= 2 /* numRegArgs */) {
		/* begin RetN: */
		genoperand(RetN, 0);
	}
	else {
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	jmpTarget(jumpIncorrectFormat4, jmpTarget(jumpIncorrectFormat3, jmpTarget(jumpIncorrectFormat2, jmpTarget(jumpIncorrectFormat1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))));
	return CompletePrimitive;
}


/*	replaceFrom: start to: stop with: replacement startingAt: repStart. 
	
	The primitive in the JIT tries to deal with two pathological cases, copy
	of arrays and byteStrings,
	which often copies only a dozen of fields and where switching to the C
	runtime cost a lot.
	
	Based on heuristics on the method class, I generate a quick array path
	(typically for Array),
	a quick byteString path (typically for ByteString, ByteArray and
	LargeInteger) or no quick 
	path at all (Typically for Bitmap).
	
	The many tests to ensure that the primitive won't fail are not super
	optimised (multiple reloading
	or stack arguments in registers) but this is still good enough and worth
	it since we're avoiding 
	the Smalltalk to C stack switch. The tight copying loops are optimised. 
	
	It is possible to build a bigger version with the 2 different paths but I
	(Clement) believe this 
	is too big machine code wise to be worth it.
 */

	/* CogObjectRepresentationForSpur>>#genPrimitiveStringReplace */
static sqInt
genPrimitiveStringReplace(void)
{
    sqInt adjust;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction16;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction18;
    AbstractInstruction *anInstruction19;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction20;
    AbstractInstruction *anInstruction21;
    AbstractInstruction *anInstruction22;
    AbstractInstruction *anInstruction23;
    AbstractInstruction *anInstruction24;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt arrayReg;
    AbstractInstruction * instr;
    AbstractInstruction *jmpAlreadyRemembered;
    AbstractInstruction *jmpDestYoung;
    AbstractInstruction *jumpEmpty;
    AbstractInstruction *jumpImm;
    AbstractInstruction *jumpImmutable;
    AbstractInstruction *jumpIncorrectFormat1;
    AbstractInstruction *jumpIncorrectFormat2;
    AbstractInstruction *jumpIncorrectFormat3;
    AbstractInstruction *jumpIncorrectFormat4;
    AbstractInstruction *jumpNotSmi1;
    AbstractInstruction *jumpNotSmi2;
    AbstractInstruction *jumpNotSmi3;
    AbstractInstruction *jumpOutOfBounds1;
    AbstractInstruction *jumpOutOfBounds2;
    AbstractInstruction *jumpOutOfBounds3;
    AbstractInstruction *jumpOutOfBounds4;
    sqInt literal;
    sqInt literal1;
    sqInt offset;
    sqInt offset1;
    sqInt offset2;
    sqInt offset3;
    sqInt offset4;
    sqInt offset5;
    sqInt offset6;
    sqInt offset7;
    sqInt offset8;
    sqInt offset9;
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt quickConstant2;
    sqInt quickConstant3;
    sqInt quickConstant4;
    sqInt quickConstant5;
    sqInt replReg;
    sqInt repStartReg;
    sqInt result;
    sqInt startReg;
    sqInt stopReg;
    sqInt wordConstant;


	/* Can I generate a quick path for this method ? */
	jmpAlreadyRemembered = ((AbstractInstruction *) 0);
	jumpImmutable = ((AbstractInstruction *) 0);
	jumpOutOfBounds3 = ((AbstractInstruction *) 0);
	jumpOutOfBounds4 = ((AbstractInstruction *) 0);
	if (!((seemsToBeInstantiating(arrayFormat()))
		 || (seemsToBeInstantiating(firstByteFormat())))) {
		return UnimplementedPrimitive;
	}
	arrayReg = ReceiverResultReg;
	startReg = Arg0Reg;
	stopReg = Arg1Reg;
	replReg = ClassReg;

	/* Load arguments in reg */
	repStartReg = SendNumArgsReg;
	/* begin genStackArgAt:into: */
	offset6 = (0 + 1) * BytesPerWord;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction21 = genoperandoperandoperand(MoveMwrR, offset6, SPReg, repStartReg);
	/* begin genStackArgAt:into: */
	offset7 = (1 + 1) * BytesPerWord;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction22 = genoperandoperandoperand(MoveMwrR, offset7, SPReg, replReg);
	/* begin genStackArgAt:into: */
	offset8 = (2 + 1) * BytesPerWord;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction23 = genoperandoperandoperand(MoveMwrR, offset8, SPReg, stopReg);
	/* begin genStackArgAt:into: */
	offset9 = (3 + 1) * BytesPerWord;
	/* begin checkQuickConstant:forInstruction: */
	anInstruction24 = genoperandoperandoperand(MoveMwrR, offset9, SPReg, startReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSmi1 = genJumpNotSmallInteger(repStartReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSmi2 = genJumpNotSmallInteger(stopReg);
	/* begin genJumpNotSmallInteger:scratchReg: */
	jumpNotSmi3 = genJumpNotSmallInteger(startReg);

	/* if start>stop primitive success */
	jumpImm = genJumpImmediate(replReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, startReg, stopReg);
	/* begin JumpLess: */
	jumpEmpty = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	
#  if IMMUTABILITY
	jumpImmutable = genJumpImmutablescratchReg(ReceiverResultReg, TempReg);
#  endif /* IMMUTABILITY */
	/* begin checkQuickConstant:forInstruction: */
	literal = (((usqInt)0 << 1) | 1);
	anInstruction13 = genoperandoperand(CmpCqR, (((usqInt)0 << 1) | 1), startReg);
	/* begin JumpLessOrEqual: */
	jumpOutOfBounds1 = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0));
	/* begin checkQuickConstant:forInstruction: */
	literal1 = (((usqInt)0 << 1) | 1);
	anInstruction14 = genoperandoperand(CmpCqR, (((usqInt)0 << 1) | 1), repStartReg);
	/* begin JumpLessOrEqual: */
	jumpOutOfBounds2 = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0));
	if (seemsToBeInstantiating(arrayFormat())) {

		/* Are they both array format ? */
		genGetFormatOfinto(arrayReg, TempReg);
		genGetFormatOfinto(replReg, startReg);
		/* begin CmpCq:R: */
		quickConstant = arrayFormat();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperand(CmpCqR, quickConstant, startReg);
		/* begin JumpNonZero: */
		jumpIncorrectFormat1 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
		/* begin CmpCq:R: */
		quickConstant1 = arrayFormat();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction3 = genoperandoperand(CmpCqR, quickConstant1, TempReg);
		/* begin JumpNonZero: */
		jumpIncorrectFormat2 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
		genGetNumSlotsOfinto(arrayReg, TempReg);
		genConvertSmallIntegerToIntegerInReg(stopReg);
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, TempReg, stopReg);
		/* begin JumpGreater: */
		jumpOutOfBounds3 = genConditionalBranchoperand(JumpGreater, ((sqInt)0));
		genGetNumSlotsOfinto(replReg, TempReg);
		/* begin genStackArgAt:into: */
		offset = (3 + 1) * BytesPerWord;
		/* begin checkQuickConstant:forInstruction: */
		anInstruction15 = genoperandoperandoperand(MoveMwrR, offset, SPReg, startReg);
		genConvertSmallIntegerToIntegerInReg(startReg);
		genConvertSmallIntegerToIntegerInReg(repStartReg);
		/* begin SubR:R: */
		genoperandoperand(SubRR, startReg, stopReg);
		/* begin AddR:R: */
		genoperandoperand(AddRR, repStartReg, stopReg);
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, TempReg, stopReg);
		/* begin JumpGreater: */
		jumpOutOfBounds4 = genConditionalBranchoperand(JumpGreater, ((sqInt)0));
		/* begin MoveCw:R: */
		wordConstant = storeCheckBoundary();
		/* begin checkLiteral:forInstruction: */
		anInstruction4 = genoperandoperand(MoveCwR, wordConstant, TempReg);
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, TempReg, arrayReg);
		/* begin JumpBelow: */
		jmpDestYoung = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
		if (!CheckRememberedInTrampoline) {
			jmpAlreadyRemembered = genCheckRememberedBitOfscratch(arrayReg, TempReg);
		}
		/* begin saveAndRestoreLinkRegAround: */
		callStoreCheckTrampoline();
		jmpTarget(jmpDestYoung, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
		if (!CheckRememberedInTrampoline) {
			jmpTarget(jmpAlreadyRemembered, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
		}
		/* begin genStackArgAt:into: */
		offset1 = (2 + 1) * BytesPerWord;
		/* begin checkQuickConstant:forInstruction: */
		anInstruction16 = genoperandoperandoperand(MoveMwrR, offset1, SPReg, stopReg);
		genConvertSmallIntegerToIntegerInReg(stopReg);
		/* begin SubR:R: */
		genoperandoperand(SubRR, startReg, repStartReg);
		/* begin LogicalShiftLeftCq:R: */
		genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), repStartReg);
		/* begin AddR:R: */
		genoperandoperand(AddRR, repStartReg, replReg);
		adjust = (((usqInt) BaseHeaderSize) >> (shiftForWord())) - 1;
		if (adjust != 0) {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction = genoperandoperand(AddCqR, adjust, startReg);
			/* begin checkQuickConstant:forInstruction: */
			anInstruction1 = genoperandoperand(AddCqR, adjust, stopReg);
		}
		/* begin MoveXwr:R:R: */
		instr = genoperandoperandoperand(MoveXwrRR, startReg, replReg, TempReg);
		/* begin MoveR:Xwr:R: */
		genoperandoperandoperand(MoveRXwrR, TempReg, startReg, arrayReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction5 = genoperandoperand(AddCqR, 1, startReg);
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, startReg, stopReg);
		/* begin JumpAboveOrEqual: */
		genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)instr));
		jmpTarget(jumpEmpty, (methodOrBlockNumArgs <= 2 /* numRegArgs */
			? (/* begin RetN: */
				genoperand(RetN, 0))
			: (/* begin RetN: */
				genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord))));
		jmpTarget(jumpIncorrectFormat1, jmpTarget(jumpIncorrectFormat2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	}
	if (seemsToBeInstantiating(firstByteFormat())) {

		/* Are they both byte array format ? CompiledMethod excluded */
		genGetFormatOfinto(arrayReg, TempReg);
		genGetFormatOfinto(replReg, repStartReg);
		/* begin CmpCq:R: */
		quickConstant2 = firstByteFormat();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction8 = genoperandoperand(CmpCqR, quickConstant2, repStartReg);
		/* begin JumpLess: */
		jumpIncorrectFormat1 = genConditionalBranchoperand(JumpLess, ((sqInt)0));
		/* begin CmpCq:R: */
		quickConstant3 = firstCompiledMethodFormat();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction9 = genoperandoperand(CmpCqR, quickConstant3, repStartReg);
		/* begin JumpGreaterOrEqual: */
		jumpIncorrectFormat2 = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
		/* begin CmpCq:R: */
		quickConstant4 = firstByteFormat();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction10 = genoperandoperand(CmpCqR, quickConstant4, TempReg);
		/* begin JumpLess: */
		jumpIncorrectFormat3 = genConditionalBranchoperand(JumpLess, ((sqInt)0));
		/* begin CmpCq:R: */
		quickConstant5 = firstCompiledMethodFormat();
		/* begin checkQuickConstant:forInstruction: */
		anInstruction11 = genoperandoperand(CmpCqR, quickConstant5, TempReg);
		/* begin JumpGreaterOrEqual: */
		jumpIncorrectFormat4 = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0));
		genGetNumSlotsOfinto(arrayReg, startReg);
		/* begin LogicalShiftLeftCq:R: */
		genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), startReg);
		gAndCqRR(BytesPerWord - 1, TempReg, TempReg);
		/* begin SubR:R: */
		genoperandoperand(SubRR, TempReg, startReg);
		genConvertSmallIntegerToIntegerInReg(stopReg);
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, startReg, stopReg);
		/* begin JumpGreater: */
		jumpOutOfBounds3 = genConditionalBranchoperand(JumpGreater, ((sqInt)0));
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, repStartReg, TempReg);
		/* begin genStackArgAt:into: */
		offset2 = (0 + 1) * BytesPerWord;
		/* begin checkQuickConstant:forInstruction: */
		anInstruction17 = genoperandoperandoperand(MoveMwrR, offset2, SPReg, repStartReg);
		/* begin genStackArgAt:into: */
		offset3 = (3 + 1) * BytesPerWord;
		/* begin checkQuickConstant:forInstruction: */
		anInstruction18 = genoperandoperandoperand(MoveMwrR, offset3, SPReg, startReg);
		genConvertSmallIntegerToIntegerInReg(startReg);
		genConvertSmallIntegerToIntegerInReg(repStartReg);
		/* begin SubR:R: */
		genoperandoperand(SubRR, startReg, stopReg);
		/* begin AddR:R: */
		genoperandoperand(AddRR, repStartReg, stopReg);
		genGetNumSlotsOfinto(replReg, startReg);
		/* begin LogicalShiftLeftCq:R: */
		genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), startReg);
		gAndCqRR(BytesPerWord - 1, TempReg, TempReg);
		/* begin SubR:R: */
		genoperandoperand(SubRR, TempReg, startReg);
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, startReg, stopReg);
		/* begin JumpGreater: */
		jumpOutOfBounds4 = genConditionalBranchoperand(JumpGreater, ((sqInt)0));
		/* begin genStackArgAt:into: */
		offset4 = (3 + 1) * BytesPerWord;
		/* begin checkQuickConstant:forInstruction: */
		anInstruction19 = genoperandoperandoperand(MoveMwrR, offset4, SPReg, startReg);
		genConvertSmallIntegerToIntegerInReg(startReg);
		/* begin genStackArgAt:into: */
		offset5 = (2 + 1) * BytesPerWord;
		/* begin checkQuickConstant:forInstruction: */
		anInstruction20 = genoperandoperandoperand(MoveMwrR, offset5, SPReg, stopReg);
		genConvertSmallIntegerToIntegerInReg(stopReg);
		/* begin SubR:R: */
		genoperandoperand(SubRR, startReg, repStartReg);
		/* begin AddR:R: */
		genoperandoperand(AddRR, repStartReg, replReg);
		adjust = BaseHeaderSize - 1;
		if (adjust != 0) {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction6 = genoperandoperand(AddCqR, adjust, startReg);
			/* begin checkQuickConstant:forInstruction: */
			anInstruction7 = genoperandoperand(AddCqR, adjust, stopReg);
		}
		/* begin MoveXbr:R:R: */
		instr = genoperandoperandoperand(MoveXbrRR, startReg, replReg, TempReg);
		/* begin MoveR:Xbr:R: */
		genoperandoperandoperand(MoveRXbrR, TempReg, startReg, arrayReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction12 = genoperandoperand(AddCqR, 1, startReg);
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, startReg, stopReg);
		/* begin JumpAboveOrEqual: */
		genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)instr));
		jmpTarget(jumpEmpty, (methodOrBlockNumArgs <= 2 /* numRegArgs */
			? (/* begin RetN: */
				genoperand(RetN, 0))
			: (/* begin RetN: */
				genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord))));
		jmpTarget(jumpIncorrectFormat4, jmpTarget(jumpIncorrectFormat3, jmpTarget(jumpIncorrectFormat2, jmpTarget(jumpIncorrectFormat1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))));
	}
	if (((result = compileInterpreterPrimitive())) < 0) {
		return result;
	}
	jmpTarget(jumpImm, jmpTarget(jumpNotSmi1, jmpTarget(jumpNotSmi2, jmpTarget(jumpNotSmi3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)))));
	jmpTarget(jumpOutOfBounds1, jmpTarget(jumpOutOfBounds2, jmpTarget(jumpOutOfBounds3, jmpTarget(jumpOutOfBounds4, ((AbstractInstruction *) (((jumpImm->operands))[0]))))));
	
#  if IMMUTABILITY
	jmpTarget(jumpImmutable, ((AbstractInstruction *) (((jumpImm->operands))[0])));
#  endif /* IMMUTABILITY */
	return CompletePrimitive;
}

	/* CogObjectRepresentationForSpur>>#genSetSmallIntegerTagsIn: */
static sqInt NoDbgRegParms
genSetSmallIntegerTagsIn(sqInt scratchReg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(OrCqR, 1, scratchReg);
	return 0;
}


/*	Create a trampoline to store-check the update of the receiver in a
	closure's outerContext in compileBlockFrameBuild:. */

	/* CogObjectRepresentationForSpur>>#genStoreCheckContextReceiverTrampoline */
static sqInt
genStoreCheckContextReceiverTrampoline(void)
{
    sqInt startAddress;

	startAddress = methodZoneBase();
	zeroOpcodeIndex();
	genStoreCheckReceiverRegvalueRegscratchReginFrame(ReceiverResultReg, Arg0Reg, TempReg, 0);
	/* begin RetN: */
	genoperand(RetN, 0);
	outputInstructionsForGeneratedRuntimeAt(startAddress);
	recordGeneratedRunTimeaddress("ceStoreCheckContextReceiver", startAddress);
	recordRunTimeObjectReferences();
	return startAddress;
}


/*	Generate the code for a store check of valueReg into destReg. */

	/* CogObjectRepresentationForSpur>>#genStoreCheckReceiverReg:valueReg:scratchReg:inFrame: */
static sqInt NoDbgRegParms
genStoreCheckReceiverRegvalueRegscratchReginFrame(sqInt destReg, sqInt valueReg, sqInt scratchReg, sqInt inFrame)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    AbstractInstruction *jmpAlreadyRemembered;
    AbstractInstruction *jmpDestYoung;
    AbstractInstruction *jmpImmediate;
    AbstractInstruction *jmpSourceOld;
    sqInt wordConstant;


	/* Is value stored an immediate?  If so we're done */
	jmpAlreadyRemembered = ((AbstractInstruction *) 0);

	/* Get the old/new boundary in scratchReg */
	jmpImmediate = genJumpImmediate(valueReg);
	/* begin MoveCw:R: */
	wordConstant = storeCheckBoundary();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveCwR, wordConstant, scratchReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, scratchReg, destReg);
	/* begin JumpBelow: */
	jmpDestYoung = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, scratchReg, valueReg);
	/* begin JumpAboveOrEqual: */
	jmpSourceOld = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	if (!CheckRememberedInTrampoline) {
		jmpAlreadyRemembered = genCheckRememberedBitOfscratch(destReg, scratchReg);
	}
	assert(destReg == ReceiverResultReg);
	/* begin evaluateTrampolineCallBlock:protectLinkRegIfNot: */
	if (inFrame) {
		/* begin CallRT: */
		abstractInstruction = genoperand(Call, ceStoreCheckTrampoline);
		(abstractInstruction->annotation = IsRelativeCall);
	}
	else {
		/* begin saveAndRestoreLinkRegAround: */
		/* begin CallRT: */
		abstractInstruction = genoperand(Call, ceStoreCheckTrampoline);
		(abstractInstruction->annotation = IsRelativeCall);
	}
	jmpTarget(jmpImmediate, jmpTarget(jmpDestYoung, jmpTarget(jmpSourceOld, genoperandoperand(Label, (labelCounter += 1), bytecodePC))));
	if (!CheckRememberedInTrampoline) {
		jmpTarget(jmpAlreadyRemembered, ((AbstractInstruction *) (((jmpSourceOld->operands))[0])));
	}
	return 0;
}

	/* CogObjectRepresentationForSpur>>#genStoreSourceReg:slotIndex:destReg:scratchReg:inFrame:needsStoreCheck: */
static sqInt NoDbgRegParms
genStoreSourceRegslotIndexdestRegscratchReginFrameneedsStoreCheck(sqInt sourceReg, sqInt index, sqInt destReg, sqInt scratchReg, sqInt inFrame, sqInt needsStoreCheck)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    sqInt literal;

	/* begin genTraceStores */
	if (traceStores > 0) {
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, ClassReg, TempReg);
		/* begin CallRT: */
		abstractInstruction = genoperand(Call, ceTraceStoreTrampoline);
		(abstractInstruction->annotation = IsRelativeCall);
	}
	/* begin checkQuickConstant:forInstruction: */
	literal = (index * BytesPerWord) + BaseHeaderSize;
	anInstruction = genoperandoperandoperand(MoveRMwr, sourceReg, (index * BytesPerWord) + BaseHeaderSize, destReg);
	if (needsStoreCheck) {
		return genStoreCheckReceiverRegvalueRegscratchReginFrame(destReg, sourceReg, scratchReg, inFrame);
	}
	return 0;
}


/*	This method is used for unchecked stores in objects after their creation
	(typically, inlined creation of Array, closures and some temp vectors). 
	Currently there is no need to do the immutability check here
 */

	/* CogObjectRepresentationForSpur>>#genStoreSourceReg:slotIndex:intoNewObjectInDestReg: */
static sqInt NoDbgRegParms
genStoreSourceRegslotIndexintoNewObjectInDestReg(sqInt sourceReg, sqInt index, sqInt destReg)
{
    AbstractInstruction *anInstruction;
    sqInt literal;

	/* begin checkQuickConstant:forInstruction: */
	literal = (index * BytesPerWord) + BaseHeaderSize;
	anInstruction = genoperandoperandoperand(MoveRMwr, sourceReg, (index * BytesPerWord) + BaseHeaderSize, destReg);
	return 0;
}


/*	Convention:
	- RcvrResultReg holds the object mutated.
	If immutability failure:
	- TempReg holds the instance variable index mutated 
	if instVarIndex > numDedicatedStoreTrampoline
	- ClassReg holds the value to store
	Registers are not lived across this trampoline as the 
	immutability failure may need new stack frames. */

	/* CogObjectRepresentationForSpur>>#genStoreTrampolineCalled:instVarIndex: */
#if IMMUTABILITY
static sqInt NoDbgRegParms
genStoreTrampolineCalledinstVarIndex(char *trampolineName, sqInt instVarIndex)
{
    AbstractInstruction *jumpRC;
    AbstractInstruction *jumpSC;

	zeroOpcodeIndex();
	jumpSC = genJumpMutablescratchReg(ReceiverResultReg, SendNumArgsReg);
	compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(ceCannotAssignTowithIndexvalueToAssign, 3, ReceiverResultReg, (instVarIndex < (NumStoreTrampolines - 1)
		? (/* begin trampolineArgConstant: */
			assert(instVarIndex >= 0),
			-2 - instVarIndex)
		: TempReg), ClassReg, null, 0 /* emptyRegisterMask */, 1, NoReg);
	jmpTarget(jumpSC, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	if (CheckRememberedInTrampoline) {
		jumpRC = genCheckRememberedBitOfscratch(ReceiverResultReg, SendNumArgsReg);
		assert(((jumpRC->opcode)) == JumpNonZero);
		(jumpRC->opcode = JumpZero);
		/* begin RetN: */
		genoperand(RetN, 0);
		jmpTarget(jumpRC, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	}
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(remember, trampolineName, 1, ReceiverResultReg, null, null, null, 0 /* emptyRegisterMask */, 1, NoReg, 1);
}
#endif /* IMMUTABILITY */


/*	Store check code is duplicated to use a single trampoline */

	/* CogObjectRepresentationForSpur>>#genStoreWithImmutabilityAndStoreCheckSourceReg:slotIndex:destReg:scratchReg:needRestoreRcvr: */
#if IMMUTABILITY
static sqInt NoDbgRegParms
genStoreWithImmutabilityAndStoreCheckSourceRegslotIndexdestRegscratchRegneedRestoreRcvr(sqInt sourceReg, sqInt index, sqInt destReg, sqInt scratchReg, sqInt needRestoreRcvr)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    AbstractInstruction *abstractInstruction2;
    AbstractInstruction *abstractInstruction3;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *immutableJump;
    AbstractInstruction *jmpAlreadyRemembered;
    AbstractInstruction *jmpDestYoung;
    AbstractInstruction *jmpImmediate;
    AbstractInstruction *jmpSourceOld;
    sqInt literal;
    sqInt wordConstant;

	jmpAlreadyRemembered = ((AbstractInstruction *) 0);
	immutableJump = genJumpImmutablescratchReg(destReg, scratchReg);
	/* begin genTraceStores */
	if (traceStores > 0) {
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, ClassReg, TempReg);
		/* begin CallRT: */
		abstractInstruction = genoperand(Call, ceTraceStoreTrampoline);
		(abstractInstruction->annotation = IsRelativeCall);
	}
	/* begin checkQuickConstant:forInstruction: */
	literal = (index * BytesPerWord) + BaseHeaderSize;
	anInstruction = genoperandoperandoperand(MoveRMwr, sourceReg, (index * BytesPerWord) + BaseHeaderSize, destReg);

	/* Get the old/new boundary in scratchReg */
	jmpImmediate = genJumpImmediate(sourceReg);
	/* begin MoveCw:R: */
	wordConstant = storeCheckBoundary();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveCwR, wordConstant, scratchReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, scratchReg, destReg);
	/* begin JumpBelow: */
	jmpDestYoung = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, scratchReg, sourceReg);
	/* begin JumpAboveOrEqual: */
	jmpSourceOld = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	if (!CheckRememberedInTrampoline) {
		jmpAlreadyRemembered = genCheckRememberedBitOfscratch(destReg, scratchReg);
	}
	jmpTarget(immutableJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin genStoreTrampolineCall: */
	assert(IMMUTABILITY);
	if (index >= (NumStoreTrampolines - 1)) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperand(MoveCqR, index, TempReg);
		/* begin CallRT: */
		abstractInstruction3 = genoperand(Call, ceStoreTrampolines[NumStoreTrampolines - 1]);
		(abstractInstruction3->annotation = IsRelativeCall);
	}
	else {
		/* begin CallRT: */
		abstractInstruction1 = genoperand(Call, ceStoreTrampolines[index]);
		(abstractInstruction1->annotation = IsRelativeCall);
	}
	/* begin annotateBytecode: */
	abstractInstruction2 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	(abstractInstruction2->annotation = HasBytecodePC);
	/* begin voidReceiverOptStatus */
	((simSelf())->liveRegister = NoReg);
	if (needRestoreRcvr) {
		/* begin putSelfInReceiverResultReg */
		storeToReg(simSelf(), ReceiverResultReg);
	}
	jmpTarget(jmpImmediate, jmpTarget(jmpDestYoung, jmpTarget(jmpSourceOld, genoperandoperand(Label, (labelCounter += 1), bytecodePC))));
	if (!CheckRememberedInTrampoline) {
		jmpTarget(jmpAlreadyRemembered, ((AbstractInstruction *) (((jmpSourceOld->operands))[0])));
	}
	return 0;
}
#endif /* IMMUTABILITY */


/*	Gen an immutability check with no store check (e.g. assigning an immediate
	literal) 
 */
/*	imm check has its own trampoline */

	/* CogObjectRepresentationForSpur>>#genStoreWithImmutabilityButNoStoreCheckSourceReg:slotIndex:destReg:scratchReg:needRestoreRcvr: */
#if IMMUTABILITY
static sqInt NoDbgRegParms
genStoreWithImmutabilityButNoStoreCheckSourceRegslotIndexdestRegscratchRegneedRestoreRcvr(sqInt sourceReg, sqInt index, sqInt destReg, sqInt scratchReg, sqInt needRestoreRcvr)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    AbstractInstruction *abstractInstruction2;
    AbstractInstruction *abstractInstruction3;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *immutabilityFailure;
    sqInt literal;
    AbstractInstruction *mutableJump;

	mutableJump = genJumpMutablescratchReg(destReg, scratchReg);
	/* begin genStoreTrampolineCall: */
	assert(IMMUTABILITY);
	if (index >= (NumStoreTrampolines - 1)) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, index, TempReg);
		/* begin CallRT: */
		abstractInstruction = genoperand(Call, ceStoreTrampolines[NumStoreTrampolines - 1]);
		(abstractInstruction->annotation = IsRelativeCall);
	}
	else {
		/* begin CallRT: */
		abstractInstruction1 = genoperand(Call, ceStoreTrampolines[index]);
		(abstractInstruction1->annotation = IsRelativeCall);
	}
	/* begin annotateBytecode: */
	abstractInstruction2 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	(abstractInstruction2->annotation = HasBytecodePC);
	/* begin voidReceiverOptStatus */
	((simSelf())->liveRegister = NoReg);
	if (needRestoreRcvr) {
		/* begin putSelfInReceiverResultReg */
		storeToReg(simSelf(), ReceiverResultReg);
	}
	/* begin Jump: */
	immutabilityFailure = genoperand(Jump, ((sqInt)0));
	jmpTarget(mutableJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	/* begin genTraceStores */
	if (traceStores > 0) {
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, ClassReg, TempReg);
		/* begin CallRT: */
		abstractInstruction3 = genoperand(Call, ceTraceStoreTrampoline);
		(abstractInstruction3->annotation = IsRelativeCall);
	}
	/* begin checkQuickConstant:forInstruction: */
	literal = (index * BytesPerWord) + BaseHeaderSize;
	anInstruction1 = genoperandoperandoperand(MoveRMwr, sourceReg, (index * BytesPerWord) + BaseHeaderSize, destReg);
	jmpTarget(immutabilityFailure, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}
#endif /* IMMUTABILITY */


/*	We know there is a frame as immutability check requires a frame */
/*	needRestoreRcvr has to be true to keep RcvrResultReg live with the
	receiver in it across the trampoline
 */
/*	Trampoline convention... */

	/* CogObjectRepresentationForSpur>>#genStoreWithImmutabilityCheckSourceReg:slotIndex:destReg:scratchReg:needsStoreCheck:needRestoreRcvr: */
#if IMMUTABILITY
static sqInt NoDbgRegParms
genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(sqInt sourceReg, sqInt index, sqInt destReg, sqInt scratchReg, sqInt needsStoreCheck, sqInt needRestoreRcvr)
{
	assert(destReg == ReceiverResultReg);
	assert(scratchReg == TempReg);
	assert(sourceReg == ClassReg);
	if (needsStoreCheck) {
		genStoreWithImmutabilityAndStoreCheckSourceRegslotIndexdestRegscratchRegneedRestoreRcvr(sourceReg, index, destReg, scratchReg, needRestoreRcvr);
	}
	else {
		genStoreWithImmutabilityButNoStoreCheckSourceRegslotIndexdestRegscratchRegneedRestoreRcvr(sourceReg, index, destReg, scratchReg, needRestoreRcvr);
	}
	return 0;
}
#endif /* IMMUTABILITY */


/*	Make sure SendNumArgsReg and ClassReg are available in addition to
	ReceiverResultReg and TempReg in
	genGetActiveContextNumArgs:large:inBlock:. 
 */

	/* CogObjectRepresentationForSpur>>#getActiveContextAllocatesInMachineCode */
static sqInt
getActiveContextAllocatesInMachineCode(void)
{
	return 1;
}


/*	Since all cache tags in Spur are class indices none of
	them are young or have to be updated in a scavenge. */

	/* CogObjectRepresentationForSpur>>#inlineCacheTagIsYoung: */
static sqInt NoDbgRegParms
inlineCacheTagIsYoung(sqInt cacheTag)
{
	return 0;
}

	/* CogObjectRepresentationForSpur>>#jumpNotCharacterUnsignedValueInRegister: */
static AbstractInstruction * NoDbgRegParms
jumpNotCharacterUnsignedValueInRegister(sqInt reg)
{
    AbstractInstruction *anInstruction;

	/* begin CmpCq:R: */
	anInstruction = genoperandoperand(CmpCqR, (1U << 30 /* numCharacterBits */) - 1, reg);
	/* begin JumpAbove: */
	return genConditionalBranchoperand(JumpAbove, ((sqInt)0));
}


/*	Mark and trace a literal in a machine code instruction preceding address
	in cogMethodOrNil.
	Answer if code was modified. */

	/* CogObjectRepresentationForSpur>>#markAndTraceLiteral:in:atpc: */
static sqInt NoDbgRegParms
markAndTraceLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqInt address)
{
    sqInt objOop;

	if (!(couldBeObject(literal))) {
		return 0;
	}
	assert(addressCouldBeObj(literal));
	if (!(isForwarded(literal))) {
		markAndTrace(literal);
		return 0;
	}
	objOop = followForwarded(literal);
	storeLiteralbeforeFollowingAddress(backEnd(), objOop, address);
	markAndTraceUpdatedLiteralin(objOop, cogMethodOrNil);
	return 1;
}


/*	Mark and trace a literal in a sqInt variable of cogMethod. */

	/* CogObjectRepresentationForSpur>>#markAndTraceLiteral:in:at: */
static void NoDbgRegParms
markAndTraceLiteralinat(sqInt literal, CogMethod *cogMethod, sqInt *address)
{
    sqInt objOop;

	if (!(couldBeObject(literal))) {
		return;
	}
	assert(addressCouldBeObj(literal));
	if (!(isForwarded(literal))) {
		markAndTrace(literal);
		return;
	}
	objOop = followForwarded(literal);
	address[0] = objOop;
	markAndTraceUpdatedLiteralin(objOop, cogMethod);
}


/*	Common code to mark a literal in cogMethod and add
	the cogMethod to youngReferrers if the literal is young. */

	/* CogObjectRepresentationForSpur>>#markAndTraceUpdatedLiteral:in: */
static void NoDbgRegParms
markAndTraceUpdatedLiteralin(sqInt objOop, CogMethod *cogMethodOrNil)
{
	if (isNonImmediate(objOop)) {
		if ((cogMethodOrNil != null)
		 && (isYoungObject(objOop))) {
			ensureInYoungReferrers(cogMethodOrNil);
		}
		markAndTrace(objOop);
	}
}


/*	If primIndex has an accessorDepth and fails, or it is external and fails
	with PrimErrNoMemory,
	call ceCheckAndMaybeRetryPrimitive if so If ceCheck.... answers true,
	retry the primitive. */

	/* CogObjectRepresentationForSpur>>#maybeCompileRetryOnPrimitiveFail: */
static sqInt NoDbgRegParms
maybeCompileRetryOnPrimitiveFail(sqInt primIndex)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *jmp;

	if ((accessorDepthForPrimitiveIndex(primIndex)) >= 0) {
		/* begin MoveAw:R: */
		address = primFailCodeAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction = genoperandoperand(MoveAwR, address, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(CmpCqR, 0, TempReg);
		/* begin JumpZero: */
		jmp = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	}
	else {
		if ((primNumberExternalCall()) != primIndex) {
			return 0;
		}
		/* begin MoveAw:R: */
		address1 = primFailCodeAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction2 = genoperandoperand(MoveAwR, address1, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction3 = genoperandoperand(CmpCqR, PrimErrNoMemory, TempReg);
		/* begin JumpNonZero: */
		jmp = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	}
	compileCallFornumArgsargargargargresultRegregsToSave(ceCheckAndMaybeRetryPrimitive, 1, trampolineArgConstant(primIndex), null, null, null, TempReg, 0 /* emptyRegisterMask */);
	jmpTarget(jmp, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}


/*	Generate a shift of the register containing the class tag in a method
	cache probe.
	c.f. SpurMemoryManager>>methodCacheHashOf:with: */

	/* CogObjectRepresentationForSpur>>#maybeShiftClassTagRegisterForMethodCacheProbe: */
static sqInt NoDbgRegParms
maybeShiftClassTagRegisterForMethodCacheProbe(sqInt classTagReg)
{
	/* begin LogicalShiftLeftCq:R: */
	genoperandoperand(LogicalShiftLeftCqR, 2, classTagReg);
	return 0;
}

	/* CogObjectRepresentationForSpur>>#numCharacterBits */
static sqInt
numCharacterBits(void)
{
	return 30;
}


/*	Define how many register arguments a StackToRegisterMappingCogit can
	and should use with the receiver. The value must be 0, 1 or 2. Note that a
	SimpleStackBasedCogit always has 0 register args (although the receiver is
	passed in a register). The Spur object representation is simple enough
	that implementing at:put: is straight-forward and hence 2 register args
	are worth
	while. The method must be inlined in CoInterpreter, and dead code
	eliminated so that the register-popping enilopmarts such as
	enterRegisterArgCogMethod:- at:receiver: do not have to be implemented in
	SimpleStackBasedCogit.  */

	/* CogObjectRepresentationForSpur>>#numRegArgs */
sqInt
numRegArgs(void)
{
	return 2;
}

	/* CogObjectRepresentationForSpur>>#remapObject: */
static sqInt NoDbgRegParms
remapObject(sqInt objOop)
{
	assert(addressCouldBeObj(objOop));
	return (shouldRemapObj(objOop)
		? remapObj(objOop)
		: objOop);
}

	/* CogObjectRepresentationForSpur>>#remapOop: */
static sqInt NoDbgRegParms
remapOop(sqInt objOop)
{
	return (shouldRemapOop(objOop)
		? remapObj(objOop)
		: objOop);
}


/*	Objects in newSpace or oldSpace except nil, true, false &
	classTableRootObj need to be annotated.
 */

	/* CogObjectRepresentationForSpur>>#shouldAnnotateObjectReference: */
static sqInt NoDbgRegParms
shouldAnnotateObjectReference(sqInt anOop)
{
	return (isNonImmediate(anOop))
	 && ((oopisGreaterThan(anOop, classTableRootObj()))
	 || (oopisLessThan(anOop, nilObject())));
}

	/* CogObjectRepresentationForSpur>>#slotOffsetOfInstVarIndex: */
static sqInt NoDbgRegParms
slotOffsetOfInstVarIndex(sqInt index)
{
	return (index * BytesPerWord) + BaseHeaderSize;
}

	/* CogSimStackEntry>>#ensureSpilledAt:from: */
static SimStackEntry * NoDbgRegParms
ensureSpilledAtfrom(SimStackEntry * self_in_ensureSpilledAtfrom, sqInt baseOffset, sqInt baseRegister)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *inst;
    sqInt literal;
    sqInt reg;
    sqInt wordConstant;

	if ((self_in_ensureSpilledAtfrom->spilled)) {
		if (((self_in_ensureSpilledAtfrom->type)) == SSSpill) {
			assert(((((self_in_ensureSpilledAtfrom->offset)) == baseOffset)
			 && (((self_in_ensureSpilledAtfrom->registerr)) == baseRegister))
			 || (violatesEnsureSpilledSpillAssert()));
			return self_in_ensureSpilledAtfrom;
		}
	}
	assert(((self_in_ensureSpilledAtfrom->type)) != SSSpill);
	traceSpill(self_in_ensureSpilledAtfrom);
	if (((self_in_ensureSpilledAtfrom->type)) == SSConstant) {
		if (shouldAnnotateObjectReference((self_in_ensureSpilledAtfrom->constant))) {
			inst = annotateobjRef(gPushCw((self_in_ensureSpilledAtfrom->constant)), (self_in_ensureSpilledAtfrom->constant));
		}
		else {
			/* begin PushCq: */
			wordConstant = (self_in_ensureSpilledAtfrom->constant);
			/* begin checkQuickConstant:forInstruction: */
			anInstruction = genoperand(PushCq, wordConstant);
			inst = anInstruction;
		}
	}
	else {
		if (((self_in_ensureSpilledAtfrom->type)) == SSBaseOffset) {
			/* begin checkQuickConstant:forInstruction: */
			literal = (self_in_ensureSpilledAtfrom->offset);
			anInstruction1 = genoperandoperandoperand(MoveMwrR, (self_in_ensureSpilledAtfrom->offset), (self_in_ensureSpilledAtfrom->registerr), TempReg);
			/* begin PushR: */
			inst = genoperand(PushR, TempReg);
		}
		else {
			assert(((self_in_ensureSpilledAtfrom->type)) == SSRegister);
			/* begin PushR: */
			reg = (self_in_ensureSpilledAtfrom->registerr);
			inst = genoperand(PushR, reg);
		}
		(self_in_ensureSpilledAtfrom->type) = SSSpill;
		(self_in_ensureSpilledAtfrom->offset) = baseOffset;
		(self_in_ensureSpilledAtfrom->registerr) = baseRegister;
	}
	(self_in_ensureSpilledAtfrom->spilled) = 1;
	return self_in_ensureSpilledAtfrom;
}

	/* CogSimStackEntry>>#isSameEntryAs: */
static sqInt NoDbgRegParms
isSameEntryAs(SimStackEntry * self_in_isSameEntryAs, CogSimStackEntry *ssEntry)
{
	return (((self_in_isSameEntryAs->type)) == ((ssEntry->type)))
	 && ((((((self_in_isSameEntryAs->type)) == SSBaseOffset)
	 || (((self_in_isSameEntryAs->type)) == SSSpill))
	 && ((((self_in_isSameEntryAs->offset)) == ((ssEntry->offset)))
	 && (((self_in_isSameEntryAs->registerr)) == ((ssEntry->registerr)))))
	 || (((((self_in_isSameEntryAs->type)) == SSRegister)
	 && (((self_in_isSameEntryAs->registerr)) == ((ssEntry->registerr))))
	 || ((((self_in_isSameEntryAs->type)) == SSConstant)
	 && (((self_in_isSameEntryAs->constant)) == ((ssEntry->constant))))));
}

	/* CogSimStackEntry>>#popToReg: */
static SimStackEntry * NoDbgRegParms
popToReg(SimStackEntry * self_in_popToReg, sqInt reg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt literal;
    sqInt quickConstant;
    sqInt reg1;

	if ((self_in_popToReg->spilled)) {
		/* begin PopR: */
		genoperand(PopR, reg);
	}
	else {
		
		switch ((self_in_popToReg->type)) {
		case SSBaseOffset:
			/* begin checkQuickConstant:forInstruction: */
			literal = (self_in_popToReg->offset);
			anInstruction = genoperandoperandoperand(MoveMwrR, (self_in_popToReg->offset), (self_in_popToReg->registerr), reg);
			break;
		case SSConstant:
			if (shouldAnnotateObjectReference((self_in_popToReg->constant))) {
				annotateobjRef(gMoveCwR((self_in_popToReg->constant), reg), (self_in_popToReg->constant));
			}
			else {
				/* begin MoveCq:R: */
				quickConstant = (self_in_popToReg->constant);
				/* begin checkQuickConstant:forInstruction: */
				anInstruction1 = genoperandoperand(MoveCqR, quickConstant, reg);
			}
			break;
		case SSRegister:
			if (reg != ((self_in_popToReg->registerr))) {
				/* begin MoveR:R: */
				reg1 = (self_in_popToReg->registerr);
				genoperandoperand(MoveRR, reg1, reg);
			}
			else {
				/* begin Label */
				genoperandoperand(Label, (labelCounter += 1), bytecodePC);
			}
			break;
		default:
			error("Case not found and no otherwise clause");
		}
	}
	return self_in_popToReg;
}


/*	Answer a bit mask for the receiver's register, if any. */

	/* CogSimStackEntry>>#registerMask */
static sqInt NoDbgRegParms
registerMask(SimStackEntry * self_in_registerMask)
{
    sqInt reg;

	return ((((self_in_registerMask->type)) == SSBaseOffset)
	 || (((self_in_registerMask->type)) == SSRegister)
		? (/* begin registerMaskFor: */
			(reg = (self_in_registerMask->registerr)),
			1U << reg)
		: 0);
}

	/* CogSimStackEntry>>#registerMaskOrNone */
static sqInt NoDbgRegParms
registerMaskOrNone(SimStackEntry * self_in_registerMaskOrNone)
{
    sqInt reg;

	return (((self_in_registerMaskOrNone->type)) == SSRegister
		? (/* begin registerMaskFor: */
			(reg = (self_in_registerMaskOrNone->registerr)),
			1U << reg)
		: 0);
}

	/* CogSimStackEntry>>#registerOrNone */
static sqInt NoDbgRegParms
registerOrNone(SimStackEntry * self_in_registerOrNone)
{
	return (((self_in_registerOrNone->type)) == SSRegister
		? (self_in_registerOrNone->registerr)
		: NoReg);
}

	/* CogSimStackEntry>>#storeToReg: */
static SimStackEntry * NoDbgRegParms
storeToReg(SimStackEntry * self_in_storeToReg, sqInt reg)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt literal;
    sqInt quickConstant;
    sqInt reg1;

	
	switch ((self_in_storeToReg->type)) {
	case SSBaseOffset:
	case SSSpill:
		/* begin checkQuickConstant:forInstruction: */
		literal = (self_in_storeToReg->offset);
		anInstruction = genoperandoperandoperand(MoveMwrR, (self_in_storeToReg->offset), (self_in_storeToReg->registerr), reg);
		break;
	case SSConstant:
		if (shouldAnnotateObjectReference((self_in_storeToReg->constant))) {
			annotateobjRef(gMoveCwR((self_in_storeToReg->constant), reg), (self_in_storeToReg->constant));
		}
		else {
			/* begin MoveCq:R: */
			quickConstant = (self_in_storeToReg->constant);
			/* begin checkQuickConstant:forInstruction: */
			anInstruction1 = genoperandoperand(MoveCqR, quickConstant, reg);
		}
		break;
	case SSRegister:
		if (reg != ((self_in_storeToReg->registerr))) {
			/* begin MoveR:R: */
			reg1 = (self_in_storeToReg->registerr);
			genoperandoperand(MoveRR, reg1, reg);
		}
		else {
			/* begin Label */
			genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		}
		break;
	default:
		error("Case not found and no otherwise clause");
	}
	return self_in_storeToReg;
}

	/* CogSSBytecodeFixup>>#isMergeFixup */
static sqInt NoDbgRegParms
isMergeFixup(BytecodeFixup * self_in_isMergeFixup)
{
	return (((usqInt)((self_in_isMergeFixup->targetInstruction)))) == NeedsMergeFixupFlag;
}

	/* InLineLiteralsManager>>#checkLiteral:forInstruction: */
static AbstractInstruction * NoDbgRegParms
checkLiteralforInstruction(sqInt literal, AbstractInstruction *anInstruction)
{
	return anInstruction;
}

	/* InLineLiteralsManager>>#checkQuickConstant:forInstruction: */
static AbstractInstruction * NoDbgRegParms
checkQuickConstantforInstruction(sqInt literal, AbstractInstruction *anInstruction)
{
	return anInstruction;
}


/*	Compile the jump instruction(s) at the end of the method that dispatch to
	each block body.
 */

	/* SimpleStackBasedCogit>>#compileBlockDispatch */
static sqInt
compileBlockDispatch(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *jumpSkip;

	assert(blockCount > 0);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(MoveCqR, 0, SendNumArgsReg);
	blockEntryNoContextSwitch = anInstruction;
	/* begin Jump: */
	jumpSkip = genoperand(Jump, ((sqInt)0));
	/* begin MoveR:R: */
	blockEntryLabel = genoperandoperand(MoveRR, ReceiverResultReg, SendNumArgsReg);
	jmpTarget(jumpSkip, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	if (blockCount > 1) {
		genLoadSlotsourceRegdestReg(ClosureStartPCIndex, ReceiverResultReg, TempReg);
	}
	compileBlockDispatchFromto(0, blockCount - 1);
	return 0;
}


/*	After pushing the temporaries but before the stack limit check a primitive
	method needs to fetch the error code, if any. If the primitive has failed,
	call the trampoline
	that will assign it to the last temp. */

	/* SimpleStackBasedCogit>>#compileGetErrorCode */
static void
compileGetErrorCode(void)
{
    AbstractInstruction *abstractInstruction;
    sqInt address;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *jmpNoError;

	/* begin MoveAw:R: */
	address = primFailCodeAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, TempReg);
	flag("ask concrete code gen if move sets condition codes?");
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, 0, TempReg);
	/* begin JumpZero: */
	jmpNoError = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	addDependent(methodLabel, annotateAbsolutePCRef(checkLiteralforInstruction(((sqInt)methodLabel), genoperandoperand(MoveCwR, ((sqInt)methodLabel), ClassReg))));
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceReapAndResetErrorCodeTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
	jmpTarget(jmpNoError, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
}

	/* SimpleStackBasedCogit>>#compileInterpreterPrimitive */
static sqInt
compileInterpreterPrimitive(void)
{
    void (*primitiveRoutine)(void);

	primitiveRoutine = functionPointerForCompiledMethodprimitiveIndex(methodObj, primitiveIndex);
	return compileInterpreterPrimitiveflags(primitiveRoutine, primitivePropertyFlags(primitiveIndex));
}


/*	Compile a call to an interpreter primitive. Call the C routine with the
	usual stack-switching dance, test the primFailCode and then either
	return on success or continue to the method body. */

	/* SimpleStackBasedCogit>>#compileInterpreterPrimitive:flags: */
static sqInt NoDbgRegParms
compileInterpreterPrimitiveflags(void (*primitiveRoutine)(void), sqInt flags)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    AbstractInstruction *abstractInstruction2;
    AbstractInstruction *abstractInstruction3;
    sqInt address;
    sqInt address1;
    sqInt address10;
    sqInt address11;
    sqInt address12;
    sqInt address13;
    sqInt address3;
    sqInt address4;
    sqInt address5;
    sqInt address6;
    sqInt address8;
    sqInt address9;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction11;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction18;
    AbstractInstruction *anInstruction19;
    AbstractInstruction *anInstruction20;
    AbstractInstruction *anInstruction21;
    AbstractInstruction *anInstruction23;
    AbstractInstruction *anInstruction25;
    AbstractInstruction *anInstruction26;
    AbstractInstruction *anInstruction27;
    AbstractInstruction *anInstruction28;
    AbstractInstruction *anInstruction29;
    AbstractInstruction *anInstruction30;
    AbstractInstruction *anInstruction31;
    AbstractInstruction *anInstruction36;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    AbstractInstruction *continuePostSampleNonPrim;
    AbstractInstruction *continuePostSamplePrim;
    AbstractInstruction *jmp;
    AbstractInstruction *jmpSampleNonPrim;
    AbstractInstruction *jmpSamplePrim;
    sqInt literal;
    sqInt offset;
    sqInt offset1;
    sqInt offset2;
    sqInt operand;
    sqInt operand2;
    sqInt reg;
    sqInt retpc;


	/* Save processor fp, sp and return pc in the interpreter's frame stack and instruction pointers */
	continuePostSampleNonPrim = ((AbstractInstruction *) 0);
	continuePostSamplePrim = ((AbstractInstruction *) 0);
	jmpSampleNonPrim = ((AbstractInstruction *) 0);
	jmpSamplePrim = ((AbstractInstruction *) 0);
	genExternalizePointersForPrimitiveCall();
	genLoadCStackPointersForPrimCall();
	if (flags & PrimCallCollectsProfileSamples) {

		/* Test nextProfileTick for being non-zero and call checkProfileTick if so */
		/* begin MoveAw:R: */
		address = nextProfileTickAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction = genoperandoperand(MoveAwR, address, TempReg);
		/* begin MoveAw:R: */
		address1 = (nextProfileTickAddress()) + BytesPerWord;
		/* begin checkLiteral:forInstruction: */
		anInstruction1 = genoperandoperand(MoveAwR, address1, ClassReg);
		/* begin OrR:R: */
		genoperandoperand(OrRR, TempReg, ClassReg);
		/* begin JumpNonZero: */
		jmpSampleNonPrim = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
		/* begin Label */
		continuePostSampleNonPrim = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	}
	if (recordPrimTrace()) {
		genFastPrimTraceUsingand(ClassReg, SendNumArgsReg);
	}
	/* begin checkQuickConstant:forInstruction: */
	anInstruction28 = genoperandoperand(MoveCqR, 0, TempReg);
	/* begin MoveR:Aw: */
	address11 = primFailCodeAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction29 = genoperandoperand(MoveRAw, TempReg, address11);
	if (methodOrBlockNumArgs != 0) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction4 = genoperandoperand(MoveCqR, methodOrBlockNumArgs, TempReg);
	}
	/* begin MoveR:Aw: */
	address12 = argumentCountAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction30 = genoperandoperand(MoveRAw, TempReg, address12);
	if (flags & PrimCallNeedsPrimitiveFunction) {
		/* begin checkLiteral:forInstruction: */
		literal = ((sqInt)primitiveRoutine);
		anInstruction5 = genoperandoperand(MoveCwR, ((sqInt)primitiveRoutine), TempReg);
		/* begin MoveR:Aw: */
		address3 = primitiveFunctionPointerAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction6 = genoperandoperand(MoveRAw, TempReg, address3);
		primSetFunctionLabel = anInstruction6;
	}
	if (flags & (PrimCallNeedsNewMethod + PrimCallMayCallBack)) {

		/* The ceActivateFailingPrimitiveMethod: machinery can't handle framelessness. */
		if (flags & PrimCallMayCallBack) {
			needsFrame = 1;
		}
		addDependent(methodLabel, annotateAbsolutePCRef(checkLiteralforInstruction(((sqInt)methodLabel), genoperandoperand(MoveCwR, ((sqInt)methodLabel), ClassReg))));
		/* begin MoveMw:r:R: */
		offset = offsetof(CogMethod, methodObject);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction7 = genoperandoperandoperand(MoveMwrR, offset, ClassReg, TempReg);
		/* begin MoveR:Aw: */
		address4 = newMethodAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction8 = genoperandoperand(MoveRAw, TempReg, address4);
	}
	/* begin PrefetchAw: */
	address13 = primFailCodeAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction31 = genoperand(PrefetchAw, address13);
	if (flags & PrimCallMayCallBack) {

		/* Sideways call the C primitive routine so that we return through cePrimReturnEnterCogCode. */
		/* On Spur ceActivateFailingPrimitiveMethod: would like to retry if forwarders
		   are found. So insist on PrimCallNeedsPrimitiveFunction being set too. */
		assert(flags & PrimCallNeedsPrimitiveFunction);
		/* begin genMarshallNArgs:arg:arg:arg:arg: */
		((AbstractInstruction *) backEnd);
		goto l23;
		genoperand(PushR, 0);
		((AbstractInstruction *) backEnd);
	l23:	/* end genMarshallNArgs:arg:arg:arg:arg: */;
		/* begin genSubstituteReturnAddress: */
		retpc = (flags & PrimCallCollectsProfileSamples
			? cePrimReturnEnterCogCodeProfiling
			: cePrimReturnEnterCogCode);
		/* begin checkLiteral:forInstruction: */
		anInstruction36 = genoperand(PushCw, retpc);
		/* begin annotateCall: */
		anInstruction9 = genoperand(JumpFull, ((sqInt)(((sqInt)primitiveRoutine))));
		abstractInstruction = anInstruction9;
		(abstractInstruction->annotation = IsRelativeCall);
		primInvokeInstruction = abstractInstruction;
		jmp = (jmpSamplePrim = (continuePostSamplePrim = null));
	}
	else {

		/* Call the C primitive routine. */
		/* begin genMarshallNArgs:arg:arg:arg:arg: */
		((AbstractInstruction *) backEnd);
		goto l31;
		genoperand(PushR, 0);
		((AbstractInstruction *) backEnd);
	l31:	/* end genMarshallNArgs:arg:arg:arg:arg: */;
		/* begin annotateCall: */
		anInstruction11 = genoperand(CallFull, ((sqInt)primitiveRoutine));
		abstractInstruction1 = anInstruction11;
		(abstractInstruction1->annotation = IsRelativeCall);
		primInvokeInstruction = abstractInstruction1;
		/* begin genRemoveNArgsFromStack: */
		if (flags & PrimCallCollectsProfileSamples) {
			assert(flags & PrimCallNeedsNewMethod);
			/* begin MoveAw:R: */
			address5 = nextProfileTickAddress();
			/* begin checkLiteral:forInstruction: */
			anInstruction13 = genoperandoperand(MoveAwR, address5, TempReg);
			/* begin MoveAw:R: */
			address6 = (nextProfileTickAddress()) + BytesPerWord;
			/* begin checkLiteral:forInstruction: */
			anInstruction14 = genoperandoperand(MoveAwR, address6, ClassReg);
			/* begin OrR:R: */
			genoperandoperand(OrRR, TempReg, ClassReg);
			/* begin JumpNonZero: */
			jmpSamplePrim = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
			/* begin Label */
			continuePostSamplePrim = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		}
		maybeCompileRetryOnPrimitiveFail(primitiveIndex);
		maybeCompileAllocFillerCheck();
		/* begin MoveAw:R: */
		address8 = instructionPointerAddress();
		reg = ClassReg;
		/* begin checkLiteral:forInstruction: */
		anInstruction17 = genoperandoperand(MoveAwR, address8, reg);
		genLoadStackPointers(backEnd);
		/* begin MoveAw:R: */
		address9 = primFailCodeAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction18 = genoperandoperand(MoveAwR, address9, TempReg);
		/* begin PushR: */
		genoperand(PushR, ClassReg);
		flag("ask concrete code gen if move sets condition codes?");
		/* begin checkQuickConstant:forInstruction: */
		anInstruction19 = genoperandoperand(CmpCqR, 0, TempReg);
		/* begin JumpNonZero: */
		jmp = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
		/* begin MoveMw:r:R: */
		offset1 = BytesPerWord;
		/* begin checkQuickConstant:forInstruction: */
		anInstruction20 = genoperandoperandoperand(MoveMwrR, offset1, SPReg, ReceiverResultReg);
		/* begin RetN: */
		genoperand(RetN, BytesPerWord);
	}
	if (flags & PrimCallCollectsProfileSamples) {

		/* The sample is collected by cePrimReturnEnterCogCode for external calls */
		if (!(jmpSamplePrim == null)) {

			/* Call ceCheckProfileTick: to record sample and then continue. */
			jmpTarget(jmpSamplePrim, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
			assert(flags & PrimCallNeedsNewMethod);
			/* begin annotateCall: */
			operand = ((usqIntptr_t)ceCheckProfileTick);
			/* begin checkLiteral:forInstruction: */
			anInstruction21 = genoperand(CallFull, operand);
			abstractInstruction2 = anInstruction21;
			(abstractInstruction2->annotation = IsRelativeCall);
			/* begin Jump: */
			genoperand(Jump, ((sqInt)continuePostSamplePrim));
		}
		jmpTarget(jmpSampleNonPrim, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction25 = genoperandoperand(MoveCqR, 0, TempReg);
		/* begin MoveR:Aw: */
		address10 = newMethodAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction26 = genoperandoperand(MoveRAw, TempReg, address10);
		/* begin annotateCall: */
		operand2 = ((usqIntptr_t)ceCheckProfileTick);
		/* begin checkLiteral:forInstruction: */
		anInstruction23 = genoperand(CallFull, operand2);
		abstractInstruction3 = anInstruction23;
		(abstractInstruction3->annotation = IsRelativeCall);
		/* begin Jump: */
		genoperand(Jump, ((sqInt)continuePostSampleNonPrim));
	}
	if (!(jmp == null)) {

		/* Jump to restore of receiver reg and proceed to frame build for failure. */
		jmpTarget(jmp, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
		/* begin MoveMw:r:R: */
		offset2 = BytesPerWord * (methodOrBlockNumArgs + (1));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction27 = genoperandoperandoperand(MoveMwrR, offset2, SPReg, ReceiverResultReg);
	}
	return 0;
}


/*	Compile a call to a machine-code convention interpreter primitive. Call
	the C routine
	on the Smalltalk stack, assuming it consumes little or no stack space. */
/*	for now handle functions with less than 4 arguments; our C call
	marshalling machinery
	extends up to 4 arguments only, and the first argument of an mcprim is the
	receiver. 
 */

	/* SimpleStackBasedCogit>>#compileMachineCodeInterpreterPrimitive: */
static sqInt NoDbgRegParms
compileMachineCodeInterpreterPrimitive(void (*primitiveRoutine)(void))
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction7;
    AbstractInstruction * jmpFail;
    sqInt literal4;
    sqInt liveRegsMask;
    sqInt offset;
    sqInt reg1;

	assert(methodOrBlockNumArgs <= 3);
	if ((methodOrBlockNumArgs > 2 /* numRegArgs */)
	 || (methodOrBlockNumArgs == 0)) {
		/* begin registerMaskFor: */
		liveRegsMask = 1U << ReceiverResultReg;
	}
	else {
		if (methodOrBlockNumArgs > 1) {
			/* begin registerMaskFor:and:and: */
			liveRegsMask = ((1U << ReceiverResultReg) | (1U << Arg0Reg)) | (1U << Arg1Reg);
		}
		else {
			/* begin registerMaskFor:and: */
			liveRegsMask = (1U << ReceiverResultReg) | (1U << Arg0Reg);
		}
	}
	genSaveRegs(backEnd, liveRegsMask & CallerSavedRegisterMask);
	if (methodOrBlockNumArgs > 2 /* numRegArgs */) {

		/* Wrangle args into Arg0Reg, Arg1Reg, SendNumArgsReg & ClassReg */
		/* offset := self bitCountOf: (liveRegsMask bitAnd: CallerSavedRegisterMask). */
		error("shouldBeImplemented");
	}
	/* begin genMarshallNArgs:arg:arg:arg:arg: */
	if ((methodOrBlockNumArgs + 1) == 0) {
		((AbstractInstruction *) backEnd);
		goto l9;
	}
	if ((methodOrBlockNumArgs + 1) > 1) {
		if ((methodOrBlockNumArgs + 1) > 2) {
			if ((methodOrBlockNumArgs + 1) > 3) {
				genoperand(PushR, SendNumArgsReg);
			}
			genoperand(PushR, Arg1Reg);
		}
		genoperand(PushR, Arg0Reg);
	}
	genoperand(PushR, ReceiverResultReg);
	((AbstractInstruction *) backEnd);
	l9:	/* end genMarshallNArgs:arg:arg:arg:arg: */;
	/* begin annotateCall: */
	anInstruction = genoperand(CallFull, ((sqInt)primitiveRoutine));
	abstractInstruction = anInstruction;
	(abstractInstruction->annotation = IsRelativeCall);
	/* begin genRemoveNArgsFromStack: */
	if (!((methodOrBlockNumArgs + 1) == 0)) {
		/* begin checkQuickConstant:forInstruction: */
		literal4 = (methodOrBlockNumArgs + 1) * 4;
		anInstruction7 = genoperandoperand(AddCqR, (methodOrBlockNumArgs + 1) * 4, ESP);
	}
	genRestoreRegs(backEnd, liveRegsMask & CallerSavedRegisterMask);
	/* begin CmpCq:R: */
	anInstruction2 = genoperandoperand(CmpCqR, 0, EAX);
	/* begin JumpZero: */
	jmpFail = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	/* begin MoveR:R: */
	reg1 = EAX;
	genoperandoperand(MoveRR, reg1, ReceiverResultReg);
	/* begin RetN: */
	offset = (methodOrBlockNumArgs > 2 /* numRegArgs */
		? (methodOrBlockNumArgs + 1) * BytesPerWord
		: 0);
	genoperand(RetN, offset);
	jmpTarget(jmpFail, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}


/*	Compile one method cache probe in an OpenPIC's lookup of selector.
	Answer the jump taken if the selector probe fails.
	The class tag of the receiver must be in SendNumArgsReg. ClassReg and
	TempReg are used as scratch registers.
	On a hit, the offset of the entry is in ClassReg. */

	/* SimpleStackBasedCogit>>#compileOpenPICMethodCacheProbeFor:withShift:baseRegOrNone: */
static AbstractInstruction * NoDbgRegParms
compileOpenPICMethodCacheProbeForwithShiftbaseRegOrNone(sqInt selector, sqInt shift, sqInt baseRegOrNone)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *jumpSelectorMiss;
    sqInt offset;
    sqInt offset1;

	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SendNumArgsReg, ClassReg);
	maybeShiftClassTagRegisterForMethodCacheProbe(ClassReg);
	annotateobjRef(checkLiteralforInstruction(selector, genoperandoperand(XorCwR, selector, ClassReg)), selector);
	assert(shift <= (shiftForWord()));
	if (shift < (shiftForWord())) {
		/* begin LogicalShiftLeftCq:R: */
		genoperandoperand(LogicalShiftLeftCqR, (shiftForWord()) - shift, ClassReg);
	}
	/* begin AndCq:R: */
	anInstruction4 = genoperandoperand(AndCqR, ((int)((usqInt)(MethodCacheMask) << (shiftForWord()))), ClassReg);
	if (baseRegOrNone == NoReg) {
		/* begin MoveMw:r:R: */
		offset = (((usqInt)(methodCacheAddress()))) + (((int)((usqInt)(MethodCacheSelector) << (shiftForWord()))));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperandoperand(MoveMwrR, offset, ClassReg, TempReg);
	}
	else {
		/* begin AddR:R: */
		genoperandoperand(AddRR, baseRegOrNone, ClassReg);
		/* begin MoveMw:r:R: */
		anInstruction1 = genoperandoperandoperand(MoveMwrR, ((int)((usqInt)(MethodCacheSelector) << (shiftForWord()))), ClassReg, TempReg);
	}
	annotateobjRef(checkLiteralforInstruction(selector, genoperandoperand(CmpCwR, selector, TempReg)), selector);
	/* begin JumpNonZero: */
	jumpSelectorMiss = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	if (baseRegOrNone == NoReg) {
		/* begin MoveMw:r:R: */
		offset1 = (((usqInt)(methodCacheAddress()))) + (((int)((usqInt)(MethodCacheClass) << (shiftForWord()))));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperandoperand(MoveMwrR, offset1, ClassReg, TempReg);
	}
	else {
		/* begin MoveMw:r:R: */
		anInstruction3 = genoperandoperandoperand(MoveMwrR, ((int)((usqInt)(MethodCacheClass) << (shiftForWord()))), ClassReg, TempReg);
	}
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, SendNumArgsReg, TempReg);
	return jumpSelectorMiss;
}


/*	Compile the code for an open PIC. Perform a probe of the first-level
	method lookup cache followed by a call of ceSendFromInLineCacheMiss: if
	the probe fails. */

	/* SimpleStackBasedCogit>>#compileOpenPIC:numArgs: */
static void NoDbgRegParms
compileOpenPICnumArgs(sqInt selector, sqInt numArgs)
{
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    sqInt cacheBaseReg;
    AbstractInstruction *itsAHit;
    AbstractInstruction *jumpBCMethod;
    AbstractInstruction *jumpClassMiss;
    AbstractInstruction *jumpSelectorMiss;
    sqInt offset;

	/* begin preenMethodLabel */
	(((((AbstractInstruction *) methodLabel))->operands))[1] = 0;
	compilePICAbort(numArgs);
	entry = genGetClassTagOfintoscratchReg(ReceiverResultReg, SendNumArgsReg, TempReg);
	flag("lookupInMethodCacheSel:classTag:");
	cacheBaseReg = NoReg;
	jumpSelectorMiss = compileOpenPICMethodCacheProbeForwithShiftbaseRegOrNone(selector, 0, cacheBaseReg);
	/* begin JumpNonZero: */
	jumpClassMiss = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin MoveMw:r:R: */
	offset = (cacheBaseReg == NoReg
		? (((usqInt)(methodCacheAddress()))) + (((int)((usqInt)(MethodCacheMethod) << (shiftForWord()))))
		: ((int)((usqInt)(MethodCacheMethod) << (shiftForWord()))));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperandoperand(MoveMwrR, offset, ClassReg, SendNumArgsReg);
	itsAHit = anInstruction1;
	genLoadSlotsourceRegdestReg(HeaderIndex, SendNumArgsReg, ClassReg);
	jumpBCMethod = genJumpImmediate(ClassReg);
	jmpTarget(jumpBCMethod, picInterpretAbort);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(AddCqR, cmNoCheckEntryOffset, ClassReg);
	/* begin JumpR: */
	genoperand(JumpR, ClassReg);
	jmpTarget(jumpSelectorMiss, jmpTarget(jumpClassMiss, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	jumpSelectorMiss = compileOpenPICMethodCacheProbeForwithShiftbaseRegOrNone(selector, 1, cacheBaseReg);
	/* begin JumpZero: */
	genConditionalBranchoperand(JumpZero, ((sqInt)itsAHit));
	jmpTarget(jumpSelectorMiss, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	jumpSelectorMiss = compileOpenPICMethodCacheProbeForwithShiftbaseRegOrNone(selector, 2, cacheBaseReg);
	/* begin JumpZero: */
	genConditionalBranchoperand(JumpZero, ((sqInt)itsAHit));
	jmpTarget(jumpSelectorMiss, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	genPushRegisterArgsForNumArgsscratchReg(backEnd, numArgs, SendNumArgsReg);
	genSmalltalkToCStackSwitch(1);
	addDependent(methodLabel, annotateAbsolutePCRef(checkLiteralforInstruction(((sqInt)methodLabel), genoperandoperand(MoveCwR, ((sqInt)methodLabel), SendNumArgsReg))));
	compileCallFornumArgsargargargargresultRegregsToSave(ceSendFromInLineCacheMiss, 1, SendNumArgsReg, null, null, null, NoReg, 0 /* emptyRegisterMask */);
}


/*	Compile one method cache probe in a perform: primitive's lookup of
	selector. Answer the jump taken if the selector probe fails. */

	/* SimpleStackBasedCogit>>#compilePerformMethodCacheProbeFor:withShift:baseRegOrNone: */
static AbstractInstruction * NoDbgRegParms
compilePerformMethodCacheProbeForwithShiftbaseRegOrNone(sqInt selectorReg, sqInt shift, sqInt baseRegOrNone)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *jumpSelectorMiss;
    sqInt offset;
    sqInt offset1;

	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SendNumArgsReg, ClassReg);
	maybeShiftClassTagRegisterForMethodCacheProbe(ClassReg);
	/* begin XorR:R: */
	genoperandoperand(XorRR, selectorReg, ClassReg);
	assert(shift <= (shiftForWord()));
	if (shift < (shiftForWord())) {
		/* begin LogicalShiftLeftCq:R: */
		genoperandoperand(LogicalShiftLeftCqR, (shiftForWord()) - shift, ClassReg);
	}
	/* begin AndCq:R: */
	anInstruction4 = genoperandoperand(AndCqR, ((int)((usqInt)(MethodCacheMask) << (shiftForWord()))), ClassReg);
	if (baseRegOrNone == NoReg) {
		/* begin MoveMw:r:R: */
		offset = (((usqInt)(methodCacheAddress()))) + (((int)((usqInt)(MethodCacheSelector) << (shiftForWord()))));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperandoperand(MoveMwrR, offset, ClassReg, TempReg);
	}
	else {
		/* begin AddR:R: */
		genoperandoperand(AddRR, baseRegOrNone, ClassReg);
		/* begin MoveMw:r:R: */
		anInstruction1 = genoperandoperandoperand(MoveMwrR, ((int)((usqInt)(MethodCacheSelector) << (shiftForWord()))), ClassReg, TempReg);
	}
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, selectorReg, TempReg);
	/* begin JumpNonZero: */
	jumpSelectorMiss = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	if (baseRegOrNone == NoReg) {
		/* begin MoveMw:r:R: */
		offset1 = (((usqInt)(methodCacheAddress()))) + (((int)((usqInt)(MethodCacheClass) << (shiftForWord()))));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperandoperand(MoveMwrR, offset1, ClassReg, TempReg);
	}
	else {
		/* begin MoveMw:r:R: */
		anInstruction3 = genoperandoperandoperand(MoveMwrR, ((int)((usqInt)(MethodCacheClass) << (shiftForWord()))), ClassReg, TempReg);
	}
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, SendNumArgsReg, TempReg);
	return jumpSelectorMiss;
}


/*	Compile a primitive. If possible, performance-critical primtiives will
	be generated by their own routines (primitiveGenerator). Otherwise,
	if there is a primitive at all, we call the C routine with the usual
	stack-switching dance, test the primFailCode and then either return
	on success or continue to the method body. */

	/* SimpleStackBasedCogit>>#compilePrimitive */
static sqInt
compilePrimitive(void)
{
    sqInt code;
    sqInt flags;
    sqInt opcodeIndexAtPrimitive;
    PrimitiveDescriptor *primitiveDescriptor;
    void (*primitiveRoutine)(void);

	if (primitiveIndex == 0) {
		return 0;
	}

	/* Note opcodeIndex so that compileFallbackToInterpreterPrimitive:
	   can discard arg load instructions for unimplemented primitives. */
	code = 0;

	/* If a descriptor specifies an argument count (by numArgs >= 0) then it must match
	   for the generated code to be correct.  For example for speed many primitives use
	   ResultReceiverReg instead of accessing the stack, so the receiver better be at
	   numArgs down the stack.  Use the interpreter version if not. */
	opcodeIndexAtPrimitive = opcodeIndex;
	if ((((primitiveDescriptor = primitiveGeneratorOrNil())) != null)
	 && ((((primitiveDescriptor->primitiveGenerator)) != null)
	 && ((((primitiveDescriptor->primNumArgs)) < 0)
	 || (((primitiveDescriptor->primNumArgs)) == (argumentCountOf(methodObj)))))) {
		code = ((primitiveDescriptor->primitiveGenerator))();
	}
	if ((code < 0)
	 && (code != UnimplementedPrimitive)) {

		/* Generator failed, so no point continuing... */
		return code;
	}
	if (code == UnfailingPrimitive) {
		return 0;
	}
	if ((code == CompletePrimitive)
	 && (!(((primitiveIndexOfMethodheader(methodObj, methodHeader)) > 0)
	 && ((longStoreBytecodeForHeader(methodHeader)) == (fetchByteofObject((startPCOfMethod(methodObj)) + (sizeOfCallPrimitiveBytecode(methodHeader)), methodObj)))))) {
		return 0;
	}
	if (code == UnimplementedPrimitive) {
		opcodeIndex = opcodeIndexAtPrimitive;
	}
	flags = primitivePropertyFlags(primitiveIndex);
	if (flags & PrimCallDoNotJIT) {
		return ShouldNotJIT;
	}
	if (flags & PrimCallOnSmalltalkStack) {
		assert(flags == PrimCallOnSmalltalkStack);
		return compileMachineCodeInterpreterPrimitive(mcprimFunctionForPrimitiveIndex(primitiveIndex));
	}
	if ((((primitiveRoutine = functionPointerForCompiledMethodprimitiveIndex(methodObj, primitiveIndex))) == 0)
	 || (primitiveRoutine == primitiveFail)) {
		return genFastPrimFail();
	}
	minValidCallAddress = ((minValidCallAddress < (((usqInt)primitiveRoutine))) ? minValidCallAddress : (((usqInt)primitiveRoutine)));
	return compileInterpreterPrimitiveflags(primitiveRoutine, flags);
}

	/* SimpleStackBasedCogit>>#extendedPushBytecode */
static sqInt
extendedPushBytecode(void)
{
    sqInt variableIndex;
    sqInt variableType;

	variableType = (((usqInt) byte1) >> 6) & 3;
	variableIndex = byte1 & 0x3F;
	if (variableType == 0) {
		return genPushReceiverVariable(variableIndex);
	}
	if (variableType == 1) {
		return genPushTemporaryVariable(variableIndex);
	}
	if (variableType == 2) {
		return genPushLiteralIndex(variableIndex);
	}
	return genPushLiteralVariable(variableIndex);
}

	/* SimpleStackBasedCogit>>#extendedStoreAndPopBytecode */
static sqInt
extendedStoreAndPopBytecode(void)
{
    AbstractInstruction *abstractInstruction;
    sqInt variableIndex;
    sqInt variableType;

	variableType = (((usqInt) byte1) >> 6) & 3;
	variableIndex = byte1 & 0x3F;
	if (variableType == 0) {
		return genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(1, variableIndex, ((((ssTop())->type)) != SSConstant)
		 || ((isNonImmediate(((ssTop())->constant)))
		 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
	}
	if (variableType == 1) {
		genStorePopTemporaryVariable(1, variableIndex);
		
#    if IMMUTABILITY
		/* begin annotateBytecode: */
		abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		(abstractInstruction->annotation = HasBytecodePC);
#    endif /* IMMUTABILITY */
		return 0;
	}
	if (variableType == 3) {
		return genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(1, variableIndex, ((((ssTop())->type)) != SSConstant)
		 || ((isNonImmediate(((ssTop())->constant)))
		 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
	}
	return EncounteredUnknownBytecode;
}

	/* SimpleStackBasedCogit>>#extendedStoreBytecode */
static sqInt
extendedStoreBytecode(void)
{
    AbstractInstruction *abstractInstruction;
    sqInt variableIndex;
    sqInt variableType;

	variableType = (((usqInt) byte1) >> 6) & 3;
	variableIndex = byte1 & 0x3F;
	if (variableType == 0) {
		return genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(0, variableIndex, ((((ssTop())->type)) != SSConstant)
		 || ((isNonImmediate(((ssTop())->constant)))
		 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
	}
	if (variableType == 1) {
		genStorePopTemporaryVariable(0, variableIndex);
		
#    if IMMUTABILITY
		/* begin annotateBytecode: */
		abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		(abstractInstruction->annotation = HasBytecodePC);
#    endif /* IMMUTABILITY */
		return 0;
	}
	if (variableType == 3) {
		return genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(0, variableIndex, ((((ssTop())->type)) != SSConstant)
		 || ((isNonImmediate(((ssTop())->constant)))
		 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
	}
	return EncounteredUnknownBytecode;
}

	/* SimpleStackBasedCogit>>#frameOffsetOfTemporary: */
static sqInt NoDbgRegParms
frameOffsetOfTemporary(sqInt index)
{
	return (index < methodOrBlockNumArgs
		? FoxCallerSavedIP + ((methodOrBlockNumArgs - index) * BytesPerWord)
		: (FoxMFReceiver - BytesPerWord) + ((methodOrBlockNumArgs - index) * BytesPerWord));
}


/*	Implemented with SistaCogit only */

	/* SimpleStackBasedCogit>>#genCallMappedInlinedPrimitive */
static sqInt
genCallMappedInlinedPrimitive(void)
{
	return EncounteredUnknownBytecode;
}

	/* SimpleStackBasedCogit>>#genDoubleFailIfZeroArgRcvr:arg: */
static AbstractInstruction * NoDbgRegParms
genDoubleFailIfZeroArgRcvrarg(int rcvrReg, int argReg)
{
    AbstractInstruction *anInstruction;

	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(MoveCqR, 0, TempReg);
	/* begin ConvertR:Rd: */
	genoperandoperand(ConvertRRd, TempReg, DPFPReg2);
	/* begin CmpRd:Rd: */
	genoperandoperand(CmpRdRd, DPFPReg2, argReg);
	return gJumpFPEqual(0);
}


/*	Can use any of the first 32 literals for the selector and pass up to 7
	arguments. 
 */

	/* SimpleStackBasedCogit>>#genExtendedSendBytecode */
static sqInt
genExtendedSendBytecode(void)
{
	return genSendnumArgs(byte1 & 0x1F, ((usqInt) byte1) >> 5);
}

	/* SimpleStackBasedCogit>>#genExtendedSuperBytecode */
static sqInt
genExtendedSuperBytecode(void)
{
	return genSendSupernumArgs(byte1 & 0x1F, ((usqInt) byte1) >> 5);
}


/*	244		11110100	i i i i i i i i	Pop and Jump 0n False i i i i i i i i (+
	Extend B * 256, where Extend B >= 0)
 */

	/* SimpleStackBasedCogit>>#genExtJumpIfFalse */
static sqInt
genExtJumpIfFalse(void)
{
    sqInt distance;
    sqInt target;

	distance = byte1 + (((sqInt)((usqInt)(extB) << 8)));
	assert(distance == (v4LongForwardBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0
	? 1
	: 0)) + ((extB != 0
	? 1
	: 0)), methodObj)));
	extB = 0;
	numExtB = 0;
	target = (distance + 2) + bytecodePC;
	return genJumpIfto(falseObject(), target);
}


/*	243		11110011	i i i i i i i i	Pop and Jump 0n True i i i i i i i i (+
	Extend B * 256, where Extend B >= 0)
 */

	/* SimpleStackBasedCogit>>#genExtJumpIfTrue */
static sqInt
genExtJumpIfTrue(void)
{
    sqInt distance;
    sqInt target;

	distance = byte1 + (((sqInt)((usqInt)(extB) << 8)));
	assert(distance == (v4LongForwardBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0
	? 1
	: 0)) + ((extB != 0
	? 1
	: 0)), methodObj)));
	extB = 0;
	numExtB = 0;
	target = (distance + 2) + bytecodePC;
	return genJumpIfto(trueObject(), target);
}


/*	NewspeakV4: 221		11011101		Nop */
/*	SistaV1:		 91		01011011'		Nop */

	/* SimpleStackBasedCogit>>#genExtNopBytecode */
static sqInt
genExtNopBytecode(void)
{
	extA = (numExtB = (extB = 0));
	return 0;
}


/*	SistaV1:		233		11101001	iiiiiiii		Push Character #iiiiiiii (+ Extend B *
	256) 
 */

	/* SimpleStackBasedCogit>>#genExtPushCharacterBytecode */
static sqInt
genExtPushCharacterBytecode(void)
{
    sqInt value;

	value = byte1 + (((sqInt)((usqInt)(extB) << 8)));
	extB = 0;
	numExtB = 0;
	return genPushLiteral(characterObjectOf(value));
}


/*	NewsqueakV4:	229		11100101	iiiiiiii	Push Integer #iiiiiiii (+ Extend B *
	256, where bbbbbbbb = sddddddd, e.g. -32768 = i=0, a=0, s=1)
	SistaV1:		232		11101000	iiiiiiii	Push Integer #iiiiiiii (+ Extend B * 256,
	where bbbbbbbb = sddddddd, e.g. -32768 = i=0, a=0, s=1)
 */

	/* SimpleStackBasedCogit>>#genExtPushIntegerBytecode */
static sqInt
genExtPushIntegerBytecode(void)
{
    sqInt value;

	value = byte1 + (((sqInt)((usqInt)(extB) << 8)));
	extB = 0;
	numExtB = 0;
	return genPushLiteral((((usqInt)value << 1) | 1));
}


/*	228		11100100	i i i i i i i i	Push Literal #iiiiiiii (+ Extend A * 256) */

	/* SimpleStackBasedCogit>>#genExtPushLiteralBytecode */
static sqInt
genExtPushLiteralBytecode(void)
{
    sqInt index;

	index = byte1 + (((sqInt)((usqInt)(extA) << 8)));
	extA = 0;
	return genPushLiteralIndex(index);
}


/*	227		11100011	i i i i i i i i	Push Literal Variable #iiiiiiii (+ Extend A
	* 256)
 */

	/* SimpleStackBasedCogit>>#genExtPushLiteralVariableBytecode */
static sqInt
genExtPushLiteralVariableBytecode(void)
{
    sqInt index;

	index = byte1 + (((sqInt)((usqInt)(extA) << 8)));
	extA = 0;
	return genPushLiteralVariable(index);
}


/*	SistaV1: *	82			01010010			Push thisContext, (then Extend B = 1 => push
	thisProcess) 
 */

	/* SimpleStackBasedCogit>>#genExtPushPseudoVariable */
static sqInt
genExtPushPseudoVariable(void)
{
    sqInt ext;

	ext = extB;
	extB = 0;
	numExtB = 0;
	
	switch (ext) {
	case 0:
		return genPushActiveContextBytecode();

	default:
		/* begin unknownBytecode */
		return EncounteredUnknownBytecode;

	}
	return 0;
}


/*	226		11100010	i i i i i i i i	Push Receiver Variable #iiiiiiii (+ Extend A
	* 256)
 */

	/* SimpleStackBasedCogit>>#genExtPushReceiverVariableBytecode */
static sqInt
genExtPushReceiverVariableBytecode(void)
{
    sqInt index;

	index = byte1 + (((sqInt)((usqInt)(extA) << 8)));
	extA = 0;
	return (isReadMediatedContextInstVarIndex(index)
		? genPushMaybeContextReceiverVariable(index)
		: genPushReceiverVariable(index));
}


/*	238		11101110	i i i i i j j j	Send Literal Selector #iiiii (+ Extend A *
	32) with jjj (+ Extend B * 8) Arguments
 */

	/* SimpleStackBasedCogit>>#genExtSendBytecode */
static sqInt
genExtSendBytecode(void)
{
    sqInt litIndex;
    sqInt nArgs;

	litIndex = (((usqInt) byte1) >> 3) + (((sqInt)((usqInt)(extA) << 5)));
	extA = 0;
	nArgs = (byte1 & 7) + (((sqInt)((usqInt)(extB) << 3)));
	extB = 0;
	numExtB = 0;
	return genSendnumArgs(litIndex, nArgs);
}


/*	239		11101111	i i i i i j j j	Send To Superclass Literal Selector #iiiii
	(+ Extend A * 32) with jjj (+ Extend B * 8) Arguments
 */

	/* SimpleStackBasedCogit>>#genExtSendSuperBytecode */
static sqInt
genExtSendSuperBytecode(void)
{
    int isDirected;
    sqInt litIndex;
    sqInt nArgs;

	if ((isDirected = extB >= 64)) {
		extB = extB & 0x3F;
	}
	litIndex = (((usqInt) byte1) >> 3) + (((sqInt)((usqInt)(extA) << 5)));
	extA = 0;
	nArgs = (byte1 & 7) + (((sqInt)((usqInt)(extB) << 3)));
	extB = 0;
	numExtB = 0;
	return (isDirected
		? genSendDirectedSupernumArgs(litIndex, nArgs)
		: genSendSupernumArgs(litIndex, nArgs));
}


/*	236		11101100	i i i i i i i i	Pop and Store Literal Variable #iiiiiiii (+
	Extend A * 256)
 */

	/* SimpleStackBasedCogit>>#genExtStoreAndPopLiteralVariableBytecode */
static sqInt
genExtStoreAndPopLiteralVariableBytecode(void)
{
    sqInt index;

	index = byte1 + (((sqInt)((usqInt)(extA) << 8)));
	extA = 0;
	return genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(1, index, ((((ssTop())->type)) != SSConstant)
	 || ((isNonImmediate(((ssTop())->constant)))
	 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
}


/*	235		11101011	i i i i i i i i	Pop and Store Receiver Variable #iiiiiii (+
	Extend A * 256)
 */

	/* SimpleStackBasedCogit>>#genExtStoreAndPopReceiverVariableBytecode */
static sqInt
genExtStoreAndPopReceiverVariableBytecode(void)
{
    sqInt index;

	index = byte1 + (((sqInt)((usqInt)(extA) << 8)));
	extA = 0;
	return (isWriteMediatedContextInstVarIndex(index)
		? genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(1, index, ((((ssTop())->type)) != SSConstant)
			 || ((isNonImmediate(((ssTop())->constant)))
			 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1)
		: genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(1, index, ((((ssTop())->type)) != SSConstant)
			 || ((isNonImmediate(((ssTop())->constant)))
			 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1));
}


/*	233		11101001	i i i i i i i i	Store Literal Variable #iiiiiiii (+ Extend A
	* 256)
 */

	/* SimpleStackBasedCogit>>#genExtStoreLiteralVariableBytecode */
static sqInt
genExtStoreLiteralVariableBytecode(void)
{
    sqInt index;

	index = byte1 + (((sqInt)((usqInt)(extA) << 8)));
	extA = 0;
	return genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(0, index, ((((ssTop())->type)) != SSConstant)
	 || ((isNonImmediate(((ssTop())->constant)))
	 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
}


/*	232		11101000	i i i i i i i i	Store Receiver Variable #iiiiiii (+ Extend A
	* 256)
 */

	/* SimpleStackBasedCogit>>#genExtStoreReceiverVariableBytecode */
static sqInt
genExtStoreReceiverVariableBytecode(void)
{
    sqInt index;

	index = byte1 + (((sqInt)((usqInt)(extA) << 8)));
	extA = 0;
	return (isWriteMediatedContextInstVarIndex(index)
		? genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(0, index, ((((ssTop())->type)) != SSConstant)
			 || ((isNonImmediate(((ssTop())->constant)))
			 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1)
		: genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(0, index, ((((ssTop())->type)) != SSConstant)
			 || ((isNonImmediate(((ssTop())->constant)))
			 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1));
}


/*	242		11110010	i i i i i i i i	Jump i i i i i i i i (+ Extend B * 256,
	where bbbbbbbb = sddddddd, e.g. -32768 = i=0, a=0, s=1)
 */

	/* SimpleStackBasedCogit>>#genExtUnconditionalJump */
static sqInt
genExtUnconditionalJump(void)
{
    AbstractInstruction *abstractInstruction;
    sqInt distance;
    sqInt target;

	distance = byte1 + (((sqInt)((usqInt)(extB) << 8)));
	assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0
	? 1
	: 0)) + ((extB != 0
	? 1
	: 0)), methodObj)));
	extB = 0;
	numExtB = 0;
	target = (distance + 2) + bytecodePC;
	if (distance < 0) {
		return genJumpBackTo(target);
	}
	genJumpTo(target);
	/* begin annotateBytecode: */
	abstractInstruction = lastOpcode();
	(abstractInstruction->annotation = HasBytecodePC);
	return 0;
}

	/* SimpleStackBasedCogit>>#genFastPrimFail */
static sqInt
genFastPrimFail(void)
{
	primitiveIndex = 0;
	return UnfailingPrimitive;
}


/*	Suport for compileInterpreterPrimitive. Generate inline code so as to
	record the primitive
	trace as fast as possible. */

	/* SimpleStackBasedCogit>>#genFastPrimTraceUsing:and: */
static void NoDbgRegParms
genFastPrimTraceUsingand(sqInt r1, sqInt r2)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    sqInt offset;
    sqInt wordConstant;

	/* begin MoveAb:R: */
	address = primTraceLogIndexAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveAbR, address, r2);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, r2, r1);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(AddCqR, 1, r1);
	/* begin MoveR:Ab: */
	address1 = primTraceLogIndexAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction3 = genoperandoperand(MoveRAb, r1, address1);
	addDependent(methodLabel, annotateAbsolutePCRef(checkLiteralforInstruction(((sqInt)methodLabel), genoperandoperand(MoveCwR, ((sqInt)methodLabel), r1))));
	/* begin MoveMw:r:R: */
	offset = offsetof(CogMethod, selector);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction4 = genoperandoperandoperand(MoveMwrR, offset, r1, TempReg);
	/* begin MoveCw:R: */
	wordConstant = ((sqInt)(primTraceLogAddress()));
	/* begin checkLiteral:forInstruction: */
	anInstruction5 = genoperandoperand(MoveCwR, wordConstant, r1);
	/* begin MoveR:Xwr:R: */
	genoperandoperandoperand(MoveRXwrR, TempReg, r2, r1);
}

	/* SimpleStackBasedCogit>>#genLongJumpIfFalse */
static sqInt
genLongJumpIfFalse(void)
{
    sqInt distance;
    sqInt target;

	distance = v3LongForwardBranchDistance(generatorAt(byte0), bytecodePC, 0, methodObj);
	target = (distance + 2) + bytecodePC;
	return genJumpIfto(falseObject(), target);
}

	/* SimpleStackBasedCogit>>#genLongJumpIfTrue */
static sqInt
genLongJumpIfTrue(void)
{
    sqInt distance;
    sqInt target;

	distance = v3LongForwardBranchDistance(generatorAt(byte0), bytecodePC, 0, methodObj);
	target = (distance + 2) + bytecodePC;
	return genJumpIfto(trueObject(), target);
}


/*	230		11100110	i i i i i i i i	Push Temporary Variable #iiiiiiii */

	/* SimpleStackBasedCogit>>#genLongPushTemporaryVariableBytecode */
static sqInt
genLongPushTemporaryVariableBytecode(void)
{
	return genPushTemporaryVariable(byte1);
}


/*	237		11101101	i i i i i i i i	Pop and Store Temporary Variable #iiiiiiii */

	/* SimpleStackBasedCogit>>#genLongStoreAndPopTemporaryVariableBytecode */
static sqInt
genLongStoreAndPopTemporaryVariableBytecode(void)
{
	return genStorePopTemporaryVariable(1, byte1);
}


/*	234		11101010	i i i i i i i i	Store Temporary Variable #iiiiiiii */

	/* SimpleStackBasedCogit>>#genLongStoreTemporaryVariableBytecode */
static sqInt
genLongStoreTemporaryVariableBytecode(void)
{
	return genStorePopTemporaryVariable(0, byte1);
}

	/* SimpleStackBasedCogit>>#genLongUnconditionalBackwardJump */
static sqInt
genLongUnconditionalBackwardJump(void)
{
    sqInt distance;

	distance = v3LongBranchDistance(generatorAt(byte0), bytecodePC, 0, methodObj);
	assert(distance < 0);
	return genJumpBackTo((distance + 2) + bytecodePC);
}

	/* SimpleStackBasedCogit>>#genLongUnconditionalForwardJump */
static sqInt
genLongUnconditionalForwardJump(void)
{
    sqInt distance;
    sqInt targetpc;

	distance = v3LongBranchDistance(generatorAt(byte0), bytecodePC, 0, methodObj);
	assert(distance >= 0);
	targetpc = (distance + 2) + bytecodePC;
	return genJumpTo(targetpc);
}


/*	Compile the code for a probe of the first-level method cache for a perform
	primtiive. The selector is assumed to be in Arg0Reg. Defer to
	adjustArgumentsForPerform: to
	adjust the arguments before the jump to the method. */

	/* SimpleStackBasedCogit>>#genLookupForPerformNumArgs: */
static sqInt NoDbgRegParms
genLookupForPerformNumArgs(sqInt numArgs)
{
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    sqInt cacheBaseReg;
    AbstractInstruction *itsAHit;
    AbstractInstruction *jumpClassMiss;
    AbstractInstruction *jumpInterpret;
    AbstractInstruction *jumpSelectorMiss;
    sqInt offset;


	/* N.B.  Can't assume TempReg already contains the tag because a method can
	   of course be invoked via the unchecked entry-point, e.g. as does perform:. */
	genGetInlineCacheClassTagFromintoforEntry(ReceiverResultReg, SendNumArgsReg, 0);
	flag("lookupInMethodCacheSel:classTag:");
	cacheBaseReg = NoReg;
	jumpSelectorMiss = compilePerformMethodCacheProbeForwithShiftbaseRegOrNone(Arg0Reg, 0, cacheBaseReg);
	/* begin JumpNonZero: */
	jumpClassMiss = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin MoveMw:r:R: */
	offset = (cacheBaseReg == NoReg
		? (((usqInt)(methodCacheAddress()))) + (((int)((usqInt)(MethodCacheMethod) << (shiftForWord()))))
		: ((int)((usqInt)(MethodCacheMethod) << (shiftForWord()))));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperandoperand(MoveMwrR, offset, ClassReg, SendNumArgsReg);
	itsAHit = anInstruction1;
	genLoadSlotsourceRegdestReg(HeaderIndex, SendNumArgsReg, ClassReg);

	/* Adjust arguments and jump to the method's unchecked entry-point. */
	jumpInterpret = genJumpImmediate(ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(AddCqR, cmNoCheckEntryOffset, ClassReg);
	adjustArgumentsForPerform(numArgs);
	/* begin JumpR: */
	genoperand(JumpR, ClassReg);
	jmpTarget(jumpSelectorMiss, jmpTarget(jumpClassMiss, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	jumpSelectorMiss = compilePerformMethodCacheProbeForwithShiftbaseRegOrNone(Arg0Reg, 1, cacheBaseReg);
	/* begin JumpZero: */
	genConditionalBranchoperand(JumpZero, ((sqInt)itsAHit));
	jmpTarget(jumpSelectorMiss, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	jumpSelectorMiss = compilePerformMethodCacheProbeForwithShiftbaseRegOrNone(Arg0Reg, 2, cacheBaseReg);
	/* begin JumpZero: */
	genConditionalBranchoperand(JumpZero, ((sqInt)itsAHit));
	jmpTarget(jumpSelectorMiss, jmpTarget(jumpInterpret, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return 0;
}


/*	If the objectMemory allows it, generates a quick constant move, else
	generates a word constant move
 */

	/* SimpleStackBasedCogit>>#genMoveConstant:R: */
static AbstractInstruction * NoDbgRegParms
genMoveConstantR(sqInt constant, sqInt reg)
{
    AbstractInstruction *anInstruction;

	return (shouldAnnotateObjectReference(constant)
		? annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, reg)), constant)
		: (/* begin checkQuickConstant:forInstruction: */
			(anInstruction = genoperandoperand(MoveCqR, constant, reg)),
			anInstruction));
}

	/* SimpleStackBasedCogit>>#genMustBeBooleanTrampolineFor:called: */
static sqInt NoDbgRegParms
genMustBeBooleanTrampolineForcalled(sqInt boolean, char *trampolineName)
{
    AbstractInstruction *anInstruction;

	zeroOpcodeIndex();
	assert(!(shouldAnnotateObjectReference(boolean)));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(AddCqR, boolean, TempReg);
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceSendMustBeBoolean, trampolineName, 1, TempReg, null, null, null, 0 /* emptyRegisterMask */, 1, NoReg, 1);
}


/*	Implement 28-bit hashMultiply for SmallInteger and LargePositiveInteger
	receivers. 
 */

	/* SimpleStackBasedCogit>>#genPrimitiveHashMultiply */
static sqInt
genPrimitiveHashMultiply(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction * jmpFailImm;
    AbstractInstruction * jmpFailNonImm;
    AbstractInstruction * jmpNotSmallInt;
    AbstractInstruction * reenter;

	jmpNotSmallInt = genJumpNotSmallInteger(ReceiverResultReg);
	genConvertSmallIntegerToIntegerInReg(ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(MoveCqR, HashMultiplyConstant, TempReg);
	reenter = anInstruction;
	/* begin MulR:R: */
	genMulRR(backEnd, TempReg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(AndCqR, HashMultiplyMask, ReceiverResultReg);
	genConvertIntegerToSmallIntegerInReg(ReceiverResultReg);
	/* begin RetN: */
	genoperand(RetN, 0);
	jmpTarget(jmpNotSmallInt, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	jmpFailImm = genJumpImmediate(ReceiverResultReg);
	genGetCompactClassIndexNonImmOfinto(ReceiverResultReg, ClassReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, ClassLargePositiveIntegerCompactIndex, ClassReg);
	/* begin JumpNonZero: */
	jmpFailNonImm = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genLoadSlotsourceRegdestReg(0, ReceiverResultReg, ReceiverResultReg);
	/* begin Jump: */
	genoperand(Jump, ((sqInt)reenter));
	jmpTarget(jmpFailImm, jmpTarget(jmpFailNonImm, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return 0;
}


/*	Generate the substitute return code for an external or FFI primitive call.
	On success simply return, extracting numArgs from newMethod.
	On primitive failure call ceActivateFailingPrimitiveMethod: newMethod. */

	/* SimpleStackBasedCogit>>#genPrimReturnEnterCogCodeEnilopmart: */
static void NoDbgRegParms
genPrimReturnEnterCogCodeEnilopmart(sqInt profiling)
{
    AbstractInstruction *abstractInstruction;
    sqInt address;
    sqInt address1;
    sqInt address5;
    sqInt address6;
    sqInt address7;
    sqInt address8;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction10;
    AbstractInstruction *anInstruction12;
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction16;
    AbstractInstruction *anInstruction17;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt callTarget;
    AbstractInstruction *continuePostSample;
    AbstractInstruction *jmpFail;
    AbstractInstruction *jmpSample;
    sqInt literal;
    sqInt reg;

	continuePostSample = ((AbstractInstruction *) 0);
	jmpSample = ((AbstractInstruction *) 0);
	zeroOpcodeIndex();
	if (profiling) {

		/* Test nextProfileTick for being non-zero and call checkProfileTick: if so.
		   N.B. nextProfileTick is 64-bits so 32-bit systems need to test both halves. */
		/* begin MoveAw:R: */
		address = nextProfileTickAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction1 = genoperandoperand(MoveAwR, address, TempReg);
		/* begin MoveAw:R: */
		address1 = (nextProfileTickAddress()) + BytesPerWord;
		/* begin checkLiteral:forInstruction: */
		anInstruction2 = genoperandoperand(MoveAwR, address1, ClassReg);
		/* begin OrR:R: */
		genoperandoperand(OrRR, TempReg, ClassReg);
		/* begin JumpNonZero: */
		jmpSample = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
		/* begin Label */
		continuePostSample = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	}
	maybeCompileAllocFillerCheck();
	/* begin MoveAw:R: */
	address6 = primFailCodeAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction13 = genoperandoperand(MoveAwR, address6, TempReg);
	flag("ask concrete code gen if move sets condition codes?");
	/* begin checkQuickConstant:forInstruction: */
	anInstruction14 = genoperandoperand(CmpCqR, 0, TempReg);
	/* begin JumpNonZero: */
	jmpFail = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	/* begin MoveAw:R: */
	address5 = instructionPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction8 = genoperandoperand(MoveAwR, address5, ClassReg);
	genLoadStackPointers(backEnd);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction9 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction10 = genoperandoperandoperand(MoveRMwr, ClassReg, 0, SPReg);
	/* begin RetN: */
	genoperand(RetN, 0);
	jmpTarget(jmpFail, gMoveAwR(newMethodAddress(), SendNumArgsReg));
	/* begin MoveAw:R: */
	address7 = cStackPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction15 = genoperandoperand(MoveAwR, address7, SPReg);
	compileCallFornumArgsargargargargresultRegregsToSave(ceActivateFailingPrimitiveMethod, 1, SendNumArgsReg, null, null, null, NoReg, 0 /* emptyRegisterMask */);
	/* begin MoveAw:R: */
	address8 = instructionPointerAddress();
	reg = ClassReg;
	/* begin checkLiteral:forInstruction: */
	anInstruction16 = genoperandoperand(MoveAwR, address8, reg);
	genLoadStackPointers(backEnd);
	/* begin checkQuickConstant:forInstruction: */
	literal = BytesPerWord;
	anInstruction12 = genoperandoperandoperand(MoveMwrR, BytesPerWord, SPReg, ReceiverResultReg);
	/* begin PushR: */
	genoperand(PushR, ClassReg);
	/* begin RetN: */
	genoperand(RetN, BytesPerWord);
	if (profiling) {

		/* Call ceCheckProfileTick: to record sample and then continue.  newMethod
		   should be up-to-date.  Need to save and restore the link reg around this call. */
		jmpTarget(jmpSample, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
		/* begin saveAndRestoreLinkRegAround: */
		/* begin CallFullRT: */
		callTarget = (usqIntptr_t)ceCheckProfileTick;
		/* begin annotateCall: */
		anInstruction17 = genoperand(CallFull, callTarget);
		abstractInstruction = anInstruction17;
		(abstractInstruction->annotation = IsRelativeCall);
		/* begin Jump: */
		genoperand(Jump, ((sqInt)continuePostSample));
	}
}

	/* SimpleStackBasedCogit>>#genPushConstantFalseBytecode */
static sqInt
genPushConstantFalseBytecode(void)
{
	return genPushLiteral(falseObject());
}

	/* SimpleStackBasedCogit>>#genPushConstantNilBytecode */
static sqInt
genPushConstantNilBytecode(void)
{
	return genPushLiteral(nilObject());
}


/*	79			01001111		Push 1 */

	/* SimpleStackBasedCogit>>#genPushConstantOneBytecode */
static sqInt
genPushConstantOneBytecode(void)
{
	return genPushLiteral((((usqInt)1 << 1) | 1));
}

	/* SimpleStackBasedCogit>>#genPushConstantTrueBytecode */
static sqInt
genPushConstantTrueBytecode(void)
{
	return genPushLiteral(trueObject());
}


/*	78			01001110		Push 0 */

	/* SimpleStackBasedCogit>>#genPushConstantZeroBytecode */
static sqInt
genPushConstantZeroBytecode(void)
{
	return genPushLiteral((((usqInt)0 << 1) | 1));
}

	/* SimpleStackBasedCogit>>#genPushLiteralConstantBytecode */
static sqInt
genPushLiteralConstantBytecode(void)
{
	return genPushLiteralIndex(byte0 & 0x1F);
}


/*	16-31		0001 i i i i		Push Literal Variable #iiii */

	/* SimpleStackBasedCogit>>#genPushLiteralVariable16CasesBytecode */
static sqInt
genPushLiteralVariable16CasesBytecode(void)
{
	return genPushLiteralVariable(byte0 & 15);
}

	/* SimpleStackBasedCogit>>#genPushLiteralVariableBytecode */
static sqInt
genPushLiteralVariableBytecode(void)
{
	return genPushLiteralVariable(byte0 & 0x1F);
}

	/* SimpleStackBasedCogit>>#genPushQuickIntegerConstantBytecode */
static sqInt
genPushQuickIntegerConstantBytecode(void)
{
	return genPushLiteral((((usqInt)(byte0 - 117) << 1) | 1));
}

	/* SimpleStackBasedCogit>>#genPushReceiverVariableBytecode */
static sqInt
genPushReceiverVariableBytecode(void)
{
	return genPushReceiverVariable(byte0 & 15);
}

	/* SimpleStackBasedCogit>>#genPushTemporaryVariableBytecode */
static sqInt
genPushTemporaryVariableBytecode(void)
{
	return genPushTemporaryVariable(byte0 & 15);
}


/*	because selected by CoInterpreter>>quickPrimitiveGeneratorFor: */

	/* SimpleStackBasedCogit>>#genQuickReturnConst */
sqInt
genQuickReturnConst(void)
{
    AbstractInstruction *anInstruction;
    sqInt constant;

	constant = quickPrimitiveConstantFor(primitiveIndex);
	/* begin genMoveConstant:R: */
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	genUpArrowReturn();
	return UnfailingPrimitive;
}


/*	because selected by CoInterpreter>>quickPrimitiveGeneratorFor: */

	/* SimpleStackBasedCogit>>#genQuickReturnInstVar */
sqInt
genQuickReturnInstVar(void)
{
    sqInt index;

	index = quickPrimitiveInstVarIndexFor(primitiveIndex);
	genLoadSlotsourceRegdestReg(index, ReceiverResultReg, ReceiverResultReg);
	genUpArrowReturn();
	return UnfailingPrimitive;
}


/*	because selected by CoInterpreter>>quickPrimitiveGeneratorFor: */

	/* SimpleStackBasedCogit>>#genQuickReturnSelf */
sqInt
genQuickReturnSelf(void)
{
	genUpArrowReturn();
	return UnfailingPrimitive;
}

	/* SimpleStackBasedCogit>>#genReturnFalse */
static sqInt
genReturnFalse(void)
{
    AbstractInstruction *anInstruction;
    sqInt constant;

	/* begin genMoveFalseR: */
	constant = falseObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	return genUpArrowReturn();
}

	/* SimpleStackBasedCogit>>#genReturnNil */
static sqInt
genReturnNil(void)
{
    AbstractInstruction *anInstruction;
    sqInt constant;

	/* begin genMoveNilR: */
	constant = nilObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	return genUpArrowReturn();
}

	/* SimpleStackBasedCogit>>#genReturnNilFromBlock */
static sqInt
genReturnNilFromBlock(void)
{
    AbstractInstruction *anInstruction;
    sqInt constant;

	assert(inBlock > 0);
	/* begin genMoveNilR: */
	constant = nilObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	return genBlockReturn();
}

	/* SimpleStackBasedCogit>>#genReturnTrue */
static sqInt
genReturnTrue(void)
{
    AbstractInstruction *anInstruction;
    sqInt constant;

	/* begin genMoveTrueR: */
	constant = trueObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, ReceiverResultReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
	}
	return genUpArrowReturn();
}


/*	Can use any of the first 64 literals for the selector and pass up to 3
	arguments. 
 */

	/* SimpleStackBasedCogit>>#genSecondExtendedSendBytecode */
static sqInt
genSecondExtendedSendBytecode(void)
{
	return genSendnumArgs(byte1 & 0x3F, ((usqInt) byte1) >> 6);
}

	/* SimpleStackBasedCogit>>#genSendLiteralSelector0ArgsBytecode */
static sqInt
genSendLiteralSelector0ArgsBytecode(void)
{
	return genSendnumArgs(byte0 & 15, 0);
}

	/* SimpleStackBasedCogit>>#genSendLiteralSelector1ArgBytecode */
static sqInt
genSendLiteralSelector1ArgBytecode(void)
{
	return genSendnumArgs(byte0 & 15, 1);
}

	/* SimpleStackBasedCogit>>#genSendLiteralSelector2ArgsBytecode */
static sqInt
genSendLiteralSelector2ArgsBytecode(void)
{
	return genSendnumArgs(byte0 & 15, 2);
}

	/* SimpleStackBasedCogit>>#genShortJumpIfFalse */
static sqInt
genShortJumpIfFalse(void)
{
    sqInt distance;
    sqInt target;

	distance = v3ShortForwardBranchDistance(generatorAt(byte0), bytecodePC, 0, methodObj);
	target = (distance + 1) + bytecodePC;
	return genJumpIfto(falseObject(), target);
}

	/* SimpleStackBasedCogit>>#genShortJumpIfTrue */
static sqInt
genShortJumpIfTrue(void)
{
    sqInt distance;
    sqInt target;

	distance = v3ShortForwardBranchDistance(generatorAt(byte0), bytecodePC, 0, methodObj);
	target = (distance + 1) + bytecodePC;
	return genJumpIfto(trueObject(), target);
}

	/* SimpleStackBasedCogit>>#genShortUnconditionalJump */
static sqInt
genShortUnconditionalJump(void)
{
    sqInt distance;
    sqInt target;

	distance = v3ShortForwardBranchDistance(generatorAt(byte0), bytecodePC, 0, methodObj);
	target = (distance + 1) + bytecodePC;
	return genJumpTo(target);
}

	/* SimpleStackBasedCogit>>#genSpecialSelectorEqualsEquals */
static sqInt
genSpecialSelectorEqualsEquals(void)
{
	return genInlinedIdenticalOrNotIf(0);
}

	/* SimpleStackBasedCogit>>#genSpecialSelectorNotEqualsEquals */
static sqInt
genSpecialSelectorNotEqualsEquals(void)
{
	return genInlinedIdenticalOrNotIf(1);
}

	/* SimpleStackBasedCogit>>#genSpecialSelectorSend */
static sqInt
genSpecialSelectorSend(void)
{
    sqInt index;
    sqInt numArgs;

	index = byte0 - (
#if MULTIPLEBYTECODESETS
	(bytecodeSetOffset == 256
		? AltFirstSpecialSelector + 256
		: FirstSpecialSelector)
#else /* MULTIPLEBYTECODESETS */
	FirstSpecialSelector
#endif /* MULTIPLEBYTECODESETS */
	);
	numArgs = specialSelectorNumArgs(index);
	return genSendnumArgs((-index) - 1, numArgs);
}

	/* SimpleStackBasedCogit>>#genStoreAndPopReceiverVariableBytecode */
static sqInt
genStoreAndPopReceiverVariableBytecode(void)
{
	return genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(1, byte0 & 7, ((((ssTop())->type)) != SSConstant)
	 || ((isNonImmediate(((ssTop())->constant)))
	 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
}

	/* SimpleStackBasedCogit>>#genStoreAndPopRemoteTempLongBytecode */
static sqInt
genStoreAndPopRemoteTempLongBytecode(void)
{
	return genStorePopRemoteTempAtneedsStoreCheck(1, byte1, byte2, ((((ssTop())->type)) != SSConstant)
	 || ((isNonImmediate(((ssTop())->constant)))
	 && (shouldAnnotateObjectReference(((ssTop())->constant)))));
}

	/* SimpleStackBasedCogit>>#genStoreAndPopTemporaryVariableBytecode */
static sqInt
genStoreAndPopTemporaryVariableBytecode(void)
{
	return genStorePopTemporaryVariable(1, byte0 & 7);
}

	/* SimpleStackBasedCogit>>#genStoreRemoteTempLongBytecode */
static sqInt
genStoreRemoteTempLongBytecode(void)
{
	return genStorePopRemoteTempAtneedsStoreCheck(0, byte1, byte2, ((((ssTop())->type)) != SSConstant)
	 || ((isNonImmediate(((ssTop())->constant)))
	 && (shouldAnnotateObjectReference(((ssTop())->constant)))));
}


/*	SistaV1: *	217		Trap */

	/* SimpleStackBasedCogit>>#genUnconditionalTrapBytecode */
static sqInt
genUnconditionalTrapBytecode(void)
{
	return EncounteredUnknownBytecode;
}


/*	Collect the branch and send data for cogMethod, storing it into arrayObj. */

	/* SimpleStackBasedCogit>>#mapPCDataFor:into: */
sqInt
mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj)
{
    sqInt aMethodHeader;
    sqInt aMethodHeader1;
    sqInt aMethodObj;
    sqInt annotation;
    sqInt bcpc;
    sqInt bsOffset;
    sqInt byte;
    CogBlockMethod *cogMethod1;
    BytecodeDescriptor *descriptor;
    sqInt distance;
    sqInt endbcpc;
    sqInt errCode;
    CogMethod *homeMethod;
    sqInt isBackwardBranch;
    sqInt isInBlock;
    sqInt latestContinuation;
    usqInt map;
    sqInt mapByte;
    usqInt mcpc;
    sqInt nExts;
    sqInt nextBcpc;
    sqInt result;
    sqInt startbcpc;
    sqInt targetPC;

	latestContinuation = 0;
	introspectionDataIndex = 0;
	introspectionData = arrayObj;
	if (((cogMethod->stackCheckOffset)) == 0) {
		assert(introspectionDataIndex == 0);
		if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) {
			storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject());
			storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1));
			storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject());
			storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1));
		}
		else {
			storePointerUncheckedofObjectwithValue(0, introspectionData, nilObject());
			storePointerUncheckedofObjectwithValue(1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1));
			storePointerUncheckedofObjectwithValue(2, introspectionData, nilObject());
			storePointerUncheckedofObjectwithValue(3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1));
		}
		return 4;
	}
	/* begin mapFor:bcpc:performUntil:arg: */
	cogMethod1 = ((CogBlockMethod *) cogMethod);
	startbcpc = startPCOfMethod((cogMethod->methodObject));
	assert(((cogMethod1->stackCheckOffset)) > 0);

	/* The stack check maps to the start of the first bytecode,
	   the first bytecode being effectively after frame build. */
	mcpc = (((usqInt)cogMethod1)) + ((cogMethod1->stackCheckOffset));
	result = pcDataForAnnotationMcpcBcpcMethod(null, (0 + (((int)((usqInt)(HasBytecodePC) << 1)))), (((char *) mcpc)), startbcpc, (((void *)cogMethod)));
	if (result != 0) {
		errCode = result;
		goto l7;
	}

	/* In both CMMethod and CMBlock cases find the start of the map and
	   skip forward to the bytecode pc map entry for the stack check. */
	bcpc = startbcpc;
	if (((cogMethod1->cmType)) == CMMethod) {
		/* begin cmIsFullBlock */
		isInBlock = (cogMethod1->cpicHasMNUCaseOrCMIsFullBlock);
		homeMethod = ((CogMethod *) cogMethod1);
		assert(startbcpc == (startPCOfMethodHeader((homeMethod->methodHeader))));
		map = ((((usqInt)homeMethod)) + ((homeMethod->blockSize))) - 1;
		annotation = ((usqInt) (byteAt(map))) >> AnnotationShift;
		assert((annotation == IsAbsPCReference)
		 || ((annotation == IsObjectReference)
		 || ((annotation == IsRelativeCall)
		 || (annotation == IsDisplacementX2N))));
		latestContinuation = startbcpc;
		aMethodObj = (homeMethod->methodObject);
		endbcpc = (numBytesOf(aMethodObj)) - 1;
		/* begin bytecodeSetOffsetForHeader: */
		aMethodHeader = (homeMethod->methodHeader);
		bsOffset = 
#    if MULTIPLEBYTECODESETS
			(headerIndicatesAlternateBytecodeSet(aMethodHeader)
						? 256
						: 0)
#    else /* MULTIPLEBYTECODESETS */
			0
#    endif /* MULTIPLEBYTECODESETS */
			;
		bcpc += deltaToSkipPrimAndErrorStoreInheader(aMethodObj, (homeMethod->methodHeader));
	}
	else {
		isInBlock = 1;
		assert(bcpc == ((cogMethod1->startpc)));
		homeMethod = cmHomeMethod(cogMethod1);
		map = findMapLocationForMcpcinMethod((((usqInt)cogMethod1)) + (sizeof(CogBlockMethod)), homeMethod);
		assert(map != 0);
		annotation = ((usqInt) (byteAt(map))) >> AnnotationShift;
		assert(((((usqInt) annotation) >> AnnotationShift) == HasBytecodePC)
		 || ((((usqInt) annotation) >> AnnotationShift) == IsDisplacementX2N));
		while (((annotation = ((usqInt) (byteAt(map))) >> AnnotationShift)) != HasBytecodePC) {
			map -= 1;
		}

		/* skip fiducial; i.e. the map entry for the pc immediately following the method header. */
		map -= 1;
		aMethodObj = (homeMethod->methodObject);
		bcpc = startbcpc - (
#if MULTIPLEBYTECODESETS
	(headerIndicatesAlternateBytecodeSet((homeMethod->methodHeader))
		? AltBlockCreationBytecodeSize
		: BlockCreationBytecodeSize)
#else /* MULTIPLEBYTECODESETS */
	BlockCreationBytecodeSize
#endif /* MULTIPLEBYTECODESETS */
	);
		/* begin bytecodeSetOffsetForHeader: */
		aMethodHeader1 = (homeMethod->methodHeader);
		bsOffset = 
#    if MULTIPLEBYTECODESETS
			(headerIndicatesAlternateBytecodeSet(aMethodHeader1)
						? 256
						: 0)
#    else /* MULTIPLEBYTECODESETS */
			0
#    endif /* MULTIPLEBYTECODESETS */
			;
		byte = (fetchByteofObject(bcpc, aMethodObj)) + bsOffset;
		descriptor = generatorAt(byte);
		endbcpc = (bcpc + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? (/* begin spanFor:at:exts:in: */
		((descriptor->spanFunction))(descriptor, bcpc, -1, aMethodObj))
	: 0));
		bcpc = startbcpc;
	}
	nExts = 0;
	while ((((usqInt) (byteAt(map))) >> AnnotationShift) != HasBytecodePC) {
		map -= 1;
	}
	map -= 1;
	while (((mapByte = byteAt(map))) != MapEnd) {

		/* defensive; we exit on bcpc */
		if (mapByte >= FirstAnnotation) {
			annotation = ((usqInt) mapByte) >> AnnotationShift;
			mcpc += (mapByte & DisplacementMask);
			if (annotation >= HasBytecodePC) {
				if ((annotation == IsSendCall)
				 && ((((usqInt) ((mapByte = byteAt(map - 1)))) >> AnnotationShift) == IsAnnotationExtension)) {
					annotation += mapByte & DisplacementMask;
					map -= 1;
				}
				while (1) {
					byte = (fetchByteofObject(bcpc, aMethodObj)) + bsOffset;
					descriptor = generatorAt(byte);
					if (isInBlock) {
						if (bcpc >= endbcpc) {
							errCode = 0;
							goto l7;
						}
					}
					else {
						if (((descriptor->isReturn))
						 && (bcpc >= latestContinuation)) {
							errCode = 0;
							goto l7;
						}
						if ((isBranch(descriptor))
						 || ((descriptor->isBlockCreation))) {
							/* begin latestContinuationPCFor:at:exts:in: */
							distance = ((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj);
							targetPC = (bcpc + ((descriptor->numBytes))) + (((distance < 0) ? 0 : distance));
							latestContinuation = ((latestContinuation < targetPC) ? targetPC : latestContinuation);
						}
						latestContinuation = latestContinuation;
					}
					nextBcpc = (bcpc + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? (/* begin spanFor:at:exts:in: */
		((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj))
	: 0));
					if (((descriptor->isMapped))
					 || (isInBlock
					 && ((descriptor->isMappedInBlock)))) break;
					bcpc = nextBcpc;
					nExts = ((descriptor->isExtension)
						? nExts + 1
						: 0);
				}
				isBackwardBranch = (isBranch(descriptor))
				 && ((assert(((descriptor->spanFunction)) != null),
				(((descriptor->spanFunction))(descriptor, bcpc, nExts, aMethodObj)) < 0));
				result = pcDataForAnnotationMcpcBcpcMethod(descriptor, ((isBackwardBranch
	? (((sqInt)((usqInt)(annotation) << 1))) + 1
	: ((sqInt)((usqInt)(annotation) << 1)))), (((char *) mcpc)), ((isBackwardBranch
	? bcpc - (2 * nExts)
	: bcpc)), (((void *)cogMethod)));
				if (result != 0) {
					errCode = result;
					goto l7;
				}
				bcpc = nextBcpc;
				nExts = ((descriptor->isExtension)
					? nExts + 1
					: 0);
			}
		}
		else {
			assert(((((usqInt) mapByte) >> AnnotationShift) == IsDisplacementX2N)
			 || ((((usqInt) mapByte) >> AnnotationShift) == IsAnnotationExtension));
			if (mapByte < (((int)((usqInt)(IsAnnotationExtension) << AnnotationShift)))) {
				mcpc += (((sqInt)((usqInt)((mapByte - DisplacementX2N)) << AnnotationShift)));
			}
		}
		map -= 1;
	}
	errCode = 0;
	l7:	/* end mapFor:bcpc:performUntil:arg: */;
	if (errCode != 0) {
		assert(errCode == PrimErrNoMemory);
		return -1;
	}
	if (((cogMethod->blockEntryOffset)) != 0) {
		errCode = blockDispatchTargetsForperformarg(cogMethod, pcDataForBlockEntryMethod, ((sqInt)cogMethod));
		if (errCode != 0) {
			assert(errCode == PrimErrNoMemory);
			return -1;
		}
	}
	return introspectionDataIndex;
}


/*	If allocCheckFiller is true, words in newSpace from freeStart to
	scavengeThreshold are filled with their address, and after each call of a
	plugin primitive, the VM checks
	that freeStart points to a word containing the value of freeStart. This is
	a simple
	check for primitives overwriting the ends of an object. */

	/* SimpleStackBasedCogit>>#maybeCompileAllocFillerCheck */
static void
maybeCompileAllocFillerCheck(void)
{
    sqInt address;
    sqInt address1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *jmpOk;

	if (getCheckAllocFiller()) {
		/* begin MoveAw:R: */
		address = freeStartAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction = genoperandoperand(MoveAwR, address, ClassReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperandoperand(MoveMwrR, 0, ClassReg, TempReg);
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, ClassReg, TempReg);
		/* begin JumpZero: */
		jmpOk = genConditionalBranchoperand(JumpZero, ((sqInt)0));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperand(MoveCqR, PrimErrWritePastObject, TempReg);
		/* begin MoveR:Aw: */
		address1 = primFailCodeAddress();
		/* begin checkLiteral:forInstruction: */
		anInstruction3 = genoperandoperand(MoveRAw, TempReg, address1);
		jmpTarget(jmpOk, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	}
}

	/* SimpleStackBasedCogit>>#numSpecialSelectors */
static sqInt
numSpecialSelectors(void)
{
	return 
#  if MULTIPLEBYTECODESETS
		(bytecodeSetOffset == 256
				? AltNumSpecialSelectors
				: NumSpecialSelectors)
#  else /* MULTIPLEBYTECODESETS */
		NumSpecialSelectors
#  endif /* MULTIPLEBYTECODESETS */
		;
}


/*	Collect the branch and send data for the block method starting at
	blockEntryMcpc, storing it into picData.
 */

	/* SimpleStackBasedCogit>>#pcDataForBlockEntry:Method: */
static usqInt NoDbgRegParms
pcDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod)
{
	storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject());
	storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)(blockEntryMcpc - blockNoContextSwitchOffset) << 1) | 1));
	storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject());
	storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)blockEntryMcpc << 1) | 1));
	introspectionDataIndex += 4;
	return 0;
}

	/* SimpleStackBasedCogit>>#pcDataFor:Annotation:Mcpc:Bcpc:Method: */
static sqInt NoDbgRegParms
pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg)
{
    sqInt actualBcpc;
    sqInt actualMcpc;

	if (!(descriptor)) {

		/* this is the stackCheck offset */
		assert(introspectionDataIndex == 0);
		if (((((CogMethod *) cogMethodArg))->cpicHasMNUCaseOrCMIsFullBlock)) {
			storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject());
			storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cbNoSwitchEntryOffset << 1) | 1));
			storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject());
			storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cbEntryOffset << 1) | 1));
		}
		else {
			storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, nilObject());
			storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)cmEntryOffset << 1) | 1));
			storePointerUncheckedofObjectwithValue(introspectionDataIndex + 2, introspectionData, nilObject());
			storePointerUncheckedofObjectwithValue(introspectionDataIndex + 3, introspectionData, (((usqInt)cmNoCheckEntryOffset << 1) | 1));
		}
		storePointerUncheckedofObjectwithValue(introspectionDataIndex + 4, introspectionData, (((usqInt)(bcpc + 1) << 1) | 1));
		storePointerUncheckedofObjectwithValue(introspectionDataIndex + 5, introspectionData, (((((((CogMethod *) cogMethodArg))->stackCheckOffset)) << 1) | 1));
		introspectionDataIndex += 6;
		return 0;
	}
	if ((((usqInt) isBackwardBranchAndAnnotation) >> 1) >= HasBytecodePC) {
		actualBcpc = (isBackwardBranchAndAnnotation & 1
			? bcpc + 1
			: (bcpc + ((descriptor->numBytes))) + 1);
		actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg));
		storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1));
		storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1));
		introspectionDataIndex += 2;
	}
	return 0;
}


/*	If there is a generator for the current primitive then answer it;
	otherwise answer nil. */

	/* SimpleStackBasedCogit>>#primitiveGeneratorOrNil */
static PrimitiveDescriptor *
primitiveGeneratorOrNil(void)
{
    PrimitiveDescriptor *primitiveDescriptor;
    static PrimitiveDescriptor primitiveGeneratorTable[MaxCompiledPrimitiveIndex+1] = {
	{ 0, -1 },
	{ genPrimitiveAdd, 1 },
	{ genPrimitiveSubtract, 1 },
	{ genPrimitiveLessThan, 1 },
	{ genPrimitiveGreaterThan, 1 },
	{ genPrimitiveLessOrEqual, 1 },
	{ genPrimitiveGreaterOrEqual, 1 },
	{ genPrimitiveEqual, 1 },
	{ genPrimitiveNotEqual, 1 },
	{ genPrimitiveMultiply, 1 },
	{ genPrimitiveDivide, 1 },
	{ genPrimitiveMod, 1 },
	{ genPrimitiveDiv, 1 },
	{ genPrimitiveQuo, 1 },
	{ genPrimitiveBitAnd, 1 },
	{ genPrimitiveBitOr, 1 },
	{ genPrimitiveBitXor, 1 },
	{ genPrimitiveBitShift, 1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveAsFloat, 0 },
	{ genPrimitiveFloatAdd, 1 },
	{ genPrimitiveFloatSubtract, 1 },
	{ genPrimitiveFloatLessThan, 1 },
	{ genPrimitiveFloatGreaterThan, 1 },
	{ genPrimitiveFloatLessOrEqual, 1 },
	{ genPrimitiveFloatGreaterOrEqual, 1 },
	{ genPrimitiveFloatEqual, 1 },
	{ genPrimitiveFloatNotEqual, 1 },
	{ genPrimitiveFloatMultiply, 1 },
	{ genPrimitiveFloatDivide, 1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveFloatSquareRoot, 0 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveAt, 1 },
	{ genPrimitiveAtPut, 2 },
	{ genPrimitiveSize, 0 },
	{ genPrimitiveStringAt, 1 },
	{ genPrimitiveStringAtPut, 2 },
	{ genFastPrimFail, -1 },
	{ genFastPrimFail, -1 },
	{ genFastPrimFail, -1 },
	{ genPrimitiveObjectAt, 1 },
	{ 0, -1 },
	{ genPrimitiveNew, 0 },
	{ genPrimitiveNewWithArg, 1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveIdentityHash, 0 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveNewMethod, 2 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitivePerform, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveStringReplace, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveIdentical, 1 },
	{ genPrimitiveClass, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveShallowCopy, 0 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveStringCompareWith, 1 },
	{ genPrimitiveHashMultiply, 0 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveIntegerAt, 1 },
	{ genPrimitiveIntegerAtPut, 2 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveNotIdentical, 1 },
	{ genPrimitiveAsCharacter, -1 },
	{ genPrimitiveImmediateAsInteger, 0 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveIdentityHash, 0 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genFastPrimFail, -1 },
	{ genFastPrimFail, -1 },
	{ 0, -1 },
	{ genPrimitiveClosureValue, 0 },
	{ genPrimitiveClosureValue, 1 },
	{ genPrimitiveClosureValue, 2 },
	{ genPrimitiveClosureValue, 3 },
	{ genPrimitiveClosureValue, 4 },
	{ 0, -1 },
	{ genPrimitiveFullClosureValue, -1 },
	{ 0, -1 },
	{ genPrimitiveFullClosureValue, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ 0, -1 },
	{ genPrimitiveClosureValue, 0 },
	{ genPrimitiveClosureValue, 1 }
};

	if (isQuickPrimitiveIndex(primitiveIndex)) {

		/* an unused one */
		primitiveDescriptor = (&(primitiveGeneratorTable[0]));
		(primitiveDescriptor->primitiveGenerator = quickPrimitiveGeneratorFor(primitiveIndex));
		return primitiveDescriptor;
	}
	if (((primitiveIndex >= 1) && (primitiveIndex <= MaxCompiledPrimitiveIndex))) {
		return (&(primitiveGeneratorTable[primitiveIndex]));
	}
	return null;
}

	/* SimpleStackBasedCogit>>#recordCallOffsetIn: */
void
recordCallOffsetIn(CogMethod *cogMethod)
{
    sqInt offset;
    sqInt *offsetTable;

	offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod));
	if ((externalSetPrimOffsets[(cogMethod->cmNumArgs)]) == null) {
		externalSetPrimOffsets[(cogMethod->cmNumArgs)] = offset;
	}
	else {
		assert((externalSetPrimOffsets[(cogMethod->cmNumArgs)]) == offset);
	}
	offsetTable = (isJump(primInvokeInstruction)
		? externalPrimJumpOffsets
		: externalPrimCallOffsets);
	offset = (((primInvokeInstruction->address)) + ((primInvokeInstruction->machineCodeSize))) - (((sqInt)cogMethod));
	if ((offsetTable[(cogMethod->cmNumArgs)]) == null) {
		offsetTable[(cogMethod->cmNumArgs)] = offset;
	}
	else {
		assert((offsetTable[(cogMethod->cmNumArgs)]) == offset);
	}
}

	/* SimpleStackBasedCogit>>#rewritePrimInvocationIn:to: */
void
rewritePrimInvocationInto(CogMethod *cogMethod, void (*primFunctionPointer)(void))
{
    usqInt address;
    sqInt extent;
    sqInt flags;
    sqInt primIndex;

	assert(((cogMethod->cmType)) == CMMethod);
	primIndex = primitiveIndexOfMethodheader((cogMethod->methodObject), (cogMethod->methodHeader));
	flags = primitivePropertyFlags(primIndex);
	if (flags & PrimCallNeedsPrimitiveFunction) {
		storeLiteralbeforeFollowingAddress(backEnd, ((usqInt)primFunctionPointer), (((usqInt)cogMethod)) + (externalSetPrimOffsets[(cogMethod->cmNumArgs)]));
	}
	if (flags & PrimCallMayCallBack) {
		address = (((usqInt)cogMethod)) + (externalPrimJumpOffsets[(cogMethod->cmNumArgs)]);
		extent = rewriteJumpFullAttarget(backEnd, address, ((usqInt)primFunctionPointer));
	}
	else {
		address = (((usqInt)cogMethod)) + (externalPrimCallOffsets[(cogMethod->cmNumArgs)]);
		extent = rewriteCallFullAttarget(backEnd, address, ((usqInt)primFunctionPointer));
	}
	flushICacheFromto(processor, (((usqInt)cogMethod)) + cmNoCheckEntryOffset, (((usqInt)address)) + extent);
}


/*	Answers if the code is installed in a class instantiating objects with the
	format. Used in primitive 
	generation to make a quick path based on where the method is installed.
	This method cannot
	be used as a guarantee as there can be false positive, it's just a
	heuristic. Tries to interpret the last literal of the method as a behavior
	(more than 3 fields, 3rd field a Smi).
	If it can be interpreted as a behavior, answers if instSpec matches the
	format, else answers false. */

	/* SimpleStackBasedCogit>>#seemsToBeInstantiating: */
static sqInt NoDbgRegParms
seemsToBeInstantiating(sqInt format)
{
	return maybeMethodClassOfseemsToBeInstantiating(methodObj, format);
}

	/* SimpleStackBasedCogit>>#v3:Block:Code:Size: */
static sqInt NoDbgRegParms
v3BlockCodeSize(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj)
{
	assert(nExts <= 0);
	return (((sqInt)((usqInt)((fetchByteofObject(pc + 2, aMethodObj))) << 8))) + (fetchByteofObject(pc + 3, aMethodObj));
}


/*	Answer the distance of a two byte forward long jump. */

	/* SimpleStackBasedCogit>>#v3:LongForward:Branch:Distance: */
static sqInt NoDbgRegParms
v3LongForwardBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj)
{
	assert(nExts == 0);
	return (((sqInt)((usqInt)(((fetchByteofObject(pc, aMethodObj)) & 3)) << 8))) + (fetchByteofObject(pc + 1, aMethodObj));
}


/*	Answer the distance of a two byte forward long jump. */

	/* SimpleStackBasedCogit>>#v3:Long:Branch:Distance: */
static sqInt NoDbgRegParms
v3LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj)
{
	assert(nExts == 0);
	return (((sqInt)((usqInt)((((fetchByteofObject(pc, aMethodObj)) & 7) - 4)) << 8))) + (fetchByteofObject(pc + 1, aMethodObj));
}


/*	N.B. This serves for both BlueBook/V3 and V4 short jumps. */

	/* SimpleStackBasedCogit>>#v3:ShortForward:Branch:Distance: */
static sqInt NoDbgRegParms
v3ShortForwardBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj)
{
	assert(nExts == 0);
	return ((fetchByteofObject(pc, aMethodObj)) & 7) + 1;
}


/*	253		11111101 eei i i kkk	jjjjjjjj		Push Closure Num Copied iii (+ Ext A
	// 16 * 8) Num Args kkk (+ Ext A \\ 16 * 8) BlockSize jjjjjjjj (+ Ext B *
	256). ee = num extensions
 */

	/* SimpleStackBasedCogit>>#v4:Block:Code:Size: */
static sqInt NoDbgRegParms
v4BlockCodeSize(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj)
{
    sqInt byte;
    sqInt byteOne;
    sqInt extAValue;
    sqInt extBValue;
    sqInt extBValue1;
    sqInt extByte;
    sqInt pc1;


	/* If nExts < 0 it isn't known and we rely on the number of extensions encoded in the eeiiikkk byte. */
	byteOne = fetchByteofObject(pc + 1, aMethodObj);
	assert((nExts < 0)
	 || (nExts == (((usqInt) byteOne) >> 6)));
	/* begin parseV4Exts:priorTo:in:into: */
	extAValue = (extBValue1 = 0);
	pc1 = (pc - (((usqInt) byteOne) >> 6)) - (((usqInt) byteOne) >> 6);
	while (pc1 < pc) {
		byte = fetchByteofObject(pc1, aMethodObj);
		pc1 += 1;
		extByte = fetchByteofObject(pc1, aMethodObj);
		pc1 += 1;
		assert((byte == 224)
		 || (byte == 225));
		if (byte == 224) {
			extAValue = (((usqInt) extAValue << 8)) + extByte;
		}
		else {
			extBValue1 = ((extBValue1 == 0)
			 && (extByte > 0x7F)
				? extByte - 256
				: (((usqInt) extBValue1 << 8)) + extByte);
		}
	}
	extBValue = extBValue1;
	return (fetchByteofObject(pc + 2, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8)));
}


/*	242		11110010	i i i i i i i i	Jump i i i i i i i i (+ Extend B * 256,
	where bbbbbbbb = sddddddd, e.g. -32768 = i=0, a=0, s=1)
 */
/*	243		11110011	i i i i i i i i	Pop and Jump 0n True i i i i i i i i (+
	Extend A * 256)
 */
/*	244		11110100	i i i i i i i i	Pop and Jump 0n False i i i i i i i i (+
	Extend A * 256)
 */

	/* SimpleStackBasedCogit>>#v4:LongForward:Branch:Distance: */
static sqInt NoDbgRegParms
v4LongForwardBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj)
{
    sqInt byte;
    sqInt extAValue;
    sqInt extBValue;
    sqInt extBValue1;
    sqInt extByte;
    sqInt pc1;

	assert(nExts >= 0);
	/* begin parseV4Exts:priorTo:in:into: */
	extAValue = (extBValue1 = 0);
	pc1 = (pc - nExts) - nExts;
	while (pc1 < pc) {
		byte = fetchByteofObject(pc1, aMethodObj);
		pc1 += 1;
		extByte = fetchByteofObject(pc1, aMethodObj);
		pc1 += 1;
		assert((byte == 224)
		 || (byte == 225));
		if (byte == 224) {
			extAValue = (((usqInt) extAValue << 8)) + extByte;
		}
		else {
			extBValue1 = ((extBValue1 == 0)
			 && (extByte > 0x7F)
				? extByte - 256
				: (((usqInt) extBValue1 << 8)) + extByte);
		}
	}
	extBValue = extBValue1;
	return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8)));
}


/*	242		11110010	i i i i i i i i	Jump i i i i i i i i (+ Extend B * 256,
	where bbbbbbbb = sddddddd, e.g. -32768 = i=0, a=0, s=1)
 */

	/* SimpleStackBasedCogit>>#v4:Long:Branch:Distance: */
static sqInt NoDbgRegParms
v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj)
{
    sqInt byte;
    sqInt extAValue;
    sqInt extBValue;
    sqInt extBValue1;
    sqInt extByte;
    sqInt pc1;

	assert(nExts >= 0);
	/* begin parseV4Exts:priorTo:in:into: */
	extAValue = (extBValue1 = 0);
	pc1 = (pc - nExts) - nExts;
	while (pc1 < pc) {
		byte = fetchByteofObject(pc1, aMethodObj);
		pc1 += 1;
		extByte = fetchByteofObject(pc1, aMethodObj);
		pc1 += 1;
		assert((byte == 224)
		 || (byte == 225));
		if (byte == 224) {
			extAValue = (((usqInt) extAValue << 8)) + extByte;
		}
		else {
			extBValue1 = ((extBValue1 == 0)
			 && (extByte > 0x7F)
				? extByte - 256
				: (((usqInt) extBValue1 << 8)) + extByte);
		}
	}
	extBValue = extBValue1;
	return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8)));
}

	/* SimpleStackBasedCogit>>#voidCogCompiledCode */
void
voidCogCompiledCode(void)
{
    sqInt i;

	clearCogCompiledCode();
	for (i = 0; i <= MaxNumArgs; i += 1) {
		externalPrimJumpOffsets[i] = null;
		externalPrimCallOffsets[i] = null;
		externalSetPrimOffsets[i] = null;
	}
}


/*	Add a blockStart for an embedded block. For a binary tree walk block
	dispatch blocks must be compiled in pc/depth-first order but are scanned
	in breadth-first
	order, so do an insertion sort (which of course is really a bubble sort
	because we
	have to move everything higher to make room). */

	/* StackToRegisterMappingCogit>>#addBlockStartAt:numArgs:numCopied:span: */
static BlockStart * NoDbgRegParms
addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span)
{
    BlockStart *blockStart;
    sqInt i;
    sqInt j;


	/* Transcript ensureCr; nextPutAll: 'addBlockStartAt: '; print: bytecodepc; cr; flush. */
	if (blockCount > 0) {
		i = blockCount - 1;
		while (1) {

			/* check for repeat addition during recompilation due to initialNil miscount. */
			blockStart = (&(blockStarts[i]));
			if (((blockStart->startpc)) == bytecodepc) {
				return blockStart;
			}
			if (!((((blockStart->startpc)) > bytecodepc)
			 && (i > 0))) break;
			i -= 1;
		}
		for (j = blockCount; j >= (i + 1); j += -1) {
			blockStarts[j] = (blockStarts[j - 1]);
		}
		blockStart = (&(blockStarts[i + 1]));
	}
	else {
		blockStart = (&(blockStarts[blockCount]));
	}
	blockCount += 1;
	(blockStart->startpc = bytecodepc);
	(blockStart->numArgs = numArgs);
	(blockStart->numCopied = numCopied);
	(blockStart->numInitialNils = 0);
	(blockStart->stackCheckLabel = null);
	(blockStart->hasInstVarRef = 0);
	(blockStart->span = span);
	return blockStart;
}


/*	e.g.	Receiver				Receiver	or	Receiver				Receiver	(RISC)
	Selector/Arg0	=>		Arg1			Selector/Arg0	=>		Arg1
	Arg1					Arg2			Arg1					Arg2
	Arg2					Arg3			Arg2			sp->	Arg3
	Arg3			sp->	retpc	sp->	Arg3
	sp->	retpc */
/*	Generate code to adjust the possibly stacked arguments immediately
	before jumping to a method looked up by a perform primitive. */

	/* StackToRegisterMappingCogit>>#adjustArgumentsForPerform: */
static void NoDbgRegParms
adjustArgumentsForPerform(sqInt numArgs)
{
    AbstractInstruction *anInstruction13;
    AbstractInstruction *anInstruction14;
    AbstractInstruction *anInstruction15;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction7;
    AbstractInstruction *anInstruction8;
    AbstractInstruction *anInstruction9;
    sqInt index;
    sqInt literal10;
    sqInt literal2;
    sqInt literal3;
    sqInt literal5;
    sqInt literal9;

	assert((numRegArgs()) <= 2);
	assert(numArgs >= 1);
	if (numArgs <= 2 /* numRegArgs */) {
		if (numArgs == 2) {
			/* begin MoveR:R: */
			genoperandoperand(MoveRR, Arg1Reg, Arg0Reg);
		}
		return;
	}
	if ((2 /* numRegArgs */ + 1) == numArgs) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction7 = genoperandoperandoperand(MoveMwrR, 0, SPReg, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		literal2 = BytesPerWord;
		anInstruction4 = genoperandoperandoperand(MoveMwrR, BytesPerWord, SPReg, Arg1Reg);
		/* begin checkQuickConstant:forInstruction: */
		literal3 = BytesPerWord * 2;
		anInstruction5 = genoperandoperandoperand(MoveMwrR, BytesPerWord * 2, SPReg, Arg0Reg);
		/* begin checkQuickConstant:forInstruction: */
		literal5 = (numArgs + 1) * BytesPerWord;
		anInstruction8 = genoperandoperand(AddCqR, (numArgs + 1) * BytesPerWord, SPReg);
		/* begin checkQuickConstant:forInstruction: */
		anInstruction9 = genoperandoperandoperand(MoveRMwr, TempReg, 0, SPReg);
		return;
	}
	for (index = (numArgs - 1); index >= 1; index += -1) {
		/* begin checkQuickConstant:forInstruction: */
		literal9 = index * BytesPerWord;
		anInstruction13 = genoperandoperandoperand(MoveMwrR, index * BytesPerWord, SPReg, TempReg);
		/* begin checkQuickConstant:forInstruction: */
		literal10 = (index + 1) * BytesPerWord;
		anInstruction14 = genoperandoperandoperand(MoveRMwr, TempReg, (index + 1) * BytesPerWord, SPReg);
	}
	/* begin PopR: */
	genoperand(PopR, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction15 = genoperandoperandoperand(MoveRMwr, TempReg, 0, SPReg);
}


/*	If the stack entry is already in a register not conflicting with regMask,
	answers it,
	else allocate a new register not conflicting with reg mask
 */

	/* StackToRegisterMappingCogit>>#allocateRegForStackEntryAt:notConflictingWith: */
static sqInt NoDbgRegParms
allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask)
{
    sqInt mask;
    CogSimStackEntry *stackEntry;

	stackEntry = ssValue(index);
	mask = registerMaskOrNone(stackEntry);
	if ((mask != 0)
	 && ((mask & regMask) == 0)) {
		flag("TODO");
		return registerOrNone(stackEntry);
	}
	return allocateRegNotConflictingWith(regMask);
}


/*	if there's a free register, use it */

	/* StackToRegisterMappingCogit>>#allocateRegNotConflictingWith: */
static sqInt NoDbgRegParms
allocateRegNotConflictingWith(sqInt regMask)
{
    sqInt reg;

	reg = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | regMask);
	if (reg == NoReg) {

		/* No free register, choose one that does not conflict with regMask */
		reg = freeAnyRegNotConflictingWith(regMask);
	}
	if (reg == ReceiverResultReg) {

		/* If we've allocated RcvrResultReg, it's not live anymore */
		voidReceiverResultRegContainsSelf();
	}
	return reg;
}

	/* StackToRegisterMappingCogit>>#anyReferencesToRegister:inTopNItems: */
static sqInt NoDbgRegParms
anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n)
{
    sqInt i;
    sqInt regMask;

	/* begin registerMaskFor: */
	regMask = 1U << reg;
	for (i = simStackPtr; i >= ((simStackPtr - n) + 1); i += -1) {
		if ((registerMask(simStackAt(i))) & regMask) {
			return 1;
		}
	}
	return 0;
}


/*	This is a static version of ceCallCogCodePopReceiverArg0Regs
	for break-pointing when debugging in C. */
/*	This exists only for break-pointing. */

	/* StackToRegisterMappingCogit>>#callCogCodePopReceiverArg0Regs */
void
callCogCodePopReceiverArg0Regs(void)
{
	realCECallCogCodePopReceiverArg0Regs();
}


/*	This is a static version of ceCallCogCodePopReceiverArg1Arg0Regs
	for break-pointing when debugging in C. */
/*	This exists only for break-pointing. */

	/* StackToRegisterMappingCogit>>#callCogCodePopReceiverArg1Arg0Regs */
void
callCogCodePopReceiverArg1Arg0Regs(void)
{
	realCECallCogCodePopReceiverArg1Arg0Regs();
}


/*	Loop over bytecodes, dispatching to the generator for each bytecode,
	handling fixups in due course.
 */

	/* StackToRegisterMappingCogit>>#compileAbstractInstructionsFrom:through: */
static sqInt NoDbgRegParms
compileAbstractInstructionsFromthrough(sqInt start, sqInt end)
{
    BytecodeDescriptor *descriptor;
    BytecodeFixup *fixup;
    sqInt generateBranchAround;
    sqInt nExts;
    sqInt nextOpcodeIndex;
    sqInt result;

	traceSimStack();
	bytecodePC = start;
	nExts = (result = 0);
	descriptor = null;
	deadCode = 0;
	while (1) {
		maybeHaltIfDebugPC();
		mergeWithFixupIfRequired((fixup = fixupAt(bytecodePC)));
		descriptor = loadBytesAndGetDescriptor();
		nextOpcodeIndex = opcodeIndex;
		result = (deadCode
			? mapDeadDescriptorIfNeeded(descriptor)
			: ((descriptor->generator))());
		if (result == 0) {
			/* begin assertExtsAreConsumed: */
			if (!((descriptor->isExtension))) {
				assert((extA == 0)
				 && ((extB == 0)
				 && (numExtB == 0)));
			}
		}
		traceDescriptor(descriptor);
		traceSimStack();
		/* begin patchFixupTargetIfNeeded:nextOpcodeIndex: */
		if ((((((usqInt)((fixup->targetInstruction)))) >= NeedsNonMergeFixupFlag) && ((((usqInt)((fixup->targetInstruction)))) <= NeedsMergeFixupFlag))) {

			/* There is a fixup for this bytecode.  It must point to the first generated
			   instruction for this bytecode.  If there isn't one we need to add a label. */
			if (opcodeIndex == nextOpcodeIndex) {
				/* begin Label */
				genoperandoperand(Label, (labelCounter += 1), bytecodePC);
			}
			(fixup->targetInstruction = abstractInstructionAt(nextOpcodeIndex));
		}
		/* begin maybeDumpLiterals: */
		if (((isBranch(descriptor))
		 && (!(((descriptor->isBranchTrue))
		 || ((descriptor->isBranchFalse)))))
		 || ((descriptor->isReturn))) {
			/* begin dumpLiterals: */
			generateBranchAround = !(((isBranch(descriptor))
			 && (!(((descriptor->isBranchTrue))
			 || ((descriptor->isBranchFalse)))))
			 || ((descriptor->isReturn)));
		}
		/* begin nextBytecodePCFor:exts: */
		bytecodePC = (bytecodePC + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? ((descriptor->spanFunction))(descriptor, bytecodePC, nExts, methodObj)
	: 0));
		if (!((result == 0)
		 && (bytecodePC <= end))) break;
		nExts = ((descriptor->isExtension)
			? nExts + 1
			: 0);
	}
	/* begin checkEnoughOpcodes */
	if (opcodeIndex > numAbstractOpcodes) {
		error("Cog JIT internal error. Too many abstract opcodes.  Num opcodes heuristic is too optimistic.");
	}
	return result;
}

	/* StackToRegisterMappingCogit>>#compileBlockBodies */
static sqInt
compileBlockBodies(void)
{
    BlockStart *blockStart;
    sqInt compiledBlocksCount;
    sqInt initialCounterIndex;
    sqInt initialOpcodeIndex;
    sqInt initialStackPtr;
    sqInt (* const pushNilSizeFunction)(sqInt,sqInt) = squeakV3orSistaV1PushNilSizenumInitialNils;
    sqInt result;
    sqInt savedNeedsFrame;
    sqInt savedNumArgs;
    sqInt savedNumTemps;

	assert(blockCount > 0);
	savedNeedsFrame = needsFrame;
	savedNumArgs = methodOrBlockNumArgs;
	savedNumTemps = methodOrBlockNumTemps;
	inBlock = InVanillaBlock;
	compiledBlocksCount = 0;
	while (compiledBlocksCount < blockCount) {
		compilationPass = 1;
		blockStart = blockStartAt(compiledBlocksCount);
		if (((result = scanBlock(blockStart))) < 0) {
			return result;
		}
		initialOpcodeIndex = opcodeIndex;

		/* for SistaCogit */
		initialCounterIndex = 0 /* maybeCounterIndex */;
		while (1) {
			compileBlockEntry(blockStart);
			initialStackPtr = simStackPtr;
			if (((result = compileAbstractInstructionsFromthrough(((blockStart->startpc)) + (pushNilSizeFunction(methodObj, ((blockStart->numInitialNils)))), (((blockStart->startpc)) + ((blockStart->span))) - 1))) < 0) {
				return result;
			}
			if (initialStackPtr == simStackPtr) break;
			assert((initialStackPtr > simStackPtr)
			 || (deadCode));

			/* for asserts */
			compilationPass += 1;
			(blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr);
			(((blockStart->fakeHeader))->dependent = null);
			reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1);
			bzero(abstractOpcodes + initialOpcodeIndex,
									(opcodeIndex - initialOpcodeIndex) * sizeof(AbstractInstruction));
			opcodeIndex = initialOpcodeIndex;
					}
		compiledBlocksCount += 1;
	}
	needsFrame = savedNeedsFrame;
	methodOrBlockNumArgs = savedNumArgs;
	methodOrBlockNumTemps = savedNumTemps;
	return 0;
}


/*	Build a frame for a block activation. See CoInterpreter
	class>>initializeFrameIndices. closure (in ReceiverResultReg)
	arg0
	...
	argN
	caller's saved ip/this stackPage (for a base frame)
	fp->	saved fp
	method
	context (uninitialized?)
	receiver
	first temp
	...
	sp->	Nth temp
	Avoid use of SendNumArgsReg which is the flag determining whether
	context switch is allowed on stack-overflow. */
/*	Build a frame for a block activation. See CoInterpreter
	class>>initializeFrameIndices. Override to push the register receiver and
	register arguments, if any, and to correctly
	initialize the explicitly nilled/pushed temp entries (they are /not/ of
	type constant nil). */

	/* StackToRegisterMappingCogit>>#compileBlockFrameBuild: */
static void NoDbgRegParms
compileBlockFrameBuild(BlockStart *blockStart)
{
    AbstractInstruction *abstractInstruction;
    sqInt address;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction * cascade0;
    sqInt constant;
    sqInt constant1;
    sqInt i;
    sqInt ign;

	/* begin annotateBytecode: */
	abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	(abstractInstruction->annotation = HasBytecodePC);
	/* begin PushR: */
	genoperand(PushR, FPReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SPReg, FPReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, ClassReg);
	cascade0 = (blockStart->fakeHeader);
	addDependent(cascade0, annotateAbsolutePCRef(checkLiteralforInstruction(((sqInt)((blockStart->fakeHeader))), genoperand(PushCw, ((sqInt)((blockStart->fakeHeader)))))));
	/* begin setLabelOffset: */
	((cascade0->operands))[1] = MFMethodFlagIsBlockFlag;
	annotateobjRef(gPushCw(nilObject()), nilObject());
	if ((blockStart->hasInstVarRef)) {

		/* Use ReceiverResultReg for Context to agree with store check trampoline */
		genLoadSlotsourceRegdestReg(ClosureOuterContextIndex, ClassReg, ReceiverResultReg);
		genLoadSlotsourceRegdestReg(ReceiverIndex, ReceiverResultReg, Arg0Reg);
		genEnsureOopInRegNotForwardedscratchRegupdatingSlotin(Arg0Reg, TempReg, ReceiverIndex, ReceiverResultReg);
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, Arg0Reg, ReceiverResultReg);
	}
	else {
		genLoadSlotsourceRegdestReg(ClosureOuterContextIndex, ClassReg, Arg0Reg);
		genLoadSlotsourceRegdestReg(ReceiverIndex, Arg0Reg, ReceiverResultReg);
	}
	/* begin PushR: */
	genoperand(PushR, ReceiverResultReg);
	for (i = 0; i < ((blockStart->numCopied)); i += 1) {
		genLoadSlotsourceRegdestReg(i + ClosureFirstCopiedValueIndex, ClassReg, TempReg);
		/* begin PushR: */
		genoperand(PushR, TempReg);
	}
	/* begin MoveAw:R: */
	address = stackLimitAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction2 = genoperandoperand(MoveAwR, address, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, TempReg, SPReg);
	/* begin JumpBelow: */
	genConditionalBranchoperand(JumpBelow, ((sqInt)stackOverflowCall));
	(blockStart->stackCheckLabel = annotateBytecode(genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	methodOrBlockNumTemps = (((blockStart->numArgs)) + ((blockStart->numCopied))) + ((blockStart->numInitialNils));
	initSimStackForFramefulMethod((blockStart->startpc));
	if (((blockStart->numInitialNils)) > 0) {
		if (((blockStart->numInitialNils)) > 1) {
			/* begin genMoveNilR: */
			constant = nilObject();
			if (shouldAnnotateObjectReference(constant)) {
				annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, TempReg)), constant);
			}
			else {
				/* begin checkQuickConstant:forInstruction: */
				anInstruction = genoperandoperand(MoveCqR, constant, TempReg);
			}
			for (ign = 1; ign <= ((blockStart->numInitialNils)); ign += 1) {
				/* begin PushR: */
				genoperand(PushR, TempReg);
			}
		}
		else {
			/* begin genPushConstant: */
			constant1 = nilObject();
			if (shouldAnnotateObjectReference(constant1)) {
				annotateobjRef(checkLiteralforInstruction(constant1, genoperand(PushCw, constant1)), constant1);
			}
			else {
				/* begin checkQuickConstant:forInstruction: */
				anInstruction1 = genoperand(PushCq, constant1);
			}
		}
	}
}


/*	Make sure ReceiverResultReg holds the receiver, loaded from the closure,
	which is what is initially in ReceiverResultReg. We must annotate the
	first instruction in vanilla blocks so that
	findMethodForStartBcpc:inHomeMethod: can function. We need two annotations
	because the first is a fiducial. */
/*	Make sure ReceiverResultReg holds the receiver, loaded from
	the closure, which is what is initially in ReceiverResultReg */

	/* StackToRegisterMappingCogit>>#compileBlockFramelessEntry: */
static void NoDbgRegParms
compileBlockFramelessEntry(BlockStart *blockStart)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;

	methodOrBlockNumTemps = (((blockStart->numArgs)) + ((blockStart->numCopied))) + ((blockStart->numInitialNils));
	initSimStackForFramelessBlock((blockStart->startpc));
	if (!(((blockStart->entryLabel)) == null)) {
		/* begin annotateBytecode: */
		abstractInstruction = (blockStart->entryLabel);
		(abstractInstruction->annotation = HasBytecodePC);
		/* begin annotateBytecode: */
		abstractInstruction1 = (blockStart->entryLabel);
		(abstractInstruction1->annotation = HasBytecodePC);
	}
	if ((blockStart->hasInstVarRef)) {

		/* Use ReceiverResultReg for Context to agree with store check trampoline */
		genLoadSlotsourceRegdestReg(ClosureOuterContextIndex, ReceiverResultReg, ReceiverResultReg);
		genLoadSlotsourceRegdestReg(ReceiverIndex, ReceiverResultReg, Arg0Reg);
		genEnsureOopInRegNotForwardedscratchRegupdatingSlotin(Arg0Reg, TempReg, ReceiverIndex, ReceiverResultReg);
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, Arg0Reg, ReceiverResultReg);
	}
	else {
		genLoadSlotsourceRegdestReg(ClosureOuterContextIndex, ReceiverResultReg, TempReg);
		genLoadSlotsourceRegdestReg(ReceiverIndex, TempReg, ReceiverResultReg);
	}
}

	/* StackToRegisterMappingCogit>>#compileCogFullBlockMethod: */
static CogMethod * NoDbgRegParms
compileCogFullBlockMethod(sqInt numCopied)
{
    sqInt allocBytes;
    sqInt fixupBytes;
    sqInt numBlocks;
    sqInt numBytecodes;
    sqInt numberOfAbstractOpcodes;
    sqInt numCleanBlocks;
    sqInt opcodeBytes;
    sqInt result;

	methodOrBlockNumTemps = tempCountOf(methodObj);
	hasYoungReferent = isYoungObject(methodObj);
	methodOrBlockNumArgs = argumentCountOf(methodObj);
	inBlock = InFullBlock;
	postCompileHook = null;
	maxLitIndex = -1;
	assert((primitiveIndexOf(methodObj)) == 0);

	/* initial estimate.  Actual endPC is determined in scanMethod. */
	initialPC = startPCOfMethod(methodObj);
	endPC = numBytesOf(methodObj);
	numBytecodes = (endPC - initialPC) + 1;
	primitiveIndex = 0;
	/* begin allocateOpcodes:bytecodes:ifFail: */
	numberOfAbstractOpcodes = (numBytecodes + 10) * 10 /* estimateOfAbstractOpcodesPerBytecodes */;
	numAbstractOpcodes = numberOfAbstractOpcodes;
	opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;

	/* Document the fact that the MaxStackAllocSize ensures that the number of abstract
	   opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */
	allocBytes = opcodeBytes + fixupBytes;
	assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize);
	if (allocBytes > MaxStackAllocSize) {
		return ((CogMethod *) MethodTooBig);
		goto l1;
	}
	abstractOpcodes = alloca(allocBytes);
	bzero(abstractOpcodes, allocBytes);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeBytes));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	l1:	/* end allocateOpcodes:bytecodes:ifFail: */;
	flag("TODO");
	if (((numBlocks = scanMethod())) < 0) {
		return ((CogMethod *) numBlocks);
	}
	assert(numBlocks == 0);
	numCleanBlocks = scanForCleanBlocks();
	assert(numCleanBlocks == 0);
	allocateBlockStarts(numBlocks + numCleanBlocks);
	blockCount = 0;
	if (numCleanBlocks > 0) {
		addCleanBlockStarts();
	}
	if (!(maybeAllocAndInitIRCs())) {

		/* Inaccurate error code, but it'll do.  This will likely never fail. */
		return ((CogMethod *) InsufficientCodeSpace);
	}
	blockEntryLabel = null;
	(methodLabel->dependent = null);
	if (((result = compileEntireFullBlockMethod(numCopied))) < 0) {
		return ((CogMethod *) result);
	}
	return generateCogFullBlock();
}

	/* StackToRegisterMappingCogit>>#compileCogMethod: */
static CogMethod * NoDbgRegParms
compileCogMethod(sqInt selector)
{
    sqInt allocBytes;
    int extra;
    sqInt fixupBytes;
    sqInt numBlocks;
    sqInt numBytecodes;
    sqInt numberOfAbstractOpcodes;
    sqInt numCleanBlocks;
    sqInt opcodeBytes;
    sqInt result;

	methodOrBlockNumTemps = tempCountOf(methodObj);
	hasYoungReferent = (isYoungObject(methodObj))
	 || (isYoung(selector));
	methodOrBlockNumArgs = argumentCountOf(methodObj);
	inBlock = 0;
	postCompileHook = null;
	maxLitIndex = -1;
	extra = ((((primitiveIndex = primitiveIndexOf(methodObj))) > 0)
	 && (!(isQuickPrimitiveIndex(primitiveIndex)))
		? 30
		: 10);

	/* initial estimate.  Actual endPC is determined in scanMethod. */
	initialPC = startPCOfMethod(methodObj);
	endPC = (isQuickPrimitiveIndex(primitiveIndex)
		? initialPC - 1
		: numBytesOf(methodObj));
	numBytecodes = (endPC - initialPC) + 1;
	/* begin allocateOpcodes:bytecodes:ifFail: */
	numberOfAbstractOpcodes = (numBytecodes + extra) * 10 /* estimateOfAbstractOpcodesPerBytecodes */;
	numAbstractOpcodes = numberOfAbstractOpcodes;
	opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes;
	fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes;

	/* Document the fact that the MaxStackAllocSize ensures that the number of abstract
	   opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */
	allocBytes = opcodeBytes + fixupBytes;
	assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize);
	if (allocBytes > MaxStackAllocSize) {
		return ((CogMethod *) MethodTooBig);
		goto l1;
	}
	abstractOpcodes = alloca(allocBytes);
	bzero(abstractOpcodes, allocBytes);
	fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeBytes));
	zeroOpcodeIndexForNewOpcodes();
	labelCounter = 0;
	l1:	/* end allocateOpcodes:bytecodes:ifFail: */;
	if (((numBlocks = scanMethod())) < 0) {
		return ((CogMethod *) numBlocks);
	}
	numCleanBlocks = scanForCleanBlocks();
	if (methodFoundInvalidPostScan()) {
		return ((CogMethod *) ShouldNotJIT);
	}
	allocateBlockStarts(numBlocks + numCleanBlocks);
	blockCount = 0;
	if (numCleanBlocks > 0) {
		addCleanBlockStarts();
	}
	if (!(maybeAllocAndInitIRCs())) {

		/* Inaccurate error code, but it'll do.  This will likely never fail. */
		return ((CogMethod *) InsufficientCodeSpace);
	}
	blockEntryLabel = null;
	(methodLabel->dependent = null);
	if (((result = compileEntireMethod())) < 0) {
		return ((CogMethod *) result);
	}
	return generateCogMethod(selector);
}


/*	Compile the abstract instructions for the entire method, including blocks. */
/*	Compile the abstract instructions for the entire method, including blocks. */

	/* StackToRegisterMappingCogit>>#compileEntireMethod */
static sqInt
compileEntireMethod(void)
{
    sqInt result;

	regArgsHaveBeenPushed = 0;
	/* begin preenMethodLabel */
	(((((AbstractInstruction *) methodLabel))->operands))[1] = 0;
	compileAbort();
	compileEntry();
	if (((result = compilePrimitive())) < 0) {
		return result;
	}
	compileFrameBuild();
	if (((result = compileMethodBody())) < 0) {
		return result;
	}
	if (blockCount == 0) {
		return 0;
	}
	if (((result = compileBlockBodies())) < 0) {
		return result;
	}
	return compileBlockDispatch();
}


/*	Build a frame for a CogMethod activation. See CoInterpreter
	class>>initializeFrameIndices. receiver (in ReceiverResultReg)
	arg0
	...
	argN
	caller's saved ip/this stackPage (for a base frame)
	fp->	saved fp
	method
	context (uninitialized?)
	receiver
	first temp
	...
	sp->	Nth temp
	If there is a primitive and an error code the Nth temp is the error code.
	Ensure SendNumArgsReg is set early on (incidentally to nilObj) because
	it is the flag determining whether context switch is allowed on
	stack-overflow.  */
/*	Build a frame for a CogMethod activation. See CoInterpreter
	class>>initializeFrameIndices. Override to push the register receiver and
	register arguments, if any. */

	/* StackToRegisterMappingCogit>>#compileFrameBuild */
static void
compileFrameBuild(void)
{
    sqInt address;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction3;
    sqInt constant;
    sqInt i;
    sqInt iLimiT;
    AbstractInstruction *jumpSkip;

	
#  if IMMUTABILITY
	if (useTwoPaths) {
		compileTwoPathFrameBuild();
		return;
	}
#  endif /* IMMUTABILITY */
	if (!needsFrame) {
		if (useTwoPaths) {
			compileTwoPathFramelessInit();
		}
		initSimStackForFramelessMethod(initialPC);
		return;
	}
	assert(!(useTwoPaths));
	genPushRegisterArgs();
	if (!needsFrame) {
		return;
	}
	/* begin PushR: */
	genoperand(PushR, FPReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SPReg, FPReg);
	addDependent(methodLabel, annotateAbsolutePCRef(checkLiteralforInstruction(((sqInt)methodLabel), genoperand(PushCw, ((sqInt)methodLabel)))));
	/* begin genMoveNilR: */
	constant = nilObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, SendNumArgsReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, SendNumArgsReg);
	}
	/* begin PushR: */
	genoperand(PushR, SendNumArgsReg);
	/* begin PushR: */
	genoperand(PushR, ReceiverResultReg);
	for (i = (methodOrBlockNumArgs + 1), iLimiT = (temporaryCountOfMethodHeader(methodHeader)); i <= iLimiT; i += 1) {
		/* begin PushR: */
		genoperand(PushR, SendNumArgsReg);
	}
	if (((primitiveIndexOfMethodheader(methodObj, methodHeader)) > 0)
	 && ((longStoreBytecodeForHeader(methodHeader)) == (fetchByteofObject((startPCOfMethod(methodObj)) + (sizeOfCallPrimitiveBytecode(methodHeader)), methodObj)))) {
		compileGetErrorCode();
	}
	/* begin MoveAw:R: */
	address = stackLimitAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction3 = genoperandoperand(MoveAwR, address, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, TempReg, SPReg);
	if (canContextSwitchIfActivatingheader(methodObj, methodHeader)) {
		/* begin JumpBelow: */
		genConditionalBranchoperand(JumpBelow, ((sqInt)stackOverflowCall));
		/* begin Label */
		stackCheckLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	}
	else {
		/* begin JumpAboveOrEqual: */
		jumpSkip = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(MoveCqR, 0, SendNumArgsReg);
		/* begin Jump: */
		genoperand(Jump, ((sqInt)stackOverflowCall));
		jmpTarget(jumpSkip, (stackCheckLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	}
	/* begin annotateBytecode: */
	(stackCheckLabel->annotation = HasBytecodePC);
	initSimStackForFramefulMethod(initialPC);
}


/*	Make sure ReceiverResultReg holds the receiver, loaded from the closure,
	which is what is initially in ReceiverResultReg.  */
/*	Make sure ReceiverResultReg holds the receiver, loaded from
	the closure, which is what is initially in ReceiverResultReg */

	/* StackToRegisterMappingCogit>>#compileFullBlockFramelessEntry: */
static void NoDbgRegParms
compileFullBlockFramelessEntry(sqInt numCopied)
{
	initSimStackForFramelessBlock(initialPC);
	flag("TODO");
	genLoadSlotsourceRegdestReg(FullClosureReceiverIndex, ReceiverResultReg, Arg0Reg);
	genEnsureOopInRegNotForwardedscratchRegupdatingSlotin(Arg0Reg, TempReg, FullClosureReceiverIndex, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ReceiverResultReg);
}


/*	Build a frame for a block activation. See CoInterpreter
	class>>initializeFrameIndices. closure (in ReceiverResultReg)
	arg0
	...
	argN
	caller's saved ip/this stackPage (for a base frame)
	fp->	saved fp
	method
	context (uninitialized?)
	receiver
	first temp
	...
	sp->	Nth temp
	Avoid use of SendNumArgsReg which is the flag determining whether
	context switch is allowed on stack-overflow. */

	/* StackToRegisterMappingCogit>>#compileFullBlockMethodFrameBuild: */
static void NoDbgRegParms
compileFullBlockMethodFrameBuild(sqInt numCopied)
{
    AbstractInstruction *abstractInstruction;
    sqInt address;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt constant;
    sqInt i;
    sqInt iLimiT;

	if (useTwoPaths) {

		/* method with only inst var store, we compile only slow path for now */
		useTwoPaths = 0;
		
#    if IMMUTABILITY
		needsFrame = 1;
#    endif /* IMMUTABILITY */
	}
	if (!needsFrame) {
		assert(numCopied == 0);
		compileFullBlockFramelessEntry(numCopied);
		initSimStackForFramelessBlock(initialPC);
		return;
	}
	if (!needsFrame) {
		return;
	}
	/* begin PushR: */
	genoperand(PushR, FPReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SPReg, FPReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, ReceiverResultReg, ClassReg);
	addDependent(methodLabel, annotateAbsolutePCRef(checkLiteralforInstruction(((sqInt)methodLabel), genoperand(PushCw, ((sqInt)methodLabel)))));
	/* begin setLabelOffset: */
	(((((AbstractInstruction *) methodLabel))->operands))[1] = MFMethodFlagIsBlockFlag;
	/* begin genMoveNilR: */
	constant = nilObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, SendNumArgsReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, constant, SendNumArgsReg);
	}
	/* begin PushR: */
	genoperand(PushR, SendNumArgsReg);
	flag("TODO");
	genLoadSlotsourceRegdestReg(FullClosureReceiverIndex, ClassReg, Arg0Reg);
	genEnsureOopInRegNotForwardedscratchRegupdatingSlotin(Arg0Reg, TempReg, FullClosureReceiverIndex, ReceiverResultReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, Arg0Reg, ReceiverResultReg);
	/* begin PushR: */
	genoperand(PushR, ReceiverResultReg);
	for (i = 0; i < numCopied; i += 1) {
		genLoadSlotsourceRegdestReg(i + FullClosureFirstCopiedValueIndex, ClassReg, TempReg);
		/* begin PushR: */
		genoperand(PushR, TempReg);
	}
	for (i = ((methodOrBlockNumArgs + numCopied) + 1), iLimiT = (temporaryCountOfMethodHeader(methodHeader)); i <= iLimiT; i += 1) {
		/* begin PushR: */
		genoperand(PushR, SendNumArgsReg);
	}
	/* begin MoveAw:R: */
	address = stackLimitAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction1 = genoperandoperand(MoveAwR, address, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, TempReg, SPReg);
	/* begin JumpBelow: */
	genConditionalBranchoperand(JumpBelow, ((sqInt)stackOverflowCall));
	/* begin annotateBytecode: */
	abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	(abstractInstruction->annotation = HasBytecodePC);
	stackCheckLabel = abstractInstruction;
	initSimStackForFramefulMethod(initialPC);
}


/*	Build a frame for a CogMethod activation. See CoInterpreter
	class>>initializeFrameIndices. receiver (in ReceiverResultReg)
	arg0
	...
	argN
	caller's saved ip/this stackPage (for a base frame)
	fp->	saved fp
	method
	context (uninitialized?)
	receiver
	first temp
	...
	sp->	Nth temp
	If there is a primitive and an error code the Nth temp is the error code.
	Ensure SendNumArgsReg is set early on (incidentally to nilObj) because
	it is the flag determining whether context switch is allowed on
	stack-overflow.  */
/*	We are in a method where the frame is needed *only* for instance variable
	store, typically a setter method.
	This case has 20% overhead with Immutability compared to setter without
	immutability because of the stack
	frame creation. We compile two path, one where the object is immutable,
	one where it isn't. At the beginning 
	of the frame build, we take one path or the other depending on the
	receiver mutability.
	
	Note: this specific case happens only where there are only instance
	variabel stores. We could do something
	similar for literal variable stores, but we don't as it's too uncommon.
 */

	/* StackToRegisterMappingCogit>>#compileTwoPathFrameBuild */
#if IMMUTABILITY
static void
compileTwoPathFrameBuild(void)
{
    sqInt address;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction4;
    sqInt constant;
    sqInt i;
    sqInt iLimiT;
    AbstractInstruction * jumpImmutable;
    AbstractInstruction * jumpOld;
    AbstractInstruction *jumpSkip;
    sqInt quickConstant;

	assert(useTwoPaths);
	assert(blockCount == 0);
	jumpImmutable = genJumpImmutablescratchReg(ReceiverResultReg, TempReg);

	/* first path. The receiver is mutable */
	
	/* N.B. FLAGS := destReg - scratchReg */
	/* begin CmpCq:R: */
	quickConstant = storeCheckBoundary();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, quickConstant, ReceiverResultReg);
	/* begin JumpAboveOrEqual: */
	jumpOld = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	assert(!needsFrame);
	initSimStackForFramelessMethod(initialPC);
	/* begin compileMethodBody */
	if (endPC < initialPC) {
		goto l7;
	}
	compileAbstractInstructionsFromthrough(initialPC + (deltaToSkipPrimAndErrorStoreInheader(methodObj, methodHeader)), endPC);
	l7:	/* end compileMethodBody */;

	/* reset because it impacts inst var store compilation */
	useTwoPaths = 0;
	needsFrame = 1;
	jmpTarget(jumpOld, jmpTarget(jumpImmutable, genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	genPushRegisterArgs();
	if (!needsFrame) {
		return;
	}
	/* begin PushR: */
	genoperand(PushR, FPReg);
	/* begin MoveR:R: */
	genoperandoperand(MoveRR, SPReg, FPReg);
	addDependent(methodLabel, annotateAbsolutePCRef(checkLiteralforInstruction(((sqInt)methodLabel), genoperand(PushCw, ((sqInt)methodLabel)))));
	/* begin genMoveNilR: */
	constant = nilObject();
	if (shouldAnnotateObjectReference(constant)) {
		annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, SendNumArgsReg)), constant);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(MoveCqR, constant, SendNumArgsReg);
	}
	/* begin PushR: */
	genoperand(PushR, SendNumArgsReg);
	/* begin PushR: */
	genoperand(PushR, ReceiverResultReg);
	for (i = (methodOrBlockNumArgs + 1), iLimiT = (temporaryCountOfMethodHeader(methodHeader)); i <= iLimiT; i += 1) {
		/* begin PushR: */
		genoperand(PushR, SendNumArgsReg);
	}
	if (((primitiveIndexOfMethodheader(methodObj, methodHeader)) > 0)
	 && ((longStoreBytecodeForHeader(methodHeader)) == (fetchByteofObject((startPCOfMethod(methodObj)) + (sizeOfCallPrimitiveBytecode(methodHeader)), methodObj)))) {
		compileGetErrorCode();
	}
	/* begin MoveAw:R: */
	address = stackLimitAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction4 = genoperandoperand(MoveAwR, address, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, TempReg, SPReg);
	if (canContextSwitchIfActivatingheader(methodObj, methodHeader)) {
		/* begin JumpBelow: */
		genConditionalBranchoperand(JumpBelow, ((sqInt)stackOverflowCall));
		/* begin Label */
		stackCheckLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	}
	else {
		/* begin JumpAboveOrEqual: */
		jumpSkip = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
		/* begin checkQuickConstant:forInstruction: */
		anInstruction2 = genoperandoperand(MoveCqR, 0, SendNumArgsReg);
		/* begin Jump: */
		genoperand(Jump, ((sqInt)stackOverflowCall));
		jmpTarget(jumpSkip, (stackCheckLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	}
	/* begin annotateBytecode: */
	(stackCheckLabel->annotation = HasBytecodePC);
	initSimStackForFramefulMethod(initialPC);
}
#endif /* IMMUTABILITY */


/*	We are in a frameless method with at least two inst var stores. We compile
	two paths,
	one where the object is in new space, and one where it isn't. At the
	beginning 
	of the method, we take one path or the other depending on the receiver
	being in newSpace.
 */

	/* StackToRegisterMappingCogit>>#compileTwoPathFramelessInit */
static void
compileTwoPathFramelessInit(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction * jumpOld;
    sqInt quickConstant;

	assert(!(IMMUTABILITY));
	assert(!(needsFrame));
	assert(useTwoPaths);

	/* first path. The receiver is young */
	
	/* N.B. FLAGS := destReg - scratchReg */
	/* begin CmpCq:R: */
	quickConstant = storeCheckBoundary();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperand(CmpCqR, quickConstant, ReceiverResultReg);
	/* begin JumpAboveOrEqual: */
	jumpOld = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
	initSimStackForFramelessMethod(initialPC);
	/* begin compileMethodBody */
	if (endPC < initialPC) {
		goto l1;
	}
	compileAbstractInstructionsFromthrough(initialPC + (deltaToSkipPrimAndErrorStoreInheader(methodObj, methodHeader)), endPC);
	l1:	/* end compileMethodBody */;

	/* reset because it impacts inst var store compilation */
	useTwoPaths = 0;
	jmpTarget(jumpOld, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
}

	/* StackToRegisterMappingCogit>>#cPICMissTrampolineFor: */
static sqInt NoDbgRegParms
cPICMissTrampolineFor(sqInt numArgs)
{
	return picMissTrampolines[((numArgs < (2 /* numRegArgs */ + 1)) ? numArgs : (2 /* numRegArgs */ + 1))];
}


/*	Replaces the Blue Book double-extended send [132], in which the first byte
	was wasted on 8 bits of argument count. 
	Here we use 3 bits for the operation sub-type (opType), and the remaining
	5 bits for argument count where needed. 
	The last byte give access to 256 instVars or literals. 
	See also secondExtendedSendBytecode
 */

	/* StackToRegisterMappingCogit>>#doubleExtendedDoAnythingBytecode */
static sqInt
doubleExtendedDoAnythingBytecode(void)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    AbstractInstruction *abstractInstruction2;
    sqInt opType;

	opType = ((usqInt) byte1) >> 5;
	if (opType == 0) {
		return genSendnumArgs(byte2, byte1 & 0x1F);
	}
	if (opType == 1) {
		return genSendSupernumArgs(byte2, byte1 & 0x1F);
	}
	
	switch (opType) {
	case 2:
		if (isReadMediatedContextInstVarIndex(byte2)) {
			genPushMaybeContextReceiverVariable(byte2);
		}
		else {
			genPushReceiverVariable(byte2);
			/* begin annotateInstructionForBytecode */
			if (prevInstIsPCAnnotated()) {
				/* begin Nop */
				abstractInstruction = gen(Nop);
			}
			else {
				/* begin Label */
				abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
			}
			(abstractInstruction->annotation = HasBytecodePC);
			return 0;
		}
		break;
	case 3:
		genPushLiteralIndex(byte2);
		/* begin annotateInstructionForBytecode */
		if (prevInstIsPCAnnotated()) {
			/* begin Nop */
			abstractInstruction1 = gen(Nop);
		}
		else {
			/* begin Label */
			abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		}
		(abstractInstruction1->annotation = HasBytecodePC);
		return 0;

	case 4:
		genPushLiteralVariable(byte2);
		break;
	case 7:
		genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(0, byte2, ((((ssTop())->type)) != SSConstant)
		 || ((isNonImmediate(((ssTop())->constant)))
		 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
		
#    if IMMUTABILITY

		/* genStorePop:LiteralVariable: annotates; don't annotate twice */
		return 0;
#    endif /* IMMUTABILITY */
		break;
	default:
		
		/* 5 & 6 */
		if (isWriteMediatedContextInstVarIndex(byte2)) {
			genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(opType == 6, byte2, ((((ssTop())->type)) != SSConstant)
			 || ((isNonImmediate(((ssTop())->constant)))
			 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
		}
		else {
			genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(opType == 6, byte2, ((((ssTop())->type)) != SSConstant)
			 || ((isNonImmediate(((ssTop())->constant)))
			 && (shouldAnnotateObjectReference(((ssTop())->constant)))), 1);
		}
		
#    if IMMUTABILITY

		/* genStorePop:...ReceiverVariable: annotate; don't annotate twice */
		return 0;
#    endif /* IMMUTABILITY */
;
	}
	assert(needsFrame);
	assert(!(prevInstIsPCAnnotated()));
	/* begin annotateBytecode: */
	abstractInstruction2 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	(abstractInstruction2->annotation = HasBytecodePC);
	return 0;
}

	/* StackToRegisterMappingCogit>>#duplicateTopBytecode */
static sqInt
duplicateTopBytecode(void)
{
    SimStackEntry desc;

	/* begin ssTopDescriptor */
	desc = simStack[simStackPtr];
	return ssPushDesc(desc);
}


/*	Make sure there's a flagged fixup at the target pc in fixups.
	Initially a fixup's target is just a flag. Later on it is replaced with a
	proper instruction. */

	/* StackToRegisterMappingCogit>>#ensureFixupAt: */
static BytecodeFixup * NoDbgRegParms
ensureFixupAt(sqInt targetPC)
{
    BytecodeFixup *fixup;

	/* begin fixupAt: */
	fixup = fixupAtIndex(targetPC - initialPC);
	traceFixupmerge(fixup, 1);
	if ((((usqInt)((fixup->targetInstruction)))) <= NeedsNonMergeFixupFlag) {

		/* convert a non-merge into a merge */
		/* begin becomeMergeFixup */
		(fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag);
		(fixup->simStackPtr = simStackPtr);
			}
	else {
		if ((fixup->isTargetOfBackwardBranch)) {

			/* this is the target of a backward branch and
			   so doesn't have a simStackPtr assigned yet. */
			(fixup->simStackPtr = simStackPtr);
					}
		else {
			assert(((fixup->simStackPtr)) == simStackPtr);
					}
	}
	/* begin recordBcpc: */
	return fixup;
}


/*	Make sure there's a flagged fixup at the target pc in fixups.
	Initially a fixup's target is just a flag. Later on it is replaced with a
	proper instruction. */

	/* StackToRegisterMappingCogit>>#ensureNonMergeFixupAt: */
static BytecodeFixup * NoDbgRegParms
ensureNonMergeFixupAt(sqInt targetPC)
{
    BytecodeFixup *fixup;

	/* begin fixupAt: */
	fixup = fixupAtIndex(targetPC - initialPC);
	traceFixupmerge(fixup, 1);
	if (((fixup->targetInstruction)) == 0) {
		/* begin becomeNonMergeFixup */
		(fixup->targetInstruction) = ((AbstractInstruction *) NeedsNonMergeFixupFlag);
	}
	/* begin recordBcpc: */
	return fixup;
}

	/* StackToRegisterMappingCogit>>#ensureReceiverResultRegContainsSelf */
static void
ensureReceiverResultRegContainsSelf(void)
{
	if (needsFrame) {
		if (!((((simSelf())->liveRegister)) == ReceiverResultReg)) {
			/* begin ssAllocateRequiredReg: */
			ssAllocateRequiredRegMaskupThroughupThroughNative(1U << ReceiverResultReg, simStackPtr, simNativeStackPtr);
			/* begin putSelfInReceiverResultReg */
			storeToReg(simSelf(), ReceiverResultReg);
			((simSelf())->liveRegister = ReceiverResultReg);
		}
	}
	else {
		assert(((((simSelf())->type)) == SSRegister)
		 && (((((simSelf())->registerr)) == ReceiverResultReg)
		 && (receiverIsInReceiverResultReg())));
	}
}

	/* StackToRegisterMappingCogit>>#evaluate:at: */
static void NoDbgRegParms
evaluateat(BytecodeDescriptor *descriptor, sqInt pc)
{
	byte0 = fetchByteofObject(pc, methodObj);
	assert(descriptor == (generatorAt(bytecodeSetOffset + byte0)));
	loadSubsequentBytesForDescriptorat(descriptor, pc);
	((descriptor->generator))();
}


/*	Attempt to follow a branch to a pc. Handle branches to unconditional jumps
	and branches to push: aBoolean; conditional branch pairs. If the branch
	cannot be
	followed answer targetBytecodePC. It is not possible to follow jumps to
	conditional branches because the stack changes depth. That following is
	left to the genJumpIf:to:
	clients. */

	/* StackToRegisterMappingCogit>>#eventualTargetOf: */
static sqInt NoDbgRegParms
eventualTargetOf(sqInt targetBytecodePC)
{
    sqInt cond;
    sqInt currentTarget;
    BytecodeDescriptor *descriptor;
    sqInt nExts;
    sqInt nextPC;
    sqInt span;

	cond = 0;
	nextPC = (currentTarget = targetBytecodePC);
	while(1) {
		nExts = 0;
		while (1) {
			/* begin generatorForPC: */
			descriptor = generatorAt(bytecodeSetOffset + (fetchByteofObject(nextPC, methodObj)));
			if ((descriptor->isReturn)) {
				return currentTarget;
			}
			if (!((descriptor->isExtension))) break;
			nExts += 1;
			nextPC += (descriptor->numBytes);
		}
		if ((isBranch(descriptor))
		 && (!(((descriptor->isBranchTrue))
		 || ((descriptor->isBranchFalse))))) {
			/* begin spanFor:at:exts:in: */
			span = ((descriptor->spanFunction))(descriptor, nextPC, nExts, methodObj);
			if (span < 0) {

				/* Do *not* follow backward branches; these are interrupt points and should not be elided. */
				return currentTarget;
			}
			nextPC = (nextPC + ((descriptor->numBytes))) + span;
		}
		else {
			if (((descriptor->generator)) == genPushConstantTrueBytecode) {
				cond = 1;
			}
			else {
				if (((descriptor->generator)) == genPushConstantFalseBytecode) {
					cond = 0;
				}
				else {
					return currentTarget;
				}
			}
			if (((fixupAt(nextPC))->isTargetOfBackwardBranch)) {
				return currentTarget;
			}
			nextPC = eventualTargetOf(nextPC + ((descriptor->numBytes)));
			nExts = 0;
			while (1) {
				/* begin generatorForPC: */
				descriptor = generatorAt(bytecodeSetOffset + (fetchByteofObject(nextPC, methodObj)));
				if ((descriptor->isReturn)) {
					return currentTarget;
				}
				if (!((descriptor->isExtension))) break;
				nExts += 1;
				nextPC += (descriptor->numBytes);
			}
			if (!(isBranch(descriptor))) {
				return currentTarget;
			}
			if ((isBranch(descriptor))
			 && (!(((descriptor->isBranchTrue))
			 || ((descriptor->isBranchFalse))))) {
				return currentTarget;
			}
			nextPC = (cond == ((descriptor->isBranchTrue))
				? (nextPC + ((descriptor->numBytes))) + (((descriptor->spanFunction))(descriptor, nextPC, nExts, methodObj))
				: nextPC + ((descriptor->numBytes)));
		}
		currentTarget = nextPC;
	}
	return 0;
}


/*	Spill the closest register on stack not conflicting with regMask. 
	Assertion Failure if regMask has already all the registers */

	/* StackToRegisterMappingCogit>>#freeAnyRegNotConflictingWith: */
static sqInt NoDbgRegParms
freeAnyRegNotConflictingWith(sqInt regMask)
{
    CogSimStackEntry *desc;
    sqInt index;
    sqInt reg;

	assert(needsFrame);
	reg = NoReg;
	index = ((simSpillBase < 0) ? 0 : simSpillBase);
	while ((reg == NoReg)
	 && (index < simStackPtr)) {
		desc = simStackAt(index);
		if (((desc->type)) == SSRegister) {
			if (!(regMask & (1U << ((desc->registerr))))) {
				reg = (desc->registerr);
			}
		}
		index += 1;
	}
	assert(!((reg == NoReg)));
	/* begin ssAllocateRequiredReg: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(1U << reg, simStackPtr, simNativeStackPtr);
	return reg;
}


/*	Return from block, assuming result already loaded into ReceiverResultReg. */
/*	Return from block, assuming result already loaded into ReceiverResultReg. */

	/* StackToRegisterMappingCogit>>#genBlockReturn */
static sqInt
genBlockReturn(void)
{
	if (needsFrame) {
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, FPReg, SPReg);
		/* begin PopR: */
		genoperand(PopR, FPReg);
			}
	/* begin RetN: */
	genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);

	/* can't fall through */
	deadCode = 1;
	return 0;
}


/*	Generate special versions of the ceCallCogCodePopReceiverAndClassRegs
	enilopmart that also pop register args from the stack to undo the pushing
	of register args in the abort/miss trampolines. */

	/* StackToRegisterMappingCogit>>#genCallPICEnilopmartNumArgs: */
static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void)

{
    sqInt endAddress;
    sqInt enilopmart;
    sqInt reg;
    sqInt size;

	zeroOpcodeIndex();
	genLoadStackPointers(backEnd);
	/* begin PopR: */
	genoperand(PopR, ClassReg);
	/* begin PopR: */
	genoperand(PopR, TempReg);
	/* begin PopR: */
	reg = SendNumArgsReg;
	genoperand(PopR, reg);
	if (numArgs > 0) {
		if (numArgs > 1) {
			/* begin PopR: */
			genoperand(PopR, Arg1Reg);
			assert((numRegArgs()) == 2);
		}
		/* begin PopR: */
		genoperand(PopR, Arg0Reg);
	}
	/* begin PopR: */
	genoperand(PopR, ReceiverResultReg);
	/* begin PushR: */
	genoperand(PushR, SendNumArgsReg);
	/* begin JumpR: */
	genoperand(JumpR, TempReg);
	computeMaximumSizes();
	size = generateInstructionsAt(methodZoneBase);
	endAddress = outputInstructionsAt(methodZoneBase);
	assert((methodZoneBase + size) == endAddress);
	enilopmart = methodZoneBase;
	methodZoneBase = alignUptoRoutineBoundary(endAddress);
	stopsFromto(backEnd, endAddress, methodZoneBase - 1);
	recordGeneratedRunTimeaddress(trampolineNamenumRegArgs("ceCallPIC", numArgs), enilopmart);
	return ((void (*)(void)) enilopmart);
}


/*	SistaV1: 248		11111000 iiiiiiii		mjjjjjjj		Call Primitive #iiiiiiii +
	(jjjjjjj * 256) m=1 means inlined primitive, no hard return after
	execution. See EncoderForSistaV1's class comment and
	StackInterpreter>>#inlinePrimitiveBytecode: 
 */

	/* StackToRegisterMappingCogit>>#genCallPrimitiveBytecode */
static sqInt
genCallPrimitiveBytecode(void)
{
    sqInt prim;
    sqInt primSet;

	if (byte2 < 128) {
		return (bytecodePC == initialPC
			? 0
			: EncounteredUnknownBytecode);
	}
	prim = (((sqInt)((usqInt)((byte2 - 128)) << 8))) + byte1;
	primSet = (((usqInt) prim) >> 13) & 3;
	prim = prim & 0x1FFF;
	return EncounteredUnknownBytecode;
}


/*	Override to push the register receiver and register arguments, if any. */

	/* StackToRegisterMappingCogit>>#genExternalizePointersForPrimitiveCall */
static sqInt
genExternalizePointersForPrimitiveCall(void)
{
    sqInt address2;
    sqInt address3;
    sqInt address4;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;

	genPushRegisterArgs();
	/* begin MoveR:Aw: */
	address4 = framePointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction4 = genoperandoperand(MoveRAw, FPReg, address4);
	/* begin PopR: */
	genoperand(PopR, TempReg);
	/* begin MoveR:Aw: */
	address2 = instructionPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction2 = genoperandoperand(MoveRAw, TempReg, address2);
	/* begin MoveR:Aw: */
	address3 = stackPointerAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction3 = genoperandoperand(MoveRAw, SPReg, address3);
	return 0;
}


/*	Block compilation. At this point in the method create the block. Note its
	start and defer generating code for it until after the method and any
	other preceding
	blocks. The block's actual code will be compiled later. */
/*	253		11111101 eei i i kkk	jjjjjjjj		Push Closure Num Copied iii (+ Ext A
	// 16 * 8) Num Args kkk (+ Ext A \\ 16 * 8) BlockSize jjjjjjjj (+ Ext B *
	256). ee = num extensions
 */

	/* StackToRegisterMappingCogit>>#genExtPushClosureBytecode */
static sqInt
genExtPushClosureBytecode(void)
{
    sqInt i;
    sqInt numArgs;
    sqInt numCopied;
    sqInt reg;
    sqInt startpc;

	assert(needsFrame);
	startpc = bytecodePC + (((generatorAt(byte0))->numBytes));
	addBlockStartAtnumArgsnumCopiedspan(startpc, (numArgs = (byte1 & 7) + ((extA % 16) * 8)), (numCopied = ((((usqInt) byte1) >> 3) & 7) + ((extA / 16) * 8)), byte2 + (((sqInt)((usqInt)(extB) << 8))));
	extA = (numExtB = (extB = 0));
	/* begin genInlineClosure:numArgs:numCopied: */
	assert(getActiveContextAllocatesInMachineCode());
	voidReceiverResultRegContainsSelf();
	/* begin ssAllocateCallReg:and:and: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(CallerSavedRegisterMask | (((1U << ReceiverResultReg) | (1U << SendNumArgsReg)) | (1U << ClassReg)), simStackPtr, simNativeStackPtr);
	genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(startpc + 1, numArgs, numCopied, methodOrBlockNumArgs, methodNeedsLargeContext(methodObj), inBlock);
	for (i = 1; i <= numCopied; i += 1) {
		reg = ssStorePoptoPreferredReg(1, TempReg);
		genStoreSourceRegslotIndexintoNewObjectInDestReg(reg, (ClosureFirstCopiedValueIndex + numCopied) - i, ReceiverResultReg);
	}
	ssPushRegister(ReceiverResultReg);
	return 0;
}


/*	Full Block creation compilation. The block's actual code will be compiled
	separatedly. 
 */
/*	*	255		11111111	xxxxxxxx	siyyyyyy	push Closure Compiled block literal
	index xxxxxxxx (+ Extend A * 256) numCopied yyyyyy receiverOnStack: s = 1
	ignoreOuterContext: i = 1
 */

	/* StackToRegisterMappingCogit>>#genExtPushFullClosureBytecode */
static sqInt
genExtPushFullClosureBytecode(void)
{
    sqInt compiledBlock;
    sqInt i;
    int ignoreContext;
    sqInt numCopied;
    int receiverIsOnStack;
    sqInt reg;

	assert(needsFrame);
	compiledBlock = getLiteral(byte1 + (((sqInt)((usqInt)(extA) << 8))));
	extA = 0;
	numCopied = byte2 & ((1U << 6) - 1);
	receiverIsOnStack = byte2 & (1U << 7);
	ignoreContext = byte2 & (1U << 6);
	voidReceiverResultRegContainsSelf();
	/* begin ssAllocateCallReg:and:and: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(CallerSavedRegisterMask | (((1U << ReceiverResultReg) | (1U << SendNumArgsReg)) | (1U << ClassReg)), simStackPtr, simNativeStackPtr);
	genCreateFullClosurenumArgsnumCopiedignoreContextcontextNumArgslargeinBlock(compiledBlock, argumentCountOf(compiledBlock), numCopied, ignoreContext, methodOrBlockNumArgs, methodNeedsLargeContext(methodObj), inBlock);
	for (i = 1; i <= numCopied; i += 1) {
		reg = ssStorePoptoPreferredReg(1, TempReg);
		genStoreSourceRegslotIndexintoNewObjectInDestReg(reg, (FullClosureFirstCopiedValueIndex + numCopied) - i, ReceiverResultReg);
	}
	if (receiverIsOnStack) {
		reg = ssStorePoptoPreferredReg(1, TempReg);
	}
	else {
		storeToReg(simSelf(), (reg = TempReg));
	}
	genStoreSourceRegslotIndexintoNewObjectInDestReg(reg, FullClosureReceiverIndex, ReceiverResultReg);
	ssPushRegister(ReceiverResultReg);
	return 0;
}


/*	Enilopmarts transfer control from C into machine code (backwards
	trampolines). 
 */
/*	Enilopmarts transfer control from C into machine code (backwards
	trampolines). Override to add version for generic and PIC-specific entry
	with reg args. */

	/* StackToRegisterMappingCogit>>#generateEnilopmarts */
static void
generateEnilopmarts(void)
{
	
#  if Debug
	/* begin genEnilopmartFor:forCall:called: */
	realCEEnterCogCodePopReceiverReg = genEnilopmartForandandforCallcalled(ReceiverResultReg, NoReg, NoReg, 0, "realCEEnterCogCodePopReceiverReg");
	ceEnterCogCodePopReceiverReg = enterCogCodePopReceiver;
	/* begin genEnilopmartFor:forCall:called: */
	realCECallCogCodePopReceiverReg = genEnilopmartForandandforCallcalled(ReceiverResultReg, NoReg, NoReg, 1, "realCEEnterCogCodePopReceiverReg");
	ceCallCogCodePopReceiverReg = callCogCodePopReceiver;
	/* begin genEnilopmartFor:and:forCall:called: */
	realCECallCogCodePopReceiverAndClassRegs = genEnilopmartForandandforCallcalled(ReceiverResultReg, ClassReg, NoReg, 1, "realCECallCogCodePopReceiverAndClassRegs");
	ceCallCogCodePopReceiverAndClassRegs = callCogCodePopReceiverAndClassRegs;
#  else /* Debug */
	/* begin genEnilopmartFor:forCall:called: */
	ceEnterCogCodePopReceiverReg = genEnilopmartForandandforCallcalled(ReceiverResultReg, NoReg, NoReg, 0, "ceEnterCogCodePopReceiverReg");
	/* begin genEnilopmartFor:forCall:called: */
	ceCallCogCodePopReceiverReg = genEnilopmartForandandforCallcalled(ReceiverResultReg, NoReg, NoReg, 1, "ceCallCogCodePopReceiverReg");
	/* begin genEnilopmartFor:and:forCall:called: */
	ceCallCogCodePopReceiverAndClassRegs = genEnilopmartForandandforCallcalled(ReceiverResultReg, ClassReg, NoReg, 1, "ceCallCogCodePopReceiverAndClassRegs");
#  endif /* Debug */
	genPrimReturnEnterCogCodeEnilopmart(0);
	cePrimReturnEnterCogCode = methodZoneBase;
	outputInstructionsForGeneratedRuntimeAt(cePrimReturnEnterCogCode);
	recordGeneratedRunTimeaddress("cePrimReturnEnterCogCode", cePrimReturnEnterCogCode);
	genPrimReturnEnterCogCodeEnilopmart(1);
	cePrimReturnEnterCogCodeProfiling = methodZoneBase;
	outputInstructionsForGeneratedRuntimeAt(cePrimReturnEnterCogCodeProfiling);
	recordGeneratedRunTimeaddress("cePrimReturnEnterCogCodeProfiling", cePrimReturnEnterCogCodeProfiling);
	
#  if Debug
	/* begin genEnilopmartFor:and:forCall:called: */
	realCECallCogCodePopReceiverArg0Regs = genEnilopmartForandandforCallcalled(ReceiverResultReg, Arg0Reg, NoReg, 1, "realCECallCogCodePopReceiverArg0Regs");
	ceCallCogCodePopReceiverArg0Regs = callCogCodePopReceiverArg0Regs;
	realCECallCogCodePopReceiverArg1Arg0Regs = genEnilopmartForandandforCallcalled(ReceiverResultReg, Arg0Reg, Arg1Reg, 1, "realCECallCogCodePopReceiverArg1Arg0Regs");
	ceCallCogCodePopReceiverArg1Arg0Regs = callCogCodePopReceiverArg1Arg0Regs;
#  else /* Debug */
	/* begin genEnilopmartFor:and:forCall:called: */
	ceCallCogCodePopReceiverArg0Regs = genEnilopmartForandandforCallcalled(ReceiverResultReg, Arg0Reg, NoReg, 1, "ceCallCogCodePopReceiverArg0Regs");
	ceCallCogCodePopReceiverArg1Arg0Regs = genEnilopmartForandandforCallcalled(ReceiverResultReg, Arg0Reg, Arg1Reg, 1, "ceCallCogCodePopReceiverArg1Arg0Regs");
#  endif /* Debug */
	ceCall0ArgsPIC = genCallPICEnilopmartNumArgs(0);
	ceCall1ArgsPIC = genCallPICEnilopmartNumArgs(1);
	ceCall2ArgsPIC = genCallPICEnilopmartNumArgs(2);
	assert((numRegArgs()) == 2);
}


/*	Size pc-dependent instructions and assign eventual addresses to all
	instructions. Answer the size of the code.
	Compute forward branches based on virtual address (abstract code starts at
	0), assuming that any branches branched over are long.
	Compute backward branches based on actual address.
	Reuse the fixups array to record the pc-dependent instructions that need
	to have
	their code generation postponed until after the others.
	
	Override to andd handling for null branches (branches to the immediately
	following instruction) occasioned by StackToRegisterMapping's following of
	jumps.  */

	/* StackToRegisterMappingCogit>>#generateInstructionsAt: */
static sqInt NoDbgRegParms
generateInstructionsAt(sqInt eventualAbsoluteAddress)
{
    sqInt absoluteAddress;
    AbstractInstruction *abstractInstruction;
    BytecodeFixup *fixup;
    sqInt i;
    sqInt j;
    sqInt pcDependentIndex;

	absoluteAddress = eventualAbsoluteAddress;
	pcDependentIndex = 0;
	for (i = 0; i < opcodeIndex; i += 1) {
		maybeBreakGeneratingAt(absoluteAddress);
		abstractInstruction = abstractInstructionAt(i);
		if (isPCDependent(abstractInstruction)) {
			sizePCDependentInstructionAt(abstractInstruction, absoluteAddress);
			if ((isJump(abstractInstruction))
			 && ((((i + 1) < opcodeIndex)
			 && ((((AbstractInstruction *) (((abstractInstruction->operands))[0]))) == (abstractInstructionAt(i + 1))))
			 || (((i + 2) < opcodeIndex)
			 && (((((AbstractInstruction *) (((abstractInstruction->operands))[0]))) == (abstractInstructionAt(i + 2)))
			 && ((((abstractInstructionAt(i + 1))->opcode)) == Nop))))) {
				(abstractInstruction->opcode = Nop);
				concretizeAt(abstractInstruction, absoluteAddress);
			}
			else {
				fixup = fixupAtIndex(pcDependentIndex);
				pcDependentIndex += 1;
				(fixup->instructionIndex = i);
			}
			absoluteAddress += (abstractInstruction->machineCodeSize);
		}
		else {
			absoluteAddress = concretizeAt(abstractInstruction, absoluteAddress);
		}
	}
	for (j = 0; j < pcDependentIndex; j += 1) {
		fixup = fixupAtIndex(j);
		abstractInstruction = abstractInstructionAt((fixup->instructionIndex));
		maybeBreakGeneratingAt((abstractInstruction->address));
		concretizeAt(abstractInstruction, (abstractInstruction->address));
	}
	return absoluteAddress - eventualAbsoluteAddress;
}


/*	Generate the run-time entries for the various method and PIC entry misses
	and aborts.
	Read the class-side method trampolines for documentation on the various
	trampolines 
 */

	/* StackToRegisterMappingCogit>>#generateMissAbortTrampolines */
static void
generateMissAbortTrampolines(void)
{
    sqInt numArgs;
    sqInt numArgsLimiT;

	for (numArgs = 0, numArgsLimiT = (2 /* numRegArgs */ + 1); numArgs <= numArgsLimiT; numArgs += 1) {
		methodAbortTrampolines[numArgs] = (genMethodAbortTrampolineFor(numArgs));
	}
	for (numArgs = 0, numArgsLimiT = (2 /* numRegArgs */ + 1); numArgs <= numArgsLimiT; numArgs += 1) {
		picAbortTrampolines[numArgs] = (genPICAbortTrampolineFor(numArgs));
	}
	for (numArgs = 0, numArgsLimiT = (2 /* numRegArgs */ + 1); numArgs <= numArgsLimiT; numArgs += 1) {
		picMissTrampolines[numArgs] = (genPICMissTrampolineFor(numArgs));
	}
	ceReapAndResetErrorCodeTrampoline = genTrampolineForcalledarg(ceReapAndResetErrorCodeFor, "ceReapAndResetErrorCodeTrampoline", ClassReg);
}


/*	Override to generate code to push the register arg(s) for <= numRegArg
	arity sends.
 */

	/* StackToRegisterMappingCogit>>#generateSendTrampolines */
static void
generateSendTrampolines(void)
{
    sqInt numArgs;

	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, trampolineArgConstant(0), ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
	? (/* begin trampolineArgConstant: */
		assert(numArgs >= 0),
		-2 - numArgs)
	: SendNumArgsReg)));
	}
	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
	? (/* begin trampolineArgConstant: */
		assert(numArgs >= 0),
		-2 - numArgs)
	: SendNumArgsReg)));
		directedSuperBindingSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendaboveClassBindingtonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperBindingSend", numArgs), ClassReg, TempReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
	? (/* begin trampolineArgConstant: */
		assert(numArgs >= 0),
		-2 - numArgs)
	: SendNumArgsReg)));
	}
	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, trampolineArgConstant(1), ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
	? (/* begin trampolineArgConstant: */
		assert(numArgs >= 0),
		-2 - numArgs)
	: SendNumArgsReg)));
	}
	firstSend = ordinarySendTrampolines[0];
	lastSend = superSendTrampolines[NumSendTrampolines - 1];
}


/*	Generate trampolines for tracing. In the simulator we can save a lot of
	time and avoid noise instructions in the lastNInstructions log by
	short-cutting these
	trampolines, but we need them in the real vm. */

	/* StackToRegisterMappingCogit>>#generateTracingTrampolines */
static void
generateTracingTrampolines(void)
{
	ceTraceLinkedSendTrampoline = genTrampolineForcalledargregsToSave(ceTraceLinkedSend, "ceTraceLinkedSendTrampoline", ReceiverResultReg, CallerSavedRegisterMask);
	ceTraceBlockActivationTrampoline = genTrampolineForcalledregsToSave(ceTraceBlockActivation, "ceTraceBlockActivationTrampoline", CallerSavedRegisterMask);
	ceTraceStoreTrampoline = genTrampolineForcalledargargregsToSave(ceTraceStoreOfinto, "ceTraceStoreTrampoline", TempReg, ReceiverResultReg, CallerSavedRegisterMask);
}

	/* StackToRegisterMappingCogit>>#genForwardersInlinedIdenticalOrNotIf: */
static sqInt NoDbgRegParms
genForwardersInlinedIdenticalOrNotIf(sqInt orNot)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    sqInt argReg;
    sqInt argReg1;
    BytecodeDescriptor *branchDescriptor;
    BytecodeDescriptor *branchDescriptor1;
    sqInt constant;
    sqInt constant1;
    BytecodeFixup * fixup;
    sqInt i;
    void *jumpTarget;
    void *jumpTarget1;
    AbstractInstruction *label;
    sqInt literal;
    sqInt nExts;
    sqInt nextPC;
    sqInt nextPC1;
    sqInt postBranchPC;
    sqInt postBranchPC1;
    BytecodeDescriptor *primDescriptor;
    sqInt rcvrReg;
    sqInt rcvrReg1;
    sqInt reg;
    sqInt rNext1;
    sqInt rTop1;
    sqInt targetBytecodePC;
    sqInt targetBytecodePC1;
    sqInt topRegistersMask;
    int unforwardArg;
    int unforwardRcvr;

	/* begin extractMaybeBranchDescriptorInto: */
	primDescriptor = generatorAt(byte0);
	nextPC1 = bytecodePC + ((primDescriptor->numBytes));
	nExts = 0;
	while (1) {
		while (1) {
			/* begin generatorForPC: */
			branchDescriptor1 = generatorAt(bytecodeSetOffset + (fetchByteofObject(nextPC1, methodObj)));
			if (!((branchDescriptor1->isExtension))) break;
			nExts += 1;
			nextPC1 += (branchDescriptor1->numBytes);
		}
		/* begin isUnconditionalBranch */
		if (!((isBranch(branchDescriptor1))
		 && (!(((branchDescriptor1->isBranchTrue))
		 || ((branchDescriptor1->isBranchFalse)))))) break;
		nextPC1 = eventualTargetOf((nextPC1 + ((branchDescriptor1->numBytes))) + (((branchDescriptor1->spanFunction))(branchDescriptor1, nextPC1, nExts, methodObj)));
	}
	targetBytecodePC1 = (postBranchPC1 = 0);
	if (((branchDescriptor1->isBranchTrue))
	 || ((branchDescriptor1->isBranchFalse))) {
		targetBytecodePC1 = eventualTargetOf((nextPC1 + ((branchDescriptor1->numBytes))) + (((branchDescriptor1->spanFunction))(branchDescriptor1, nextPC1, nExts, methodObj)));
		postBranchPC1 = eventualTargetOf(nextPC1 + ((branchDescriptor1->numBytes)));
	}
	else {
		nextPC1 = bytecodePC + ((primDescriptor->numBytes));
	}
	branchDescriptor = branchDescriptor1;
	nextPC = nextPC1;
	postBranchPC = postBranchPC1;
	targetBytecodePC = targetBytecodePC1;
	unforwardRcvr = !(isUnannotatableConstant(ssValue(1)));
	unforwardArg = !(isUnannotatableConstant(ssTop()));
	/* begin allocateEqualsEqualsRegistersArgNeedsReg:rcvrNeedsReg:into: */
	assert(unforwardArg
	 || (unforwardRcvr));
	argReg1 = (rcvrReg1 = NoReg);
	if (unforwardArg) {
		if (unforwardRcvr) {
			/* begin allocateRegForStackTopTwoEntriesInto: */
			topRegistersMask = 0;
			rTop1 = (rNext1 = NoReg);
			if ((registerOrNone(ssTop())) != NoReg) {
				rTop1 = registerOrNone(ssTop());
			}
			if ((registerOrNone(ssValue(1))) != NoReg) {
				/* begin registerMaskFor: */
				reg = (rNext1 = registerOrNone(ssValue(1)));
				topRegistersMask = 1U << reg;
			}
			if (rTop1 == NoReg) {
				rTop1 = allocateRegNotConflictingWith(topRegistersMask);
			}
			if (rNext1 == NoReg) {
				rNext1 = allocateRegNotConflictingWith(1U << rTop1);
			}
			assert(!(((rTop1 == NoReg)
 || (rNext1 == NoReg))));
			argReg1 = rTop1;
			rcvrReg1 = rNext1;
			popToReg(ssTop(), argReg1);
			popToReg(ssValue(1), rcvrReg1);
		}
		else {
			argReg1 = allocateRegForStackEntryAtnotConflictingWith(0, 0);
			popToReg(ssTop(), argReg1);
			if (((ssValue(1))->spilled)) {
				/* begin checkQuickConstant:forInstruction: */
				literal = BytesPerWord;
				anInstruction2 = genoperandoperand(AddCqR, BytesPerWord, SPReg);
			}
		}
	}
	else {
		assert(unforwardRcvr);
		assert(!((((ssTop())->spilled))));
		rcvrReg1 = allocateRegForStackEntryAtnotConflictingWith(1, 0);
		popToReg(ssValue(1), rcvrReg1);
	}
	assert(!((unforwardArg
 && (argReg1 == NoReg))));
	assert(!((unforwardRcvr
 && (rcvrReg1 == NoReg))));
	rcvrReg = rcvrReg1;
	argReg = argReg1;
	if (!(((branchDescriptor->isBranchTrue))
		 || ((branchDescriptor->isBranchFalse)))) {
		return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot);
	}
	/* begin ssFlushTo: */
	assert(tempsValidAndVolatileEntriesSpilled());
	if (simSpillBase <= (simStackPtr - 2)) {
		for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < (simStackPtr - 2)) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : (simStackPtr - 2))); i <= (simStackPtr - 2); i += 1) {
			assert(needsFrame);
			ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
		}
		simSpillBase = (simStackPtr - 2) + 1;
	}
	/* begin Label */
	label = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	/* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */
	assert((argReg != NoReg)
	 || (rcvrReg != NoReg));
	if (!unforwardArg) {
		/* begin genCmpConstant:R: */
		constant = ((ssTop())->constant);
		if (shouldAnnotateObjectReference(constant)) {
			annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(CmpCwR, constant, rcvrReg)), constant);
		}
		else {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction = genoperandoperand(CmpCqR, constant, rcvrReg);
		}
	}
	else {
		if (!unforwardRcvr) {
			/* begin genCmpConstant:R: */
			constant1 = ((ssValue(1))->constant);
			if (shouldAnnotateObjectReference(constant1)) {
				annotateobjRef(checkLiteralforInstruction(constant1, genoperandoperand(CmpCwR, constant1, argReg)), constant1);
			}
			else {
				/* begin checkQuickConstant:forInstruction: */
				anInstruction1 = genoperandoperand(CmpCqR, constant1, argReg);
			}
		}
		else {
			/* begin CmpR:R: */
			genoperandoperand(CmpRR, argReg, rcvrReg);
		}
	}
	ssPop(2);
	if ((((fixupAt(nextPC))->targetInstruction)) == 0) {

		/* The next instruction is dead.  we can skip it. */
		deadCode = 1;
		ensureFixupAt(targetBytecodePC);
		ensureFixupAt(postBranchPC);
	}
	else {
		assert(!(deadCode));
	}
	assert(unforwardArg
	 || (unforwardRcvr));
	if (orNot == ((branchDescriptor->isBranchTrue))) {

		/* a == b ifFalse: ... or a ~~ b ifTrue: ... jump on equal to post-branch pc */
		fixup = ensureNonMergeFixupAt(targetBytecodePC);
		/* begin JumpZero: */
		jumpTarget = ensureNonMergeFixupAt(postBranchPC);
		genConditionalBranchoperand(JumpZero, ((sqInt)jumpTarget));
	}
	else {

		/* orNot is true for ~~ */
		/* a == b ifTrue: ... or a ~~ b ifFalse: ... jump on equal to target pc */
		fixup = ensureNonMergeFixupAt(postBranchPC);
		/* begin JumpZero: */
		jumpTarget1 = ensureNonMergeFixupAt(targetBytecodePC);
		genConditionalBranchoperand(JumpZero, ((sqInt)jumpTarget1));
	}
	if (unforwardArg
	 && (unforwardRcvr)) {
		/* begin genEnsureOopInRegNotForwarded:scratchReg:jumpBackTo: */
		genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder(argReg, TempReg, label, 0);
	}
	genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder((unforwardRcvr
		? rcvrReg
		: argReg), TempReg, label, fixup);
	if (!deadCode) {
		ssPushConstant(trueObject());
	}
	return 0;
}


/*	Generates the machine code for #== in the case where the instruction is
	not followed by a branch
 */

	/* StackToRegisterMappingCogit>>#genIdenticalNoBranchArgIsConstant:rcvrIsConstant:argReg:rcvrReg:orNotIf: */
static sqInt NoDbgRegParms
genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(sqInt argIsConstant, sqInt rcvrIsConstant, sqInt argReg, sqInt rcvrRegOrNone, sqInt orNot)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    sqInt constant;
    sqInt constant1;
    sqInt constant11;
    sqInt constant2;
    sqInt constant3;
    sqInt constant4;
    AbstractInstruction *jumpEqual;
    AbstractInstruction *jumpNotEqual;
    AbstractInstruction *label;
    sqInt resultReg;

	/* begin Label */
	label = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	/* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */
	assert((argReg != NoReg)
	 || (rcvrRegOrNone != NoReg));
	if (argIsConstant) {
		/* begin genCmpConstant:R: */
		constant4 = ((ssTop())->constant);
		if (shouldAnnotateObjectReference(constant4)) {
			annotateobjRef(checkLiteralforInstruction(constant4, genoperandoperand(CmpCwR, constant4, rcvrRegOrNone)), constant4);
		}
		else {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction = genoperandoperand(CmpCqR, constant4, rcvrRegOrNone);
		}
	}
	else {
		if (rcvrIsConstant) {
			/* begin genCmpConstant:R: */
			constant11 = ((ssValue(1))->constant);
			if (shouldAnnotateObjectReference(constant11)) {
				annotateobjRef(checkLiteralforInstruction(constant11, genoperandoperand(CmpCwR, constant11, argReg)), constant11);
			}
			else {
				/* begin checkQuickConstant:forInstruction: */
				anInstruction1 = genoperandoperand(CmpCqR, constant11, argReg);
			}
		}
		else {
			/* begin CmpR:R: */
			genoperandoperand(CmpRR, argReg, rcvrRegOrNone);
		}
	}
	ssPop(2);
	resultReg = (rcvrRegOrNone == NoReg
		? argReg
		: rcvrRegOrNone);
	/* begin JumpZero: */
	jumpEqual = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	if (!argIsConstant) {
		/* begin genEnsureOopInRegNotForwarded:scratchReg:jumpBackTo: */
		genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder(argReg, TempReg, label, 0);
	}
	if (!rcvrIsConstant) {
		/* begin genEnsureOopInRegNotForwarded:scratchReg:jumpBackTo: */
		genEnsureOopInRegNotForwardedscratchRegifForwarderifNotForwarder(rcvrRegOrNone, TempReg, label, 0);
	}
	if (orNot) {
		/* begin genMoveTrueR: */
		constant = trueObject();
		if (shouldAnnotateObjectReference(constant)) {
			annotateobjRef(checkLiteralforInstruction(constant, genoperandoperand(MoveCwR, constant, resultReg)), constant);
		}
		else {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction2 = genoperandoperand(MoveCqR, constant, resultReg);
		}
	}
	else {
		/* begin genMoveFalseR: */
		constant1 = falseObject();
		if (shouldAnnotateObjectReference(constant1)) {
			annotateobjRef(checkLiteralforInstruction(constant1, genoperandoperand(MoveCwR, constant1, resultReg)), constant1);
		}
		else {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction3 = genoperandoperand(MoveCqR, constant1, resultReg);
		}
	}
	/* begin Jump: */
	jumpNotEqual = genoperand(Jump, ((sqInt)0));
	jmpTarget(jumpEqual, (orNot
		? (/* begin genMoveFalseR: */
			(constant2 = falseObject()),
			(shouldAnnotateObjectReference(constant2)
					? annotateobjRef(checkLiteralforInstruction(constant2, genoperandoperand(MoveCwR, constant2, resultReg)), constant2)
					: (/* begin checkQuickConstant:forInstruction: */
						(anInstruction4 = genoperandoperand(MoveCqR, constant2, resultReg)),
						anInstruction4)))
		: (/* begin genMoveTrueR: */
			(constant3 = trueObject()),
			(shouldAnnotateObjectReference(constant3)
					? annotateobjRef(checkLiteralforInstruction(constant3, genoperandoperand(MoveCwR, constant3, resultReg)), constant3)
					: (/* begin checkQuickConstant:forInstruction: */
						(anInstruction5 = genoperandoperand(MoveCqR, constant3, resultReg)),
						anInstruction5)))));
	jmpTarget(jumpNotEqual, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	ssPushRegister(resultReg);
	return 0;
}


/*	Decompose code generation for #== into a common constant-folding version,
	followed by a double dispatch throguh the objectRepresentation to a
	version that doesn't deal with forwarders and a version that does. */

	/* StackToRegisterMappingCogit>>#genInlinedIdenticalOrNotIf: */
static sqInt NoDbgRegParms
genInlinedIdenticalOrNotIf(sqInt orNot)
{
    BytecodeDescriptor *primDescriptor;
    sqInt result;

	primDescriptor = generatorAt(byte0);
	if ((isUnannotatableConstant(ssTop()))
	 && (isUnannotatableConstant(ssValue(1)))) {
		assert(!((primDescriptor->isMapped)));
		result = ((orNot
			? (((ssTop())->constant)) != (((ssValue(1))->constant))
			: (((ssTop())->constant)) == (((ssValue(1))->constant)))
			? trueObject()
			: falseObject());
		ssPop(2);
		return ssPushConstant(result);
	}
	/* begin genInlinedIdenticalOrNotIfGuts: */
	return genForwardersInlinedIdenticalOrNotIf(orNot);
}

	/* StackToRegisterMappingCogit>>#genJumpBackTo: */
static sqInt NoDbgRegParms
genJumpBackTo(sqInt targetBytecodePC)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    sqInt address;
    AbstractInstruction *anInstruction;
    sqInt i;
    void *jumpTarget;
    void *jumpTarget1;

	/* begin ssFlushTo: */
	assert(tempsValidAndVolatileEntriesSpilled());
	if (simSpillBase <= simStackPtr) {
		for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i <= simStackPtr; i += 1) {
			assert(needsFrame);
			ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
		}
		simSpillBase = simStackPtr + 1;
	}

	/* can't fall through */
	deadCode = 1;
	/* begin MoveAw:R: */
	address = stackLimitAddress();
	/* begin checkLiteral:forInstruction: */
	anInstruction = genoperandoperand(MoveAwR, address, TempReg);
	/* begin CmpR:R: */
	genoperandoperand(CmpRR, TempReg, SPReg);
	/* begin JumpAboveOrEqual: */
	jumpTarget = fixupAtIndex(targetBytecodePC - initialPC);
	genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)jumpTarget));
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceCheckForInterruptTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
	/* begin annotateBytecode: */
	abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	(abstractInstruction1->annotation = HasBytecodePC);
	/* begin Jump: */
	jumpTarget1 = fixupAtIndex(targetBytecodePC - initialPC);
	genoperand(Jump, ((sqInt)jumpTarget1));
	return 0;
}

	/* StackToRegisterMappingCogit>>#genJumpIf:to: */
static sqInt NoDbgRegParms
genJumpIfto(sqInt boolean, sqInt targetBytecodePC)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    CogSimStackEntry *desc;
    sqInt eventualTarget;
    BytecodeFixup *fixup;
    sqInt i;
    void *jumpTarget;
    AbstractInstruction *ok;
    sqInt quickConstant;

	eventualTarget = eventualTargetOf(targetBytecodePC);
	/* begin ssFlushTo: */
	assert(tempsValidAndVolatileEntriesSpilled());
	if (simSpillBase <= (simStackPtr - 1)) {
		for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < (simStackPtr - 1)) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : (simStackPtr - 1))); i < simStackPtr; i += 1) {
			assert(needsFrame);
			ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
		}
		simSpillBase = (simStackPtr - 1) + 1;
	}
	desc = ssTop();
	ssPop(1);
	if ((((desc->type)) == SSConstant)
	 && ((((desc->constant)) == (trueObject()))
	 || (((desc->constant)) == (falseObject())))) {

		/* Must arrange there's a fixup at the target whether it is jumped to or
		   not so that the simStackPtr can be kept correct. */

		/* Must annotate the bytecode for correct pc mapping. */
		fixup = ensureFixupAt(eventualTarget);
		/* begin annotateBytecode: */
		if (((desc->constant)) == boolean) {
			/* begin Jump: */
			abstractInstruction = genoperand(Jump, ((sqInt)fixup));
		}
		else {
			if (prevInstIsPCAnnotated()) {
				/* begin Nop */
				abstractInstruction = gen(Nop);
			}
			else {
				/* begin Label */
				abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
			}
		}
		(abstractInstruction->annotation = HasBytecodePC);
		extA = 0;
		return 0;
	}
	popToReg(desc, TempReg);
	assert((objectAfter(falseObject())) == (trueObject()));
	/* begin genSubConstant:R: */
	if (shouldAnnotateObjectReference(boolean)) {
		annotateobjRef(checkLiteralforInstruction(boolean, genoperandoperand(SubCwR, boolean, TempReg)), TempReg);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(SubCqR, boolean, TempReg);
	}
	/* begin JumpZero: */
	jumpTarget = ensureFixupAt(eventualTarget);
	genConditionalBranchoperand(JumpZero, ((sqInt)jumpTarget));
	if (extA & 1) {
		extA = 0;
		/* begin annotateBytecode: */
		abstractInstruction1 = lastOpcode();
		(abstractInstruction1->annotation = HasBytecodePC);
		return 0;
	}
	extA = 0;
	/* begin CmpCq:R: */
	quickConstant = (boolean == (falseObject())
		? (trueObject()) - (falseObject())
		: (falseObject()) - (trueObject()));
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg);
	/* begin JumpZero: */
	ok = genConditionalBranchoperand(JumpZero, ((sqInt)0));
	genCallMustBeBooleanFor(boolean);
	jmpTarget(ok, annotateBytecode(genoperandoperand(Label, (labelCounter += 1), bytecodePC)));
	return 0;
}

	/* StackToRegisterMappingCogit>>#genJumpTo: */
static sqInt NoDbgRegParms
genJumpTo(sqInt targetBytecodePC)
{
    sqInt eventualTarget;
    BytecodeFixup * fixup;
    BytecodeDescriptor * generator;
    sqInt i;
    sqInt i1;

	eventualTarget = eventualTargetOf(targetBytecodePC);
	if ((eventualTarget > bytecodePC)
	 && (((simStackPtr >= methodOrBlockNumArgs)
	 && (stackEntryIsBoolean(ssTop())))
	 && ((((generator = generatorForPC(eventualTarget))->isBranchTrue))
	 || (((generator = generatorForPC(eventualTarget))->isBranchFalse))))) {
		eventualTarget = (eventualTarget + ((generator->numBytes))) + ((((generator->isBranchTrue)) == ((((ssTop())->constant)) == (trueObject()))
	? (/* begin spanFor:at:exts:in: */
		((generator->spanFunction))(generator, eventualTarget, 0, methodObj))
	: 0));
		ssPop(1);
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= simStackPtr) {
			for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i <= simStackPtr; i += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
			}
			simSpillBase = simStackPtr + 1;
		}
		fixup = ensureFixupAt(eventualTarget);
		ssPop(-1);
	}
	else {
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= simStackPtr) {
			for (i1 = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i1 <= simStackPtr; i1 += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i1), frameOffsetOfTemporary(i1 - 1), FPReg);
			}
			simSpillBase = simStackPtr + 1;
		}
		fixup = ensureFixupAt(eventualTarget);
	}

	/* can't fall through */
	deadCode = 1;
	/* begin Jump: */
	genoperand(Jump, ((sqInt)fixup));
	return 0;
}

	/* StackToRegisterMappingCogit>>#genMarshalledSend:numArgs:sendTable: */
static sqInt NoDbgRegParms
genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt annotation;

	assert(needsFrame);
	/* begin annotationForSendTable: */
	if (sendTable == ordinarySendTrampolines) {
		annotation = IsSendCall;
		goto l2;
	}
	if (sendTable == directedSuperSendTrampolines) {
		annotation = IsDirectedSuperSend;
		goto l2;
	}
	if (sendTable == directedSuperBindingSendTrampolines) {
		annotation = IsDirectedSuperBindingSend;
		goto l2;
	}
	assert(sendTable == superSendTrampolines);
	annotation = IsSuperSend;
	l2:	/* end annotationForSendTable: */;
	if ((annotation == IsSuperSend)
	 || (((annotation >= IsDirectedSuperSend) && (annotation <= IsDirectedSuperBindingSend)))) {
		genEnsureOopInRegNotForwardedscratchReg(ReceiverResultReg, TempReg);
	}
	if (numArgs >= (NumSendTrampolines - 1)) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, numArgs, SendNumArgsReg);
	}
	if (((annotation >= IsDirectedSuperSend) && (annotation <= IsDirectedSuperBindingSend))) {
		/* begin genMoveConstant:R: */
		if (shouldAnnotateObjectReference(tempOop)) {
			annotateobjRef(checkLiteralforInstruction(tempOop, genoperandoperand(MoveCwR, tempOop, TempReg)), tempOop);
		}
		else {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction1 = genoperandoperand(MoveCqR, tempOop, TempReg);
		}
	}
	genLoadInlineCacheWithSelector(selectorIndex);
	((genoperand(Call, sendTable[((numArgs < (NumSendTrampolines - 1)) ? numArgs : (NumSendTrampolines - 1))]))->annotation = annotation);
	/* begin voidReceiverOptStatus */
	((simSelf())->liveRegister = NoReg);
	return ssPushRegister(ReceiverResultReg);
}


/*	Generate the abort for a method. This abort performs either a call of
	ceSICMiss: to handle a single-in-line cache miss or a call of
	ceStackOverflow: to handle a
	stack overflow. It distinguishes the two by testing ResultReceiverReg. If
	the register is zero then this is a stack-overflow because a) the receiver
	has already
	been pushed and so can be set to zero before calling the abort, and b) the
	receiver must always contain an object (and hence be non-zero) on SIC
	miss.  */

	/* StackToRegisterMappingCogit>>#genMethodAbortTrampolineFor: */
static sqInt NoDbgRegParms
genMethodAbortTrampolineFor(sqInt numArgs)
{
    AbstractInstruction *anInstruction1;
    AbstractInstruction *jumpSICMiss;

	zeroOpcodeIndex();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, 0, ReceiverResultReg);
	/* begin JumpNonZero: */
	jumpSICMiss = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	compileTrampolineFornumArgsargargargargregsToSavepushLinkRegresultReg(ceStackOverflow, 1, SendNumArgsReg, null, null, null, 0 /* emptyRegisterMask */, 0, NoReg);
	jmpTarget(jumpSICMiss, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
	return genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumRegArgs("ceMethodAbort", numArgs), 1, ReceiverResultReg, null, null, null, 0 /* emptyRegisterMask */, 0, NoReg, 1);
}


/*	Generate the abort for a PIC. This abort performs either a call of
	ceInterpretMethodFromPIC:receiver: to handle invoking an uncogged
	target or a call of ceMNUFromPICMNUMethod:receiver: to handle an
	MNU dispatch in a closed PIC. It distinguishes the two by testing
	ClassReg. If the register is zero then this is an MNU. */

	/* StackToRegisterMappingCogit>>#genPICAbortTrampolineFor: */
static sqInt NoDbgRegParms
genPICAbortTrampolineFor(sqInt numArgs)
{
	zeroOpcodeIndex();
	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
	return genInnerPICAbortTrampoline(trampolineNamenumRegArgs("cePICAbort", numArgs));
}

	/* StackToRegisterMappingCogit>>#genPICMissTrampolineFor: */
static sqInt NoDbgRegParms
genPICMissTrampolineFor(sqInt numArgs)
{
    sqInt startAddress;

	startAddress = methodZoneBase;
	zeroOpcodeIndex();
	genPushRegisterArgsForNumArgsscratchReg(backEnd, numArgs, SendNumArgsReg);
	genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumRegArgs("cePICMiss", numArgs), 2, ClassReg, ReceiverResultReg, null, null, 0 /* emptyRegisterMask */, 1, NoReg, 1);
	return startAddress;
}

	/* StackToRegisterMappingCogit>>#genPopStackBytecode */
static sqInt
genPopStackBytecode(void)
{
    AbstractInstruction *anInstruction;
    sqInt literal;

	if (((ssTop())->spilled)) {
		/* begin checkQuickConstant:forInstruction: */
		literal = BytesPerWord;
		anInstruction = genoperandoperand(AddCqR, BytesPerWord, SPReg);
	}
	ssPop(1);
	return 0;
}


/*	Check the argument count. Fail if wrong.
	Get the method from the outerContext and see if it is cogged. If so, jump
	to the
	block entry or the no-context-switch entry, as appropriate, and we're
	done. If not,
	invoke the interpreter primitive. */
/*	Check the argument count. Fail if wrong.
	Get the method from the outerContext and see if it is cogged. If so, jump
	to the
	block entry or the no-context-switch entry, as appropriate, and we're
	done. If not,
	invoke the interpreter primitive.
	Override to push the register args first. */

	/* StackToRegisterMappingCogit>>#genPrimitiveClosureValue */
static sqInt
genPrimitiveClosureValue(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *jumpBCMethod;
    AbstractInstruction *jumpFail1;
    AbstractInstruction *jumpFail2;
    AbstractInstruction *jumpFail3;
    AbstractInstruction *jumpFail4;
    AbstractInstruction *jumpFailNArgs;
    sqInt literal;
    sqInt offset;
    void (*primitiveRoutine)(void);
    sqInt quickConstant;
    sqInt result;

	genPushRegisterArgs();
	genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = (((usqInt)methodOrBlockNumArgs << 1) | 1);
	anInstruction1 = genoperandoperand(CmpCqR, (((usqInt)methodOrBlockNumArgs << 1) | 1), TempReg);
	/* begin JumpNonZero: */
	jumpFailNArgs = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genLoadSlotsourceRegdestReg(ClosureOuterContextIndex, ReceiverResultReg, ClassReg);
	jumpFail1 = genJumpImmediate(ClassReg);
	genGetCompactClassIndexNonImmOfinto(ClassReg, TempReg);
	genCmpClassMethodContextCompactIndexR(TempReg);
	/* begin JumpNonZero: */
	jumpFail2 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genLoadSlotsourceRegdestReg(MethodIndex, ClassReg, SendNumArgsReg);
	jumpFail3 = genJumpImmediate(SendNumArgsReg);
	genGetFormatOfinto(SendNumArgsReg, TempReg);
	/* begin CmpCq:R: */
	quickConstant = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(CmpCqR, quickConstant, TempReg);
	/* begin JumpLess: */
	jumpFail4 = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	genLoadSlotsourceRegdestReg(HeaderIndex, SendNumArgsReg, ClassReg);
	jumpBCMethod = genJumpImmediate(ClassReg);
	/* begin MoveM16:r:R: */
	offset = offsetof(CogMethod, blockEntryOffset);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction3 = genoperandoperandoperand(MoveM16rR, offset, ClassReg, TempReg);
	/* begin AddR:R: */
	genoperandoperand(AddRR, ClassReg, TempReg);
	primitiveRoutine = functionPointerForCompiledMethodprimitiveIndex(methodObj, primitiveIndex);
	if (primitiveRoutine == primitiveClosureValueNoContextSwitch) {
		if (blockNoContextSwitchOffset == null) {
			return NotFullyInitialized;
		}
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(SubCqR, blockNoContextSwitchOffset, TempReg);
	}
	/* begin JumpR: */
	genoperand(JumpR, TempReg);
	jmpTarget(jumpBCMethod, jmpTarget(jumpFail1, jmpTarget(jumpFail2, jmpTarget(jumpFail3, jmpTarget(jumpFail4, genoperandoperand(Label, (labelCounter += 1), bytecodePC))))));
	if (((result = compileInterpreterPrimitiveflags(primitiveRoutine, primitivePropertyFlags(primitiveIndex)))) < 0) {
		return result;
	}
	jmpTarget(jumpFailNArgs, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return CompletePrimitive;
}


/*	Check the argument count. Fail if wrong.
	Get the method from the outerContext and see if it is cogged. If so, jump
	to the
	block entry or the no-context-switch entry, as appropriate, and we're
	done. If not,
	invoke the interpreter primitive. */
/*	Override to push the register args first. */

	/* StackToRegisterMappingCogit>>#genPrimitiveFullClosureValue */
static sqInt
genPrimitiveFullClosureValue(void)
{
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *jumpBCMethod;
    AbstractInstruction *jumpFail4;
    AbstractInstruction *jumpFailImmediateMethod;
    AbstractInstruction *jumpFailNArgs;
    sqInt literal;
    void (*primitiveRoutine)(void);
    sqInt quickConstant;
    sqInt quickConstant1;
    sqInt result;

	genPushRegisterArgs();
	genLoadSlotsourceRegdestReg(ClosureNumArgsIndex, ReceiverResultReg, TempReg);
	/* begin checkQuickConstant:forInstruction: */
	literal = (((usqInt)methodOrBlockNumArgs << 1) | 1);
	anInstruction = genoperandoperand(CmpCqR, (((usqInt)methodOrBlockNumArgs << 1) | 1), TempReg);
	/* begin JumpNonZero: */
	jumpFailNArgs = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
	genLoadSlotsourceRegdestReg(FullClosureCompiledBlockIndex, ReceiverResultReg, SendNumArgsReg);
	jumpFailImmediateMethod = genJumpImmediate(SendNumArgsReg);
	genGetFormatOfinto(SendNumArgsReg, TempReg);
	/* begin CmpCq:R: */
	quickConstant = firstCompiledMethodFormat();
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(CmpCqR, quickConstant, TempReg);
	/* begin JumpLess: */
	jumpFail4 = genConditionalBranchoperand(JumpLess, ((sqInt)0));
	genLoadSlotsourceRegdestReg(HeaderIndex, SendNumArgsReg, ClassReg);
	jumpBCMethod = genJumpImmediate(ClassReg);
	primitiveRoutine = functionPointerForCompiledMethodprimitiveIndex(methodObj, primitiveIndex);
	/* begin AddCq:R: */
	quickConstant1 = (primitiveRoutine == primitiveFullClosureValueNoContextSwitch
		? fullBlockNoContextSwitchEntryOffset()
		: fullBlockEntryOffset());
	/* begin checkQuickConstant:forInstruction: */
	anInstruction2 = genoperandoperand(AddCqR, quickConstant1, ClassReg);
	/* begin JumpR: */
	genoperand(JumpR, ClassReg);
	jmpTarget(jumpBCMethod, jmpTarget(jumpFailImmediateMethod, jmpTarget(jumpFail4, genoperandoperand(Label, (labelCounter += 1), bytecodePC))));
	if (((result = compileInterpreterPrimitiveflags(primitiveRoutine, primitivePropertyFlags(primitiveIndex)))) < 0) {
		return result;
	}
	jmpTarget(jumpFailNArgs, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return CompletePrimitive;
}


/*	Generate an in-line perform primitive. The lookup code requires the
	selector to be in Arg0Reg.
	adjustArgumentsForPerform: adjusts the arguments once
	genLookupForPerformNumArgs: has generated the code for the lookup. */

	/* StackToRegisterMappingCogit>>#genPrimitivePerform */
static sqInt
genPrimitivePerform(void)
{
    AbstractInstruction *anInstruction;
    sqInt offset;

	if (methodOrBlockNumArgs > 2 /* numRegArgs */) {
		/* begin MoveMw:r:R: */
		offset = (methodOrBlockNumArgs) * BytesPerWord;
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperandoperand(MoveMwrR, offset, SPReg, Arg0Reg);
	}
	return genLookupForPerformNumArgs(methodOrBlockNumArgs);
}

	/* StackToRegisterMappingCogit>>#genPushActiveContextBytecode */
static sqInt
genPushActiveContextBytecode(void)
{
	assert(needsFrame);
	voidReceiverResultRegContainsSelf();
	/* begin ssAllocateCallReg:and:and: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(CallerSavedRegisterMask | (((1U << ReceiverResultReg) | (1U << SendNumArgsReg)) | (1U << ClassReg)), simStackPtr, simNativeStackPtr);
	genGetActiveContextNumArgslargeinBlock(methodOrBlockNumArgs, methodNeedsLargeContext(methodObj), inBlock);
	return ssPushRegister(ReceiverResultReg);
}


/*	Block compilation. At this point in the method create the block. Note its
	start and defer generating code for it until after the method and any
	other preceding
	blocks. The block's actual code will be compiled later. */
/*	143 10001111 llllkkkk jjjjjjjj iiiiiiii	Push Closure Num Copied llll Num
	Args kkkk BlockSize jjjjjjjjiiiiiiii */

	/* StackToRegisterMappingCogit>>#genPushClosureCopyCopiedValuesBytecode */
static sqInt
genPushClosureCopyCopiedValuesBytecode(void)
{
    sqInt i;
    sqInt numArgs;
    sqInt numCopied;
    sqInt reg;
    sqInt startpc;

	assert(needsFrame);
	startpc = bytecodePC + (((generatorAt(byte0))->numBytes));
	addBlockStartAtnumArgsnumCopiedspan(startpc, (numArgs = byte1 & 15), (numCopied = ((usqInt) byte1) >> 4), (((sqInt)((usqInt)(byte2) << 8))) + byte3);
	/* begin genInlineClosure:numArgs:numCopied: */
	assert(getActiveContextAllocatesInMachineCode());
	voidReceiverResultRegContainsSelf();
	/* begin ssAllocateCallReg:and:and: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(CallerSavedRegisterMask | (((1U << ReceiverResultReg) | (1U << SendNumArgsReg)) | (1U << ClassReg)), simStackPtr, simNativeStackPtr);
	genNoPopCreateClosureAtnumArgsnumCopiedcontextNumArgslargeinBlock(startpc + 1, numArgs, numCopied, methodOrBlockNumArgs, methodNeedsLargeContext(methodObj), inBlock);
	for (i = 1; i <= numCopied; i += 1) {
		reg = ssStorePoptoPreferredReg(1, TempReg);
		genStoreSourceRegslotIndexintoNewObjectInDestReg(reg, (ClosureFirstCopiedValueIndex + numCopied) - i, ReceiverResultReg);
	}
	ssPushRegister(ReceiverResultReg);
	return 0;
}


/*	<SmallInteger> */
/*	Override to avoid the BytecodeSetHasDirectedSuperSend check, which is
	unnecessary here given the simulation stack. */

	/* StackToRegisterMappingCogit>>#genPushLiteralIndex: */
static sqInt NoDbgRegParms
genPushLiteralIndex(sqInt literalIndex)
{
    sqInt literal;

	literal = getLiteral(literalIndex);
	return genPushLiteral(literal);
}

	/* StackToRegisterMappingCogit>>#genPushLiteralVariable: */
static sqInt NoDbgRegParms
genPushLiteralVariable(sqInt literalIndex)
{
    AbstractInstruction *anInstruction;
    sqInt association;
    sqInt bcpc;
    BytecodeDescriptor *descriptor1;
    sqInt eA;
    sqInt eB;
    sqInt freeReg;
    sqInt savedB0;
    sqInt savedB1;
    sqInt savedB2;
    sqInt savedB3;
    sqInt savedEA;
    sqInt savedEB;
    sqInt savedNEB;


	/* If followed by a directed super send bytecode, avoid generating any code yet.
	   The association will be passed to the directed send trampoline in a register
	   and fully dereferenced only when first linked.  It will be ignored in later sends. */
	association = getLiteral(literalIndex);
	assert(!(directedSendUsesBinding));
	/* begin nextDescriptorExtensionsAndNextPCInto: */
	descriptor1 = generatorAt(byte0);
	savedB0 = byte0;
	savedB1 = byte1;
	savedB2 = byte2;
	savedB3 = byte3;
	savedEA = extA;
	savedEB = extB;
	savedNEB = numExtB;
	bcpc = bytecodePC + ((descriptor1->numBytes));
	do {
		if (bcpc > endPC) {
			goto l1;
		}
		byte0 = (fetchByteofObject(bcpc, methodObj)) + bytecodeSetOffset;
		descriptor1 = generatorAt(byte0);
		loadSubsequentBytesForDescriptorat(descriptor1, bcpc);
		if (!((descriptor1->isExtension))) {
			eA = extA;
			eB = extB;
			extA = savedEA;
			extB = savedEB;
			numExtB = savedNEB;
			byte0 = savedB0;
			byte1 = savedB1;
			byte2 = savedB2;
			byte3 = savedB3;
			if ((descriptor1 != null)
			 && ((((descriptor1->generator)) == genExtSendSuperBytecode)
			 && (eB >= 64))) {
				ssPushConstant(association);
				directedSendUsesBinding = 1;
				return 0;
			}
			goto l1;
		}
		((descriptor1->generator))();
		bcpc += (descriptor1->numBytes);
	} while(1);
	l1:	/* end nextDescriptorExtensionsAndNextPCInto: */;

	/* N.B. Do _not_ use ReceiverResultReg to avoid overwriting receiver in assignment in frameless methods. */
	/* So far descriptors are not rich enough to describe the entire dereference so generate the register
	   load but don't push the result.  There is an order-of-evaluation issue if we defer the dereference. */
	freeReg = allocateRegNotConflictingWith(0);
	/* begin genMoveConstant:R: */
	if (shouldAnnotateObjectReference(association)) {
		annotateobjRef(checkLiteralforInstruction(association, genoperandoperand(MoveCwR, association, TempReg)), association);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, association, TempReg);
	}
	genEnsureObjInRegNotForwardedscratchReg(TempReg, freeReg);
	genLoadSlotsourceRegdestReg(ValueIndex, TempReg, freeReg);
	ssPushRegister(freeReg);
	return 0;
}

	/* StackToRegisterMappingCogit>>#genPushLiteral: */
static sqInt NoDbgRegParms
genPushLiteral(sqInt literal)
{
	return ssPushConstant(literal);
}

	/* StackToRegisterMappingCogit>>#genPushMaybeContextReceiverVariable: */
static sqInt NoDbgRegParms
genPushMaybeContextReceiverVariable(sqInt slotIndex)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *jmpDone;
    AbstractInstruction *jmpSingle;

	/* begin ssAllocateCallReg:and: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(CallerSavedRegisterMask | ((1U << ReceiverResultReg) | (1U << SendNumArgsReg)), simStackPtr, simNativeStackPtr);
	ensureReceiverResultRegContainsSelf();
	/* begin genPushMaybeContextSlotIndex: */
	assert(needsFrame);
	if (CallerSavedRegisterMask & (1U << ReceiverResultReg)) {

		/* We have no way of reloading ReceiverResultReg since we need the inst var value as the result. */
		voidReceiverResultRegContainsSelf();
	}
	if (slotIndex == InstructionPointerIndex) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg);
		/* begin CallRT: */
		abstractInstruction = genoperand(Call, ceFetchContextInstVarTrampoline);
		(abstractInstruction->annotation = IsRelativeCall);
		return ssPushRegister(SendNumArgsReg);
	}
	genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg);
	jmpSingle = genJumpNotSmallIntegerInScratchReg(TempReg);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg);
	/* begin CallRT: */
	abstractInstruction1 = genoperand(Call, ceFetchContextInstVarTrampoline);
	(abstractInstruction1->annotation = IsRelativeCall);
	/* begin Jump: */
	jmpDone = genoperand(Jump, ((sqInt)0));
	jmpTarget(jmpSingle, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	genLoadSlotsourceRegdestReg(slotIndex, ReceiverResultReg, SendNumArgsReg);
	jmpTarget(jmpDone, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return ssPushRegister(SendNumArgsReg);
}

	/* StackToRegisterMappingCogit>>#genPushNewArrayBytecode */
static sqInt
genPushNewArrayBytecode(void)
{
    sqInt i;
    sqInt i1;
    int popValues;
    sqInt size;

	assert(needsFrame);
	voidReceiverResultRegContainsSelf();
	if ((popValues = byte1 > 0x7F)) {
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= simStackPtr) {
			for (i1 = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i1 <= simStackPtr; i1 += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i1), frameOffsetOfTemporary(i1 - 1), FPReg);
			}
			simSpillBase = simStackPtr + 1;
		}
	}
	else {
		/* begin ssAllocateCallReg:and: */
		ssAllocateRequiredRegMaskupThroughupThroughNative(CallerSavedRegisterMask | ((1U << SendNumArgsReg) | (1U << ReceiverResultReg)), simStackPtr, simNativeStackPtr);
	}
	size = byte1 & 0x7F;
	if (!popValues) {
		if (tryCollapseTempVectorInitializationOfSize(size)) {
			return 0;
		}
	}
	genNewArrayOfSizeinitialized(size, !popValues);
	if (popValues) {
		for (i = (size - 1); i >= 0; i += -1) {
			/* begin PopR: */
			genoperand(PopR, TempReg);
			genStoreSourceRegslotIndexintoNewObjectInDestReg(TempReg, i, ReceiverResultReg);
		}
		ssPop(size);
	}
	return ssPushRegister(ReceiverResultReg);
}

	/* StackToRegisterMappingCogit>>#genPushReceiverBytecode */
static sqInt
genPushReceiverBytecode(void)
{
	if ((((simSelf())->liveRegister)) == ReceiverResultReg) {
		return ssPushRegister(ReceiverResultReg);
	}
	return ssPushDesc(ssSelfDescriptor());
}

	/* StackToRegisterMappingCogit>>#genPushReceiverVariable: */
static sqInt NoDbgRegParms
genPushReceiverVariable(sqInt index)
{
	ensureReceiverResultRegContainsSelf();
	return ssPushBaseoffset(ReceiverResultReg, slotOffsetOfInstVarIndex(index));
}


/*	Ensure that the register args are pushed before the retpc for methods with
	arity <= self numRegArgs.
 */
/*	This won't be as clumsy on a RISC. But putting the receiver and
	args above the return address means the CoInterpreter has a
	single machine-code frame format which saves us a lot of work. */

	/* StackToRegisterMappingCogit>>#genPushRegisterArgs */
static void
genPushRegisterArgs(void)
{
	if (!(regArgsHaveBeenPushed
		 || (methodOrBlockNumArgs > 2 /* numRegArgs */))) {
		genPushRegisterArgsForNumArgsscratchReg(backEnd, methodOrBlockNumArgs, SendNumArgsReg);
		regArgsHaveBeenPushed = 1;
	}
}

	/* StackToRegisterMappingCogit>>#genPushRemoteTempLongBytecode */
static sqInt
genPushRemoteTempLongBytecode(void)
{
    AbstractInstruction *anInstruction;
    sqInt offset;
    sqInt regMask;
    sqInt remoteTempReg;
    sqInt tempVectReg;

	tempVectReg = allocateRegNotConflictingWith(0);
	/* begin MoveMw:r:R: */
	offset = frameOffsetOfTemporary(byte2);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, offset, FPReg, tempVectReg);
	/* begin availableRegOrNoneNotConflictingWith: */
	regMask = 1U << tempVectReg;
	remoteTempReg = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | regMask);
	if (remoteTempReg == NoReg) {
		remoteTempReg = tempVectReg;
	}
	genLoadSlotsourceRegdestReg(byte1, tempVectReg, remoteTempReg);
	return ssPushRegister(remoteTempReg);
}


/*	If a frameless method (not a block), only argument temps can be accessed.
	This is assured by the use of needsFrameIfMod16GENumArgs: in pushTemp. */

	/* StackToRegisterMappingCogit>>#genPushTemporaryVariable: */
static sqInt NoDbgRegParms
genPushTemporaryVariable(sqInt index)
{
	assert((inBlock > 0)
	 || (needsFrame
	 || (index < methodOrBlockNumArgs)));
	return ssPushDesc(simStack[index + 1]);
}


/*	In a frameless method ReceiverResultReg already contains self.
	In a frameful method, ReceiverResultReg /may/ contain self. */

	/* StackToRegisterMappingCogit>>#genReturnReceiver */
static sqInt
genReturnReceiver(void)
{
	if (needsFrame) {
		if (!((((simSelf())->liveRegister)) == ReceiverResultReg)) {
			/* begin putSelfInReceiverResultReg */
			storeToReg(simSelf(), ReceiverResultReg);
		}
	}
	return genUpArrowReturn();
}

	/* StackToRegisterMappingCogit>>#genReturnTopFromBlock */
static sqInt
genReturnTopFromBlock(void)
{
	assert(inBlock > 0);
	popToReg(ssTop(), ReceiverResultReg);
	ssPop(1);
	return genBlockReturn();
}

	/* StackToRegisterMappingCogit>>#genReturnTopFromMethod */
static sqInt
genReturnTopFromMethod(void)
{
	popToReg(ssTop(), ReceiverResultReg);
	ssPop(1);
	return genUpArrowReturn();
}

	/* StackToRegisterMappingCogit>>#genSendDirectedSuper:numArgs: */
static sqInt NoDbgRegParms
genSendDirectedSupernumArgs(sqInt selectorIndex, sqInt numArgs)
{
    sqInt result;

	assert((((ssTop())->type)) == SSConstant);
	tempOop = ((ssTop())->constant);
	ssPop(1);
	marshallSendArguments(numArgs);
	result = genMarshalledSendnumArgssendTable(selectorIndex, numArgs, (directedSendUsesBinding
		? directedSuperBindingSendTrampolines
		: directedSuperSendTrampolines));
	directedSendUsesBinding = 0;
	return result;
}

	/* StackToRegisterMappingCogit>>#genSendSuper:numArgs: */
static sqInt NoDbgRegParms
genSendSupernumArgs(sqInt selectorIndex, sqInt numArgs)
{
	marshallSendArguments(numArgs);
	return genMarshalledSendnumArgssendTable(selectorIndex, numArgs, superSendTrampolines);
}


/*	Generate a trampoline with four arguments.
	Hack: a negative value indicates an abstract register, a non-negative
	value indicates a constant. */

	/* StackToRegisterMappingCogit>>#genSendTrampolineFor:numArgs:called:arg:arg:arg:arg: */
static sqInt NoDbgRegParms
genSendTrampolineFornumArgscalledargargargarg(void *aRoutine, sqInt numArgs, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3)
{
    sqInt routine;
    sqInt startAddress;

	startAddress = methodZoneBase;
	zeroOpcodeIndex();
	genPushRegisterArgsForNumArgsscratchReg(backEnd, numArgs, SendNumArgsReg);
	/* begin selectorIndexDereferenceRoutine */
	routine = null;
	if (!(routine == null)) {
		/* begin Call: */
		genoperand(Call, routine);
	}
	genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(aRoutine, aString, 4, regOrConst0, regOrConst1, regOrConst2, regOrConst3, 0 /* emptyRegisterMask */, 1, NoReg, 1);
	return startAddress;
}

	/* StackToRegisterMappingCogit>>#genSend:numArgs: */
static sqInt NoDbgRegParms
genSendnumArgs(sqInt selectorIndex, sqInt numArgs)
{
	marshallSendArguments(numArgs);
	return genMarshalledSendnumArgssendTable(selectorIndex, numArgs, ordinarySendTrampolines);
}

	/* StackToRegisterMappingCogit>>#genSpecialSelectorArithmetic */
static sqInt
genSpecialSelectorArithmetic(void)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    AbstractInstruction *anInstruction2;
    AbstractInstruction *anInstruction3;
    AbstractInstruction *anInstruction4;
    AbstractInstruction *anInstruction5;
    AbstractInstruction *anInstruction6;
    AbstractInstruction *anInstruction7;
    sqInt argInt;
    int argIsConst;
    sqInt argIsInt;
    sqInt i;
    sqInt index;
    AbstractInstruction *jumpContinue;
    AbstractInstruction *jumpNotSmallInts;
    sqInt literal;
    sqInt literal1;
    sqInt literal2;
    sqInt literal3;
    BytecodeDescriptor *primDescriptor;
    sqInt rcvrInt;
    int rcvrIsConst;
    sqInt rcvrIsInt;
    sqInt result;

	primDescriptor = generatorAt(byte0);
	argIsInt = ((argIsConst = (((ssTop())->type)) == SSConstant))
	 && ((((argInt = ((ssTop())->constant))) & 1));
	rcvrIsInt = (((rcvrIsConst = (((ssValue(1))->type)) == SSConstant))
	 && ((((rcvrInt = ((ssValue(1))->constant))) & 1)))
	 || ((mclassIsSmallInteger())
	 && (isSameEntryAs(ssValue(1), simSelf())));
	if (argIsInt
	 && (rcvrIsInt
	 && (rcvrIsConst))) {
		rcvrInt = (rcvrInt >> 1);
		argInt = (argInt >> 1);
		
		switch ((primDescriptor->opcode)) {
		case AddRR:
			result = rcvrInt + argInt;
			break;
		case SubRR:
			result = rcvrInt - argInt;
			break;
		case AndRR:
			result = rcvrInt & argInt;
			break;
		case OrRR:
			result = rcvrInt | argInt;
			break;
		default:
			error("Case not found and no otherwise clause");
		}
		if (isIntegerValue(result)) {

			/* Must annotate the bytecode for correct pc mapping. */
			return (ssPop(2),
				ssPushAnnotatedConstant((((usqInt)result << 1) | 1)));
		}
		return genSpecialSelectorSend();
	}
	if ((rcvrIsConst
	 && (!rcvrIsInt))
	 || (argIsConst
	 && (!argIsInt))) {
		return genSpecialSelectorSend();
	}
	if (!(argIsInt
		 || (rcvrIsInt))) {
		return genSpecialSelectorSend();
	}
	if (argIsInt) {
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= (simStackPtr - 2)) {
			for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < (simStackPtr - 2)) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : (simStackPtr - 2))); i <= (simStackPtr - 2); i += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
			}
			simSpillBase = (simStackPtr - 2) + 1;
		}
		popToReg(ssValue(1), ReceiverResultReg);
		ssPop(2);
	}
	else {
		marshallSendArguments(1);
	}
	jumpNotSmallInts = (!(rcvrIsInt
 && (argIsInt))
		? (argIsInt
				? genJumpNotSmallInteger(ReceiverResultReg)
				: (rcvrIsInt
						? genJumpNotSmallInteger(Arg0Reg)
						: (/* begin genJumpNotSmallIntegersIn:and:scratch: */
							genoperandoperand(MoveRR, ReceiverResultReg, TempReg),
							/* begin AndR:R: */
							genoperandoperand(AndRR, Arg0Reg, TempReg),
							genJumpNotSmallIntegerInScratchReg(TempReg))))
		: 0);
	
	switch ((primDescriptor->opcode)) {
	case AddRR:
		if (argIsInt) {
			/* begin checkQuickConstant:forInstruction: */
			literal = argInt - ConstZero;
			anInstruction = genoperandoperand(AddCqR, argInt - ConstZero, ReceiverResultReg);
			/* begin JumpNoOverflow: */
			jumpContinue = genConditionalBranchoperand(JumpNoOverflow, ((sqInt)0));
			/* begin checkQuickConstant:forInstruction: */
			literal1 = argInt - ConstZero;
			anInstruction1 = genoperandoperand(SubCqR, argInt - ConstZero, ReceiverResultReg);
		}
		else {
			genRemoveSmallIntegerTagsInScratchReg(ReceiverResultReg);
			/* begin AddR:R: */
			genoperandoperand(AddRR, Arg0Reg, ReceiverResultReg);
			/* begin JumpNoOverflow: */
			jumpContinue = genConditionalBranchoperand(JumpNoOverflow, ((sqInt)0));
			if (rcvrIsInt
			 && (rcvrIsConst)) {
				/* begin checkQuickConstant:forInstruction: */
				anInstruction2 = genoperandoperand(MoveCqR, rcvrInt, ReceiverResultReg);
			}
			else {
				/* begin SubR:R: */
				genoperandoperand(SubRR, Arg0Reg, ReceiverResultReg);
				genSetSmallIntegerTagsIn(ReceiverResultReg);
			}
		}
		break;
	case SubRR:
		if (argIsInt) {
			/* begin checkQuickConstant:forInstruction: */
			literal2 = argInt - ConstZero;
			anInstruction3 = genoperandoperand(SubCqR, argInt - ConstZero, ReceiverResultReg);
			/* begin JumpNoOverflow: */
			jumpContinue = genConditionalBranchoperand(JumpNoOverflow, ((sqInt)0));
			/* begin checkQuickConstant:forInstruction: */
			literal3 = argInt - ConstZero;
			anInstruction4 = genoperandoperand(AddCqR, argInt - ConstZero, ReceiverResultReg);
		}
		else {
			genRemoveSmallIntegerTagsInScratchReg(Arg0Reg);
			/* begin SubR:R: */
			genoperandoperand(SubRR, Arg0Reg, ReceiverResultReg);
			/* begin JumpNoOverflow: */
			jumpContinue = genConditionalBranchoperand(JumpNoOverflow, ((sqInt)0));
			/* begin AddR:R: */
			genoperandoperand(AddRR, Arg0Reg, ReceiverResultReg);
			genSetSmallIntegerTagsIn(Arg0Reg);
		}
		break;
	case AndRR:
		if (argIsInt) {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction5 = genoperandoperand(AndCqR, argInt, ReceiverResultReg);
		}
		else {
			/* begin AndR:R: */
			genoperandoperand(AndRR, Arg0Reg, ReceiverResultReg);
		}
		jumpContinue = (!(jumpNotSmallInts == null)
			? (/* begin Jump: */
				genoperand(Jump, ((sqInt)0)))
			: 0);
		break;
	case OrRR:
		if (argIsInt) {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction6 = genoperandoperand(OrCqR, argInt, ReceiverResultReg);
		}
		else {
			/* begin OrR:R: */
			genoperandoperand(OrRR, Arg0Reg, ReceiverResultReg);
		}
		jumpContinue = (!(jumpNotSmallInts == null)
			? (/* begin Jump: */
				genoperand(Jump, ((sqInt)0)))
			: 0);
		break;
	default:
		error("Case not found and no otherwise clause");
	}
	if (jumpNotSmallInts == null) {
		if (!(jumpContinue)) {

			/* overflow cannot happen */
			/* begin annotateInstructionForBytecode */
			if (prevInstIsPCAnnotated()) {
				/* begin Nop */
				abstractInstruction = gen(Nop);
			}
			else {
				/* begin Label */
				abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
			}
			(abstractInstruction->annotation = HasBytecodePC);
			ssPushRegister(ReceiverResultReg);
			return 0;
		}
	}
	else {
		jmpTarget(jumpNotSmallInts, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	}
	if (argIsInt) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction7 = genoperandoperand(MoveCqR, argInt, Arg0Reg);
	}
	index = byte0 - (
#if MULTIPLEBYTECODESETS
	(bytecodeSetOffset == 256
		? AltFirstSpecialSelector + 256
		: FirstSpecialSelector)
#else /* MULTIPLEBYTECODESETS */
	FirstSpecialSelector
#endif /* MULTIPLEBYTECODESETS */
	);
	genMarshalledSendnumArgssendTable((-index) - 1, 1, ordinarySendTrampolines);
	jmpTarget(jumpContinue, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	return 0;
}

	/* StackToRegisterMappingCogit>>#genSpecialSelectorClass */
static sqInt
genSpecialSelectorClass(void)
{
    sqInt requiredReg1;
    sqInt topReg;

	topReg = registerOrNone(ssTop());
	ssPop(1);
	if ((topReg == NoReg)
	 || (topReg == ClassReg)) {
		/* begin ssAllocateRequiredReg:and: */
		requiredReg1 = (topReg = SendNumArgsReg);
		ssAllocateRequiredRegMaskupThroughupThroughNative((1U << requiredReg1) | (1U << ClassReg), simStackPtr, simNativeStackPtr);
	}
	else {
		/* begin ssAllocateRequiredReg: */
		ssAllocateRequiredRegMaskupThroughupThroughNative(1U << ClassReg, simStackPtr, simNativeStackPtr);
	}
	ssPush(1);
	popToReg(ssTop(), topReg);
	genGetClassObjectOfintoscratchReginstRegIsReceiver(topReg, ClassReg, TempReg, 0);
	return (ssPop(1),
		ssPushRegister(ClassReg));
}

	/* StackToRegisterMappingCogit>>#genSpecialSelectorComparison */
static sqInt
genSpecialSelectorComparison(void)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt argInt;
    sqInt argIsIntConst;
    BytecodeDescriptor *branchDescriptor;
    BytecodeDescriptor *branchDescriptor1;
    sqInt i;
    sqInt index;
    sqInt inlineCAB;
    AbstractInstruction *jumpNotSmallInts;
    void *jumpTarget;
    sqInt nExts;
    sqInt nextPC;
    sqInt nextPC1;
    sqInt postBranchPC;
    sqInt postBranchPC1;
    BytecodeDescriptor *primDescriptor;
    BytecodeDescriptor *primDescriptor1;
    int rcvrIsConst;
    sqInt rcvrIsInt;
    sqInt targetBytecodePC;
    sqInt targetPC;

	/* begin ssFlushTo: */
	assert(tempsValidAndVolatileEntriesSpilled());
	if (simSpillBase <= (simStackPtr - 2)) {
		for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < (simStackPtr - 2)) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : (simStackPtr - 2))); i <= (simStackPtr - 2); i += 1) {
			assert(needsFrame);
			ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
		}
		simSpillBase = (simStackPtr - 2) + 1;
	}
	primDescriptor = generatorAt(byte0);
	argIsIntConst = ((((ssTop())->type)) == SSConstant)
	 && ((((argInt = ((ssTop())->constant))) & 1));
	rcvrIsInt = (((rcvrIsConst = (((ssValue(1))->type)) == SSConstant))
	 && (((((ssValue(1))->constant)) & 1)))
	 || ((mclassIsSmallInteger())
	 && (isSameEntryAs(ssValue(1), simSelf())));
	if (argIsIntConst
	 && (rcvrIsInt
	 && (rcvrIsConst))) {
		return genStaticallyResolvedSpecialSelectorComparison();
	}
	/* begin extractMaybeBranchDescriptorInto: */
	primDescriptor1 = generatorAt(byte0);
	nextPC1 = bytecodePC + ((primDescriptor1->numBytes));
	nExts = 0;
	while (1) {
		while (1) {
			/* begin generatorForPC: */
			branchDescriptor1 = generatorAt(bytecodeSetOffset + (fetchByteofObject(nextPC1, methodObj)));
			if (!((branchDescriptor1->isExtension))) break;
			nExts += 1;
			nextPC1 += (branchDescriptor1->numBytes);
		}
		/* begin isUnconditionalBranch */
		if (!((isBranch(branchDescriptor1))
		 && (!(((branchDescriptor1->isBranchTrue))
		 || ((branchDescriptor1->isBranchFalse)))))) break;
		nextPC1 = eventualTargetOf((nextPC1 + ((branchDescriptor1->numBytes))) + (((branchDescriptor1->spanFunction))(branchDescriptor1, nextPC1, nExts, methodObj)));
	}
	targetBytecodePC = (postBranchPC1 = 0);
	if (((branchDescriptor1->isBranchTrue))
	 || ((branchDescriptor1->isBranchFalse))) {
		targetBytecodePC = eventualTargetOf((nextPC1 + ((branchDescriptor1->numBytes))) + (((branchDescriptor1->spanFunction))(branchDescriptor1, nextPC1, nExts, methodObj)));
		postBranchPC1 = eventualTargetOf(nextPC1 + ((branchDescriptor1->numBytes)));
	}
	else {
		nextPC1 = bytecodePC + ((primDescriptor1->numBytes));
	}
	branchDescriptor = branchDescriptor1;
	nextPC = nextPC1;
	postBranchPC = postBranchPC1;
	targetPC = targetBytecodePC;

	/* Further, only interested in inlining = and ~= if there's a SmallInteger constant involved.
	   The relational operators successfully statically predict SmallIntegers; the equality operators do not. */
	inlineCAB = ((branchDescriptor->isBranchTrue))
	 || ((branchDescriptor->isBranchFalse));
	if (inlineCAB
	 && ((((primDescriptor->opcode)) == JumpZero)
	 || (((primDescriptor->opcode)) == JumpNonZero))) {
		inlineCAB = argIsIntConst
		 || (rcvrIsInt);
	}
	if (!inlineCAB) {
		return genSpecialSelectorSend();
	}
	if (argIsIntConst) {
		popToReg(ssValue(1), ReceiverResultReg);
		ssPop(2);
	}
	else {
		marshallSendArguments(1);
	}
	jumpNotSmallInts = (!(rcvrIsInt
 && (argIsIntConst))
		? (argIsIntConst
				? genJumpNotSmallInteger(ReceiverResultReg)
				: (rcvrIsInt
						? genJumpNotSmallInteger(Arg0Reg)
						: (/* begin genJumpNotSmallIntegersIn:and:scratch: */
							genoperandoperand(MoveRR, ReceiverResultReg, TempReg),
							/* begin AndR:R: */
							genoperandoperand(AndRR, Arg0Reg, TempReg),
							genJumpNotSmallIntegerInScratchReg(TempReg))))
		: 0);
	if (argIsIntConst) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(CmpCqR, argInt, ReceiverResultReg);
	}
	else {
		/* begin CmpR:R: */
		genoperandoperand(CmpRR, Arg0Reg, ReceiverResultReg);
	}
	genConditionalBranchoperand(((branchDescriptor->isBranchTrue)
		? (primDescriptor->opcode)
		: inverseBranchFor((primDescriptor->opcode))), ((usqInt)(ensureNonMergeFixupAt(targetPC))));
	/* begin Jump: */
	jumpTarget = ensureNonMergeFixupAt(postBranchPC);
	genoperand(Jump, ((sqInt)jumpTarget));
	if (!(jumpNotSmallInts)) {
		/* begin annotateInstructionForBytecode */
		if (prevInstIsPCAnnotated()) {
			/* begin Nop */
			abstractInstruction = gen(Nop);
		}
		else {
			/* begin Label */
			abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		}
		(abstractInstruction->annotation = HasBytecodePC);
		ensureFixupAt(postBranchPC);
		ensureFixupAt(targetPC);
		deadCode = 1;
		return 0;
	}
	jmpTarget(jumpNotSmallInts, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	if (argIsIntConst) {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction1 = genoperandoperand(MoveCqR, argInt, Arg0Reg);
	}
	index = byte0 - (
#if MULTIPLEBYTECODESETS
	(bytecodeSetOffset == 256
		? AltFirstSpecialSelector + 256
		: FirstSpecialSelector)
#else /* MULTIPLEBYTECODESETS */
	FirstSpecialSelector
#endif /* MULTIPLEBYTECODESETS */
	);
	return genMarshalledSendnumArgssendTable((-index) - 1, 1, ordinarySendTrampolines);
}


/*	Assumes both operands are ints */

	/* StackToRegisterMappingCogit>>#genStaticallyResolvedSpecialSelectorComparison */
static sqInt
genStaticallyResolvedSpecialSelectorComparison(void)
{
    sqInt argInt;
    BytecodeDescriptor *primDescriptor;
    sqInt rcvrInt;
    int result;

	primDescriptor = generatorAt(byte0);
	argInt = ((ssTop())->constant);
	rcvrInt = ((ssValue(1))->constant);
	
	switch ((primDescriptor->opcode)) {
	case JumpLess:
		result = rcvrInt < argInt;
		break;
	case JumpLessOrEqual:
		result = rcvrInt <= argInt;
		break;
	case JumpGreater:
		result = rcvrInt > argInt;
		break;
	case JumpGreaterOrEqual:
		result = rcvrInt >= argInt;
		break;
	case JumpZero:
		result = rcvrInt == argInt;
		break;
	case JumpNonZero:
		result = rcvrInt != argInt;
		break;
	default:
		error("Case not found and no otherwise clause");
	}
	ssPop(2);
	return ssPushAnnotatedConstant((result
		? trueObject()
		: falseObject()));
}


/*	We need a frame because the association has to be in ReceiverResultReg for
	the various trampolines
	and ReceiverResultReg holds only the receiver in frameless methods.
 */

	/* StackToRegisterMappingCogit>>#genStorePop:LiteralVariable:needsStoreCheck:needsImmutabilityCheck: */
static sqInt NoDbgRegParms
genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean, sqInt litVarIndex, sqInt needsStoreCheck, sqInt needsImmCheck)
{
    AbstractInstruction *anInstruction;
    sqInt association;
    sqInt i;
    sqInt topReg;

	assert(needsFrame);
	/* begin genLoadLiteralVariable:in: */
	association = getLiteral(litVarIndex);
	voidReceiverResultRegContainsSelf();
	/* begin ssAllocateRequiredReg: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(1U << ReceiverResultReg, simStackPtr, simNativeStackPtr);
	/* begin genMoveConstant:R: */
	if (shouldAnnotateObjectReference(association)) {
		annotateobjRef(checkLiteralforInstruction(association, genoperandoperand(MoveCwR, association, ReceiverResultReg)), association);
	}
	else {
		/* begin checkQuickConstant:forInstruction: */
		anInstruction = genoperandoperand(MoveCqR, association, ReceiverResultReg);
	}
	genEnsureObjInRegNotForwardedscratchReg(ReceiverResultReg, TempReg);
	/* begin genGenericStorePop:slotIndex:destReg:needsStoreCheck:needsRestoreRcvr:needsImmutabilityCheck: */
	
#  if IMMUTABILITY
	if (needsImmCheck) {
		/* begin ssAllocateRequiredReg:upThrough: */
		ssAllocateRequiredRegMaskupThroughupThroughNative(1U << ClassReg, simStackPtr - 1, simNativeStackPtr);
		ssStoreAndReplacePoptoReg(popBoolean, ClassReg);
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= simStackPtr) {
			for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i <= simStackPtr; i += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
			}
			simSpillBase = simStackPtr + 1;
		}
		return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0);
	}
#  endif /* IMMUTABILITY */
	topReg = allocateRegForStackEntryAtnotConflictingWith(0, 1U << ReceiverResultReg);
	ssStorePoptoReg(popBoolean, topReg);
	return genStoreSourceRegslotIndexdestRegscratchReginFrameneedsStoreCheck(topReg, ValueIndex, ReceiverResultReg, TempReg, needsFrame, needsStoreCheck);
}


/*	The reason we need a frame here is that assigning to an inst var of a
	context may
	involve wholesale reorganization of stack pages, and the only way to
	preserve the
	execution state of an activation in that case is if it has a frame. */

	/* StackToRegisterMappingCogit>>#genStorePop:MaybeContextReceiverVariable:needsStoreCheck:needsImmutabilityCheck: */
static sqInt NoDbgRegParms
genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean, sqInt slotIndex, sqInt needsStoreCheck, sqInt needsImmCheck)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    AbstractInstruction *abstractInstruction2;
    AbstractInstruction *abstractInstruction3;
    AbstractInstruction *anInstruction;
    AbstractInstruction *anInstruction1;
    sqInt i;
    AbstractInstruction *immutabilityFailure;
    AbstractInstruction *mutableJump;

	immutabilityFailure = ((AbstractInstruction *) 0);
	assert(needsFrame);
	ssFlushUpThroughReceiverVariable(slotIndex);
	ensureReceiverResultRegContainsSelf();
	/* begin genGenericStorePop:MaybeContextSlotIndex:needsStoreCheck:needsRestoreRcvr:needsImmutabilityCheck: */
	assert(needsFrame);
	
#  if IMMUTABILITY
	if (needsImmCheck) {
		mutableJump = genJumpMutablescratchReg(ReceiverResultReg, TempReg);
		/* begin genStoreTrampolineCall: */
		assert(IMMUTABILITY);
		if (slotIndex >= (NumStoreTrampolines - 1)) {
			/* begin checkQuickConstant:forInstruction: */
			anInstruction = genoperandoperand(MoveCqR, slotIndex, TempReg);
			/* begin CallRT: */
			abstractInstruction3 = genoperand(Call, ceStoreTrampolines[NumStoreTrampolines - 1]);
			(abstractInstruction3->annotation = IsRelativeCall);
		}
		else {
			/* begin CallRT: */
			abstractInstruction1 = genoperand(Call, ceStoreTrampolines[slotIndex]);
			(abstractInstruction1->annotation = IsRelativeCall);
		}
		/* begin annotateBytecode: */
		abstractInstruction2 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		(abstractInstruction2->annotation = HasBytecodePC);
		/* begin putSelfInReceiverResultReg */
		storeToReg(simSelf(), ReceiverResultReg);
		/* begin Jump: */
		immutabilityFailure = genoperand(Jump, ((sqInt)0));
		jmpTarget(mutableJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	}
#  endif /* IMMUTABILITY */
	ssPop(1);
	/* begin ssAllocateCallReg:and: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(CallerSavedRegisterMask | ((1U << ClassReg) | (1U << SendNumArgsReg)), simStackPtr, simNativeStackPtr);
	ssPush(1);
	genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg);
	ssStoreAndReplacePoptoReg(popBoolean, ClassReg);
	/* begin ssFlushTo: */
	assert(tempsValidAndVolatileEntriesSpilled());
	if (simSpillBase <= simStackPtr) {
		for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i <= simStackPtr; i += 1) {
			assert(needsFrame);
			ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
		}
		simSpillBase = simStackPtr + 1;
	}
	/* begin checkQuickConstant:forInstruction: */
	anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg);
	/* begin CallRT: */
	abstractInstruction = genoperand(Call, ceStoreContextInstVarTrampoline);
	(abstractInstruction->annotation = IsRelativeCall);
	
#  if IMMUTABILITY
	if (needsImmCheck) {
		jmpTarget(immutabilityFailure, genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	}
#  endif /* IMMUTABILITY */
	return 0;
}

	/* StackToRegisterMappingCogit>>#genStorePop:ReceiverVariable:needsStoreCheck:needsImmutabilityCheck: */
static sqInt NoDbgRegParms
genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean, sqInt slotIndex, sqInt needsStoreCheck, sqInt needsImmCheck)
{
    sqInt i;
    sqInt needsImmCheck1;
    sqInt needsStoreCheck1;
    sqInt topReg;

	ssFlushUpThroughReceiverVariable(slotIndex);
	ensureReceiverResultRegContainsSelf();
	/* begin genGenericStorePop:slotIndex:destReg:needsStoreCheck:needsRestoreRcvr:needsImmutabilityCheck: */
	needsStoreCheck1 = (!useTwoPaths)
	 && (needsStoreCheck);
	needsImmCheck1 = needsImmCheck
	 && (!useTwoPaths);
	
#  if IMMUTABILITY
	if (needsImmCheck1) {
		/* begin ssAllocateRequiredReg:upThrough: */
		ssAllocateRequiredRegMaskupThroughupThroughNative(1U << ClassReg, simStackPtr - 1, simNativeStackPtr);
		ssStoreAndReplacePoptoReg(popBoolean, ClassReg);
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= simStackPtr) {
			for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i <= simStackPtr; i += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
			}
			simSpillBase = simStackPtr + 1;
		}
		return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1);
	}
#  endif /* IMMUTABILITY */
	topReg = allocateRegForStackEntryAtnotConflictingWith(0, 1U << ReceiverResultReg);
	ssStorePoptoReg(popBoolean, topReg);
	return genStoreSourceRegslotIndexdestRegscratchReginFrameneedsStoreCheck(topReg, slotIndex, ReceiverResultReg, TempReg, needsFrame, needsStoreCheck1);
}


/*	The only reason we assert needsFrame here is that in a frameless method
	ReceiverResultReg must and does contain only self, but the ceStoreCheck
	trampoline expects the target of the store to be in ReceiverResultReg. So
	in a frameless method we would have a conflict between the receiver and
	the temote temp store, unless we we smart enough to realise that
	ReceiverResultReg was unused after the literal variable store, unlikely
	given that methods return self by default. */

	/* StackToRegisterMappingCogit>>#genStorePop:RemoteTemp:At:needsStoreCheck: */
static sqInt NoDbgRegParms
genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck)
{
    AbstractInstruction *anInstruction;
    sqInt offset;
    sqInt topReg;

	assert(needsFrame);
	/* begin ssAllocateRequiredReg: */
	ssAllocateRequiredRegMaskupThroughupThroughNative(1U << ReceiverResultReg, simStackPtr, simNativeStackPtr);
	voidReceiverResultRegContainsSelf();
	/* begin MoveMw:r:R: */
	offset = frameOffsetOfTemporary(remoteTempIndex);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveMwrR, offset, FPReg, ReceiverResultReg);
	/* begin genGenericStorePop:slotIndex:destReg:needsStoreCheck:needsRestoreRcvr:needsImmutabilityCheck: */
	
#  if IMMUTABILITY
	
#  endif /* IMMUTABILITY */
	topReg = allocateRegForStackEntryAtnotConflictingWith(0, 1U << ReceiverResultReg);
	ssStorePoptoReg(popBoolean, topReg);
	return genStoreSourceRegslotIndexdestRegscratchReginFrameneedsStoreCheck(topReg, slotIndex, ReceiverResultReg, TempReg, needsFrame, needsStoreCheck);
}

	/* StackToRegisterMappingCogit>>#genStorePop:TemporaryVariable: */
static sqInt NoDbgRegParms
genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex)
{
    AbstractInstruction *anInstruction;
    sqInt offset;
    sqInt reg;

	ssFlushUpThroughTemporaryVariable(tempIndex);
	reg = ssStorePoptoPreferredReg(popBoolean, TempReg);
	/* begin MoveR:Mw:r: */
	offset = frameOffsetOfTemporary(tempIndex);
	/* begin checkQuickConstant:forInstruction: */
	anInstruction = genoperandoperandoperand(MoveRMwr, reg, offset, FPReg);
	((simStackAt(tempIndex + 1))->bcptr = bytecodePC);
	return 0;
}


/*	Generate a method return from within a method or a block.
	Frameless method activation looks like
	CISCs (x86):
	receiver
	args
	sp->	ret pc.
	RISCs (ARM):
	receiver
	args
	ret pc in LR.
	A fully framed activation is described in CoInterpreter
	class>initializeFrameIndices. Return pops receiver and arguments off the
	stack. Callee pushes the result. */

	/* StackToRegisterMappingCogit>>#genUpArrowReturn */
static sqInt
genUpArrowReturn(void)
{
    AbstractInstruction *abstractInstruction;
    AbstractInstruction *abstractInstruction1;
    sqInt i;
    sqInt offset;


	/* can't fall through */
	deadCode = 1;
	if (inBlock > 0) {
		assert(needsFrame);
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= simStackPtr) {
			for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i <= simStackPtr; i += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
			}
			simSpillBase = simStackPtr + 1;
		}
		/* begin CallRT: */
		abstractInstruction = genoperand(Call, ceNonLocalReturnTrampoline);
		(abstractInstruction->annotation = IsRelativeCall);
		/* begin annotateBytecode: */
		abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
		(abstractInstruction1->annotation = HasBytecodePC);
		return 0;
	}
	if (
#  if IMMUTABILITY
		needsFrame
			 && (!useTwoPaths)
#  else /* IMMUTABILITY */
		needsFrame
#  endif /* IMMUTABILITY */
		) {
		/* begin MoveR:R: */
		genoperandoperand(MoveRR, FPReg, SPReg);
		/* begin PopR: */
		genoperand(PopR, FPReg);
		/* begin RetN: */
		genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
	}
	else {
		/* begin RetN: */
		offset = ((methodOrBlockNumArgs > 2 /* numRegArgs */)
		 || (regArgsHaveBeenPushed)
			? (methodOrBlockNumArgs + 1) * BytesPerWord
			: 0);
		genoperand(RetN, offset);
	}
	return 0;
}

	/* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */
static void NoDbgRegParms
initSimStackForFramefulMethod(sqInt startpc)
{
    CogSimStackEntry * cascade0;
    CogSimStackEntry *desc;
    sqInt i;


	/* N.B. Includes num args */
	simStackPtr = methodOrBlockNumTemps;
	simSpillBase = methodOrBlockNumTemps + 1;
	cascade0 = simSelf();
	(cascade0->type = SSBaseOffset);
	(cascade0->spilled = 1);
	(cascade0->registerr = FPReg);
	(cascade0->offset = FoxMFReceiver);
	(cascade0->liveRegister = NoReg);
	for (i = 1; i <= methodOrBlockNumArgs; i += 1) {
		desc = simStackAt(i);
		(desc->type = SSBaseOffset);
		(desc->spilled = 1);
		(desc->registerr = FPReg);
		(desc->offset = FoxCallerSavedIP + (((methodOrBlockNumArgs - i) + 1) * BytesPerWord));
		(desc->bcptr = startpc);
	}
	for (i = (methodOrBlockNumArgs + 1); i <= simStackPtr; i += 1) {
		desc = simStackAt(i);
		(desc->type = SSBaseOffset);
		(desc->spilled = 1);
		(desc->registerr = FPReg);
		(desc->offset = FoxMFReceiver - ((i - methodOrBlockNumArgs) * BytesPerWord));
		(desc->bcptr = startpc);
	}
}


/*	The register receiver (the closure itself) and args are pushed by the
	closure value primitive(s)
	and hence a frameless block has all arguments and copied values pushed to
	the stack. However,
	the method receiver (self) is put in the ReceiverResultReg by the block
	entry. 
 */

	/* StackToRegisterMappingCogit>>#initSimStackForFramelessBlock: */
static void NoDbgRegParms
initSimStackForFramelessBlock(sqInt startpc)
{
    CogSimStackEntry * cascade0;
    CogSimStackEntry *desc;
    sqInt i;

	cascade0 = simSelf();
	(cascade0->type = SSRegister);
	(cascade0->spilled = 0);
	(cascade0->registerr = ReceiverResultReg);
	(cascade0->liveRegister = ReceiverResultReg);
	assert(methodOrBlockNumTemps >= methodOrBlockNumArgs);
	for (i = 1; i <= methodOrBlockNumTemps; i += 1) {
		desc = simStackAt(i);
		(desc->type = SSBaseOffset);
		(desc->spilled = 1);
		(desc->registerr = SPReg);
		(desc->offset = ((methodOrBlockNumArgs + 1) - i) * BytesPerWord);
		(desc->bcptr = startpc);
	}

	/* N.B. Includes num args */
	simStackPtr = methodOrBlockNumTemps;
	simSpillBase = methodOrBlockNumTemps + 1;
	}

	/* StackToRegisterMappingCogit>>#initSimStackForFramelessMethod: */
static void NoDbgRegParms
initSimStackForFramelessMethod(sqInt startpc)
{
    CogSimStackEntry * cascade0;
    CogSimStackEntry *desc;
    sqInt i;

	cascade0 = simSelf();
	(cascade0->type = SSRegister);
	(cascade0->spilled = 0);
	(cascade0->registerr = ReceiverResultReg);
	(cascade0->liveRegister = ReceiverResultReg);
	assert(methodOrBlockNumTemps == methodOrBlockNumArgs);
	assert((numRegArgs()) <= 2);
	if (((methodOrBlockNumArgs >= 1) && (methodOrBlockNumArgs <= 2 /* numRegArgs */))) {
		desc = simStackAt(1);
		(desc->type = SSRegister);
		(desc->spilled = 0);
		(desc->registerr = Arg0Reg);
		(desc->bcptr = startpc);
		if (methodOrBlockNumArgs > 1) {
			desc = simStackAt(2);
			(desc->type = SSRegister);
			(desc->spilled = 0);
			(desc->registerr = Arg1Reg);
			(desc->bcptr = startpc);
		}
	}
	else {
		for (i = 1; i <= methodOrBlockNumArgs; i += 1) {
			desc = simStackAt(i);
			(desc->type = SSBaseOffset);
			(desc->registerr = SPReg);
			(desc->spilled = 1);
			(desc->offset = ((methodOrBlockNumArgs + 1) - i) * BytesPerWord);
			(desc->bcptr = startpc);
		}
	}
	simStackPtr = methodOrBlockNumArgs;
	simSpillBase = methodOrBlockNumArgs + 1;
	}

	/* StackToRegisterMappingCogit>>#liveRegisters */
static sqInt
liveRegisters(void)
{
    sqInt i;
    sqInt regsSet;

	if (needsFrame) {
		regsSet = 0;
	}
	else {
		/* begin registerMaskFor: */
		regsSet = 1U << ReceiverResultReg;
		if ((methodOrBlockNumArgs <= 2 /* numRegArgs */)
		 && (methodOrBlockNumArgs > 0)) {
			regsSet = regsSet | (1U << Arg0Reg);
			if (methodOrBlockNumArgs > 1) {
				regsSet = regsSet | (1U << Arg1Reg);
			}
		}
	}
	for (i = (((simSpillBase < 0) ? 0 : simSpillBase)); i <= simStackPtr; i += 1) {
		regsSet = regsSet | (registerMask(simStackAt(i)));
	}
	return regsSet;
}


/*	insert nops for dead code that is mapped so that bc 
	to mc mapping is not many to one */

	/* StackToRegisterMappingCogit>>#mapDeadDescriptorIfNeeded: */
static sqInt NoDbgRegParms
mapDeadDescriptorIfNeeded(BytecodeDescriptor *descriptor)
{
    AbstractInstruction *abstractInstruction;

	flag("annotateInstruction");
	if (((descriptor->isMapped))
	 || ((inBlock > 0)
	 && ((descriptor->isMappedInBlock)))) {
		/* begin annotateBytecode: */
		abstractInstruction = gen(Nop);
		(abstractInstruction->annotation = HasBytecodePC);
	}
	return 0;
}


/*	Spill everything on the simulated stack that needs spilling (that below
	receiver and arguments).
	Marshall receiver and arguments to stack and/or registers depending on arg
	count. If the args don't fit in registers push receiver and args (spill
	everything), but still assign
	the receiver to ReceiverResultReg. */

	/* StackToRegisterMappingCogit>>#marshallSendArguments: */
static void NoDbgRegParms
marshallSendArguments(sqInt numArgs)
{
    sqInt anyRefs;
    CogSimStackEntry * cascade0;
    sqInt i;
    sqInt i1;
    sqInt i2;
    sqInt numSpilled;

	/* begin ssFlushTo: */
	assert(tempsValidAndVolatileEntriesSpilled());
	if (simSpillBase <= ((simStackPtr - numArgs) - 1)) {
		for (i2 = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < ((simStackPtr - numArgs) - 1)) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : ((simStackPtr - numArgs) - 1))); i2 < (simStackPtr - numArgs); i2 += 1) {
			assert(needsFrame);
			ensureSpilledAtfrom(simStackAt(i2), frameOffsetOfTemporary(i2 - 1), FPReg);
		}
		simSpillBase = ((simStackPtr - numArgs) - 1) + 1;
	}
	if (numArgs > 2 /* numRegArgs */) {

		/* If there are no spills and no references to ReceiverResultReg
		   the fetch of ReceiverResultReg from the stack can be avoided
		   by assigning directly to ReceiverResultReg and pushing it. */
		numSpilled = numberOfSpillsInTopNItems(numArgs + 1);
		anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1);
		if ((numSpilled > 0)
		 || (anyRefs)) {
			/* begin ssFlushTo: */
			assert(tempsValidAndVolatileEntriesSpilled());
			if (simSpillBase <= simStackPtr) {
				for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i <= simStackPtr; i += 1) {
					assert(needsFrame);
					ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
				}
				simSpillBase = simStackPtr + 1;
			}
			storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg);
		}
		else {
			cascade0 = simStackAt(simStackPtr - numArgs);
			storeToReg(cascade0, ReceiverResultReg);
			(cascade0->type = SSRegister);
			(cascade0->registerr = ReceiverResultReg);
			/* begin ssFlushTo: */
			assert(tempsValidAndVolatileEntriesSpilled());
			if (simSpillBase <= simStackPtr) {
				for (i1 = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i1 <= simStackPtr; i1 += 1) {
					assert(needsFrame);
					ensureSpilledAtfrom(simStackAt(i1), frameOffsetOfTemporary(i1 - 1), FPReg);
				}
				simSpillBase = simStackPtr + 1;
			}
		}
	}
	else {

		/* Move the args to the register arguments, being careful to do
		   so last to first so e.g. previous contents don't get overwritten.
		   Also check for any arg registers in use by other args. */
		if (numArgs > 0) {
			if (numArgs > 1) {
				/* begin ssAllocateRequiredReg:upThrough: */
				ssAllocateRequiredRegMaskupThroughupThroughNative(1U << Arg0Reg, simStackPtr - 2, simNativeStackPtr);
				/* begin ssAllocateRequiredReg:upThrough: */
				ssAllocateRequiredRegMaskupThroughupThroughNative(1U << Arg1Reg, simStackPtr - 1, simNativeStackPtr);
			}
			else {
				/* begin ssAllocateRequiredReg:upThrough: */
				ssAllocateRequiredRegMaskupThroughupThroughNative(1U << Arg0Reg, simStackPtr - 1, simNativeStackPtr);
			}
		}
		if (numArgs > 1) {
			popToReg(simStackAt(simStackPtr), Arg1Reg);
		}
		if (numArgs > 0) {
			popToReg(simStackAt((simStackPtr - numArgs) + 1), Arg0Reg);
		}
		popToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg);
	}
	ssPop(numArgs + 1);
}


/*	For assert checking; or rather for avoiding assert fails when dealing with
	the hack for block temps in the SqueakV3PlusClosures bytecode set.
 */

	/* StackToRegisterMappingCogit>>#maybeCompilingFirstPassOfBlockWithInitialPushNil */
static sqInt
maybeCompilingFirstPassOfBlockWithInitialPushNil(void)
{
	return (inBlock == InVanillaBlock)
	 && ((methodOrBlockNumTemps > methodOrBlockNumArgs)
	 && (compilationPass == 1));
}


/*	If this bytecode has a fixup, some kind of merge needs to be done. There
	are 4 cases:
	1) the bytecode has no fixup (fixup isNotAFixup)
	do nothing
	2) the bytecode has a non merge fixup
	the fixup has needsNonMergeFixup.
	The code generating non merge fixup (currently only special selector code)
	is responsible
	for the merge so no need to do it.
	We set deadCode to false as the instruction can be reached from jumps.
	3) the bytecode has a merge fixup, but execution flow *cannot* fall
	through to the merge point.
	the fixup has needsMergeFixup and deadCode = true.
	ignores the current simStack as it does not mean anything 
	restores the simStack to the state the jumps to the merge point expects it
	to be.
	4) the bytecode has a merge fixup and execution flow *can* fall through to
	the merge point.
	the fixup has needsMergeFixup and deadCode = false.
	flushes the stack to the stack pointer so the fall through execution path
	simStack is 
	in the state the merge point expects it to be. 
	restores the simStack to the state the jumps to the merge point expects it
	to be.
	
	In addition, if this is a backjump merge point, we patch the fixup to hold
	the current simStackPtr 
	for later assertions. */

	/* StackToRegisterMappingCogit>>#mergeWithFixupIfRequired: */
static sqInt NoDbgRegParms
mergeWithFixupIfRequired(BytecodeFixup *fixup)
{
    CogSimStackEntry * cascade0;
    sqInt i;
    sqInt i1;

	/* begin assertCorrectSimStackPtr */
	assert((simSpillBase >= methodOrBlockNumTemps)
	 || ((maybeCompilingFirstPassOfBlockWithInitialPushNil())
	 && (simSpillBase > methodOrBlockNumArgs)));
	if (needsFrame
	 && (simSpillBase > 0)) {
		assert((((simStackAt(simSpillBase - 1))->spilled)) == 1);
		assert((simSpillBase > simStackPtr)
		 || ((((simStackAt(simSpillBase))->spilled)) == 0));
	}
	if (((fixup->targetInstruction)) == 0) {
		return 0;
	}
	if ((((usqInt)((fixup->targetInstruction)))) == NeedsNonMergeFixupFlag) {
		deadCode = 0;
		return 0;
	}
	assert(isMergeFixup(fixup));
	traceMerge(fixup);
	if (deadCode) {

		/* case 3 */
		/* Would like to assert fixup simStackPtr >= methodOrBlockNumTemps
		   but can't because of the initialNils hack. */
		assert((((fixup->simStackPtr)) >= methodOrBlockNumTemps)
		 || (maybeCompilingFirstPassOfBlockWithInitialPushNil()));
		simStackPtr = (fixup->simStackPtr);
			}
	else {

		/* case 4 */
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= simStackPtr) {
			for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < simStackPtr) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : simStackPtr)); i <= simStackPtr; i += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
			}
			simSpillBase = simStackPtr + 1;
		}
	}
	deadCode = 0;
	if ((fixup->isTargetOfBackwardBranch)) {
		(fixup->simStackPtr = simStackPtr);
			}
	(fixup->targetInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC));
	assert(simStackPtr == ((fixup->simStackPtr)));
	/* begin restoreSimStackAtMergePoint: */
	((simSelf())->liveRegister = NoReg);
	for (i1 = (methodOrBlockNumTemps + 1); i1 <= simStackPtr; i1 += 1) {
		cascade0 = simStackAt(i1);
		(cascade0->type = SSSpill);
		(cascade0->offset = FoxMFReceiver - ((i1 - methodOrBlockNumArgs) * BytesPerOop));
		(cascade0->registerr = FPReg);
		(cascade0->spilled = 1);
	}
	simSpillBase = simStackPtr + 1;
	return 0;
}

	/* StackToRegisterMappingCogit>>#methodAbortTrampolineFor: */
static sqInt NoDbgRegParms
methodAbortTrampolineFor(sqInt numArgs)
{
	return methodAbortTrampolines[((numArgs < (2 /* numRegArgs */ + 1)) ? numArgs : (2 /* numRegArgs */ + 1))];
}


/*	This is a hook for subclasses to filter out methods they can't deal with. */
/*	Frameless methods with local temporaries cause problems,
	mostly in asserts, and yet they matter not at all for performance.
	Shun them. */

	/* StackToRegisterMappingCogit>>#methodFoundInvalidPostScan */
static sqInt
methodFoundInvalidPostScan(void)
{
	if (!needsFrame) {
		return methodOrBlockNumTemps > methodOrBlockNumArgs;
	}
	return 0;
}

	/* StackToRegisterMappingCogit>>#needsFrameIfMod16GENumArgs: */
static sqInt NoDbgRegParms
needsFrameIfMod16GENumArgs(sqInt stackDelta)
{
	return (byte0 % 16) >= methodOrBlockNumArgs;
}


/*	As of August 2013, the code generator can't deal with spills in frameless
	methods (the
	issue is to do with the stack offset to get at an argument, which is
	changed when there's a spill).
	In e.g. TextColor>>#dominates: other ^other class == self class the second
	send of class
	needs also rto allocate a register that the first one used, but the first
	one's register can't be
	spilled. So avoid this by only allowing class to be sent if the stack
	contains a single element. */

	/* StackToRegisterMappingCogit>>#needsFrameIfStackGreaterThanOne: */
static sqInt NoDbgRegParms
needsFrameIfStackGreaterThanOne(sqInt stackDelta)
{
	return stackDelta > 1;
}

	/* StackToRegisterMappingCogit>>#numberOfSpillsInTopNItems: */
static sqInt NoDbgRegParms
numberOfSpillsInTopNItems(sqInt n)
{
    sqInt i;

	for (i = simStackPtr; i >= ((simStackPtr - n) + 1); i += -1) {
		if ((((simStackAt(i))->type)) == SSSpill) {
			return n - (simStackPtr - i);
		}
	}
	return 0;
}

	/* StackToRegisterMappingCogit>>#picAbortTrampolineFor: */
static sqInt NoDbgRegParms
picAbortTrampolineFor(sqInt numArgs)
{
	return picAbortTrampolines[((numArgs < (2 /* numRegArgs */ + 1)) ? numArgs : (2 /* numRegArgs */ + 1))];
}

	/* StackToRegisterMappingCogit>>#prevInstIsPCAnnotated */
static sqInt
prevInstIsPCAnnotated(void)
{
    sqInt prevIndex;
    AbstractInstruction *prevInst;

	if (!(opcodeIndex > 0)) {
		return 0;
	}
	prevIndex = opcodeIndex - 1;
	while (1) {
		if (prevIndex <= 0) {
			return 0;
		}
		prevInst = abstractInstructionAt(prevIndex);
		if (isPCMappedAnnotation((!((prevInst->annotation))
			? 0
			: (prevInst->annotation)))) {
			return 1;
		}
		if (!(((prevInst->opcode)) == Label)) break;
		prevIndex -= 1;
	}
	return 0;
}


/*	Used to mark ReceiverResultReg as dead or not containing simSelf.
	Used when the simStack has already been flushed, e.g. for sends. */

	/* StackToRegisterMappingCogit>>#receiverIsInReceiverResultReg */
static sqInt
receiverIsInReceiverResultReg(void)
{
	return (((simSelf())->liveRegister)) == ReceiverResultReg;
}


/*	When a block must be recompiled due to overestimating the
	numInitialNils fixups must be restored, which means rescannning
	since backward branches need their targets initialized. */

	/* StackToRegisterMappingCogit>>#reinitializeFixupsFrom:through: */
static void NoDbgRegParms
reinitializeFixupsFromthrough(sqInt start, sqInt end)
{
    BytecodeDescriptor *descriptor;
    sqInt distance;
    BytecodeFixup * fixup;
    sqInt nExts;
    sqInt pc;
    BytecodeFixup * self_in_reinitialize;
    sqInt targetPC;

	pc = start;
	nExts = 0;
	while (pc <= end) {
		/* begin reinitialize */
		self_in_reinitialize = fixupAtIndex(pc - initialPC);
		(self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0);
		byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset;
		descriptor = generatorAt(byte0);
		if ((isBranch(descriptor))
		 && ((assert(((descriptor->spanFunction)) != null),
		(((descriptor->spanFunction))(descriptor, pc, nExts, methodObj)) < 0))) {
			/* begin spanFor:at:exts:in: */
			distance = ((descriptor->spanFunction))(descriptor, pc, nExts, methodObj);
			targetPC = (pc + ((descriptor->numBytes))) + distance;
			/* begin initializeFixupAt: */
			fixup = fixupAtIndex(targetPC - initialPC);
			/* begin initializeFixup: */
			(fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag);
			/* begin setIsBackwardBranchFixup */
			(fixup->isTargetOfBackwardBranch) = 1;
		}
		if ((descriptor->isBlockCreation)) {
			/* begin spanFor:at:exts:in: */
			distance = ((descriptor->spanFunction))(descriptor, pc, nExts, methodObj);
			pc = (pc + ((descriptor->numBytes))) + distance;
		}
		else {
			pc += (descriptor->numBytes);
		}
		nExts = ((descriptor->isExtension)
			? nExts + 1
			: 0);
	}
}


/*	Scan the block to determine if the block needs a frame or not */

	/* StackToRegisterMappingCogit>>#scanBlock: */
static sqInt NoDbgRegParms
scanBlock(BlockStart *blockStart)
{
    BytecodeDescriptor *descriptor;
    sqInt end;
    sqInt framelessStackDelta;
    sqInt nExts;
    sqInt numPushNils;
    sqInt (* const numPushNilsFunction)(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt) = squeakV3orSistaV1NumPushNils;
    sqInt pc;
    sqInt pushingNils;

	needsFrame = 0;
	prevBCDescriptor = null;
	methodOrBlockNumArgs = (blockStart->numArgs);
	inBlock = InVanillaBlock;
	pc = (blockStart->startpc);
	end = ((blockStart->startpc)) + ((blockStart->span));
	framelessStackDelta = (nExts = (extA = (numExtB = (extB = 0))));
	pushingNils = 1;
	while (pc < end) {
		byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset;
		descriptor = generatorAt(byte0);
		if ((descriptor->isExtension)) {
			loadSubsequentBytesForDescriptorat(descriptor, pc);
			((descriptor->generator))();
		}
		if (!needsFrame) {
			if ((((descriptor->needsFrameFunction)) == null)
			 || (((descriptor->needsFrameFunction))(framelessStackDelta))) {
				needsFrame = 1;
			}
			else {
				framelessStackDelta += (descriptor->stackDelta);
			}
		}
		/* begin maybeNoteDescriptor:blockStart: */
		if ((descriptor->isInstVarRef)) {
			(blockStart->hasInstVarRef = 1);
		}
		if (pushingNils
		 && (!((descriptor->isExtension)))) {

			/* Count the initial number of pushed nils acting as temp initializers.  We can't tell
			   whether an initial pushNil is an operand reference or a temp initializer, except
			   when the pushNil is a jump target (has a fixup), which never happens:
			   self systemNavigation browseAllSelect:
			   [:m| | ebc |
			   (ebc := m embeddedBlockClosures
			   select: [:ea| ea decompile statements first isMessage]
			   thenCollect: [:ea| ea decompile statements first selector]) notEmpty
			   and: [(#(whileTrue whileFalse whileTrue: whileFalse:) intersection: ebc) notEmpty]]
			   or if the bytecode set has a push multiple nils bytecode.  We simply count initial nils.
			   Rarely we may end up over-estimating.  We will correct by checking the stack depth
			   at the end of the block in compileBlockBodies. */
			if (((numPushNils = numPushNilsFunction(descriptor, pc, nExts, methodObj))) > 0) {
				assert(((descriptor->numBytes)) == 1);
				(blockStart->numInitialNils = ((blockStart->numInitialNils)) + numPushNils);
			}
			else {
				pushingNils = 0;
			}
		}
		/* begin nextBytecodePCFor:at:exts:in: */
		pc = (pc + ((descriptor->numBytes))) + (((descriptor->isBlockCreation)
	? ((descriptor->spanFunction))(descriptor, pc, nExts, methodObj)
	: 0));
		if ((descriptor->isExtension)) {
			nExts += 1;
		}
		else {
			nExts = (extA = (numExtB = (extB = 0)));
		}
		prevBCDescriptor = descriptor;
	}
	if (!needsFrame) {
		assert((framelessStackDelta >= 0)
		 && (((blockStart->numInitialNils)) >= framelessStackDelta));
		(blockStart->numInitialNils = ((blockStart->numInitialNils)) - framelessStackDelta);
	}
	return 0;
}


/*	Scan the method (and all embedded blocks) to determine
	- what the last bytecode is; extra bytes at the end of a method are used
	to encode things like source pointers or temp names
	- if the method needs a frame or not
	- what are the targets of any backward branches.
	- how many blocks it creates
	Answer the block count or on error a negative error code */

	/* StackToRegisterMappingCogit>>#scanMethod */
static sqInt
scanMethod(void)
{
    BytecodeDescriptor *descriptor;
    sqInt distance;
    BytecodeFixup * fixup;
    sqInt framelessStackDelta;
    sqInt latestContinuation;
    sqInt nExts;
    sqInt numBlocks;
    sqInt pc;
    sqInt seenInstVarStore;
    sqInt targetPC;

	needsFrame = (useTwoPaths = (seenInstVarStore = 0));
	prevBCDescriptor = null;
	if ((primitiveIndex > 0)
	 && (isQuickPrimitiveIndex(primitiveIndex))) {
		return 0;
	}
	pc = (latestContinuation = initialPC);
	numBlocks = (framelessStackDelta = (nExts = (extA = (numExtB = (extB = 0)))));
	while (pc <= endPC) {
		byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset;
		descriptor = generatorAt(byte0);
		if ((descriptor->isExtension)) {
			if (((descriptor->opcode)) == Nop) {

				/* unknown bytecode tag; see Cogit class>>#generatorTableFrom: */
				return EncounteredUnknownBytecode;
			}
			loadSubsequentBytesForDescriptorat(descriptor, pc);
			((descriptor->generator))();
		}
		if (((descriptor->isReturn))
		 && (pc >= latestContinuation)) {
			endPC = pc;
		}
		if (!needsFrame) {
			if ((((descriptor->needsFrameFunction)) == null)
			 || (((descriptor->needsFrameFunction))(framelessStackDelta))) {

				/* With immutability we win simply by avoiding a frame build if the receiver is young and not immutable. */
				
#        if IMMUTABILITY
				if ((descriptor->is1ByteInstVarStore)) {
					useTwoPaths = 1;
				}
				else {
					needsFrame = 1;
					useTwoPaths = 0;
				}
#        else /* IMMUTABILITY */
				needsFrame = 1;
				useTwoPaths = 0;
#        endif /* IMMUTABILITY */
			}
			else {

				/* Without immutability we win if there are two or more stores and the receiver is new. */
				framelessStackDelta += (descriptor->stackDelta);
				
#        if IMMUTABILITY
#        else /* IMMUTABILITY */
				if ((descriptor->is1ByteInstVarStore)) {
					if (seenInstVarStore) {
						useTwoPaths = 1;
					}
					else {
						seenInstVarStore = 1;
					}
				}
#        endif /* IMMUTABILITY */
			}
		}
		if (isBranch(descriptor)) {
			/* begin spanFor:at:exts:in: */
			distance = ((descriptor->spanFunction))(descriptor, pc, nExts, methodObj);
			targetPC = (pc + ((descriptor->numBytes))) + distance;
			if ((assert(((descriptor->spanFunction)) != null),
			(((descriptor->spanFunction))(descriptor, pc, nExts, methodObj)) < 0)) {
				/* begin initializeFixupAt: */
				fixup = fixupAtIndex(targetPC - initialPC);
				/* begin initializeFixup: */
				(fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag);
				/* begin setIsBackwardBranchFixup */
				(fixup->isTargetOfBackwardBranch) = 1;
			}
			else {
				latestContinuation = ((latestContinuation < targetPC) ? targetPC : latestContinuation);
			}
		}
		/* begin maybeDealWithUnsafeJumpForDescriptor:pc:latestContinuation: */
		latestContinuation = latestContinuation;
		if ((descriptor->isBlockCreation)) {
			numBlocks += 1;
			/* begin spanFor:at:exts:in: */
			distance = ((descriptor->spanFunction))(descriptor, pc, nExts, methodObj);
			targetPC = (pc + ((descriptor->numBytes))) + distance;
			latestContinuation = ((latestContinuation < targetPC) ? targetPC : latestContinuation);
		}
		pc += (descriptor->numBytes);
		nExts = ((descriptor->isExtension)
			? nExts + 1
			: (extA = (numExtB = (extB = 0))));
		prevBCDescriptor = descriptor;
	}
	return numBlocks;
}

	/* StackToRegisterMappingCogit>>#squeakV3orSistaV1PushNilSize:numInitialNils: */
static sqInt NoDbgRegParms
squeakV3orSistaV1PushNilSizenumInitialNils(sqInt aMethodObj, sqInt numInitialNils)
{
	return (methodUsesAlternateBytecodeSet(aMethodObj)
		? /* begin sistaV1PushNilSize:numInitialNils: */ numInitialNils
		: numInitialNils);
}

	/* StackToRegisterMappingCogit>>#squeakV3orSistaV1:Num:Push:Nils: */
static sqInt NoDbgRegParms
squeakV3orSistaV1NumPushNils(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj)
{
	return (bytecodeSetOffset == 0
		? (((descriptor->generator)) == genPushConstantNilBytecode
				? 1
				: 0)
		: (/* begin sistaV1:Num:Push:Nils: */
			(((descriptor->generator)) == genPushConstantNilBytecode
					? 1
					: 0)));
}

	/* StackToRegisterMappingCogit>>#ssAllocateRequiredRegMask:upThrough:upThroughNative: */
static void NoDbgRegParms
ssAllocateRequiredRegMaskupThroughupThroughNative(sqInt requiredRegsMask, sqInt stackPtr, sqInt nativeStackPtr)
{
    sqInt i;
    sqInt i1;
    sqInt lastRequired;
    sqInt lastRequiredNative;
    sqInt liveRegs;

	lastRequired = -1;

	/* compute live regs while noting the last occurrence of required regs.
	   If these are not free we must spill from simSpillBase to last occurrence.
	   Note we are conservative here; we could allocate FPReg in frameless methods. */
	lastRequiredNative = -1;
	/* begin registerMaskFor:and: */
	liveRegs = (1U << FPReg) | (1U << SPReg);
	for (i = (((simSpillBase < 0) ? 0 : simSpillBase)); i <= stackPtr; i += 1) {
		liveRegs = liveRegs | (registerMask(simStackAt(i)));
		if ((registerMask(simStackAt(i))) & requiredRegsMask) {
			lastRequired = i;
		}
	}
	if (liveRegs & requiredRegsMask) {
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= lastRequired) {
			for (i1 = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < lastRequired) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : lastRequired)); i1 <= lastRequired; i1 += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i1), frameOffsetOfTemporary(i1 - 1), FPReg);
			}
			simSpillBase = lastRequired + 1;
		}
		assert(!(((liveRegisters()) & requiredRegsMask)));
	}
}


/*	Any occurrences on the stack of the value being stored (which is the top
	of stack)
	must be flushed, and hence any values colder than them stack. */

	/* StackToRegisterMappingCogit>>#ssFlushUpThroughReceiverVariable: */
static void NoDbgRegParms
ssFlushUpThroughReceiverVariable(sqInt slotIndex)
{
    sqInt i;
    sqInt index;

	/* begin ssFlushUpThrough: */
	assert(simSpillBase >= 0);
	for (index = (simStackPtr - 1); index >= simSpillBase; index += -1) {
		if (((((simStackAt(index))->type)) == SSBaseOffset)
		 && (((((simStackAt(index))->registerr)) == ReceiverResultReg)
		 && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) {
			/* begin ssFlushTo: */
			assert(tempsValidAndVolatileEntriesSpilled());
			if (simSpillBase <= index) {
				for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < index) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : index)); i <= index; i += 1) {
					assert(needsFrame);
					ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
				}
				simSpillBase = index + 1;
			}
			goto l1;
		}
	}
	l1:	/* end ssFlushUpThrough: */;
}


/*	Any occurrences on the stack of the value being stored (which is the top
	of stack)
	must be flushed, and hence any values colder than them stack. */

	/* StackToRegisterMappingCogit>>#ssFlushUpThroughTemporaryVariable: */
static void NoDbgRegParms
ssFlushUpThroughTemporaryVariable(sqInt tempIndex)
{
    sqInt i;
    sqInt index;
    sqInt offset;

	offset = ((simStackAt(tempIndex + 1))->offset);
	assert(offset == (frameOffsetOfTemporary(tempIndex)));
	/* begin ssFlushUpThrough: */
	assert(simSpillBase >= 0);
	for (index = (simStackPtr - 1); index >= simSpillBase; index += -1) {
		if (((((simStackAt(index))->type)) == SSBaseOffset)
		 && (((((simStackAt(index))->registerr)) == FPReg)
		 && ((((simStackAt(index))->offset)) == offset))) {
			/* begin ssFlushTo: */
			assert(tempsValidAndVolatileEntriesSpilled());
			if (simSpillBase <= index) {
				for (i = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < index) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : index)); i <= index; i += 1) {
					assert(needsFrame);
					ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i - 1), FPReg);
				}
				simSpillBase = index + 1;
			}
			goto l1;
		}
	}
	l1:	/* end ssFlushUpThrough: */;
}

	/* StackToRegisterMappingCogit>>#ssPop: */
static void NoDbgRegParms
ssPop(sqInt n)
{
    sqInt i;

	assert(((simStackPtr - n) >= methodOrBlockNumTemps)
	 || (((!needsFrame)
	 && ((simStackPtr - n) >= 0))
	 || (maybeCompilingFirstPassOfBlockWithInitialPushNil())));
	simStackPtr -= n;
	/* begin updateSimSpillBase */
	assert(((simSpillBase > methodOrBlockNumTemps)
	 && (simStackPtr >= methodOrBlockNumTemps))
	 || (maybeCompilingFirstPassOfBlockWithInitialPushNil()));
	if (simSpillBase > simStackPtr) {
		simSpillBase = simStackPtr + 1;
		while (((simSpillBase - 1) > methodOrBlockNumTemps)
		 && (!(((simStackAt(simSpillBase - 1))->spilled)))) {
			simSpillBase -= 1;
		}
	}
	else {
		while ((((simStackAt(simSpillBase))->spilled))
		 && (simSpillBase <= simStackPtr)) {
			simSpillBase += 1;
		}
	}
	for (i = (methodOrBlockNumTemps + 1); i <= ((((simSpillBase - 1) < simStackPtr) ? (simSpillBase - 1) : simStackPtr)); i += 1) {
		assert((((simStackAt(i))->spilled)) == 1);
	}
	assert((simSpillBase > simStackPtr)
	 || ((((simStackAt(simSpillBase))->spilled)) == 0));
}

	/* StackToRegisterMappingCogit>>#ssPushAnnotatedConstant: */
static sqInt NoDbgRegParms
ssPushAnnotatedConstant(sqInt literal)
{
    AbstractInstruction *abstractInstruction;

	ssPushConstant(literal);
	/* begin annotateInstructionForBytecode */
	if (prevInstIsPCAnnotated()) {
		/* begin Nop */
		abstractInstruction = gen(Nop);
	}
	else {
		/* begin Label */
		abstractInstruction = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
	}
	(abstractInstruction->annotation = HasBytecodePC);
	return 0;
}

	/* StackToRegisterMappingCogit>>#ssPushBase:offset: */
static sqInt NoDbgRegParms
ssPushBaseoffset(sqInt reg, sqInt offset)
{
    CogSimStackEntry * cascade0;
    sqInt i;

	ssPush(1);
	cascade0 = ssTop();
	(cascade0->type = SSBaseOffset);
	(cascade0->spilled = 0);
	(cascade0->registerr = reg);
	(cascade0->offset = offset);
	(cascade0->bcptr = bytecodePC);
	/* begin updateSimSpillBase */
	assert(((simSpillBase > methodOrBlockNumTemps)
	 && (simStackPtr >= methodOrBlockNumTemps))
	 || (maybeCompilingFirstPassOfBlockWithInitialPushNil()));
	if (simSpillBase > simStackPtr) {
		simSpillBase = simStackPtr + 1;
		while (((simSpillBase - 1) > methodOrBlockNumTemps)
		 && (!(((simStackAt(simSpillBase - 1))->spilled)))) {
			simSpillBase -= 1;
		}
	}
	else {
		while ((((simStackAt(simSpillBase))->spilled))
		 && (simSpillBase <= simStackPtr)) {
			simSpillBase += 1;
		}
	}
	for (i = (methodOrBlockNumTemps + 1); i <= ((((simSpillBase - 1) < simStackPtr) ? (simSpillBase - 1) : simStackPtr)); i += 1) {
		assert((((simStackAt(i))->spilled)) == 1);
	}
	assert((simSpillBase > simStackPtr)
	 || ((((simStackAt(simSpillBase))->spilled)) == 0));
	return 0;
}

	/* StackToRegisterMappingCogit>>#ssPushConstant: */
static sqInt NoDbgRegParms
ssPushConstant(sqInt literal)
{
    CogSimStackEntry * cascade0;
    sqInt i;

	ssPush(1);
	cascade0 = ssTop();
	(cascade0->type = SSConstant);
	(cascade0->spilled = 0);
	(cascade0->constant = literal);
	(cascade0->bcptr = bytecodePC);
	/* begin updateSimSpillBase */
	assert(((simSpillBase > methodOrBlockNumTemps)
	 && (simStackPtr >= methodOrBlockNumTemps))
	 || (maybeCompilingFirstPassOfBlockWithInitialPushNil()));
	if (simSpillBase > simStackPtr) {
		simSpillBase = simStackPtr + 1;
		while (((simSpillBase - 1) > methodOrBlockNumTemps)
		 && (!(((simStackAt(simSpillBase - 1))->spilled)))) {
			simSpillBase -= 1;
		}
	}
	else {
		while ((((simStackAt(simSpillBase))->spilled))
		 && (simSpillBase <= simStackPtr)) {
			simSpillBase += 1;
		}
	}
	for (i = (methodOrBlockNumTemps + 1); i <= ((((simSpillBase - 1) < simStackPtr) ? (simSpillBase - 1) : simStackPtr)); i += 1) {
		assert((((simStackAt(i))->spilled)) == 1);
	}
	assert((simSpillBase > simStackPtr)
	 || ((((simStackAt(simSpillBase))->spilled)) == 0));
	return 0;
}

	/* StackToRegisterMappingCogit>>#ssPushDesc: */
static sqInt NoDbgRegParms
ssPushDesc(SimStackEntry simStackEntry)
{
    sqInt i;

	if (((simStackEntry.type)) == SSSpill) {
		(simStackEntry.type = SSBaseOffset);
	}
	(simStackEntry.spilled = 0);
	(simStackEntry.bcptr = bytecodePC);
	simStack[(simStackPtr += 1)] = simStackEntry;
	/* begin updateSimSpillBase */
	assert(((simSpillBase > methodOrBlockNumTemps)
	 && (simStackPtr >= methodOrBlockNumTemps))
	 || (maybeCompilingFirstPassOfBlockWithInitialPushNil()));
	if (simSpillBase > simStackPtr) {
		simSpillBase = simStackPtr + 1;
		while (((simSpillBase - 1) > methodOrBlockNumTemps)
		 && (!(((simStackAt(simSpillBase - 1))->spilled)))) {
			simSpillBase -= 1;
		}
	}
	else {
		while ((((simStackAt(simSpillBase))->spilled))
		 && (simSpillBase <= simStackPtr)) {
			simSpillBase += 1;
		}
	}
	for (i = (methodOrBlockNumTemps + 1); i <= ((((simSpillBase - 1) < simStackPtr) ? (simSpillBase - 1) : simStackPtr)); i += 1) {
		assert((((simStackAt(i))->spilled)) == 1);
	}
	assert((simSpillBase > simStackPtr)
	 || ((((simStackAt(simSpillBase))->spilled)) == 0));
	return 0;
}

	/* StackToRegisterMappingCogit>>#ssPushRegister: */
static sqInt NoDbgRegParms
ssPushRegister(sqInt reg)
{
    CogSimStackEntry * cascade0;
    sqInt i;

	ssPush(1);
	cascade0 = ssTop();
	(cascade0->type = SSRegister);
	(cascade0->spilled = 0);
	(cascade0->registerr = reg);
	(cascade0->bcptr = bytecodePC);
	/* begin updateSimSpillBase */
	assert(((simSpillBase > methodOrBlockNumTemps)
	 && (simStackPtr >= methodOrBlockNumTemps))
	 || (maybeCompilingFirstPassOfBlockWithInitialPushNil()));
	if (simSpillBase > simStackPtr) {
		simSpillBase = simStackPtr + 1;
		while (((simSpillBase - 1) > methodOrBlockNumTemps)
		 && (!(((simStackAt(simSpillBase - 1))->spilled)))) {
			simSpillBase -= 1;
		}
	}
	else {
		while ((((simStackAt(simSpillBase))->spilled))
		 && (simSpillBase <= simStackPtr)) {
			simSpillBase += 1;
		}
	}
	for (i = (methodOrBlockNumTemps + 1); i <= ((((simSpillBase - 1) < simStackPtr) ? (simSpillBase - 1) : simStackPtr)); i += 1) {
		assert((((simStackAt(i))->spilled)) == 1);
	}
	assert((simSpillBase > simStackPtr)
	 || ((((simStackAt(simSpillBase))->spilled)) == 0));
	return 0;
}

	/* StackToRegisterMappingCogit>>#ssPush: */
static void NoDbgRegParms
ssPush(sqInt n)
{
	simStackPtr += n;
}

	/* StackToRegisterMappingCogit>>#ssSelfDescriptor */
static SimStackEntry
ssSelfDescriptor(void)
{
	return simStack[0];
}


/*	In addition to ssStorePop:toReg:, if this is a store and not
	a popInto I change the simulated stack to use the register 
	for the top value */

	/* StackToRegisterMappingCogit>>#ssStoreAndReplacePop:toReg: */
static void NoDbgRegParms
ssStoreAndReplacePoptoReg(sqInt popBoolean, sqInt reg)
{
    char topSpilled;

	topSpilled = ((ssTop())->spilled);
	ssStorePoptoReg(popBoolean
	 || (topSpilled), reg);
	if (!popBoolean) {
		if (!topSpilled) {
			ssPop(1);
		}
		ssPushRegister(reg);
	}
}


/*	Store or pop the top simulated stack entry to a register.
	Use preferredReg if the entry is not itself a register.
	Answer the actual register the result ends up in. */

	/* StackToRegisterMappingCogit>>#ssStorePop:toPreferredReg: */
static sqInt NoDbgRegParms
ssStorePoptoPreferredReg(sqInt popBoolean, sqInt preferredReg)
{
    sqInt actualReg;

	actualReg = preferredReg;
	if ((((ssTop())->type)) == SSRegister) {
		assert(!(((ssTop())->spilled)));
		actualReg = ((ssTop())->registerr);
	}
	ssStorePoptoReg(popBoolean, actualReg);
	return actualReg;
}


/*	Store or pop the top simulated stack entry to a register.
	N.B.: popToReg: and storeToReg: does not generate anything if 
	it moves a register to the same register. */

	/* StackToRegisterMappingCogit>>#ssStorePop:toReg: */
static void NoDbgRegParms
ssStorePoptoReg(sqInt popBoolean, sqInt reg)
{
	if (popBoolean) {
		popToReg(ssTop(), reg);
		ssPop(1);
	}
	else {
		storeToReg(ssTop(), reg);
	}
}

	/* StackToRegisterMappingCogit>>#ssTop */
static CogSimStackEntry *
ssTop(void)
{
	return simStackAt(simStackPtr);
}

	/* StackToRegisterMappingCogit>>#ssValue: */
static CogSimStackEntry * NoDbgRegParms
ssValue(sqInt n)
{
	return simStackAt(simStackPtr - n);
}

	/* StackToRegisterMappingCogit>>#stackEntryIsBoolean: */
static sqInt NoDbgRegParms
stackEntryIsBoolean(CogSimStackEntry *simStackEntry)
{
	return (((simStackEntry->type)) == SSConstant)
	 && ((((simStackEntry->constant)) == (trueObject()))
	 || (((simStackEntry->constant)) == (falseObject())));
}


/*	Answer if the stack is valid up to, but not including, simSpillBase. */

	/* StackToRegisterMappingCogit>>#tempsValidAndVolatileEntriesSpilled */
static sqInt
tempsValidAndVolatileEntriesSpilled(void)
{
    sqInt culprit;
    sqInt i;

	culprit = 0;
	for (i = 1; i <= methodOrBlockNumTemps; i += 1) {
		if (!(((((simStackAt(i))->type)) == SSBaseOffset)
			 || (maybeCompilingFirstPassOfBlockWithInitialPushNil()))) {
			if (!(culprit)) {
				culprit = i;
			}
			return 0;
		}
	}
	for (i = (methodOrBlockNumTemps + 1); i < simSpillBase; i += 1) {
		if (!(((simStackAt(i))->spilled))) {
			if (!(culprit)) {
				culprit = i;
			}
			return 0;
		}
	}
	return 1;
}


/*	If the sequence of bytecodes is
	push: (Array new: 1)
	popIntoTemp: tempIndex
	pushConstant: const or pushTemp: n
	popIntoTemp: 0 inVectorAt: tempIndex
	collapse this into
	tempAt: tempIndex put: {const or temp}
	and answer true, otherwise answer false.
	One might think that we should look for a sequence of more than
	one pushes and pops but this is extremely rare.
	Exclude pushRcvr: n to avoid potential complications with context inst
	vars.  */

	/* StackToRegisterMappingCogit>>#tryCollapseTempVectorInitializationOfSize: */
static sqInt NoDbgRegParms
tryCollapseTempVectorInitializationOfSize(sqInt slots)
{
    sqInt pc;
    sqInt pc1;
    sqInt pc2;
    BytecodeDescriptor *pushArrayDesc;
    BytecodeDescriptor *pushValueDesc;
    sqInt reg;
    sqInt remoteTempIndex;
    BytecodeDescriptor *storeArrayDesc;
    BytecodeDescriptor *storeValueDesc;
    sqInt tempIndex;

	if (slots != 1) {
		return 0;
	}
	/* begin generatorForPC: */
	pushArrayDesc = generatorAt(bytecodeSetOffset + (fetchByteofObject(bytecodePC, methodObj)));
	assert(((pushArrayDesc->generator)) == genPushNewArrayBytecode);
	/* begin generatorForPC: */
	pc = bytecodePC + ((pushArrayDesc->numBytes));
	storeArrayDesc = generatorAt(bytecodeSetOffset + (fetchByteofObject(pc, methodObj)));
	if (((storeArrayDesc->generator)) == genStoreAndPopTemporaryVariableBytecode) {
		tempIndex = (fetchByteofObject(bytecodePC + ((pushArrayDesc->numBytes)), methodObj)) & 7;
	}
	else {
		if (!(((storeArrayDesc->generator)) == genLongStoreAndPopTemporaryVariableBytecode)) {
			return 0;
		}
		tempIndex = fetchByteofObject((bytecodePC + ((pushArrayDesc->numBytes))) + 1, methodObj);
	}
	/* begin generatorForPC: */
	pc1 = (bytecodePC + ((pushArrayDesc->numBytes))) + ((storeArrayDesc->numBytes));
	pushValueDesc = generatorAt(bytecodeSetOffset + (fetchByteofObject(pc1, methodObj)));
	if (!((((pushValueDesc->generator)) == genPushLiteralConstantBytecode)
		 || ((((pushValueDesc->generator)) == genPushQuickIntegerConstantBytecode)
		 || (((pushValueDesc->generator)) == genPushTemporaryVariableBytecode)))) {
		return 0;
	}
	/* begin generatorForPC: */
	pc2 = ((bytecodePC + ((pushArrayDesc->numBytes))) + ((storeArrayDesc->numBytes))) + ((pushValueDesc->numBytes));
	storeValueDesc = generatorAt(bytecodeSetOffset + (fetchByteofObject(pc2, methodObj)));
	remoteTempIndex = fetchByteofObject((((bytecodePC + ((pushArrayDesc->numBytes))) + ((storeArrayDesc->numBytes))) + ((pushValueDesc->numBytes))) + 2, methodObj);
	if (!((((storeValueDesc->generator)) == genStoreAndPopRemoteTempLongBytecode)
		 && (tempIndex == remoteTempIndex))) {
		return 0;
	}
	genNewArrayOfSizeinitialized(1, 0);
	evaluateat(pushValueDesc, (bytecodePC + ((pushArrayDesc->numBytes))) + ((storeArrayDesc->numBytes)));
	reg = ssStorePoptoPreferredReg(1, TempReg);
	genStoreSourceRegslotIndexintoNewObjectInDestReg(reg, 0, ReceiverResultReg);
	ssPushRegister(ReceiverResultReg);
	evaluateat(storeArrayDesc, bytecodePC + ((pushArrayDesc->numBytes)));

	/* + pushArrayDesc numBytes this gets added by nextBytecodePCFor:at:exts:in: */
	bytecodePC = ((bytecodePC + ((storeArrayDesc->numBytes))) + ((pushValueDesc->numBytes))) + ((storeValueDesc->numBytes));
	return 1;
}

	/* StackToRegisterMappingCogit>>#violatesEnsureSpilledSpillAssert */
static sqInt
violatesEnsureSpilledSpillAssert(void)
{
	return 1;
}


/*	Used when ReceiverResultReg is allocated for other than simSelf, and
	there may be references to ReceiverResultReg which need to be spilled. */

	/* StackToRegisterMappingCogit>>#voidReceiverResultRegContainsSelf */
static void
voidReceiverResultRegContainsSelf(void)
{
    sqInt i;
    sqInt i1;
    sqInt spillIndex;

	/* begin voidReceiverOptStatus */
	((simSelf())->liveRegister = NoReg);
	spillIndex = 0;
	for (i = ((((methodOrBlockNumTemps + 1) < simSpillBase) ? simSpillBase : (methodOrBlockNumTemps + 1))); i <= simStackPtr; i += 1) {
		if ((registerOrNone(simStackAt(i))) == ReceiverResultReg) {
			spillIndex = i;
		}
	}
	if (spillIndex > 0) {
		/* begin ssFlushTo: */
		assert(tempsValidAndVolatileEntriesSpilled());
		if (simSpillBase <= spillIndex) {
			for (i1 = (((((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) < spillIndex) ? ((((((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) < simStackPtr) ? (((simSpillBase < (methodOrBlockNumTemps + 1)) ? (methodOrBlockNumTemps + 1) : simSpillBase)) : simStackPtr)) : spillIndex)); i1 <= spillIndex; i1 += 1) {
				assert(needsFrame);
				ensureSpilledAtfrom(simStackAt(i1), frameOffsetOfTemporary(i1 - 1), FPReg);
			}
			simSpillBase = spillIndex + 1;
		}
	}
}
