// File: /workspace/github_cpp_makefile_star2_O1/Sooryakiran[P]dotV/src/verilog.cpp
// Function: Chip::auto_gen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string Chip::auto_gen(string head){
    /*------------------------------------------------------------------------------------------
    Automatically generates the chip module header definition

    Param : head (string), a module name.
    Returns : head_def

    Example if head = "module MY_CHIP"
    ------------------------------------------------------------------------------------------*/

    string head_def = head + " (";

    /*------------------------------------------------------------------------------------------
    head_def will be "module MY_CHIP("

    The next stage checks for any input declarations and head def will be appended
    ------------------------------------------------------------------------------------------*/

    for(vector<string>::iterator i = this->input_names.begin(); i != this->input_names.end(); i++){
        if(i!=this->input_names.begin()){
            head_def += ", ";
        }
        string input = *i;
        head_def += wire_name(input);
    }

    /*------------------------------------------------------------------------------------------
    The next stage checks for any output declarations and head def will be appended
    ------------------------------------------------------------------------------------------*/
    for(vector<string>::iterator i = this->output_names.begin(); i != this->output_names.end(); i++){
        string input = *i;
        head_def += ", " + wire_name(input);
    }
    head_def += ");";

    /*------------------------------------------------------------------------------------------
    At this stage head_def will be "module MY_CHIP(my_input_1, my_input_2, my_output);"
    ------------------------------------------------------------------------------------------*/

    // string pre = "";
    // if(this->n_bits > 1){
    //     pre = "[" + to_string(this->n_bits -1) + ": 0] ";
    // } 
    
    head_def += "\n\t// Transistor count : " + to_string(this->num_transistors()) + "\n";
    /*------------------------------------------------------------------------------------------
    In the next stage we again write these inputs and outputs inside the module. We also checked
    for the bit width to make appropriate declarations.
    ------------------------------------------------------------------------------------------*/
    head_def += "\n\t// Inputs\n\n";

    for(int i=0; i < this->input_names.size(); i++){
        if(this->is_input_reg.at(i))
            head_def += "\tinput reg "  + this->input_names.at(i) + ";\n";
        else
            head_def += "\tinput "  + this->input_names.at(i) + ";\n";
    }

    head_def += "\n\t// Outputs\n\n";
    for(int i=0; i < this->output_names.size(); i++){
        if(this->is_output_reg.at(i))
            head_def += "\toutput reg "  + this->output_names.at(i) + ";\n";
        else
            head_def += "\toutput "  + this->output_names.at(i) + ";\n";
    }

    /*------------------------------------------------------------------------------------------
    At this stage head_def will be assuming 8 bit width
    """
    module MY_CHIP(my_input_1, my_input_2, my_output);
        // Inputs
        input [7:0] my_input_1;
        input [7:0] my_input_2;
        // Outputs
        output [7:0] my_output;
    """
    ------------------------------------------------------------------------------------------*/

    /*------------------------------------------------------------------------------------------
    Now we add any wires and reg declared.
    ------------------------------------------------------------------------------------------*/
    head_def += "\n\t// Wires\n\n";
    for(vector<string>::iterator i = this->wires.begin(); i != this->wires.end(); i++){
        head_def += "\twire " + *i + ";\n";
    }

    head_def += "\n\t// Regs\n\n";
    for(vector<string>::iterator i = this->regs.begin(); i != this->regs.end(); i++){
        head_def += "\treg " + *i + ";\n";
    }

    /*------------------------------------------------------------------------------------------
    Embed any verilog codes.
    ------------------------------------------------------------------------------------------*/
    head_def += "\n\t// Extras\n\n";
    for(vector<string>::iterator i = this->extras.begin(); i != this->extras.end(); i++){
        head_def += "\t"+ *i + "\n";
    }

    /*------------------------------------------------------------------------------------------
    At this stage head_def will be something like
    """
    module MY_CHIP(my_input_1, my_input_2, my_output);
        // Inputs
        input [7:0] my_input_1;
        input [7:0] my_input_2;

        // Outputs
        output [7:0] my_output;

        // Wires
        wire my_wire_1;
        wire my_wire_2;
        wire [7:0] my_wide_wire;

        // Extras
        assign my_wire_1 = 0;

    """
    ------------------------------------------------------------------------------------------*/

    /*------------------------------------------------------------------------------------------
    Now add submodule instances.
    ------------------------------------------------------------------------------------------*/

    head_def += "\n\t// Sub Modules\n\n";
    for(vector<Chip>::iterator i = this->submodules.begin(); i != this->submodules.end(); i++){
        head_def += "\t" + i->generate + "\n";
    }

    /*------------------------------------------------------------------------------------------
    Now we add the behaviours specified
    ------------------------------------------------------------------------------------------*/

    head_def += "\n\t// Behaviours\n\n";
    for(vector<BehaviourModel>::iterator i = this->behaviours.begin(); i != this->behaviours.end(); i++){
        string code = i->code();
        size_t index = 0;
        while(string::npos != (index = code.find('\n', index))){
            code.replace(index, 1, "\n\t");
            index +=2;
        }
        

        head_def += "\t" + code + "\n";
    }

    head_def += "\nendmodule\n";

    /*------------------------------------------------------------------------------------------
    At this stage head_def will be something like
    """
    module MY_CHIP(my_input_1, my_input_2, my_output);
        // Inputs
        input [7:0] my_input_1;
        input [7:0] my_input_2;

        // Outputs
        output [7:0] my_output;

        // Wires
        wire my_wire_1;
        wire my_wire_2;
        wire [7:0] my_wide_wire;

        // Regs
        reg a;

        // Extras
        assign my_wire_1 = 0;

        // Submodules
        AND_GATE my_and_1(my_input_1[0], my_input_2[0], my_wire_1);
        ...

        // Behaviours
        
        always @(posedge my_input_1);
        begin;
            a <= ~my_input_2;
        end;

        ...

    endmodule
    """
    ------------------------------------------------------------------------------------------*/
    return head_def;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x78(%rbp)
