// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/sam.c
// Function: test_update_array
static int test_update_array(bam1_t *aln, const char target_id[2],
                             uint8_t type, uint32_t nitems, void *data,
                             const char next_id[2], int64_t next_val,
                             char next_type)
{
    uint8_t *p;

    // Try updating target
    if (bam_aux_update_array(aln, target_id, type, nitems, data) < 0) {
        fail("update %2.s tag", target_id);
        return -1;
    }

    // Check values
    p = bam_aux_get(aln, target_id);
    if (!p) {
        fail("find  %.2s tag", target_id);
        return -1;
    }
    switch (type) {
        case 'c':
            CHECK_ARRAY_VALS(int8_t, bam_auxB2i, PRId64, PRId8); break;
        case 'C':
            CHECK_ARRAY_VALS(uint8_t, bam_auxB2i, PRId64, PRIu8); break;
        case 's':
            CHECK_ARRAY_VALS(int16_t, bam_auxB2i, PRId64, PRId16); break;
        case 'S':
            CHECK_ARRAY_VALS(uint16_t, bam_auxB2i, PRId64, PRIu16); break;
        case 'i':
            CHECK_ARRAY_VALS(int32_t, bam_auxB2i, PRId64, PRId32); break;
        case 'I':
            CHECK_ARRAY_VALS(uint32_t, bam_auxB2i, PRId64, PRIu32); break;
        case 'f':
            CHECK_ARRAY_VALS(float, bam_auxB2f, "e", "e"); break;
    }

    // If given, check that the next tag hasn't been clobbered by the
    // update above.
    if (!*next_id) return 0;
    p = bam_aux_get(aln, next_id);
    if (!p) {
        fail("find  %.2s tag after updating %.2s", next_id, target_id);
        return -1;
    }
    if (*p != next_type || bam_aux2i(p) != next_val) {
        fail("after updating %.2s:"
             " %.2s field is %c:%"PRId64"; expected %c:%"PRId64,
             target_id, next_id, *p, bam_aux2i(p), next_type, next_val);
        return -1;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r13
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
leaq 0x89e8a(%rip), %rsi     # 0x957ea
movl %r15d, %edx
movl %ebp, %ecx
movq %r14, %r8
callq 0x33bb7
testl %eax, %eax
js 0xbb68
movq %r13, 0x10(%rsp)
leaq 0x89e69(%rip), %rsi     # 0x957ea
movq %r12, %rdi
callq 0x313f1
testq %rax, %rax
je 0xbb71
movq %rax, %r13
movzbl %r15b, %eax
cmpl $0x65, %eax
jg 0xb9eb
cmpl $0x49, %eax
je 0xba34
cmpl $0x53, %eax
je 0xba9f
cmpl $0x63, %eax
jne 0xbaf2
testl %ebp, %ebp
je 0xbaf2
movl %ebp, %r15d
xorl %ebp, %ebp
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movsbq (%r14,%rbp), %rcx
cmpq %rcx, %rax
jne 0xbbeb
incq %rbp
cmpq %rbp, %r15
jne 0xb9c6
jmp 0xbaf2
cmpl $0x66, %eax
je 0xba65
cmpl $0x69, %eax
je 0xbaca
cmpl $0x73, %eax
jne 0xbaf2
testl %ebp, %ebp
je 0xbaf2
movl %ebp, %r15d
xorl %ebp, %ebp
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movswq (%r14,%rbp,2), %rcx
cmpq %rcx, %rax
jne 0xbbfc
incq %rbp
cmpq %rbp, %r15
jne 0xba0f
jmp 0xbaf2
testl %ebp, %ebp
je 0xbaf2
movl %ebp, %r15d
xorl %ebp, %ebp
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movl (%r14,%rbp,4), %ecx
cmpq %rcx, %rax
jne 0xbba8
incq %rbp
cmpq %rbp, %r15
jne 0xba41
jmp 0xbaf2
testl %ebp, %ebp
je 0xbaf2
movl %ebp, %r15d
xorl %ebp, %ebp
movq %r13, %rdi
movl %ebp, %esi
callq 0x33fc7
xorps %xmm1, %xmm1
cvtss2sd (%r14,%rbp,4), %xmm1
ucomisd %xmm1, %xmm0
jne 0xbbb8
jp 0xbbb8
incq %rbp
cmpq %rbp, %r15
jne 0xba72
jmp 0xbaf2
testl %ebp, %ebp
je 0xbaf2
movl %ebp, %r15d
xorl %ebp, %ebp
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movzwl (%r14,%rbp,2), %ecx
cmpq %rcx, %rax
jne 0xbc0d
incq %rbp
cmpq %rbp, %r15
jne 0xbaa8
jmp 0xbaf2
testl %ebp, %ebp
je 0xbaf2
movl %ebp, %r15d
xorl %ebp, %ebp
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movslq (%r14,%rbp,4), %rcx
cmpq %rcx, %rax
jne 0xbc25
incq %rbp
cmpq %rbp, %r15
jne 0xbad3
xorl %ebp, %ebp
cmpb $0x0, (%rbx)
je 0xbc59
movq %r12, %rdi
movq %rbx, %rsi
callq 0x313f1
testq %rax, %rax
je 0xbb8b
movq %rax, %r14
movb 0x50(%rsp), %r15b
movb (%rax), %al
cmpb %r15b, %al
movq 0x10(%rsp), %r12
jne 0xbb35
movq %r14, %rdi
callq 0x33dff
cmpq %r12, %rax
je 0xbc59
movb (%r14), %al
movzbl %r15b, %ebp
movzbl %al, %r15d
movq %r14, %rdi
callq 0x33dff
movq %r12, (%rsp)
leaq 0x8a08d(%rip), %rdi     # 0x95bdd
leaq 0x89c93(%rip), %rsi     # 0x957ea
movq %rbx, %rdx
movl %r15d, %ecx
movq %rax, %r8
movl %ebp, %r9d
jmp 0xbc4d
leaq 0x89f86(%rip), %rdi     # 0x95af5
jmp 0xbb78
leaq 0x89f09(%rip), %rdi     # 0x95a81
leaq 0x89c6b(%rip), %rsi     # 0x957ea
xorl %eax, %eax
callq 0x49e0
jmp 0xbc54
leaq 0x89efe(%rip), %rdi     # 0x95a90
leaq 0x89c51(%rip), %rdx     # 0x957ea
movq %rbx, %rsi
xorl %eax, %eax
callq 0x49e0
jmp 0xbc54
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movl (%r14,%rbp,4), %r9d
jmp 0xbc1c
movq %r13, %rdi
movl %ebp, %esi
callq 0x33fc7
xorps %xmm1, %xmm1
cvtss2sd (%r14,%rbp,4), %xmm1
leaq 0x89fc0(%rip), %rdi     # 0x95b92
leaq 0x89ff9(%rip), %rsi     # 0x95bd2
leaq 0x89c0a(%rip), %rdx     # 0x957ea
movl %ebp, %ecx
movb $0x2, %al
callq 0x49e0
jmp 0xbc54
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movsbl (%r14,%rbp), %r9d
jmp 0xbc33
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movswl (%r14,%rbp,2), %r9d
jmp 0xbc33
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movzwl (%r14,%rbp,2), %r9d
leaq 0x89f2e(%rip), %rdi     # 0x95b51
jmp 0xbc3a
movq %r13, %rdi
movl %ebp, %esi
callq 0x33f33
movl (%r14,%rbp,4), %r9d
leaq 0x89ecb(%rip), %rdi     # 0x95b05
leaq 0x89f05(%rip), %rsi     # 0x95b46
leaq 0x89ba2(%rip), %rdx     # 0x957ea
movl %ebp, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x49e0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq