// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/test-parse-reg.c
// Function: reg_expected
void reg_expected(sam_hdr_t *hdr, const char *reg, int flags,
                 char *reg_exp, int tid_exp, hts_pos_t beg_exp, hts_pos_t end_exp) {
    const char *reg_out;
    int tid_out = -1;
    hts_pos_t beg_out = -1, end_out = -1;

    reg_out = sam_parse_region(hdr, reg, &tid_out, &beg_out, &end_out, flags);

    if ((reg_out != NULL) != (reg_exp != NULL) ||
        (reg_out && reg_exp && strcmp(reg_out, reg_exp) != 0) ||
        (reg_exp && tid_out != tid_exp) ||
        (reg_exp && beg_out != beg_exp) ||
        (reg_exp && end_out != end_exp)) {
        fprintf(stderr, "Parsing \"%s\" expected return \"%s\", %d:%"PRIhts_pos"-%"PRIhts_pos", "
                "but got \"%s\", %d:%"PRIhts_pos"-%"PRIhts_pos"\n",
                reg,
                reg_exp?reg_exp:"(null)", tid_exp, beg_exp, end_exp,
                reg_out?reg_out:"(null)", tid_out, beg_out, end_out);
        exit(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movq %rcx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movq %r9, -0x40(%rbp)
movl $0xffffffff, -0x4c(%rbp) # imm = 0xFFFFFFFF
movq $-0x1, -0x58(%rbp)
movq $-0x1, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %r9d
leaq -0x4c(%rbp), %rdx
leaq -0x58(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0x1ee50
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x0, -0x30(%rbp)
setne %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x5b79
cmpq $0x0, -0x48(%rbp)
je 0x5b40
cmpq $0x0, -0x30(%rbp)
je 0x5b40
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x4690
cmpl $0x0, %eax
jne 0x5b79
cmpq $0x0, -0x30(%rbp)
je 0x5b4f
movl -0x4c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x5b79
cmpq $0x0, -0x30(%rbp)
je 0x5b60
movq -0x58(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x5b79
cmpq $0x0, -0x30(%rbp)
je 0x5c5c
movq -0x60(%rbp), %rax
cmpq 0x10(%rbp), %rax
je 0x5c5c
movq 0xfe460(%rip), %rax     # 0x103fe0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x5ba0
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x5bad
leaq 0xe04a6(%rip), %rax     # 0xe604d
movq %rax, -0x78(%rbp)
jmp 0x5bad
movq -0x78(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x5be8
movq -0x48(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x5bf8
leaq 0xe045e(%rip), %rax     # 0xe604d
movq %rax, -0xa0(%rbp)
jmp 0x5bf8
movq -0x80(%rbp), %r14
movq -0x88(%rbp), %r9
movl -0x8c(%rbp), %r8d
movq -0x98(%rbp), %rcx
movq -0x68(%rbp), %rdx
movq -0x70(%rbp), %rdi
movq -0xa0(%rbp), %rbx
movl -0x4c(%rbp), %r11d
movq -0x58(%rbp), %r10
movq -0x60(%rbp), %rax
leaq 0xe03d1(%rip), %rsi     # 0xe6004
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x46d0
movl $0x1, %edi
callq 0x45c0
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax,%rax)