// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
movq 0x4b19c(%rip), %rdi     # 0x8afd8
leaq 0x1b6fc(%rip), %rsi     # 0x5b53f
callq 0x5250
testq %rbx, %rbx
je 0x3fe8c
movl 0x10(%rbx), %eax
decl %eax
cmpl $0x8, %eax
ja 0x3ff7b
leaq 0x1aab6(%rip), %rcx     # 0x5a918
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4a34e(%rip), %rsi     # 0x8a1c0
leaq 0x4a38f(%rip), %rdx     # 0x8a208
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52c0
movq %rax, %rdi
popq %rbx
jmp 0x3ff97
popq %rbx
retq
leaq 0x4a32b(%rip), %rsi     # 0x8a1c0
leaq 0x4a484(%rip), %rdx     # 0x8a320
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52c0
movq %rax, %rdi
popq %rbx
jmp 0x3f645
leaq 0x4a30a(%rip), %rsi     # 0x8a1c0
leaq 0x4a3bb(%rip), %rdx     # 0x8a278
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52c0
movq %rax, %rdi
popq %rbx
jmp 0x41697
leaq 0x4a2e9(%rip), %rsi     # 0x8a1c0
leaq 0x4a40a(%rip), %rdx     # 0x8a2e8
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52c0
movq %rax, %rdi
popq %rbx
jmp 0x420e4
leaq 0x4a2c8(%rip), %rsi     # 0x8a1c0
leaq 0x4a3b1(%rip), %rdx     # 0x8a2b0
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52c0
movq %rax, %rdi
popq %rbx
jmp 0x4301f
leaq 0x4a2a7(%rip), %rsi     # 0x8a1c0
leaq 0x4a320(%rip), %rdx     # 0x8a240
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52c0
movq %rax, %rdi
popq %rbx
jmp 0x407c2
leaq 0x4a286(%rip), %rsi     # 0x8a1c0
leaq 0x4a44f(%rip), %rdx     # 0x8a390
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52c0
movq %rax, %rdi
popq %rbx
jmp 0x42717
leaq 0x4a265(%rip), %rsi     # 0x8a1c0
leaq 0x4a3f6(%rip), %rdx     # 0x8a358
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x52c0
movq %rax, %rdi
popq %rbx
jmp 0x42b8f
popq %rbx
jmp 0x44846
movq 0x4b056(%rip), %rdi     # 0x8afd8
leaq 0x1aa78(%rip), %rsi     # 0x5aa01
callq 0x5250
movq %rax, %rdi
popq %rbx
jmp 0x5130