// File: /workspace/github_c_makefile_star2_O0/jsh58[P]Genrich/Genrich.c
// Function: loadFields
bool loadFields(uint16_t* flag, char** rname, uint32_t* pos,
    uint8_t* mapq, char** cigar, char** rnext, uint32_t* pnext,
    int32_t* tlen, char** seq, char** qual, char** extra) {
  *extra = NULL;  // reset 'extra' fields
  int i = 2;
  char* field = strtok(NULL, TAB);
  while (field != NULL) {
    switch (i) {
      case FLAG: *flag = getInt(field); break;
      case RNAME: *rname = field; break;
      case POS: *pos = getInt(field) - 1; break;  // convert to 0-based
      case MAPQ: *mapq = getInt(field); break;
      case CIGAR: *cigar = field; break;
      case RNEXT: *rnext = field; break;
      case PNEXT: *pnext = getInt(field) - 1; break;  // convert to 0-based
      case TLEN: *tlen = getInt(field); break;
      case SEQ: *seq = field; break;
      case QUAL: *qual = field; break;
      default: return false;
    }
    if (++i > 11) {
      *extra = strtok(NULL, "\n");
      break;
    }
    field = strtok(NULL, TAB);
  }
  return i > 11;
}

// Assembly:
subq $0x58, %rsp
movq 0x80(%rsp), %rax
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rax
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movq 0x80(%rsp), %rax
movq $0x0, (%rax)
movl $0x2, 0x1c(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0xb874(%rip), %rsi      # 0x1fd04
callq 0x2280
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x145e8
movl 0x1c(%rsp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x9, %eax
ja 0x14597
movq 0x8(%rsp), %rax
leaq 0x9d7f(%rip), %rcx      # 0x1e248
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rdi
callq 0x2980
movw %ax, %cx
movq 0x48(%rsp), %rax
movw %cx, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rdi
callq 0x2980
movl %eax, %ecx
subl $0x1, %ecx
movq 0x38(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rdi
callq 0x2980
movb %al, %cl
movq 0x30(%rsp), %rax
movb %cl, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rdi
callq 0x2980
movl %eax, %ecx
subl $0x1, %ecx
movq 0x60(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rdi
callq 0x2980
movl %eax, %ecx
movq 0x68(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1459e
movq 0x10(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1459e
movb $0x0, 0x57(%rsp)
jmp 0x145f6
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
cmpl $0xb, %eax
jle 0x145ce
xorl %eax, %eax
movl %eax, %edi
leaq 0xb276(%rip), %rsi      # 0x1f82f
callq 0x2280
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
jmp 0x145e8
xorl %eax, %eax
movl %eax, %edi
leaq 0xb72b(%rip), %rsi      # 0x1fd04
callq 0x2280
movq %rax, 0x10(%rsp)
jmp 0x1449a
cmpl $0xb, 0x1c(%rsp)
setg %al
andb $0x1, %al
movb %al, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)