// File: /workspace/github_cpp_makefile_star2_O1/AndrewAlbert[P]Compiler-Theory/SourceCode/codeGenerator.cpp
// Function: codeGenerator::popStack[abi:cxx11](char, int)
string codeGenerator::popStack( char stackID, int type ){
	if( !ShouldGenerate() ) return "";
	string returnStr;
	switch( stackID ){
		case 'L':
			if(leftStack.size() == 0){
				cout << "LEFT STACK EMPTY!\n";
				return "";
			}
			returnStr = leftStack.top();
			leftStack.pop();
			return returnStr;
		case 'E':
			if(exprStack.size() == 0){
				cout << "EXPR STACK EMPTY!\n";
				return "";
			}
			returnStr = exprStack.top();
			exprStack.pop();
			if( type == TYPE_FLOAT) freg_in_use--;
			else ireg_in_use--;
			return returnStr;
		case 'R':
			if(rightStack.size() == 0){
				cout << "RIGHT STACK EMPTY!\n";
				return "";
			}
			returnStr = rightStack.top();
			rightStack.pop();
			return returnStr;
		default:
			cout << "INVALID STACK ID!\n";
			return "invalid stack id";
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x330(%rsi)
je 0x11c1d
movq %rsi, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movsbl %dl, %eax
cmpl $0x45, %eax
je 0x11cc8
cmpl $0x52, %eax
je 0x11c3b
cmpl $0x4c, %eax
jne 0x11d57
movq 0x218(%r14), %rax
movq %rax, %rdx
subq 0x1f8(%r14), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rax
adcq $-0x1, %rdx
shlq $0x4, %rdx
movq 0x1f0(%r14), %rdi
movq 0x200(%r14), %rsi
movq 0x208(%r14), %rcx
movq %rsi, %r8
subq %rcx, %r8
sarq $0x5, %r8
addq %rdx, %r8
subq 0x1e0(%r14), %rdi
sarq $0x5, %rdi
addq %r8, %rdi
jne 0x11df3
movq 0x103ea(%rip), %rdi     # 0x21fd8
leaq 0x919d(%rip), %rsi      # 0x1ad92
movl $0x12, %edx
callq 0x2230
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8d50(%rip), %rdx      # 0x1a95d
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x3c34
jmp 0x11e60
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8d32(%rip), %rdx      # 0x1a95d
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x3c34
jmp 0x11e77
movq 0x1c8(%r14), %rax
movq %rax, %rdx
subq 0x1a8(%r14), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rax
adcq $-0x1, %rdx
shlq $0x4, %rdx
movq 0x1a0(%r14), %rdi
movq 0x1b0(%r14), %rsi
movq 0x1b8(%r14), %rcx
movq %rsi, %r8
subq %rcx, %r8
sarq $0x5, %r8
addq %rdx, %r8
subq 0x190(%r14), %rdi
sarq $0x5, %rdi
addq %r8, %rdi
jne 0x11d91
movq 0x1033f(%rip), %rdi     # 0x21fd8
leaq 0x9118(%rip), %rsi      # 0x1adb8
movl $0x13, %edx
callq 0x2230
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8ca5(%rip), %rdx      # 0x1a95d
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x3c34
jmp 0x11e60
movl %ecx, %ebp
movq 0x178(%r14), %rax
movq %rax, %rdx
subq 0x158(%r14), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rax
adcq $-0x1, %rdx
shlq $0x4, %rdx
movq 0x150(%r14), %rdi
movq 0x160(%r14), %rsi
movq 0x168(%r14), %rcx
movq %rsi, %r8
subq %rcx, %r8
sarq $0x5, %r8
addq %rdx, %r8
subq 0x140(%r14), %rdi
sarq $0x5, %rdi
addq %r8, %rdi
jne 0x11db6
movq 0x102b0(%rip), %rdi     # 0x21fd8
leaq 0x9076(%rip), %rsi      # 0x1ada5
movl $0x12, %edx
callq 0x2230
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8c16(%rip), %rdx      # 0x1a95d
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x3c34
jmp 0x11e60
movq 0x1027a(%rip), %rdi     # 0x21fd8
leaq 0x9067(%rip), %rsi      # 0x1adcc
movl $0x12, %edx
callq 0x2230
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x9062(%rip), %rsi      # 0x1addf
leaq 0x906b(%rip), %rdx      # 0x1adef
movq %rbx, %rdi
callq 0x3c34
jmp 0x11e60
cmpq %rcx, %rsi
jne 0x11d9f
movl $0x200, %esi            # imm = 0x200
addq -0x8(%rax), %rsi
addq $-0x20, %rsi
leaq 0x8(%rsp), %rdi
callq 0x2120
addq $0x180, %r14            # imm = 0x180
jmp 0x11e16
cmpq %rcx, %rsi
jne 0x11dc4
movl $0x200, %esi            # imm = 0x200
addq -0x8(%rax), %rsi
addq $-0x20, %rsi
leaq 0x8(%rsp), %rdi
callq 0x2120
leaq 0x130(%r14), %rdi
callq 0x1781e
cmpl $0x10b, %ebp            # imm = 0x10B
jne 0x11e85
decl 0x124(%r14)
jmp 0x11e1e
cmpq %rcx, %rsi
jne 0x11e01
movl $0x200, %esi            # imm = 0x200
addq -0x8(%rax), %rsi
addq $-0x20, %rsi
leaq 0x8(%rsp), %rdi
callq 0x2120
addq $0x1d0, %r14            # imm = 0x1D0
movq %r14, %rdi
callq 0x1781e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rcx
cmpq %r15, %rcx
je 0x11e3d
movq %rcx, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x11e44
movups (%r15), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r15, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11e77
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
decl 0x120(%r14)
jmp 0x11e1e
jmp 0x11e96
jmp 0x11e96
jmp 0x11e96
jmp 0x11e96
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11eb0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2330