// File: /workspace/github_cpp_makefile_star2_O1/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 $0x168, %rsp            # imm = 0x168
movq %r8, %rbx
movq %rcx, -0x78(%rbp)
movq %rdx, %r14
movq %rsi, -0x88(%rbp)
movq %rdi, %r15
movl $0x1b, %esi
callq 0x17bc8
movq %rax, -0xc8(%rbp)
movq %r14, -0x80(%rbp)
shlq $0x5, %r14
movq %r15, -0xc0(%rbp)
addq (%r15), %r14
movq %r14, %rdi
callq 0x1ce4e
movq %rax, -0xb8(%rbp)
movq %rbx, -0x90(%rbp)
movq %rbx, %rdi
callq 0x30230
leaq -0x188(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2feec
leaq -0x148(%rbp), %rdi
movq %rbx, %rsi
callq 0x318b6
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movq $0x0, -0xa0(%rbp)
movq -0x148(%rbp), %r12
movq -0x140(%rbp), %rbx
cmpq %rbx, %r12
je 0x188c9
leaq -0x188(%rbp), %r15
leaq -0x130(%rbp), %r14
leaq -0x50(%rbp), %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x301ee
cmpl $0x2, %eax
je 0x1884a
testl %eax, %eax
je 0x18b63
cmpl $0x1, %eax
jne 0x188bc
jmp 0x189a4
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x30e12
movq %r13, %rdi
movq %r14, %rsi
callq 0x2eff6
movq %r14, %rdi
callq 0x2efec
movq %rax, %rdi
callq 0x2770a
movq %rax, -0x70(%rbp)
leaq -0xb0(%rbp), %rdi
movq %r13, %rsi
leaq -0x70(%rbp), %rdx
callq 0x18fcc
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1889c
callq 0x42b0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x188b4
callq 0x42b0
movq %r14, %rdi
callq 0x28344
addq $0x20, %r12
cmpq %rbx, %r12
jne 0x18828
leaq -0x50(%rbp), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
leaq -0x130(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x28370
leaq -0x50(%rbp), %rdi
callq 0x19032
leaq -0x188(%rbp), %rdi
callq 0x30f92
movq -0xc8(%rbp), %rbx
movq -0xc0(%rbp), %r14
movq %rax, %rdi
callq 0x30230
leaq -0x130(%rbp), %rdx
movq %rax, %rdi
movq -0xb8(%rbp), %rsi
callq 0x3027a
movq %r14, %rdi
movq -0x88(%rbp), %rsi
movq %rbx, %rdx
callq 0x17c42
movq %r14, %rdi
movq -0x80(%rbp), %rsi
movq %rbx, %rdx
callq 0x17c42
movq %r14, %rdi
movq -0x78(%rbp), %rsi
movq %rbx, %rdx
callq 0x17c42
leaq -0x130(%rbp), %rdi
callq 0x28344
leaq -0xb0(%rbp), %rdi
callq 0x19032
leaq -0x148(%rbp), %rdi
callq 0xee68
leaq -0x188(%rbp), %rdi
callq 0x317b6
movq %rbx, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x120(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2ddcf(%rip), %rsi     # 0x46785
leaq 0x2de30(%rip), %rdx     # 0x467ed
leaq -0x130(%rbp), %rdi
callq 0xf65c
leaq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xe329
leaq 0x2de0e(%rip), %rsi     # 0x467ee
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe2af
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18a13
callq 0x42b0
leaq -0x60(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x18a25
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xe329
leaq 0x2ddc4(%rip), %rsi     # 0x467fd
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe2af
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18a6c
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18a7a
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xe329
leaq 0x2dd79(%rip), %rsi     # 0x46807
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe2af
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18ac1
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18acf
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xe329
leaq 0x2dd31(%rip), %rsi     # 0x46817
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe2af
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18b19
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18b27
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x130(%rbp), %rdx
movq %rax, %rdi
movl $0x13, %esi
callq 0x33d12
leaq 0x43221(%rip), %rsi     # 0x5bd70
leaq -0xa79c(%rip), %rdx     # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x18d1a
leaq -0x120(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2dc10(%rip), %rsi     # 0x46785
leaq 0x2dc71(%rip), %rdx     # 0x467ed
leaq -0x130(%rbp), %rdi
callq 0xf65c
leaq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xe329
leaq 0x2dc4f(%rip), %rsi     # 0x467ee
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe2af
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18bd2
callq 0x42b0
leaq -0x60(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x18be4
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xe329
leaq 0x2dc05(%rip), %rsi     # 0x467fd
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe2af
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18c2b
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18c39
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xe329
leaq 0x2dbba(%rip), %rsi     # 0x46807
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe2af
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18c80
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18c8e
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xe329
leaq 0x2db72(%rip), %rsi     # 0x46817
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe2af
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x4110
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18cd8
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18ce6
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x130(%rbp), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x33d12
leaq 0x43065(%rip), %rsi     # 0x5bd70
leaq -0xa958(%rip), %rdx     # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x18dcb
jmp 0x18d26
jmp 0x18dcb
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
jmp 0x18dce
jmp 0x18d56
jmp 0x18d56
jmp 0x18d6f
jmp 0x18d6f
jmp 0x18dcb
jmp 0x18dcb
jmp 0x18d56
jmp 0x18d56
jmp 0x18d6f
jmp 0x18d6f
jmp 0x18dcb
jmp 0x18dcb
jmp 0x18d56
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18d72
callq 0x42b0
jmp 0x18d72
jmp 0x18d6f
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
jne 0x18dc2
jmp 0x18dce
jmp 0x18dcb
jmp 0x18dcb
jmp 0x18d83
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18db5
callq 0x42b0
jmp 0x18db5
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x19032
jmp 0x18e23
movq %rax, %rbx
jmp 0x18e3b
jmp 0x18db2
movq %rax, %rbx
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18dce
callq 0x42b0
jmp 0x18dce
jmp 0x18dcb
movq %rax, %rbx
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x18e23
callq 0x42b0
jmp 0x18e23
jmp 0x18dfd
jmp 0x18dfd
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
callq 0x28344
jmp 0x18e23
movq %rax, %rbx
jmp 0x18e17
jmp 0x18dfd
movq %rax, %rbx
jmp 0x18e23
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18e17
callq 0x42b0
leaq -0x130(%rbp), %rdi
callq 0xe6f2
leaq -0xb0(%rbp), %rdi
callq 0x19032
leaq -0x148(%rbp), %rdi
callq 0xee68
leaq -0x188(%rbp), %rdi
callq 0x317b6
movq %rbx, %rdi
callq 0x4560
nop