// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/zopfli/src/zopfli/deflate.c
// Function: EncodeTree
static size_t EncodeTree(const unsigned* ll_lengths,
                         const unsigned* d_lengths,
                         int use_16, int use_17, int use_18,
                         unsigned char* bp,
                         unsigned char** out, size_t* outsize) {
  unsigned lld_total;  /* Total amount of literal, length, distance codes. */
  /* Runlength encoded version of lengths of litlen and dist trees. */
  unsigned* rle = 0;
  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;
  unsigned hlit2;
  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. */
  static const unsigned order[19] = {
    16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
  };
  int size_only = !out;
  size_t result_size = 0;

  for(i = 0; i < 19; i++) clcounts[i] = 0;

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

  lld_total = hlit2 + hdist + 1;

  for (i = 0; i < lld_total; i++) {
    /* This is an encoding of a huffman tree, so now the length is a symbol */
    unsigned char symbol = i < hlit2 ? ll_lengths[i] : d_lengths[i - hlit2];
    unsigned count = 1;
    if(use_16 || (symbol == 0 && (use_17 || use_18))) {
      for (j = i + 1; j < lld_total && symbol ==
          (j < hlit2 ? ll_lengths[j] : d_lengths[j - hlit2]); j++) {
        count++;
      }
    }
    i += count - 1;

    /* Repetitions of zeroes */
    if (symbol == 0 && count >= 3) {
      if (use_18) {
        while (count >= 11) {
          unsigned count2 = count > 138 ? 138 : count;
          if (!size_only) {
            ZOPFLI_APPEND_DATA(18, &rle, &rle_size);
            ZOPFLI_APPEND_DATA(count2 - 11, &rle_bits, &rle_bits_size);
          }
          clcounts[18]++;
          count -= count2;
        }
      }
      if (use_17) {
        while (count >= 3) {
          unsigned count2 = count > 10 ? 10 : count;
          if (!size_only) {
            ZOPFLI_APPEND_DATA(17, &rle, &rle_size);
            ZOPFLI_APPEND_DATA(count2 - 3, &rle_bits, &rle_bits_size);
          }
          clcounts[17]++;
          count -= count2;
        }
      }
    }

    /* Repetitions of any symbol */
    if (use_16 && count >= 4) {
      count--;  /* Since the first one is hardcoded. */
      clcounts[symbol]++;
      if (!size_only) {
        ZOPFLI_APPEND_DATA(symbol, &rle, &rle_size);
        ZOPFLI_APPEND_DATA(0, &rle_bits, &rle_bits_size);
      }
      while (count >= 3) {
        unsigned count2 = count > 6 ? 6 : count;
        if (!size_only) {
          ZOPFLI_APPEND_DATA(16, &rle, &rle_size);
          ZOPFLI_APPEND_DATA(count2 - 3, &rle_bits, &rle_bits_size);
        }
        clcounts[16]++;
        count -= count2;
      }
    }

    /* No or insufficient repetition */
    clcounts[symbol] += count;
    while (count > 0) {
      if (!size_only) {
        ZOPFLI_APPEND_DATA(symbol, &rle, &rle_size);
        ZOPFLI_APPEND_DATA(0, &rle_bits, &rle_bits_size);
      }
      count--;
    }
  }

  ZopfliCalculateBitLengths(clcounts, 19, 7, clcl);
  if (!size_only) ZopfliLengthsToSymbols(clcl, 19, 7, clsymbols);

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

  if (!size_only) {
    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);
    }
  }

  result_size += 14;  /* hlit, hdist, hclen bits */
  result_size += (hclen + 4) * 3;  /* clcl bits */
  for(i = 0; i < 19; i++) {
    result_size += clcl[i] * clcounts[i];
  }
  /* Extra bits. */
  result_size += clcounts[16] * 2;
  result_size += clcounts[17] * 3;
  result_size += clcounts[18] * 7;

  /* Note: in case of "size_only" these are null pointers so no effect. */
  free(rle);
  free(rle_bits);

  return result_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x1d, -0x54(%rbp)
