// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movb %dl, %al
movb 0x18(%rbp), %dl
movq 0x10(%rbp), %rdx
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movb -0x19(%rbp), %al
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %r8
movzbl %al, %edx
callq 0x46740
cmpl $0x0, %eax
jge 0xd127
movq -0x18(%rbp), %rsi
leaq 0xe42b1(%rip), %rdi     # 0xf13c5
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43840
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xd15d
movq -0x18(%rbp), %rsi
leaq 0xe4207(%rip), %rdi     # 0xf1351
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
movzbl -0x19(%rbp), %eax
addl $-0x43, %eax
movl %eax, %ecx
movq %rcx, -0xb0(%rbp)
subl $0x30, %eax
ja 0xd6b2
movq -0xb0(%rbp), %rax
leaq 0xe1edc(%rip), %rcx     # 0xef060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xd18f
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0xd234
movq -0x38(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x46db0
movq -0x40(%rbp), %rcx
movl -0x44(%rbp), %edx
movsbq (%rcx,%rdx), %rcx
cmpq %rcx, %rax
je 0xd224
movq -0x18(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0x38(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x46db0
movq -0xc0(%rbp), %rdx
movl -0xb4(%rbp), %ecx
movq %rax, %r8
movq -0x40(%rbp), %rax
movl -0x44(%rbp), %esi
movsbl (%rax,%rsi), %r9d
leaq 0xe41cb(%rip), %rdi     # 0xf13d5
leaq 0xe4205(%rip), %rsi     # 0xf1416
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
jmp 0xd226
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xd19e
jmp 0xd236
jmp 0xd6b2
jmp 0xd23d
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0xd2e1
movq -0x38(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x46db0
movq -0x50(%rbp), %rcx
movl -0x54(%rbp), %edx
movzbl (%rcx,%rdx), %ecx
cmpq %rcx, %rax
je 0xd2d1
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0xc4(%rbp)
movq -0x38(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x46db0
movq -0xd0(%rbp), %rdx
movl -0xc4(%rbp), %ecx
movq %rax, %r8
movq -0x50(%rbp), %rax
movl -0x54(%rbp), %esi
movzbl (%rax,%rsi), %r9d
leaq 0xe416a(%rip), %rdi     # 0xf1421
leaq 0xe4158(%rip), %rsi     # 0xf1416
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
jmp 0xd2d3
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xd24c
jmp 0xd2e3
jmp 0xd6b2
jmp 0xd2ea
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0xd38f
movq -0x38(%rbp), %rdi
movl -0x64(%rbp), %esi
callq 0x46db0
movq -0x60(%rbp), %rcx
movl -0x64(%rbp), %edx
movswq (%rcx,%rdx,2), %rcx
cmpq %rcx, %rax
je 0xd37f
movq -0x18(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0xd4(%rbp)
movq -0x38(%rbp), %rdi
movl -0x64(%rbp), %esi
callq 0x46db0
movq -0xe0(%rbp), %rdx
movl -0xd4(%rbp), %ecx
movq %rax, %r8
movq -0x60(%rbp), %rax
movl -0x64(%rbp), %esi
movswl (%rax,%rsi,2), %r9d
leaq 0xe4070(%rip), %rdi     # 0xf13d5
leaq 0xe40aa(%rip), %rsi     # 0xf1416
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
jmp 0xd381
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xd2f9
jmp 0xd391
jmp 0xd6b2
jmp 0xd398
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0xd43c
movq -0x38(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0x46db0
movq -0x70(%rbp), %rcx
movl -0x74(%rbp), %edx
movzwl (%rcx,%rdx,2), %ecx
cmpq %rcx, %rax
je 0xd42c
movq -0x18(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0xe4(%rbp)
movq -0x38(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0x46db0
movq -0xf0(%rbp), %rdx
movl -0xe4(%rbp), %ecx
movq %rax, %r8
movq -0x70(%rbp), %rax
movl -0x74(%rbp), %esi
movzwl (%rax,%rsi,2), %r9d
leaq 0xe400f(%rip), %rdi     # 0xf1421
leaq 0xe3ffd(%rip), %rsi     # 0xf1416
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
jmp 0xd42e
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0xd3a7
jmp 0xd43e
jmp 0xd6b2
jmp 0xd445
movq -0x28(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0xd503
movq -0x38(%rbp), %rdi
movl -0x84(%rbp), %esi
callq 0x46db0
movq -0x80(%rbp), %rcx
movl -0x84(%rbp), %edx
movslq (%rcx,%rdx,4), %rcx
cmpq %rcx, %rax
je 0xd4ed
movq -0x18(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0xf4(%rbp)
movq -0x38(%rbp), %rdi
movl -0x84(%rbp), %esi
callq 0x46db0
movq -0x100(%rbp), %rdx
movl -0xf4(%rbp), %ecx
movq %rax, %r8
movq -0x80(%rbp), %rax
movl -0x84(%rbp), %esi
movl (%rax,%rsi,4), %r9d
leaq 0xe3f02(%rip), %rdi     # 0xf13d5
leaq 0xe3f3c(%rip), %rsi     # 0xf1416
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
jmp 0xd4ef
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0xd457
jmp 0xd505
jmp 0xd6b2
jmp 0xd50c
movq -0x28(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0xd5d2
movq -0x38(%rbp), %rdi
movl -0x94(%rbp), %esi
callq 0x46db0
movq -0x90(%rbp), %rcx
movl -0x94(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
cmpq %rcx, %rax
je 0xd5bc
movq -0x18(%rbp), %rax
movq %rax, -0x110(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0x104(%rbp)
movq -0x38(%rbp), %rdi
movl -0x94(%rbp), %esi
callq 0x46db0
movq -0x110(%rbp), %rdx
movl -0x104(%rbp), %ecx
movq %rax, %r8
movq -0x90(%rbp), %rax
movl -0x94(%rbp), %esi
movl (%rax,%rsi,4), %r9d
leaq 0xe3e7f(%rip), %rdi     # 0xf1421
leaq 0xe3e6d(%rip), %rsi     # 0xf1416
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
jmp 0xd5be
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0xd521
jmp 0xd5d4
jmp 0xd6b2
jmp 0xd5db
movq -0x28(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0xd6ae
movq -0x38(%rbp), %rdi
movl -0xa4(%rbp), %esi
callq 0x46e10
movq -0xa0(%rbp), %rax
movl -0xa4(%rbp), %ecx
movss (%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd62e
jp 0xd62e
jmp 0xd698
movq -0x18(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0x114(%rbp)
movq -0x38(%rbp), %rdi
movl -0xa4(%rbp), %esi
callq 0x46e10
movq -0x120(%rbp), %rdx
movl -0x114(%rbp), %ecx
movq -0xa0(%rbp), %rax
movl -0xa4(%rbp), %esi
movss (%rax,%rsi,4), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0xe3de4(%rip), %rdi     # 0xf1462
leaq 0xe3e1d(%rip), %rsi     # 0xf14a2
movb $0x2, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
jmp 0xd69a
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0xd5f0
jmp 0xd6b0
jmp 0xd6b2
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
jne 0xd6c7
movl $0x0, -0x4(%rbp)
jmp 0xd78d
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x43840
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xd701
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0xe3c72(%rip), %rdi     # 0xf1360
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
movsbl 0x18(%rbp), %ecx
cmpl %ecx, %eax
jne 0xd71f
movq -0x38(%rbp), %rdi
callq 0x46a90
cmpq 0x10(%rbp), %rax
je 0xd786
movq -0x18(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x124(%rbp)
movq -0x38(%rbp), %rdi
callq 0x46a90
movq -0x138(%rbp), %rsi
movq -0x130(%rbp), %rdx
movl -0x124(%rbp), %ecx
movq %rax, %r8
movsbl 0x18(%rbp), %r9d
movq 0x10(%rbp), %rax
leaq 0xe3d3b(%rip), %rdi     # 0xf14ad
movq %rax, (%rsp)
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd78d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax)