// File: acliusBackHome[P]kamaya/dist/ParseNode.cpp
// Function: ParseNode::collect_init_declarator() const
void ParseNode::collect_init_declarator() const {
    auto &the_map = tree.node_init_dec;
    InitDeclarator res(get_symbol(), ParseExpression(), get_ptr_lv(), vector<size_t>(), get_param_list_node());
    // 获取元祖引用以便修改其值
    // 初始化表达式可能会有变动
    ParseExpression &init_expression = get<1>(res);
    // 数组大小声明可能会有变动
    vector<size_t> &arr_size = get<3>(res);
    switch (type) {
        case N_DECLARATOR: {
            arr_size = get_array_size();
            break;
        }
        case N_INIT_DECLARATOR: {
            // 因为有两个表达式, 一个是初始化表达式, 一个是数组大小声明表达式
            // 所以get_expression在该节点有歧义, 必须分开
            for (const auto &each : tree.node_children[node_id]) {
                const ParseNode &child = tree.nodes[each];
                switch (child.type) {
                    case N_DECLARATOR: {
                        arr_size = child.get_array_size();
                        break;
                    }
                    case N_INITIALIZER : {
                        // TODO:其实可以只记录指针
                        init_expression = ParseExpression(child.get_expression());
                        break;
                    }
                    default:
                        break;
                }
            }
            break;
        }
        default: {
            string info = "ParseNode::collect_init_declarator(): node_type=";
            info += get_node_type_name(type);
            info += "node_id=" + to_string(node_id);
            throw ParseException(EX_NODE_NOT_ALLOW_OP, info);
        }
    }
    // 到此res就是抽取出的InitDeclarator
    // 这里强制转换成非常量指针来改变keys表示该节点拥有这个键值
    ((ParseNode *) this)->keys |= K_INIT_DEC;
    the_map[node_id] = res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
movq 0x10(%rdi), %rax
addq $0x4c8, %rax            # imm = 0x4C8
movq %rax, -0x10(%rbp)
callq 0x3dd30
movq %rax, -0x200(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x61e30
movq -0x1f8(%rbp), %rdi
callq 0x3ddd0
movq %rax, -0x1f0(%rbp)
jmp 0x3fbc5
movq -0x1f0(%rbp), %rax
movq %rax, -0xc0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xf0(%rbp)
movq $0x0, -0xe0(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x16700
movq -0x1f8(%rbp), %rdi
callq 0x3de00
movq %rax, -0x208(%rbp)
jmp 0x3fc09
movq -0x200(%rbp), %rsi
movq -0x208(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
leaq -0xf0(%rbp), %r8
leaq -0xf8(%rbp), %r9
callq 0x48df0
jmp 0x3fc48
leaq -0xf0(%rbp), %rdi
callq 0x166a0
leaq -0xb8(%rbp), %rdi
callq 0x62810
leaq -0x88(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x48e40
movq -0x218(%rbp), %rdi
movq %rax, -0x100(%rbp)
callq 0x48e60
movq %rax, %rcx
movq -0x1f8(%rbp), %rax
movq %rcx, -0x108(%rbp)
movl 0x18(%rax), %eax
movl %eax, -0x20c(%rbp)
subl $0x6, %eax
je 0x3fcfe
jmp 0x3fca7
movl -0x20c(%rbp), %eax
subl $0xb, %eax
je 0x3fd44
jmp 0x3feb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x3fced
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x166a0
leaq -0xb8(%rbp), %rdi
callq 0x62810
jmp 0x400f5
movq -0x1f8(%rbp), %rdi
callq 0x3de50
movq %rax, -0x220(%rbp)
jmp 0x3fd13
movq -0x220(%rbp), %rsi
movq -0x108(%rbp), %rdi
callq 0x48e80
jmp 0x3fd28
jmp 0x4009e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x400e9
movq -0x1f8(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x60, %rdi
movq (%rax), %rsi
callq 0x340a0
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdi
callq 0x34240
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rdi
callq 0x34270
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x342a0
testb $0x1, %al
jne 0x3fda4
jmp 0x3feb3
leaq -0x118(%rbp), %rdi
callq 0x342e0
movq %rax, %rcx
movq -0x1f8(%rbp), %rax
movq %rcx, -0x128(%rbp)
movq 0x10(%rax), %rdi
movq -0x128(%rbp), %rax
movq (%rax), %rsi
callq 0x34080
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x224(%rbp)
subl $0x6, %eax
je 0x3fe02
jmp 0x3fdf2
movl -0x224(%rbp), %eax
subl $0xd, %eax
je 0x3fe2e
jmp 0x3fe9e
movq -0x130(%rbp), %rdi
callq 0x3de50
movq %rax, -0x230(%rbp)
jmp 0x3fe17
movq -0x230(%rbp), %rsi
movq -0x108(%rbp), %rdi
callq 0x48e80
jmp 0x3fe2c
jmp 0x3fea0
movq -0x130(%rbp), %rdi
callq 0x3de30
movq %rax, -0x238(%rbp)
jmp 0x3fe43
movq -0x238(%rbp), %rsi
leaq -0x160(%rbp), %rdi
callq 0x61f40
jmp 0x3fe58
movq -0x100(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x629c0
jmp 0x3fe6d
leaq -0x160(%rbp), %rdi
callq 0x62810
jmp 0x3fea0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x62810
jmp 0x400e9
jmp 0x3fea0
jmp 0x3fea2
leaq -0x118(%rbp), %rdi
callq 0x34300
jmp 0x3fd88
jmp 0x4009e
leaq -0x181(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x45f0
movq -0x240(%rbp), %rdx
leaq 0x4fd6f(%rip), %rsi     # 0x8fc48
leaq -0x180(%rbp), %rdi
callq 0x4450
jmp 0x3fee7
leaq -0x181(%rbp), %rdi
callq 0x4380
movq -0x1f8(%rbp), %rax
movl 0x18(%rax), %esi
leaq -0x1a8(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x3bcf0
movq -0x248(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x43f0
jmp 0x3ff25
leaq -0x1a8(%rbp), %rdi
callq 0x4688
movq -0x1f8(%rbp), %rax
movq (%rax), %rsi
leaq -0x1e8(%rbp), %rdi
callq 0x15db0
jmp 0x3ff49
leaq 0x4f7c7(%rip), %rsi     # 0x8f717
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rdx
callq 0x15d60
jmp 0x3ff65
leaq -0x180(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x43f0
jmp 0x3ff7a
leaq -0x1c8(%rbp), %rdi
callq 0x4688
leaq -0x1e8(%rbp), %rdi
callq 0x4688
movl $0x28, %edi
callq 0x41c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x250(%rbp)
movl $0x4, %esi
leaq -0x180(%rbp), %rdx
callq 0x73a90
jmp 0x3ffbc
movq -0x250(%rbp), %rdi
leaq 0x85d86(%rip), %rsi     # 0xc5d50
leaq -0x2a141(%rip), %rdx    # 0x15e90
callq 0x45b0
jmp 0x40101
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x181(%rbp), %rdi
callq 0x4380
jmp 0x400e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x4688
jmp 0x40090
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x40090
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x40064
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x4688
leaq -0x1e8(%rbp), %rdi
callq 0x4688
jmp 0x40090
movq -0x250(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
callq 0x4280
leaq -0x180(%rbp), %rdi
callq 0x4688
jmp 0x400e9
movq -0x1f8(%rbp), %rsi
movb 0xa(%rsi), %al
orb $0x20, %al
movb %al, 0xa(%rsi)
movq -0x10(%rbp), %rdi
callq 0x490d0
movq %rax, -0x258(%rbp)
jmp 0x400bf
movq -0x258(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x491b0
jmp 0x400d4
leaq -0x88(%rbp), %rdi
callq 0x217f0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
leaq -0x88(%rbp), %rdi
callq 0x217f0
movq -0xc8(%rbp), %rdi
callq 0x45e0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)