movl $0x1d, -0x58(%rbp)
cmpq $0x0, 0x10(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1b4(%rbp)
movq $0x0, -0x1c0(%rbp)
movq $0x0, -0x68(%rbp)
cmpq $0x13, -0x68(%rbp)
jae 0x14724
movq -0x68(%rbp), %rax
movq $0x0, -0x110(%rbp,%rax,8)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x146ff
jmp 0x14726
xorl %eax, %eax
cmpl $0x0, -0x54(%rbp)
movb %al, -0x1d9(%rbp)
jbe 0x14753
movq -0x8(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x101, %ecx            # imm = 0x101
subl $0x1, %ecx
movl %ecx, %ecx
cmpl $0x0, (%rax,%rcx,4)
sete %al
movb %al, -0x1d9(%rbp)
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0x1475f
jmp 0x1476a
movl -0x54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x14726
jmp 0x1476c
xorl %eax, %eax
cmpl $0x0, -0x58(%rbp)
movb %al, -0x1da(%rbp)
jbe 0x14796
movq -0x10(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
cmpl $0x0, (%rax,%rcx,4)
sete %al
movb %al, -0x1da(%rbp)
movb -0x1da(%rbp), %al
testb $0x1, %al
jne 0x147a2
jmp 0x147ad
movl -0x58(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1476c
movl -0x54(%rbp), %eax
addl $0x101, %eax            # imm = 0x101
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
addl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl -0x2c(%rbp), %ecx
cmpq %rcx, %rax
jae 0x14fc3
movq -0x68(%rbp), %rax
movl -0x60(%rbp), %ecx
cmpq %rcx, %rax
jae 0x147fb
movq -0x8(%rbp), %rax
movq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1e0(%rbp)
jmp 0x14812
movq -0x10(%rbp), %rax
movq -0x68(%rbp), %rcx
movl -0x60(%rbp), %edx
subq %rdx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1e0(%rbp)
movl -0x1e0(%rbp), %eax
movb %al, -0x1c1(%rbp)
movl $0x1, -0x1c8(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x1484e
movzbl -0x1c1(%rbp), %eax
cmpl $0x0, %eax
jne 0x148f8
cmpl $0x0, -0x18(%rbp)
jne 0x1484e
cmpl $0x0, -0x1c(%rbp)
je 0x148f8
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rcx
movl -0x2c(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x1e1(%rbp)
jae 0x148ca
movzbl -0x1c1(%rbp), %eax
movl %eax, -0x1e8(%rbp)
movq -0x70(%rbp), %rax
movl -0x60(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1489c
movq -0x8(%rbp), %rax
movq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1ec(%rbp)
jmp 0x148b3
movq -0x10(%rbp), %rax
movq -0x70(%rbp), %rcx
movl -0x60(%rbp), %edx
subq %rdx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1ec(%rbp)
movl -0x1e8(%rbp), %eax
movl -0x1ec(%rbp), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x1e1(%rbp)
movb -0x1e1(%rbp), %al
testb $0x1, %al
jne 0x148d6
jmp 0x148f6
movl -0x1c8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c8(%rbp)
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x1485a
jmp 0x148f8
movl -0x1c8(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movzbl -0x1c1(%rbp), %eax
cmpl $0x0, %eax
jne 0x14bf3
cmpl $0x3, -0x1c8(%rbp)
jb 0x14bf3
cmpl $0x0, -0x1c(%rbp)
je 0x14a8b
jmp 0x14934
cmpl $0xb, -0x1c8(%rbp)
jb 0x14a89
cmpl $0x8a, -0x1c8(%rbp)
jbe 0x1495a
movl $0x8a, %eax
movl %eax, -0x1f0(%rbp)
jmp 0x14966
movl -0x1c8(%rbp), %eax
movl %eax, -0x1f0(%rbp)
movl -0x1f0(%rbp), %eax
movl %eax, -0x1cc(%rbp)
cmpl $0x0, -0x1b4(%rbp)
jne 0x14a64
movq -0x48(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x149d4
cmpq $0x0, -0x48(%rbp)
jne 0x149ae
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x1f8(%rbp)
jmp 0x149c9
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movl $0x12, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq -0x50(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14a44
cmpq $0x0, -0x50(%rbp)
jne 0x14a1e
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x200(%rbp)
jmp 0x14a39
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x1cc(%rbp), %edx
subl $0xb, %edx
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
movl -0x1cc(%rbp), %ecx
movl -0x1c8(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c8(%rbp)
jmp 0x14934
jmp 0x14a8b
cmpl $0x0, -0x18(%rbp)
je 0x14bf1
jmp 0x14a97
cmpl $0x3, -0x1c8(%rbp)
jb 0x14bef
cmpl $0xa, -0x1c8(%rbp)
jbe 0x14aba
movl $0xa, %eax
movl %eax, -0x204(%rbp)
jmp 0x14ac6
movl -0x1c8(%rbp), %eax
movl %eax, -0x204(%rbp)
movl -0x204(%rbp), %eax
movl %eax, -0x1d0(%rbp)
cmpl $0x0, -0x1b4(%rbp)
jne 0x14bc4
movq -0x48(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14b34
cmpq $0x0, -0x48(%rbp)
jne 0x14b0e
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x210(%rbp)
jmp 0x14b29
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movl $0x11, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq -0x50(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14ba4
cmpq $0x0, -0x50(%rbp)
jne 0x14b7e
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x218(%rbp)
jmp 0x14b99
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x1d0(%rbp), %edx
subl $0x3, %edx
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
movl -0x1d0(%rbp), %ecx
movl -0x1c8(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c8(%rbp)
jmp 0x14a97
jmp 0x14bf1
jmp 0x14bf3
cmpl $0x0, -0x14(%rbp)
je 0x14e80
cmpl $0x4, -0x1c8(%rbp)
jb 0x14e80
movl -0x1c8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c8(%rbp)
movzbl -0x1c1(%rbp), %eax
movq -0x110(%rbp,%rax,8), %rcx
addq $0x1, %rcx
movq %rcx, -0x110(%rbp,%rax,8)
cmpl $0x0, -0x1b4(%rbp)
jne 0x14d24
movq -0x48(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14c96
cmpq $0x0, -0x48(%rbp)
jne 0x14c70
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x220(%rbp)
jmp 0x14c8b
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x38(%rbp)
movzbl -0x1c1(%rbp), %edx
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq -0x50(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14d09
cmpq $0x0, -0x50(%rbp)
jne 0x14ce3
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x228(%rbp)
jmp 0x14cfe
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x14d26
cmpl $0x3, -0x1c8(%rbp)
jb 0x14e7e
cmpl $0x6, -0x1c8(%rbp)
jbe 0x14d49
movl $0x6, %eax
movl %eax, -0x22c(%rbp)
jmp 0x14d55
movl -0x1c8(%rbp), %eax
movl %eax, -0x22c(%rbp)
movl -0x22c(%rbp), %eax
movl %eax, -0x1d4(%rbp)
cmpl $0x0, -0x1b4(%rbp)
jne 0x14e53
movq -0x48(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14dc3
cmpq $0x0, -0x48(%rbp)
jne 0x14d9d
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x238(%rbp)
jmp 0x14db8
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movl $0x10, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq -0x50(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14e33
cmpq $0x0, -0x50(%rbp)
jne 0x14e0d
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x240(%rbp)
jmp 0x14e28
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x1d4(%rbp), %edx
subl $0x3, %edx
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movl -0x1d4(%rbp), %ecx
movl -0x1c8(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c8(%rbp)
jmp 0x14d26
jmp 0x14e80
movl -0x1c8(%rbp), %eax
movl %eax, %ecx
movzbl -0x1c1(%rbp), %eax
addq -0x110(%rbp,%rax,8), %rcx
movq %rcx, -0x110(%rbp,%rax,8)
cmpl $0x0, -0x1c8(%rbp)
jbe 0x14fb0
cmpl $0x0, -0x1b4(%rbp)
jne 0x14f9c
movq -0x48(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14f0e
cmpq $0x0, -0x48(%rbp)
jne 0x14ee8
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x248(%rbp)
jmp 0x14f03
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rax
movq %rax, -0x38(%rbp)
movzbl -0x1c1(%rbp), %edx
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq -0x50(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x14f81
cmpq $0x0, -0x50(%rbp)
jne 0x14f5b
movl $0x4, %edi
callq 0x33d0
movq %rax, -0x250(%rbp)
jmp 0x14f76
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x3430
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movl -0x1c8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c8(%rbp)
jmp 0x14e9f
jmp 0x14fb2
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x147cc
leaq -0x110(%rbp), %rdi
leaq -0x160(%rbp), %rcx
movl $0x13, %esi
movl $0x7, %edx
callq 0x16ae0
cmpl $0x0, -0x1b4(%rbp)
jne 0x15006
leaq -0x160(%rbp), %rdi
leaq -0x1b0(%rbp), %rcx
movl $0x13, %esi
movl $0x7, %edx
callq 0x16730
movl $0xf, -0x5c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x5c(%rbp)
movb %al, -0x251(%rbp)
jbe 0x15044
movl -0x5c(%rbp), %eax
addl $0x4, %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x90d1(%rip), %rax      # 0x1e100
movl (%rax,%rcx,4), %eax
cmpq $0x0, -0x110(%rbp,%rax,8)
sete %al
movb %al, -0x251(%rbp)
movb -0x251(%rbp), %al
testb $0x1, %al
jne 0x15050
jmp 0x1505b
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1500d
cmpl $0x0, -0x1b4(%rbp)
jne 0x15206
movl -0x54(%rbp), %edi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movl $0x5, %esi
callq 0x152e0
movl -0x58(%rbp), %edi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movl $0x5, %esi
callq 0x152e0
movl -0x5c(%rbp), %edi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movl $0x4, %esi
callq 0x152e0
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl -0x5c(%rbp), %ecx
addl $0x4, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x15105
movq -0x68(%rbp), %rcx
leaq 0x9029(%rip), %rax      # 0x1e100
movl (%rax,%rcx,4), %eax
movl -0x160(%rbp,%rax,4), %edi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movl $0x3, %esi
callq 0x152e0
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x150bb
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x15204
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl -0x1b0(%rbp,%rax,4), %eax
movl %eax, -0x1d8(%rbp)
movl -0x1d8(%rbp), %edi
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl -0x160(%rbp,%rax,4), %esi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
callq 0x15400
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
cmpl $0x10, (%rax,%rcx,4)
jne 0x1518d
movq -0x40(%rbp), %rax
movq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %edi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movl $0x2, %esi
callq 0x152e0
jmp 0x151f1
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
cmpl $0x11, (%rax,%rcx,4)
jne 0x151be
movq -0x40(%rbp), %rax
movq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %edi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movl $0x3, %esi
callq 0x152e0
jmp 0x151ef
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
cmpl $0x12, (%rax,%rcx,4)
jne 0x151ed
movq -0x40(%rbp), %rax
movq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %edi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movl $0x7, %esi
callq 0x152e0
jmp 0x151ef
jmp 0x151f1
jmp 0x151f3
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x1510d
jmp 0x15206
movq -0x1c0(%rbp), %rax
addq $0xe, %rax
movq %rax, -0x1c0(%rbp)
movl -0x5c(%rbp), %eax
addl $0x4, %eax
imull $0x3, %eax, %eax
movl %eax, %eax
addq -0x1c0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq $0x0, -0x68(%rbp)
cmpq $0x13, -0x68(%rbp)
jae 0x15274
movq -0x68(%rbp), %rax
movl -0x160(%rbp,%rax,4), %eax
movq -0x68(%rbp), %rcx
imulq -0x110(%rbp,%rcx,8), %rax
addq -0x1c0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x15239
movq -0x90(%rbp), %rax
shlq %rax
addq -0x1c0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
imulq $0x3, -0x88(%rbp), %rax
addq -0x1c0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
imulq $0x7, -0x80(%rbp), %rax
addq -0x1c0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3050
movq -0x40(%rbp), %rdi
callq 0x3050
movq -0x1c0(%rbp), %rax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
nopw (%rax,%rax)