// File: /workspace/github_cpp_makefile_star2_O1/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, -0x30(%rbp)
movq %rdi, %r13
movq 0x58b2(%rip), %r14      # 0x9fd8
leaq 0x2a82(%rip), %rsi      # 0x71af
movl $0xf, %edx
movq %r14, %rdi
callq 0x2190
movq 0x8(%r13), %rsi
subq (%r13), %rsi
sarq $0x3, %rsi
movq %r14, %rdi
callq 0x20c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq (%r13), %rax
cmpq %rax, 0x8(%r13)
je 0x53d1
xorl %r14d, %r14d
movq %r13, -0xf0(%rbp)
movq (%rax,%r14,8), %rax
movl 0x28(%rax), %edi
movl 0x30(%rax), %esi
callq 0x3b64
movq %rax, %r12
movq (%r13), %rax
movq (%rax,%r14,8), %rax
movl 0x38(%rax), %edi
movl 0x40(%rax), %esi
callq 0x3b64
movq %rax, %r15
movq %r12, %rdi
callq 0x4541
testb %al, %al
je 0x47d0
movq %r15, %rdi
callq 0x4541
testb %al, %al
jne 0x4829
movq (%r13), %rax
movq (%rax,%r14,8), %rax
movl (%rax), %esi
movq 0x57f7(%rip), %rdi      # 0x9fd8
callq 0x2230
movq %rax, %rbx
movl $0x18, %edx
movq %rax, %rdi
leaq 0x29c7(%rip), %rsi      # 0x71bf
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
callq 0x21c0
movl 0x108(%r15), %ebx
movl 0x10c(%r15), %ecx
movl 0x108(%r12), %eax
movl 0x10c(%r12), %edx
movl %ecx, %esi
imull %eax, %esi
cmpl $0x2, %eax
jb 0x4863
cmpl $0x2, %ebx
jb 0x4863
addl %edx, %esi
incl %esi
imull %ebx, %edx
addl %ecx, %edx
incl %edx
jmp 0x486a
addl %edx, %esi
imull %ebx, %edx
addl %ecx, %edx
movq %rdx, -0xe0(%rbp)
movq %r14, -0x38(%rbp)
imull %eax, %ebx
movq %rsi, -0xe8(%rbp)
cmpl %esi, %ebx
movq %r12, -0x40(%rbp)
movq %r15, -0x48(%rbp)
movl %ebx, -0x4c(%rbp)
jg 0x4a68
cmpl -0xe0(%rbp), %ebx
jg 0x4a68
cmpl $0x0, 0x108(%r12)
je 0x4a68
xorl %r14d, %r14d
cmpl $0x0, 0x108(%r15)
je 0x4a50
xorl %r12d, %r12d
cmpl $0x21, %ebx
jl 0x490b
movl $0x17, %edx
movq 0x5706(%rip), %rbx      # 0x9fd8
movq %rbx, %rdi
leaq 0x28fc(%rip), %rsi      # 0x71d8
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
movl -0x4c(%rbp), %ebx
callq 0x2030
movq %rax, %rdi
callq 0x20d0
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 (%r13), %rax
movq -0x38(%rbp), %r15
movq (%rax,%r15,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 -0x40(%rbp), %rcx
movl (%rcx,%r14,4), %r13d
movq %r13, -0xb0(%rbp)
movl $0x10, %eax
subl 0x40(%rcx,%r14,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r13d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x48(%rbp), %rcx
movl (%rcx,%r12,4), %r13d
movq %r13, -0xa0(%rbp)
movl $0x10, %eax
subl 0x40(%rcx,%r12,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r13d, %eax
decl %eax
movq -0xf0(%rbp), %r13
movq %rax, -0x98(%rbp)
movq (%r13), %rax
movq (%rax,%r15,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x4a29
movl $0x88, %edx
movq %rsi, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2100
movq -0x30(%rbp), %rax
addq $0x88, 0x8(%rax)
jmp 0x4a39
movq -0x30(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x53e4
incq %r12
movq -0x48(%rbp), %r15
movl 0x108(%r15), %eax
cmpq %rax, %r12
jb 0x48c1
incq %r14
movq -0x40(%rbp), %r12
movl 0x108(%r12), %eax
cmpq %rax, %r14
jb 0x48b0
cmpl %ebx, -0xe8(%rbp)
jge 0x4f0e
movq -0xe8(%rbp), %rax
cmpl -0xe0(%rbp), %eax
jg 0x4f0e
cmpl $0x21, -0xe8(%rbp)
jl 0x4ad2
movl $0x17, %edx
movq 0x553c(%rip), %rbx      # 0x9fd8
movq %rbx, %rdi
leaq 0x2732(%rip), %rsi      # 0x71d8
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
cmpl $0x2, 0x108(%r12)
jb 0x4c20
cmpl $0x2, 0x108(%r15)
jb 0x4c20
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 (%r13), %rax
movq -0x38(%rbp), %rbx
movq (%rax,%rbx,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)
movl 0x100(%r12), %r14d
movq %r14, -0xb0(%rbp)
movl $0x10, %eax
subl 0x104(%r12), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r14d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movl 0x100(%r15), %r14d
movq %r14, -0xa0(%rbp)
movl $0x10, %eax
subl 0x104(%r15), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r14d, %eax
decl %eax
movq %rax, -0x98(%rbp)
movq (%r13), %rax
movq (%rax,%rbx,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x4c10
movl $0x88, %edx
movq %rsi, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2100
movq -0x30(%rbp), %rax
addq $0x88, 0x8(%rax)
jmp 0x4c20
movq -0x30(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x53e4
cmpl $0x0, 0x10c(%r12)
je 0x4d81
xorl %r14d, %r14d
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 (%r13), %rax
movq -0x38(%rbp), %r15
movq (%rax,%r15,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 %r12, %rcx
movl 0x80(%r12,%r14,4), %r12d
movq %r12, -0xb0(%rbp)
movl $0x10, %eax
subl 0xc0(%rcx,%r14,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r12d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movq -0x48(%rbp), %rcx
movl 0x100(%rcx), %r12d
movq %r12, -0xa0(%rbp)
movl $0x10, %eax
subl 0x104(%rcx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r12d, %eax
decl %eax
movq %rax, -0x98(%rbp)
movq (%r13), %rax
movq (%rax,%r15,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x4d59
movl $0x88, %edx
movq %rsi, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2100
movq -0x30(%rbp), %rax
addq $0x88, 0x8(%rax)
jmp 0x4d69
movq -0x30(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x53e4
incq %r14
movq -0x40(%rbp), %r12
movl 0x10c(%r12), %eax
cmpq %rax, %r14
jb 0x4c32
cmpl $0x0, 0x108(%r12)
movq -0x48(%rbp), %r15
je 0x4f0e
xorl %r14d, %r14d
cmpl $0x0, 0x10c(%r15)
je 0x4ef6
xorl %r12d, %r12d
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 (%r13), %rax
movq -0x38(%rbp), %rbx
movq (%rax,%rbx,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 -0x40(%rbp), %rcx
movl (%rcx,%r14,4), %r13d
movq %r13, -0xb0(%rbp)
movl $0x10, %eax
subl 0x40(%rcx,%r14,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r13d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movl 0x80(%r15,%r12,4), %r13d
movq %r13, -0xa0(%rbp)
movl $0x10, %eax
subl 0xc0(%r15,%r12,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r13d, %eax
decl %eax
movq -0xf0(%rbp), %r13
movq %rax, -0x98(%rbp)
movq (%r13), %rax
movq (%rax,%rbx,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x4ecf
movl $0x88, %edx
movq %rsi, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2100
movq -0x30(%rbp), %rax
addq $0x88, 0x8(%rax)
jmp 0x4edf
movq -0x30(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x53e4
incq %r12
movq -0x48(%rbp), %r15
movl 0x10c(%r15), %eax
cmpq %rax, %r12
jb 0x4da8
incq %r14
movq -0x40(%rbp), %r12
movl 0x108(%r12), %eax
cmpq %rax, %r14
jb 0x4d97
movq -0xe0(%rbp), %rax
cmpl %eax, -0x4c(%rbp)
jle 0x53b2
cmpl %eax, -0xe8(%rbp)
jle 0x53b2
cmpl $0x21, %eax
jl 0x4f71
movl $0x17, %edx
movq 0x509d(%rip), %rbx      # 0x9fd8
movq %rbx, %rdi
leaq 0x2293(%rip), %rsi      # 0x71d8
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
cmpl $0x2, 0x108(%r12)
jb 0x50c5
cmpl $0x2, 0x108(%r15)
jb 0x50c5
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 (%r13), %rax
movq %r15, %rbx
movq -0x38(%rbp), %r15
movq (%rax,%r15,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)
movl 0x100(%r12), %r14d
movq %r14, -0xb0(%rbp)
movl $0x10, %eax
subl 0x104(%r12), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r14d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movl 0x100(%rbx), %r14d
movq %r14, -0xa0(%rbp)
movl $0x10, %eax
subl 0x104(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r14d, %eax
decl %eax
movq %rax, -0x98(%rbp)
movq (%r13), %rax
movq (%rax,%r15,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x50b1
movl $0x88, %edx
movq %rsi, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2100
movq -0x30(%rbp), %rax
addq $0x88, 0x8(%rax)
jmp 0x50c1
movq -0x30(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x53e4
movq -0x48(%rbp), %r15
cmpl $0x0, 0x10c(%r15)
je 0x5228
xorl %r14d, %r14d
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 (%r13), %rax
movq %r15, %rbx
movq -0x38(%rbp), %r15
movq (%rax,%r15,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 %r12, %rcx
movl 0x100(%r12), %r12d
movq %r12, -0xb0(%rbp)
movl $0x10, %eax
subl 0x104(%rcx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r12d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movl 0x80(%rbx,%r14,4), %r12d
movq %r12, -0xa0(%rbp)
movl $0x10, %eax
subl 0xc0(%rbx,%r14,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r12d, %eax
decl %eax
movq %rax, -0x98(%rbp)
movq (%r13), %rax
movq (%rax,%r15,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x51fd
movl $0x88, %edx
movq %rsi, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2100
movq -0x30(%rbp), %rax
addq $0x88, 0x8(%rax)
jmp 0x520d
movq -0x30(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x53e4
incq %r14
movq -0x48(%rbp), %r15
movl 0x10c(%r15), %eax
cmpq %rax, %r14
movq -0x40(%rbp), %r12
jb 0x50d6
cmpl $0x0, 0x10c(%r12)
je 0x53b2
xorl %r14d, %r14d
cmpl $0x0, 0x108(%r15)
je 0x539c
xorl %r12d, %r12d
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 (%r13), %rax
movq %r15, %rbx
movq -0x38(%rbp), %r15
movq (%rax,%r15,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 -0x40(%rbp), %rcx
movl 0x80(%rcx,%r14,4), %r13d
movq %r13, -0xb0(%rbp)
movl $0x10, %eax
subl 0xc0(%rcx,%r14,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r13d, %eax
decl %eax
movq %rax, -0xa8(%rbp)
movl (%rbx,%r12,4), %r13d
movq %r13, -0xa0(%rbp)
movl $0x10, %eax
subl 0x40(%rbx,%r12,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x2120
cvttsd2si %xmm0, %eax
addl %r13d, %eax
decl %eax
movq -0xf0(%rbp), %r13
movq %rax, -0x98(%rbp)
movq (%r13), %rax
movq (%rax,%r15,8), %rax
movq 0x48(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x50(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x5375
movl $0x88, %edx
movq %rsi, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2100
movq -0x30(%rbp), %rax
addq $0x88, 0x8(%rax)
jmp 0x5385
movq -0x30(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x53e4
incq %r12
movq -0x48(%rbp), %r15
movl 0x108(%r15), %eax
cmpq %rax, %r12
jb 0x524b
incq %r14
movq -0x40(%rbp), %rax
movl 0x10c(%rax), %eax
cmpq %rax, %r14
jb 0x523a
movq -0x38(%rbp), %r14
incq %r14
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r14
jb 0x4790
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop