// File: /workspace/github_cpp_makefile_star2_O2/derekzwy[P]an-optimal-tcam-encoding-algorithm-for-packet-classification/rulesutils.cc
// Function: extend_rules(std::vector<pc_rule*, std::allocator<pc_rule*>>&, std::vector<pc_rule, std::allocator<pc_rule>>&)
void extend_rules(vector<pc_rule*> &in, vector<pc_rule> &out) 
{
    cout<<"Input ruleset: "<<in.size()<<endl;
    struct prefix *srcpf = new prefix();
    struct prefix *dstpf = new prefix();
    int numext;
    int numcmpl_vext;
    int numcmpl_hext;
    for(size_t i = 0; i < in.size(); i++) {
        srcpf = extend_prefix(in[i]->field[2].low, in[i]->field[2].high);
        dstpf = extend_prefix(in[i]->field[3].low, in[i]->field[3].high);
        if(check_cmpl(srcpf) == false || check_cmpl(dstpf) == false) {
            cout<<in[i]->priority<<" complement prefix error"<<endl;
            getchar();
        }
        numext = srcpf->nvalid * dstpf->nvalid;
        if(srcpf->nvalid > 1 && dstpf->nvalid > 1) {
            numcmpl_vext = srcpf->nvalid * dstpf->ninvalid + srcpf->ninvalid + 1;
            numcmpl_hext = dstpf->nvalid * srcpf->ninvalid + dstpf->ninvalid + 1;
        }
        else{
            numcmpl_vext = srcpf->nvalid * dstpf->ninvalid + srcpf->ninvalid;
            numcmpl_hext = dstpf->nvalid * srcpf->ninvalid + dstpf->ninvalid;
        }
        if(numext <=numcmpl_vext && numext <= numcmpl_hext) {
            for(size_t j = 0; j < srcpf->nvalid; j ++) {
              for(size_t k = 0; k < dstpf->nvalid; k ++) {
                if(numext > 32) {
                    cout<<"The theory may be wrong"<<endl;
                }
                pc_rule extrule;
                extrule.priority = in[i]->priority;
                extrule.field[0].low = in[i]->field[0].low;
                extrule.field[0].high = in[i]->field[0].high;
                extrule.field[1].low = in[i]->field[1].low;
                extrule.field[1].high = in[i]->field[1].high;
                extrule.field[2].low = srcpf->value[j];
                extrule.field[2].high = srcpf->value[j] + (int)pow(2, 16 - srcpf->length[j]) - 1;
                extrule.field[3].low = dstpf->value[k];
                extrule.field[3].high = dstpf->value[k] + (int)pow(2, 16 - dstpf->length[k]) - 1;
                extrule.field[4].low = in[i]->field[4].low;
                extrule.field[4].high = in[i]->field[4].high;
                out.push_back(extrule);
            }
        }
        }
        if(numcmpl_vext < numext && numcmpl_vext <= numcmpl_hext) {
            if(numcmpl_vext > 32) {
                cout<<"The theory may be wrong"<<endl;
            }
            if(srcpf->nvalid > 1 && dstpf->nvalid > 1) {
                pc_rule extrule;
                extrule.priority = in[i]->priority;
                extrule.field[0].low = in[i]->field[0].low;
                extrule.field[0].high = in[i]->field[0].high;
                extrule.field[1].low = in[i]->field[1].low;
                extrule.field[1].high = in[i]->field[1].high;
                extrule.field[2].low = srcpf->fullpf;
                extrule.field[2].high = srcpf->fullpf + (int)pow(2, 16 - srcpf->fpf_len) - 1;
                extrule.field[3].low = dstpf->fullpf;
                extrule.field[3].high = dstpf->fullpf + (int)pow(2, 16 - dstpf->fpf_len) - 1;
                extrule.field[4].low = in[i]->field[4].low;
                extrule.field[4].high = in[i]->field[4].high;
                out.push_back(extrule);
            }
            for(size_t j = 0; j < srcpf->ninvalid; j ++) {
                pc_rule extrule;
                extrule.priority = in[i]->priority;
                extrule.field[0].low = in[i]->field[0].low;
                extrule.field[0].high = in[i]->field[0].high;
                extrule.field[1].low = in[i]->field[1].low;
                extrule.field[1].high = in[i]->field[1].high;
                extrule.field[2].low = srcpf->cmplvalue[j];
                extrule.field[2].high = srcpf->cmplvalue[j] + (int)pow(2, 16-srcpf->cmpllength[j]) - 1;
                //output the fullpf
                extrule.field[3].low = dstpf->fullpf;
                extrule.field[3].high = dstpf->fullpf + (int)pow(2, 16-dstpf->fpf_len) - 1;
                extrule.field[4].low = in[i]->field[4].low;
                extrule.field[4].high = in[i]->field[4].high;
                out.push_back(extrule);
            }
            for(size_t j = 0; j < srcpf->nvalid; j ++) {
              for(size_t k = 0; k < dstpf->ninvalid; k ++) {
                pc_rule extrule;
                extrule.priority = in[i]->priority;
                extrule.field[0].low = in[i]->field[0].low;
                extrule.field[0].high = in[i]->field[0].high;
                extrule.field[1].low = in[i]->field[1].low;
                extrule.field[1].high = in[i]->field[1].high;
                extrule.field[2].low = srcpf->value[j];
                extrule.field[2].high = srcpf->value[j] + (int)pow(2, 16-srcpf->length[j]) - 1;
                extrule.field[3].low = dstpf->cmplvalue[k];
                extrule.field[3].high = dstpf->cmplvalue[k] + (int)pow(2, 16-dstpf->cmpllength[k]) - 1;
                extrule.field[4].low = in[i]->field[4].low;
                extrule.field[4].high = in[i]->field[4].high;
                out.push_back(extrule);
            }
        }
        }
        if(numcmpl_hext < numext && numcmpl_hext < numcmpl_vext) {
            if(numcmpl_hext > 32) {
                cout<<"The theory may be wrong"<<endl;
            }
            if(srcpf->nvalid > 1 && dstpf->nvalid > 1) {
                pc_rule extrule;
                extrule.priority = in[i]->priority;
                extrule.field[0].low = in[i]->field[0].low;
                extrule.field[0].high = in[i]->field[0].high;
                extrule.field[1].low = in[i]->field[1].low;
                extrule.field[1].high = in[i]->field[1].high;
                extrule.field[2].low = srcpf->fullpf;
                extrule.field[2].high = srcpf->fullpf + (int)pow(2, 16 - srcpf->fpf_len) - 1;
                extrule.field[3].low = dstpf->fullpf;
                extrule.field[3].high = dstpf->fullpf + (int)pow(2, 16 - dstpf->fpf_len) - 1;
                extrule.field[4].low = in[i]->field[4].low;
                extrule.field[4].high = in[i]->field[4].high;
                out.push_back(extrule);
            }
            for(size_t k = 0; k < dstpf->ninvalid; k ++) {
                pc_rule extrule;
                extrule.priority = in[i]->priority;
                extrule.field[0].low = in[i]->field[0].low;
                extrule.field[0].high = in[i]->field[0].high;
                extrule.field[1].low = in[i]->field[1].low;
                extrule.field[1].high = in[i]->field[1].high;
                extrule.field[2].low = srcpf->fullpf;
                extrule.field[2].high = srcpf->fullpf + (int)pow(2, 16-srcpf->fpf_len) - 1;
                extrule.field[3].low = dstpf->cmplvalue[k];
                extrule.field[3].high = dstpf->cmplvalue[k] + (int)pow(2, 16 - dstpf->cmpllength[k]) - 1;
                extrule.field[4].low = in[i]->field[4].low;
                extrule.field[4].high = in[i]->field[4].high;
                out.push_back(extrule);
            }
            for(size_t j = 0; j < srcpf->ninvalid; j ++) {
              for(size_t k = 0; k < dstpf->nvalid; k ++) {
                pc_rule extrule;
                extrule.priority = in[i]->priority;
                extrule.field[0].low = in[i]->field[0].low;
                extrule.field[0].high = in[i]->field[0].high;
                extrule.field[1].low = in[i]->field[1].low;
                extrule.field[1].high = in[i]->field[1].high;
                extrule.field[2].low = srcpf->cmplvalue[j];
                extrule.field[2].high = srcpf->cmplvalue[j] + (int)pow(2, 16 - srcpf->cmpllength[j]) - 1;
                extrule.field[3].low = dstpf->value[k];
                extrule.field[3].high = dstpf->value[k] + (int)pow(2, 16 - dstpf->length[k]) - 1;
                extrule.field[4].low = in[i]->field[4].low;
                extrule.field[4].high = in[i]->field[4].high;
                out.push_back(extrule);
            }
        }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, %r15
movq 0x4de9(%rip), %rdi      # 0x8fd8
leaq 0x1fb9(%rip), %rsi      # 0x61af
callq 0x2130
movq 0x8(%r15), %rsi
subq (%r15), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x20c0
movq %rax, %rdi
callq 0x2090
xorl %ebx, %ebx
movq %r15, -0xe0(%rbp)
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbx
jae 0x4c21
movq (%rax,%rbx,8), %rax
movl 0x28(%rax), %edi
movl 0x30(%rax), %esi
callq 0x3895
movq %rax, %r14
movq (%r15), %rax
movq %rbx, -0x40(%rbp)
movq (%rax,%rbx,8), %rax
movl 0x38(%rax), %edi
movl 0x40(%rax), %esi
callq 0x3895
movq %rax, %r12
movq %r14, %rdi
callq 0x4082
testb %al, %al
je 0x4279
movq %r12, %rdi
callq 0x4082
testb %al, %al
jne 0x42ae
movq (%r15), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %esi
movq 0x4d4b(%rip), %rdi      # 0x8fd8
callq 0x2220
movq %rax, %rdi
leaq 0x1f23(%rip), %rsi      # 0x61bf
callq 0x2130
movq %rax, %rdi
callq 0x2090
callq 0x21b0
movl 0x108(%r14), %eax
movl 0x10c(%r14), %esi
movl 0x108(%r12), %ecx
movl 0x10c(%r12), %edx
movl %edx, %edi
imull %eax, %edi
cmpl $0x2, %eax
jb 0x42e8
cmpl $0x2, %ecx
jb 0x42e8
addl %esi, %edi
incl %edi
imull %ecx, %esi
addl %edx, %esi
incl %esi
jmp 0x42ef
addl %esi, %edi
imull %ecx, %esi
addl %edx, %esi
movl %ecx, %r8d
imull %eax, %r8d
movq %rdi, -0xe8(%rbp)
cmpl %edi, %r8d
movq %r14, -0x30(%rbp)
movq %r12, -0x38(%rbp)
movq %rsi, -0xf0(%rbp)
movl %r8d, -0x4c(%rbp)
jg 0x4483
cmpl %esi, %r8d
jg 0x4483
xorl %r14d, %r14d
movl %eax, %edx
cmpq %rdx, %r14
jae 0x4483
xorl %ebx, %ebx
movl %ecx, %eax
cmpq %rax, %rbx
jae 0x4466
cmpl $0x21, -0x4c(%rbp)
jl 0x435e
movq 0x4c8e(%rip), %rdi      # 0x8fd8
leaq 0x1e87(%rip), %rsi      # 0x61d8
callq 0x2130
movq %rax, %rdi
callq 0x2090
leaq -0xd0(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq (%r15), %rax
movq -0x40(%rbp), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %ecx
movl %ecx, -0xd8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rcx
movl (%rcx,%r14,4), %r15d
movq %r15, -0xb0(%rbp)
pushq $0x10
popq %r12
movl %r12d, %eax
subl 0x40(%rcx,%r14,4), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r15d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rcx
movl (%rcx,%rbx,4), %r15d
movq %r15, -0xa0(%rbp)
movl %r12d, %eax
movq %rcx, %r12
subl 0x40(%rcx,%rbx,4), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r15d, %eax
decl %eax
movq -0xe0(%rbp), %r15
movq %rax, -0x98(%rbp)
movq (%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4c34
incq %rbx
movl 0x108(%r12), %ecx
jmp 0x4332
incq %r14
movq -0x30(%rbp), %rax
movl 0x108(%rax), %eax
movq -0xf0(%rbp), %rsi
movl -0x4c(%rbp), %r8d
jmp 0x4325
movq -0xe8(%rbp), %rcx
cmpl %r8d, %ecx
jge 0x484f
cmpl %esi, %ecx
movq -0x30(%rbp), %r14
jg 0x4853
cmpl $0x21, %ecx
jl 0x44c6
movq 0x4b2d(%rip), %rdi      # 0x8fd8
leaq 0x1d26(%rip), %rsi      # 0x61d8
callq 0x2130
movq %rax, %rdi
callq 0x2090
movl 0x108(%r14), %eax
cmpl $0x2, %eax
jb 0x45dd
cmpl $0x2, 0x108(%r12)
jb 0x45dd
leaq -0xd0(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq (%r15), %rax
movq -0x40(%rbp), %r14
movq (%rax,%r14,8), %rax
movl (%rax), %ecx
movl %ecx, -0xd8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rax
movl 0x100(%rax), %ebx
movq %rbx, -0xb0(%rbp)
pushq $0x10
popq %r12
movl %r12d, %eax
movq -0x30(%rbp), %rcx
subl 0x104(%rcx), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %ebx, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rax
movl 0x100(%rax), %ebx
movq %rbx, -0xa0(%rbp)
movl %r12d, %eax
movq -0x38(%rbp), %rcx
subl 0x104(%rcx), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %ebx, %eax
decl %eax
movq %rax, -0x98(%rbp)
movq (%r15), %rax
movq (%rax,%r14,8), %rax
movq -0x30(%rbp), %r14
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4c34
xorl %ebx, %ebx
movl 0x10c(%r14), %eax
cmpq %rax, %rbx
jae 0x46fe
leaq -0xd0(%rbp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq (%r15), %rax
movq -0x40(%rbp), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %ecx
movl %ecx, -0xd8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rax
movl 0x80(%rax,%rbx,4), %r14d
movq %r14, -0xb0(%rbp)
pushq $0x10
popq %r12
movl %r12d, %eax
movq -0x30(%rbp), %rcx
subl 0xc0(%rcx,%rbx,4), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r14d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rcx
movl 0x100(%rcx), %r14d
movq %r14, -0xa0(%rbp)
movl %r12d, %eax
subl 0x104(%rcx), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r14d, %eax
decl %eax
movq -0x30(%rbp), %r14
movq %rax, -0x98(%rbp)
movq (%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4c34
incq %rbx
jmp 0x45df
xorl %ebx, %ebx
movq -0x38(%rbp), %r12
movl 0x108(%r14), %eax
cmpq %rax, %rbx
jae 0x4842
xorl %r14d, %r14d
movl 0x10c(%r12), %eax
cmpq %rax, %r14
jae 0x4836
leaq -0xd0(%rbp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq (%r15), %rax
movq -0x40(%rbp), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %ecx
movl %ecx, -0xd8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rcx
movl (%rcx,%rbx,4), %r15d
movq %r15, -0xb0(%rbp)
pushq $0x10
popq %r12
movl %r12d, %eax
subl 0x40(%rcx,%rbx,4), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r15d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rax
movl 0x80(%rax,%r14,4), %r15d
movq %r15, -0xa0(%rbp)
movl %r12d, %eax
movq -0x38(%rbp), %r12
subl 0xc0(%r12,%r14,4), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r15d, %eax
decl %eax
movq -0xe0(%rbp), %r15
movq %rax, -0x98(%rbp)
movq (%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4c34
incq %r14
jmp 0x4717
incq %rbx
movq -0x30(%rbp), %r14
jmp 0x4704
movq -0xf0(%rbp), %rsi
movl -0x4c(%rbp), %r8d
jmp 0x4853
movq -0x30(%rbp), %r14
cmpl %esi, %r8d
jle 0x4c15
cmpl %esi, -0xe8(%rbp)
jle 0x4c15
cmpl $0x21, %esi
jl 0x488f
movq 0x4764(%rip), %rdi      # 0x8fd8
leaq 0x195d(%rip), %rsi      # 0x61d8
callq 0x2130
movq %rax, %rdi
callq 0x2090
movl 0x108(%r14), %eax
cmpl $0x2, %eax
jb 0x49ae
cmpl $0x2, 0x108(%r12)
jb 0x49ae
leaq -0xd0(%rbp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq (%r15), %rax
movq -0x40(%rbp), %r14
movq (%rax,%r14,8), %rax
movl (%rax), %ecx
movl %ecx, -0xd8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rax
movl 0x100(%rax), %ebx
movq %rbx, -0xb0(%rbp)
pushq $0x10
popq %r12
movl %r12d, %eax
movq -0x30(%rbp), %rcx
subl 0x104(%rcx), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %ebx, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rax
movl 0x100(%rax), %ebx
movq %rbx, -0xa0(%rbp)
movl %r12d, %eax
movq -0x38(%rbp), %r12
subl 0x104(%r12), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %ebx, %eax
decl %eax
movq %rax, -0x98(%rbp)
movq (%r15), %rax
movq (%rax,%r14,8), %rax
movq -0x30(%rbp), %r14
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4c34
xorl %ebx, %ebx
movl 0x10c(%r12), %eax
cmpq %rax, %rbx
jae 0x4ad5
leaq -0xd0(%rbp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq (%r15), %rax
movq -0x40(%rbp), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %ecx
movl %ecx, -0xd8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rax
movl 0x100(%rax), %r14d
movq %r14, -0xb0(%rbp)
pushq $0x10
popq %r12
movl %r12d, %eax
movq -0x30(%rbp), %rcx
subl 0x104(%rcx), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r14d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rax
movl 0x80(%rax,%rbx,4), %r14d
movq %r14, -0xa0(%rbp)
movl %r12d, %eax
movq -0x38(%rbp), %r12
subl 0xc0(%r12,%rbx,4), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r14d, %eax
decl %eax
movq -0x30(%rbp), %r14
movq %rax, -0x98(%rbp)
movq (%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4c34
incq %rbx
jmp 0x49b0
xorl %ebx, %ebx
movl 0x10c(%r14), %eax
cmpq %rax, %rbx
jae 0x4c15
xorl %r14d, %r14d
movl 0x108(%r12), %eax
cmpq %rax, %r14
jae 0x4c09
leaq -0xd0(%rbp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq (%r15), %rax
movq -0x40(%rbp), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %ecx
movl %ecx, -0xd8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rcx
movl 0x80(%rcx,%rbx,4), %r15d
movq %r15, -0xb0(%rbp)
pushq $0x10
popq %r12
movl %r12d, %eax
subl 0xc0(%rcx,%rbx,4), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r15d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rax
movl (%rax,%r14,4), %r15d
movq %r15, -0xa0(%rbp)
movl %r12d, %eax
movq -0x38(%rbp), %r12
subl 0x40(%r12,%r14,4), %eax
cvtsi2sd %rax, %xmm0
callq 0x2110
cvttsd2si %xmm0, %eax
addl %r15d, %eax
decl %eax
movq -0xe0(%rbp), %r15
movq %rax, -0x98(%rbp)
movq (%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4c34
incq %r14
jmp 0x4aea
incq %rbx
movq -0x30(%rbp), %r14
jmp 0x4ad7
movq -0x40(%rbp), %rbx
incq %rbx
jmp 0x421f
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop