// File: /workspace/github_cpp_makefile_star2_O1/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 0x243e4
testq %rax, %rax
je 0x24a26
movq %rax, %rbx
movq 0x18(%r12), %r8
movq 0x38(%r12), %rcx
movq 0x80(%rcx), %r13
testb $0x1, 0x224(%r12)
jne 0x24a30
leaq 0x2e44a(%rip), %r15     # 0x52e66
movl $0x1, %eax
jmp 0x24ac3
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x24cb7
movl 0x24(%rbx), %eax
testl %eax, %eax
je 0x24a45
movq 0x60(%r13), %rcx
movslq 0x20(%rbx), %r15
addq 0x20(%rcx), %r15
jmp 0x24ac3
movq %r14, 0x18(%rsp)
movslq 0x5c(%rcx), %r14
leal -0x1(%r14), %eax
movl %eax, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq 0x20(%r12), %r13
movq %r13, %rdi
movq %r8, (%rsp)
callq 0x4230
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 0x8(%rsp), %eax
cmovgeq %r14, %rsi
testl %eax, %eax
movq (%r13), %rax
cmovsq %r14, %rsi
movq 0x18(%rsp), %r14
addq 0x18(%rax), %rsi
callq 0x2537d
movq (%rsp), %r8
subl %r15d, %eax
movslq 0x1c(%rbx), %rcx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $-0x1, %rcx
jl 0x24cb7
cmpl 0x50(%r8), %ecx
jge 0x24cb7
cmpl $-0x1, %ecx
je 0x24af6
movq 0x58(%r8), %rdx
shlq $0x5, %rcx
movl 0x18(%rdx,%rcx), %ecx
addl $0x4, %ecx
jmp 0x24af8
xorl %ecx, %ecx
movl 0x224(%r12), %edx
testl $0x600, %edx            # imm = 0x600
je 0x24b22
movq 0x68(%r13), %rsi
movq 0x20(%rsi), %r10
testq %r10, %r10
je 0x24cb7
movslq 0x4c(%rbx), %rsi
addq %rsi, %r10
jmp 0x24b30
movl $0x0, 0x14(%rbx)
leaq 0x2eb99(%rip), %r10     # 0x536c9
btl $0xa, %edx
jb 0x24b42
movq %r14, %rdi
movq %r8, (%rsp)
xorl %r12d, %r12d
jmp 0x24b61
movq 0x70(%r13), %rdx
movq 0x20(%rdx), %r12
testq %r12, %r12
je 0x24cb7
movq %r14, %rdi
movq %r8, (%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, 0x8(%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 %rdi, 0x20(%rsp)
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 0x60(%rsp)
callq 0x3a280
addq $0x60, %rsp
cmpl $-0x1, %eax
je 0x24cb7
movl %eax, %r15d
movq 0x18(%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 0x24c5f
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 0x24cae
movq (%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