// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/vcf_sweep.c
// Function: bcf_sweep_bwd
bcf1_t *bcf_sweep_bwd(bcf_sweep_t *sw)
{
    if ( sw->direction==SW_FWD ) sw_seek(sw, SW_BWD);
    if ( !sw->nrec ) sw_fill_buffer(sw);
    if ( !sw->nrec ) return NULL;
    return &sw->rec[ --sw->nrec ];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
je 0x62f0
movl 0x28(%rbx), %eax
testl %eax, %eax
jne 0x64d7
jmp 0x6304
movl $0x1, 0x18(%rbx)
movl 0x5c(%rbx), %eax
movl %eax, 0x58(%rbx)
movl $0x0, 0x28(%rbx)
movslq 0x58(%rbx), %rax
testq %rax, %rax
je 0x64eb
leaq -0x1(%rax), %rcx
movl %ecx, 0x58(%rbx)
movq (%rbx), %rdi
movq 0x50(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rsi
xorl %edx, %edx
callq 0x29cca
testl %eax, %eax
jne 0x64fc
movl $0x0, 0x28(%rbx)
movq 0x20(%rbx), %r12
leaq 0x48(%rbx), %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq %r12, %rdx
callq 0xb891
testl %eax, %eax
jne 0x6434
leaq 0x20(%rbx), %r15
movl $0x1, %ebp
leaq 0xa0d64(%rip), %r13     # 0xa70cd
movq %r12, %rdi
movl $0x1, %esi
callq 0x13d9b
movl 0x58(%rbx), %eax
incl %eax
cmpl 0x5c(%rbx), %eax
jge 0x63d4
movl 0x30(%rbx), %eax
cmpl 0x10(%r12), %eax
jne 0x63d4
movslq 0x34(%rbx), %rax
cmpq %rax, (%r12)
jne 0x63d4
movl 0x38(%rbx), %eax
movzwl 0x1a(%r12), %ecx
cmpl %ecx, %eax
jne 0x63d4
movq 0x88(%r12), %rdx
movq -0x8(%rdx,%rax,8), %rcx
movq (%rdx), %rsi
movl %ecx, %eax
subl %esi, %eax
incl %eax
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
jne 0x63b5
cmpl %eax, 0x3c(%rbx)
jne 0x63d4
movq (%r14), %rdi
movslq %eax, %rdx
callq 0x44e0
testl %eax, %eax
je 0x6434
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x28(%rbx)
leal 0x2(%rcx), %edi
movslq 0x2c(%rbx), %rsi
cmpl %esi, %edi
jle 0x6410
cmpl $-0x1, %ecx
cmovll %ebp, %edi
movq %r13, (%rsp)
movl $0x4, %edx
movl $0xd0, %ecx
movl $0x1, %r8d
movq %r15, %r9
callq 0x30435
movl %eax, 0x2c(%rbx)
movl 0x28(%rbx), %eax
cltq
imulq $0xd0, %rax, %r12
addq 0x20(%rbx), %r12
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq %r12, %rdx
callq 0xb891
testl %eax, %eax
je 0x6369
movq 0x20(%rbx), %r15
movl 0x10(%r15), %eax
movl %eax, 0x30(%rbx)
movl (%r15), %eax
movl %eax, 0x34(%rbx)
movl 0x18(%r15), %eax
shrl $0x10, %eax
movl %eax, 0x38(%rbx)
movq 0x88(%r15), %rcx
movq -0x8(%rcx,%rax,8), %rax
movq (%rcx), %rsi
movl %eax, %r12d
subl %esi, %r12d
incl %r12d
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x6464
movl %r12d, 0x3c(%rbx)
movslq 0x40(%rbx), %rax
cmpl %eax, %r12d
jle 0x64c4
leal -0x1(%r12), %ecx
cmpl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl $0x1, %ecx
cmovbl %r12d, %ecx
movslq %ecx, %rdi
leaq 0xa0c41(%rip), %rcx     # 0xa70dc
movq %rcx, (%rsp)
movl $0x4, %edx
movl $0x1, %ecx
movq %rax, %rsi
xorl %r8d, %r8d
movq %r14, %r9
callq 0x30435
movl %eax, 0x40(%rbx)
movq 0x88(%r15), %rax
movq (%rax), %rsi
movq 0x48(%rbx), %rdi
movslq %r12d, %rdx
callq 0x43d0
movl 0x28(%rbx), %eax
testl %eax, %eax
je 0x64eb
decl %eax
movl %eax, 0x28(%rbx)
cltq
imulq $0xd0, %rax, %rax
addq 0x20(%rbx), %rax
jmp 0x64ed
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa0b95(%rip), %rdi     # 0xa7098
leaq 0xa0b95(%rip), %rsi     # 0xa709f
leaq 0xa0b9a(%rip), %rcx     # 0xa70ab
movl $0x5e, %edx
callq 0x42f0