// File: /workspace/github_c_makefile_star2_O0/jsh58[P]Genrich/Genrich.c
// Function: loadChrom
void loadChrom(char* line, int* chromLen, Chrom** chrom,
    int xcount, char** xchrList, int xBedLen, Bed* xBed,
    bool ctrl, bool verbose) {
  // parse SAM header line for chrom info
  char* name = NULL, *len = NULL;
  char* field = strtok(NULL, TAB);
  while (field != NULL) {
    if (!strncmp(field, "SN:", 3))
      name = field + 3;
    else if (!strncmp(field, "LN:", 3))
      len = field + 3;
    field = strtok(NULL, TAB);
  }
  if (name == NULL || len == NULL)
    return;

  // remove trailing '\n'
  int i;
  for (i = 0; name[i] != '\n' && name[i] != '\0'; i++) ;
  name[i] = '\0';
  for (i = 0; len[i] != '\n' && len[i] != '\0'; i++) ;
  len[i] = '\0';

  // save chrom info to array (*chrom)
  saveChrom(name, (uint32_t) getInt(len), chromLen, chrom,
    xcount, xchrList, xBedLen, xBed, ctrl, verbose);
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movl %ecx, 0x2c(%rsp)
movq %rdx, %rax
movl 0x2c(%rsp), %edx
movq %rax, 0x30(%rsp)
movq %rsi, %rax
movq 0x30(%rsp), %rsi
movq %rax, 0x38(%rsp)
movq %rdi, %r10
movq 0x38(%rsp), %rdi
movb 0xb0(%rsp), %al
movb 0xa8(%rsp), %cl
movq 0xa0(%rsp), %r11
movq %r10, 0x88(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movl %edx, 0x74(%rsp)
movq %r8, 0x68(%rsp)
movl %r9d, 0x64(%rsp)
andb $0x1, %cl
movb %cl, 0x63(%rsp)
andb $0x1, %al
movb %al, 0x62(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0xbcd4(%rip), %rsi      # 0x1fd04
callq 0x2280
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x140af
movq 0x48(%rsp), %rdi
leaq 0xbcb8(%rip), %rsi      # 0x1fd06
movl $0x3, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0x1406d
movq 0x48(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x58(%rsp)
jmp 0x14098
movq 0x48(%rsp), %rdi
leaq 0xbc91(%rip), %rsi      # 0x1fd0a
movl $0x3, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0x14096
movq 0x48(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x50(%rsp)
jmp 0x14098
xorl %eax, %eax
movl %eax, %edi
leaq 0xbc61(%rip), %rsi      # 0x1fd04
callq 0x2280
movq %rax, 0x48(%rsp)
jmp 0x1403a
cmpq $0x0, 0x58(%rsp)
je 0x140bf
cmpq $0x0, 0x50(%rsp)
jne 0x140c4
jmp 0x141ee
movl $0x0, 0x44(%rsp)
movq 0x58(%rsp), %rax
movslq 0x44(%rsp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, 0x2b(%rsp)
je 0x140fd
movq 0x58(%rsp), %rax
movslq 0x44(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0x2b(%rsp)
movb 0x2b(%rsp), %al
testb $0x1, %al
jne 0x14107
jmp 0x14116
jmp 0x14109
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x140cc
movq 0x58(%rsp), %rax
movslq 0x44(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movl $0x0, 0x44(%rsp)
movq 0x50(%rsp), %rax
movslq 0x44(%rsp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, 0x2a(%rsp)
je 0x1415d
movq 0x50(%rsp), %rax
movslq 0x44(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0x2a(%rsp)
movb 0x2a(%rsp), %al
testb $0x1, %al
jne 0x14167
jmp 0x14176
jmp 0x14169
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x1412c
movq 0x50(%rsp), %rax
movslq 0x44(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
callq 0x2980
movq 0x20(%rsp), %rdi
movl %eax, %esi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
movl 0x74(%rsp), %r8d
movq 0x68(%rsp), %r9
movl 0x64(%rsp), %ebx
movq 0xa0(%rsp), %r11
movb 0x63(%rsp), %r10b
movb 0x62(%rsp), %al
andb $0x1, %r10b
andb $0x1, %al
movl %ebx, (%rsp)
movq %r11, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movzbl %al, %eax
movl %eax, 0x18(%rsp)
callq 0x13c70
addq $0x90, %rsp
popq %rbx
retq
nopw (%rax,%rax)