// File: /workspace/github_cpp_makefile_star2_O2/acliusBackHome[P]kamaya/dist/ParseDeclaration.cpp
// Function: ParseScope::get_function_declaration(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
DecFuncPtrList ParseScope::get_function_declaration(const string &symbol) const {
    DecFuncPtrList res;
    auto it = symbol2dec_ptr.find(symbol);
    if (it == symbol2dec_ptr.end()) {
        if (parent_scope == this_scope) {
            // 找不到变量声明
            string info = "ParseScope::get_function_declaration(const string &symbol) symbol=" + symbol;
            throw ParseException(EX_NOT_DECLARED, info);
        }
        return get_scope(parent_scope).get_function_declaration(symbol);
    }
    if (it->second.first != D_FUNCTION) {
        // 声明不是函数
        string info = "ParseScope::get_function_declaration(const string &symbol) symbol=" + symbol;
        throw ParseException(EX_DECLARATION_NOT_A_FUNCTION, info);
    }
    const vector<size_t> decs = it->second.second;
    if (decs.empty()) {
        // 声明了函数但是找不到其记录(BUG)
        string info = "ParseScope::get_function_declaration(const string &symbol) symbol=" + symbol;
        throw ParseException(EX_DECLARATION_NOT_FOUND, info);
    }
    for (const auto &each : decs) {
        res.emplace_back(((const ParseFunction *) each));
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
andq $0x0, -0x30(%rbp)
leaq 0x10(%rsi), %rdi
movq %rdx, %rsi
callq 0x29a8e
leaq 0x18(%r15), %rcx
cmpq %rcx, %rax
je 0x28b86
cmpl $0x1, 0x40(%rax)
jne 0x28bc1
addq $0x48, %rax
leaq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x1fa14
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %r13
cmpq %r13, %r12
je 0x28c09
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r15
cmpq %r13, %r12
je 0x28b58
movq (%r12), %rax
movq %rax, -0x60(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x295e2
addq $0x8, %r12
jmp 0x28b3a
movq -0x40(%rbp), %rax
movq %rax, (%rbx)
movq -0x38(%rbp), %rax
movq %rax, 0x8(%rbx)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
andq $0x0, -0x30(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xd238
jmp 0x28ba6
movq (%r15), %rdi
cmpq 0x8(%r15), %rdi
je 0x28c4e
callq 0x28370
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x28acc
leaq -0x40(%rbp), %rdi
callq 0xdab0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x130ce(%rip), %rsi     # 0x3bc96
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xcad6
pushq $0x28
popq %rdi
callq 0x4180
movq %rax, %r14
pushq $0x9
popq %rsi
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
callq 0x2b53c
leaq 0x2a17b(%rip), %rsi     # 0x52d70
leaq -0x1c354(%rip), %rdx    # 0xc8a8
movq %r14, %rdi
callq 0x44e0
jmp 0x28c91
leaq 0x13086(%rip), %rsi     # 0x3bc96
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xcad6
pushq $0x28
popq %rdi
callq 0x4180
movq %rax, %r14
pushq $0xa
popq %rsi
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
callq 0x2b53c
leaq 0x2a133(%rip), %rsi     # 0x52d70
leaq -0x1c39c(%rip), %rdx    # 0xc8a8
movq %r14, %rdi
callq 0x44e0
jmp 0x28c91
leaq 0x13041(%rip), %rsi     # 0x3bc96
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xcad6
pushq $0x28
popq %rdi
callq 0x4180
movq %rax, %r14
pushq $0x7
popq %rsi
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
callq 0x2b53c
leaq 0x2a0ee(%rip), %rsi     # 0x52d70
leaq -0x1c3e1(%rip), %rdx    # 0xc8a8
movq %r14, %rdi
callq 0x44e0
jmp 0x28cb0
jmp 0x28cb5
movq %rax, %rbx
jmp 0x28ca5
movq %rax, %rbx
movq %r14, %rdi
callq 0x4220
leaq -0x60(%rbp), %rdi
callq 0x4598
jmp 0x28cdb
movq %rax, %rbx
jmp 0x28cc0
movq %rax, %rbx
movq %r14, %rdi
callq 0x4220
leaq -0x60(%rbp), %rdi
callq 0x4598
jmp 0x28ce4
jmp 0x28cd3
jmp 0x28cd8
jmp 0x28cd3
jmp 0x28cd3
movq %rax, %rbx
jmp 0x28ce4
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0xd238
leaq -0x40(%rbp), %rdi
callq 0xdab0
movq %rbx, %rdi
callq 0x4500
nop