// File: /workspace/github_c_makefile_star2_O0/imaya[P]zopfli-for-emscripten/deflate.c
// Function: AddDynamicTree
static void AddDynamicTree(const unsigned* ll_lengths,
                           const unsigned* d_lengths,
                           unsigned char* bp,
                           unsigned char** out, size_t* outsize) {
  unsigned* lld_lengths = 0;  /* All litlen and dist lengthts with ending zeros
      trimmed together in one array. */
  unsigned lld_total;  /* Size of lld_lengths. */
  unsigned* rle = 0;  /* Runlength encoded version of lengths of litlen and dist
      trees. */
  unsigned* rle_bits = 0;  /* Extra bits for rle values 16, 17 and 18. */
  size_t rle_size = 0;  /* Size of rle array. */
  size_t rle_bits_size = 0;  /* Should have same value as rle_size. */
  unsigned hlit = 29; /* 286 - 257 */
  unsigned hdist = 29;  /* 32 - 1, but gzip does not like hdist > 29.*/
  unsigned hclen;
  size_t i, j;
  size_t clcounts[19];
  unsigned clcl[19];  /* Code length code lengths. */
  unsigned clsymbols[19];
  /* The order in which code length code lengths are encoded as per deflate. */
  unsigned order[19] = {
    16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
  };

  /* Trim zeros. */
  while (hlit > 0 && ll_lengths[257 + hlit - 1] == 0) hlit--;
  while (hdist > 0 && d_lengths[1 + hdist - 1] == 0) hdist--;

  lld_total = hlit + 257 + hdist + 1;
  lld_lengths = (unsigned*)malloc(sizeof(*lld_lengths) * lld_total);
  if (!lld_lengths) exit(-1); /* Allocation failed. */

  for (i = 0; i < lld_total; i++) {
    lld_lengths[i] = i < 257 + hlit
        ? ll_lengths[i] : d_lengths[i - 257 - hlit];
    assert(lld_lengths[i] < 16);
  }

  for (i = 0; i < lld_total; i++) {
    size_t count = 0;
    for (j = i; j < lld_total && lld_lengths[i] == lld_lengths[j]; j++) {
      count++;
    }
    if (count >= 4 || (count >= 3 && lld_lengths[i] == 0)) {
      if (lld_lengths[i] == 0) {
        if (count > 10) {
          if (count > 138) count = 138;
          ZOPFLI_APPEND_DATA(18, &rle, &rle_size);
          ZOPFLI_APPEND_DATA(count - 11, &rle_bits, &rle_bits_size);
        } else {
          ZOPFLI_APPEND_DATA(17, &rle, &rle_size);
          ZOPFLI_APPEND_DATA(count - 3, &rle_bits, &rle_bits_size);
        }
      } else {
        unsigned repeat = count - 1;  /* Since the first one is hardcoded. */
        ZOPFLI_APPEND_DATA(lld_lengths[i], &rle, &rle_size);
        ZOPFLI_APPEND_DATA(0, &rle_bits, &rle_bits_size);
        while (repeat >= 6) {
          ZOPFLI_APPEND_DATA(16, &rle, &rle_size);
          ZOPFLI_APPEND_DATA(6 - 3, &rle_bits, &rle_bits_size);
          repeat -= 6;
        }
        if (repeat >= 3) {
          ZOPFLI_APPEND_DATA(16, &rle, &rle_size);
          ZOPFLI_APPEND_DATA(3 - 3, &rle_bits, &rle_bits_size);
          repeat -= 3;
        }
        while (repeat != 0) {
          ZOPFLI_APPEND_DATA(lld_lengths[i], &rle, &rle_size);
          ZOPFLI_APPEND_DATA(0, &rle_bits, &rle_bits_size);
          repeat--;
        }
      }

      i += count - 1;
    } else {
      ZOPFLI_APPEND_DATA(lld_lengths[i], &rle, &rle_size);
      ZOPFLI_APPEND_DATA(0, &rle_bits, &rle_bits_size);
    }
    assert(rle[rle_size - 1] <= 18);
  }

  for (i = 0; i < 19; i++) {
    clcounts[i] = 0;
  }
  for (i = 0; i < rle_size; i++) {
    clcounts[rle[i]]++;
  }

  ZopfliCalculateBitLengths(clcounts, 19, 7, clcl);
  ZopfliLengthsToSymbols(clcl, 19, 7, clsymbols);

  hclen = 15;
  /* Trim zeros. */
  while (hclen > 0 && clcounts[order[hclen + 4 - 1]] == 0) hclen--;

  AddBits(hlit, 5, bp, out, outsize);
  AddBits(hdist, 5, bp, out, outsize);
  AddBits(hclen, 4, bp, out, outsize);

  for (i = 0; i < hclen + 4; i++) {
    AddBits(clcl[order[i]], 3, bp, out, outsize);
  }

  for (i = 0; i < rle_size; i++) {
    unsigned symbol = clsymbols[rle[i]];
    AddHuffmanBits(symbol, clcl[rle[i]], bp, out, outsize);
    /* Extra bits. */
    if (rle[i] == 16) AddBits(rle_bits[i], 2, bp, out, outsize);
    else if (rle[i] == 17) AddBits(rle_bits[i], 3, bp, out, outsize);
    else if (rle[i] == 18) AddBits(rle_bits[i], 7, bp, out, outsize);
  }

  free(lld_lengths);
  free(rle);
  free(rle_bits);
}

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, 0x2a0(%rsp)
movq %rsi, 0x298(%rsp)
movq %rdx, 0x290(%rsp)
movq %rcx, 0x288(%rsp)
movq %r8, 0x280(%rsp)
movq $0x0, 0x278(%rsp)
movq $0x0, 0x268(%rsp)
movq $0x0, 0x260(%rsp)
movq $0x0, 0x258(%rsp)
movq $0x0, 0x250(%rsp)
movl $0x1d, 0x24c(%rsp)
movl $0x1d, 0x248(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0xa210(%rip), %rsi      # 0xd880
movl $0x4c, %edx
callq 0x1110
xorl %eax, %eax
cmpl $0x0, 0x24c(%rsp)
movb %al, 0x8f(%rsp)
jbe 0x36b5
movq 0x2a0(%rsp), %rax
movl 0x24c(%rsp), %ecx
addl $0x101, %ecx            # imm = 0x101
subl $0x1, %ecx
movl %ecx, %ecx
cmpl $0x0, (%rax,%rcx,4)
sete %al
movb %al, 0x8f(%rsp)
movb 0x8f(%rsp), %al
testb $0x1, %al
jne 0x36c2
jmp 0x36d5
movl 0x24c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x24c(%rsp)
jmp 0x367a
jmp 0x36d7
xorl %eax, %eax
cmpl $0x0, 0x248(%rsp)
movb %al, 0x8e(%rsp)
jbe 0x370f
movq 0x298(%rsp), %rax
movl 0x248(%rsp), %ecx
addl $0x1, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
cmpl $0x0, (%rax,%rcx,4)
sete %al
movb %al, 0x8e(%rsp)
movb 0x8e(%rsp), %al
testb $0x1, %al
jne 0x371c
jmp 0x372f
movl 0x248(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x248(%rsp)
jmp 0x36d7
movl 0x24c(%rsp), %eax
addl $0x101, %eax            # imm = 0x101
addl 0x248(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x274(%rsp)
movl 0x274(%rsp), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x1120
movq %rax, 0x278(%rsp)
cmpq $0x0, 0x278(%rsp)
jne 0x377b
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1170
movq $0x0, 0x238(%rsp)
movq 0x238(%rsp), %rax
movl 0x274(%rsp), %ecx
cmpq %rcx, %rax
jae 0x386e
movq 0x238(%rsp), %rax
movl 0x24c(%rsp), %ecx
addl $0x101, %ecx            # imm = 0x101
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x37d7
movq 0x2a0(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x88(%rsp)
jmp 0x3802
movq 0x298(%rsp), %rax
movq 0x238(%rsp), %rcx
subq $0x101, %rcx            # imm = 0x101
movl 0x24c(%rsp), %edx
subq %rdx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x88(%rsp)
movl 0x88(%rsp), %edx
movq 0x278(%rsp), %rax
movq 0x238(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x278(%rsp), %rax
movq 0x238(%rsp), %rcx
cmpl $0x10, (%rax,%rcx,4)
jae 0x3834
jmp 0x3853
leaq 0x9b2d(%rip), %rdi      # 0xd368
leaq 0x9ab7(%rip), %rsi      # 0xd2f9
movl $0x86, %edx
leaq 0x9b2e(%rip), %rcx      # 0xd37c
callq 0x10b0
jmp 0x3855
movq 0x238(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x238(%rsp)
jmp 0x3787
movq $0x0, 0x238(%rsp)
movq 0x238(%rsp), %rax
movl 0x274(%rsp), %ecx
cmpq %rcx, %rax
jae 0x42ea
movq $0x0, 0x98(%rsp)
movq 0x238(%rsp), %rax
movq %rax, 0x230(%rsp)
movq 0x230(%rsp), %rcx
movl 0x274(%rsp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x87(%rsp)
jae 0x38fd
movq 0x278(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x278(%rsp), %rcx
movq 0x230(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
sete %al
movb %al, 0x87(%rsp)
movb 0x87(%rsp), %al
testb $0x1, %al
jne 0x390a
jmp 0x3937
movq 0x98(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
movq 0x230(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x230(%rsp)
jmp 0x38ae
cmpq $0x4, 0x98(%rsp)
jae 0x396b
cmpq $0x3, 0x98(%rsp)
jb 0x4161
movq 0x278(%rsp), %rax
movq 0x238(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x4161
movq 0x278(%rsp), %rax
movq 0x238(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x3c14
cmpq $0xa, 0x98(%rsp)
jbe 0x3ae1
cmpq $0x8a, 0x98(%rsp)
jbe 0x39ae
movq $0x8a, 0x98(%rsp)
movq 0x258(%rsp), %rax
movq 0x258(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3a15
cmpq $0x0, 0x258(%rsp)
jne 0x39e7
movl $0x4, %edi
callq 0x1120
movq %rax, 0x78(%rsp)
jmp 0x3a08
movq 0x268(%rsp), %rdi
movq 0x258(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x268(%rsp)
movq 0x268(%rsp), %rax
movq 0x258(%rsp), %rcx
movl $0x12, (%rax,%rcx,4)
movq 0x258(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x258(%rsp)
movq 0x250(%rsp), %rax
movq 0x250(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3aa7
cmpq $0x0, 0x250(%rsp)
jne 0x3a79
movl $0x4, %edi
callq 0x1120
movq %rax, 0x70(%rsp)
jmp 0x3a9a
movq 0x260(%rsp), %rdi
movq 0x250(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x98(%rsp), %rax
subq $0xb, %rax
movl %eax, %edx
movq 0x260(%rsp), %rax
movq 0x250(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x250(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x250(%rsp)
jmp 0x3c0f
movq 0x258(%rsp), %rax
movq 0x258(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3b48
cmpq $0x0, 0x258(%rsp)
jne 0x3b1a
movl $0x4, %edi
callq 0x1120
movq %rax, 0x68(%rsp)
jmp 0x3b3b
movq 0x268(%rsp), %rdi
movq 0x258(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x268(%rsp)
movq 0x268(%rsp), %rax
movq 0x258(%rsp), %rcx
movl $0x11, (%rax,%rcx,4)
movq 0x258(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x258(%rsp)
movq 0x250(%rsp), %rax
movq 0x250(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3bda
cmpq $0x0, 0x250(%rsp)
jne 0x3bac
movl $0x4, %edi
callq 0x1120
movq %rax, 0x60(%rsp)
jmp 0x3bcd
movq 0x260(%rsp), %rdi
movq 0x250(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x98(%rsp), %rax
subq $0x3, %rax
movl %eax, %edx
movq 0x260(%rsp), %rax
movq 0x250(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x250(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x250(%rsp)
jmp 0x4140
movq 0x98(%rsp), %rax
subq $0x1, %rax
movl %eax, 0x94(%rsp)
movq 0x258(%rsp), %rax
movq 0x258(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3c8e
cmpq $0x0, 0x258(%rsp)
jne 0x3c60
movl $0x4, %edi
callq 0x1120
movq %rax, 0x58(%rsp)
jmp 0x3c81
movq 0x268(%rsp), %rdi
movq 0x258(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x268(%rsp)
movq 0x278(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x268(%rsp), %rax
movq 0x258(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x258(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x258(%rsp)
movq 0x250(%rsp), %rax
movq 0x250(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3d2f
cmpq $0x0, 0x250(%rsp)
jne 0x3d01
movl $0x4, %edi
callq 0x1120
movq %rax, 0x50(%rsp)
jmp 0x3d22
movq 0x260(%rsp), %rdi
movq 0x250(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rax
movq 0x250(%rsp), %rcx
movl $0x0, (%rax,%rcx,4)
movq 0x250(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x250(%rsp)
cmpl $0x6, 0x94(%rsp)
jb 0x3ea2
movq 0x258(%rsp), %rax
movq 0x258(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3dcf
cmpq $0x0, 0x258(%rsp)
jne 0x3da1
movl $0x4, %edi
callq 0x1120
movq %rax, 0x48(%rsp)
jmp 0x3dc2
movq 0x268(%rsp), %rdi
movq 0x258(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x268(%rsp)
movq 0x268(%rsp), %rax
movq 0x258(%rsp), %rcx
movl $0x10, (%rax,%rcx,4)
movq 0x258(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x258(%rsp)
movq 0x250(%rsp), %rax
movq 0x250(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3e61
cmpq $0x0, 0x250(%rsp)
jne 0x3e33
movl $0x4, %edi
callq 0x1120
movq %rax, 0x40(%rsp)
jmp 0x3e54
movq 0x260(%rsp), %rdi
movq 0x250(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rax
movq 0x250(%rsp), %rcx
movl $0x3, (%rax,%rcx,4)
movq 0x250(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x250(%rsp)
movl 0x94(%rsp), %eax
subl $0x6, %eax
movl %eax, 0x94(%rsp)
jmp 0x3d5a
cmpl $0x3, 0x94(%rsp)
jb 0x3fe5
movq 0x258(%rsp), %rax
movq 0x258(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3f17
cmpq $0x0, 0x258(%rsp)
jne 0x3ee9
movl $0x4, %edi
callq 0x1120
movq %rax, 0x38(%rsp)
jmp 0x3f0a
movq 0x268(%rsp), %rdi
movq 0x258(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x268(%rsp)
movq 0x268(%rsp), %rax
movq 0x258(%rsp), %rcx
movl $0x10, (%rax,%rcx,4)
movq 0x258(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x258(%rsp)
movq 0x250(%rsp), %rax
movq 0x250(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x3fa9
cmpq $0x0, 0x250(%rsp)
jne 0x3f7b
movl $0x4, %edi
callq 0x1120
movq %rax, 0x30(%rsp)
jmp 0x3f9c
movq 0x260(%rsp), %rdi
movq 0x250(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rax
movq 0x250(%rsp), %rcx
movl $0x0, (%rax,%rcx,4)
movq 0x250(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x250(%rsp)
movl 0x94(%rsp), %eax
subl $0x3, %eax
movl %eax, 0x94(%rsp)
jmp 0x3fe7
cmpl $0x0, 0x94(%rsp)
je 0x413e
movq 0x258(%rsp), %rax
movq 0x258(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x405c
cmpq $0x0, 0x258(%rsp)
jne 0x402e
movl $0x4, %edi
callq 0x1120
movq %rax, 0x28(%rsp)
jmp 0x404f
movq 0x268(%rsp), %rdi
movq 0x258(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x268(%rsp)
movq 0x278(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x268(%rsp), %rax
movq 0x258(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x258(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x258(%rsp)
movq 0x250(%rsp), %rax
movq 0x250(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x40fd
cmpq $0x0, 0x250(%rsp)
jne 0x40cf
movl $0x4, %edi
callq 0x1120
movq %rax, 0x20(%rsp)
jmp 0x40f0
movq 0x260(%rsp), %rdi
movq 0x250(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rax
movq 0x250(%rsp), %rcx
movl $0x0, (%rax,%rcx,4)
movq 0x250(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x250(%rsp)
movl 0x94(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x3fe7
jmp 0x4140
movq 0x98(%rsp), %rax
subq $0x1, %rax
addq 0x238(%rsp), %rax
movq %rax, 0x238(%rsp)
jmp 0x4294
movq 0x258(%rsp), %rax
movq 0x258(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x41c8
cmpq $0x0, 0x258(%rsp)
jne 0x419a
movl $0x4, %edi
callq 0x1120
movq %rax, 0x18(%rsp)
jmp 0x41bb
movq 0x268(%rsp), %rdi
movq 0x258(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x268(%rsp)
movq 0x278(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x268(%rsp), %rax
movq 0x258(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x258(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x258(%rsp)
movq 0x250(%rsp), %rax
movq 0x250(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x4269
cmpq $0x0, 0x250(%rsp)
jne 0x423b
movl $0x4, %edi
callq 0x1120
movq %rax, 0x10(%rsp)
jmp 0x425c
movq 0x260(%rsp), %rdi
movq 0x250(%rsp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x1140
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rax
movq 0x250(%rsp), %rcx
movl $0x0, (%rax,%rcx,4)
movq 0x250(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x250(%rsp)
movq 0x268(%rsp), %rax
movq 0x258(%rsp), %rcx
subq $0x1, %rcx
cmpl $0x12, (%rax,%rcx,4)
ja 0x42b0
jmp 0x42cf
leaq 0x9132(%rip), %rdi      # 0xd3e9
leaq 0x903b(%rip), %rsi      # 0xd2f9
movl $0xb2, %edx
leaq 0x90b2(%rip), %rcx      # 0xd37c
callq 0x10b0
jmp 0x42d1
movq 0x238(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x238(%rsp)
jmp 0x387a
movq $0x0, 0x238(%rsp)
cmpq $0x13, 0x238(%rsp)
jae 0x432b
movq 0x238(%rsp), %rax
movq $0x0, 0x190(%rsp,%rax,8)
movq 0x238(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x238(%rsp)
jmp 0x42f6
movq $0x0, 0x238(%rsp)
movq 0x238(%rsp), %rax
cmpq 0x258(%rsp), %rax
jae 0x4386
movq 0x268(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x190(%rsp,%rax,8), %rcx
addq $0x1, %rcx
movq %rcx, 0x190(%rsp,%rax,8)
movq 0x238(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x238(%rsp)
jmp 0x4337
leaq 0x190(%rsp), %rdi
leaq 0x140(%rsp), %rcx
movl $0x13, %esi
movl $0x7, %edx
callq 0xb2f0
leaq 0x140(%rsp), %rdi
leaq 0xf0(%rsp), %rcx
movl $0x13, %esi
movl $0x7, %edx
callq 0xaee0
movl $0xf, 0x244(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x244(%rsp)
movb %al, 0xf(%rsp)
jbe 0x4405
movl 0x244(%rsp), %eax
addl $0x4, %eax
subl $0x1, %eax
movl %eax, %eax
movl 0xa0(%rsp,%rax,4), %eax
cmpq $0x0, 0x190(%rsp,%rax,8)
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x440f
jmp 0x4422
movl 0x244(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x244(%rsp)
jmp 0x43cf
movl 0x24c(%rsp), %edi
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %r8
movl $0x5, %esi
callq 0x46d0
movl 0x248(%rsp), %edi
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %r8
movl $0x5, %esi
callq 0x46d0
movl 0x244(%rsp), %edi
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %r8
movl $0x4, %esi
callq 0x46d0
movq $0x0, 0x238(%rsp)
movq 0x238(%rsp), %rax
movl 0x244(%rsp), %ecx
addl $0x4, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x4510
movq 0x238(%rsp), %rax
movl 0xa0(%rsp,%rax,4), %eax
movl 0x140(%rsp,%rax,4), %edi
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %r8
movl $0x3, %esi
callq 0x46d0
movq 0x238(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x238(%rsp)
jmp 0x44a9
movq $0x0, 0x238(%rsp)
movq 0x238(%rsp), %rax
cmpq 0x258(%rsp), %rax
jae 0x4698
movq 0x268(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl 0xf0(%rsp,%rax,4), %eax
movl %eax, 0x90(%rsp)
movl 0x90(%rsp), %edi
movq 0x268(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl 0x140(%rsp,%rax,4), %esi
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %r8
callq 0x4800
movq 0x268(%rsp), %rax
movq 0x238(%rsp), %rcx
cmpl $0x10, (%rax,%rcx,4)
jne 0x45e1
movq 0x260(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %edi
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %r8
movl $0x2, %esi
callq 0x46d0
jmp 0x467d
movq 0x268(%rsp), %rax
movq 0x238(%rsp), %rcx
cmpl $0x11, (%rax,%rcx,4)
jne 0x462e
movq 0x260(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %edi
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %r8
movl $0x3, %esi
callq 0x46d0
jmp 0x467b
movq 0x268(%rsp), %rax
movq 0x238(%rsp), %rcx
cmpl $0x12, (%rax,%rcx,4)
jne 0x4679
movq 0x260(%rsp), %rax
movq 0x238(%rsp), %rcx
movl (%rax,%rcx,4), %edi
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %r8
movl $0x7, %esi
callq 0x46d0
jmp 0x467b
jmp 0x467d
jmp 0x467f
movq 0x238(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x238(%rsp)
jmp 0x451c
movq 0x278(%rsp), %rdi
callq 0x1030
movq 0x268(%rsp), %rdi
callq 0x1030
movq 0x260(%rsp), %rdi
callq 0x1030
addq $0x2a8, %rsp            # imm = 0x2A8
retq
nopw (%rax,%rax)