// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/htslib/cram/cram_decode.c
// Function: cram_get_bam_seq
int cram_get_bam_seq(cram_fd *fd, bam_seq_t **bam) {
    cram_record *cr;
    cram_container *c;
    cram_slice *s;

    if (!(cr = cram_get_seq(fd)))
	return -1;

    c = fd->ctr;
    s = c->slice;

    return cram_to_bam(fd->header, fd, s, cr, c->curr_rec-1, bam);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %rsi, %r14
movq %rdi, %r12
callq 0x6c102
testq %rax, %rax
je 0x6c6ca
movq %rax, %rbx
movq 0x18(%r12), %rdi
movq 0x38(%r12), %rcx
movq 0x80(%rcx), %r13
testb $0x1, 0x224(%r12)
jne 0x6c6d2
leaq 0x1311e(%rip), %r15     # 0x7f7e0
pushq $0x1
popq %rax
jmp 0x6c7de
pushq $-0x1
popq %rbp
jmp 0x6c9d2
movl 0x24(%rbx), %eax
testl %eax, %eax
je 0x6c6ea
movq 0x60(%r13), %rcx
movslq 0x20(%rbx), %r15
addq 0x20(%rcx), %r15
jmp 0x6c7de
movq %r14, (%rsp)
movq %rdi, 0x8(%rsp)
movslq 0x5c(%rcx), %r14
leal -0x1(%r14), %eax
movl %eax, 0x18(%rsp)
movq %r13, 0x10(%rsp)
movq 0x20(%r12), %r13
movq %r13, %rdi
callq 0x62d0
movslq %eax, %rbp
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %r13
movq %rbp, %rdx
callq 0x6570
leaq (%rsp,%rbp), %rdi
addq $0x41, %rdi
movb $0x3a, -0x1(%rdi)
movl 0x28(%rbx), %eax
movq %rax, %rsi
incq %rsi
cmpl 0x18(%rsp), %eax
cmovgeq %r14, %rsi
testl %eax, %eax
movq (%r13), %rax
cmovsq %r14, %rsi
addq 0x18(%rax), %rsi
movq %rsi, %rax
shrq $0x20, %rax
jne 0x6c76b
callq 0x6cc94
movq (%rsp), %r14
jmp 0x6c7d6
movl $0x3b9aca00, %r14d      # imm = 0x3B9ACA00
movq %rsi, %rax
xorl %edx, %edx
divq %r14
movq %rax, %rbp
movq %rdx, %r13
movabsq $0xde0b6b3e2feca00, %rax # imm = 0xDE0B6B3E2FECA00
cmpq %rax, %rsi
jb 0x6c7bb
movabsq $0xde0b6b3a7640000, %rcx # imm = 0xDE0B6B3A7640000
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
movl %eax, %esi
callq 0x6cc94
movq %rax, %rdi
movq %rbp, %rax
xorl %edx, %edx
divq %r14
movl %edx, %esi
callq 0x6ce87
jmp 0x6c7c2
movl %ebp, %esi
callq 0x6cc94
movq (%rsp), %r14
movq %rax, %rdi
movl %r13d, %esi
callq 0x6ce87
movq 0x10(%rsp), %r13
subl %r15d, %eax
movq 0x8(%rsp), %rdi
movslq 0x1c(%rbx), %rcx
pushq $-0x1
popq %rbp
cmpq $-0x1, %rcx
jl 0x6c9d2
cmpl 0x50(%rdi), %ecx
jge 0x6c9d2
cmpl $-0x1, %ecx
je 0x6c80e
movq 0x58(%rdi), %rdx
shlq $0x5, %rcx
movl 0x18(%rdx,%rcx), %ecx
addl $0x4, %ecx
jmp 0x6c810
xorl %ecx, %ecx
movl 0x224(%r12), %edx
testw $0x600, %dx             # imm = 0x600
je 0x6c839
movq 0x68(%r13), %rsi
movq 0x20(%rsi), %r10
testq %r10, %r10
je 0x6c9d2
movslq 0x4c(%rbx), %rsi
addq %rsi, %r10
jmp 0x6c847
movl $0x1, 0x14(%rbx)
leaq 0x1ce07(%rip), %r10     # 0x8964e
btl $0xa, %edx
jb 0x6c85b
movq %r14, (%rsp)
movq %rdi, 0x8(%rsp)
xorl %r12d, %r12d
jmp 0x6c87c
movq 0x70(%r13), %rdx
movq 0x20(%rdx), %r12
testq %r12, %r12
je 0x6c9d2
movq %r14, (%rsp)
movq %rdi, 0x8(%rsp)
movslq 0x50(%rbx), %rdx
addq %rdx, %r12
movslq 0x40(%rbx), %rdx
movslq %ecx, %rsi
addq %rdx, %rsi
movslq %eax, %rcx
movl 0x8(%rbx), %r9d
movl 0xc(%rbx), %r8d
movl 0x18(%rbx), %eax
movq %rax, 0x18(%rsp)
movl 0x5c(%rbx), %eax
movq %rax, 0x38(%rsp)
movl 0x60(%rbx), %eax
movq %rax, 0x30(%rsp)
movl 0x58(%rbx), %eax
movq %rax, 0x28(%rsp)
movslq 0x54(%rbx), %r11
shlq $0x2, %r11
movq %r13, 0x10(%rsp)
addq 0x30(%r13), %r11
movl 0x2c(%rbx), %eax
movq %rax, 0x20(%rsp)
movl 0x30(%rbx), %r13d
movl 0x34(%rbx), %eax
movl 0x14(%rbx), %r14d
subq $0x8, %rsp
movq 0x8(%rsp), %rdi
movq %r15, %rdx
pushq %r12
pushq %r10
pushq %r14
pushq %rax
pushq %r13
pushq 0x50(%rsp)
pushq %r11
pushq 0x68(%rsp)
pushq 0x78(%rsp)
pushq 0x88(%rsp)
pushq 0x70(%rsp)
callq 0x75598
addq $0x60, %rsp
cmpl $-0x1, %eax
je 0x6c9d2
movl %eax, %r15d
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq %rcx, %rdx
shrq $0x30, %rdx
shlq $0x2, %rdx
addq 0x28(%rax), %rdx
shrl $0x18, %ecx
movslq 0x10(%rax), %rax
leal 0x1(%rax), %esi
sarl %esi
movslq %esi, %r14
addq %rcx, %r14
addq %rax, %r14
addq %rdx, %r14
movslq 0x40(%rbx), %rdx
movq %r14, %r13
testq %rdx, %rdx
je 0x6c979
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rax
movslq 0x3c(%rbx), %rsi
addq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x6570
movslq 0x40(%rbx), %r13
addq %r14, %r13
movslq 0x1c(%rbx), %rax
cmpq $-0x1, %rax
je 0x6c9c9
movq 0x8(%rsp), %rdx
movq 0x58(%rdx), %rcx
shlq $0x5, %rax
movslq 0x18(%rcx,%rax), %r12
movw $0x4752, (%r13)         # imm = 0x4752
leaq 0x3(%r13), %rdi
movb $0x5a, 0x2(%r13)
movq 0x58(%rdx), %rax
movslq 0x1c(%rbx), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movq %r12, %rdx
callq 0x6570
addq %r12, %r13
addq $0x4, %r13
movb $0x0, -0x1(%r13)
subl %r14d, %r13d
addl %r13d, %r15d
movl %r15d, %ebp
movl %ebp, %eax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq