// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/sam.c
// Function: check_target_names
static int check_target_names(sam_hdr_t *header, int expected_n_targets,
                              const char **expected_targets,
                              const int   *expected_lengths) {
    int i;

    // Check consistency of target_names array
    if (!header->target_name) {
        fail("target_name is NULL");
        return -1;
    }
    if (!header->target_len) {
        fail("target_len is NULL");
        return -1;
    }
    if (header->n_targets != expected_n_targets) {
        fail("header->n_targets (%d) != expected_n_targets (%d)",
             header->n_targets, expected_n_targets);
        return -1;
    }
    for (i = 0; i < expected_n_targets; i++) {
        if (!header->target_name[i]
            || strcmp(header->target_name[i], expected_targets[i]) != 0) {
            fail("header->target_name[%d] (%s) != \"%s\"",
                 i, header->target_name[i] ? header->target_name[i] : "NULL",
                 expected_targets[i]);
            return -1;
        }
        if (header->target_len[i] != expected_lengths[i]) {
            fail("header->target_len[%d] (%d) != %d",
                 i, header->target_len[i], expected_lengths[i]);
            return -1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0xda2c
leaq 0xe40de(%rip), %rdi     # 0xf1af7
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdb98
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xda51
leaq 0xe40cd(%rip), %rdi     # 0xf1b0b
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdb98
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
je 0xda7f
movq -0x10(%rbp), %rax
movl (%rax), %esi
movl -0x14(%rbp), %edx
leaq 0xe40b2(%rip), %rdi     # 0xf1b1e
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdb98
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xdb91
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xdacb
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4690
cmpl $0x0, %eax
je 0xdb31
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xdafa
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
jmp 0xdb07
leaq 0xe8141(%rip), %rax     # 0xf5c42
movq %rax, -0x38(%rbp)
jmp 0xdb07
movl -0x30(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0xe402f(%rip), %rdi     # 0xf1b50
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdb98
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
je 0xdb81
movl -0x2c(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
leaq 0xe4004(%rip), %rdi     # 0xf1b75
movb $0x0, %al
callq 0x5b50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdb98
jmp 0xdb83
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xda86
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)