// File: /workspace/github_c_makefile_star2_O0/jsh58[P]Genrich/Genrich.c
// Function: loadBAMfields
void loadBAMfields(char** block, int32_t* refID, int32_t* pos,
    uint8_t* mapq, uint16_t* n_cigar_op, uint16_t* flag,
    int32_t* l_seq, int32_t* next_refID, int32_t* next_pos,
    int32_t* tlen, char** read_name, uint32_t** cigar,
    uint8_t** seq, char** qual, char** extra) {
  *refID = loadInt32(block);
  *pos = loadInt32(block);
  uint32_t bin_mq_nl = loadInt32(block);
  int8_t l_read_name = bin_mq_nl & 0xFF;
  *mapq = (bin_mq_nl >> 8) & 0xFF;
  uint32_t flag_nc = loadInt32(block);
  *n_cigar_op = flag_nc & 0xFFFF;
  *flag = (flag_nc >> 16) & 0xFFFF;
  *l_seq = loadInt32(block);
  *next_refID = loadInt32(block);
  *next_pos = loadInt32(block);
  *tlen = loadInt32(block);
  *read_name = *block;
  (*block) += l_read_name;
  *cigar = (uint32_t*) *block;
  (*block) += *n_cigar_op * sizeof(uint32_t);
  *seq = (uint8_t*) *block;
  (*block) += (*l_seq + 1)/2 * sizeof(uint8_t);
  *qual = *block;
  (*block) += *l_seq;
  *extra = *block;
}

// Assembly:
subq $0x48, %rsp
movq 0x90(%rsp), %rax
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rax
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rax
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %r9, 0x18(%rsp)
movq 0x40(%rsp), %rdi
callq 0x16350
movl %eax, %ecx
movq 0x38(%rsp), %rax
movl %ecx, (%rax)
movq 0x40(%rsp), %rdi
callq 0x16350
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movq 0x40(%rsp), %rdi
callq 0x16350
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
andl $0xff, %eax
movb %al, 0x13(%rsp)
movl 0x14(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq 0x28(%rsp), %rax
movb %cl, (%rax)
movq 0x40(%rsp), %rdi
callq 0x16350
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, (%rax)
movl 0xc(%rsp), %eax
shrl $0x10, %eax
andl $0xffff, %eax           # imm = 0xFFFF
movw %ax, %cx
movq 0x18(%rsp), %rax
movw %cx, (%rax)
movq 0x40(%rsp), %rdi
callq 0x16350
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl %ecx, (%rax)
movq 0x40(%rsp), %rdi
callq 0x16350
movl %eax, %ecx
movq 0x58(%rsp), %rax
movl %ecx, (%rax)
movq 0x40(%rsp), %rdi
callq 0x16350
movl %eax, %ecx
movq 0x60(%rsp), %rax
movl %ecx, (%rax)
movq 0x40(%rsp), %rdi
callq 0x16350
movl %eax, %ecx
movq 0x68(%rsp), %rax
movl %ecx, (%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
movsbl 0x13(%rsp), %edx
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
movzwl (%rax), %eax
movl %eax, %ecx
shlq $0x2, %rcx
movq 0x40(%rsp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
movq 0x50(%rsp), %rax
movl (%rax), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movslq %eax, %rcx
shlq $0x0, %rcx
movq 0x40(%rsp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq 0x88(%rsp), %rax
movq %rcx, (%rax)
movq 0x50(%rsp), %rax
movl (%rax), %edx
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq 0x90(%rsp), %rax
movq %rcx, (%rax)
addq $0x48, %rsp
retq
nopl (%rax)