// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrange_storetmp
static void gt_Sfxmappedrange_storetmp(GtSfxmappedrange *sfxmappedrange,
                                       GtSfxStoretype usedptrptr,
                                       GtSfxmappedrangetype type,
                                       bool writable)
{
  FILE *outfp;

  gt_assert(sfxmappedrange != NULL);
  sfxmappedrange->ptr = NULL;
  sfxmappedrange->filename = gt_str_new();
  sfxmappedrange->writable = writable;
  outfp = gt_xtmpfp(sfxmappedrange->filename);
  gt_assert(outfp != NULL);
  gt_log_log("write %s to file %s ("GT_WU" units of "GT_WU" bytes)",
             gt_str_get(sfxmappedrange->tablename),
             gt_str_get(sfxmappedrange->filename),
             (GtUword) sfxmappedrange->numofunits,
             (GtUword) sfxmappedrange->sizeofunit);
  switch (type) {
    case GtSfxGtBitsequence:
      gt_xfwrite(*(usedptrptr.bs),sfxmappedrange->sizeofunit,
                 sfxmappedrange->numofunits,outfp);
      sfxmappedrange->usedptrptr = (void**) usedptrptr.bs;
      gt_free(*(usedptrptr.bs));
      *(usedptrptr.bs) = NULL;
      break;
    case GtSfxunsignedlong:
      gt_xfwrite(*(usedptrptr.ulong),sfxmappedrange->sizeofunit,
                 sfxmappedrange->numofunits,outfp);
      sfxmappedrange->usedptrptr = (void**) usedptrptr.ulong;
      gt_free(*(usedptrptr.ulong));
      *(usedptrptr.ulong) = NULL;
      break;
    case GtSfxuint32_t:
      gt_xfwrite(*(usedptrptr.uint32),sfxmappedrange->sizeofunit,
                 sfxmappedrange->numofunits,outfp);
      sfxmappedrange->usedptrptr = (void**) usedptrptr.uint32;
      gt_free(*(usedptrptr.uint32));
      *(usedptrptr.uint32) = NULL;
      break;
   }
   gt_fa_fclose(outfp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x19fe20
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
andq $0x0, (%rdi)
callq 0xacb84
movq %rax, 0x18(%r14)
movb %r15b, 0x70(%r14)
leaq 0x1b8aea(%rip), %rdx    # 0x35887b
movq %rax, %rdi
xorl %esi, %esi
movl $0xab, %ecx
callq 0x8abea
testq %rax, %rax
je 0x19fe4e
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0xad1fa
movq %rax, %r12
movq 0x18(%r14), %rdi
callq 0xad1fa
movq 0x30(%r14), %rcx
movq 0x38(%r14), %r8
leaq 0x1b8e55(%rip), %rdi    # 0x358c25
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x92a82
movq (%rbx), %rdi
movq 0x30(%r14), %rdx
movq 0x38(%r14), %rsi
movq %r15, %rcx
callq 0xb302c
movq %rbx, 0x10(%r14)
movq (%rbx), %rdi
imull $0x7, %ebp, %edx
addl $0xb7, %edx
leaq 0x1b8a74(%rip), %rsi    # 0x35887b
callq 0x936f9
andq $0x0, (%rbx)
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8a4fd
movq 0x298141(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1451e2(%rip), %rsi    # 0x2e5013
leaq 0x1b8a0e(%rip), %rdx    # 0x358846
leaq 0x1b8dbd(%rip), %rcx    # 0x358bfc
leaq 0x1b8a35(%rip), %r8     # 0x35887b
movl $0xa7, %r9d
jmp 0x19fe7a
movq 0x298113(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1451b4(%rip), %rsi    # 0x2e5013
leaq 0x1b8db1(%rip), %rdx    # 0x358c17
leaq 0x1b8d8f(%rip), %rcx    # 0x358bfc
leaq 0x1b8a07(%rip), %r8     # 0x35887b
movl $0xac, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390