// File: /workspace/github_cpp_makefile_star2_O1/acliusBackHome[P]kamaya/dist/ParseNode.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& ParseNode::get_field<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(NodeKey) const
MapType &ParseNode::get_field(NodeKey key) const {
    const auto key_map_iter = tree.node_key2map.find(key);
    map<size_t, MapType> &the_map = *((map<size_t, MapType> *) (key_map_iter->second));
    typedef typename map<size_t, MapType>::iterator MapIter;
    if (keys & key) {
        // 当前节点标记中有该key记录
        // 找该key对应的map
        if (key_map_iter == tree.node_key2map.end()) {
            // 但是没有找到key对应的记录
            // 说明没有定义key对应的map, 有bug
            string info = "NodeKey:";
            info += get_key_name(key) + " not defined.";
            throw ParseException(EX_NODE_KEY_NOT_DEFINED, info);
        }
        const MapIter &iter = the_map.find(node_id);
        if (iter == the_map.end()) {
            // 该节点标记有该记录, 但是对应的map中找不到该节点id的记录, 数据一致性被破坏 有bug
            string info = "ParseNode::get_field(NodeKey key): key=";
            info += get_key_name(key) + ", node_id=";
            info += to_string(node_id);
            throw ParseException(EX_NODE_KEY_DEFINED_NOT_FOUND, info);
        }
        return iter->second;
    } else {
        // 当前节点没有该记录
        // 有些节点是需要收集子树的信息来生成自身节点的信息, 所以需要先做一些动作进行收集信息
        switch (type) {
            case N_PARAM_LIST: {
                if (key == K_PARAM_LIST) {
                    collect_parameters_list();
                    return the_map.find(node_id)->second;
                }
                break;
            }
            case N_DECLARATOR:
            case N_INIT_DECLARATOR: {
                if (key == K_INIT_DEC) {
                    collect_init_declarator();
                    return the_map.find(node_id)->second;
                }
                break;
            }
            default:
                break;
        }
        // 试图向下搜索节点
        for (const auto &child_id: tree.node_children[node_id]) {
            const auto &child = tree.nodes[child_id];
            auto iter = tree.search_able.find(HasNodeKey(key, type, child.type));
            if (iter != tree.search_able.end()) {
                // 找到了记录, 说明该子节点存在唯一的key记录, 返回之
                return child.get_field<MapType>(key);
            }
        }
        // 到这仍未返回, 表示该节点没有该key唯一信息,
        // 说明存在异常, 因为只有当节点一定有该key唯一信息时才会调用此函数
        string info = "ParseNode::get_field(NodeKey key): key=";
        info += get_key_name(key) + ", node_id=";
        info += to_string(node_id);
        throw ParseException(EX_NODE_NO_SUCH_KEY, info);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq 0x568(%rax), %r8
leaq 0x560(%rax), %rcx
movq %rcx, %rdx
testq %r8, %r8
je 0x20526
movq %rcx, %rdx
xorl %edi, %edi
cmpl %esi, 0x20(%r8)
setl %dil
cmovgeq %r8, %rdx
movq 0x10(%r8,%rdi,8), %r8
testq %r8, %r8
jne 0x2050e
movq %rcx, %rdi
cmpq %rcx, %rdx
je 0x20538
cmpl %esi, 0x20(%rdx)
cmovgq %rcx, %rdx
movq %rdx, %rdi
movq 0x28(%rdi), %rbx
testl %esi, 0x8(%r14)
movl %esi, -0x2c(%rbp)
je 0x205a7
cmpq %rcx, %rdi
je 0x2072e
movq 0x10(%rbx), %rcx
addq $0x8, %rbx
movq %rbx, %rax
testq %rcx, %rcx
je 0x2057c
movq (%r14), %rdx
movq %rbx, %rax
xorl %esi, %esi
cmpq %rdx, 0x20(%rcx)
setb %sil
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x20564
movq %rbx, %rcx
cmpq %rbx, %rax
je 0x20592
movq (%r14), %rcx
cmpq 0x20(%rax), %rcx
cmovbq %rbx, %rax
movq %rax, %rcx
cmpq %rbx, %rcx
je 0x20795
addq $0x28, %rcx
movq %rcx, %rbx
jmp 0x20719
movl 0x18(%r14), %ecx
cmpl $0x6, %ecx
je 0x20602
cmpl $0xb, %ecx
je 0x20602
cmpl $0x8, %ecx
jne 0x20659
cmpl $0x100000, %esi         # imm = 0x100000
jne 0x20659
movq %r14, %rdi
callq 0x1df66
movq 0x10(%rbx), %rcx
addq $0x8, %rbx
movq %rbx, %rax
testq %rcx, %rcx
je 0x20640
movq (%r14), %rdx
movq %rbx, %rax
xorl %esi, %esi
cmpq %rdx, 0x20(%rcx)
setb %sil
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x205e8
jmp 0x20640
cmpl $0x200000, %esi         # imm = 0x200000
jne 0x20659
movq %r14, %rdi
callq 0x1e174
movq 0x10(%rbx), %rcx
addq $0x8, %rbx
movq %rbx, %rax
testq %rcx, %rcx
je 0x20640
movq (%r14), %rdx
movq %rbx, %rax
xorl %esi, %esi
cmpq %rdx, 0x20(%rcx)
setb %sil
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x20628
cmpq %rbx, %rax
je 0x20650
movq (%r14), %rcx
cmpq 0x20(%rax), %rcx
cmovaeq %rax, %rbx
addq $0x28, %rbx
jmp 0x20719
movq (%r14), %rcx
movq 0x60(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %r15
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0xb0(%rbp)
cmpq %rax, %r15
sete %cl
je 0x20700
xorl %ecx, %ecx
movq %r14, -0x80(%rbp)
movl %ecx, -0x74(%rbp)
movq 0x10(%r14), %rdi
movq (%r15), %rbx
movq (%rdi), %r13
shlq $0x5, %rbx
addq $0x588, %rdi            # imm = 0x588
movl 0x18(%r13,%rbx), %eax
movl %eax, -0x70(%rbp)
movl 0x18(%r14), %eax
movl %eax, -0x6c(%rbp)
movl %esi, -0x68(%rbp)
leaq -0x70(%rbp), %rsi
callq 0x26d06
movq %rax, %r12
movq 0x10(%r14), %r14
movl $0x590, %eax            # imm = 0x590
addq %rax, %r14
cmpq %r14, %r12
je 0x206e2
addq %rbx, %r13
movq %r13, %rdi
movl -0x2c(%rbp), %esi
callq 0x204da
movq %rax, -0xa8(%rbp)
cmpq %r14, %r12
jne 0x20702
addq $0x8, %r15
cmpq -0xb0(%rbp), %r15
sete %cl
movq -0x80(%rbp), %r14
movl -0x2c(%rbp), %esi
jne 0x20686
jmp 0x20709
jmp 0x20709
movq -0x80(%rbp), %r14
movl -0x74(%rbp), %ecx
testb $0x1, %cl
movq -0xa8(%rbp), %rbx
jne 0x20800
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x60(%rbp), %r15
movq %r15, -0x10(%r15)
movabsq $0x3a79654b65646f4e, %rax # imm = 0x3A79654B65646F4E
movq %rax, (%r15)
movq $0x8, -0x8(%r15)
movb $0x0, 0x8(%r15)
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x1a492
leaq 0x26668(%rip), %rsi     # 0x46dce
movq %rbx, %rdi
callq 0x45c0
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x2086b
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x20876
movq %r14, %rbx
leaq -0x60(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x26634(%rip), %rsi     # 0x46ddc
leaq 0x26654(%rip), %rdx     # 0x46e03
leaq -0x70(%rbp), %rdi
callq 0xf65c
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movl -0x2c(%rbp), %esi
callq 0x1a492
leaq 0x2658a(%rip), %rsi     # 0x46d5b
movq %r15, %rdi
callq 0x45c0
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x208fa
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x20905
movq %r14, %rbx
leaq -0x60(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x265c9(%rip), %rsi     # 0x46ddc
leaq 0x265e9(%rip), %rdx     # 0x46e03
leaq -0x70(%rbp), %rdi
callq 0xf65c
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movl -0x2c(%rbp), %esi
callq 0x1a492
leaq 0x2651f(%rip), %rsi     # 0x46d5b
movq %r15, %rdi
callq 0x45c0
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x209b4
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x209bf
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x208ac
callq 0x42b0
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x208c1
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x70(%rbp), %rdx
movq %rax, %rdi
movl $0x1, %esi
callq 0x33d12
leaq 0x3b48a(%rip), %rsi     # 0x5bd70
leaq -0x12533(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x20a69
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x2093b
callq 0x42b0
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20950
callq 0x42b0
movq (%rbx), %rsi
leaq -0x50(%rbp), %rdi
callq 0xe329
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x2097b
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x70(%rbp), %rdx
movq %rax, %rdi
movl $0x3, %esi
callq 0x33d12
leaq 0x3b3d0(%rip), %rsi     # 0x5bd70
leaq -0x125ed(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x20a69
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x209f5
callq 0x42b0
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20a0a
callq 0x42b0
movq (%rbx), %rsi
leaq -0x50(%rbp), %rdi
callq 0xe329
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x20a35
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x70(%rbp), %rdx
movq %rax, %rdi
movl $0x2, %esi
callq 0x33d12
leaq 0x3b316(%rip), %rsi     # 0x5bd70
leaq -0x126a7(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x20a90
jmp 0x20a71
jmp 0x20a80
jmp 0x20a90
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
jmp 0x20ad6
jmp 0x20a90
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
jne 0x20ad1
jmp 0x20ad6
jmp 0x20a97
movq %rax, %rbx
jmp 0x20ad6
jmp 0x20abe
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x20ac1
callq 0x42b0
jmp 0x20ac1
movq %rax, %rbx
jmp 0x20b11
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
jmp 0x20b11
jmp 0x20af4
movq %rax, %rbx
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20ad6
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
jne 0x20b1a
jmp 0x20b1f
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x20afc
callq 0x42b0
jmp 0x20afc
movq %rax, %rbx
jmp 0x20b1f
movq %rax, %rbx
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20b11
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0x20b1f
callq 0x42b0
movq %rbx, %rdi
callq 0x4560
nop