// File: /workspace/github_cpp_makefile_star2_O3/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 0x1c12f(%rip), %rsi     # 0x2a2f0
leaq 0x1c136(%rip), %rdx     # 0x2a2fe
leaq 0xc0(%rsp), %r14
movq %r14, %rdi
callq 0xfc2a
movq %r14, %rdi
callq 0xbaaa
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0xe1fd
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
movl $0x7, %esi
callq 0xc54c
leaq 0x2c35f(%rip), %rax     # 0x3a570
movq (%rax), %rdi
movl $0x7, %esi
callq 0xe8c9
movq %rbx, %rdi
movl $0x1e, %esi
callq 0xc54c
movq 0x8(%rbx), %rdi
callq 0x17fcc
cmpl $0x18, %eax
jne 0xe28e
leaq 0x2c330(%rip), %rax     # 0x3a570
movq (%rax), %r14
movq 0x8(%rbx), %rsi
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
callq 0x17fd0
movq %r14, %rdi
movq %r15, %rsi
callq 0x28e6e
movl %eax, %ebp
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe285
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %ebp
je 0xe4fb
movl $0x18, %edi
callq 0x8250
movq %rax, %r14
movq %rbx, %rdi
movl $0x18, %esi
callq 0xc54c
movq %r14, %rdi
movq %rax, %rsi
callq 0x19e48
movq %r14, 0x100(%rsp)
movq 0x8(%rbx), %rdi
callq 0x17fcc
movl $0x1, %r14d
cmpl $0x26, %eax
jne 0xe419
leaq 0x30(%rsp), %r15
movl $0x1, %r14d
leaq 0x20(%rsp), %r13
movq %rsp, %r12
movq %r15, 0x20(%rsp)
movq %r13, %rdi
leaq 0x1c025(%rip), %rsi     # 0x2a31a
leaq 0x1c037(%rip), %rdx     # 0x2a333
callq 0xfc2a
movq %r13, %rdi
callq 0xbaaa
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xe320
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
movl $0x26, %esi
callq 0xc54c
movq 0x8(%rbx), %rdi
callq 0x17fcc
cmpl $0x18, %eax
jne 0xe390
movq %r13, %rbp
leaq 0x2c22b(%rip), %rax     # 0x3a570
movq (%rax), %r15
movq 0x8(%rbx), %rsi
leaq 0x60(%rsp), %r13
movq %r13, %rdi
callq 0x17fd0
movq %r15, %rdi
movq %r13, %rsi
callq 0x28e6e
movl %eax, %r15d
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe383
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x8260
cmpl $-0x1, %r15d
movq %rbp, %r13
je 0xe4aa
movl $0x18, %edi
callq 0x8250
movq %rax, %r15
movq %rbx, %rdi
movl $0x18, %esi
callq 0xc54c
movq %r15, %rdi
movq %rax, %rsi
callq 0x19e48
movq %r15, 0x100(%rsp,%r14,8)
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
leaq 0x1bf4a(%rip), %rsi     # 0x2a31a
leaq 0x1bf5c(%rip), %rdx     # 0x2a333
callq 0xfc2a
movq %r12, %rdi
callq 0xbd0c
leaq 0x30(%rsp), %r15
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe404
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8260
movq 0x8(%rbx), %rdi
callq 0x17fcc
incq %r14
cmpl $0x26, %eax
je 0xe2e6
movq %rbx, %rdi
movl $0x1f, %esi
callq 0xc54c
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1beba(%rip), %rsi     # 0x2a2f0
leaq 0x1bec1(%rip), %rdx     # 0x2a2fe
leaq 0x40(%rsp), %rdi
callq 0xfc2a
leaq 0x40(%rsp), %rdi
callq 0xbd0c
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xe468
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x8260
movq %rbx, %rdi
movl $0x27, %esi
callq 0xc54c
movl $0xfb8, %edi            # imm = 0xFB8
callq 0x8250
movq %rax, %r15
leaq 0x100(%rsp), %rsi
movq %rax, %rdi
movl %r14d, %edx
callq 0x18aac
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 0x1be74(%rip), %rsi     # 0x2a334
leaq 0x1be8b(%rip), %rdx     # 0x2a352
leaq 0x80(%rsp), %rdi
callq 0xfc2a
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x174db
leaq 0x80(%rsp), %rdi
callq 0x8488
movl $0x1, %edi
callq 0x82e0
movq (%rbx), %rbx
leaq 0xb0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1bdee(%rip), %rsi     # 0x2a2ff
leaq 0x1be01(%rip), %rdx     # 0x2a319
leaq 0xa0(%rsp), %rdi
callq 0xfc2a
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x174db
leaq 0xa0(%rsp), %rdi
jmp 0xe4ec
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0xe65a
movq 0xb0(%rsp), %rsi
jmp 0xe645
jmp 0xe62a
movq %rax, %rbx
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe65a
movq 0xf0(%rsp), %rsi
jmp 0xe645
movq %rax, %rbx
movl $0xfb8, %esi            # imm = 0xFB8
jmp 0xe652
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xe65a
movq 0x50(%rsp), %rsi
jmp 0xe645
jmp 0xe62a
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0xe65a
movq 0xd0(%rsp), %rsi
jmp 0xe645
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0xe65a
movq 0x90(%rsp), %rsi
jmp 0xe645
movq %rax, %rbx
movl $0x18, %esi
movq %r14, %rdi
jmp 0xe655
jmp 0xe62a
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe65a
movq 0x70(%rsp), %rsi
jmp 0xe645
jmp 0xe62a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xe65a
movq 0x30(%rsp), %rsi
jmp 0xe645
movq %rax, %rbx
jmp 0xe65a
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe65a
movq 0x10(%rsp), %rsi
incq %rsi
jmp 0xe655
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0x8260
movq %rbx, %rdi
callq 0x8420