// File: 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
subq $0x130, %rsp            # imm = 0x130
leaq 0x5b74e(%rip), %rax     # 0xc7440
movq %rax, -0x8(%rbp)
leaq 0x5b743(%rip), %rdi     # 0xc7440
callq 0x6cf80
movq %rax, -0x10(%rbp)
leaq 0x5b733(%rip), %rdi     # 0xc7440
callq 0x6cfb0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x6cfe0
testb $0x1, %al
jne 0x6bd2c
jmp 0x6c092
leaq -0x10(%rbp), %rdi
callq 0x6d020
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
leaq 0x252d1(%rip), %rdi     # 0x9102c
movb $0x0, %al
callq 0x4080
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x6d040
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x6cc40
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6d070
testb $0x1, %al
jne 0x6bd9a
jmp 0x6c082
leaq -0x38(%rbp), %rdi
callq 0x6d0a0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x4590
testb $0x1, %al
jne 0x6bdb6
jmp 0x6bdbb
jmp 0x6c074
movq -0x48(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
leaq 0x25270(%rip), %rdi     # 0x9103e
xorl %eax, %eax
callq 0x4080
movq -0x48(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq %rax, -0x100(%rbp)
subq $0x3, %rax
ja 0x6c072
movq -0x100(%rbp), %rax
leaq 0x249d3(%rip), %rcx     # 0x907d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa, %edi
callq 0x4470
movq -0x48(%rbp), %rax
addq $0x20, %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x1a560
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x1a590
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x40110
testb $0x1, %al
jne 0x6be5c
jmp 0x6bedc
leaq -0x68(%rbp), %rdi
callq 0x40150
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x68c30
movq -0x108(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
leaq 0x251aa(%rip), %rdi     # 0x91043
xorl %eax, %eax
callq 0x4080
jmp 0x6bea2
leaq -0x98(%rbp), %rdi
callq 0x4688
leaq -0x68(%rbp), %rdi
callq 0x40170
jmp 0x6be46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4688
jmp 0x6c09b
jmp 0x6c072
movq -0x48(%rbp), %rdi
addq $0x20, %rdi
addq $0x8, %rdi
callq 0x167a0
testb $0x1, %al
jne 0x6bef8
jmp 0x6bf0b
leaq 0x2514c(%rip), %rdi     # 0x9104b
movb $0x0, %al
callq 0x4080
jmp 0x6c074
movq -0x48(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, -0x10c(%rbp)
movl %eax, %esi
callq 0x165e0
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq (%rax), %rsi
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x684c0
movq -0x118(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
movl -0x10c(%rbp), %eax
leaq 0x250e5(%rip), %rdi     # 0x91047
callq 0x4080
jmp 0x6bf69
leaq -0xd0(%rbp), %rdi
callq 0x4688
jmp 0x6c072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x4688
jmp 0x6c09b
movq -0x48(%rbp), %rdi
addq $0x20, %rdi
addq $0x8, %rdi
callq 0x167a0
testb $0x1, %al
jne 0x6bfb4
jmp 0x6bfc7
leaq 0x250d8(%rip), %rdi     # 0x91093
movb $0x0, %al
callq 0x4080
jmp 0x6c074
movq -0x48(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, -0x11c(%rbp)
movl %eax, %esi
callq 0x165e0
movq (%rax), %rdi
callq 0x56e60
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x566e0
movq -0x128(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
movl -0x11c(%rbp), %eax
leaq 0x25024(%rip), %rdi     # 0x91047
callq 0x4080
jmp 0x6c02a
leaq -0xf8(%rbp), %rdi
callq 0x4688
jmp 0x6c072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x4688
jmp 0x6c09b
movq -0x48(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
leaq 0x25070(%rip), %rdi     # 0x910db
movb $0x0, %al
callq 0x4080
jmp 0x6c074
leaq -0x38(%rbp), %rdi
callq 0x6d0c0
jmp 0x6bd84
jmp 0x6c084
leaq -0x10(%rbp), %rdi
callq 0x6d0f0
jmp 0x6bd16
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x45e0
nopw (%rax,%rax)