// File: /workspace/github_cpp_makefile_star2_O1/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 0x2c43c(%rip), %r15     # 0x5d3f0
movq 0x2c43d(%rip), %rax     # 0x5d3f8
movq %rax, -0x30(%rbp)
cmpq %rax, %r15
je 0x31124
leaq -0x50(%rbp), %r14
leaq -0x60(%rbp), %r12
movq (%r15), %rdx
movq 0x8(%r15), %rsi
leaq 0x16da6(%rip), %rdi     # 0x47d84
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 0x31112
cmpq $0x0, 0x28(%rbx)
je 0x310fd
movq 0x20(%rbx), %rsi
leaq 0x16d82(%rip), %rdi     # 0x47d96
xorl %eax, %eax
callq 0x4070
movl 0x40(%rbx), %eax
cmpq $0x3, %rax
ja 0x310fd
leaq 0x16779(%rip), %rcx     # 0x477a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rbx), %rsi
leaq 0x16d60(%rip), %rdi     # 0x47da3
xorl %eax, %eax
callq 0x4070
jmp 0x310fd
movq 0x48(%rbx), %rax
cmpq 0x50(%rbx), %rax
je 0x310e8
movq (%rax), %rsi
movq %r12, %rdi
callq 0x2ec84
jmp 0x31087
movq 0x48(%rbx), %rax
cmpq 0x50(%rbx), %rax
je 0x310f1
movq (%rax), %rdi
callq 0x28004
movq %r12, %rdi
movq %rax, %rsi
callq 0x27a86
movq -0x60(%rbp), %rdi
callq 0x4480
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x310fd
callq 0x42b0
jmp 0x310fd
movl $0xa, %edi
callq 0x43f0
movq 0x48(%rbx), %r15
movq 0x50(%rbx), %r13
cmpq %r13, %r15
je 0x310fd
movq (%r15), %rsi
movq %r12, %rdi
callq 0x2f27a
movq -0x60(%rbp), %rsi
leaq 0x16cce(%rip), %rdi     # 0x47d9b
xorl %eax, %eax
callq 0x4070
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x310e2
callq 0x42b0
addq $0x8, %r15
jmp 0x310b2
leaq 0x16fd8(%rip), %rdi     # 0x480c7
jmp 0x310f8
leaq 0x16f88(%rip), %rdi     # 0x48080
callq 0x4480
movq %rbx, %rdi
callq 0x4350
movq %rax, %rbx
cmpq -0x40(%rbp), %rax
jne 0x30ffe
movq -0x38(%rbp), %r15
addq $0x40, %r15
cmpq -0x30(%rbp), %r15
jne 0x30fd0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop