// File: /workspace/github_cpp_makefile_star2_O1/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 0x53af5(%rip), %rdi     # 0xbffd8
leaq 0x2d025(%rip), %rsi     # 0x9950f
xorl %edx, %edx
callq 0x52e0
testq %rbx, %rbx
je 0x6ca49
movq 0x8(%rbx), %r12
movq 0x10(%rbx), %r13
cmpq %r13, %r12
je 0x6ca34
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 0x36590
movq 0x550a4(%rip), %rax     # 0xc15e0
cmpq %rax, 0x55095(%rip)     # 0xc15d8
je 0x6c56f
movq 0x48(%rsp), %rdx
cmpq -0x18(%rax), %rdx
jne 0x6c56f
testq %rdx, %rdx
je 0x6c843
movq -0x20(%rax), %rsi
movq 0x40(%rsp), %rdi
callq 0x5280
testl %eax, %eax
je 0x6c843
leaq 0x550aa(%rip), %rdi     # 0xc1620
movq %rbx, %rsi
xorl %edx, %edx
callq 0x7baf4
testb %al, %al
jne 0x6c59d
leaq 0x55065(%rip), %rdi     # 0xc15f0
movq %rbx, %rsi
xorl %edx, %edx
callq 0x7bc48
testb %al, %al
je 0x6c713
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 0x2c3a9(%rip), %rsi     # 0x9896a
leaq 0x2c3b2(%rip), %rdx     # 0x9897a
callq 0x2670a
movq %rbp, %rdi
leaq 0x2ca1c(%rip), %rbp     # 0x98ff3
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 0x6c605
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x6c60b
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 0x6c662
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x6c668
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 0x6c6bc
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x6c6c2
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 0x6be78
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x6c9b8
movq 0xb8(%rsp), %rsi
jmp 0x6c9b0
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x36590
movq (%r12), %rax
movq 0x10(%rax), %rax
xorl %ecx, %ecx
cmpl $0x0, 0xc(%rax)
movl 0x8(%rax), %r15d
leaq 0x2ca75(%rip), %rsi     # 0x991cb
leaq 0x2a9b2(%rip), %rax     # 0x9710f
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 0x2670a
leaq 0x60(%rsp), %rbp
movq %rbp, %rdi
leaq 0xe8(%rsp), %rsi
movl %r15d, %edx
movq %r14, %rcx
callq 0x69780
leaq 0x54e71(%rip), %rdi     # 0xc1620
movq %rbp, %rsi
callq 0x7d7b4
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x6c7dc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x6c7f8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6c81d
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x6ca0b
movq 0xf8(%rsp), %rsi
jmp 0x6ca03
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 0x2c0ed(%rip), %rsi     # 0x98954
leaq 0x2c0fb(%rip), %rdx     # 0x98969
callq 0x2670a
movq %rbp, %rdi
leaq 0x2c776(%rip), %rbp     # 0x98ff3
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 0x6c8ab
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x6c8b1
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 0x6c908
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x6c90e
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 0x6c962
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
jmp 0x6c968
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 0x6be78
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x6c9b8
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x6c9d4
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6c9ef
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x6ca0b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x6ca27
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5260
addq $0x8, %r12
cmpq %r13, %r12
jne 0x6c510
movq 0x5359d(%rip), %rdi     # 0xbffd8
leaq 0x2cacd(%rip), %rsi     # 0x9950f
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 0x6cb36
movq 0xd8(%rsp), %rsi
jmp 0x6cb1f
jmp 0x6cb33
jmp 0x6cb2e
jmp 0x6cb29
jmp 0x6cb8d
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x7bd98
jmp 0x6caaa
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6cad4
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x5260
jmp 0x6cad4
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x6cb90
movq 0xf8(%rsp), %rsi
jmp 0x6cb81
jmp 0x6cb8d
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x6cb36
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5260
jmp 0x6cb36
movq %rax, %rbx
jmp 0x6cb6d
movq %rax, %rbx
jmp 0x6cb52
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x6cb52
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6cb6d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5260
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x6cb90
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5260
jmp 0x6cb90
jmp 0x6cb8d
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x6cbac
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5260
movq %rbx, %rdi
callq 0x53d0