// File: /workspace/github_cpp_makefile_star2_O3/qema[P]orca-py/liborca.cpp
// Function: ecount4()
void ecount4() {
    clock_t startTime, endTime;
    startTime = clock();
    clock_t startTime_all, endTime_all;
    startTime_all = startTime;
    int frac,frac_prev;

    // precompute triangles that span over edges
    //printf("stage 1 - precomputing common nodes\n");
    int *tri = (int*)calloc(m,sizeof(int));
    frac_prev=-1;
    for (int i=0;i<m;i++) {
        frac = 100LL*i/m;
        if (frac!=frac_prev) {
            //printf("%d%%\r",frac);
            frac_prev=frac;
        }
        int x=edges[i].a, y=edges[i].b;
        for (int xi=0,yi=0; xi<deg[x] && yi<deg[y]; ) {
            if (adj[x][xi]==adj[y][yi]) { tri[i]++; xi++; yi++; }
            else if (adj[x][xi]<adj[y][yi]) { xi++; }
            else { yi++; }
        }
    }
    endTime = clock();
    //printf("%.2f\n", (double)(endTime-startTime)/CLOCKS_PER_SEC);
    startTime = endTime;

    // count full graphlets
    //printf("stage 2 - counting full graphlets\n");
    int64 *C4 = (int64*)calloc(m,sizeof(int64));
    int *neighx = (int*)malloc(n*sizeof(int)); // lookup table - edges to neighbors of x
    memset(neighx,-1,n*sizeof(int));
    int *neigh = (int*)malloc(n*sizeof(int)), nn; // lookup table - common neighbors of x and y
    PII *neigh_edges = (PII*)malloc(n*sizeof(PII)); // list of common neighbors of x and y
    frac_prev=-1;
    for (int x=0;x<n;x++) {
        frac = 100LL*x/n;
        if (frac!=frac_prev) {
            //printf("%d%%\r",frac);
            frac_prev=frac;
        }

        for (int nx=0;nx<deg[x];nx++) {
            int y=inc[x][nx].first, xy=inc[x][nx].second;
            neighx[y]=xy;
        }
        for (int nx=0;nx<deg[x];nx++) {
            int y=inc[x][nx].first, xy=inc[x][nx].second;
            if (y >= x) break;
            nn=0;
            for (int ny=0;ny<deg[y];ny++) {
                int z=inc[y][ny].first, yz=inc[y][ny].second;
                if (z >= y) break;
                if (neighx[z]==-1) continue;
                int xz=neighx[z];
                neigh[nn]=z;
                neigh_edges[nn]={xz, yz};
                nn++;
            }
            for (int i=0;i<nn;i++) {
                int z = neigh[i], xz = neigh_edges[i].first, yz = neigh_edges[i].second;
                for (int j=i+1;j<nn;j++) {
                    int w = neigh[j], xw = neigh_edges[j].first, yw = neigh_edges[j].second;
                    if (adjacent(z,w)) {
                        C4[xy]++;
                        C4[xz]++; C4[yz]++;
                        C4[xw]++; C4[yw]++;
                        // another iteration to count this last(smallest) edge instead of calling getEdgeId
                        //int zw=getEdgeId(z,w); C4[zw]++;
                    }
                }
            }
        }
        for (int nx=0;nx<deg[x];nx++) {
            int y=inc[x][nx].first, xy=inc[x][nx].second;
            neighx[y]=-1;
        }
    }
    endTime = clock();
    //printf("%.2f\n", (double)(endTime-startTime)/CLOCKS_PER_SEC);
    startTime = endTime;

    // count full graphlets for the smallest edge
    for (int x=0;x<n;x++) {
        frac = 100LL*x/n;
        if (frac!=frac_prev) {
            //printf("%d%%\r",frac);
            frac_prev=frac;
        }
        for (int nx=deg[x]-1;nx>=0;nx--) {
            int y=inc[x][nx].first, xy=inc[x][nx].second;
            if (y <= x) break;
            nn=0;
            for (int ny=deg[y]-1;ny>=0;ny--) {
                int z=adj[y][ny];
                if (z <= y) break;
                if (adjacent(x,z)==0) continue;
                neigh[nn++]=z;
            }
            for (int i=0;i<nn;i++) {
                int z = neigh[i];
                for (int j=i+1;j<nn;j++) {
                    int zz = neigh[j];
                    if (adjacent(z,zz)) {
                        C4[xy]++;
                    }
                }
            }
        }
    }
    endTime = clock();
    //printf("%.2f\n", (double)(endTime-startTime)/CLOCKS_PER_SEC);
    startTime = endTime;

    // set up a system of equations relating orbits for every node
    //printf("stage 3 - building systems of equations\n");
    int *common = (int*)calloc(n,sizeof(int));
    int *common_list = (int*)malloc(n*sizeof(int)), nc=0;
    frac_prev=-1;

    for (int x=0;x<n;x++) {
        frac = 100LL*x/n;
        if (frac!=frac_prev) {
            //printf("%d%%\r",frac);
            frac_prev=frac;
        }

        // common nodes of x and some other node
        for (int i=0;i<nc;i++) common[common_list[i]]=0;
        nc=0;
        for (int nx=0;nx<deg[x];nx++) {
            int y=adj[x][nx];
            for (int ny=0;ny<deg[y];ny++) {
                int z=adj[y][ny];
                if (z==x) continue;
                if (common[z]==0) common_list[nc++]=z;
                common[z]++;
            }
        }

        for (int nx=0;nx<deg[x];nx++) {
            int y=inc[x][nx].first, xy=inc[x][nx].second;
            int e=xy;
            for (int n1=0;n1<deg[x];n1++) {
                int z=inc[x][n1].first, xz=inc[x][n1].second;
                if (z==y) continue;
                if (adjacent(y,z)) { // triangle
                    if (x<y) {
                        eorbit[e][1]++;
                        eorbit[e][10] += tri[xy]-1;
                        eorbit[e][7] += deg[z]-2;
                    }
                    eorbit[e][9] += tri[xz]-1;
                    eorbit[e][8] += deg[x]-2;
                }
            }
            for (int n1=0;n1<deg[y];n1++) {
                int z=inc[y][n1].first, yz=inc[y][n1].second;
                if (z==x) continue;
                if (!adjacent(x,z)) { // path x-y-z
                    eorbit[e][0]++;
                    eorbit[e][6] += tri[yz];
                    eorbit[e][5] += common[z]-1;
                    eorbit[e][4] += deg[y]-2;
                    eorbit[e][3] += deg[x]-1;
                    eorbit[e][2] += deg[z]-1;
                }
            }
        }
    }
    // solve system of equations
    for (int e=0;e<m;e++) {
        eorbit[e][11]=C4[e];
        eorbit[e][10]=(eorbit[e][10]-2*eorbit[e][11])/2;
        eorbit[e][9]=(eorbit[e][9]-4*eorbit[e][11]);
        eorbit[e][8]=(eorbit[e][8]-eorbit[e][9]-4*eorbit[e][10]-4*eorbit[e][11]);
        eorbit[e][7]=(eorbit[e][7]-eorbit[e][9]-2*eorbit[e][11]);
        eorbit[e][6]=(eorbit[e][6]-eorbit[e][9])/2;
        eorbit[e][5]=(eorbit[e][5]-eorbit[e][9])/2;
        eorbit[e][4]=(eorbit[e][4]-2*eorbit[e][6]-eorbit[e][8]-eorbit[e][9])/2;
        eorbit[e][3]=(eorbit[e][3]-2*eorbit[e][5]-eorbit[e][8]-eorbit[e][9])/2;
        eorbit[e][2]=(eorbit[e][2]-2*eorbit[e][5]-2*eorbit[e][6]-eorbit[e][9]);
    }

    endTime = clock();
    //printf("%.2f\n", (double)(endTime-startTime)/CLOCKS_PER_SEC);

    endTime_all = endTime;
    //printf("total: %.2f\n", (double)(endTime_all-startTime_all)/CLOCKS_PER_SEC);

    free(tri);
    free(C4);
    free(neighx);
    free(neigh);
    free(neigh_edges);
    free(common);
    free(common_list);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
callq 0x5120
movq 0xefe4(%rip), %rax      # 0x14f50
movslq (%rax), %rbx
movl $0x4, %esi
movq %rbx, %rdi
callq 0x5110
movq %rax, 0x20(%rsp)
testq %rbx, %rbx
jle 0x6002
movq 0xf02b(%rip), %rax      # 0x14fb8
movq (%rax), %rax
movq 0xf031(%rip), %rcx      # 0x14fc8
movq (%rcx), %rcx
movq 0xeff7(%rip), %rdx      # 0x14f98
movq (%rdx), %rdx
xorl %esi, %esi
movslq (%rax,%rsi,8), %rdi
movl (%rcx,%rdi,4), %r8d
testl %r8d, %r8d
jle 0x5ffa
movslq 0x4(%rax,%rsi,8), %r9
movl (%rcx,%r9,4), %r10d
xorl %r11d, %r11d
xorl %ebp, %ebp
cmpl %r10d, %ebp
jge 0x5ffa
movq (%rdx,%rdi,8), %r14
movslq %r11d, %r15
movq (%rdx,%r9,8), %r12
movslq %ebp, %r13
movl (%r12,%r13,4), %r12d
cmpl %r12d, (%r14,%r15,4)
jne 0x5fec
movq 0x20(%rsp), %r14
incl (%r14,%rsi,4)
incl %r11d
jmp 0x5ff3
jge 0x5ff3
incl %r11d
jmp 0x5ff5
incl %ebp
cmpl %r8d, %r11d
jl 0x5fc1
incq %rsi
cmpq %rbx, %rsi
jne 0x5fa6
callq 0x5120
movq 0xef42(%rip), %rax      # 0x14f50
movslq (%rax), %rdi
movl $0x8, %esi
callq 0x5110
movq %rax, 0x38(%rsp)
movq 0xef79(%rip), %rax      # 0x14fa0
movslq (%rax), %r14
leaq (,%r14,4), %rbx
movq %rbx, %rdi
callq 0x5280
movq %rax, %r15
movq %rax, %rdi
movl $0xff, %esi
movq %rbx, %rdx
callq 0x50e0
movq %rbx, %rdi
callq 0x5280
movq %rax, 0x18(%rsp)
leaq (,%r14,8), %rdi
callq 0x5280
movq %rax, 0x28(%rsp)
testq %r14, %r14
movq %r15, 0x48(%rsp)
jle 0x628d
movq 0xef47(%rip), %rax      # 0x14fc8
movq (%rax), %rax
movq 0x28(%rsp), %rcx
addq $0xc, %rcx
movq %rcx, 0x58(%rsp)
movq 0x18(%rsp), %rcx
addq $0x4, %rcx
movq %rcx, 0x50(%rsp)
xorl %r14d, %r14d
movq 0xeee6(%rip), %r12      # 0x14f90
cmpl $0x0, (%rax,%r14,4)
jle 0x6277
movq (%r12), %rcx
movq (%rcx,%r14,8), %rcx
xorl %edx, %edx
movslq (%rcx,%rdx,8), %rsi
movl 0x4(%rcx,%rdx,8), %edi
movl %edi, (%r15,%rsi,4)
incq %rdx
movslq (%rax,%r14,4), %rsi
cmpq %rsi, %rdx
jl 0x60bf
testl %esi, %esi
jle 0x6277
xorl %ebp, %ebp
movq %r14, 0x60(%rsp)
movq (%r12), %rdx
movq (%rdx,%r14,8), %rdi
movl %ebp, %r8d
movslq (%rdi,%r8,8), %rcx
cmpq %rcx, %r14
jle 0x624e
movslq (%rax,%rcx,4), %rsi
testq %rsi, %rsi
jle 0x6242
movslq 0x4(%rdi,%r8,8), %rdi
movq %rdi, 0x30(%rsp)
movq (%rdx,%rcx,8), %rdi
xorl %r8d, %r8d
xorl %edx, %edx
movl (%rdi,%r8,8), %r9d
cmpl %ecx, %r9d
jge 0x615d
movslq %r9d, %r10
movl (%r15,%r10,4), %r10d
cmpl $-0x1, %r10d
je 0x6155
movl 0x4(%rdi,%r8,8), %r11d
movslq %edx, %rdx
movq 0x18(%rsp), %rbx
movl %r9d, (%rbx,%rdx,4)
movq 0x28(%rsp), %r9
movl %r10d, (%r9,%rdx,8)
movl %r11d, 0x4(%r9,%rdx,8)
incl %edx
incq %r8
cmpq %r8, %rsi
jne 0x611e
testl %edx, %edx
jle 0x6242
movl %ebp, 0x44(%rsp)
movl %edx, %ecx
leaq -0x1(%rcx), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rbp
movq 0x58(%rsp), %r12
xorl %eax, %eax
movq %rcx, 0x68(%rsp)
leaq 0x1(%rax), %rdx
movq %rdx, 0x70(%rsp)
cmpq %rcx, %rdx
jae 0x6203
movq 0x18(%rsp), %rcx
movl (%rcx,%rax,4), %ebx
movq 0x28(%rsp), %rcx
movslq 0x4(%rcx,%rax,8), %rdx
movq %rdx, 0x8(%rsp)
movslq (%rcx,%rax,8), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
movl (%rbp,%r14,4), %esi
movslq -0x4(%r12,%r14,8), %r15
movslq (%r12,%r14,8), %r13
movl %ebx, %edi
movq 0xeddc(%rip), %rax      # 0x14fa8
callq *(%rax)
testb %al, %al
je 0x61f9
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
incq (%rax,%rcx,8)
movq (%rsp), %rcx
incq (%rax,%rcx,8)
movq 0x8(%rsp), %rcx
incq (%rax,%rcx,8)
incq (%rax,%r15,8)
incq (%rax,%r13,8)
incq %r14
cmpq %r14, 0x10(%rsp)
jne 0x61b5
addq $0x8, %r12
addq $0x4, %rbp
decq 0x10(%rsp)
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rax
cmpq %rcx, %rax
jne 0x6185
movq 0xed9e(%rip), %rax      # 0x14fc8
movq (%rax), %rax
movq 0x48(%rsp), %r15
movq 0x60(%rsp), %r14
movq 0xed52(%rip), %r12      # 0x14f90
movl 0x44(%rsp), %ebp
incl %ebp
cmpl (%rax,%r14,4), %ebp
jl 0x60e6
cmpl $0x0, (%rax,%r14,4)
jle 0x6277
movq (%r12), %rcx
movq (%rcx,%r14,8), %rcx
xorl %edx, %edx
movslq (%rcx,%rdx,8), %rsi
movl $0xffffffff, (%r15,%rsi,4) # imm = 0xFFFFFFFF
incq %rdx
movslq (%rax,%r14,4), %rsi
cmpq %rsi, %rdx
jl 0x625f
incq %r14
movq 0xed1f(%rip), %rcx      # 0x14fa0
movslq (%rcx), %rcx
cmpq %rcx, %r14
jl 0x60aa
callq 0x5120
movq 0xed07(%rip), %rax      # 0x14fa0
movl (%rax), %eax
testl %eax, %eax
jle 0x63d4
xorl %edx, %edx
movq 0xed1c(%rip), %rcx      # 0x14fc8
movq (%rcx), %rcx
movl (%rcx,%rdx,4), %esi
decl %esi
js 0x63c5
movq %rdx, (%rsp)
movq 0xeccb(%rip), %rax      # 0x14f90
movq (%rax), %rax
movq (%rax,%rdx,8), %rax
movl %esi, %ecx
movslq (%rax,%rcx,8), %r15
cmpq %r15, %rdx
jge 0x63bc
movq %rsi, 0x8(%rsp)
movq 0xece1(%rip), %rdx      # 0x14fc8
movq (%rdx), %rdx
movl (%rdx,%r15,4), %ebx
movl %ebx, %edx
decl %edx
js 0x63a6
movslq 0x4(%rax,%rcx,8), %r13
xorl %r14d, %r14d
movq (%rsp), %r12
decl %ebx
movq 0xec8b(%rip), %rax      # 0x14f98
movq (%rax), %rax
movq (%rax,%r15,8), %rax
movl (%rax,%rbx,4), %ebp
cmpl %r15d, %ebp
jle 0x6340
movl %r12d, %edi
movl %ebp, %esi
movq 0xec80(%rip), %rax      # 0x14fa8
callq *(%rax)
testb %al, %al
je 0x633c
movslq %r14d, %rax
incl %r14d
movq 0x18(%rsp), %rcx
movl %ebp, (%rcx,%rax,4)
testl %ebx, %ebx
jg 0x6304
testl %r14d, %r14d
jle 0x63a6
movl %r14d, %ecx
movq %rcx, %rbx
movq 0x18(%rsp), %r15
xorl %r14d, %r14d
movq %rcx, 0x10(%rsp)
movq %r14, %rax
incq %r14
cmpq %rcx, %r14
jae 0x6395
movq 0x18(%rsp), %rcx
movl (%rcx,%rax,4), %ebp
movl $0x1, %r12d
movl (%r15,%r12,4), %esi
movl %ebp, %edi
movq 0xec2a(%rip), %rax      # 0x14fa8
callq *(%rax)
testb %al, %al
je 0x638d
movq 0x38(%rsp), %rax
incq (%rax,%r13,8)
incq %r12
cmpq %r12, %rbx
jne 0x6371
addq $0x4, %r15
decq %rbx
movq 0x10(%rsp), %rcx
cmpq %rcx, %r14
jne 0x6358
movq 0x8(%rsp), %rcx
leal -0x1(%rcx), %eax
testl %ecx, %ecx
movl %eax, %esi
movq (%rsp), %rdx
jg 0x62be
movq 0xebdd(%rip), %rax      # 0x14fa0
movl (%rax), %eax
incq %rdx
movslq %eax, %rcx
cmpq %rcx, %rdx
jl 0x62a5
callq 0x5120
movq 0xebc0(%rip), %rax      # 0x14fa0
movslq (%rax), %rbx
movl $0x4, %esi
movq %rbx, %rdi
callq 0x5110
movq %rax, %rbp
leaq (,%rbx,4), %rdi
callq 0x5280
movq %rax, %r12
testq %rbx, %rbx
jle 0x6703
movq %rbx, %rsi
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %r12, 0x10(%rsp)
testl %r13d, %r13d
jle 0x6437
movl %r13d, %eax
xorl %ecx, %ecx
movslq (%r12,%rcx,4), %rdx
movl $0x0, (%rbp,%rdx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x6423
movq 0xeb8a(%rip), %rax      # 0x14fc8
movq (%rax), %rcx
movslq (%rcx,%rbx,4), %rax
testq %rax, %rax
jle 0x66eb
movq %rsi, (%rsp)
movq 0xeb3f(%rip), %rdx      # 0x14f98
movq (%rdx), %rdx
movq %rdx, 0x8(%rsp)
movq (%rdx,%rbx,8), %rsi
xorl %edi, %edi
xorl %r13d, %r13d
movslq (%rsi,%rdi,4), %r9
movslq (%rcx,%r9,4), %r8
testq %r8, %r8
jle 0x64c4
movq 0x8(%rsp), %rdx
movq (%rdx,%r9,8), %r9
xorl %r10d, %r10d
movl (%r9,%r10,4), %r15d
cmpq %r15, %rbx
je 0x64bc
movslq %r15d, %r11
movl (%rbp,%r11,4), %r14d
testl %r14d, %r14d
jne 0x64b4
movslq %r13d, %r12
incl %r13d
movl %r13d, %edx
movq 0x10(%rsp), %r13
movl %r15d, (%r13,%r12,4)
movl %edx, %r13d
movq 0x10(%rsp), %r12
incl %r14d
movl %r14d, (%rbp,%r11,4)
incq %r10
cmpq %r10, %r8
jne 0x6483
incq %rdi
cmpq %rax, %rdi
jne 0x646a
testl %eax, %eax
jle 0x66f0
movl %r13d, 0x30(%rsp)
movq 0xeab0(%rip), %rdx      # 0x14f90
movq (%rdx), %rdx
xorl %edi, %edi
movq (%rdx,%rbx,8), %rsi
movslq (%rsi,%rdi,8), %r13
movq %rdi, (%rsp)
movslq 0x4(%rsi,%rdi,8), %rsi
movq %rsi, 0x8(%rsp)
testl %eax, %eax
jle 0x65dc
xorl %r12d, %r12d
movq (%rdx,%rbx,8), %rax
movslq (%rax,%r12,8), %r15
cmpl %r13d, %r15d
je 0x65cc
movslq 0x4(%rax,%r12,8), %r14
movl %r13d, %edi
movl %r15d, %esi
movq 0xea7f(%rip), %rax      # 0x14fa8
callq *(%rax)
movq 0xea5e(%rip), %rcx      # 0x14f90
movq (%rcx), %rdx
testb %al, %al
je 0x6580
movq 0xea20(%rip), %rax      # 0x14f60
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq %r13, %rbx
jge 0x658c
incq 0x8(%rax)
movq 0x20(%rsp), %rdi
movl (%rdi,%rcx,4), %ecx
decl %ecx
movslq %ecx, %rcx
addq %rcx, 0x50(%rax)
movq 0xea5b(%rip), %rcx      # 0x14fc8
movq (%rcx), %rcx
movl (%rcx,%r15,4), %esi
addl $-0x2, %esi
movslq %esi, %rsi
addq %rsi, 0x38(%rax)
jmp 0x659b
movq 0xea41(%rip), %rax      # 0x14fc8
movq (%rax), %rcx
jmp 0x65cc
movq 0xea35(%rip), %rcx      # 0x14fc8
movq (%rcx), %rcx
movq 0x20(%rsp), %rdi
movd (%rdi,%r14,4), %xmm0
movd (%rcx,%rbx,4), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
paddd 0xba6e(%rip), %xmm1     # 0x12020
pxor %xmm0, %xmm0
pcmpgtd %xmm1, %xmm0
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movdqu 0x40(%rax), %xmm0
paddq %xmm1, %xmm0
movdqu %xmm0, 0x40(%rax)
incq %r12
movslq (%rcx,%rbx,4), %rax
cmpq %rax, %r12
jl 0x6506
cmpl $0x0, (%rcx,%r13,4)
jle 0x66c2
xorl %r12d, %r12d
movq (%rdx,%r13,8), %rax
movl (%rax,%r12,8), %r15d
cmpq %r15, %rbx
je 0x66b2
movslq 0x4(%rax,%r12,8), %r14
movl %ebx, %edi
movl %r15d, %esi
movq 0xe99c(%rip), %rax      # 0x14fa8
callq *(%rax)
movq 0xe97b(%rip), %rcx      # 0x14f90
movq (%rcx), %rdx
movq 0xe9a9(%rip), %rcx      # 0x14fc8
movq (%rcx), %rcx
testb %al, %al
jne 0x66b2
movslq %r15d, %rsi
movq 0xe92c(%rip), %rax      # 0x14f60
movq (%rax), %rax
movq 0x8(%rsp), %rdi
movq (%rax,%rdi,8), %rax
incq (%rax)
movq 0x20(%rsp), %rdi
movslq (%rdi,%r14,4), %rdi
addq %rdi, 0x30(%rax)
movd (%rbp,%rsi,4), %xmm0
movd (%rcx,%r13,4), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
paddd 0xb9b8(%rip), %xmm1     # 0x12020
pxor %xmm0, %xmm0
pcmpgtd %xmm1, %xmm0
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movdqu 0x10(%rax), %xmm0
movdqu 0x20(%rax), %xmm2
paddq %xmm1, %xmm2
movdqu %xmm2, 0x20(%rax)
movd (%rcx,%rbx,4), %xmm1
movd (%rcx,%rsi,4), %xmm2
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
paddd 0xb9a3(%rip), %xmm2     # 0x12040
pxor %xmm1, %xmm1
pcmpgtd %xmm2, %xmm1
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
paddq %xmm0, %xmm2
movdqu %xmm2, 0x10(%rax)
incq %r12
movslq (%rcx,%r13,4), %rax
cmpq %rax, %r12
jl 0x65ea
movq (%rsp), %rdi
incq %rdi
movslq (%rcx,%rbx,4), %rax
cmpq %rax, %rdi
jl 0x64e5
movq 0xe8c3(%rip), %rax      # 0x14fa0
movl (%rax), %esi
movq 0x10(%rsp), %r12
movl 0x30(%rsp), %r13d
jmp 0x66f4
xorl %r13d, %r13d
jmp 0x66f4
movq (%rsp), %rsi
incq %rbx
movslq %esi, %rax
cmpq %rax, %rbx
jl 0x6419
movq 0xe846(%rip), %rax      # 0x14f50
movslq (%rax), %rax
testq %rax, %rax
movq 0x38(%rsp), %rbx
jle 0x682b
movq 0xe83e(%rip), %rcx      # 0x14f60
movq (%rcx), %rcx
xorl %edx, %edx
movdqa 0xb901(%rip), %xmm0     # 0x12030
movq (%rbx,%rdx,8), %r9
movq (%rcx,%rdx,8), %rsi
movq %r9, 0x58(%rsi)
movq 0x50(%rsi), %rdi
subq %r9, %rdi
subq %r9, %rdi
movq %rdi, %r8
shrq $0x3f, %r8
addq %rdi, %r8
sarq %r8
movq %r8, 0x50(%rsi)
movq 0x48(%rsi), %rdi
leaq (,%r9,4), %r10
leaq (%rdi,%r8,4), %r11
subq %r10, %rdi
movq %rdi, 0x48(%rsi)
movq 0x40(%rsi), %r8
subq %r11, %r8
leaq (%rdi,%r9,2), %r9
movq %r8, 0x40(%rsi)
subq %r9, 0x38(%rsi)
addq %rdi, %r8
movdqu 0x28(%rsi), %xmm1
movq %rdi, %xmm2
pshufd $0x44, %xmm2, %xmm2     # xmm2 = xmm2[0,1,0,1]
movdqu 0x18(%rsi), %xmm3
psubq %xmm2, %xmm1
movdqa %xmm1, %xmm2
psrlq $0x3f, %xmm2
paddq %xmm1, %xmm2
pshufd $0xed, %xmm2, %xmm1     # xmm1 = xmm2[1,3,2,3]
psrad $0x1, %xmm1
movdqa %xmm2, %xmm4
psrlq $0x1, %xmm4
pshufd $0xe8, %xmm4, %xmm4     # xmm4 = xmm4[0,2,2,3]
pand %xmm0, %xmm2
movq %r8, %xmm5
punpckldq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
pshufd $0x44, %xmm5, %xmm1     # xmm1 = xmm5[0,1,0,1]
paddq %xmm2, %xmm1
psubq %xmm1, %xmm3
movdqu %xmm4, 0x28(%rsi)
movdqa %xmm3, %xmm1
psrlq $0x3f, %xmm1
paddq %xmm3, %xmm1
pshufd $0xed, %xmm1, %xmm2     # xmm2 = xmm1[1,3,2,3]
psrad $0x1, %xmm2
psrlq $0x1, %xmm1
pshufd $0xe8, %xmm1, %xmm1     # xmm1 = xmm1[0,2,2,3]
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
pshufd $0xee, %xmm4, %xmm2     # xmm2 = xmm4[2,3,2,3]
paddq %xmm4, %xmm2
movq %xmm2, %r8
movdqu %xmm1, 0x18(%rsi)
leaq (%rdi,%r8,2), %rdi
subq %rdi, 0x10(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x672f
callq 0x5120
movq 0x20(%rsp), %rdi
callq 0x5240
movq %rbx, %rdi
callq 0x5240
movq 0x48(%rsp), %rdi
callq 0x5240
movq 0x18(%rsp), %rdi
callq 0x5240
movq 0x28(%rsp), %rdi
callq 0x5240
movq %rbp, %rdi
callq 0x5240
movq %r12, %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5240