// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/rdj-contfinder.c
// Function: gt_contfinder_write_copynum
int gt_contfinder_write_copynum(GtContfinder *contfinder, char* path,
    GtError *err)
{
  int had_err = 0;
  gt_contfinder_seqnum_t i;
  FILE *file;
  file = gt_fa_fopen(path, "wb", err);
  if (file == NULL)
    had_err = -1;
  else
  {
#ifndef NDEBUG
    gt_contfinder_seqnum_t n_noncontained = 0;
    GtUword cnsum = 0;
    bool had_overflow = false;
#endif
    gt_contfinder_copynum_t cn;
    for (i = 0; i < contfinder->nofseqs; i++)
    {
      cn = contfinder->copynum[i];
      if (cn > 0)
      {
        gt_xfwrite(contfinder->copynum + i, sizeof (*contfinder->copynum),
            (size_t)1, file);
#ifndef NDEBUG
        n_noncontained++;
        if (cn == GT_CONTFINDER_COPYNUM_MAX)
        {
          had_overflow = true;
        }
        cnsum += cn;
#endif
      }
    }
    gt_assert(n_noncontained == contfinder->nofseqs -
        gt_contfinder_nofcontained(contfinder));
    gt_assert(had_overflow || (cnsum == (GtUword)contfinder->nofseqs));
    gt_fa_fclose(file);
  }
  return had_err;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %r8
leaq 0x2ad951(%rip), %rsi    # 0x526b9d
leaq 0x3067ef(%rip), %rdx    # 0x57fa42
movl $0x32c, %ecx            # imm = 0x32C
callq 0xd8df0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x279277
movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF
jmp 0x2793f0
movl $0x0, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x0, 0x1f(%rsp)
movl $0x0, 0x38(%rsp)
movl 0x38(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x279320
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rax
movl 0x38(%rsp), %ecx
movb (%rax,%rcx), %al
movb %al, 0x1e(%rsp)
movzbl 0x1e(%rsp), %eax
cmpl $0x0, %eax
jle 0x27930e
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
movl 0x38(%rsp), %eax
addq %rax, %rdi
movq 0x30(%rsp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x126d30
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movzbl 0x1e(%rsp), %eax
cmpl $0xff, %eax
jne 0x2792ff
movb $0x1, 0x1f(%rsp)
movzbl 0x1e(%rsp), %eax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x279310
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x279295
jmp 0x279322
movl 0x2c(%rsp), %eax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rax
movl 0xc(%rax), %eax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
callq 0x279400
movq 0x8(%rsp), %rcx
movq %rax, %rdx
movq 0x10(%rsp), %rax
subq %rdx, %rcx
cmpq %rcx, %rax
je 0x27938f
movq 0x3c2c42(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x29ccab(%rip), %rsi    # 0x516013
leaq 0x3066ee(%rip), %rdx    # 0x57fa5d
leaq 0x306736(%rip), %rcx    # 0x57faac
leaq 0x3066c5(%rip), %r8     # 0x57fa42
movl $0x349, %r9d            # imm = 0x349
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x279391
jmp 0x279393
testb $0x1, 0x1f(%rsp)
jne 0x2793e4
movq 0x20(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
je 0x2793e4
movq 0x3c2bed(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x29cc56(%rip), %rsi    # 0x516013
leaq 0x306704(%rip), %rdx    # 0x57fac8
leaq 0x3066e1(%rip), %rcx    # 0x57faac
leaq 0x306670(%rip), %r8     # 0x57fa42
movl $0x34a, %r9d            # imm = 0x34A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2793e6
movq 0x30(%rsp), %rdi
callq 0xd9390
movl 0x3c(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)