// File: /workspace/github_cpp_makefile_star2_O1/martinda3[P]Compiler/src/TCparser.cpp
// Function: toyc::TCparser::ReadStatement()
ASstatement* TCparser::ReadStatement() // WIP
	{
		// READ LPAREN ID { COMMA ID } RPAREN SEMICOLON
		enteringDEBUG("Read Statement");
        int loc;
		ASexpression* operand[MAX_STATEMENTS];
		accept(READ);
        enter_special_id(symTable,READ);
		accept(LPAREN);
        if (buff->getTokenType() == ID)
        {
            loc = symTable->find(buff->getLexeme());
            if (loc == -1)
            {
                reportSEMANTIC_ERROR(scanner,"variable not declared Read");
                exit(EXIT_FAILURE);
            }
        }
		operand[0] = new ASsimpleExpr(accept(ID));
		int i = 1;
		while (buff->getTokenType() == COMMA)
		{
			enteringDEBUG("Read Statement Additional");
			accept(COMMA);
            if (buff->getTokenType() == ID)
            {
                loc = symTable->find(buff->getLexeme());
                if (loc == -1)
                {
                    reportSEMANTIC_ERROR(scanner,"variable not declared add read");
                    exit(EXIT_FAILURE);
                }
            }
			operand[i] = new ASsimpleExpr(accept(ID));
			i++;
			exitingDEBUG("Read Statement Additional");
		}
		accept(RPAREN);
		exitingDEBUG("Read Statement");
		accept(SEMICOLON);
		return new ASreadState(operand, i);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10a8, %rsp           # imm = 0x10A8
movq %rdi, %rbx
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1c117(%rip), %rsi     # 0x2a2f0
leaq 0x1c11e(%rip), %rdx     # 0x2a2fe
leaq 0xc0(%rsp), %r14
movq %r14, %rdi
callq 0xfc42
movq %r14, %rdi
callq 0xbac6
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0xe215
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
movl $0x7, %esi
callq 0xc558
leaq 0x2c347(%rip), %rax     # 0x3a570
movq (%rax), %rdi
movl $0x7, %esi
callq 0xe8e1
movq %rbx, %rdi
movl $0x1e, %esi
callq 0xc558
movq 0x8(%rbx), %rdi
callq 0x179ac
cmpl $0x18, %eax
jne 0xe2a6
leaq 0x2c318(%rip), %rax     # 0x3a570
movq (%rax), %r14
movq 0x8(%rbx), %rsi
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
callq 0x179b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x28862
movl %eax, %ebp
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe29d
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %ebp
je 0xe513
movl $0x18, %edi
callq 0x8250
movq %rax, %r14
movq %rbx, %rdi
movl $0x18, %esi
callq 0xc558
movq %r14, %rdi
movq %rax, %rsi
callq 0x19820
movq %r14, 0x100(%rsp)
movq 0x8(%rbx), %rdi
callq 0x179ac
movl $0x1, %r14d
cmpl $0x26, %eax
jne 0xe431
leaq 0x30(%rsp), %r15
movl $0x1, %r14d
leaq 0x20(%rsp), %r13
movq %rsp, %r12
movq %r15, 0x20(%rsp)
movq %r13, %rdi
leaq 0x1c00d(%rip), %rsi     # 0x2a31a
leaq 0x1c01f(%rip), %rdx     # 0x2a333
callq 0xfc42
movq %r13, %rdi
callq 0xbac6
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xe338
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
movl $0x26, %esi
callq 0xc558
movq 0x8(%rbx), %rdi
callq 0x179ac
cmpl $0x18, %eax
jne 0xe3a8
movq %r13, %rbp
leaq 0x2c213(%rip), %rax     # 0x3a570
movq (%rax), %r15
movq 0x8(%rbx), %rsi
leaq 0x60(%rsp), %r13
movq %r13, %rdi
callq 0x179b0
movq %r15, %rdi
movq %r13, %rsi
callq 0x28862
movl %eax, %r15d
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe39b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %r15d
movq %rbp, %r13
je 0xe4c2
movl $0x18, %edi
callq 0x8250
movq %rax, %r15
movq %rbx, %rdi
movl $0x18, %esi
callq 0xc558
movq %r15, %rdi
movq %rax, %rsi
callq 0x19820
movq %r15, 0x100(%rsp,%r14,8)
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
leaq 0x1bf32(%rip), %rsi     # 0x2a31a
leaq 0x1bf44(%rip), %rdx     # 0x2a333
callq 0xfc42
movq %r12, %rdi
callq 0xbd28
leaq 0x30(%rsp), %r15
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe41c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8260
movq 0x8(%rbx), %rdi
callq 0x179ac
incq %r14
cmpl $0x26, %eax
je 0xe2fe
movq %rbx, %rdi
movl $0x1f, %esi
callq 0xc558
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1bea2(%rip), %rsi     # 0x2a2f0
leaq 0x1bea9(%rip), %rdx     # 0x2a2fe
leaq 0x40(%rsp), %rdi
callq 0xfc42
leaq 0x40(%rsp), %rdi
callq 0xbd28
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xe480
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
movl $0x27, %esi
callq 0xc558
movl $0xfb8, %edi            # imm = 0xFB8
callq 0x8250
movq %rax, %r15
leaq 0x100(%rsp), %rsi
movq %rax, %rdi
movl %r14d, %edx
callq 0x1848c
movq %r15, %rax
addq $0x10a8, %rsp           # imm = 0x10A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rbx
leaq 0x90(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1be5c(%rip), %rsi     # 0x2a334
leaq 0x1be73(%rip), %rdx     # 0x2a352
leaq 0x80(%rsp), %rdi
callq 0xfc42
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x16ebd
leaq 0x80(%rsp), %rdi
callq 0x8488
movl $0x1, %edi
callq 0x82e0
movq (%rbx), %rbx
leaq 0xb0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1bdd6(%rip), %rsi     # 0x2a2ff
leaq 0x1bde9(%rip), %rdx     # 0x2a319
leaq 0xa0(%rsp), %rdi
callq 0xfc42
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x16ebd
leaq 0xa0(%rsp), %rdi
jmp 0xe504
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0xe672
movq 0xb0(%rsp), %rsi
jmp 0xe65d
jmp 0xe642
movq %rax, %rbx
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe672
movq 0xf0(%rsp), %rsi
jmp 0xe65d
movq %rax, %rbx
movl $0xfb8, %esi            # imm = 0xFB8
jmp 0xe66a
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xe672
movq 0x50(%rsp), %rsi
jmp 0xe65d
jmp 0xe642
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0xe672
movq 0xd0(%rsp), %rsi
jmp 0xe65d
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0xe672
movq 0x90(%rsp), %rsi
jmp 0xe65d
movq %rax, %rbx
movl $0x18, %esi
movq %r14, %rdi
jmp 0xe66d
jmp 0xe642
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe672
movq 0x70(%rsp), %rsi
jmp 0xe65d
jmp 0xe642
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xe672
movq 0x30(%rsp), %rsi
jmp 0xe65d
movq %rax, %rbx
jmp 0xe672
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe672
movq 0x10(%rsp), %rsi
incq %rsi
jmp 0xe66d
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0x8260
movq %rbx, %rdi
callq 0x8420