// File: /workspace/github_cpp_makefile_star2_O1/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 0x31f64
leaq 0x18(%r15), %rcx
cmpq %rcx, %rax
je 0x30c7b
cmpl $0x1, 0x40(%rax)
jne 0x30cbb
addq $0x48, %rax
leaq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x26102
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %r13
cmpq %r13, %r12
je 0x30d07
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r15
movq (%r12), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x30c31
movq %rax, (%rsi)
addq $0x8, -0x38(%rbp)
jmp 0x30c3c
movq %r14, %rdi
movq %r15, %rdx
callq 0x323e8
addq $0x8, %r12
cmpq %r13, %r12
jne 0x30c15
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 0x30c9b
callq 0x42b0
jmp 0x30c9b
movq (%r15), %rdi
cmpq 0x8(%r15), %rdi
je 0x30d50
callq 0x30230
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x30ba0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x30ca9
callq 0x42b0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1703c(%rip), %rsi     # 0x47cfe
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xe775
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0x9, %esi
callq 0x33d12
leaq 0x2b07d(%rip), %rsi     # 0x5bd70
leaq -0x22940(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x30d97
leaq 0x16ff0(%rip), %rsi     # 0x47cfe
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xe775
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xa, %esi
callq 0x33d12
leaq 0x2b031(%rip), %rsi     # 0x5bd70
leaq -0x2298c(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x30d97
leaq 0x16fa7(%rip), %rsi     # 0x47cfe
leaq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0xe775
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0x7, %esi
callq 0x33d12
leaq 0x2afe8(%rip), %rsi     # 0x5bd70
leaq -0x229d5(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x30dbf
jmp 0x30dc4
movq %rax, %rbx
jmp 0x30dab
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30dee
callq 0x42b0
jmp 0x30dee
movq %rax, %rbx
jmp 0x30dcf
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x30df7
jmp 0x30dfc
jmp 0x30de6
jmp 0x30deb
jmp 0x30de6
jmp 0x30de6
movq %rax, %rbx
jmp 0x30dfc
movq %rax, %rbx
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x30dfc
callq 0x42b0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x30e0a
callq 0x42b0
movq %rbx, %rdi
callq 0x4560