// File: /workspace/github_cpp_makefile_star2_O3/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 0x17c64
movq %rax, -0xc8(%rbp)
movq %r14, -0x80(%rbp)
shlq $0x5, %r14
movq %r15, -0xc0(%rbp)
addq (%r15), %r14
movq %r14, %rdi
callq 0x1ced2
movq %rax, -0xb8(%rbp)
movq %rbx, -0x90(%rbp)
movq %rbx, %rdi
callq 0x2f994
leaq -0x188(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2f61c
leaq -0x148(%rbp), %rdi
movq %rbx, %rsi
callq 0x30fac
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movq $0x0, -0xa0(%rbp)
movq -0x148(%rbp), %r12
movq -0x140(%rbp), %rbx
cmpq %rbx, %r12
je 0x18961
leaq -0x188(%rbp), %r15
leaq -0x130(%rbp), %r14
leaq -0x50(%rbp), %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x2f942
cmpl $0x2, %eax
je 0x188e2
testl %eax, %eax
je 0x18bfb
cmpl $0x1, %eax
jne 0x18954
jmp 0x18a3c
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x30510
movq %r13, %rdi
movq %r14, %rsi
callq 0x2e730
movq %r14, %rdi
callq 0x2e726
movq %rax, %rdi
callq 0x270b4
movq %rax, -0x70(%rbp)
leaq -0xb0(%rbp), %rdi
movq %r13, %rsi
leaq -0x70(%rbp), %rdx
callq 0x19064
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18934
callq 0x42b0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x1894c
callq 0x42b0
movq %r14, %rdi
callq 0x27ca8
addq $0x20, %r12
cmpq %rbx, %r12
jne 0x188c0
leaq -0x50(%rbp), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
leaq -0x130(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x27cce
leaq -0x50(%rbp), %rdi
callq 0x190ca
leaq -0x188(%rbp), %rdi
callq 0x306a2
movq -0xc8(%rbp), %rbx
movq -0xc0(%rbp), %r14
movq %rax, %rdi
callq 0x2f994
leaq -0x130(%rbp), %rdx
movq %rax, %rdi
movq -0xb8(%rbp), %rsi
callq 0x2f9e2
movq %r14, %rdi
movq -0x88(%rbp), %rsi
movq %rbx, %rdx
callq 0x17cde
movq %r14, %rdi
movq -0x80(%rbp), %rsi
movq %rbx, %rdx
callq 0x17cde
movq %r14, %rdi
movq -0x78(%rbp), %rsi
movq %rbx, %rdx
callq 0x17cde
leaq -0x130(%rbp), %rdi
callq 0x27ca8
leaq -0xb0(%rbp), %rdi
callq 0x190ca
leaq -0x148(%rbp), %rdi
callq 0xf04e
leaq -0x188(%rbp), %rdi
callq 0x30eac
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 0x2cd37(%rip), %rsi     # 0x45785
leaq 0x2cd98(%rip), %rdx     # 0x457ed
leaq -0x130(%rbp), %rdi
callq 0xf868
leaq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xe50f
leaq 0x2cd76(%rip), %rsi     # 0x457ee
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe495
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 0x18aab
callq 0x42b0
leaq -0x60(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x18abd
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xe50f
leaq 0x2cd2c(%rip), %rsi     # 0x457fd
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe495
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 0x18b04
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18b12
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xe50f
leaq 0x2cce1(%rip), %rsi     # 0x45807
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe495
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 0x18b59
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18b67
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xe50f
leaq 0x2cc99(%rip), %rsi     # 0x45817
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe495
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 0x18bb1
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18bbf
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x130(%rbp), %rdx
movq %rax, %rdi
movl $0x13, %esi
callq 0x333ee
leaq 0x42189(%rip), %rsi     # 0x5ad70
leaq -0xa64e(%rip), %rdx     # 0xe5a0
movq %r14, %rdi
callq 0x4540
jmp 0x18db2
leaq -0x120(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2cb78(%rip), %rsi     # 0x45785
leaq 0x2cbd9(%rip), %rdx     # 0x457ed
leaq -0x130(%rbp), %rdi
callq 0xf868
leaq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xe50f
leaq 0x2cbb7(%rip), %rsi     # 0x457ee
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe495
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 0x18c6a
callq 0x42b0
leaq -0x60(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x18c7c
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xe50f
leaq 0x2cb6d(%rip), %rsi     # 0x457fd
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe495
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 0x18cc3
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18cd1
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xe50f
leaq 0x2cb22(%rip), %rsi     # 0x45807
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe495
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 0x18d18
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18d26
callq 0x42b0
leaq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xe50f
leaq 0x2cada(%rip), %rsi     # 0x45817
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0xe495
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 0x18d70
callq 0x42b0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x18d7e
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x130(%rbp), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x333ee
leaq 0x41fcd(%rip), %rsi     # 0x5ad70
leaq -0xa80a(%rip), %rdx     # 0xe5a0
movq %r14, %rdi
callq 0x4540
jmp 0x18e63
jmp 0x18dbe
jmp 0x18e63
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
jmp 0x18e66
jmp 0x18dee
jmp 0x18dee
jmp 0x18e07
jmp 0x18e07
jmp 0x18e63
jmp 0x18e63
jmp 0x18dee
jmp 0x18dee
jmp 0x18e07
jmp 0x18e07
jmp 0x18e63
jmp 0x18e63
jmp 0x18dee
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18e0a
callq 0x42b0
jmp 0x18e0a
jmp 0x18e07
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
jne 0x18e5a
jmp 0x18e66
jmp 0x18e63
jmp 0x18e63
jmp 0x18e1b
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18e4d
callq 0x42b0
jmp 0x18e4d
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x190ca
jmp 0x18ebb
movq %rax, %rbx
jmp 0x18ed3
jmp 0x18e4a
movq %rax, %rbx
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18e66
callq 0x42b0
jmp 0x18e66
jmp 0x18e63
movq %rax, %rbx
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x18ebb
callq 0x42b0
jmp 0x18ebb
jmp 0x18e95
jmp 0x18e95
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
callq 0x27ca8
jmp 0x18ebb
movq %rax, %rbx
jmp 0x18eaf
jmp 0x18e95
movq %rax, %rbx
jmp 0x18ebb
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x18eaf
callq 0x42b0
leaq -0x130(%rbp), %rdi
callq 0xe8d8
leaq -0xb0(%rbp), %rdi
callq 0x190ca
leaq -0x148(%rbp), %rdi
callq 0xf04e
leaq -0x188(%rbp), %rdi
callq 0x30eac
movq %rbx, %rdi
callq 0x4560
nop