// File: /workspace/github_cpp_makefile_star2_O2/martinda3[P]Compiler/src/TCparser.cpp
// Function: toyc::TCparser::Primary()
ASexpression* TCparser::Primary() // DONE with AS
	{
		/* Primary --> ID [ FunctionCall ]
					 | NUMBER
					 | STRING
					 | CHARLITERAL
					 | LPAREN Expression RPAREN
					 | MINUS | NOT Primary */
		enteringDEBUG("Primary");
		ASexpression* operand = NULL;
		TCtoken* t = buff;
		int loc;
		int tok = buff->getTokenType();
		switch (tok)
		{
			case ID:
				operand = new ASsimpleExpr(t);
                if (buff->getTokenType() == ID)
                {
                    loc = symTable->find(buff->getLexeme());
                    if (loc == -1)
                    {
                        reportSEMANTIC_ERROR(scanner,"variable not declared Primanry");
                        exit(EXIT_FAILURE);
                    }
                }
                accept(ID);
                if (buff->getTokenType() == LPAREN){
                    try
                    {
                        ASexpression* arr[] = { FunctionCall() };
                        operand = new ASfuncCall(operand, arr, 1);
                    }
                    catch (int t) { break; }
                    break;
                }
				break;

			case NUMBER:
				operand = new ASsimpleExpr(t);
				accept(NUMBER);
				break;

			case STRING:
				operand = new ASsimpleExpr(t);
				accept(STRING);
				break;

			case CHARLITERAL:
				operand = new ASsimpleExpr(t);
				accept(CHARLITERAL);
				break;

			case LPAREN:
				enteringDEBUG("Primary Additional");
				accept(LPAREN);
				operand = Expression();
				exitingDEBUG("Primary Additional");
				accept(RPAREN);
				break;

			case MINUS:
				enteringDEBUG("Primary Additional");
				accept(MINUS);
				operand = new ASminus(Primary());
				exitingDEBUG("Primary Additional");
				break;

			case NOTEQUAL:
				enteringDEBUG("Primary Additional");
				accept(NOTEQUAL);
				operand = new ASnot(Primary());
				exitingDEBUG("Primary Additional");
				break;

			default:
				throw tok;
		}
		exitingDEBUG("Primary");
		return operand;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rdi, %rbx
leaq 0x10223(%rip), %rsi     # 0x1d404
leaq 0x110(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0x110(%rsp), %rdi
callq 0xa70a
leaq 0x110(%rsp), %rdi
callq 0x8478
movq 0x8(%rbx), %r12
movq %r12, %rdi
callq 0x119f0
movl %eax, %r14d
leal -0x10(%r14), %eax
cmpl $0xe, %eax
ja 0xd510
leaq 0xfe70(%rip), %rcx      # 0x1d0a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x18
popq %rdi
callq 0x8250
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x12b44
pushq $0x10
jmp 0xd4ca
pushq $0x18
popq %rdi
callq 0x8250
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x12b44
pushq $0x19
jmp 0xd4ca
leaq 0x101b1(%rip), %rsi     # 0x1d42b
leaq 0x90(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0x90(%rsp), %rdi
callq 0xa70a
leaq 0x90(%rsp), %rdi
callq 0x8478
pushq $0x11
popq %rsi
movq %rbx, %rdi
callq 0xaeb8
pushq $0x18
popq %rdi
callq 0x8250
movq %rax, %r14
movq %rbx, %rdi
callq 0xd1c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x1b9d8
leaq 0x10155(%rip), %rsi     # 0x1d42b
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0x70(%rsp), %rdi
callq 0xa888
leaq 0x70(%rsp), %rdi
jmp 0xd38e
pushq $0x18
popq %rdi
callq 0x8250
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x12b44
pushq $0x1a
jmp 0xd4ca
leaq 0x1010e(%rip), %rsi     # 0x1d42b
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0x50(%rsp), %rdi
callq 0xa70a
leaq 0x50(%rsp), %rdi
callq 0x8478
pushq $0x17
popq %rsi
movq %rbx, %rdi
callq 0xaeb8
pushq $0x18
popq %rdi
callq 0x8250
movq %rax, %r14
movq %rbx, %rdi
callq 0xd1c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x19a24
leaq 0x100bb(%rip), %rsi     # 0x1d42b
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0x30(%rsp), %rdi
callq 0xa888
leaq 0x30(%rsp), %rdi
callq 0x8478
jmp 0xd4d3
pushq $0x18
popq %rdi
callq 0x8250
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x12b44
movq 0x8(%rbx), %rdi
callq 0x119f0
cmpl $0x18, %eax
jne 0xd3fd
leaq 0x201a5(%rip), %rax     # 0x2d568
movq (%rax), %r14
movq 0x8(%rbx), %rsi
leaq 0x130(%rsp), %r12
movq %r12, %rdi
callq 0x119f4
movq %r14, %rdi
movq %r12, %rsi
callq 0x1bc3c
movl %eax, %ebp
leaq 0x130(%rsp), %rdi
callq 0x8478
cmpl $-0x1, %ebp
je 0xd52c
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0xaeb8
movq 0x8(%rbx), %rdi
callq 0x119f0
cmpl $0x1e, %eax
jne 0xd5f8
movq %rbx, %rdi
callq 0xd678
movq %rax, 0x8(%rsp)
movl $0xfc0, %edi            # imm = 0xFC0
callq 0x8250
movq %rax, %r14
leaq 0x8(%rsp), %rdx
pushq $0x1
popq %rcx
movq %rax, %rdi
movq %r15, %rsi
callq 0x134e4
jmp 0xd4d3
leaq 0xffd8(%rip), %rsi      # 0x1d42b
leaq 0xd0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0xd0(%rsp), %rdi
callq 0xa70a
leaq 0xd0(%rsp), %rdi
callq 0x8478
pushq $0x1e
popq %rsi
movq %rbx, %rdi
callq 0xaeb8
movq %rbx, %rdi
callq 0xbbaa
movq %rax, %r14
leaq 0xff8f(%rip), %rsi      # 0x1d42b
leaq 0xb0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0xb0(%rsp), %rdi
callq 0xa888
leaq 0xb0(%rsp), %rdi
callq 0x8478
pushq $0x1f
popq %rsi
movq %rbx, %rdi
callq 0xaeb8
leaq 0xff2a(%rip), %rsi      # 0x1d404
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0x10(%rsp), %rdi
callq 0xa888
leaq 0x10(%rsp), %rdi
callq 0x8478
movq %r14, %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x8140
movl %r14d, (%rax)
movq 0x1fa7e(%rip), %rsi     # 0x2cfa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x83e0
movq (%rbx), %rbx
leaq 0xfed6(%rip), %rsi      # 0x1d40c
leaq 0xf0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xd770
leaq 0xf0(%rsp), %rsi
movq %rbx, %rdi
callq 0x11393
leaq 0xf0(%rsp), %rdi
callq 0x8478
pushq $0x1
popq %rdi
callq 0x82c0
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
jmp 0xd666
jmp 0xd66d
movq %rdx, %r12
movq %rax, %rbx
movl $0xfc0, %esi            # imm = 0xFC0
movq %r14, %rdi
callq 0x8260
jmp 0xd5e1
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
jmp 0xd666
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0xd666
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0xd666
jmp 0xd66d
jmp 0xd66d
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
jmp 0xd666
movq %rdx, %r12
movq %rax, %rbx
cmpl $0x1, %r12d
jne 0xd670
movq %rbx, %rdi
callq 0x80e0
callq 0x83b0
movq %r15, %r14
jmp 0xd4d3
jmp 0xd66d
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
jmp 0xd666
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0xd666
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0xd666
jmp 0xd66d
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r15, %rdi
jmp 0xd648
jmp 0xd63f
jmp 0xd66d
jmp 0xd63f
jmp 0xd66d
jmp 0xd63f
jmp 0xd63f
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x8260
jmp 0xd670
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0xd666
jmp 0xd66d
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x8478
jmp 0xd670
movq %rax, %rbx
movq %rbx, %rdi
callq 0x8400