// File: /workspace/github_cpp_makefile_star2_O1/sighingnow[P]compile-pascal/pl0_tac_gen.cpp
// Function: pl0_tac_var_stmt(pl0_ast_var_stmt const*)
void pl0_tac_var_stmt(pl0_ast_var_stmt const *stmts) {
    cout << __func__;
    if (!stmts) { return; }
    for (auto && s: stmts->stmt) {
        for (auto && var: s->ids) {
            // validate.
            if (!scope.empty() && var->id == scope.back()) {
                pl0_ast_error(var->loc, string("duplicate identifier ") + "\"" + var->id + "\"");
            }
            else if (valtb.find(var->id, false) || vartb.find(var->id, false)) {
                pl0_ast_error(var->loc, string("redefinition of ") + "\"" + var->id + "\"");
            }
            else {
                string t = s->type->type->type + (s->type->len == -1 ? "" : "array");
                vartb.push(variable(var->id, s->type->type->type, t, s->type->len)); // update symbol table.
                irb.emit("def", new Value(var->id, s->type->type->type), new Value(t, "string"), new Value(s->type->len, "integer"));
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
movq 0x53409(%rip), %rdi     # 0xbffd8
leaq 0x2c939(%rip), %rsi     # 0x9950f
xorl %edx, %edx
callq 0x52e0
testq %rbx, %rbx
je 0x6d47b
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x1f8(%rsp)
cmpq %rcx, %rax
je 0x6d47b
leaq 0x40(%rsp), %r15
leaq 0xa0(%rsp), %rbp
leaq 0x50(%rsp), %r12
movq %rax, 0x20(%rsp)
movq (%rax), %rax
movq 0x10(%rax), %r13
movq 0x18(%rax), %rax
movq %rax, 0x200(%rsp)
cmpq %rax, %r13
je 0x6d464
movq 0x549a7(%rip), %rax     # 0xc15e0
cmpq %rax, 0x54998(%rip)     # 0xc15d8
je 0x6cc6e
movq (%r13), %rbx
movq 0x10(%rbx), %rdx
cmpq -0x18(%rax), %rdx
jne 0x6cc6e
testq %rdx, %rdx
je 0x6d29c
movq -0x20(%rax), %rsi
movq 0x8(%rbx), %rdi
callq 0x5280
testl %eax, %eax
je 0x6d29c
movq (%r13), %rsi
addq $0x8, %rsi
leaq 0x549a3(%rip), %rdi     # 0xc1620
xorl %edx, %edx
callq 0x7baf4
testb %al, %al
jne 0x6cca6
movq (%r13), %rsi
addq $0x8, %rsi
leaq 0x54959(%rip), %rdi     # 0xc15f0
xorl %edx, %edx
callq 0x7bc48
testb %al, %al
je 0x6cdff
movq (%r13), %rax
movq (%rax), %r14
movq %r15, 0x30(%rsp)
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2bca9(%rip), %rsi     # 0x9896a
leaq 0x2bcb2(%rip), %rdx     # 0x9897a
callq 0x2670a
movq %rbx, %rdi
leaq 0x2c31c(%rip), %rsi     # 0x98ff3
callq 0x5420
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6cd02
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x6cd08
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
leaq 0x60(%rsp), %rbx
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r13), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rsp, %rdi
callq 0x50d0
movq %rbp, 0x90(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6cd65
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x6cd6c
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
leaq 0x90(%rsp), %rdi
movq 0x8(%rax), %rdx
movq %rdx, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2c25d(%rip), %rsi     # 0x98ff3
callq 0x5420
movq %rbx, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6cdbe
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x6cdc4
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x6be78
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6d403
movq 0x60(%rsp), %rsi
jmp 0x6d3fb
movq 0x20(%rsp), %r15
movq (%r15), %rax
movq 0x8(%rax), %rax
cmpl $-0x1, 0x10(%rax)
movq 0x8(%rax), %rax
leaq 0x2bc58(%rip), %rbx     # 0x98a72
leaq 0x2c6ee(%rip), %rcx     # 0x9950f
cmoveq %rcx, %rbx
leaq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x36590
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5420
movq (%r13), %rax
leaq 0x168(%rsp), %rcx
movq %rcx, 0x158(%rsp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
leaq 0x158(%rsp), %rdi
callq 0x36590
leaq 0x148(%rsp), %rbx
leaq 0x218(%rsp), %r14
leaq 0x208(%rsp), %r12
movq (%r15), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rbx, 0x138(%rsp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
leaq 0x138(%rsp), %rdi
callq 0x36590
movq %r14, 0x208(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x36590
movq %r12, %rcx
movq (%r15), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %r8d
leaq 0x90(%rsp), %r12
movq %r12, %rdi
leaq 0x158(%rsp), %rsi
leaq 0x138(%rsp), %rdx
callq 0x69666
leaq 0x546e1(%rip), %rdi     # 0xc15f0
movq %r12, %rsi
callq 0x7dacc
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x6cf3c
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x6cf61
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6cf7e
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x208(%rsp), %rdi
cmpq %r14, %rdi
leaq 0x1d8(%rsp), %r14
leaq 0x198(%rsp), %rbp
je 0x6cfab
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x138(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6cfc8
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x6cfed
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x5260
leaq 0x128(%rsp), %rax
movq %rax, 0x118(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x2b96f(%rip), %rsi     # 0x9897b
leaq 0x2b96b(%rip), %rdx     # 0x9897e
callq 0x2670a
movl $0x48, %edi
callq 0x5250
movq %rax, %r12
movq (%r13), %rax
leaq 0x1e8(%rsp), %rcx
movq %rcx, 0x1d8(%rsp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x36590
movq (%r15), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
leaq 0x1c8(%rsp), %rcx
movq %rcx, 0x1b8(%rsp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
leaq 0x1b8(%rsp), %r15
movq %r15, %rdi
callq 0x36590
movb $0x1, %bl
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7be1c
xorl %ebx, %ebx
movl $0x48, %edi
callq 0x5250
movq %rax, 0x28(%rsp)
leaq 0x108(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %rdi
callq 0x36590
leaq 0x1a8(%rsp), %rax
movq %rax, 0x198(%rsp)
movq %rbp, %rdi
leaq 0x2c192(%rip), %rsi     # 0x99278
leaq 0x2c191(%rip), %rdx     # 0x9927e
callq 0x2670a
movb $0x1, %r15b
movq 0x28(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
movq %rbp, %rdx
callq 0x7be1c
xorl %r15d, %r15d
movl $0x48, %edi
callq 0x5250
movq %rax, %rbx
movq %r12, %r14
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %r15d
leaq 0x188(%rsp), %rax
movq %rax, 0x178(%rsp)
leaq 0x178(%rsp), %r12
movq %r12, %rdi
leaq 0x29fc0(%rip), %rsi     # 0x9710f
leaq 0x29fc0(%rip), %rdx     # 0x97116
callq 0x2670a
movb $0x1, %bpl
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
movq %r14, %r12
callq 0x7b654
xorl %ebp, %ebp
leaq 0x54430(%rip), %rdi     # 0xc15a8
leaq 0x118(%rsp), %rsi
movq %r12, %rdx
movq 0x28(%rsp), %rcx
movq %rbx, %r8
callq 0x7b53e
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x6d1b5
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
leaq 0x40(%rsp), %r15
leaq 0xa0(%rsp), %rbp
leaq 0x50(%rsp), %r12
je 0x6d1ec
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x6d211
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x1b8(%rsp), %rdi
leaq 0x1c8(%rsp), %rax
cmpq %rax, %rdi
je 0x6d236
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x1d8(%rsp), %rdi
leaq 0x1e8(%rsp), %rax
cmpq %rax, %rdi
je 0x6d25b
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x6d280
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6d452
movq 0x10(%rsp), %rsi
jmp 0x6d44a
movq (%rbx), %r14
movq %r15, 0x30(%rsp)
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2b6a1(%rip), %rsi     # 0x98954
leaq 0x2b6af(%rip), %rdx     # 0x98969
callq 0x2670a
movq %rbx, %rdi
leaq 0x2bd2a(%rip), %rsi     # 0x98ff3
callq 0x5420
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6d2f4
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x6d2fa
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r13), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rsp, %rdi
callq 0x50d0
movq %rbp, 0x90(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x90(%rsp), %rdi
je 0x6d35a
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x6d361
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2bc70(%rip), %rsi     # 0x98ff3
callq 0x5420
leaq 0x80(%rsp), %rsi
movq %rsi, 0x70(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6d3b6
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x6d3bc
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
leaq 0x70(%rsp), %rsi
callq 0x6be78
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x6d403
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6d420
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6d43b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x6d452
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5260
addq $0x8, %r13
cmpq 0x200(%rsp), %r13
jne 0x6cc32
movq 0x20(%rsp), %rax
addq $0x8, %rax
cmpq 0x1f8(%rsp), %rax
jne 0x6cc11
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x6d4b2
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5260
leaq 0xa0(%rsp), %rbp
jmp 0x6d4bf
movq %rax, %r13
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6d4dc
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5260
leaq 0x40(%rsp), %r15
jmp 0x6d753
jmp 0x6d70d
jmp 0x6d708
jmp 0x6d717
movq %rax, %r13
jmp 0x6d5a2
jmp 0x6d533
movq %rax, %r13
movb $0x1, %r15b
jmp 0x6d634
jmp 0x6d533
movq %rax, %r13
movb $0x1, %r15b
jmp 0x6d659
movq %rax, %r13
movb $0x1, %bl
jmp 0x6d694
movq %rax, %r13
movb $0x1, %bl
jmp 0x6d6b9
movq %rax, %r13
jmp 0x6d6ca
movq %rax, %r13
jmp 0x6d6ef
movq %rax, %r13
leaq 0x90(%rsp), %rdi
callq 0x7bdce
jmp 0x6d550
movq %rax, %r13
movq 0x208(%rsp), %rdi
cmpq %r14, %rdi
je 0x6d56d
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x5260
leaq 0x148(%rsp), %rbx
jmp 0x6d585
movq %rax, %r13
movb $0x1, %bpl
movq %r14, %r12
jmp 0x6d5f0
movq %rax, %r13
movq 0x138(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6d5a2
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x6d6ef
movq 0x168(%rsp), %rsi
jmp 0x6d6e7
movq %rax, %r13
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x6d5f0
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x5260
testb %bpl, %bpl
je 0x6d602
movl $0x48, %esi
movq %rbx, %rdi
callq 0x5260
xorl %r15d, %r15d
jmp 0x6d60f
movq %rax, %r13
jmp 0x6d66f
movq %rax, %r13
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x6d634
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x6d659
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x5260
testb %r15b, %r15b
je 0x6d66d
movl $0x48, %esi
movq 0x28(%rsp), %rdi
callq 0x5260
xorl %ebx, %ebx
movq 0x1b8(%rsp), %rdi
leaq 0x1c8(%rsp), %rax
cmpq %rax, %rdi
je 0x6d694
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x1d8(%rsp), %rdi
leaq 0x1e8(%rsp), %rax
cmpq %rax, %rdi
je 0x6d6b9
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x5260
testb %bl, %bl
je 0x6d6ca
movl $0x48, %esi
movq %r12, %rdi
callq 0x5260
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x6d6ef
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6d785
movq 0x10(%rsp), %rsi
jmp 0x6d77d
movq %rax, %r13
jmp 0x6d76e
movq %rax, %r13
jmp 0x6d753
movq %rax, %r13
jmp 0x6d736
movq %rax, %r13
jmp 0x6d785
movq %rax, %r13
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6d736
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6d753
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6d76e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x6d785
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5260
movq %r13, %rdi
callq 0x53d0