// File: /workspace/github_cpp_makefile_star2_O3/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 0x23983
testq %rax, %rax
je 0x23f57
movq %rax, %rbx
movq 0x18(%r12), %r8
movq 0x38(%r12), %rax
movq 0x80(%rax), %r15
testb $0x1, 0x224(%r12)
jne 0x23f61
leaq 0x2cf4d(%rip), %r9      # 0x50e9a
movl $0x1, %ecx
jmp 0x2423a
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x2443c
movl 0x24(%rbx), %ecx
testl %ecx, %ecx
je 0x23f79
movq 0x60(%r15), %rax
movslq 0x20(%rbx), %r9
addq 0x20(%rax), %r9
jmp 0x2423a
movq %r14, (%rsp)
movq %r8, 0x8(%rsp)
movslq 0x5c(%rax), %r14
movq %r15, 0x10(%rsp)
leal -0x1(%r14), %r15d
movq 0x20(%r12), %r13
movq %r13, %rdi
callq 0x4230
movslq %eax, %rbp
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
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 %r15d, %eax
movq 0x10(%rsp), %r15
cmovgeq %r14, %rsi
testl %eax, %eax
movq (%r15), %rax
cmovsq %r14, %rsi
addq 0x18(%rax), %rsi
movq %rsi, %rax
shrq $0x20, %rax
jne 0x23ffc
callq 0x2487c
movq %rax, %rcx
movq 0x8(%rsp), %r8
movq (%rsp), %r14
jmp 0x24232
movq %rsi, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rcx # imm = 0x44B82FA09B5A53
mulq %rcx
movq %rdx, %r13
shrq $0xb, %r13
imulq $0x3b9aca00, %r13, %rax # imm = 0x3B9ACA00
movq %rsi, %rbp
subq %rax, %rbp
movabsq $0xde0b6b3e2feca00, %rax # imm = 0xDE0B6B3E2FECA00
cmpq %rax, %rsi
jb 0x2414d
shrq $0x12, %rsi
movabsq $0x49c97747490f, %rcx   # imm = 0x49C97747490F
movq %rsi, %rax
mulq %rcx
shrl $0x18, %edx
movl %edx, %esi
callq 0x2487c
movq %rax, %rcx
movabsq $0x44b82fa0a, %rdx      # imm = 0x44B82FA0A
movq %r13, %rax
mulq %rdx
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %r13
imulq $0x2af31dc5, %r13, %rax # imm = 0x2AF31DC5
shrq $0x38, %rax
imull $0x5f5e100, %eax, %edx  # imm = 0x5F5E100
orb $0x30, %al
movb %al, (%rcx)
subl %edx, %r13d
imulq $0x6b5fca7, %r13, %rax  # imm = 0x6B5FCA7
shrq $0x32, %rax
imull $0x989680, %eax, %edx   # imm = 0x989680
orb $0x30, %al
movb %al, 0x1(%rcx)
subl %edx, %r13d
imulq $0x10c6f7b, %r13, %rax  # imm = 0x10C6F7B
shrq $0x2c, %rax
leal 0x30(%rax), %edx
movb %dl, 0x2(%rcx)
imull $0xf4240, %eax, %eax    # imm = 0xF4240
subl %eax, %r13d
imulq $0xa7c5b, %r13, %rax    # imm = 0xA7C5B
shrq $0x24, %rax
imull $0x186a0, %eax, %edx    # imm = 0x186A0
orb $0x30, %al
movb %al, 0x3(%rcx)
subl %edx, %r13d
imulq $0x68db9, %r13, %rax    # imm = 0x68DB9
shrq $0x20, %rax
imull $0x2710, %eax, %edx     # imm = 0x2710
orb $0x30, %al
movb %al, 0x4(%rcx)
subl %edx, %r13d
imull $0x20c5, %r13d, %eax    # imm = 0x20C5
shrl $0x17, %eax
leal 0x30(%rax), %edx
movb %dl, 0x5(%rcx)
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %r13d
movl $0xffff, %eax           # imm = 0xFFFF
movl %r13d, %edx
andl %eax, %edx
imull $0x290, %edx, %edx      # imm = 0x290
shrl $0x10, %edx
imull $0x64, %edx, %esi
orb $0x30, %dl
movb %dl, 0x6(%rcx)
subl %esi, %r13d
imull $0x67, %r13d, %edx
andl %eax, %edx
shrl $0xa, %edx
movl %edx, %eax
orb $0x30, %al
movb %al, 0x7(%rcx)
addl %edx, %edx
leal (%rdx,%rdx,4), %eax
subb %al, %r13b
orb $0x30, %r13b
movb %r13b, 0x8(%rcx)
addq $0x9, %rcx
jmp 0x24158
movl %r13d, %esi
callq 0x2487c
movq %rax, %rcx
movq (%rsp), %r14
movl %ebp, %eax
imulq $0x55e63b89, %rax, %rax # imm = 0x55E63B89
shrq $0x39, %rax
imull $0x5f5e100, %eax, %edx  # imm = 0x5F5E100
orb $0x30, %al
movb %al, (%rcx)
subl %edx, %ebp
imulq $0x6b5fca7, %rbp, %rax  # imm = 0x6B5FCA7
shrq $0x32, %rax
imull $0x989680, %eax, %edx   # imm = 0x989680
orb $0x30, %al
movb %al, 0x1(%rcx)
subl %edx, %ebp
imulq $0x10c6f7b, %rbp, %rax  # imm = 0x10C6F7B
shrq $0x2c, %rax
leal 0x30(%rax), %edx
movb %dl, 0x2(%rcx)
imull $0xf4240, %eax, %eax    # imm = 0xF4240
subl %eax, %ebp
imulq $0xa7c5b, %rbp, %rax    # imm = 0xA7C5B
shrq $0x24, %rax
imull $0x186a0, %eax, %edx    # imm = 0x186A0
orb $0x30, %al
movb %al, 0x3(%rcx)
subl %edx, %ebp
imulq $0x68db9, %rbp, %rax    # imm = 0x68DB9
shrq $0x20, %rax
imull $0x2710, %eax, %edx     # imm = 0x2710
orb $0x30, %al
movb %al, 0x4(%rcx)
subl %edx, %ebp
imull $0x20c5, %ebp, %eax     # imm = 0x20C5
shrl $0x17, %eax
leal 0x30(%rax), %edx
movb %dl, 0x5(%rcx)
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %ebp
movl $0xffff, %eax           # imm = 0xFFFF
movl %ebp, %edx
andl %eax, %edx
imull $0x290, %edx, %edx      # imm = 0x290
shrl $0x10, %edx
imull $0x64, %edx, %esi
orb $0x30, %dl
movb %dl, 0x6(%rcx)
subl %esi, %ebp
imull $0x67, %ebp, %edx
andl %eax, %edx
shrl $0xa, %edx
movl %edx, %eax
orb $0x30, %al
movb %al, 0x7(%rcx)
addl %edx, %edx
leal (%rdx,%rdx,4), %eax
subb %al, %bpl
orb $0x30, %bpl
movb %bpl, 0x8(%rcx)
addq $0x9, %rcx
movq 0x8(%rsp), %r8
leaq 0x40(%rsp), %r9
subl %r9d, %ecx
movslq 0x1c(%rbx), %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $-0x1, %rax
jl 0x2443c
cmpl 0x50(%r8), %eax
jge 0x2443c
cmpl $-0x1, %eax
je 0x2426d
movq 0x58(%r8), %rdx
shlq $0x5, %rax
movl 0x18(%rdx,%rax), %edx
addl $0x4, %edx
jmp 0x2426f
xorl %edx, %edx
movl 0x224(%r12), %esi
testl $0x600, %esi            # imm = 0x600
je 0x24299
movq 0x68(%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x2443c
movslq 0x4c(%rbx), %rdi
addq %rdi, %rax
jmp 0x242a7
movl $0x0, 0x14(%rbx)
leaq 0x2d44a(%rip), %rax     # 0x516f1
btl $0xa, %esi
jb 0x242c0
movq %r9, 0x18(%rsp)
movq %r14, (%rsp)
movq %r8, 0x8(%rsp)
xorl %r12d, %r12d
jmp 0x242e6
movq 0x70(%r15), %rsi
movq 0x20(%rsi), %r12
testq %r12, %r12
je 0x2443c
movq %r9, 0x18(%rsp)
movq %r14, (%rsp)
movq %r8, 0x8(%rsp)
movslq 0x50(%rbx), %rsi
addq %rsi, %r12
movslq 0x40(%rbx), %rdi
movslq %edx, %rsi
addq %rdi, %rsi
movslq %ecx, %rcx
movl 0x8(%rbx), %r9d
movl 0xc(%rbx), %r8d
movl 0x18(%rbx), %edx
movq %rdx, 0x38(%rsp)
movl 0x5c(%rbx), %edx
movq %rdx, 0x30(%rsp)
movl 0x60(%rbx), %edx
movq %rdx, 0x28(%rsp)
movl 0x58(%rbx), %edx
movq %rdx, 0x20(%rsp)
movslq 0x54(%rbx), %r10
shlq $0x2, %r10
movq %r15, 0x10(%rsp)
addq 0x30(%r15), %r10
movl 0x2c(%rbx), %r15d
movl 0x30(%rbx), %r11d
movl 0x34(%rbx), %r13d
movl 0x14(%rbx), %r14d
subq $0x8, %rsp
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rdx
pushq %r12
pushq %rax
pushq %r14
pushq %r13
pushq %r11
pushq %r15
pushq %r10
pushq 0x60(%rsp)
pushq 0x70(%rsp)
pushq 0x80(%rsp)
pushq 0x90(%rsp)
callq 0x395f8
addq $0x60, %rsp
cmpl $-0x1, %eax
je 0x2443c
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 0x243e3
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 0x24433
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