// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/gtr.c
// Function: create_manpage
static int create_manpage(const char *outdir, const char *toolname,
                          GtOptionParser *option_parser, GtError *err)
{
  GtFile *outfile = NULL;
  GtStr *man, *pathbuf;
  char *utoolname;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(outdir && toolname && option_parser);
  man = gt_str_new();
  pathbuf = gt_str_new_cstr(outdir);
  utoolname = gt_cstr_dup(toolname);
  gt_cstr_rep(utoolname, ' ', '_');
  if (!gt_file_exists(gt_str_get(pathbuf)))
    gt_xmkdir(gt_str_get(pathbuf));
  gt_str_append_char(pathbuf, GT_PATH_SEPARATOR);
  gt_str_append_cstr(pathbuf, utoolname);
  gt_str_append_cstr(pathbuf, ".mansrc");
  gt_free(utoolname);
  if (!(outfile = gt_file_new(gt_str_get(pathbuf), "w+", err)))
    had_err = -1;
  if (!had_err)
    had_err = gt_option_parser_manpage(option_parser, toolname, man, err);
  if (!had_err)
    gt_file_xprintf(outfile, "%s", gt_str_get(man));
  gt_file_delete(outfile);
  gt_str_delete(pathbuf);
  gt_str_delete(man);
  return had_err;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x14(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x1bcf9
movq 0x38(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1bcc1
jmp 0x1bcf9
movq 0x6202d8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4fa341(%rip), %rsi    # 0x516013
leaq 0x4fa4e6(%rip), %rdx    # 0x5161bf
leaq 0x4fa989(%rip), %rcx    # 0x516669
leaq 0x4fa45e(%rip), %r8     # 0x516145
movl $0x12d, %r9d            # imm = 0x12D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bcfb
jmp 0x1bcfd
cmpq $0x0, 0x50(%rsp)
je 0x1bd15
cmpq $0x0, 0x48(%rsp)
je 0x1bd15
cmpq $0x0, 0x40(%rsp)
jne 0x1bd4d
movq 0x620284(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4fa2ed(%rip), %rsi    # 0x516013
leaq 0x4fa94b(%rip), %rdx    # 0x516678
leaq 0x4fa935(%rip), %rcx    # 0x516669
leaq 0x4fa40a(%rip), %r8     # 0x516145
movl $0x12e, %r9d            # imm = 0x12E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bd4f
callq 0x11d4a0
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
callq 0x11d510
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa2db0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl $0x5f, %edx
callq 0xa2ef0
movq 0x20(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0xde820
testb $0x1, %al
jne 0x1bdb3
movq 0x20(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0x1276d0
movq 0x20(%rsp), %rdi
movl $0x2f, %esi
callq 0x11da70
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x11d550
movq 0x20(%rsp), %rdi
leaq 0x4fa8bf(%rip), %rsi    # 0x51669c
callq 0x11d550
movq 0x18(%rsp), %rdi
leaq 0x4fa357(%rip), %rsi    # 0x516145
movl $0x138, %edx            # imm = 0x138
callq 0xe88c0
movq 0x20(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x38(%rsp), %rdx
leaq 0x4fa893(%rip), %rsi    # 0x5166a4
callq 0xdd320
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
jne 0x1be29
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x14(%rsp)
jne 0x1be4d
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x38(%rsp), %rcx
callq 0xf1a80
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x1be7e
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x11dee0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x5801aa(%rip), %rsi    # 0x59c021
movb $0x0, %al
callq 0xddca0
movq 0x30(%rsp), %rdi
callq 0xde430
movq 0x20(%rsp), %rdi
callq 0x11f560
movq 0x28(%rsp), %rdi
callq 0x11f560
movl 0x14(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop