// File: /workspace/github_cpp_makefile_star2_O3/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 0x2bd2c(%rip), %r15     # 0x5c3f0
movq 0x2bd2d(%rip), %rax     # 0x5c3f8
movq %rax, -0x30(%rbp)
cmpq %rax, %r15
je 0x30834
leaq -0x50(%rbp), %r14
leaq -0x60(%rbp), %r12
movq (%r15), %rdx
movq 0x8(%r15), %rsi
leaq 0x16696(%rip), %rdi     # 0x46d84
xorl %eax, %eax
callq 0x4070
movq 0x28(%r15), %rbx
movq %r15, -0x38(%rbp)
leaq 0x18(%r15), %rax
movq %rax, -0x40(%rbp)
cmpq %rax, %rbx
je 0x30822
cmpq $0x0, 0x28(%rbx)
je 0x3080d
movq 0x20(%rbx), %rsi
leaq 0x16672(%rip), %rdi     # 0x46d96
xorl %eax, %eax
callq 0x4070
movl 0x40(%rbx), %eax
cmpq $0x3, %rax
ja 0x3080d
leaq 0x16069(%rip), %rcx     # 0x467a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rbx), %rsi
leaq 0x16650(%rip), %rdi     # 0x46da3
xorl %eax, %eax
callq 0x4070
jmp 0x3080d
movq 0x48(%rbx), %rax
cmpq 0x50(%rbx), %rax
je 0x307f8
movq (%rax), %rsi
movq %r12, %rdi
callq 0x2e3c4
jmp 0x30797
movq 0x48(%rbx), %rax
cmpq 0x50(%rbx), %rax
je 0x30801
movq (%rax), %rdi
callq 0x2796c
movq %r12, %rdi
movq %rax, %rsi
callq 0x273f2
movq -0x60(%rbp), %rdi
callq 0x4480
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x3080d
callq 0x42b0
jmp 0x3080d
movl $0xa, %edi
callq 0x43f0
movq 0x48(%rbx), %r15
movq 0x50(%rbx), %r13
cmpq %r13, %r15
je 0x3080d
movq (%r15), %rsi
movq %r12, %rdi
callq 0x2e9b6
movq -0x60(%rbp), %rsi
leaq 0x165be(%rip), %rdi     # 0x46d9b
xorl %eax, %eax
callq 0x4070
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x307f2
callq 0x42b0
addq $0x8, %r15
jmp 0x307c2
leaq 0x168c8(%rip), %rdi     # 0x470c7
jmp 0x30808
leaq 0x16878(%rip), %rdi     # 0x47080
callq 0x4480
movq %rbx, %rdi
callq 0x4350
movq %rax, %rbx
cmpq -0x40(%rbp), %rax
jne 0x3070e
movq -0x38(%rbp), %r15
addq $0x40, %r15
cmpq -0x30(%rbp), %r15
jne 0x306e0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop