// File: /workspace/github_cpp_makefile_star2_O2/acliusBackHome[P]kamaya/dist/ParseTree.cpp
// Function: ParseTree::make_struct_node(unsigned long, unsigned long, unsigned long, unsigned long)
size_t ParseTree::make_struct_node(size_t str_emn_node, size_t id_node,
                                   size_t dec_list_node, size_t scope_now) {
    size_t new_one = new_node(N_STRUCT_ENUM);
    const string &str_symbol = nodes[id_node].get_symbol();
    const auto the_scope = ParseScope::get_scope(scope_now);
    auto symbol_list = the_scope.get_all_dec_symbol();
    vector<pair<string, size_t> > member;
    for (const auto &each_symbol : symbol_list) {
        auto dec_type = the_scope.get_symbol_dec_type(each_symbol);
        switch (dec_type) {
            case D_FUNCTION: {
                // 目前不支持
                string info = "ParseTree::make_struct_node(size_t str_emn_node, size_t id_node, "
                              "size_t dec_list_node, size_t scope_now)";
                info += " str_emn_node=" + to_string(str_emn_node);
                info += " id_node=" + to_string(id_node);
                info += " dec_list_node=" + to_string(dec_list_node);
                info += " scope_now=" + to_string(scope_now);
                throw ParseException(EX_NOT_IMPLEMENTED, info);
            }
            case D_UNKNOWN: {
                string info = "ParseTree::make_struct_node(size_t str_emn_node, size_t id_node, "
                              "size_t dec_list_node, size_t scope_now)";
                info += " str_emn_node=" + to_string(str_emn_node);
                info += " id_node=" + to_string(id_node);
                info += " dec_list_node=" + to_string(dec_list_node);
                info += " scope_now=" + to_string(scope_now);
                throw ParseException(EX_UNKNOWN, info);
            }
            case D_VARIABLE: {
                const auto &var = the_scope.get_variable_declaration(each_symbol);
                member.emplace_back(var.get_symbol(), var.get_type().get_id());
            }
            case D_TYPE: {
                break;
            }
        }
    }
    ParseType new_type = ParseType::get_struct(member);
    auto &parent_scope = ParseScope::get_scope(the_scope.get_parent_scope_id());
    parent_scope.declaration(str_symbol, new_type);
    set_parent(str_emn_node, new_one);
    set_parent(id_node, new_one);
    set_parent(dec_list_node, new_one);
    return new_one;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %r8, %rbx
movq %rcx, -0x80(%rbp)
movq %rdx, %r14
movq %rsi, -0x90(%rbp)
movq %rdi, %r15
pushq $0x1b
popq %rsi
callq 0x15374
movq %rax, -0x78(%rbp)
movq %r14, -0x88(%rbp)
shlq $0x5, %r14
movq %r15, -0x98(%rbp)
addq (%r15), %r14
movq %r14, %rdi
callq 0x18e76
movq %rax, -0xa8(%rbp)
movq %rbx, -0xa0(%rbp)
movq %rbx, %rdi
callq 0x28370
leaq -0x180(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x280aa
leaq -0xd8(%rbp), %rdi
movq %rbx, %rsi
callq 0x294be
leaq -0xc0(%rbp), %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq -0xd8(%rbp), %r15
movq -0xd0(%rbp), %r13
leaq -0x180(%rbp), %r14
leaq -0x140(%rbp), %r12
leaq -0x50(%rbp), %rbx
cmpq %r13, %r15
je 0x15ee9
movq %r14, %rdi
movq %r15, %rsi
callq 0x2832e
cmpl $0x2, %eax
je 0x15e93
testl %eax, %eax
je 0x1612a
cmpl $0x1, %eax
jne 0x15ee3
jmp 0x15fc6
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x28cf6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x27500
movq %r12, %rdi
callq 0x274f6
movq %rax, %rdi
callq 0x212de
movq %rax, -0x70(%rbp)
leaq -0xc0(%rbp), %rdi
movq %rbx, %rsi
leaq -0x70(%rbp), %rdx
callq 0x1652a
movq %rbx, %rdi
callq 0x4598
movq %r12, %rdi
callq 0xca7e
addq $0x20, %r15
jmp 0x15e6c
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq -0x140(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x21c5c
leaq -0x50(%rbp), %rdi
callq 0x1656c
leaq -0x180(%rbp), %rdi
callq 0x28e60
movq %rax, %rdi
callq 0x28370
leaq -0x140(%rbp), %rdx
movq %rax, %rdi
movq -0xa8(%rbp), %rsi
callq 0x283be
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x153d8
movq -0x98(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x153d8
movq -0x98(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x153d8
leaq -0x140(%rbp), %rdi
callq 0x21c36
leaq -0xc0(%rbp), %rdi
callq 0x1656c
leaq -0xd8(%rbp), %rdi
callq 0xd092
leaq -0x180(%rbp), %rdi
callq 0x293f8
movq -0x78(%rbp), %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x247c4(%rip), %rsi     # 0x3a791
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x4130
leaq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xc865
leaq 0x24806(%rip), %rsi     # 0x3a7fa
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xc837
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4580
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xc865
leaq 0x247cf(%rip), %rsi     # 0x3a809
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xc837
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4580
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xc865
leaq 0x24796(%rip), %rsi     # 0x3a813
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xc837
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4580
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xc865
leaq 0x24760(%rip), %rsi     # 0x3a823
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xc837
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4580
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
pushq $0x28
popq %rdi
callq 0x4180
movq %rax, %r14
pushq $0x13
popq %rsi
leaq -0x140(%rbp), %rdx
movq %rax, %rdi
callq 0x2b53c
leaq 0x3cc5a(%rip), %rsi     # 0x52d70
leaq -0x9875(%rip), %rdx     # 0xc8a8
movq %r14, %rdi
callq 0x44e0
jmp 0x16288
leaq 0x24660(%rip), %rsi     # 0x3a791
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x4130
leaq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xc865
leaq 0x246a2(%rip), %rsi     # 0x3a7fa
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xc837
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4580
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xc865
leaq 0x2466b(%rip), %rsi     # 0x3a809
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xc837
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4580
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xc865
leaq 0x24632(%rip), %rsi     # 0x3a813
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xc837
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4580
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xc865
leaq 0x245fc(%rip), %rsi     # 0x3a823
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xc837
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4580
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x70(%rbp), %rdi
callq 0x4598
pushq $0x28
popq %rdi
callq 0x4180
movq %rax, %r14
leaq -0x140(%rbp), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2b53c
leaq 0x3caf7(%rip), %rsi     # 0x52d70
leaq -0x99d8(%rip), %rdx     # 0xc8a8
movq %r14, %rdi
callq 0x44e0
jmp 0x162f4
jmp 0x1628e
jmp 0x162f4
movq %rax, %rbx
movq %r14, %rdi
callq 0x4220
jmp 0x162f7
jmp 0x162c1
jmp 0x162c1
jmp 0x162e4
jmp 0x162e4
jmp 0x162f4
jmp 0x162f4
jmp 0x162c1
jmp 0x162c1
jmp 0x162e4
jmp 0x162e4
jmp 0x162f4
jmp 0x162f4
jmp 0x162c1
jmp 0x162c1
jmp 0x162e4
jmp 0x162e4
jmp 0x162f4
jmp 0x162f4
jmp 0x162c1
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4598
jmp 0x162e7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x1656c
jmp 0x1633e
movq %rax, %rbx
jmp 0x16356
jmp 0x162e4
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x4598
jmp 0x162f7
jmp 0x162f4
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x4598
jmp 0x1633e
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x21c36
jmp 0x1633e
jmp 0x16321
jmp 0x16321
movq %rax, %rbx
jmp 0x16332
jmp 0x16321
movq %rax, %rbx
jmp 0x1633e
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x4598
leaq -0x140(%rbp), %rdi
callq 0xca7e
leaq -0xc0(%rbp), %rdi
callq 0x1656c
leaq -0xd8(%rbp), %rdi
callq 0xd092
leaq -0x180(%rbp), %rdi
callq 0x293f8
movq %rbx, %rdi
callq 0x4500