// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_splitfasta.c
// Function: gt_splitfasta_runner
static int gt_splitfasta_runner(GT_UNUSED int argc, const char **argv,
                                int parsed_args, void *tool_arguments,
                                GtError *err)
{
  SplitfastaArguments *arguments = tool_arguments;
  unsigned int num_files;
  int had_err;
  off_t file_size;
  const char* filename;
  gt_error_check(err);
  gt_assert(arguments);

  num_files = arguments->num_files;
  filename = argv[parsed_args];

  if (gt_str_length(arguments->splitdesc)) {
    had_err = split_description(filename, arguments->splitdesc,
                                arguments->width, arguments->force, err);
  }
  else {
    GtUword max_filesize;
    if (num_files) {
      /* set the maxfile size based on requested number of files */
      file_size = gt_file_estimate_size(filename);
      max_filesize= file_size / num_files ;
    }
    else
      max_filesize= arguments->max_filesize_in_MB << 20;
    had_err = split_fasta_file(filename, max_filesize, arguments->force, err);
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2048, %rsp           # imm = 0x2048
movq %r8, %r12
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
testq %r8, %r8
je 0xcf59f
movq %r12, %rdi
callq 0x101a9a
testb %al, %al
jne 0xcfafd
testq %rbx, %rbx
je 0xcfaf8
movl 0x10(%rbx), %r15d
movslq %ebp, %rax
movq (%r14,%rax,8), %rax
movq %rax, (%rsp)
movq 0x18(%rbx), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xcf752
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rbx), %rax
movq %rax, 0x8(%rsp)
movb 0x20(%rbx), %bl
testq %r12, %r12
je 0xcf5f3
movq %r12, %rdi
callq 0x101a9a
testb %al, %al
jne 0xcfb07
cmpq $0x0, (%rsp)
je 0xcfaf3
cmpq $0x0, 0x8(%rsp)
je 0xcfaf3
movq 0x8(%rsp), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xcfaf3
callq 0x1208f8
movq %rax, %r13
movq (%rsp), %rdi
movq %r12, %rsi
callq 0xd69c0
movq %rax, %r14
testq %rax, %rax
je 0xcf767
movq %r14, %rdi
callq 0xd75d2
testq %rax, %rax
je 0xcf74e
xorl %ebp, %ebp
movzbl %bl, %eax
movl %eax, 0x18(%rsp)
movq %r12, 0x28(%rsp)
movq %r13, %rdi
callq 0x120db4
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x120a43
movq %r13, %rdi
movl $0x2f, %esi
callq 0x120ba5
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd71c2
movq %r13, %rdi
movq %rax, %rsi
callq 0x12097f
movq (%rsp), %rdi
callq 0x1042ac
movq %r13, %rdi
movq %rax, %rsi
callq 0x12097f
movq %r13, %rdi
callq 0x120d23
movq %rax, %rdi
leaq 0x2cd377(%rip), %rsi    # 0x39ca31
movl 0x18(%rsp), %edx
movq %r12, %rcx
callq 0x110258
movq %rax, %r15
testq %rax, %rax
je 0xcf72b
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd7118
movq %rax, %r12
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd71c2
movq %rax, %rbx
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd71ae
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq 0x10(%rsp), %rcx
movq %r15, %r8
callq 0x102ec0
movq %r12, %rdi
leaq 0x2956ab(%rip), %rsi    # 0x364dc0
movl $0x87, %edx
callq 0x109670
movq %r15, %rdi
callq 0x1040fc
xorl %ebx, %ebx
jmp 0xcf730
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0xcf76c
incq %rbp
movq %r14, %rdi
callq 0xd75d2
cmpq %rax, %rbp
movq 0x28(%rsp), %r12
jb 0xcf65c
xorl %ebx, %ebx
jmp 0xcf76c
testq %r15, %r15
je 0xcf781
movq (%rsp), %rdi
callq 0x1045d1
cqto
idivq %r15
jmp 0xcf788
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0xd6f28
movq %r13, %rdi
callq 0x121b03
jmp 0xcfadb
movq (%rbx), %rax
shlq $0x14, %rax
movq %rax, 0x18(%rsp)
movb 0x20(%rbx), %bpl
testq %r12, %r12
je 0xcf7a6
movq %r12, %rdi
callq 0x101a9a
testb %al, %al
jne 0xcfb20
cmpq $0x0, (%rsp)
movq 0x18(%rsp), %rax
je 0xcfb11
testq %rax, %rax
je 0xcfb11
leaq 0x294703(%rip), %rsi    # 0x363ec9
movq (%rsp), %rdi
callq 0x103c28
testq %rax, %rax
je 0xcfb16
movq %rax, %r14
leaq 0x40(%rsp), %rsi
movl $0x2000, %edx           # imm = 0x2000
movq %rax, %rdi
callq 0x104009
movl %eax, %ebx
xorl %eax, %eax
testl %ebx, %ebx
jne 0xcf80f
leaq 0x2b97ea(%rip), %rsi    # 0x388fe6
movq %r12, %rdi
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ebx, %ebx
je 0xcf830
cmpb $0x3e, 0x40(%rsp)
je 0xcf830
leaq 0x29574e(%rip), %rsi    # 0x364f6f
movq %r12, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xcf843
xorl %r15d, %r15d
xorl %edi, %edi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xcfac6
callq 0x1208f8
movq %rax, %r15
movq %r14, 0x10(%rsp)
movq (%rsp), %r14
movq %r14, %rdi
callq 0x1038eb
movq %r15, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %r14
movq %rax, %rdx
callq 0x120a9d
movq %r15, %rdi
movl $0x2e, %esi
callq 0x120ba5
movl $0x1, %eax
movq %rax, 0x38(%rsp)
movl $0x1, %esi
movq %r15, %rdi
callq 0x120af4
movq %r14, %rdi
callq 0x103c92
movl %eax, %edi
callq 0x1038cf
movq %r15, %rdi
movq %rax, %rsi
callq 0x12097f
movq %r15, 0x20(%rsp)
movq %r15, %rdi
callq 0x120d23
movzbl %bpl, %edx
leaq 0x2cd16c(%rip), %rsi    # 0x39ca31
movq %rax, %rdi
movl %edx, 0x34(%rsp)
movq %r12, %rcx
callq 0x110258
movq %rax, %r15
testq %rax, %rax
je 0xcfab8
movq %r12, 0x28(%rsp)
movslq %ebx, %rdx
leaq 0x40(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %rdx, 0x8(%rsp)
callq 0x104060
movq 0x18(%rsp), %rbx
movl $0x2000, %edx           # imm = 0x2000
movq %r14, %rdi
movq %r12, %rsi
callq 0x104009
testl %eax, %eax
je 0xcfabf
movslq %eax, %r13
movq 0x8(%rsp), %rsi
leaq (%rsi,%r13), %rcx
xorl %ebp, %ebp
cmpq %rbx, %rcx
jbe 0xcfa9a
movq %rbx, %rcx
subq %rsi, %rcx
movl $0x0, %edx
cmovbq %rdx, %rcx
cmpl %ecx, %eax
jle 0xcfb02
leaq (%rsp,%r13), %rax
addq $0x40, %rax
movslq %ecx, %rbx
cmpb $0x3e, 0x40(%rsp,%rbx)
je 0xcf96e
leaq (%rsp,%rbx), %rcx
addq $0x41, %rcx
incq %rbx
cmpq %rax, %rcx
jb 0xcf953
xorl %ebx, %ebx
jmp 0xcf971
incq %rbx
xorl %ebp, %ebp
testq %rbx, %rbx
je 0xcfa65
decq %rbx
movq %r13, %r14
subq %rbx, %r14
jbe 0xcfb0c
testq %rbx, %rbx
je 0xcf99e
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x104060
movq %r15, %rdi
callq 0x1040fc
movq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x120db4
movq (%rsp), %r15
movq %r15, %rdi
callq 0x1038eb
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x120a9d
movq %r12, %rdi
movl $0x2e, %esi
callq 0x120ba5
movq 0x38(%rsp), %rsi
incq %rsi
movq %r12, %rdi
movq %rsi, 0x38(%rsp)
callq 0x120af4
movq 0x10(%rsp), %rdi
callq 0x103c92
movl %eax, %edi
callq 0x1038cf
movq %r12, %rdi
movq %rax, %rsi
callq 0x12097f
movq %r12, %rdi
callq 0x120d23
movq %rax, %rdi
leaq 0x2cd014(%rip), %rsi    # 0x39ca31
movl 0x34(%rsp), %edx
movq 0x28(%rsp), %rcx
callq 0x110258
testq %rax, %rax
je 0xcfa69
cmpb $0x3e, 0x40(%rsp,%rbx)
jne 0xcfb1b
movq %rax, %r15
leaq (%rsp,%rbx), %rsi
addq $0x40, %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x104060
movl $0x8, %eax
movq %r14, %rsi
movq 0x10(%rsp), %r14
leaq 0x40(%rsp), %r12
jmp 0xcfa85
xorl %eax, %eax
jmp 0xcfa85
movl $0x9, %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movq 0x10(%rsp), %r14
leaq 0x40(%rsp), %r12
movq 0x8(%rsp), %rsi
testl %eax, %eax
movq 0x18(%rsp), %rbx
je 0xcfa9a
movq %rsi, 0x8(%rsp)
cmpl $0x8, %eax
je 0xcfab0
jmp 0xcfaef
addq %r13, %rsi
movq %rsi, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x104060
testl %ebp, %ebp
je 0xcf902
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xcfac1
xorl %ebx, %ebx
movq 0x20(%rsp), %rdi
callq 0x121b03
movq %r15, %rdi
callq 0x1040fc
movq %r14, %rdi
callq 0x1040fc
movl %ebx, %eax
addq $0x2048, %rsp           # imm = 0x2048
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %ebx
jmp 0xcfac1
callq 0x21620
callq 0x217ab
callq 0x215b0
callq 0x216c9
callq 0x215e9
callq 0x21700
callq 0x21690
callq 0x21772
callq 0x21739
callq 0x21657
nopl (%rax)