movq %rax, (%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x7220
leaq 0x2e53c(%rip), %rsi     # 0x3706d
movq %rbx, -0x50(%rbp)
movq %rbx, %rdi
callq 0x7910
movq 0xe0(%r14), %r12
cmpq 0xe8(%r14), %r12
je 0x8c26
leaq -0x38(%rbp), %r13
leaq -0xc8(%rbp), %rbx
leaq -0xd8(%rbp), %r15
cmpq 0xe0(%r14), %r12
je 0x8b7c
movq -0x50(%rbp), %rdi
leaq 0x2e4f9(%rip), %rsi     # 0x37070
callq 0x7910
movq %r13, -0x48(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x7220
movq %rbx, -0xd8(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x7220
leaq -0x70(%rbp), %rdi
movq %r15, %rsi
callq 0x7420
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8be5
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8c00
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x8c15
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %r12
cmpq 0xe8(%r14), %r12
jne 0x8b63
movq 0x120(%r14), %r15
cmpq 0x128(%r14), %r15
je 0x8d7f
leaq -0x60(%rbp), %r13
leaq -0xb8(%rbp), %rbx
leaq -0x98(%rbp), %r12
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x7220
leaq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x7220
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7420
movl $0x2, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x2e3c9(%rip), %rcx     # 0x37070
callq 0x75b0
movq %r13, -0x70(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8ccc
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x8cd4
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x8d11
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x8d33
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x8d55
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8d6e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %r15
cmpq 0x128(%r14), %r15
jne 0x8c4c
leaq 0x2e98b(%rip), %rsi     # 0x37711
movq -0x50(%rbp), %rdi
callq 0x7910
movq %r14, %rdi
callq 0x7530
movl %eax, %r12d
movl %eax, %ebx
negl %ebx
cmovsl %eax, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x8df5
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebx, %ecx
cmpl $0x63, %ecx
jbe 0x8dec
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8df2
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8df5
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x8db9
addl $-0x3, %r15d
jmp 0x8df5
addl $-0x2, %r15d
jmp 0x8df5
decl %r15d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x98(%rbp), %rdi
movl $0x2d, %edx
callq 0x75e0
movl %r12d, %edi
leaq -0x98(%rbp), %r12
addq (%r12), %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x76b0
leaq 0x2e23b(%rip), %rcx     # 0x37073
movl $0x18, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x75b0
leaq -0x60(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8e6e
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x8e74
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq -0x70(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2e272(%rip), %rsi     # 0x37108
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8ebf
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8ec5
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8f06
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8f1f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x8f41
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x7510
leaq 0x2e144(%rip), %rsi     # 0x3708c
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0xe8(%r14), %rax
cmpq 0xe0(%r14), %rax
je 0x9103
leaq 0xf8(%r14), %r12
xorl %ebx, %ebx
leaq -0x70(%rbp), %r13
xorl %r15d, %r15d
movq %r12, %rdi
movq %r15, %rsi
callq 0x7940
testq %rdx, (%rax)
je 0x8feb
movq 0xe0(%r14), %rax
movq 0xe8(%r14), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x97dd
addq %rbx, %rax
movq %r13, %rdi
leaq 0x2e0ea(%rip), %rsi     # 0x3709a
movq %rax, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2e0e4(%rip), %rsi     # 0x370a6
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9051
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9057
movq 0xe0(%r14), %rax
movq 0xe8(%r14), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x97ff
addq %rbx, %rax
movq %r13, %rdi
leaq 0x2e093(%rip), %rsi     # 0x370a9
movq %rax, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2e07e(%rip), %rsi     # 0x370a6
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9081
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9087
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
jmp 0x90af
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x90c8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x90e1
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq 0xe8(%r14), %rax
subq 0xe0(%r14), %rax
incq %r15
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %r15, %rax
ja 0x8f75
leaq 0x2dfa7(%rip), %rsi     # 0x370b1
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0x128(%r14), %rax
cmpq 0x120(%r14), %rax
je 0x92c5
leaq 0x138(%r14), %r12
xorl %ebx, %ebx
leaq -0x70(%rbp), %r13
xorl %r15d, %r15d
movq %r12, %rdi
movq %r15, %rsi
callq 0x7940
testq %rdx, (%rax)
je 0x91ad
movq 0x120(%r14), %rax
movq 0x128(%r14), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x97ee
addq %rbx, %rax
movq %r13, %rdi
leaq 0x2df4e(%rip), %rsi     # 0x370c0
movq %rax, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2df22(%rip), %rsi     # 0x370a6
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9213
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9219
movq 0x120(%r14), %rax
movq 0x128(%r14), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x9810
addq %rbx, %rax
movq %r13, %rdi
leaq 0x2def5(%rip), %rsi     # 0x370cd
movq %rax, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2debc(%rip), %rsi     # 0x370a6
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9243
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9249
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
jmp 0x9271
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x928a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x92a3
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq 0x128(%r14), %rax
subq 0x120(%r14), %rax
incq %r15
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %r15, %rax
ja 0x9137
leaq 0x2de0a(%rip), %rsi     # 0x370d6
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0xb0(%r14), %rbx
cmpq 0xb8(%r14), %rbx
je 0x93a9
leaq 0x2ddf3(%rip), %r15     # 0x370e3
leaq -0x70(%rbp), %r12
leaq 0x2ddab(%rip), %r13     # 0x370a6
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7480
movq %r12, %rdi
movq %r13, %rsi
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9338
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x933e
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x937f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9398
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %rbx
cmpq 0xb8(%r14), %rbx
jne 0x92fb
leaq 0x2dd3a(%rip), %rsi     # 0x370ea
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0x160(%r14), %rbx
cmpq 0x168(%r14), %rbx
je 0x948d
leaq 0x2dd22(%rip), %r15     # 0x370f6
leaq -0x70(%rbp), %r12
leaq 0x2dcc7(%rip), %r13     # 0x370a6
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7480
movq %r12, %rdi
movq %r13, %rsi
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x941c
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9422
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9463
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x947c
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %rbx
cmpq 0x168(%r14), %rbx
jne 0x93df
leaq 0x2dc68(%rip), %rsi     # 0x370fc
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0xc8(%r14), %rbx
cmpq 0xd0(%r14), %rbx
je 0x9571
leaq 0x2dc78(%rip), %r15     # 0x37130
leaq -0x70(%rbp), %r12
leaq 0x2dc45(%rip), %r13     # 0x37108
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7480
movq %r12, %rdi
movq %r13, %rsi
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9500
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9506
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9547
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9560
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %rbx
cmpq 0xd0(%r14), %rbx
jne 0x94c3
leaq 0x2db92(%rip), %rsi     # 0x3710a
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0x68(%r14), %r13
cmpq 0x70(%r14), %r13
je 0x9650
leaq 0x2db9a(%rip), %rbx     # 0x37130
leaq -0x70(%rbp), %r15
leaq 0x2db67(%rip), %r12     # 0x37108
leaq 0x40(%r13), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7480
movq %r15, %rdi
movq %r12, %rsi
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x95df
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x95e5
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9626
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x963f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x198, %r13            # imm = 0x198
cmpq 0x70(%r14), %r13
jne 0x95a1
leaq 0x2dac6(%rip), %rsi     # 0x3711d
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0x178(%r14), %r15
cmpq 0x180(%r14), %r15
je 0x97b7
leaq -0x48(%rbp), %r12
leaq 0x2dab0(%rip), %rbx     # 0x3712f
movq %r12, %rdi
movq %r15, %rsi
callq 0x7340
movq %r12, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x7640
cmpq $-0x1, %rax
je 0x96d8
movq %rax, %r13
movl $0x1, %edx
movl $0x2, %r8d
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rcx
callq 0x75b0
addq $0x2, %r13
movq %r12, %rdi
movl $0xa, %esi
movq %r13, %rdx
callq 0x7640
movq %rax, %r13
cmpq $-0x1, %rax
jne 0x96a2
leaq -0x98(%rbp), %r13
movq %r13, %rdi
leaq 0x2da47(%rip), %rsi     # 0x37130
movq %r12, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2da0d(%rip), %rsi     # 0x37108
callq 0x7910
leaq -0x60(%rbp), %rsi
movq %rsi, -0x70(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9724
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x972a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x50(%rbp), %rdi
callq 0x7140
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x976b
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x978d
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x97a6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x38, %r15
cmpq 0x180(%r14), %r15
jne 0x967f
leaq 0x2d974(%rip), %rsi     # 0x37132
movq -0x50(%rbp), %rdi
callq 0x7910
movq -0x50(%rbp), %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e0f5(%rip), %rdi     # 0x378d9
movq %r15, %rsi
xorl %eax, %eax
callq 0x7720
leaq 0x2e0e4(%rip), %rdi     # 0x378d9
movq %r15, %rsi
xorl %eax, %eax
callq 0x7720
leaq 0x2e0d3(%rip), %rdi     # 0x378d9
movq %r15, %rsi
xorl %eax, %eax
callq 0x7720
leaq 0x2e0c2(%rip), %rdi     # 0x378d9
movq %r15, %rsi
xorl %eax, %eax
callq 0x7720
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9842
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
jmp 0x9842
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9860
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
jmp 0x9860
movq %rax, %r14
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x9a78
movq -0x88(%rbp), %rsi
jmp 0x9a70
jmp 0x9a0b
movq %rax, %r14
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x78(%rbp), %rax
jmp 0x9a83
jmp 0x9a0b
jmp 0x9a0b
jmp 0x9962
jmp 0x995d
jmp 0x9a0b
jmp 0x9a0b
jmp 0x9962
jmp 0x995d
jmp 0x9a0b
jmp 0x9a0b
jmp 0x9a0b
jmp 0x995d
jmp 0x9962
jmp 0x9a0b
jmp 0x9a0b
jmp 0x995d
jmp 0x9962
jmp 0x9a0b
jmp 0x9a5c
movq %rax, %r14
jmp 0x9915
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9915
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x9a5f
movq -0x88(%rbp), %rsi
jmp 0x9a01
jmp 0x9a0b
jmp 0x9a0b
jmp 0x995d
jmp 0x9962
jmp 0x9a0b
jmp 0x995d
jmp 0x9962
jmp 0x9a0b
jmp 0x995d
jmp 0x9962
jmp 0x9a0b
movq %rax, %r14
jmp 0x997e
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x997e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9a78
movq -0x60(%rbp), %rsi
jmp 0x9a70
jmp 0x9a0b
jmp 0x9a0b
jmp 0x9a0b
jmp 0x9a5c
movq %rax, %r14
jmp 0x99e7
movq %rax, %r14
jmp 0x99c5
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x99c5
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x99e7
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x9a5f
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x7510
jmp 0x9a5f
movq %rax, %r14
jmp 0x9a78
movq %rax, %r14
jmp 0x9a51
movq %rax, %r14
jmp 0x9a36
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9a36
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9a51
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x9a6c
jmp 0x9a78
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9a78
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rcx), %rdi
cmpq %rax, %rdi
je 0x9a93
movq (%rax), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x7870
nop