// File: /workspace/github_c_makefile_star2_O1/imaya[P]zopfli-for-emscripten/katajainen.c
// Function: ZopfliLengthLimitedCodeLengths
int ZopfliLengthLimitedCodeLengths(
    const size_t* frequencies, int n, int maxbits, unsigned* bitlengths) {
  NodePool pool;
  int i;
  int numsymbols = 0;  /* Amount of symbols with frequency > 0. */
  int numBoundaryPMRuns;

  /* Array of lists of chains. Each list requires only two lookahead chains at
  a time, so each list is a array of two Node*'s. */
  Node* (*lists)[2];

  /* One leaf per symbol. Only numsymbols leaves will be used. */
  Node* leaves = (Node*)malloc(n * sizeof(*leaves));

  /* Initialize all bitlengths at 0. */
  for (i = 0; i < n; i++) {
    bitlengths[i] = 0;
  }

  /* Count used symbols and place them in the leaves. */
  for (i = 0; i < n; i++) {
    if (frequencies[i]) {
      leaves[numsymbols].weight = frequencies[i];
      leaves[numsymbols].count = i;  /* Index of symbol this leaf represents. */
      numsymbols++;
    }
  }

  /* Check special cases and error conditions. */
  if ((1 << maxbits) < numsymbols) {
    free(leaves);
    return 1;  /* Error, too few maxbits to represent symbols. */
  }
  if (numsymbols == 0) {
    free(leaves);
    return 0;  /* No symbols at all. OK. */
  }
  if (numsymbols == 1) {
    bitlengths[leaves[0].count] = 1;
    free(leaves);
    return 0;  /* Only one symbol, give it bitlength 1, not 0. OK. */
  }

  /* Sort the leaves from lightest to heaviest. */
  qsort(leaves, numsymbols, sizeof(Node), LeafComparator);

  /* Initialize node memory pool. */
  pool.size = 2 * maxbits * (maxbits + 1);
  pool.nodes = (Node*)malloc(pool.size * sizeof(*pool.nodes));
  pool.next = pool.nodes;
  for (i = 0; i < pool.size; i++) {
    pool.nodes[i].inuse = 0;
  }

  lists = (Node* (*)[2])malloc(maxbits * sizeof(*lists));
  InitLists(&pool, leaves, maxbits, lists);

  /* In the last list, 2 * numsymbols - 2 active chains need to be created. Two
  are already created in the initialization. Each BoundaryPM run creates one. */
  numBoundaryPMRuns = 2 * numsymbols - 4;
  for (i = 0; i < numBoundaryPMRuns; i++) {
    char final = i == numBoundaryPMRuns - 1;
    BoundaryPM(lists, maxbits, leaves, numsymbols, &pool, maxbits - 1, final);
  }

  ExtractBitLengths(lists[maxbits - 1][1], leaves, bitlengths);

  free(lists);
  free(leaves);
  free(pool.nodes);
  return 0;  /* OK. */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r12
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %r13
movslq %esi, %rbx
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rdi
callq 0x1120
movq %rax, %rdi
movl %ebp, %r15d
testl %ebx, %ebx
movq %rax, 0x8(%rsp)
jle 0x4c93
leaq (,%r15,4), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x10c0
movq 0x8(%rsp), %rdi
movq %r12, 0x20(%rsp)
testl %ebp, %ebp
jle 0x4cca
xorl %eax, %eax
xorl %r12d, %r12d
movq %r14, %rbx
movq (%r13,%rax,8), %rcx
testq %rcx, %rcx
je 0x4cc0
movslq %r12d, %r12
leaq (%r12,%r12,2), %rdx
movq %rcx, (%rdi,%rdx,8)
movl %eax, 0x10(%rdi,%rdx,8)
incl %r12d
incq %rax
cmpq %rax, %r15
jne 0x4ca4
jmp 0x4cd0
xorl %r12d, %r12d
movq %r14, %rbx
movl $0x1, %ebp
movl $0x1, %eax
movl %ebx, %ecx
shll %cl, %eax
cmpl %r12d, %eax
jl 0x5f5d
testl %r12d, %r12d
je 0x4d09
cmpl $0x1, %r12d
jne 0x4d11
movslq 0x10(%rdi), %rax
movq 0x20(%rsp), %rcx
movl $0x1, (%rcx,%rax,4)
xorl %ebp, %ebp
jmp 0x5f5d
movl %r12d, %ebp
jmp 0x5f5d
movslq %r12d, %rsi
leaq 0x1258(%rip), %rcx      # 0x5f73
movl $0x18, %edx
callq 0x1060
leal 0x1(%rbx), %r15d
imull %ebx, %r15d
addl %r15d, %r15d
movl %r15d, 0x38(%rsp)
movslq %r15d, %r14
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %rdi
callq 0x1120
movq %rax, %r13
movq %rax, 0x28(%rsp)
movq %rax, 0x30(%rsp)
testl %r14d, %r14d
jle 0x52ba
leal 0xf(%r15), %eax
andl $-0x10, %eax
leaq -0x1(%r14), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x10(%rsp)
leaq 0x17c(%r13), %rcx
movdqa 0x5c37(%rip), %xmm1     # 0xa9c0
movdqa 0x5c3f(%rip), %xmm2     # 0xa9d0
movdqa 0x5c47(%rip), %xmm3     # 0xa9e0
movdqa 0x5c4f(%rip), %xmm4     # 0xa9f0
movdqa 0x5447(%rip), %xmm5     # 0xa1f0
movdqa 0x544f(%rip), %xmm6     # 0xa200
movdqa 0x5457(%rip), %xmm7     # 0xa210
movdqa 0x545e(%rip), %xmm8     # 0xa220
movdqa 0x5465(%rip), %xmm9     # 0xa230
pcmpeqd %xmm10, %xmm10
movdqa 0x10(%rsp), %xmm12
pxor %xmm9, %xmm12
movdqa %xmm8, %xmm13
pxor %xmm9, %xmm13
movdqa %xmm13, %xmm15
pcmpgtd %xmm12, %xmm15
pshufd $0xa0, %xmm15, %xmm14   # xmm14 = xmm15[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm0    # xmm0 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm13
pshufd $0xf5, %xmm13, %xmm13   # xmm13 = xmm13[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm11   # xmm11 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm0, %xmm11
pshufd $0xf5, %xmm15, %xmm15   # xmm15 = xmm15[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm0    # xmm0 = xmm15[0,2,2,3,4,5,6,7]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
movd %xmm0, %edx
testb $0x1, %dl
je 0x4e3c
movb $0x0, -0x168(%rcx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
movd %xmm13, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x4e6e
movb $0x0, -0x150(%rcx)
movdqa %xmm7, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %edx
shrl $0x10, %edx
testb $0x1, %dl
je 0x4ecb
movb $0x0, -0x138(%rcx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %edx
shrl $0x18, %edx
testb $0x1, %dl
je 0x4f07
movb $0x0, -0x120(%rcx)
movdqa %xmm6, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %edx
testb $0x1, %dl
je 0x4f6c
movb $0x0, -0x108(%rcx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x4f9d
movb $0x0, -0xf0(%rcx)
movdqa %xmm5, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %edx
testb $0x1, %dl
je 0x4ff8
movb $0x0, -0xd8(%rcx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x5035
movb $0x0, -0xc0(%rcx)
movdqa %xmm4, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm11
packsswb %xmm11, %xmm0
pextrw $0x4, %xmm0, %edx
testb $0x1, %dl
je 0x509b
movb $0x0, -0xa8(%rcx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm0
pextrw $0x4, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x50cd
movb $0x0, -0x90(%rcx)
movdqa %xmm3, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %edx
testb $0x1, %dl
je 0x5125
movb $0x0, -0x78(%rcx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x515f
movb $0x0, -0x60(%rcx)
movdqa %xmm2, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %edx
testb $0x1, %dl
je 0x51c1
movb $0x0, -0x48(%rcx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x51ef
movb $0x0, -0x30(%rcx)
movdqa %xmm1, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm12    # xmm12 = xmm0[1,1,3,3]
movdqa %xmm12, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm14   # xmm14 = xmm11[1,1,3,3]
por %xmm14, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %edx
testb $0x1, %dl
je 0x5247
movb $0x0, -0x18(%rcx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm12, %xmm11   # xmm11 = xmm12[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm14, %xmm0    # xmm0 = xmm14[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x5280
movb $0x0, (%rcx)
movdqa 0x5778(%rip), %xmm0     # 0xaa00
paddq %xmm0, %xmm8
paddq %xmm0, %xmm7
paddq %xmm0, %xmm6
paddq %xmm0, %xmm5
paddq %xmm0, %xmm4
paddq %xmm0, %xmm3
paddq %xmm0, %xmm2
paddq %xmm0, %xmm1
addq $0x180, %rcx            # imm = 0x180
addq $-0x10, %rax
jne 0x4dd0
movslq %ebx, %rdi
shlq $0x4, %rdi
movq %rdi, 0x40(%rsp)
callq 0x1120
movq %rax, %rdi
leaq (%r14,%r14,2), %rax
leaq (,%rax,8), %rax
addq %r13, %rax
movq 0x30(%rsp), %r11
movl %r14d, %ecx
addl $0xf, %r14d
andl $-0x10, %r14d
leaq -0x1(%rcx), %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm1     # xmm1 = xmm0[0,1,0,1]
leaq 0x14(%r13), %rsi
pcmpeqd %xmm11, %xmm11
movq %r13, %r8
testl %r15d, %r15d
setle %dl
cmpq %rax, %r8
cmovaeq %r13, %r11
cmovaeq %r13, %r8
setb %r9b
orb %dl, %r9b
movq %r11, %r9
movq %r8, %r10
jne 0x588f
movq %r14, %rdx
movq %rsi, %r9
movdqa 0x4ee6(%rip), %xmm12    # 0xa220
movdqa 0x4ecd(%rip), %xmm13    # 0xa210
movdqa 0x4eb4(%rip), %xmm14    # 0xa200
movdqa 0x4e9b(%rip), %xmm15    # 0xa1f0
movdqa 0x5693(%rip), %xmm6     # 0xa9f0
movdqa 0x567b(%rip), %xmm5     # 0xa9e0
movdqa 0x5663(%rip), %xmm4     # 0xa9d0
movdqa 0x564b(%rip), %xmm3     # 0xa9c0
movdqa %xmm1, %xmm0
movdqa 0x4eaf(%rip), %xmm2     # 0xa230
pxor %xmm2, %xmm0
movdqa %xmm12, %xmm7
pxor %xmm2, %xmm7
movdqa %xmm7, %xmm10
pcmpgtd %xmm0, %xmm10
pshufd $0xa0, %xmm10, %xmm9    # xmm9 = xmm10[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm8     # xmm8 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm0, %xmm7
pshufd $0xf5, %xmm7, %xmm7     # xmm7 = xmm7[1,1,3,3]
pshuflw $0xe8, %xmm7, %xmm2     # xmm2 = xmm7[0,2,2,3,4,5,6,7]
pand %xmm8, %xmm2
pshufd $0xf5, %xmm10, %xmm10   # xmm10 = xmm10[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm8    # xmm8 = xmm10[0,2,2,3,4,5,6,7]
por %xmm2, %xmm8
pxor %xmm11, %xmm8
packssdw %xmm8, %xmm8
movd %xmm8, %r8d
testb $0x1, %r8b
je 0x53e1
movb $0x0, (%r9)
pand %xmm9, %xmm7
por %xmm10, %xmm7
packssdw %xmm7, %xmm7
pxor %xmm11, %xmm7
packssdw %xmm7, %xmm7
packsswb %xmm7, %xmm7
movd %xmm7, %r8d
shrl $0x8, %r8d
testb $0x1, %r8b
je 0x5410
movb $0x0, 0x18(%r9)
movdqa %xmm13, %xmm2
pxor 0x4e13(%rip), %xmm2     # 0xa230
movdqa %xmm2, %xmm8
pcmpgtd %xmm0, %xmm8
pshufd $0xa0, %xmm8, %xmm7     # xmm7 = xmm8[0,0,2,2]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm9     # xmm9 = xmm2[1,1,3,3]
movdqa %xmm9, %xmm2
pand %xmm7, %xmm2
pshufd $0xf5, %xmm8, %xmm10    # xmm10 = xmm8[1,1,3,3]
por %xmm10, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
movd %xmm2, %r8d
shrl $0x10, %r8d
testb $0x1, %r8b
je 0x5470
movb $0x0, 0x30(%r9)
pshufhw $0x84, %xmm7, %xmm2     # xmm2 = xmm7[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm9, %xmm7     # xmm7 = xmm9[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm7
pshufhw $0x84, %xmm10, %xmm2    # xmm2 = xmm10[0,1,2,3,4,5,4,6]
por %xmm7, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
movd %xmm2, %r8d
shrl $0x18, %r8d
testb $0x1, %r8b
je 0x54aa
movb $0x0, 0x48(%r9)
movdqa %xmm14, %xmm2
pxor 0x4d79(%rip), %xmm2     # 0xa230
movdqa %xmm2, %xmm8
pcmpgtd %xmm0, %xmm8
pshufd $0xa0, %xmm8, %xmm9     # xmm9 = xmm8[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm10    # xmm10 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm7     # xmm7 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm7, %xmm2     # xmm2 = xmm7[0,2,2,3,4,5,6,7]
pand %xmm10, %xmm2
pshufd $0xf5, %xmm8, %xmm10    # xmm10 = xmm8[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm8    # xmm8 = xmm10[0,2,2,3,4,5,6,7]
por %xmm2, %xmm8
pxor %xmm11, %xmm8
packssdw %xmm8, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x2, %xmm2, %r8d
testb $0x1, %r8b
je 0x5510
movb $0x0, 0x60(%r9)
pand %xmm9, %xmm7
por %xmm10, %xmm7
packssdw %xmm7, %xmm7
pxor %xmm11, %xmm7
packssdw %xmm7, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x2, %xmm2, %r8d
shrl $0x8, %r8d
testb $0x1, %r8b
je 0x5540
movb $0x0, 0x78(%r9)
movdqa %xmm15, %xmm2
pxor 0x4ce3(%rip), %xmm2     # 0xa230
movdqa %xmm2, %xmm8
pcmpgtd %xmm0, %xmm8
pshufd $0xa0, %xmm8, %xmm7     # xmm7 = xmm8[0,0,2,2]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm9     # xmm9 = xmm2[1,1,3,3]
movdqa %xmm9, %xmm2
pand %xmm7, %xmm2
pshufd $0xf5, %xmm8, %xmm10    # xmm10 = xmm8[1,1,3,3]
por %xmm10, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x3, %xmm2, %r8d
testb $0x1, %r8b
je 0x55a0
movb $0x0, 0x90(%r9)
pshufhw $0x84, %xmm7, %xmm2     # xmm2 = xmm7[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm9, %xmm7     # xmm7 = xmm9[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm7
pshufhw $0x84, %xmm10, %xmm2    # xmm2 = xmm10[0,1,2,3,4,5,4,6]
por %xmm7, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x3, %xmm2, %r8d
shrl $0x8, %r8d
testb $0x1, %r8b
je 0x55de
movb $0x0, 0xa8(%r9)
movdqa %xmm6, %xmm2
pxor 0x4c46(%rip), %xmm2     # 0xa230
movdqa %xmm2, %xmm8
pcmpgtd %xmm0, %xmm8
pshufd $0xa0, %xmm8, %xmm9     # xmm9 = xmm8[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm10    # xmm10 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm7     # xmm7 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm7, %xmm2     # xmm2 = xmm7[0,2,2,3,4,5,6,7]
pand %xmm10, %xmm2
pshufd $0xf5, %xmm8, %xmm10    # xmm10 = xmm8[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm8    # xmm8 = xmm10[0,2,2,3,4,5,6,7]
por %xmm2, %xmm8
pxor %xmm11, %xmm8
packssdw %xmm8, %xmm8
packsswb %xmm8, %xmm2
pextrw $0x4, %xmm2, %r8d
testb $0x1, %r8b
je 0x5647
movb $0x0, 0xc0(%r9)
pand %xmm9, %xmm7
por %xmm10, %xmm7
packssdw %xmm7, %xmm7
pxor %xmm11, %xmm7
packssdw %xmm7, %xmm7
packsswb %xmm7, %xmm2
pextrw $0x4, %xmm2, %r8d
shrl $0x8, %r8d
testb $0x1, %r8b
je 0x567a
movb $0x0, 0xd8(%r9)
movdqa %xmm5, %xmm2
pxor 0x4baa(%rip), %xmm2     # 0xa230
movdqa %xmm2, %xmm8
pcmpgtd %xmm0, %xmm8
pshufd $0xa0, %xmm8, %xmm7     # xmm7 = xmm8[0,0,2,2]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm9     # xmm9 = xmm2[1,1,3,3]
movdqa %xmm9, %xmm2
pand %xmm7, %xmm2
pshufd $0xf5, %xmm8, %xmm10    # xmm10 = xmm8[1,1,3,3]
por %xmm10, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x5, %xmm2, %r8d
testb $0x1, %r8b
je 0x56d9
movb $0x0, 0xf0(%r9)
pshufhw $0x84, %xmm7, %xmm2     # xmm2 = xmm7[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm9, %xmm7     # xmm7 = xmm9[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm7
pshufhw $0x84, %xmm10, %xmm2    # xmm2 = xmm10[0,1,2,3,4,5,4,6]
por %xmm7, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x5, %xmm2, %r8d
shrl $0x8, %r8d
testb $0x1, %r8b
je 0x5717
movb $0x0, 0x108(%r9)
movdqa %xmm4, %xmm2
pxor 0x4b0d(%rip), %xmm2     # 0xa230
movdqa %xmm2, %xmm8
pcmpgtd %xmm0, %xmm8
pshufd $0xa0, %xmm8, %xmm9     # xmm9 = xmm8[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm10    # xmm10 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm7     # xmm7 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm7, %xmm2     # xmm2 = xmm7[0,2,2,3,4,5,6,7]
pand %xmm10, %xmm2
pshufd $0xf5, %xmm8, %xmm10    # xmm10 = xmm8[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm8    # xmm8 = xmm10[0,2,2,3,4,5,6,7]
por %xmm2, %xmm8
pxor %xmm11, %xmm8
packssdw %xmm8, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x6, %xmm2, %r8d
testb $0x1, %r8b
je 0x577f
movb $0x0, 0x120(%r9)
pand %xmm9, %xmm7
por %xmm10, %xmm7
packssdw %xmm7, %xmm7
pxor %xmm11, %xmm7
packssdw %xmm7, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x6, %xmm2, %r8d
shrl $0x8, %r8d
testb $0x1, %r8b
je 0x57b2
movb $0x0, 0x138(%r9)
movdqa %xmm3, %xmm2
pxor 0x4a72(%rip), %xmm2     # 0xa230
movdqa %xmm2, %xmm8
pcmpgtd %xmm0, %xmm8
pshufd $0xa0, %xmm8, %xmm7     # xmm7 = xmm8[0,0,2,2]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm0     # xmm0 = xmm2[1,1,3,3]
movdqa %xmm0, %xmm2
pand %xmm7, %xmm2
pshufd $0xf5, %xmm8, %xmm9     # xmm9 = xmm8[1,1,3,3]
por %xmm9, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x7, %xmm2, %r8d
testb $0x1, %r8b
je 0x580f
movb $0x0, 0x150(%r9)
pshufhw $0x84, %xmm7, %xmm2     # xmm2 = xmm7[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm0
pshufhw $0x84, %xmm9, %xmm2     # xmm2 = xmm9[0,1,2,3,4,5,4,6]
por %xmm0, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %r8d
shrl $0x8, %r8d
testb $0x1, %r8b
je 0x584c
movb $0x0, 0x168(%r9)
movdqa 0x51ac(%rip), %xmm0     # 0xaa00
paddq %xmm0, %xmm12
paddq %xmm0, %xmm13
paddq %xmm0, %xmm14
paddq %xmm0, %xmm15
paddq %xmm0, %xmm6
paddq %xmm0, %xmm5
paddq %xmm0, %xmm4
paddq %xmm0, %xmm3
addq $0x180, %r9             # imm = 0x180
addq $-0x10, %rdx
jne 0x5375
movq %r13, %r9
movq %r13, %r10
leaq 0x18(%r10), %r11
cmpb $0x0, 0x14(%r10)
movq %r11, %r8
jne 0x5307
movq %r9, 0x30(%rsp)
addl $0xf, %ecx
andl $-0x10, %ecx
leaq 0x14(%r13), %rsi
pcmpeqd %xmm11, %xmm11
movq %r10, %r11
movdqa %xmm1, 0x10(%rsp)
testl %r15d, %r15d
setle %r8b
addq $0x18, %r11
cmpq %rax, %r11
setb %r9b
cmovaeq %r13, %r11
orb %r8b, %r9b
jne 0x5e2d
movq %rcx, %rdx
movq %rsi, %r8
movdqa 0x4934(%rip), %xmm12    # 0xa220
movdqa 0x491b(%rip), %xmm13    # 0xa210
movdqa 0x4902(%rip), %xmm14    # 0xa200
movdqa 0x48e9(%rip), %xmm15    # 0xa1f0
movdqa 0x50e1(%rip), %xmm6     # 0xa9f0
movdqa 0x50c9(%rip), %xmm5     # 0xa9e0
movdqa 0x50b1(%rip), %xmm4     # 0xa9d0
movdqa 0x5099(%rip), %xmm3     # 0xa9c0
movdqa %xmm1, %xmm7
movdqa 0x48fd(%rip), %xmm1     # 0xa230
pxor %xmm1, %xmm7
movdqa %xmm12, %xmm0
pxor %xmm1, %xmm0
movdqa %xmm0, %xmm2
pcmpgtd %xmm7, %xmm2
pshufd $0xa0, %xmm2, %xmm9     # xmm9 = xmm2[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm8     # xmm8 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm7, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm0, %xmm1     # xmm1 = xmm0[0,2,2,3,4,5,6,7]
pand %xmm8, %xmm1
pshufd $0xf5, %xmm2, %xmm10    # xmm10 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm2    # xmm2 = xmm10[0,2,2,3,4,5,6,7]
por %xmm1, %xmm2
pxor %xmm11, %xmm2
packssdw %xmm2, %xmm2
movd %xmm2, %r9d
testb $0x1, %r9b
je 0x598f
movb $0x0, (%r8)
pand %xmm9, %xmm0
por %xmm10, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm11, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %r9d
shrl $0x8, %r9d
testb $0x1, %r9b
je 0x59be
movb $0x0, 0x18(%r8)
movdqa %xmm13, %xmm1
pxor 0x4865(%rip), %xmm1     # 0xa230
movdqa %xmm1, %xmm2
pcmpgtd %xmm7, %xmm2
pshufd $0xa0, %xmm2, %xmm0     # xmm0 = xmm2[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm9     # xmm9 = xmm1[1,1,3,3]
movdqa %xmm9, %xmm1
pand %xmm0, %xmm1
pshufd $0xf5, %xmm2, %xmm10    # xmm10 = xmm2[1,1,3,3]
por %xmm10, %xmm1
packssdw %xmm1, %xmm1
pxor %xmm11, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
movd %xmm1, %r9d
shrl $0x10, %r9d
testb $0x1, %r9b
je 0x5a1b
movb $0x0, 0x30(%r8)
pshufhw $0x84, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm9, %xmm1     # xmm1 = xmm9[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm1
pshufhw $0x84, %xmm10, %xmm0    # xmm0 = xmm10[0,1,2,3,4,5,4,6]
por %xmm1, %xmm0
pxor %xmm11, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %r9d
shrl $0x18, %r9d
testb $0x1, %r9b
je 0x5a55
movb $0x0, 0x48(%r8)
movdqa %xmm14, %xmm0
pxor 0x47ce(%rip), %xmm0     # 0xa230
movdqa %xmm0, %xmm1
pcmpgtd %xmm7, %xmm1
pshufd $0xa0, %xmm1, %xmm9     # xmm9 = xmm1[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm2     # xmm2 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm7, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm0, %xmm8     # xmm8 = xmm0[0,2,2,3,4,5,6,7]
pand %xmm2, %xmm8
pshufd $0xf5, %xmm1, %xmm10    # xmm10 = xmm1[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm1    # xmm1 = xmm10[0,2,2,3,4,5,6,7]
por %xmm8, %xmm1
pxor %xmm11, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x2, %xmm1, %r9d
testb $0x1, %r9b
je 0x5ab9
movb $0x0, 0x60(%r8)
pand %xmm9, %xmm0
por %xmm10, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm11, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %r9d
shrl $0x8, %r9d
testb $0x1, %r9b
je 0x5ae9
movb $0x0, 0x78(%r8)
movdqa %xmm15, %xmm1
pxor 0x473a(%rip), %xmm1     # 0xa230
movdqa %xmm1, %xmm2
pcmpgtd %xmm7, %xmm2
pshufd $0xa0, %xmm2, %xmm0     # xmm0 = xmm2[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm9     # xmm9 = xmm1[1,1,3,3]
movdqa %xmm9, %xmm1
pand %xmm0, %xmm1
pshufd $0xf5, %xmm2, %xmm10    # xmm10 = xmm2[1,1,3,3]
por %xmm10, %xmm1
packssdw %xmm1, %xmm1
pxor %xmm11, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x3, %xmm1, %r9d
testb $0x1, %r9b
je 0x5b46
movb $0x0, 0x90(%r8)
pshufhw $0x84, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm9, %xmm1     # xmm1 = xmm9[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm1
pshufhw $0x84, %xmm10, %xmm0    # xmm0 = xmm10[0,1,2,3,4,5,4,6]
por %xmm1, %xmm0
pxor %xmm11, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %r9d
shrl $0x8, %r9d
testb $0x1, %r9b
je 0x5b84
movb $0x0, 0xa8(%r8)
movdqa %xmm6, %xmm0
pxor 0x46a0(%rip), %xmm0     # 0xa230
movdqa %xmm0, %xmm1
pcmpgtd %xmm7, %xmm1
pshufd $0xa0, %xmm1, %xmm9     # xmm9 = xmm1[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm2     # xmm2 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm7, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm0, %xmm8     # xmm8 = xmm0[0,2,2,3,4,5,6,7]
pand %xmm2, %xmm8
pshufd $0xf5, %xmm1, %xmm10    # xmm10 = xmm1[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm1    # xmm1 = xmm10[0,2,2,3,4,5,6,7]
por %xmm8, %xmm1
pxor %xmm11, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x4, %xmm1, %r9d
testb $0x1, %r9b
je 0x5bea
movb $0x0, 0xc0(%r8)
pand %xmm9, %xmm0
por %xmm10, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm11, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x4, %xmm0, %r9d
shrl $0x8, %r9d
testb $0x1, %r9b
je 0x5c1d
movb $0x0, 0xd8(%r8)
movdqa %xmm5, %xmm1
pxor 0x4607(%rip), %xmm1     # 0xa230
movdqa %xmm1, %xmm2
pcmpgtd %xmm7, %xmm2
pshufd $0xa0, %xmm2, %xmm0     # xmm0 = xmm2[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm9     # xmm9 = xmm1[1,1,3,3]
movdqa %xmm9, %xmm1
pand %xmm0, %xmm1
pshufd $0xf5, %xmm2, %xmm10    # xmm10 = xmm2[1,1,3,3]
por %xmm10, %xmm1
packssdw %xmm1, %xmm1
pxor %xmm11, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x5, %xmm1, %r9d
testb $0x1, %r9b
je 0x5c79
movb $0x0, 0xf0(%r8)
pshufhw $0x84, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm9, %xmm1     # xmm1 = xmm9[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm1
pshufhw $0x84, %xmm10, %xmm0    # xmm0 = xmm10[0,1,2,3,4,5,4,6]
por %xmm1, %xmm0
pxor %xmm11, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %r9d
shrl $0x8, %r9d
testb $0x1, %r9b
je 0x5cb7
movb $0x0, 0x108(%r8)
movdqa %xmm4, %xmm0
pxor 0x456d(%rip), %xmm0     # 0xa230
movdqa %xmm0, %xmm1
pcmpgtd %xmm7, %xmm1
pshufd $0xa0, %xmm1, %xmm9     # xmm9 = xmm1[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm2     # xmm2 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm7, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm0, %xmm8     # xmm8 = xmm0[0,2,2,3,4,5,6,7]
pand %xmm2, %xmm8
pshufd $0xf5, %xmm1, %xmm10    # xmm10 = xmm1[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm1    # xmm1 = xmm10[0,2,2,3,4,5,6,7]
por %xmm8, %xmm1
pxor %xmm11, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x6, %xmm1, %r9d
testb $0x1, %r9b
je 0x5d1d
movb $0x0, 0x120(%r8)
pand %xmm9, %xmm0
por %xmm10, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm11, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %r9d
shrl $0x8, %r9d
testb $0x1, %r9b
je 0x5d50
movb $0x0, 0x138(%r8)
movdqa %xmm3, %xmm1
pxor 0x44d4(%rip), %xmm1     # 0xa230
movdqa %xmm1, %xmm2
pcmpgtd %xmm7, %xmm2
pshufd $0xa0, %xmm2, %xmm0     # xmm0 = xmm2[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm7     # xmm7 = xmm1[1,1,3,3]
movdqa %xmm7, %xmm1
pand %xmm0, %xmm1
pshufd $0xf5, %xmm2, %xmm9     # xmm9 = xmm2[1,1,3,3]
por %xmm9, %xmm1
packssdw %xmm1, %xmm1
pxor %xmm11, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x7, %xmm1, %r9d
testb $0x1, %r9b
je 0x5daa
movb $0x0, 0x150(%r8)
pshufhw $0x84, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm7, %xmm1     # xmm1 = xmm7[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm1
pshufhw $0x84, %xmm9, %xmm0     # xmm0 = xmm9[0,1,2,3,4,5,4,6]
por %xmm1, %xmm0
pxor %xmm11, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %r9d
shrl $0x8, %r9d
testb $0x1, %r9b
je 0x5de7
movb $0x0, 0x168(%r8)
movdqa 0x4c11(%rip), %xmm0     # 0xaa00
paddq %xmm0, %xmm12
paddq %xmm0, %xmm13
paddq %xmm0, %xmm14
paddq %xmm0, %xmm15
paddq %xmm0, %xmm6
paddq %xmm0, %xmm5
paddq %xmm0, %xmm4
paddq %xmm0, %xmm3
addq $0x180, %r8             # imm = 0x180
addq $-0x10, %rdx
movdqa 0x10(%rsp), %xmm1
jne 0x5927
movq %r13, %r11
cmpb $0x0, 0x14(%r11)
jne 0x58be
leaq 0x18(%r11), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq %rax, (%r10)
movl $0x1, 0x10(%r10)
xorl %eax, %eax
movq %rax, 0x8(%r10)
movb $0x1, %cl
movb %cl, 0x14(%r10)
movq 0x18(%rdx), %rsi
movq %rsi, (%r11)
movl $0x2, 0x10(%r11)
movq %rax, 0x8(%r11)
movb %cl, 0x14(%r11)
testl %ebx, %ebx
jle 0x5e95
movl %ebx, %eax
shlq $0x4, %rax
xorl %ecx, %ecx
movq %r10, (%rdi,%rcx)
movq %r11, 0x8(%rdi,%rcx)
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x5e83
cmpl $0x3, %r12d
movq %rbx, 0x10(%rsp)
jl 0x5f00
leal -0x4(,%r12,2), %eax
leal -0x5(,%r12,2), %ebp
movq 0x10(%rsp), %rcx
leal -0x1(%rcx), %r13d
cmpl $0x2, %eax
movl $0x1, %ebx
cmovgel %eax, %ebx
xorl %r15d, %r15d
xorl %eax, %eax
cmpl %r15d, %ebp
sete %al
movl %eax, (%rsp)
movq 0x10(%rsp), %rsi
movl %r12d, %ecx
leaq 0x28(%rsp), %r8
movl %r13d, %r9d
movq %r12, %r14
movq %rdi, %r12
callq 0x5f78
movq %r12, %rdi
movq %r14, %r12
movq 0x8(%rsp), %rdx
incl %r15d
cmpl %r15d, %ebx
jne 0x5ec7
movq 0x40(%rsp), %rax
movq -0x8(%rdi,%rax), %rax
testq %rax, %rax
movq 0x20(%rsp), %r9
je 0x5f46
movq %rdx, %rcx
addq $0x10, %rcx
cmpl $0x0, 0x10(%rax)
jle 0x5f3d
movq %rcx, %r8
xorl %esi, %esi
movslq (%r8), %r10
incl (%r9,%r10,4)
incq %rsi
movslq 0x10(%rax), %r10
addq $0x18, %r8
cmpq %r10, %rsi
jl 0x5f26
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x5f1b
movq %rdx, %rbx
callq 0x1030
movq %rbx, %rdi
callq 0x1030
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
callq 0x1030
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq