// File: /workspace/github_cpp_makefile_star2_O2/AndrewAlbert[P]Compiler-Theory/SourceCode/codeGenerator.cpp
// Function: codeGenerator::WriteRuntime()
void codeGenerator::WriteRuntime(){
	fprintf( oFile, "\nGETBOOL:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   iReg[0] = getBool();\n");
	fprintf( oFile, "   MM[FP_reg + 2] = iReg[0];\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nGETINTEGER:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   iReg[0] = getInteger();\n");
	fprintf( oFile, "   MM[FP_reg + 2] = iReg[0];\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nGETCHAR:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   iReg[0] = getChar();\n");
	fprintf( oFile, "   MM[FP_reg + 2] = iReg[0];\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nGETFLOAT:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   fReg[0] = getFloat();\n");
	fprintf( oFile, "   memcpy(&MM[FP_reg + 2], &iReg[0], sizeof(int) );\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nGETSTRING:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   iReg[0] = getString(buffer);\n");
	fprintf( oFile, "   HP_reg = HP_reg - iReg[0];\n");
	fprintf( oFile, "   MM[FP_reg + 2] = HP_reg;\n");
	fprintf( oFile, "   strcpy((char*)&MM[HP_reg], buffer);\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nPUTBOOL:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   iReg[0] = MM[FP_reg + 2];\n");
	fprintf( oFile, "   putBool(iReg[0]);\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nPUTINTEGER:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   iReg[0] = MM[FP_reg + 2];\n");
	fprintf( oFile, "   putInteger(iReg[0]);\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nPUTCHAR:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   iReg[0] = MM[FP_reg + 2];\n");
	fprintf( oFile, "   putChar(iReg[0]);\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nPUTFLOAT:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   memcpy(&fReg[0],&MM[FP_reg + 2],sizeof(int));\n");
	fprintf( oFile, "   putFloat(fReg[0]);\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");

	fprintf( oFile, "\nPUTSTRING:\n");
	fprintf( oFile, "   FP_reg = SP_reg;\n");
	fprintf( oFile, "   SP_reg = FP_reg + 3;\n");
	fprintf( oFile, "   iReg[0] = MM[FP_reg + 2];\n");
	fprintf( oFile, "   putString((char*)&MM[iReg[0]]);\n");
	fprintf( oFile, "   TP_reg = MM[FP_reg + 1];\n");
	fprintf( oFile, "   FP_reg = MM[FP_reg];\n");
	fprintf( oFile, "   goto BRANCH_TABLE;\n");
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x308(%rdi), %rcx
leaq 0x711f(%rip), %rdi      # 0x13137
pushq $0xa
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6fcd(%rip), %rdi      # 0x13002
pushq $0x14
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x70f4(%rip), %rbp      # 0x13142
pushq $0x18
popq %r15
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x70ed(%rip), %rdi      # 0x1315b
movq %r15, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x70ed(%rip), %r12      # 0x13174
pushq $0x1d
popq %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6fed(%rip), %r13      # 0x13090
pushq $0x1c
popq %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6fee(%rip), %rdi      # 0x130ad
movq %r15, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6fee(%rip), %rdi      # 0x130c6
pushq $0x16
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x70a1(%rip), %rdi      # 0x13192
pushq $0xd
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6ef8(%rip), %rdi      # 0x13002
pushq $0x14
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %rbp, %rdi
movq %r15, %rsi
movq %r15, %rbp
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x7065(%rip), %rdi      # 0x131a0
pushq $0x1b
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r12, %rdi
pushq $0x1d
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r13, %rdi
pushq $0x1c
popq %r12
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6f2b(%rip), %r13      # 0x130ad
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6f28(%rip), %r15      # 0x130c6
movq %r15, %rdi
pushq $0x16
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x7002(%rip), %rdi      # 0x131bc
pushq $0xa
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6e2f(%rip), %rdi      # 0x13002
pushq $0x14
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6f56(%rip), %rdi      # 0x13142
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6fc2(%rip), %rdi      # 0x131c7
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6f56(%rip), %rdi      # 0x13174
pushq $0x1d
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6e59(%rip), %rdi      # 0x13090
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r15, %rdi
pushq $0x16
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6f66(%rip), %rdi      # 0x131e0
pushq $0xb
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6d6f(%rip), %rdi      # 0x13002
pushq $0x14
popq %rsi
movq %rsi, %r12
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6e93(%rip), %rdi      # 0x13142
movq %rdi, %r13
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6f21(%rip), %rdi      # 0x131ec
pushq $0x19
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6f22(%rip), %rdi      # 0x13206
pushq $0x34
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6d93(%rip), %r15      # 0x13090
movq %r15, %rdi
pushq $0x1c
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6d94(%rip), %rdi      # 0x130ad
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6d94(%rip), %rdi      # 0x130c6
pushq $0x16
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6ef0(%rip), %rdi      # 0x1323b
pushq $0xc
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6c9e(%rip), %rdi      # 0x13002
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r13, %rdi
movq %rbp, %rsi
movq %rbp, %r12
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6eb3(%rip), %rdi      # 0x13248
pushq $0x20
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6ebb(%rip), %rdi      # 0x13269
pushq $0x1e
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6ec1(%rip), %rdi      # 0x13288
pushq $0x1c
popq %r13
movq %r13, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6ec1(%rip), %rdi      # 0x132a5
pushq $0x27
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r15, %rdi
movq %r15, %rbp
movq %r13, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6c98(%rip), %rdi      # 0x130ad
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6c98(%rip), %rdi      # 0x130c6
pushq $0x16
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6e86(%rip), %rdi      # 0x132cd
pushq $0xa
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6ba2(%rip), %r13      # 0x13002
movq %r13, %rdi
pushq $0x14
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6cc6(%rip), %r15      # 0x13142
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6e40(%rip), %rdi      # 0x132d8
pushq $0x1d
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6e45(%rip), %rdi      # 0x132f6
pushq $0x15
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %rbp, %rdi
pushq $0x1c
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6bce(%rip), %rdi      # 0x130ad
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6bce(%rip), %rdi      # 0x130c6
pushq $0x16
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6dfb(%rip), %rdi      # 0x1330c
pushq $0xd
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r13, %rdi
pushq $0x14
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6d84(%rip), %r13      # 0x132d8
movq %r13, %rdi
pushq $0x1d
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6daa(%rip), %rdi      # 0x1331a
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %rbp, %rdi
pushq $0x1c
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6b0f(%rip), %rdi      # 0x130ad
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6b0f(%rip), %rdi      # 0x130c6
pushq $0x16
popq %rbp
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6d60(%rip), %rdi      # 0x13333
pushq $0xa
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6a16(%rip), %rdi      # 0x13002
pushq $0x14
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r13, %rdi
pushq $0x1d
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6d0f(%rip), %rdi      # 0x1333e
pushq $0x15
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6a48(%rip), %r15      # 0x13090
movq %r15, %rdi
pushq $0x1c
popq %r13
movq %r13, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6a45(%rip), %rdi      # 0x130ad
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6a45(%rip), %rdi      # 0x130c6
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6cba(%rip), %rdi      # 0x13354
pushq $0xb
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x694f(%rip), %rdi      # 0x13002
pushq $0x14
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6a76(%rip), %rdi      # 0x13142
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6c7b(%rip), %rdi      # 0x13360
pushq $0x31
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6c94(%rip), %rdi      # 0x13392
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6981(%rip), %rdi      # 0x130ad
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6981(%rip), %rdi      # 0x130c6
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6c4b(%rip), %rdi      # 0x133a9
pushq $0xc
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x688b(%rip), %rdi      # 0x13002
pushq $0x14
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x69b2(%rip), %rdi      # 0x13142
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6b2f(%rip), %rdi      # 0x132d8
pushq $0x1d
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x6bf4(%rip), %rdi      # 0x133b6
pushq $0x23
popq %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x68bd(%rip), %rdi      # 0x130ad
movq %r12, %rsi
movq %r14, %rdx
callq 0x2380
movq 0x308(%rbx), %rcx
leaq 0x68bd(%rip), %rdi      # 0x130c6
movq %rbp, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2380