// File: /workspace/github_cpp_makefile_star2_O3/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)
movq $0x0, -0x30(%rbp)
leaq 0x10(%rsi), %rdi
movq %rdx, %rsi
callq 0x31664
leaq 0x18(%r15), %rcx
cmpq %rcx, %rax
je 0x30385
cmpl $0x1, 0x40(%rax)
jne 0x303b7
addq $0x48, %rax
leaq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x25a6a
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %r13
cmpq %r13, %r12
je 0x30403
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r15
movq (%r12), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x3032d
movq %rax, (%rsi)
addq $0x8, -0x38(%rbp)
jmp 0x30338
movq %r14, %rdi
movq %r15, %rdx
callq 0x31ade
addq $0x8, %r12
cmpq %r13, %r12
jne 0x30311
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)
movq $0x0, -0x30(%rbp)
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x303a5
callq 0x42b0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x303a5
callq 0x42b0
jmp 0x303a5
movq (%r15), %rdi
cmpq 0x8(%r15), %rdi
je 0x3044c
callq 0x2f994
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3029c
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16940(%rip), %rsi     # 0x46cfe
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xe95b
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0x9, %esi
callq 0x333ee
leaq 0x2a981(%rip), %rsi     # 0x5ad70
leaq -0x21e56(%rip), %rdx    # 0xe5a0
movq %r14, %rdi
callq 0x4540
jmp 0x30493
leaq 0x168f4(%rip), %rsi     # 0x46cfe
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xe95b
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xa, %esi
callq 0x333ee
leaq 0x2a935(%rip), %rsi     # 0x5ad70
leaq -0x21ea2(%rip), %rdx    # 0xe5a0
movq %r14, %rdi
callq 0x4540
jmp 0x30493
leaq 0x168ab(%rip), %rsi     # 0x46cfe
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xe95b
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0x7, %esi
callq 0x333ee
leaq 0x2a8ec(%rip), %rsi     # 0x5ad70
leaq -0x21eeb(%rip), %rdx    # 0xe5a0
movq %r14, %rdi
callq 0x4540
jmp 0x304bb
jmp 0x304c0
movq %rax, %rbx
jmp 0x304a7
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x304eb
callq 0x42b0
jmp 0x304eb
movq %rax, %rbx
jmp 0x304cb
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x30502
jmp 0x30507
jmp 0x304de
jmp 0x304e8
movq %rax, %rbx
jmp 0x30507
movq %rax, %rbx
jmp 0x304f9
movq %rax, %rbx
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x304f9
callq 0x42b0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x30507
callq 0x42b0
movq %rbx, %rdi
callq 0x4560
nop