// File: /workspace/github_cpp_makefile_star2_O2/acliusBackHome[P]kamaya/dist/ParseDeclaration.cpp
// Function: ParseScope::print_all_declaration()
void ParseScope::print_all_declaration() {
    for (const auto &scope: scopes) {
        const auto &symbol2dec = scope.symbol2dec_ptr;
        printf("scope: %zu(%zu):\n", scope.this_scope, scope.parent_scope);
        for (const auto &each : symbol2dec) {
            if (each.first.empty()) {
                continue;
            }
            printf("%s: ", each.first.c_str());
            DeclarationType dec_type = each.second.first;
            switch (dec_type) {
                case D_FUNCTION: {
                    putchar('\n');
                    const auto &func_ptr_list = each.second.second;
                    for (const auto &func_ptr:func_ptr_list) {
                        printf("    %s\n", ((ParseFunction *) func_ptr)->get_info().c_str());
                    }
                    break;
                }
                case D_VARIABLE: {
                    if (each.second.second.empty()) {
                        printf("异常: 定义为变量但未发现记录, 请检查实现或者调用\n");
                        continue;
                    }
                    const auto &var_ptr = each.second.second[0];
                    printf("%s\n", ((ParseVariable *) var_ptr)->get_info().c_str());
                    break;
                }
                case D_TYPE: {
                    if (each.second.second.empty()) {
                        printf("异常: 定义为类型但未发现记录, 请检查实现或者调用\n");
                        continue;
                    }
                    const auto &type = ParseType::get_type(each.second.second[0]);
                    printf("%s\n", type.get_info().c_str());
                    break;
                }
                case D_UNKNOWN: {
                    printf("%s 未知声明\n", each.first.c_str());
                    break;
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x2b53e(%rip), %r14     # 0x543c0
movq 0x2b53f(%rip), %rax     # 0x543c8
movq %rax, -0x30(%rbp)
leaq -0x60(%rbp), %r13
leaq 0x12e9b(%rip), %rbx     # 0x3bd33
cmpq -0x30(%rbp), %r14
je 0x28fd9
movq (%r14), %rdx
movq 0x8(%r14), %rsi
leaq 0x12e6c(%rip), %rdi     # 0x3bd1c
xorl %eax, %eax
callq 0x4060
movq 0x28(%r14), %r15
movq %r14, -0x38(%rbp)
leaq 0x18(%r14), %rax
movq %rax, -0x40(%rbp)
cmpq -0x40(%rbp), %r15
je 0x28fcc
cmpq $0x0, 0x28(%r15)
je 0x28fbc
movq 0x20(%r15), %rsi
leaq 0x12e47(%rip), %rdi     # 0x3bd2e
xorl %eax, %eax
callq 0x4060
movl 0x40(%r15), %eax
cmpq $0x3, %rax
ja 0x28fbc
leaq 0x1283d(%rip), %rcx     # 0x3b740
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%r15), %rsi
leaq 0x12e24(%rip), %rdi     # 0x3bd3b
xorl %eax, %eax
callq 0x4060
jmp 0x28fbc
movq 0x48(%r15), %rax
cmpq 0x50(%r15), %rax
je 0x28fa7
movq (%rax), %rsi
movq %r13, %rdi
callq 0x273ac
jmp 0x28f57
movq 0x48(%r15), %rax
cmpq 0x50(%r15), %rax
je 0x28fb0
movq (%rax), %rdi
callq 0x21a26
movq %r13, %rdi
movq %rax, %rsi
callq 0x215a0
movq -0x60(%rbp), %rdi
callq 0x4430
movq %r13, %rdi
callq 0x4598
jmp 0x28fbc
pushq $0xa
popq %rdi
callq 0x43b0
movq 0x48(%r15), %r12
movq 0x50(%r15), %r14
cmpq %r14, %r12
je 0x28fbc
movq (%r12), %rsi
movq %r13, %rdi
callq 0x27726
movq -0x60(%rbp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4060
movq %r13, %rdi
callq 0x4598
addq $0x8, %r12
jmp 0x28f7a
leaq 0x130b1(%rip), %rdi     # 0x3c05f
jmp 0x28fb7
leaq 0x13061(%rip), %rdi     # 0x3c018
callq 0x4430
movq %r15, %rdi
callq 0x42f0
movq %rax, %r15
jmp 0x28ec7
movq -0x38(%rbp), %r14
addq $0x40, %r14
jmp 0x28e98
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq