// File: /workspace/github_cpp_makefile_star2_O3/sighingnow[P]compile-pascal/pl0_tac_gen.cpp
// Function: pl0_tac_stmt(pl0_ast_stmt const*)
void pl0_tac_stmt(pl0_ast_stmt const *stmt) {
    cout << __func__;
    if (stmt == nullptr) { return; } // check if null pointer.
    switch (stmt->t) {
        case pl0_ast_stmt::type_t::ASSIGN_STMT: pl0_tac_assign_stmt(dynamic_cast<pl0_ast_assign_stmt const *>(stmt)); break;
        case pl0_ast_stmt::type_t::COND_STMT: pl0_tac_cond_stmt(dynamic_cast<pl0_ast_cond_stmt const *>(stmt)); break;
        case pl0_ast_stmt::type_t::CASE_STMT: pl0_tac_case_stmt(dynamic_cast<pl0_ast_case_stmt const *>(stmt)); break;
        case pl0_ast_stmt::type_t::CALL_PROC: pl0_tac_call_proc(dynamic_cast<pl0_ast_call_proc const *>(stmt)); break;
        case pl0_ast_stmt::type_t::COMPOUND_STMT: pl0_tac_compound_stmt(dynamic_cast<pl0_ast_compound_stmt const *>(stmt)); break;
        case pl0_ast_stmt::type_t::WRITE_STMT: pl0_tac_write_stmt(dynamic_cast<pl0_ast_write_stmt const *>(stmt)); break;
        case pl0_ast_stmt::type_t::READ_STMT: pl0_tac_read_stmt(dynamic_cast<pl0_ast_read_stmt const *>(stmt)); break;
        case pl0_ast_stmt::type_t::FOR_STMT: pl0_tac_for_stmt(dynamic_cast<pl0_ast_for_stmt const *>(stmt)); break;
        case pl0_ast_stmt::type_t::NULL_STMT: pl0_tac_null_stmt(dynamic_cast<pl0_ast_null_stmt const *>(stmt)); break;
        default: cout << "UNIMPLEMENT STMT TYPE" << endl;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4fdfe(%rip), %r14     # 0xb9fd8
leaq 0x2932e(%rip), %rsi     # 0x9350f
movq %r14, %rdi
xorl %edx, %edx
callq 0x52e0
testq %rbx, %rbx
je 0x6a235
movl 0x10(%rbx), %eax
decl %eax
cmpl $0x8, %eax
ja 0x6a36a
leaq 0x286e3(%rip), %rcx     # 0x928e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4efab(%rip), %rsi     # 0xb91c0
leaq 0x4efec(%rip), %rdx     # 0xb9208
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6a3ac
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4ef7c(%rip), %rsi     # 0xb91c0
leaq 0x4f0d5(%rip), %rdx     # 0xb9320
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6933a
leaq 0x4ef55(%rip), %rsi     # 0xb91c0
leaq 0x4f006(%rip), %rdx     # 0xb9278
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6cba6
leaq 0x4ef2e(%rip), %rsi     # 0xb91c0
leaq 0x4f04f(%rip), %rdx     # 0xb92e8
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6dc95
leaq 0x4ef07(%rip), %rsi     # 0xb91c0
leaq 0x4eff0(%rip), %rdx     # 0xb92b0
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6f7a9
leaq 0x4eee0(%rip), %rsi     # 0xb91c0
leaq 0x4ef59(%rip), %rdx     # 0xb9240
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6b467
leaq 0x4eeb9(%rip), %rsi     # 0xb91c0
leaq 0x4f082(%rip), %rdx     # 0xb9390
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6e695
leaq 0x4ee92(%rip), %rsi     # 0xb91c0
leaq 0x4f023(%rip), %rdx     # 0xb9358
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6ed91
movq 0x4fc83(%rip), %rdi     # 0xb9fd8
leaq 0x291b3(%rip), %rsi     # 0x9350f
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x52e0
leaq 0x28670(%rip), %rsi     # 0x929e1
movl $0x15, %edx
movq %r14, %rdi
callq 0x52e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5240
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5190