// File: /workspace/github_cpp_makefile_star2_O3/sighingnow[P]compile-pascal/pl0_tac_gen.cpp
// Function: pl0_tac_const_stmt(pl0_ast_const_stmt const*)
void pl0_tac_const_stmt(pl0_ast_const_stmt const *stmts) {
    cout << __func__;
    if (!stmts) { return; }
    for (auto && def: stmts->stmt) {
        string id = def->id->id;
        // validate.
        if (!scope.empty() && id == scope.back()) {
            pl0_ast_error(def->id->loc, string("duplicate identifier ") + "\"" + id + "\"");
        }
        else if (valtb.find(id, false) || vartb.find(id, false)) {
            pl0_ast_error(def->id->loc, string("redefinition of ") + "\"" + id + "\"");
        }
        else {
            valtb.push(constant(id, def->val->val, (def->val->dt == pl0_ast_constv::INT ? "integer" : "char"))); // update symbol table.
        }
    }
    cout << __func__;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
movq 0x53a2f(%rip), %rdi     # 0xb9fd8
leaq 0x2cf5f(%rip), %rsi     # 0x9350f
xorl %edx, %edx
callq 0x52e0
testq %rbx, %rbx
je 0x66b0f
movq 0x8(%rbx), %r12
movq 0x10(%rbx), %r13
cmpq %r13, %r12
je 0x66afa
leaq 0x40(%rsp), %rbx
movq (%r12), %rax
movq 0x8(%rax), %rax
leaq 0x50(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x351dc
movq 0x54fde(%rip), %rax     # 0xbb5e0
cmpq %rax, 0x54fcf(%rip)     # 0xbb5d8
je 0x66635
movq 0x48(%rsp), %rdx
cmpq -0x18(%rax), %rdx
jne 0x66635
testq %rdx, %rdx
je 0x66909
movq -0x20(%rax), %rsi
movq 0x40(%rsp), %rdi
callq 0x5280
testl %eax, %eax
je 0x66909
leaq 0x54fe4(%rip), %rdi     # 0xbb620
movq %rbx, %rsi
xorl %edx, %edx
callq 0x761f8
testb %al, %al
jne 0x66663
leaq 0x54f9f(%rip), %rdi     # 0xbb5f0
movq %rbx, %rsi
xorl %edx, %edx
callq 0x7635e
testb %al, %al
je 0x667d9
movq (%r12), %rax
movq 0x8(%rax), %rax
movq (%rax), %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2c2e3(%rip), %rsi     # 0x9296a
leaq 0x2c2ec(%rip), %rdx     # 0x9297a
callq 0x253d0
movq %rbp, %rdi
leaq 0x2c956(%rip), %rbp     # 0x92ff3
movq %rbp, %rsi
callq 0x5420
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x666cb
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x666d1
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 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rsp, %rdi
callq 0x50d0
leaq 0x70(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x60(%rsp), %rdi
je 0x66728
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x6672e
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbp, %rsi
callq 0x5420
leaq 0xb8(%rsp), %rsi
movq %rsi, 0xa8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x66782
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x66788
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
leaq 0xa8(%rsp), %rsi
callq 0x65f40
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x66a7e
movq 0xb8(%rsp), %rsi
jmp 0x66a76
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x351dc
movq (%r12), %rax
movq 0x10(%rax), %rax
xorl %ecx, %ecx
cmpl $0x0, 0xc(%rax)
movl 0x8(%rax), %r15d
leaq 0x2c9af(%rip), %rsi     # 0x931cb
leaq 0x2a8ec(%rip), %rax     # 0x9110f
cmoveq %rax, %rsi
sete %cl
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
leaq (%rcx,%rcx,2), %rax
leaq 0x4(%rsi,%rax), %rdx
leaq 0x108(%rsp), %r14
movq %r14, %rdi
callq 0x253d0
leaq 0x60(%rsp), %rbp
movq %rbp, %rdi
leaq 0xe8(%rsp), %rsi
movl %r15d, %edx
movq %r14, %rcx
callq 0x638a2
leaq 0x54dab(%rip), %rdi     # 0xbb620
movq %rbp, %rsi
callq 0x77efa
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x668a2
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x668be
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x668e3
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x66ad1
movq 0xf8(%rsp), %rsi
jmp 0x66ac9
movq (%r12), %rax
movq 0x8(%rax), %rax
movq (%rax), %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2c027(%rip), %rsi     # 0x92954
leaq 0x2c035(%rip), %rdx     # 0x92969
callq 0x253d0
movq %rbp, %rdi
leaq 0x2c6b0(%rip), %rbp     # 0x92ff3
movq %rbp, %rsi
callq 0x5420
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x66971
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x66977
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 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rsp, %rdi
callq 0x50d0
leaq 0x70(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x60(%rsp), %rdi
je 0x669ce
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x669d4
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbp, %rsi
callq 0x5420
leaq 0xd8(%rsp), %rsi
movq %rsi, 0xc8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x66a28
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
jmp 0x66a2e
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xd0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
leaq 0xc8(%rsp), %rsi
callq 0x65f40
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x66a7e
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x66a9a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x66ab5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x66ad1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x66aed
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5260
addq $0x8, %r12
cmpq %r13, %r12
jne 0x665d6
movq 0x534d7(%rip), %rdi     # 0xb9fd8
leaq 0x2ca07(%rip), %rsi     # 0x9350f
xorl %edx, %edx
callq 0x52e0
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x66bfc
movq 0xd8(%rsp), %rsi
jmp 0x66be5
jmp 0x66bf9
jmp 0x66bf4
jmp 0x66bef
jmp 0x66c53
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x764ba
jmp 0x66b70
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x66b9a
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x5260
jmp 0x66b9a
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x66c56
movq 0xf8(%rsp), %rsi
jmp 0x66c47
jmp 0x66c53
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x66bfc
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5260
jmp 0x66bfc
movq %rax, %rbx
jmp 0x66c33
movq %rax, %rbx
jmp 0x66c18
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x66c18
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x66c33
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x66c56
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5260
jmp 0x66c56
jmp 0x66c53
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x66c72
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5260
movq %rbx, %rdi
callq 0x53d0