// File: /workspace/github_cpp_makefile_star2_O2/sighingnow[P]compile-pascal/pl0_tac_gen.cpp
// Function: pl0_tac_read_stmt(pl0_ast_read_stmt const*)
void pl0_tac_read_stmt(pl0_ast_read_stmt const *stmt) {
    cout << __func__;
    for (auto && id: stmt->ids) {
        // validate.
        variable var;
        if (vartb.find(id->id, true, var) == false) {
            pl0_ast_error(id->loc, string("use of undeclared variable ") + "\"" + id->id + "\"");
        }
        if (var.len != -1) {
            pl0_ast_error(id->loc, string("expected an non-array identifier ") + "\"" + id->id + "\"");
        }
        irb.emit("=", new Value(id->id, var.dt), new Value(0, var.dt));
        irb.emit("read", new Value(id->id, var.dt));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, %rbx
movq 0x4842e(%rip), %rdi     # 0x8afd8
leaq 0x1898e(%rip), %rsi     # 0x5b53f
callq 0x5250
movq 0x18(%rbx), %r12
movq 0x20(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x150(%rsp), %rbx
leaq 0x130(%rsp), %r15
cmpq 0x8(%rsp), %r12
je 0x42edc
movq %rbx, %rdi
callq 0x472c8
movq %r12, %r14
movq (%r12), %rsi
addq $0x8, %rsi
leaq 0x49a20(%rip), %rdi     # 0x8c618
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x47682
testb %al, %al
leaq 0xf0(%rsp), %rbx
jne 0x42ca4
movq (%r14), %rax
movq (%rax), %r13
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0x17f92(%rip), %rsi     # 0x5abba
leaq 0x7(%rsp), %rdx
callq 0xfa26
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x183df(%rip), %rdx     # 0x5b023
callq 0xfd14
movq (%r14), %rdx
addq $0x8, %rdx
movq %r15, %rdi
movq %rbp, %rsi
callq 0xfda4
leaq 0x1d8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
leaq 0x183b3(%rip), %rdx     # 0x5b023
callq 0xfd14
movq %r13, %rdi
movq %r12, %rsi
callq 0x3da88
movq %r12, %rdi
callq 0x5120
movq %r15, %rdi
callq 0x5120
leaq 0x30(%rsp), %rdi
callq 0x5120
leaq 0x10(%rsp), %rdi
callq 0x5120
cmpl $-0x1, 0x1b0(%rsp)
je 0x42d43
movq (%r14), %rax
movq (%rax), %r13
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0x17dd5(%rip), %rsi     # 0x5aa9c
leaq 0x7(%rsp), %rdx
callq 0xfa26
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x18340(%rip), %rdx     # 0x5b023
callq 0xfd14
movq (%r14), %rdx
addq $0x8, %rdx
movq %r15, %rdi
movq %rbp, %rsi
callq 0xfda4
leaq 0x1b8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
leaq 0x18314(%rip), %rdx     # 0x5b023
callq 0xfd14
movq %r13, %rdi
movq %r12, %rsi
callq 0x3da88
movq %r12, %rdi
callq 0x5120
movq %r15, %rdi
callq 0x5120
leaq 0x30(%rsp), %rdi
callq 0x5120
leaq 0x10(%rsp), %rdi
callq 0x5120
leaq 0x110(%rsp), %rdi
leaq 0x163c6(%rip), %rsi     # 0x59118
movq %r15, %rdx
callq 0xfa26
pushq $0x48
popq %rdi
callq 0x5260
movq %rax, %r13
movq (%r14), %rsi
addq $0x8, %rsi
leaq 0x70(%rsp), %rdi
callq 0x5340
movq %rbx, %rdi
leaq 0x170(%rsp), %rsi
callq 0x5340
movq %rbx, %rdx
movb $0x1, %bl
movq %r13, %rdi
leaq 0x70(%rsp), %rsi
callq 0x46fc0
xorl %ebx, %ebx
pushq $0x48
popq %rdi
callq 0x5260
movq %rax, %rbp
movq %r15, %r12
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
leaq 0x170(%rsp), %rsi
callq 0x5340
movb $0x1, %bl
movq %rbp, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x46ac6
leaq 0x110(%rsp), %r15
xorl %ebx, %ebx
leaq 0x497f0(%rip), %rdi     # 0x8c5d0
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x46a38
leaq 0xd0(%rsp), %rdi
callq 0x5120
leaq 0xf0(%rsp), %rdi
callq 0x5120
leaq 0x70(%rsp), %rdi
callq 0x5120
movq %r15, %rdi
callq 0x5120
leaq 0xb0(%rsp), %rdi
leaq 0x16300(%rip), %rsi     # 0x5912c
movq %r12, %r15
movq %r12, %rdx
callq 0xfa26
pushq $0x48
popq %rdi
callq 0x5260
movq %rax, %r13
movq %r14, %rax
leaq 0x90(%rsp), %rbx
movq (%rax), %rsi
addq $0x8, %rsi
leaq 0x50(%rsp), %rdi
callq 0x5340
leaq 0xb0(%rsp), %r12
movq %rbx, %rdi
leaq 0x170(%rsp), %rsi
callq 0x5340
movq %rbx, %rdx
movb $0x1, %bl
movq %r13, %rdi
leaq 0x50(%rsp), %rsi
callq 0x46fc0
xorl %ebx, %ebx
leaq 0x4973f(%rip), %rdi     # 0x8c5d0
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x46a38
leaq 0x90(%rsp), %rdi
callq 0x5120
leaq 0x50(%rsp), %rdi
callq 0x5120
movq %r12, %rdi
callq 0x5120
leaq 0x150(%rsp), %rbx
movq %rbx, %rdi
callq 0x46fa0
movq %r14, %r12
addq $0x8, %r12
jmp 0x42bd3
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x42f03
jmp 0x42f0d
jmp 0x42f69
jmp 0x42f08
movq %rax, %r14
leaq 0x1d8(%rsp), %rdi
jmp 0x42f1f
movq %rax, %r14
jmp 0x42f3b
movq %rax, %r14
jmp 0x42f31
movq %rax, %r14
jmp 0x42f24
jmp 0x42f69
movq %rax, %r14
leaq 0x1b8(%rsp), %rdi
callq 0x5120
leaq 0x130(%rsp), %rdi
callq 0x5120
leaq 0x30(%rsp), %rdi
callq 0x5120
leaq 0x10(%rsp), %rdi
jmp 0x43005
movq %rax, %r14
jmp 0x42f9c
movq %rax, %r14
movb $0x1, %bl
jmp 0x42f8e
movq %rax, %r14
jmp 0x42fa7
movq %rax, %r14
movb $0x1, %bl
jmp 0x42fe4
jmp 0x42f69
movq %rax, %r14
jmp 0x42fc5
jmp 0x42f69
movq %rax, %r14
jmp 0x4300a
movq %rax, %r14
jmp 0x42ffd
movq %rax, %r14
jmp 0x42ff2
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0x5120
leaq 0x50(%rsp), %rdi
callq 0x5120
testb %bl, %bl
je 0x42fa7
pushq $0x48
popq %rsi
movq %r13, %rdi
callq 0x5270
leaq 0xb0(%rsp), %rdi
jmp 0x43005
movq %rax, %r14
leaq 0xd0(%rsp), %rdi
callq 0x5120
testb %bl, %bl
je 0x42fd0
pushq $0x48
popq %rsi
movq %rbp, %rdi
callq 0x5270
xorl %ebx, %ebx
jmp 0x42fd7
movq %rax, %r14
leaq 0xf0(%rsp), %rdi
callq 0x5120
leaq 0x70(%rsp), %rdi
callq 0x5120
testb %bl, %bl
je 0x42ffd
pushq $0x48
popq %rsi
movq %r13, %rdi
callq 0x5270
leaq 0x110(%rsp), %rdi
callq 0x5120
leaq 0x150(%rsp), %rdi
callq 0x46fa0
movq %r14, %rdi
callq 0x53f0