// File: /workspace/github_c_makefile_star2_O1/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 0x142b45
testq %rsi, %rsi
je 0x142b4a
movq %rdx, %r14
testq %rdx, %rdx
je 0x142b4f
movq %rdi, %rbx
movq %rsi, 0x48(%rsp)
testq %rcx, %rcx
movq %rcx, 0x30(%rsp)
je 0x1418bc
movq %rcx, %rdi
callq 0x101a9a
movq 0x30(%rsp), %rcx
testb %al, %al
jne 0x142b54
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1418df
movq 0x38261d(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x24391e(%rip), %rsi    # 0x3851f3
callq 0x1229c8
movq 0x30(%rsp), %rcx
xorl %eax, %eax
movq 0x8(%rbx), %r15
movq %rax, 0x38(%rsp)
movq %rax, 0x40(%r15)
movb $0x1, 0x6c(%r15)
pxor %xmm0, %xmm0
movdqu %xmm0, (%r15)
movq %rax, 0x10(%r15)
testq %rcx, %rcx
je 0x14191a
movq %rcx, %rdi
callq 0x101a9a
movq 0x30(%rsp), %rcx
testb %al, %al
jne 0x142b59
movq %r15, 0x50(%rsp)
movq %r14, 0x90(%rsp)
leaq 0x38(%rsp), %rsi
movq 0x48(%rsp), %rdi
movq %rcx, %rdx
callq 0x307124
testl %eax, %eax
movq %rbx, 0x80(%rsp)
je 0x141a05
movl %eax, %ecx
xorl %ebx, %ebx
leaq 0x243b06(%rip), %r13    # 0x38545a
leaq 0x24373d(%rip), %r14    # 0x385098
leaq 0x38(%rsp), %r15
xorl %ebp, %ebp
testl %ecx, %ecx
js 0x1423ff
movq 0x38(%rsp), %r12
testq %r12, %r12
je 0x142b22
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 0x1419a7
incq %rdi
cmpq $0xa, %rdi
jne 0x141996
jmp 0x1419b3
cmpq %rbp, %rdx
je 0x1419b3
incq %rcx
leaq 0x1(%rdx), %rbp
incq %rdx
cmpq %rax, %rdx
jne 0x141990
movq 0x50(%rsp), %rax
cmpq 0x40(%rax), %rcx
jbe 0x1419e7
movq %rcx, 0x40(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x17b, %edx            # imm = 0x17B
callq 0x109670
movq 0x38(%rsp), %rdi
callq 0xe8760
movq %rax, %rbx
movq 0x48(%rsp), %rdi
movq %r15, %rsi
movq 0x30(%rsp), %rdx
callq 0x307124
movl %eax, %ecx
testl %eax, %eax
jne 0x141962
jmp 0x141a07
xorl %ebx, %ebx
movq 0x50(%rsp), %r13
movq 0x40(%r13), %r14
testq %r14, %r14
je 0x141c88
movq %r14, 0x60(%rsp)
testq %rbx, %rbx
je 0x142b5e
leaq 0x243aca(%rip), %rdi    # 0x3854f8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x108e02
movq 0x40(%r13), %rdi
leaq 0x243655(%rip), %rdx    # 0x385098
movl $0xc8, %esi
movl $0x18b, %ecx            # imm = 0x18B
callq 0x1093ef
movq %rax, 0x18(%r13)
movq %rbx, %rdi
callq 0x172f0
leaq 0x2439f5(%rip), %r14    # 0x38545a
xorl %edi, %edi
movq $0x0, 0x58(%rsp)
xorl %r12d, %r12d
movq %rax, 0x40(%rsp)
movb (%rbx,%r12), %r9b
xorl %edx, %edx
xorl %esi, %esi
movq %r12, %rcx
subq %rdi, %rcx
movzbl %dl, %r8d
movl $0x1, %edx
cmovel %r8d, %edx
cmpb (%rsi,%r14), %r9b
cmovnel %r8d, %edx
incq %rsi
cmpq $0xa, %rsi
jne 0x141a80
testb $0x1, %dl
je 0x141c52
movq 0x18(%r13), %r13
imulq $0xc8, 0x58(%rsp), %r15
leaq (%r15,%r13), %rbp
movb %r9b, 0xb8(%r13,%r15)
movb $0x0, (%rbx,%r12)
movq %rcx, 0x50(%r13,%r15)
addq %rbx, %rdi
callq 0xe8760
movq %rax, 0x40(%r13,%r15)
movq 0x50(%r13,%r15), %rdi
movq %rdi, 0x68(%r13,%r15)
movq %rdi, 0x58(%r13,%r15)
movb $0x1, 0xbb(%r13,%r15)
movw $0x1, 0xb9(%r13,%r15)
movl $0x8, %esi
leaq 0x24358c(%rip), %rdx    # 0x385098
movl $0x1a7, %ecx            # imm = 0x1A7
callq 0x1093ef
movq %rax, 0x30(%r13,%r15)
cmpq $0x0, 0x68(%r13,%r15)
je 0x141b61
xorl %r13d, %r13d
movups 0x38361b(%rip), %xmm0   # 0x4c5148
movups %xmm0, 0x20(%rsp)
movups 0x3835ff(%rip), %xmm0   # 0x4c5138
movups %xmm0, 0x10(%rsp)
movdqu 0x3835e2(%rip), %xmm0   # 0x4c5128
movdqu %xmm0, (%rsp)
callq 0x1060b4
movq 0x30(%rbp), %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
cmpq 0x68(%rbp), %r13
jb 0x141b26
movups 0x3835e0(%rip), %xmm0   # 0x4c5148
movups %xmm0, 0x20(%rsp)
movups 0x3835c4(%rip), %xmm0   # 0x4c5138
movups %xmm0, 0x10(%rsp)
movups 0x3835a8(%rip), %xmm0   # 0x4c5128
movups %xmm0, (%rsp)
callq 0x1060b4
movq %rax, 0x20(%rbp)
movups 0x3835b4(%rip), %xmm0   # 0x4c5148
movups %xmm0, 0x20(%rsp)
movups 0x383598(%rip), %xmm0   # 0x4c5138
movups %xmm0, 0x10(%rsp)
movdqu 0x38357b(%rip), %xmm0   # 0x4c5128
movdqu %xmm0, (%rsp)
callq 0x1060b4
movq %rax, 0x28(%rbp)
callq 0xe99dc
movq %rax, 0x38(%rbp)
movl $0x0, 0xb4(%rbp)
xorl %eax, %eax
movq %rax, 0x60(%rbp)
movq %rax, 0x48(%rbp)
movq 0x40(%rbp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x1103b4
testl %eax, %eax
jne 0x141c09
movb $0x1, 0xbf(%rbp)
movq 0x78(%rsp), %rax
movq %rax, 0x88(%rbp)
movq 0x78(%rsp), %rax
movq %rax, 0x98(%rbp)
movq 0x50(%rbp), %rdi
callq 0xd90d0
movq %rax, 0x18(%rbp)
testq %rax, %rax
je 0x142b27
cmpq $0x0, 0x50(%rbp)
je 0x141c3e
xorl %r13d, %r13d
movq 0x18(%rbp), %rdi
movq %r13, %rsi
callq 0xd913c
incq %r13
cmpq 0x50(%rbp), %r13
jb 0x141c29
leaq 0x1(%r12), %rdi
incq 0x58(%rsp)
movq 0x50(%rsp), %r13
movq 0x40(%rsp), %rax
incq %r12
cmpq %rax, %r12
jbe 0x141a78
movq 0x58(%rsp), %rax
cmpq %rax, 0x40(%r13)
movq 0x60(%rsp), %r14
jne 0x142b63
leaq 0x24341f(%rip), %rsi    # 0x385098
movq %rbx, %rdi
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x109670
jmp 0x141ca4
leaq 0x2437fe(%rip), %rsi    # 0x38548d
movq $0x0, 0x58(%rsp)
movq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0x1019cf
testq %r14, %r14
movq 0x48(%rsp), %rdi
je 0x141cc4
movq 0x30(%rsp), %rsi
callq 0x3070d0
xorl %ecx, %ecx
testl %eax, %eax
sete %al
setne %cl
jmp 0x141ccb
movl $0x1, %ecx
xorl %eax, %eax
testb %al, %al
je 0x1423ff
movl %ecx, 0x8c(%rsp)
leaq 0x38(%rsp), %rsi
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rdx
callq 0x307124
movq $0x0, 0x68(%rsp)
xorl %r12d, %r12d
cmpl $-0x1, %eax
je 0x1423fd
testl %eax, %eax
je 0x142159
cmpq $0x0, 0x38(%rsp)
je 0x142b3b
movq %r12, %rdi
leaq 0x243377(%rip), %rsi    # 0x385098
movl $0x1d6, %edx            # imm = 0x1D6
callq 0x109670
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x172f0
movq %rax, 0x40(%rsp)
addq %rax, 0x30(%r13)
movq %rbx, %rdi
callq 0xe8760
movq %rax, %r12
incq %rax
movq %rax, 0x98(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %r12, 0x70(%rsp)
cmpq 0x40(%r13), %rbx
jae 0x14205f
movq 0x18(%r13), %rbp
imulq $0xc8, %rbx, %rax
movb (%r12,%r15), %cl
testb %cl, %cl
je 0x141d8e
cmpb 0xb8(%rbp,%rax), %cl
jne 0x142051
movq %rbx, 0x60(%rsp)
addq %rax, %rbp
movb $0x0, (%r12,%r15)
movq %r15, %r13
subq %r14, %r13
cmpq 0x68(%rbp), %r13
jbe 0x141e1a
leaq 0x68(%rbp), %rbx
xorl %eax, %eax
movb %al, 0xbb(%rbp)
movb %al, 0xb9(%rbp)
movq 0x30(%rbp), %rdi
leaq (,%r13,8), %rsi
leaq 0x2432cc(%rip), %rdx    # 0x385098
movl $0x1ee, %ecx            # imm = 0x1EE
callq 0x1094e6
movq %rax, 0x30(%rbp)
movq 0x68(%rbp), %r12
cmpq %r13, %r12
jae 0x141e32
movups 0x38335e(%rip), %xmm0   # 0x4c5148
movups %xmm0, 0x20(%rsp)
movups 0x383342(%rip), %xmm0   # 0x4c5138
movups %xmm0, 0x10(%rsp)
movdqu 0x383325(%rip), %xmm0   # 0x4c5128
movdqu %xmm0, (%rsp)
callq 0x1060b4
movq 0x30(%rbp), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x141dde
cmpq 0x58(%rbp), %r13
jae 0x141e35
leaq 0x58(%rbp), %rbx
xorl %eax, %eax
movb %al, 0xbb(%rbp)
movb %al, 0xb9(%rbp)
movq %r13, (%rbx)
cmpq %r14, %r15
je 0x141e60
movq 0x70(%rsp), %rax
leaq (%rax,%r14), %rbx
xorl %r12d, %r12d
movq 0x30(%rbp), %rax
movq (%rax,%r12,8), %rdi
movsbq (%rbx,%r12), %rsi
callq 0x143c92
incq %r12
cmpq %r13, %r12
jb 0x141e46
cmpb $0x1, 0xbb(%rbp)
movq 0x70(%rsp), %r12
jne 0x141e86
movq 0x40(%rbp), %rdi
leaq (%r12,%r14), %rsi
callq 0x17a40
testl %eax, %eax
je 0x141e86
movb $0x0, 0xbb(%rbp)
cmpb $0x1, 0xbf(%rbp)
jne 0x142004
leaq (%r12,%r14), %rbx
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x1103b4
testl %eax, %eax
je 0x141eb4
movb $0x0, 0xbf(%rbp)
jmp 0x142004
movb (%rbx), %cl
cmpb $0x30, %cl
jne 0x141ed6
movq 0x98(%rsp), %rax
leaq (%rax,%r14), %rdx
xorl %eax, %eax
movb (%rdx,%rax), %cl
incq %rax
cmpb $0x30, %cl
je 0x141ec9
jmp 0x141ed8
xorl %eax, %eax
movq 0x78(%rsp), %rbx
testb %al, %al
setne %dl
testb %cl, %cl
sete %cl
andb %dl, %cl
subb %cl, %al
je 0x141ef4
movb $0x1, 0xba(%rbp)
movzbl %al, %eax
cmpl %eax, 0xb4(%rbp)
jae 0x141f05
movl %eax, 0xb4(%rbp)
movq 0x38(%rbp), %rdi
movl %eax, %esi
callq 0xe99f7
cmpq $0x0, 0x68(%rsp)
je 0x141f86
movq %rbx, %rsi
subq 0xa0(%rbp), %rsi
je 0x141f4b
movb $0x0, 0xc0(%rbp)
cmpq 0x98(%rbp), %rbx
jge 0x141f3b
movq %rbx, 0x98(%rbp)
cmpq 0x88(%rbp), %rbx
jle 0x141f4b
movq %rbx, 0x88(%rbp)
testq %rsi, %rsi
jg 0x141f57
movb $0x0, 0xbd(%rbp)
testq %rsi, %rsi
js 0x141f63
movb $0x0, 0xbe(%rbp)
cmpq $0x1, 0x68(%rsp)
jne 0x141faa
movq %rsi, 0x70(%rbp)
movq %rsi, 0x90(%rbp)
movq %rsi, 0x80(%rbp)
movb $0x1, 0xbc(%rbp)
jmp 0x141fd8
movq %rbx, 0x88(%rbp)
movq %rbx, 0x98(%rbp)
movq %rbx, 0x78(%rbp)
movw $0x101, 0xbd(%rbp)      # imm = 0x101
movb $0x1, 0xc0(%rbp)
jmp 0x141fe9
cmpq 0x80(%rbp), %rsi
jle 0x141fc1
movb $0x0, 0xbc(%rbp)
movq %rsi, 0x80(%rbp)
cmpq 0x90(%rbp), %rsi
jge 0x141fd8
movb $0x0, 0xbc(%rbp)
movq %rsi, 0x90(%rbp)
movq 0x28(%rbp), %rdi
callq 0x143c92
testl %eax, %eax
je 0x141fe9
incq 0x48(%rbp)
movq 0x20(%rbp), %rdi
movq %rbx, %rsi
callq 0x143c92
testl %eax, %eax
je 0x141ffd
incq 0x60(%rbp)
movq %rbx, 0xa0(%rbp)
cmpb $0x0, 0xbb(%rbp)
jne 0x142040
cmpq $0x0, 0x50(%rbp)
je 0x142040
addq %r12, %r14
xorl %ebx, %ebx
cmpq %r13, %rbx
jae 0x14202b
movq 0x40(%rbp), %rax
movb (%rax,%rbx), %al
cmpb (%r14,%rbx), %al
je 0x142037
movq 0x18(%rbp), %rdi
movq %rbx, %rsi
callq 0xd9163
incq %rbx
cmpq 0x50(%rbp), %rbx
jb 0x142019
leaq 0x1(%r15), %r14
movq 0x60(%rsp), %rbx
incq %rbx
movq 0x50(%rsp), %r13
incq %r15
cmpq 0x40(%rsp), %r15
jbe 0x141d64
movq 0x40(%rsp), %rax
incq %rax
cmpq %rax, %r15
jne 0x142b36
cmpq 0x58(%rsp), %rbx
ja 0x142b31
je 0x1420ae
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x24350a(%rip), %rdi    # 0x38559c
movq %rbx, %rsi
movq 0x58(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq %r15, %r9
xorl %eax, %eax
callq 0x108e02
movb $0x0, 0x6c(%r13)
movq 0x8(%r13), %rax
cmpq %rax, 0x10(%r13)
jb 0x1420e4
leaq 0x80(%rax), %rcx
movq %rcx, 0x8(%r13)
movq (%r13), %rdi
leaq 0x400(,%rax,8), %rsi
leaq 0x242fc2(%rip), %rdx    # 0x385098
movl $0x261, %ecx            # imm = 0x261
callq 0x1094e6
movq %rax, (%r13)
movq (%r13), %rax
testq %rax, %rax
movl $0x0, %esi
je 0x142b2c
movq 0x10(%r13), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r13)
movq %rbx, (%rax,%rcx,8)
movq 0x40(%r13), %rax
subq %rbx, %rax
jbe 0x14213b
movq 0x18(%r13), %rcx
imulq $0xc8, %rbx, %rdx
addq %rdx, %rcx
addq $0xbf, %rcx
movb %sil, -0x4(%rcx)
movb %sil, -0x6(%rcx)
movb %sil, (%rcx)
addq $0xc8, %rcx
decq %rax
jne 0x142124
incq 0x68(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x307124
jmp 0x141cfa
leaq 0x242f38(%rip), %rsi    # 0x385098
movq %r12, %rdi
movl $0x272, %edx            # imm = 0x272
callq 0x109670
movq 0x68(%rsp), %rax
movq %rax, 0x38(%r13)
cmpb $0x1, 0x6c(%r13)
jne 0x1421a9
movq (%r13), %rdi
testq %rdi, %rdi
je 0x1421a9
leaq 0x242f0b(%rip), %rsi    # 0x385098
movl $0x277, %edx            # imm = 0x277
callq 0x109670
pxor %xmm0, %xmm0
movdqu %xmm0, (%r13)
movq $0x0, 0x10(%r13)
movq 0x40(%r13), %rdi
testq %rdi, %rdi
je 0x1423e6
leaq 0x2916d3(%rip), %rbp    # 0x3d3890
leaq 0x21dba0(%rip), %r15    # 0x35fd64
xorl %r12d, %r12d
xorl %r14d, %r14d
movq 0x18(%r13), %rbx
cmpq $0x0, 0x18(%rbx,%r12)
je 0x142b40
cmpb $0x0, 0xbb(%rbx,%r12)
movq %r15, %rdx
cmovneq %rbp, %rdx
leaq 0x24340f(%rip), %rdi    # 0x385600
movq %r14, %rsi
xorl %eax, %eax
callq 0x108e02
cmpb $0x0, 0xbf(%rbx,%r12)
je 0x1422ae
movq 0x80(%rbx,%r12), %rax
movq 0x88(%rbx,%r12), %rcx
subq 0x98(%rbx,%r12), %rcx
movq %rcx, %r15
negq %r15
cmovsq %rcx, %r15
subq 0x90(%rbx,%r12), %rax
movq %rax, %r13
negq %r13
cmovsq %rax, %r13
xorl %ebp, %ebp
leaq 0x2433cf(%rip), %rdi    # 0x385616
movq %r15, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x108e02
movq 0x48(%rbx,%r12), %rdx
movq 0x60(%rbx,%r12), %rsi
leaq 0x2433d3(%rip), %rdi    # 0x385638
xorl %eax, %eax
callq 0x108e02
movq %r15, %rdi
cmpq %r13, %r15
jb 0x142285
cmpq $0x0, 0x48(%rbx,%r12)
setne %bpl
cmoveq %r15, %r13
movq %r13, %rdi
movb %bpl, 0xc1(%rbx,%r12)
movl $0x2, %esi
callq 0x143cfb
movl %eax, 0xac(%rbx,%r12)
movl $0xb0, %r13d
leaq 0x2915e4(%rip), %rbp    # 0x3d3890
jmp 0x1422c9
cmpb $0x0, 0xbb(%rbx,%r12)
jne 0x1422e9
movq 0x68(%rbx,%r12), %r15
subq 0x58(%rbx,%r12), %r15
movl $0xa8, %r13d
movl $0x2, %esi
movq %r15, %rdi
callq 0x143cfb
addq %rbx, %r13
movl %eax, (%r12,%r13)
movq 0x50(%rsp), %r13
leaq 0x21da7b(%rip), %r15    # 0x35fd64
cmpb $0x0, 0xc2(%rbx,%r12)
leaq 0x2866e2(%rip), %rsi    # 0x3c89db
leaq 0x24e0ed(%rip), %rax    # 0x3903ed
cmovneq %rax, %rsi
leaq 0x24334d(%rip), %rdi    # 0x385658
xorl %eax, %eax
callq 0x108e02
cmpb $0x0, 0xbb(%rbx,%r12)
jne 0x1423cf
cmpb $0x0, 0xbf(%rbx,%r12)
movq %r15, %rsi
cmovneq %rbp, %rsi
leaq 0x243331(%rip), %rdi    # 0x385669
xorl %eax, %eax
callq 0x108e02
cmpb $0x1, 0xbf(%rbx,%r12)
jne 0x1423cf
cmpb $0x0, 0xbc(%rbx,%r12)
movq %r15, %rsi
cmovneq %rbp, %rsi
cmpb $0x0, 0xc1(%rbx,%r12)
leaq 0x24332f(%rip), %rdx    # 0x38569d
cmovneq %rbp, %rdx
leaq 0x2432fd(%rip), %rdi    # 0x385676
xorl %eax, %eax
callq 0x108e02
movb 0xbd(%rbx,%r12), %al
movq %rbp, %rsi
testb %al, %al
jne 0x14239f
cmpb $0x0, 0xbe(%rbx,%r12)
movq %r15, %rsi
cmovneq %rbp, %rsi
leaq 0x24331a(%rip), %rdx    # 0x3856c0
testb %al, %al
jne 0x1423c1
cmpb $0x0, 0xbe(%rbx,%r12)
movq %rbp, %rdx
leaq 0x24330d(%rip), %rax    # 0x3856ca
cmovneq %rax, %rdx
leaq 0x2432d9(%rip), %rdi    # 0x3856a1
xorl %eax, %eax
callq 0x108e02
incq %r14
movq 0x40(%r13), %rdi
addq $0xc8, %r12
cmpq %rdi, %r14
jb 0x1421ca
movl $0x2, %esi
callq 0x143cfb
movl %eax, 0x68(%r13)
movl 0x8c(%rsp), %ecx
jmp 0x1423ff
movl %eax, %ecx
testl %ecx, %ecx
je 0x142410
xorl %r12d, %r12d
movq 0x80(%rsp), %r15
jmp 0x14246e
movq 0x80(%rsp), %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x142436
movq 0x381ac1(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x242dd7(%rip), %rsi    # 0x385208
callq 0x1229c8
leaq 0x242de1(%rip), %rsi    # 0x38521e
leaq 0x21c6c9(%rip), %rdx    # 0x35eb0d
leaq 0x242c4d(%rip), %rcx    # 0x385098
movq 0x90(%rsp), %rdi
movl $0x3f9, %r8d            # imm = 0x3F9
movq 0x30(%rsp), %r9
callq 0x101dff
movq %rax, %r12
xorl %ecx, %ecx
cmpq $0x1, %rax
sbbl %ecx, %ecx
testl %ecx, %ecx
jne 0x142485
movq 0x8(%r15), %rdi
movq %r12, %rsi
movq 0x30(%rsp), %rdx
callq 0x1444b4
movl %eax, %ecx
testl %ecx, %ecx
je 0x142490
xorl %esi, %esi
jmp 0x142979
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1424ae
movq 0x381a49(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x242d7a(%rip), %rsi    # 0x385223
callq 0x1229c8
movq 0x8(%r15), %rdi
callq 0x142b6d
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1424d5
movq 0x381a22(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x242d66(%rip), %rsi    # 0x385236
callq 0x1229c8
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1424ec
callq 0x101a9a
testb %al, %al
jne 0x142b68
movq %r12, %rdi
callq 0x17030
movq %rax, 0x58(%rsp)
leaq 0xa0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
movq 0x8(%r15), %rax
movq 0x50(%rax), %r14
movq %r12, %rdi
callq 0x17030
xorl %edx, %edx
divq %r14
movq %rdx, %rbx
movq %r12, %rdi
callq 0x17030
testq %rbx, %rbx
je 0x142544
xorl %edx, %edx
divq %r14
incq %rax
imulq %r14, %rax
movq 0x8(%r15), %rdi
movq %rax, 0x60(%rdi)
addq $0x60, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
movq 0x8(%r15), %rax
movq 0x60(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x125636
cmpb $0x1, 0x19(%r15)
jne 0x14258e
movq 0x8(%r15), %rax
movq 0x10(%r15), %rdi
movq 0x60(%rax), %rsi
callq 0x179058
jmp 0x1425a6
cmpb $0x1, 0x18(%r15)
jne 0x1425ae
movq 0x8(%r15), %rax
movq 0x10(%r15), %rdi
movq 0x60(%rax), %rsi
callq 0x178fb0
movq 0x8(%r15), %rcx
movq %rax, 0x28(%rcx)
movq 0x8(%r15), %rbx
leaq 0x242adf(%rip), %r15    # 0x385098
movl $0x1, %edi
movl $0x40, %esi
movq %r15, %rdx
movl $0x2c3, %ecx            # imm = 0x2C3
callq 0x1093ef
movq %rax, %r13
movq %rbx, 0x40(%rsp)
movq 0x50(%rbx), %rbp
movl $0x18, %edi
movq %r15, %rsi
movl $0x2c8, %edx            # imm = 0x2C8
callq 0x1092b2
movq %rax, (%r13)
xorl %ecx, %ecx
movq %rcx, 0x30(%r13)
pxor %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq %rcx, 0x10(%rax)
movq %r12, 0x50(%rsp)
movq %r12, %rdi
callq 0x304b94
movq %rax, %r12
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x3070d0
movl %eax, %ecx
testl %eax, %eax
jne 0x1428bf
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rcx
testq %rcx, %rcx
je 0x1426e4
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
movq 0x40(%rsp), %rdx
addq 0x18(%rdx), %rcx
movdqa 0x21f406(%rip), %xmm1   # 0x361a70
movdqa 0x21f40e(%rip), %xmm2   # 0x361a80
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x21f40e(%rip), %xmm4   # 0x361a90
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, %edx
notl %edx
testb $0x1, %dl
je 0x1426be
movq $0x0, -0xc8(%rcx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x1426d3
movq $0x0, (%rcx)
paddq %xmm4, %xmm1
addq $0x190, %rcx            # imm = 0x190
addq $-0x2, %rax
jne 0x142682
leaq 0x38(%rsp), %rsi
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rdx
callq 0x307124
testl %eax, %eax
jle 0x1428a2
shlq $0x3, %rbp
xorl %r15d, %r15d
movq $0x0, 0x60(%rsp)
movq %r13, 0x70(%rsp)
movq 0x8(%r13), %rdi
leaq 0x242978(%rip), %rsi    # 0x385098
movl $0x2d9, %edx            # imm = 0x2D9
callq 0x109670
movq 0x38(%rsp), %rdi
callq 0xe8760
movq %rax, 0x8(%r13)
movb $0x0, 0x38(%r13)
movq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x143dc7
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x142802
movq 0x10(%r13), %rcx
movq %r15, %rsi
movq 0x60(%rsp), %rdx
movq %rbp, %r8
callq 0x1796d3
movb %al, 0x38(%r13)
testb %al, %al
je 0x142802
movq 0x30(%r13), %rsi
leaq 0x243029(%rip), %rdi    # 0x3857ae
xorl %eax, %eax
callq 0x108e02
movq 0x8(%r13), %rdi
leaq 0x242901(%rip), %rsi    # 0x385098
movl $0x2ee, %edx            # imm = 0x2EE
callq 0x109670
movq 0x38(%rsp), %rdi
callq 0xe8760
movq %rax, 0x8(%r13)
movq (%r13), %rax
movq $0x0, 0x10(%rax)
movq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x143dc7
movq %r12, %rdi
callq 0x304d26
movq 0x28(%rbx), %r14
movq %r12, %rdi
callq 0x304dad
movq 0x30(%r13), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1795e2
movq 0x50(%rbx), %rbp
shlq $0x3, %rbp
movq $0x0, 0x60(%rsp)
xorl %r15d, %r15d
movq 0x10(%r13), %rbx
cmpq %rbx, %rbp
jae 0x14282c
movq 0x40(%rsp), %rax
movq 0x50(%rax), %r14
shlq $0x3, %r14
subq %rbp, %rbx
incq %r15
movq %r14, %rbp
cmpq %rbx, %r14
jb 0x142818
movq %rbx, 0x10(%r13)
jmp 0x14282f
movq %rbp, %r14
cmpq $0x1, %r15
adcq $0x0, %r15
incq 0x30(%r13)
movq (%r13), %rax
movq 0x10(%rax), %rbp
testq %rbp, %rbp
je 0x142868
movq (%rax), %r13
addq $0x8, %r13
movq -0x8(%r13), %rsi
movl (%r13), %edx
movq %r12, %rdi
callq 0x304beb
addq $0x10, %r13
decq %rbp
jne 0x14284f
subq %rbx, %r14
incq 0x60(%rsp)
movq 0x70(%rsp), %r13
movq (%r13), %rax
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movq %rcx, 0x10(%r13)
movq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x307124
movq %r14, %rbp
testl %eax, %eax
jg 0x142715
testl %eax, %eax
movq 0x30(%rsp), %rdi
je 0x1428bd
movl %eax, %ebx
callq 0x101a9a
movl %ebx, %ecx
testb %al, %al
jne 0x1428bf
callq 0x410f5
xorl %ecx, %ecx
movl %ecx, %ebx
testl %ecx, %ecx
jne 0x1428f3
movq %r12, %rdi
callq 0x304cde
movq 0x50(%rsp), %rdi
callq 0x17030
movq 0x40(%rsp), %rcx
movq %rax, 0x58(%rcx)
movq 0x28(%rcx), %rdi
testq %rdi, %rdi
je 0x1428f3
movq 0x50(%rsp), %rsi
callq 0x1790a7
movq %r12, %rdi
callq 0x304db5
movq (%r13), %rax
movq (%rax), %rdi
testq %rdi, %rdi
movq 0x80(%rsp), %r15
je 0x142934
leaq 0x242782(%rip), %rsi    # 0x385098
movl $0x31c, %edx            # imm = 0x31C
callq 0x109670
movq (%r13), %rax
pxor %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq (%r13), %rdi
leaq 0x242759(%rip), %r14    # 0x385098
movq %r14, %rsi
movl $0x31d, %edx            # imm = 0x31D
callq 0x109670
movq 0x8(%r13), %rdi
movq %r14, %rsi
movl $0x31e, %edx            # imm = 0x31E
callq 0x109670
movq %r13, %rdi
movq %r14, %rsi
movl $0x31f, %edx            # imm = 0x31F
callq 0x109670
movl %ebx, %ecx
movq 0x50(%rsp), %r12
movq 0x58(%rsp), %rsi
movl %ecx, %ebp
testl %ecx, %ecx
je 0x14298c
movq %r12, %rdi
callq 0x101f02
jmp 0x142b0e
movq 0x8(%r15), %rax
cmpq $0x0, 0x28(%rax)
je 0x1429bb
movq %r12, %rdi
xorl %edx, %edx
callq 0x125636
movq 0x8(%r15), %rdi
addq $0x58, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
movq %r12, %rdi
callq 0x101f02
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1429e1
movq 0x381516(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x242869(%rip), %rsi    # 0x385245
callq 0x1229c8
callq 0x108df6
testb %al, %al
je 0x142b0e
movq 0x90(%rsp), %rdi
callq 0x120955
movq %rax, %rbx
leaq 0x242819(%rip), %rsi    # 0x38521e
movq %rax, %rdi
callq 0x12097f
leaq 0x24284f(%rip), %rdi    # 0x385263
xorl %eax, %eax
callq 0x108e02
leaq 0x242860(%rip), %rdi    # 0x385282
xorl %eax, %eax
callq 0x108e02
movq 0x8(%r15), %rax
movq 0x28(%rax), %rdi
testq %rdi, %rdi
je 0x142a58
callq 0x1795d2
movq %rax, %r14
movq 0x8(%r15), %rax
movq 0x28(%rax), %rdi
callq 0x1795bf
testb %al, %al
je 0x142a68
leaq 0x242830(%rip), %rdi    # 0x385286
jmp 0x142a6f
leaq 0x24289a(%rip), %rdi    # 0x3852f9
xorl %eax, %eax
callq 0x108e02
jmp 0x142a79
leaq 0x242854(%rip), %rdi    # 0x3852c3
movq %r14, %rsi
xorl %eax, %eax
callq 0x108e02
movq 0x8(%r15), %rax
movq 0x38(%rax), %rsi
leaq 0x242892(%rip), %rdi    # 0x38531a
xorl %eax, %eax
callq 0x108e02
movq 0x8(%r15), %rax
movq 0x30(%rax), %rsi
leaq 0x2428a6(%rip), %rdi    # 0x385344
xorl %eax, %eax
callq 0x108e02
movq %rbx, %rdi
callq 0x120d23
movq %rax, %rdi
callq 0x1045d1
cvtsi2sd %rax, %xmm0
mulsd 0x2425ce(%rip), %xmm0   # 0x385090
movq 0x8(%r15), %rax
movsd 0x30(%rax), %xmm1
unpcklps 0x20de0e(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x20de16(%rip), %xmm1   # 0x3508f0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x24287c(%rip), %rdi    # 0x38536d
movb $0x1, %al
callq 0x108e02
leaq 0x24288e(%rip), %rdi    # 0x38538d
xorl %eax, %eax
callq 0x108e02
movq %rbx, %rdi
callq 0x121b03
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x40f9f
callq 0x41011
callq 0x41167
callq 0x411a0
callq 0x4112e
callq 0x411d9
callq 0x41083
callq 0x41284
callq 0x4124b
callq 0x41212
callq 0x40f2d
callq 0x40f66
callq 0x4104a
callq 0x40fd8
callq 0x410bc