// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/sam.c
// Function: test_bam_set1_even_and_odd_seq_len
static void test_bam_set1_even_and_odd_seq_len(void)
{
    const char *seq_even = "TGGACTACGA";
    const char *seq_odd  = "TGGACTACGAC";

    int r, i;
    bam1_t *bam = NULL;
    bam = bam_init1();
    VERIFY(bam != NULL, "failed to initialize BAM struct.");

    r = bam_set1(bam, 0, NULL, BAM_FUNMAP, 0, 0, 0, 0, NULL, 0, 0, 0,
                 strlen(seq_even), seq_even, NULL, 0);
    VERIFY(r >= 0, "call to bam_set1() failed.");
    VERIFY(bam->core.l_qseq == strlen(seq_even), "l_seq not set correctly.");
    for (i = 0; i < strlen(seq_even); i++) {
        VERIFY(bam_seqi(bam_get_seq(bam), i) == seq_nt16_table[(uint8_t)seq_even[i]], "seq not set correctly.");
    }

    r = bam_set1(bam, 0, NULL, BAM_FUNMAP, 0, 0, 0, 0, NULL, 0, 0, 0,
                 strlen(seq_odd), seq_odd, NULL, 0);
    VERIFY(r >= 0, "call to bam_set1() failed.");
    VERIFY(bam->core.l_qseq == strlen(seq_odd), "l_seq not set correctly.");
    for (i = 0; i < strlen(seq_odd); i++) {
        VERIFY(bam_seqi(bam_get_seq(bam), i) == seq_nt16_table[(uint8_t)seq_odd[i]], "seq not set correctly.");
    }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq 0xe76a9(%rip), %rax     # 0xf2cfb
movq %rax, -0x8(%rbp)
leaq 0xe7709(%rip), %rax     # 0xf2d66
movq %rax, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
callq 0x37e90
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xb69a
leaq 0xe8537(%rip), %rdi     # 0xf3bb7
leaq 0xe76eb(%rip), %rsi     # 0xf2d72
leaq 0xe7490(%rip), %rdx     # 0xf2b1e
movb $0x0, %al
callq 0x5b50
jmp 0xb9e7
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x41a0
movq -0x28(%rbp), %rdi
movq %rax, %r10
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %r9d
movl $0x4, %ecx
xorl %r8d, %r8d
movq %r9, %rsi
movq %r9, %rdx
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
callq 0x382b0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0xb747
leaq 0xe848a(%rip), %rdi     # 0xf3bb7
leaq 0xe763e(%rip), %rsi     # 0xf2d72
leaq 0xe765a(%rip), %rdx     # 0xf2d95
movb $0x0, %al
callq 0x5b50
jmp 0xb9e7
movq -0x20(%rbp), %rax
movslq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x41a0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
je 0xb789
leaq 0xe8448(%rip), %rdi     # 0xf3bb7
leaq 0xe75fc(%rip), %rsi     # 0xf2d72
leaq 0xe7541(%rip), %rdx     # 0xf2cbe
movb $0x0, %al
callq 0x5b50
jmp 0xb9e7
movl $0x0, -0x18(%rbp)
movslq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x41a0
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0xb841
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x14(%rcx), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movl -0x18(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x18(%rbp), %ecx
xorl $-0x1, %ecx
andl $0x1, %ecx
shll $0x2, %ecx
sarl %cl, %eax
andl $0xf, %eax
movq -0x8(%rbp), %rcx
movslq -0x18(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
leaq 0xe94d8(%rip), %rcx     # 0xf4ce0
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0xb831
leaq 0xe83a0(%rip), %rdi     # 0xf3bb7
leaq 0xe7554(%rip), %rsi     # 0xf2d72
leaq 0xe749b(%rip), %rdx     # 0xf2cc0
movb $0x0, %al
callq 0x5b50
jmp 0xb9e7
jmp 0xb833
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xb790
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x41a0
movq -0x40(%rbp), %rdi
movq %rax, %r10
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %r9d
movl $0x4, %ecx
xorl %r8d, %r8d
movq %r9, %rsi
movq %r9, %rdx
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
callq 0x382b0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0xb8ee
leaq 0xe82e3(%rip), %rdi     # 0xf3bb7
leaq 0xe7497(%rip), %rsi     # 0xf2d72
leaq 0xe74b3(%rip), %rdx     # 0xf2d95
movb $0x0, %al
callq 0x5b50
jmp 0xb9e7
movq -0x20(%rbp), %rax
movslq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x41a0
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
je 0xb930
leaq 0xe82a1(%rip), %rdi     # 0xf3bb7
leaq 0xe7455(%rip), %rsi     # 0xf2d72
leaq 0xe739a(%rip), %rdx     # 0xf2cbe
movb $0x0, %al
callq 0x5b50
jmp 0xb9e7
movl $0x0, -0x18(%rbp)
movslq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x41a0
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jae 0xb9e5
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x14(%rcx), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movl -0x18(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x18(%rbp), %ecx
xorl $-0x1, %ecx
andl $0x1, %ecx
shll $0x2, %ecx
sarl %cl, %eax
andl $0xf, %eax
movq -0x10(%rbp), %rcx
movslq -0x18(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movl %ecx, %edx
leaq 0xe9331(%rip), %rcx     # 0xf4ce0
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0xb9d5
leaq 0xe81f9(%rip), %rdi     # 0xf3bb7
leaq 0xe73ad(%rip), %rsi     # 0xf2d72
leaq 0xe72f4(%rip), %rdx     # 0xf2cc0
movb $0x0, %al
callq 0x5b50
jmp 0xb9e7
jmp 0xb9d7
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xb937
jmp 0xb9e7
cmpq $0x0, -0x20(%rbp)
je 0xb9f7
movq -0x20(%rbp), %rdi
callq 0x380d0
addq $0xa0, %rsp
popq %rbp
retq