// File: 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
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x118(%rbp)
movq %rdi, %rax
movq %rax, -0x110(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6cec0
movq -0x108(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
callq 0x6cbe0
movq %rax, -0x100(%rbp)
jmp 0x6b639
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x10, %rdi
callq 0x6cc40
movq %rax, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x6cc10
testb $0x1, %al
jne 0x6b66e
jmp 0x6b760
movq -0x108(%rbp), %rcx
movq (%rcx), %rax
cmpq 0x8(%rcx), %rax
jne 0x6b723
movq -0x18(%rbp), %rdx
leaq 0x25919(%rip), %rsi     # 0x90fa6
leaq -0x70(%rbp), %rdi
callq 0x16320
jmp 0x6b698
movl $0x28, %edi
callq 0x41c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x120(%rbp)
movl $0x7, %esi
leaq -0x70(%rbp), %rdx
callq 0x73a90
jmp 0x6b6bf
movq -0x120(%rbp), %rdi
leaq 0x5a683(%rip), %rsi     # 0xc5d50
leaq -0x55844(%rip), %rdx    # 0x15e90
callq 0x45b0
jmp 0x6b9da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6b9c8
movq -0x120(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x4280
jmp 0x6b715
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4688
jmp 0x6b9c8
movq -0x108(%rbp), %rax
movq (%rax), %rdi
callq 0x6a860
movq %rax, -0x128(%rbp)
jmp 0x6b73b
movq -0x128(%rbp), %rsi
movq -0x118(%rbp), %rdi
movq -0x18(%rbp), %rdx
callq 0x6b5e0
jmp 0x6b754
movl $0x1, -0x74(%rbp)
jmp 0x6b9af
leaq -0x38(%rbp), %rdi
callq 0x6cc70
cmpl $0x1, 0x20(%rax)
je 0x6b80c
movq -0x18(%rbp), %rdx
leaq 0x25828(%rip), %rsi     # 0x90fa6
leaq -0x98(%rbp), %rdi
callq 0x16320
jmp 0x6b78c
movl $0x28, %edi
callq 0x41c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x130(%rbp)
movl $0x9, %esi
leaq -0x98(%rbp), %rdx
callq 0x73a90
jmp 0x6b7b6
movq -0x130(%rbp), %rdi
leaq 0x5a58c(%rip), %rsi     # 0xc5d50
leaq -0x5593b(%rip), %rdx    # 0x15e90
callq 0x45b0
jmp 0x6b9da
movq -0x130(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x4280
jmp 0x6b7fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4688
jmp 0x6b9c8
leaq -0x38(%rbp), %rdi
callq 0x6cc70
movq %rax, %rsi
addq $0x28, %rsi
leaq -0xb0(%rbp), %rdi
callq 0x4f5b0
jmp 0x6b82a
leaq -0xb0(%rbp), %rdi
callq 0x167a0
testb $0x1, %al
jne 0x6b83f
jmp 0x6b8e9
movq -0x18(%rbp), %rdx
leaq 0x2575c(%rip), %rsi     # 0x90fa6
leaq -0xd0(%rbp), %rdi
callq 0x16320
jmp 0x6b858
movl $0x28, %edi
callq 0x41c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x138(%rbp)
movl $0xa, %esi
leaq -0xd0(%rbp), %rdx
callq 0x73a90
jmp 0x6b882
movq -0x138(%rbp), %rdi
leaq 0x5a4c0(%rip), %rsi     # 0xc5d50
leaq -0x55a07(%rip), %rdx    # 0x15e90
callq 0x45b0
jmp 0x6b9da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6b9a1
movq -0x138(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x4280
jmp 0x6b8d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x4688
jmp 0x6b9a1
leaq -0xb0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x1a560
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x1a590
movq %rax, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x40110
testb $0x1, %al
jne 0x6b936
jmp 0x6b97c
leaq -0xe0(%rbp), %rdi
callq 0x40150
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x6cee0
jmp 0x6b96c
jmp 0x6b96e
leaq -0xe0(%rbp), %rdi
callq 0x40170
jmp 0x6b91d
movq -0x118(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6cf50
movl $0x1, -0x74(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x166a0
jmp 0x6b9af
leaq -0xb0(%rbp), %rdi
callq 0x166a0
jmp 0x6b9c8
leaq -0x30(%rbp), %rdi
callq 0x16240
movq -0x110(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x16240
movq -0x40(%rbp), %rdi
callq 0x45e0
nopw (%rax,%rax)