// File: /workspace/github_cpp_makefile_star2_O3/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 0x2d6dc(%rip), %rsi     # 0x3606d
movq %rbx, -0x50(%rbp)
movq %rbx, %rdi
callq 0x7910
movq 0xe0(%r14), %r12
cmpq 0xe8(%r14), %r12
je 0x8a86
leaq -0x38(%rbp), %r13
leaq -0xc8(%rbp), %rbx
leaq -0xd8(%rbp), %r15
cmpq 0xe0(%r14), %r12
je 0x89dc
movq -0x50(%rbp), %rdi
leaq 0x2d699(%rip), %rsi     # 0x36070
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 0x8a45
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8a60
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x8a75
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %r12
cmpq 0xe8(%r14), %r12
jne 0x89c3
movq 0x120(%r14), %r15
cmpq 0x128(%r14), %r15
je 0x8bdf
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 0x2d569(%rip), %rcx     # 0x36070
callq 0x75b0
movq %r13, -0x70(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8b2c
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x8b34
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 0x8b71
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x8b93
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x8bb5
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8bce
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %r15
cmpq 0x128(%r14), %r15
jne 0x8aac
leaq 0x2db2b(%rip), %rsi     # 0x36711
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 0x8c55
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebx, %ecx
cmpl $0x63, %ecx
jbe 0x8c4c
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8c52
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8c55
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x8c19
addl $-0x3, %r15d
jmp 0x8c55
addl $-0x2, %r15d
jmp 0x8c55
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 0x2d3db(%rip), %rcx     # 0x36073
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 0x8cce
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x8cd4
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 0x2d412(%rip), %rsi     # 0x36108
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8d1f
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8d25
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 0x8d66
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8d7f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x8da1
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x7510
leaq 0x2d2e4(%rip), %rsi     # 0x3608c
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0xe8(%r14), %rax
cmpq 0xe0(%r14), %rax
je 0x8f63
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 0x8e4b
movq 0xe0(%r14), %rax
movq 0xe8(%r14), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x963d
addq %rbx, %rax
movq %r13, %rdi
leaq 0x2d28a(%rip), %rsi     # 0x3609a
movq %rax, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2d284(%rip), %rsi     # 0x360a6
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8eb1
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8eb7
movq 0xe0(%r14), %rax
movq 0xe8(%r14), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x965f
addq %rbx, %rax
movq %r13, %rdi
leaq 0x2d233(%rip), %rsi     # 0x360a9
movq %rax, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2d21e(%rip), %rsi     # 0x360a6
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8ee1
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x8ee7
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 0x8f0f
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 0x8f28
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8f41
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 0x8dd5
leaq 0x2d147(%rip), %rsi     # 0x360b1
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0x128(%r14), %rax
cmpq 0x120(%r14), %rax
je 0x9125
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 0x900d
movq 0x120(%r14), %rax
movq 0x128(%r14), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x964e
addq %rbx, %rax
movq %r13, %rdi
leaq 0x2d0ee(%rip), %rsi     # 0x360c0
movq %rax, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2d0c2(%rip), %rsi     # 0x360a6
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9073
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9079
movq 0x120(%r14), %rax
movq 0x128(%r14), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x9670
addq %rbx, %rax
movq %r13, %rdi
leaq 0x2d095(%rip), %rsi     # 0x360cd
movq %rax, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2d05c(%rip), %rsi     # 0x360a6
callq 0x7910
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x90a3
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x90a9
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 0x90d1
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 0x90ea
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9103
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 0x8f97
leaq 0x2cfaa(%rip), %rsi     # 0x360d6
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0xb0(%r14), %rbx
cmpq 0xb8(%r14), %rbx
je 0x9209
leaq 0x2cf93(%rip), %r15     # 0x360e3
leaq -0x70(%rbp), %r12
leaq 0x2cf4b(%rip), %r13     # 0x360a6
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 0x9198
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x919e
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 0x91df
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x91f8
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %rbx
cmpq 0xb8(%r14), %rbx
jne 0x915b
leaq 0x2ceda(%rip), %rsi     # 0x360ea
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0x160(%r14), %rbx
cmpq 0x168(%r14), %rbx
je 0x92ed
leaq 0x2cec2(%rip), %r15     # 0x360f6
leaq -0x70(%rbp), %r12
leaq 0x2ce67(%rip), %r13     # 0x360a6
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 0x927c
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9282
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 0x92c3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x92dc
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %rbx
cmpq 0x168(%r14), %rbx
jne 0x923f
leaq 0x2ce08(%rip), %rsi     # 0x360fc
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0xc8(%r14), %rbx
cmpq 0xd0(%r14), %rbx
je 0x93d1
leaq 0x2ce18(%rip), %r15     # 0x36130
leaq -0x70(%rbp), %r12
leaq 0x2cde5(%rip), %r13     # 0x36108
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 0x9360
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9366
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 0x93a7
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x93c0
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %rbx
cmpq 0xd0(%r14), %rbx
jne 0x9323
leaq 0x2cd32(%rip), %rsi     # 0x3610a
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0x68(%r14), %r13
cmpq 0x70(%r14), %r13
je 0x94b0
leaq 0x2cd3a(%rip), %rbx     # 0x36130
leaq -0x70(%rbp), %r15
leaq 0x2cd07(%rip), %r12     # 0x36108
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 0x943f
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9445
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 0x9486
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x949f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x198, %r13            # imm = 0x198
cmpq 0x70(%r14), %r13
jne 0x9401
leaq 0x2cc66(%rip), %rsi     # 0x3611d
movq -0x50(%rbp), %rdi
callq 0x7910
movq 0x178(%r14), %r15
cmpq 0x180(%r14), %r15
je 0x9617
leaq -0x48(%rbp), %r12
leaq 0x2cc50(%rip), %rbx     # 0x3612f
movq %r12, %rdi
movq %r15, %rsi
callq 0x7340
movq %r12, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x7640
cmpq $-0x1, %rax
je 0x9538
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 0x9502
leaq -0x98(%rbp), %r13
movq %r13, %rdi
leaq 0x2cbe7(%rip), %rsi     # 0x36130
movq %r12, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2cbad(%rip), %rsi     # 0x36108
callq 0x7910
leaq -0x60(%rbp), %rsi
movq %rsi, -0x70(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9584
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x958a
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 0x95cb
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x95ed
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9606
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x38, %r15
cmpq 0x180(%r14), %r15
jne 0x94df
leaq 0x2cb14(%rip), %rsi     # 0x36132
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 0x2d295(%rip), %rdi     # 0x368d9
movq %r15, %rsi
xorl %eax, %eax
callq 0x7720
leaq 0x2d284(%rip), %rdi     # 0x368d9
movq %r15, %rsi
xorl %eax, %eax
callq 0x7720
leaq 0x2d273(%rip), %rdi     # 0x368d9
movq %r15, %rsi
xorl %eax, %eax
callq 0x7720
leaq 0x2d262(%rip), %rdi     # 0x368d9
movq %r15, %rsi
xorl %eax, %eax
callq 0x7720
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x96a2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
jmp 0x96a2
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x96c0
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
jmp 0x96c0
movq %rax, %r14
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x98e2
movq -0x88(%rbp), %rsi
jmp 0x98da
jmp 0x9875
movq %rax, %r14
movq -0x50(%rbp), %rax
movq (%rax), %rdi
cmpq -0x78(%rbp), %rdi
je 0x98fd
movq -0x78(%rbp), %rax
jmp 0x98f2
jmp 0x9875
jmp 0x9875
jmp 0x97cc
jmp 0x97c7
jmp 0x9875
jmp 0x9875
jmp 0x97cc
jmp 0x97c7
jmp 0x9875
jmp 0x9875
jmp 0x9875
jmp 0x97c7
jmp 0x97cc
jmp 0x9875
jmp 0x9875
jmp 0x97c7
jmp 0x97cc
jmp 0x9875
jmp 0x98c6
movq %rax, %r14
jmp 0x977f
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x977f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x98c9
movq -0x88(%rbp), %rsi
jmp 0x986b
jmp 0x9875
jmp 0x9875
jmp 0x97c7
jmp 0x97cc
jmp 0x9875
jmp 0x97c7
jmp 0x97cc
jmp 0x9875
jmp 0x97c7
jmp 0x97cc
jmp 0x9875
movq %rax, %r14
jmp 0x97e8
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x97e8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x98e2
movq -0x60(%rbp), %rsi
jmp 0x98da
jmp 0x9875
jmp 0x9875
jmp 0x9875
jmp 0x98c6
movq %rax, %r14
jmp 0x9851
movq %rax, %r14
jmp 0x982f
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x982f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x9851
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x98c9
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x7510
jmp 0x98c9
movq %rax, %r14
jmp 0x98e2
movq %rax, %r14
jmp 0x98bb
movq %rax, %r14
jmp 0x98a0
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x98a0
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x98bb
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x98d6
jmp 0x98e2
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x98e2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rcx), %rdi
cmpq %rax, %rdi
je 0x98fd
movq (%rax), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x7870
nop