// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/sam.c
// Function: test_bam_set1_minimal
static void test_bam_set1_minimal(void)
{
    int r;
    bam1_t *bam = NULL;
    bam = bam_init1();
    VERIFY(bam != NULL, "failed to initialize BAM struct.");

    r = bam_set1(bam, 0, NULL, BAM_FUNMAP, -1, 0, 0xff, 0, NULL, -1, 0, 0, 0, NULL, NULL, 0);
    // expected number of bytes written is qname: 4, cigar: 0, sequence: 0, qual: 0, aux: 0.
    VERIFY(r == 4, "call to bam_set1() failed or did not write the correct number of bytes.");

    VERIFY(bam->core.l_qname == 4, "l_qname should include terminating null and be padded to the nearest 32-bit boundary.");
    VERIFY(bam->core.l_extranul == 2, "l_extranul not set correctly");
    VERIFY(strcmp(bam_get_qname(bam), "*") == 0, "qname not set correctly.");

    VERIFY(bam->core.pos == 0, "pos not set correctly.");
    VERIFY(bam->core.tid == -1, "tid not set correctly.");
    VERIFY(bam->core.bin == hts_reg2bin(0, 1, 14, 5), "bin not set correctly.");
    VERIFY(bam->core.qual == 0xff, "mapq not set correctly.");
    VERIFY(bam->core.flag == BAM_FUNMAP, "flag not set correctly.");
    VERIFY(bam->core.n_cigar == 0, "n_cigar not set correctly.");
    VERIFY(bam->core.mtid == -1, "mtid not set correctly.");
    VERIFY(bam->core.mpos == 0, "mpos not set correctly.");
    VERIFY(bam->core.isize == 0, "isize not set correctly.");
    VERIFY(bam->core.l_qseq == 0, "l_seq not set correctly.");
    VERIFY(bam_get_l_aux(bam) == 0, "l_aux not set correctly.");

cleanup:
    if (bam != NULL) bam_destroy1(bam);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq $0x0, -0x10(%rbp)
callq 0x37e90
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xacc1
leaq 0xe8f10(%rip), %rdi     # 0xf3bb7
leaq 0xe7e5a(%rip), %rsi     # 0xf2b08
leaq 0xe7e69(%rip), %rdx     # 0xf2b1e
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r9d
movl $0x4, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq %r9, %rsi
movq %r9, %rdx
movl $0xff, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
callq 0x382b0
movl %eax, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
je 0xad61
leaq 0xe8e70(%rip), %rdi     # 0xf3bb7
leaq 0xe7dba(%rip), %rsi     # 0xf2b08
leaq 0xe7dea(%rip), %rdx     # 0xf2b3f
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
cmpl $0x4, %eax
je 0xad8f
leaq 0xe8e42(%rip), %rdi     # 0xf3bb7
leaq 0xe7d8c(%rip), %rsi     # 0xf2b08
leaq 0xe7e04(%rip), %rdx     # 0xf2b87
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %eax
cmpl $0x2, %eax
je 0xadbd
leaq 0xe8e14(%rip), %rdi     # 0xf3bb7
leaq 0xe7d5e(%rip), %rsi     # 0xf2b08
leaq 0xe7e2c(%rip), %rdx     # 0xf2bdd
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
leaq 0xece7e(%rip), %rsi     # 0xf7c4a
callq 0x4690
cmpl $0x0, %eax
je 0xadf7
leaq 0xe8dda(%rip), %rdi     # 0xf3bb7
leaq 0xe7d24(%rip), %rsi     # 0xf2b08
leaq 0xe7e0f(%rip), %rdx     # 0xf2bfa
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xae22
leaq 0xe8daf(%rip), %rdi     # 0xf3bb7
leaq 0xe7cf9(%rip), %rsi     # 0xf2b08
leaq 0xe7e78(%rip), %rdx     # 0xf2c8e
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
je 0xae4d
leaq 0xe8d84(%rip), %rdi     # 0xf3bb7
leaq 0xe7cce(%rip), %rsi     # 0xf2b08
leaq 0xe7e35(%rip), %rdx     # 0xf2c76
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %eax
movl %eax, -0x14(%rbp)
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
movl $0xe, %edx
movl $0x5, %ecx
callq 0xec30
movl %eax, %ecx
movl -0x14(%rbp), %eax
cmpl %ecx, %eax
je 0xae9a
leaq 0xe8d37(%rip), %rdi     # 0xf3bb7
leaq 0xe7c81(%rip), %rsi     # 0xf2b08
leaq 0xe7d85(%rip), %rdx     # 0xf2c13
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
movzbl 0xe(%rax), %eax
cmpl $0xff, %eax
je 0xaeca
leaq 0xe8d07(%rip), %rdi     # 0xf3bb7
leaq 0xe7c51(%rip), %rsi     # 0xf2b08
leaq 0xe7d6c(%rip), %rdx     # 0xf2c2a
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
movzwl 0x10(%rax), %eax
cmpl $0x4, %eax
je 0xaef8
leaq 0xe8cd9(%rip), %rdi     # 0xf3bb7
leaq 0xe7c23(%rip), %rsi     # 0xf2b08
leaq 0xe7d56(%rip), %rdx     # 0xf2c42
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xaf23
leaq 0xe8cae(%rip), %rdi     # 0xf3bb7
leaq 0xe7bf8(%rip), %rsi     # 0xf2b08
leaq 0xe7d43(%rip), %rdx     # 0xf2c5a
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x1c(%rax)
je 0xaf4e
leaq 0xe8c83(%rip), %rdi     # 0xf3bb7
leaq 0xe7bcd(%rip), %rsi     # 0xf2b08
leaq 0xe7d33(%rip), %rdx     # 0xf2c75
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xaf7a
leaq 0xe8c57(%rip), %rdi     # 0xf3bb7
leaq 0xe7ba1(%rip), %rsi     # 0xf2b08
leaq 0xe7d1f(%rip), %rdx     # 0xf2c8d
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xafa3
leaq 0xe8c2b(%rip), %rdi     # 0xf3bb7
leaq 0xe7b75(%rip), %rsi     # 0xf2b08
leaq 0xe7d0b(%rip), %rdx     # 0xf2ca5
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0xafcb
leaq 0xe8c03(%rip), %rdi     # 0xf3bb7
leaq 0xe7b4d(%rip), %rsi     # 0xf2b08
leaq 0xe7cfc(%rip), %rdx     # 0xf2cbe
movb $0x0, %al
callq 0x5b50
jmp 0xb022
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x14(%rcx), %ecx
shll $0x2, %ecx
subl %ecx, %eax
movq -0x10(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
subl %ecx, %eax
movq -0x10(%rbp), %rcx
subl 0x18(%rcx), %eax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
sarl %ecx
subl %ecx, %eax
cmpl $0x0, %eax
je 0xb020
leaq 0xe8bae(%rip), %rdi     # 0xf3bb7
leaq 0xe7af8(%rip), %rsi     # 0xf2b08
leaq 0xe7cc0(%rip), %rdx     # 0xf2cd7
movb $0x0, %al
callq 0x5b50
jmp 0xb022
jmp 0xb022
cmpq $0x0, -0x10(%rbp)
je 0xb032
movq -0x10(%rbp), %rdi
callq 0x380d0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)