// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/file.c
// Function: gt_file_xopen_file_mode
GtFile* gt_file_xopen_file_mode(GtFileMode file_mode, const char *path,
                                const char *mode)
{
  GtFile *file;
  gt_assert(mode);
  file = gt_calloc(1, sizeof (GtFile));
  file->mode = file_mode;
  file->reference_count = 0;
  if (path) {
    switch (file_mode) {
      case GT_FILE_MODE_UNCOMPRESSED:
        file->fileptr.file = gt_fa_xfopen(path, mode);
        break;
      case GT_FILE_MODE_GZIP:
        file->fileptr.gzfile = gt_fa_xgzopen(path, mode);
        break;
      case GT_FILE_MODE_BZIP2:
        file->fileptr.bzfile = gt_fa_xbzopen(path, mode);
        file->orig_path = gt_cstr_dup(path);
        file->orig_mode = gt_cstr_dup(path);
        break;
      default: gt_assert(0);
    }
  }
  else {
    gt_assert(file_mode == GT_FILE_MODE_UNCOMPRESSED);
    file->fileptr.file = stdin;
    file->is_stdin = true;
  }
  return file;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x832f2
movq 0x130d17(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xdad9b(%rip), %rsi     # 0x15e066
leaq 0xeadba(%rip), %rdx     # 0x16e08c
leaq 0xeb082(%rip), %rcx     # 0x16e35b
leaq 0xeb013(%rip), %r8      # 0x16e2f3
movl $0x96, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x832f4
movl $0x1, %edi
movl $0x30, %esi
leaq 0xeafee(%rip), %rdx     # 0x16e2f3
movl $0x97, %ecx
callq 0xd5b0
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x8(%rax)
cmpq $0x0, 0x18(%rsp)
je 0x83448
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x8335f
jmp 0x83346
movl 0x4(%rsp), %eax
subl $0x1, %eax
je 0x8338b
jmp 0x83351
movl 0x4(%rsp), %eax
subl $0x2, %eax
je 0x833b7
jmp 0x8340c
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0xeaf83(%rip), %rdx     # 0x16e2f3
movl $0x9d, %ecx
callq 0x7f9b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x83446
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0xeaf57(%rip), %rdx     # 0x16e2f3
movl $0xa0, %ecx
callq 0x80150
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x83446
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0xeaf2b(%rip), %rdx     # 0x16e2f3
movl $0xa3, %ecx
callq 0x80460
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rdi
callq 0x7c400
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rdi
callq 0x7c400
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
jmp 0x83446
jmp 0x8340e
movq 0x130bc3(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xdac47(%rip), %rsi     # 0x15e066
leaq 0xeca95(%rip), %rdx     # 0x16febb
leaq 0xeaf2e(%rip), %rcx     # 0x16e35b
leaq 0xeaebf(%rip), %r8      # 0x16e2f3
movl $0xa7, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x834a7
jmp 0x8344a
cmpl $0x0, 0x24(%rsp)
je 0x83489
movq 0x130b80(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xdac04(%rip), %rsi     # 0x15e066
leaq 0xeaecb(%rip), %rdx     # 0x16e334
leaq 0xeaeeb(%rip), %rcx     # 0x16e35b
leaq 0xeae7c(%rip), %r8      # 0x16e2f3
movl $0xab, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x8348b
movq 0x130b36(%rip), %rax    # 0x1b3fc8
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movb $0x1, 0x29(%rax)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)