// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/editscript.c
// Function: editscript_io_fp
static GtEditscript *editscript_io_fp(GtEditscript *editscript, FILE *fp,
                                      GtError *err, GtIOFunc io_func)
{
  int had_err = 0;
  GtUword bits;

  had_err = EDITSCRIPT_IO_ONE(&editscript->entry_size);
  if (!had_err)
    had_err = EDITSCRIPT_IO_ONE(&editscript->trailing_matches);
  if (!had_err)
    had_err = EDITSCRIPT_IO_ONE(&editscript->del);
  if (!had_err)
    had_err = EDITSCRIPT_IO_ONE(&editscript->num_elems);
  if (!had_err && editscript->num_elems != 0) {
    bits = (GtUword) editscript->num_elems * (GtUword) editscript->entry_size;
    editscript->size = (uint32_t) (bits / (GT_INTWORDSIZE));
    if (bits % GT_INTWORDSIZE) {
      editscript->size++;
    }

    editscript->space =
      gt_realloc(editscript->space,
                 editscript->size * sizeof (*(editscript->space)));
    had_err = io_func(editscript->space,
                      sizeof (*(editscript->space)),
                      (size_t) (editscript->size),
                      fp, err);
  }

  if (had_err) {
    gt_editscript_delete(editscript);
    editscript = NULL;
  }
  return(editscript);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rdi
addq $0x15, %rdi
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
movl $0x1, %edx
movq %rdx, %rsi
callq *%rax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x15c4a5
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rdi
addq $0x10, %rdi
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
movl $0x4, %esi
movl $0x1, %edx
callq *%rax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x15c4d2
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rdi
addq $0x14, %rdi
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
movl $0x1, %edx
movq %rdx, %rsi
callq *%rax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x15c501
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rdi
addq $0xc, %rdi
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
movl $0x4, %esi
movl $0x1, %edx
callq *%rax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x15c5c3
movq 0x30(%rsp), %rax
cmpl $0x0, 0xc(%rax)
je 0x15c5c3
movq 0x30(%rsp), %rax
movl 0xc(%rax), %eax
movq 0x30(%rsp), %rcx
movzbl 0x15(%rcx), %ecx
imulq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
shrq $0x6, %rax
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x8(%rsp), %rax
andq $0x3f, %rax
cmpq $0x0, %rax
je 0x15c565
movq 0x30(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
shlq $0x3, %rsi
leaq 0x3f1496(%rip), %rdx    # 0x54da18
movl $0x2e0, %ecx            # imm = 0x2E0
callq 0xe8540
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rcx), %rdi
movq 0x30(%rsp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, %edx
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
movl $0x8, %esi
callq *%rax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
je 0x15c5dd
movq 0x30(%rsp), %rdi
callq 0x15a310
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw (%rax,%rax)