// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/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 0x1baca
testq %rax, %rax
je 0x1c092
movq %rax, %rbx
movq 0x18(%r12), %rdi
movq 0x38(%r12), %rcx
movq 0x80(%rcx), %r13
testb $0x1, 0x224(%r12)
jne 0x1c09a
leaq 0x27e4e(%rip), %r15     # 0x43ed8
pushq $0x1
popq %rax
jmp 0x1c1a6
pushq $-0x1
popq %rbp
jmp 0x1c397
movl 0x24(%rbx), %eax
testl %eax, %eax
je 0x1c0b2
movq 0x60(%r13), %rcx
movslq 0x20(%rbx), %r15
addq 0x20(%rcx), %r15
jmp 0x1c1a6
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 0x4210
movslq %eax, %rbp
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %r13
movq %rbp, %rdx
callq 0x4420
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 0x1c133
callq 0x1c7b0
movq (%rsp), %r14
jmp 0x1c19e
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 0x1c183
movabsq $0xde0b6b3a7640000, %rcx # imm = 0xDE0B6B3A7640000
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
movl %eax, %esi
callq 0x1c7b0
movq %rax, %rdi
movq %rbp, %rax
xorl %edx, %edx
divq %r14
movl %edx, %esi
callq 0x1c9a3
jmp 0x1c18a
movl %ebp, %esi
callq 0x1c7b0
movq (%rsp), %r14
movq %rax, %rdi
movl %r13d, %esi
callq 0x1c9a3
movq 0x10(%rsp), %r13
subl %r15d, %eax
movq 0x8(%rsp), %rdi
movslq 0x1c(%rbx), %rcx
pushq $-0x1
popq %rbp
cmpq $-0x1, %rcx
jl 0x1c397
cmpl 0x50(%rdi), %ecx
jge 0x1c397
cmpl $-0x1, %ecx
je 0x1c1d6
movq 0x58(%rdi), %rdx
shlq $0x5, %rcx
movl 0x18(%rdx,%rcx), %ecx
addl $0x4, %ecx
jmp 0x1c1d8
xorl %ecx, %ecx
movl 0x224(%r12), %edx
testw $0x600, %dx             # imm = 0x600
je 0x1c201
movq 0x68(%r13), %rsi
movq 0x20(%rsi), %r10
testq %r10, %r10
je 0x1c397
movslq 0x4c(%rbx), %rsi
addq %rsi, %r10
jmp 0x1c20c
andl $0x0, 0x14(%rbx)
leaq 0x28450(%rip), %r10     # 0x4465c
btl $0xa, %edx
jb 0x1c220
movq %r14, (%rsp)
movq %rdi, 0x8(%rsp)
xorl %r12d, %r12d
jmp 0x1c241
movq 0x70(%r13), %rdx
movq 0x20(%rdx), %r12
testq %r12, %r12
je 0x1c397
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 0x2e99c
addq $0x60, %rsp
cmpl $-0x1, %eax
je 0x1c397
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 0x1c33e
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rax
movslq 0x3c(%rbx), %rsi
addq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x4420
movslq 0x40(%rbx), %r13
addq %r14, %r13
movslq 0x1c(%rbx), %rax
cmpq $-0x1, %rax
je 0x1c38e
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 0x4420
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