// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/encdesc.c
// Function: gt_encdesc_encoder_encode
int gt_encdesc_encoder_encode(GtEncdescEncoder *ee,
                              GtCstrIterator *cstr_iterator,
                              const char *name, GtError *err)
{
  int had_err = 0;
  bool is_not_at_pageborder;
  FILE *fp = NULL;
  GtStr *name1;
  GtWord sampling_start_safe_pos = 0;
  const GtUword dummy = 0;
  GtUword pagesize;

  gt_assert(ee != NULL);
  gt_assert(cstr_iterator != NULL);
  gt_assert(name != NULL);
  gt_error_check(err);
  if (ee->timer != NULL) {
    gt_timer_show_progress(ee->timer, "analyze descriptions", stdout);
  }
  had_err = encdesc_analyze_descs(ee->encdesc, cstr_iterator, err);

  if (!had_err) {
    if (ee->timer != NULL) {
      gt_timer_show_progress(ee->timer, "write encoding header", stdout);
    }

    fp = gt_fa_fopen_with_suffix(name, GT_ENCDESC_FILESUFFIX, "wb", err);
    if (fp == NULL)
      had_err = -1;
  }

  /* also determines if fields will use hc */
  if (!had_err)
    had_err = encdesc_write_header(ee->encdesc, fp, err);
  if (!had_err) {
    if (ee->timer != NULL) {
      gt_timer_show_progress(ee->timer, "calculate huffmans", stdout);
    }
    encdesc_init_huffman(ee->encdesc);
    if (ee->timer != NULL) {
      gt_timer_show_progress(ee->timer, "write encoding", stdout);
    }
    gt_error_check(err);
    sampling_start_safe_pos = ftell(fp);
    gt_xfwrite_one(&dummy, fp);

    pagesize = ee->encdesc->pagesize;
    is_not_at_pageborder = (ftell(fp) % pagesize) != 0;
    if (is_not_at_pageborder)
      ee->encdesc->start_of_encoding = (ftell(fp) / pagesize + 1) * pagesize;
    else
      ee->encdesc->start_of_encoding = ftell(fp);

    gt_xfwrite_one(&ee->encdesc->start_of_encoding, fp);

    gt_xfseek(fp, ee->encdesc->start_of_encoding, SEEK_SET);

    if (ee->page_sampling)
      ee->encdesc->sampling =
        gt_sampling_new_page(ee->sampling_rate,
                             (off_t) ee->encdesc->start_of_encoding);
    else if (ee->regular_sampling)
      ee->encdesc->sampling =
        gt_sampling_new_regular(ee->sampling_rate,
                                (off_t) ee->encdesc->start_of_encoding);
    had_err = encdesc_write_encoding(ee->encdesc, cstr_iterator, fp, err);
  }
  if (!had_err) {
    if (ee->encdesc->sampling != NULL) {
      gt_xfseek(fp, sampling_start_safe_pos, SEEK_SET);
      gt_xfwrite_one(&ee->encdesc->start_of_samplingtab, fp);
    }
  }

  gt_fa_xfclose(fp);
  if (!had_err) {
    if (ee->timer != NULL) {
      gt_timer_show_progress(ee->timer,
                             "description encoding finished", stdout);
    }
    if (gt_log_enabled()) {
      GtUword rate;
      name1 = gt_str_new_cstr(name);
      gt_str_append_cstr(name1, GT_ENCDESC_FILESUFFIX);
      gt_log_log("description encoding overview:");
      gt_log_log("==>");
      if (ee->encdesc->sampling != NULL) {
        rate = gt_sampling_get_rate(ee->encdesc->sampling);
        if (gt_sampling_is_regular(ee->encdesc->sampling)) {
          gt_log_log("applied sampling technique:"
                     " sampling every "GT_WU"th description",
                     rate);
        }
        else {
          gt_log_log("applied sampling technique:"
                     " sampling every "GT_WU"th page",
                     rate);
        }
      }
      else {
        gt_log_log("applied sampling technique: none");
      }

      gt_log_log("total number of encoded descriptions: "GT_WU"",
                 ee->encdesc->num_of_descs);
      gt_log_log("total number of encoded characters: "GT_LLU"",
                 ee->encdesc->total_num_of_chars);
      gt_log_log("bits per character encoding: %f",
                 (gt_file_estimate_size(gt_str_get(name1)) * 8.0) /
                 ee->encdesc->total_num_of_chars);
      gt_log_log("<==");
      gt_str_delete(name1);
    }
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq $0x0, 0xa0(%rsp)
testq %rdi, %rdi
je 0x13c0ee
movq %rsi, %r12
testq %rsi, %rsi
je 0x13c0f3
movq %rdx, %r14
testq %rdx, %rdx
je 0x13c0f8
movq %rcx, %r15
movq %rdi, %rbx
testq %rcx, %rcx
je 0x13ae67
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0x13c102
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x13ae85
movq 0x37e062(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x241003(%rip), %rsi    # 0x37be83
callq 0x11cc90
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movq %rax, 0x38(%rsp)
movq %rax, 0x40(%rcx)
movb $0x1, 0x6c(%rcx)
pxor %xmm0, %xmm0
movdqu %xmm0, (%rcx)
movq %rcx, 0x48(%rsp)
movq %rax, 0x10(%rcx)
testq %r15, %r15
je 0x13aebe
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0x13c107
leaq 0x38(%rsp), %rsi
movq %r12, 0x58(%rsp)
movq %r12, %rdi
movq %r15, 0x40(%rsp)
movq %r15, %rdx
callq 0x2fd420
testl %eax, %eax
je 0x13b6e2
movl %eax, %r12d
movq %r14, 0x90(%rsp)
movq %rbx, 0x80(%rsp)
xorl %ebx, %ebx
leaq 0x2411ee(%rip), %r13    # 0x37c0ea
leaq 0x240e25(%rip), %r14    # 0x37bd28
leaq 0x38(%rsp), %r15
xorl %ebp, %ebp
testl %r12d, %r12d
js 0x13b70b
movq 0x38(%rsp), %r12
testq %r12, %r12
je 0x13c0d0
movq %r12, %rdi
callq 0x172f0
leaq 0x1(%rax), %rcx
cmpq $0x1, %rcx
adcq $0x1, %rax
xorl %ecx, %ecx
xorl %edx, %edx
movb (%r12,%rdx), %sil
xorl %edi, %edi
cmpb (%rdi,%r13), %sil
je 0x13af50
incq %rdi
cmpq $0xa, %rdi
jne 0x13af3f
jmp 0x13af5c
cmpq %rbp, %rdx
je 0x13af5c
incq %rcx
leaq 0x1(%rdx), %rbp
incq %rdx
cmpq %rax, %rdx
jne 0x13af39
movq 0x48(%rsp), %rax
cmpq 0x40(%rax), %rcx
jbe 0x13af90
movq %rcx, 0x40(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x17b, %edx            # imm = 0x17B
callq 0x1045eb
movq 0x38(%rsp), %rdi
callq 0xe4290
movq %rax, %rbx
movq 0x40(%rsp), %rdx
movq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x2fd420
movl %eax, %r12d
testl %eax, %eax
jne 0x13af0a
movq 0x48(%rsp), %r14
cmpq $0x0, 0x40(%r14)
je 0x13b6f2
testq %rbx, %rbx
je 0x13c10c
leaq 0x2411bb(%rip), %rdi    # 0x37c188
movq %rbx, %rsi
xorl %eax, %eax
callq 0x103d72
movq 0x40(%r14), %rdi
leaq 0x240d46(%rip), %rdx    # 0x37bd28
movl $0xc8, %esi
movl $0x18b, %ecx            # imm = 0x18B
callq 0x10436a
movq %rax, 0x18(%r14)
movq %rbx, %rdi
callq 0x172f0
xorl %edi, %edi
movq $0x0, 0x60(%rsp)
xorl %r12d, %r12d
movq %rax, 0x50(%rsp)
movb (%rbx,%r12), %r10b
xorl %edx, %edx
xorl %esi, %esi
movq %r12, %rcx
subq %rdi, %rcx
setne %r8b
cmpb (%rsi,%r13), %r10b
sete %r9b
andb %r8b, %r9b
orb %r9b, %dl
incq %rsi
cmpq $0xa, %rsi
jne 0x13b018
testb $0x1, %dl
je 0x13b1eb
movq 0x18(%r14), %rbp
imulq $0xc8, 0x60(%rsp), %r15
leaq (%r15,%rbp), %r14
movb %r10b, 0xb8(%rbp,%r15)
movb $0x0, (%rbx,%r12)
movq %rcx, 0x50(%rbp,%r15)
addq %rbx, %rdi
callq 0xe4290
movq %rax, 0x40(%rbp,%r15)
movq 0x50(%rbp,%r15), %rdi
movq %rdi, 0x68(%rbp,%r15)
movq %rdi, 0x58(%rbp,%r15)
movb $0x1, 0xbb(%rbp,%r15)
movw $0x1, 0xb9(%rbp,%r15)
movl $0x8, %esi
leaq 0x240c87(%rip), %rdx    # 0x37bd28
movl $0x1a7, %ecx            # imm = 0x1A7
callq 0x10436a
movq %rax, 0x30(%rbp,%r15)
cmpq $0x0, 0x68(%rbp,%r15)
je 0x13b0f5
xorl %ebp, %ebp
movups 0x37f087(%rip), %xmm0   # 0x4ba148
movups %xmm0, 0x20(%rsp)
movups 0x37f06b(%rip), %xmm0   # 0x4ba138
movups %xmm0, 0x10(%rsp)
movdqu 0x37f04e(%rip), %xmm0   # 0x4ba128
movdqu %xmm0, (%rsp)
callq 0x101194
movq 0x30(%r14), %rcx
movq %rax, (%rcx,%rbp,8)
incq %rbp
cmpq 0x68(%r14), %rbp
jb 0x13b0ba
movups 0x37f04c(%rip), %xmm0   # 0x4ba148
movups %xmm0, 0x20(%rsp)
movups 0x37f030(%rip), %xmm0   # 0x4ba138
movups %xmm0, 0x10(%rsp)
movups 0x37f014(%rip), %xmm0   # 0x4ba128
movups %xmm0, (%rsp)
callq 0x101194
movq %rax, 0x20(%r14)
movups 0x37f020(%rip), %xmm0   # 0x4ba148
movups %xmm0, 0x20(%rsp)
movups 0x37f004(%rip), %xmm0   # 0x4ba138
movups %xmm0, 0x10(%rsp)
movdqu 0x37efe7(%rip), %xmm0   # 0x4ba128
movdqu %xmm0, (%rsp)
callq 0x101194
movq %rax, 0x28(%r14)
callq 0xe54e0
movq %rax, 0x38(%r14)
movl $0x0, 0xb4(%r14)
xorl %eax, %eax
movq %rax, 0x60(%r14)
movq %rax, 0x48(%r14)
movq 0x40(%r14), %rsi
leaq 0x88(%rsp), %rdi
callq 0x10b18c
testl %eax, %eax
jne 0x13b1a0
movb $0x1, 0xbf(%r14)
movq 0x88(%rsp), %rax
movq %rax, 0x88(%r14)
movq %rax, 0x98(%r14)
movq 0x50(%r14), %rdi
callq 0xd6a50
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x13c0d5
cmpq $0x0, 0x50(%r14)
je 0x13b1d4
xorl %ebp, %ebp
movq 0x18(%r14), %rdi
movq %rbp, %rsi
callq 0xd6abc
incq %rbp
cmpq 0x50(%r14), %rbp
jb 0x13b1bf
incq %r12
incq 0x60(%rsp)
movq %r12, %rdi
movq 0x48(%rsp), %r14
movq 0x50(%rsp), %rax
jmp 0x13b1ee
incq %r12
cmpq %rax, %r12
jbe 0x13b010
movq 0x60(%rsp), %rax
cmpq %rax, 0x40(%r14)
jne 0x13c111
leaq 0x240b1b(%rip), %rsi    # 0x37bd28
movq %rbx, %rdi
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x1045eb
movq 0x58(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2fd3cc
movl $0x1, %r12d
testl %eax, %eax
jne 0x13b70b
leaq 0x38(%rsp), %rsi
movq 0x58(%rsp), %rdi
movq 0x40(%rsp), %rdx
callq 0x2fd420
movl %eax, %r12d
movq $0x0, 0x70(%rsp)
xorl %ebp, %ebp
movq 0x48(%rsp), %r14
cmpl $-0x1, %r12d
je 0x13b70b
testl %r12d, %r12d
je 0x13b72b
cmpq $0x0, 0x38(%rsp)
je 0x13c0e9
movq %rbp, %rdi
leaq 0x240aa1(%rip), %rsi    # 0x37bd28
movl $0x1d6, %edx            # imm = 0x1D6
callq 0x1045eb
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x172f0
movq %rax, 0x50(%rsp)
addq %rax, 0x30(%r14)
movq %rbx, %rdi
callq 0xe4290
movq %rax, %rbp
incq %rax
movq %rax, 0x98(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %rbp, 0x78(%rsp)
cmpq 0x40(%r14), %r15
jae 0x13b5e9
movq 0x18(%r14), %r13
imulq $0xc8, %r15, %rax
movb (%rbp,%r12), %cl
testb %cl, %cl
je 0x13b2fa
cmpb 0xb8(%r13,%rax), %cl
je 0x13b2fa
incq %r12
jmp 0x13b5de
movq %r15, 0x68(%rsp)
addq %rax, %r13
movb $0x0, (%rbp,%r12)
movq %r12, %r15
subq %rbx, %r15
cmpq 0x68(%r13), %r15
jbe 0x13b389
leaq 0x68(%r13), %r14
xorl %eax, %eax
movb %al, 0xbb(%r13)
movb %al, 0xb9(%r13)
movq 0x30(%r13), %rdi
leaq (,%r15,8), %rsi
leaq 0x2409ed(%rip), %rdx    # 0x37bd28
movl $0x1ee, %ecx            # imm = 0x1EE
callq 0x104461
movq %rax, 0x30(%r13)
movq 0x68(%r13), %rbp
cmpq %r15, %rbp
jae 0x13b3a3
movups 0x37edef(%rip), %xmm0   # 0x4ba148
movups %xmm0, 0x20(%rsp)
movups 0x37edd3(%rip), %xmm0   # 0x4ba138
movups %xmm0, 0x10(%rsp)
movdqu 0x37edb6(%rip), %xmm0   # 0x4ba128
movdqu %xmm0, (%rsp)
callq 0x101194
movq 0x30(%r13), %rcx
movq %rax, (%rcx,%rbp,8)
incq %rbp
jmp 0x13b34d
cmpq 0x58(%r13), %r15
jae 0x13b3a6
leaq 0x58(%r13), %r14
xorl %eax, %eax
movb %al, 0xbb(%r13)
movb %al, 0xb9(%r13)
movq %r15, (%r14)
cmpq %rbx, %r12
je 0x13b3d0
movq 0x78(%rsp), %rax
leaq (%rax,%rbx), %r14
xorl %ebp, %ebp
movq 0x30(%r13), %rax
movq (%rax,%rbp,8), %rdi
movsbq (%r14,%rbp), %rsi
callq 0x13d173
incq %rbp
cmpq %rbp, %r15
jne 0x13b3b6
cmpb $0x1, 0xbb(%r13)
movq 0x78(%rsp), %rbp
jne 0x13b3f8
movq 0x40(%r13), %rdi
leaq (%rbx,%rbp), %rsi
callq 0x17a40
testl %eax, %eax
je 0x13b3f8
movb $0x0, 0xbb(%r13)
cmpb $0x1, 0xbf(%r13)
jne 0x13b587
leaq (%rbx,%rbp), %r14
leaq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x10b18c
testl %eax, %eax
je 0x13b42b
movb $0x0, 0xbf(%r13)
jmp 0x13b587
movb (%r14), %cl
cmpb $0x30, %cl
jne 0x13b44e
movq 0x98(%rsp), %rax
leaq (%rax,%rbx), %rdx
xorl %eax, %eax
movb (%rdx,%rax), %cl
incq %rax
cmpb $0x30, %cl
je 0x13b441
jmp 0x13b450
xorl %eax, %eax
movq 0x88(%rsp), %r14
testb %al, %al
setne %dl
testb %cl, %cl
sete %cl
andb %dl, %cl
subb %cl, %al
je 0x13b470
movb $0x1, 0xba(%r13)
movzbl %al, %eax
cmpl %eax, 0xb4(%r13)
jae 0x13b483
movl %eax, 0xb4(%r13)
movq 0x38(%r13), %rdi
movl %eax, %esi
callq 0xe54fb
cmpq $0x0, 0x70(%rsp)
je 0x13b505
movq %r14, %rsi
subq 0xa0(%r13), %rsi
je 0x13b4ca
movb $0x0, 0xc0(%r13)
cmpq 0x98(%r13), %r14
jge 0x13b4ba
movq %r14, 0x98(%r13)
cmpq 0x88(%r13), %r14
jle 0x13b4ca
movq %r14, 0x88(%r13)
testq %rsi, %rsi
jg 0x13b4d9
movb $0x0, 0xbd(%r13)
js 0x13b4e1
movb $0x0, 0xbe(%r13)
cmpq $0x1, 0x70(%rsp)
jne 0x13b52b
movq %rsi, 0x70(%r13)
movq %rsi, 0x90(%r13)
movq %rsi, 0x80(%r13)
movb $0x1, 0xbc(%r13)
jmp 0x13b55b
movq %r14, 0x88(%r13)
movq %r14, 0x98(%r13)
movq %r14, 0x78(%r13)
movw $0x101, 0xbd(%r13)      # imm = 0x101
movb $0x1, 0xc0(%r13)
jmp 0x13b56c
cmpq 0x80(%r13), %rsi
jle 0x13b543
movb $0x0, 0xbc(%r13)
movq %rsi, 0x80(%r13)
cmpq 0x90(%r13), %rsi
jge 0x13b55b
movb $0x0, 0xbc(%r13)
movq %rsi, 0x90(%r13)
movq 0x28(%r13), %rdi
callq 0x13d173
testl %eax, %eax
je 0x13b56c
incq 0x48(%r13)
movq 0x20(%r13), %rdi
movq %r14, %rsi
callq 0x13d173
testl %eax, %eax
je 0x13b580
incq 0x60(%r13)
movq %r14, 0xa0(%r13)
cmpb $0x0, 0xbb(%r13)
jne 0x13b5cb
movq 0x50(%r13), %rax
testq %rax, %rax
je 0x13b5cb
addq %rbp, %rbx
xorl %r14d, %r14d
cmpq %r15, %r14
jae 0x13b5b3
movq 0x40(%r13), %rcx
movb (%rcx,%r14), %cl
cmpb (%rbx,%r14), %cl
je 0x13b5c3
movq 0x18(%r13), %rdi
movq %r14, %rsi
callq 0xd6ae3
movq 0x50(%r13), %rax
incq %r14
cmpq %rax, %r14
jb 0x13b5a0
incq %r12
movq 0x68(%rsp), %r15
incq %r15
movq %r12, %rbx
movq 0x48(%rsp), %r14
cmpq 0x50(%rsp), %r12
jbe 0x13b2ca
movq 0x50(%rsp), %rax
incq %rax
cmpq %rax, %r12
jne 0x13c0e4
cmpq 0x60(%rsp), %r15
movl $0x0, %ebx
ja 0x13c0df
je 0x13b63d
movq 0x38(%rsp), %r8
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
leaq 0x240c0b(%rip), %rdi    # 0x37c22c
movq %r15, %rsi
movq 0x60(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x103d72
movb $0x0, 0x6c(%r14)
movq 0x8(%r14), %rax
cmpq %rax, 0x10(%r14)
jae 0x13b64c
movq (%r14), %rax
jmp 0x13b676
leaq 0x80(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%r14), %rdi
leaq 0x400(,%rax,8), %rsi
leaq 0x2406bf(%rip), %rdx    # 0x37bd28
movl $0x261, %ecx            # imm = 0x261
callq 0x104461
movq %rax, (%r14)
movq 0x40(%rsp), %rdx
movq 0x58(%rsp), %rdi
testq %rax, %rax
je 0x13c0da
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x10(%r14)
movq %r15, (%rax,%rcx,8)
movq 0x40(%r14), %rax
subq %r15, %rax
jbe 0x13b6cb
movq 0x18(%r14), %rcx
imulq $0xc8, %r15, %rsi
addq %rsi, %rcx
addq $0xbf, %rcx
movb %bl, -0x4(%rcx)
movb %bl, -0x6(%rcx)
movb %bl, (%rcx)
addq $0xc8, %rcx
decq %rax
jne 0x13b6b7
incq 0x70(%rsp)
leaq 0x38(%rsp), %rsi
callq 0x2fd420
movl %eax, %r12d
jmp 0x13b25e
movq 0x48(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x13c10c
leaq 0x240a24(%rip), %rsi    # 0x37c11d
movq 0x40(%rsp), %rdi
xorl %eax, %eax
callq 0xfcb67
movl $0x1, %r12d
xorl %r15d, %r15d
movq %r15, %rdi
callq 0xfd09a
movl %r12d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2405f6(%rip), %rsi    # 0x37bd28
movq %rbp, %rdi
movl $0x272, %edx            # imm = 0x272
callq 0x1045eb
movq 0x70(%rsp), %rax
movq %rax, 0x38(%r14)
cmpb $0x1, 0x6c(%r14)
jne 0x13b779
movq (%r14), %rdi
testq %rdi, %rdi
je 0x13b779
leaq 0x2405ca(%rip), %rsi    # 0x37bd28
movl $0x277, %edx            # imm = 0x277
callq 0x1045eb
pxor %xmm0, %xmm0
movdqu %xmm0, (%r14)
movq $0x0, 0x10(%r14)
cmpq $0x0, 0x40(%r14)
je 0x13b9a4
leaq 0x28e9e5(%rip), %r13    # 0x3ca170
leaq 0x21b57f(%rip), %r15    # 0x356d11
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x18(%r14), %rbx
cmpq $0x0, 0x18(%rbx,%r12)
je 0x13c0fd
cmpb $0x0, 0xbb(%rbx,%r12)
movq %r15, %rdx
cmovneq %r13, %rdx
leaq 0x240ad2(%rip), %rdi    # 0x37c290
movq %rbp, %rsi
xorl %eax, %eax
callq 0x103d72
cmpb $0x0, 0xbf(%rbx,%r12)
je 0x13b87c
movq 0x80(%rbx,%r12), %rax
movq 0x88(%rbx,%r12), %rcx
subq 0x98(%rbx,%r12), %rcx
movq %rcx, %r14
negq %r14
cmovsq %rcx, %r14
subq 0x90(%rbx,%r12), %rax
movq %rax, %r15
negq %r15
cmovsq %rax, %r15
xorl %r13d, %r13d
leaq 0x240a91(%rip), %rdi    # 0x37c2a6
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x103d72
movq 0x48(%rbx,%r12), %rdx
movq 0x60(%rbx,%r12), %rsi
leaq 0x240a95(%rip), %rdi    # 0x37c2c8
xorl %eax, %eax
callq 0x103d72
movq %r14, %rdi
cmpq %r15, %r14
jb 0x13b853
cmpq $0x0, 0x48(%rbx,%r12)
setne %r13b
cmoveq %r14, %r15
movq %r15, %rdi
movb %r13b, 0xc1(%rbx,%r12)
movl $0x2, %esi
callq 0x13d1dc
movl %eax, 0xac(%rbx,%r12)
movl $0xb0, %r15d
leaq 0x28e8f6(%rip), %r13    # 0x3ca170
jmp 0x13b897
cmpb $0x0, 0xbb(%rbx,%r12)
jne 0x13b8b7
movq 0x68(%rbx,%r12), %r14
subq 0x58(%rbx,%r12), %r14
movl $0xa8, %r15d
movl $0x2, %esi
movq %r14, %rdi
callq 0x13d1dc
addq %rbx, %r15
movl %eax, (%r12,%r15)
movq 0x48(%rsp), %r14
leaq 0x21b45a(%rip), %r15    # 0x356d11
cmpb $0x0, 0xc2(%rbx,%r12)
leaq 0x283a94(%rip), %rsi    # 0x3bf35b
leaq 0x24b73f(%rip), %rax    # 0x38700d
cmovneq %rax, %rsi
leaq 0x240a0f(%rip), %rdi    # 0x37c2e8
xorl %eax, %eax
callq 0x103d72
cmpb $0x0, 0xbb(%rbx,%r12)
jne 0x13b98b
cmpb $0x0, 0xbf(%rbx,%r12)
movq %r15, %rsi
cmovneq %r13, %rsi
leaq 0x2409f3(%rip), %rdi    # 0x37c2f9
xorl %eax, %eax
callq 0x103d72
cmpb $0x1, 0xbf(%rbx,%r12)
jne 0x13b98b
cmpb $0x0, 0xbc(%rbx,%r12)
movq %r15, %rsi
cmovneq %r13, %rsi
cmpb $0x0, 0xc1(%rbx,%r12)
leaq 0x2409f5(%rip), %rdx    # 0x37c32d
cmovneq %r13, %rdx
leaq 0x2409c3(%rip), %rdi    # 0x37c306
xorl %eax, %eax
callq 0x103d72
cmpb $0x0, 0xbd(%rbx,%r12)
movq %r13, %rsi
leaq 0x2409f3(%rip), %rdx    # 0x37c350
jne 0x13b97d
cmpb $0x0, 0xbe(%rbx,%r12)
movq %r15, %rsi
cmovneq %r13, %rsi
movq %r13, %rdx
leaq 0x2409e1(%rip), %rax    # 0x37c35a
cmovneq %rax, %rdx
leaq 0x2409ad(%rip), %rdi    # 0x37c331
xorl %eax, %eax
callq 0x103d72
incq %rbp
movq 0x40(%r14), %rdi
addq $0xc8, %r12
cmpq %rdi, %rbp
jb 0x13b797
jmp 0x13b9a6
xorl %edi, %edi
movl $0x2, %esi
callq 0x13d1dc
movl %eax, 0x68(%r14)
movq 0x80(%rsp), %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x13b9da
movq 0x37d50d(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x2404c3(%rip), %rsi    # 0x37be98
callq 0x11cc90
leaq 0x2404cd(%rip), %rsi    # 0x37beae
leaq 0x21a0f9(%rip), %rdx    # 0x355ae1
leaq 0x240339(%rip), %rcx    # 0x37bd28
movq 0x90(%rsp), %r13
movq %r13, %rdi
movl $0x3f9, %r8d            # imm = 0x3F9
movq 0x40(%rsp), %r14
movq %r14, %r9
callq 0xfcf97
testq %rax, %rax
je 0x13ba30
movq %rax, %r15
movq 0x8(%rbx), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x13d9c0
testl %eax, %eax
je 0x13ba3b
movl %eax, %r12d
jmp 0x13b70e
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x13b70b
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x13ba59
movq 0x37d48e(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x24045f(%rip), %rsi    # 0x37beb3
callq 0x11cc90
movq 0x8(%rbx), %rdi
callq 0x13c11b
movq (%rbx), %rdi
testq %rdi, %rdi
movq 0x40(%rsp), %r12
je 0x13ba85
movq 0x37d462(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x240446(%rip), %rsi    # 0x37bec6
callq 0x11cc90
testq %r12, %r12
je 0x13ba9a
movq %r12, %rdi
callq 0xfcc32
testb %al, %al
jne 0x13c116
movq %r15, %rdi
callq 0x17030
movq %rax, 0x60(%rsp)
leaq 0xa0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x11f89c
movq 0x8(%rbx), %rax
movq 0x50(%rax), %r14
movq %r15, %rdi
callq 0x17030
xorl %edx, %edx
divq %r14
movq %rdx, %rbx
movq %r15, %rdi
callq 0x17030
testq %rbx, %rbx
je 0x13baf2
xorl %edx, %edx
divq %r14
incq %rax
imulq %r14, %rax
movq 0x80(%rsp), %rbx
movq 0x8(%rbx), %rdi
movq %rax, 0x60(%rdi)
addq $0x60, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x11f89c
movq 0x8(%rbx), %rax
movq 0x60(%rax), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x11f87a
cmpb $0x1, 0x19(%rbx)
jne 0x13bb43
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
movq 0x60(%rax), %rsi
callq 0x170ca4
jmp 0x13bb5a
movq 0x8(%rbx), %r14
cmpb $0x1, 0x18(%rbx)
jne 0x13bb62
movq 0x10(%rbx), %rdi
movq 0x60(%r14), %rsi
callq 0x170bfc
movq 0x8(%rbx), %r14
movq %rax, 0x28(%r14)
leaq 0x2401bf(%rip), %rbx    # 0x37bd28
movl $0x1, %edi
movl $0x40, %esi
movq %rbx, %rdx
movl $0x2c3, %ecx            # imm = 0x2C3
callq 0x10436a
movq %rax, %rbp
movq %r14, 0x50(%rsp)
movq 0x50(%r14), %r14
movl $0x18, %edi
movq %rbx, %rsi
movl $0x2c8, %edx            # imm = 0x2C8
callq 0x104226
movq %rax, (%rbp)
xorl %ecx, %ecx
movq %rcx, 0x30(%rbp)
pxor %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq %rcx, 0x10(%rax)
movq %r15, 0x78(%rsp)
movq %r15, %rdi
callq 0x2faef8
movq %rax, %r15
movq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2fd3cc
movq %r12, %rdx
movl %eax, %r12d
testl %eax, %eax
jne 0x13beb1
movq %rbp, 0x68(%rsp)
movq 0x50(%rsp), %r8
movq 0x40(%r8), %rcx
testq %rcx, %rcx
je 0x13bc9b
leaq 0x1(%rcx), %rax
andq $-0x2, %rax
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movl $0x168, %ecx            # imm = 0x168
addq 0x18(%r8), %rcx
movdqa 0x21ce01(%rip), %xmm1   # 0x358a20
movdqa 0x21ce09(%rip), %xmm2   # 0x358a30
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x21ce09(%rip), %xmm4   # 0x358a40
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x13bc74
movq $0x0, -0xc8(%rcx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x13bc8a
movq $0x0, (%rcx)
paddq %xmm4, %xmm1
addq $0x190, %rcx            # imm = 0x190
addq $-0x2, %rax
jne 0x13bc37
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x2fd420
testl %eax, %eax
jle 0x13be5b
shlq $0x3, %r14
xorl %ebx, %ebx
movq $0x0, 0x48(%rsp)
movq 0x68(%rsp), %rbp
movq 0x8(%rbp), %rdi
leaq 0x240059(%rip), %rsi    # 0x37bd28
movl $0x2d9, %edx            # imm = 0x2D9
callq 0x1045eb
movq 0x38(%rsp), %rdi
callq 0xe4290
movq %rax, 0x8(%rbp)
movb $0x0, 0x38(%rbp)
movq 0x50(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x13d2a8
movq 0x28(%r12), %rdi
testq %rdi, %rdi
movq %rbp, %r13
je 0x13bdb0
movq 0x10(%r13), %rcx
movq %rbx, %rsi
movq 0x48(%rsp), %rdx
movq %r14, %r8
callq 0x17130e
movb %al, 0x38(%r13)
testb %al, %al
je 0x13bdb0
movq 0x30(%r13), %rsi
leaq 0x240707(%rip), %rdi    # 0x37c43e
xorl %eax, %eax
callq 0x103d72
movq 0x8(%r13), %rdi
leaq 0x23ffdf(%rip), %rsi    # 0x37bd28
movl $0x2ee, %edx            # imm = 0x2EE
callq 0x1045eb
movq 0x38(%rsp), %rdi
callq 0xe4290
movq %rax, 0x8(%r13)
movq (%r13), %rax
movq $0x0, 0x10(%rax)
movq %r12, %rdi
movq %r13, %rsi
callq 0x13d2a8
movq %r15, %rdi
callq 0x2fb083
movq 0x28(%r12), %rbx
movq %r15, %rdi
callq 0x2fb10a
movq 0x30(%r13), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x171222
movq 0x50(%r12), %r14
shlq $0x3, %r14
movq $0x0, 0x48(%rsp)
xorl %ebx, %ebx
movq 0x10(%r13), %r12
cmpq %r12, %r14
jae 0x13bdda
movq 0x50(%rsp), %rax
movq 0x50(%rax), %rbp
shlq $0x3, %rbp
subq %r14, %r12
incq %rbx
movq %rbp, %r14
cmpq %r12, %rbp
jb 0x13bdc6
movq %r12, 0x10(%r13)
jmp 0x13bddd
movq %r14, %rbp
cmpq $0x1, %rbx
adcq $0x0, %rbx
incq 0x30(%r13)
movq (%r13), %rax
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x13be1f
movq (%rax), %r13
addq $0x8, %r13
movq -0x8(%r13), %rsi
movl (%r13), %edx
movq %r15, %rdi
callq 0x2faf4f
addq $0x10, %r13
decq %r14
jne 0x13bdfd
movq 0x68(%rsp), %r13
movq (%r13), %rax
subq %r12, %rbp
incq 0x48(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movq %rcx, 0x10(%r13)
movq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x2fd420
movq %rbp, %r14
testl %eax, %eax
movq %r13, %rbp
movq 0x90(%rsp), %r13
jg 0x13bcc4
movl %eax, %r12d
testl %eax, %eax
je 0x13be7a
movq 0x40(%rsp), %rdi
callq 0xfcc32
testb %al, %al
movq 0x68(%rsp), %rbp
jne 0x13beb1
callq 0x40561
movq %r15, %rdi
callq 0x2fb03b
movq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x17030
movq 0x50(%rsp), %rcx
movq %rax, 0x58(%rcx)
movq 0x28(%rcx), %rdi
xorl %r12d, %r12d
testq %rdi, %rdi
je 0x13beac
movq %rbx, %rsi
callq 0x170cf3
movq 0x68(%rsp), %rbp
movq %r15, %rdi
callq 0x2fb112
movq (%rbp), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x13beed
leaq 0x23fe5c(%rip), %rsi    # 0x37bd28
movq %rax, %rdi
movl $0x31c, %edx            # imm = 0x31C
callq 0x1045eb
movq (%rbp), %rdi
pxor %xmm0, %xmm0
movdqu %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x23fe34(%rip), %rbx    # 0x37bd28
movq %rbx, %rsi
movl $0x31d, %edx            # imm = 0x31D
callq 0x1045eb
movq 0x8(%rbp), %rdi
movq %rbx, %rsi
movl $0x31e, %edx            # imm = 0x31E
callq 0x1045eb
movq %rbp, %rdi
movq %rbx, %rsi
movl $0x31f, %edx            # imm = 0x31F
callq 0x1045eb
testl %r12d, %r12d
movq 0x78(%rsp), %r15
jne 0x13b70e
movq 0x80(%rsp), %rbx
movq 0x8(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x13bf6c
movq %r15, %rdi
movq 0x60(%rsp), %rsi
xorl %edx, %edx
callq 0x11f87a
movq 0x8(%rbx), %rdi
addq $0x58, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x11f89c
movq %r15, %rdi
callq 0xfd09a
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x13bf92
movq 0x37cf55(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x23ff48(%rip), %rsi    # 0x37bed5
callq 0x11cc90
xorl %r12d, %r12d
callq 0x103d66
testb %al, %al
je 0x13b716
movq %r13, %rdi
callq 0x11acc9
movq %rbx, %r15
movq %rax, %rbx
leaq 0x23fef7(%rip), %rsi    # 0x37beae
movq %rax, %rdi
callq 0x11acf3
leaq 0x23ff2d(%rip), %rdi    # 0x37bef3
xorl %eax, %eax
callq 0x103d72
leaq 0x23ff3e(%rip), %rdi    # 0x37bf12
xorl %eax, %eax
callq 0x103d72
movq 0x8(%r15), %rax
movq 0x28(%rax), %rdi
testq %rdi, %rdi
je 0x13c00a
callq 0x171212
movq %rax, %r14
movq 0x8(%r15), %rax
movq 0x28(%rax), %rdi
callq 0x1711ff
testb %al, %al
je 0x13c01a
leaq 0x23ff0e(%rip), %rdi    # 0x37bf16
jmp 0x13c021
leaq 0x23ff78(%rip), %rdi    # 0x37bf89
xorl %eax, %eax
callq 0x103d72
jmp 0x13c02b
leaq 0x23ff32(%rip), %rdi    # 0x37bf53
movq %r14, %rsi
xorl %eax, %eax
callq 0x103d72
movq 0x80(%rsp), %r14
movq 0x8(%r14), %rax
movq 0x38(%rax), %rsi
leaq 0x23ff68(%rip), %rdi    # 0x37bfaa
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x103d72
movq 0x8(%r14), %rax
movq 0x30(%rax), %rsi
leaq 0x23ff79(%rip), %rdi    # 0x37bfd4
xorl %eax, %eax
callq 0x103d72
movq %rbx, %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0xff6cf
cvtsi2sd %rax, %xmm0
mulsd 0x23fca1(%rip), %xmm0   # 0x37bd20
movq 0x8(%r14), %rax
movsd 0x30(%rax), %xmm1
unpcklps 0x20b851(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x20b859(%rip), %xmm1   # 0x3478f0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x23ff4f(%rip), %rdi    # 0x37bffd
movb $0x1, %al
callq 0x103d72
leaq 0x23ff61(%rip), %rdi    # 0x37c01d
xorl %eax, %eax
callq 0x103d72
movq %rbx, %rdi
callq 0x11bdbf
jmp 0x13b716
callq 0x406b7
callq 0x4067e
callq 0x405d3
callq 0x4060c
callq 0x4059a
callq 0x40645
callq 0x4079b
callq 0x40762
callq 0x40729
callq 0x404ef
callq 0x40444
callq 0x4047d
callq 0x406f0
callq 0x404b6
callq 0x40528