// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/synced_bcf_reader.c
// Function: regions_match_alleles
static int _regions_match_alleles(bcf_sr_regions_t *reg, int als_idx, bcf1_t *rec)
{
    if ( reg->regs )
    {
        // payload is not supported for in-memory regions, switch to regidx instead in future
        hts_log_error("Compressed and indexed targets file is required");
        exit(1);
    }

    int i = 0, max_len = 0;
    if ( !reg->nals )
    {
        char *ss = reg->line.s;
        while ( i<als_idx && *ss )
        {
            if ( *ss=='\t' ) i++;
            ss++;
        }
        char *se = ss;
        reg->nals = 1;
        while ( *se && *se!='\t' )
        {
            if ( *se==',' ) reg->nals++;
            se++;
        }
        ks_resize(&reg->als_str, se-ss+1+reg->nals);
        reg->als_str.l = 0;
        hts_expand(char*,reg->nals,reg->mals,reg->als);
        reg->nals = 0;

        se = ss;
        while ( *(++se) )
        {
            if ( *se=='\t' ) break;
            if ( *se!=',' ) continue;
            reg->als[reg->nals] = &reg->als_str.s[reg->als_str.l];
            kputsn(ss,se-ss,&reg->als_str);
            if ( &reg->als_str.s[reg->als_str.l] - reg->als[reg->nals] > max_len ) max_len = &reg->als_str.s[reg->als_str.l] - reg->als[reg->nals];
            reg->als_str.l++;
            reg->nals++;
            ss = ++se;
        }
        reg->als[reg->nals] = &reg->als_str.s[reg->als_str.l];
        kputsn(ss,se-ss,&reg->als_str);
        if ( &reg->als_str.s[reg->als_str.l] - reg->als[reg->nals] > max_len ) max_len = &reg->als_str.s[reg->als_str.l] - reg->als[reg->nals];
        reg->nals++;
        reg->als_type = max_len > 1 ? VCF_INDEL : VCF_SNP;  // this is a simplified check, see vcf.c:bcf_set_variant_types
    }
    int type = bcf_get_variant_types(rec);
    if ( reg->als_type & VCF_INDEL )
        return type & VCF_INDEL ? 1 : 0;
    return !(type & VCF_INDEL) ? 1 : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x3a0b5
movl $0x1, %edi
leaq 0xd8433(%rip), %rsi     # 0x1124d0
leaq 0xd8443(%rip), %rdx     # 0x1124e7
movb $0x0, %al
callq 0xa790
movl $0x1, %edi
callq 0x45d0
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x3a403
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x3d(%rbp)
jge 0x3a0fa
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
testb $0x1, %al
jne 0x3a103
jmp 0x3a126
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x3a118
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3a0dd
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x60(%rax)
movq -0x38(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x3e(%rbp)
je 0x3a15a
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x3e(%rbp)
movb -0x3e(%rbp), %al
testb $0x1, %al
jne 0x3a163
jmp 0x3a18a
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x3a17c
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x60(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3a139
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rax
movslq 0x60(%rax), %rax
addq %rax, %rsi
callq 0x3be00
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x64(%rcx), %eax
jle 0x3a229
movq -0x10(%rbp), %rax
cmpl $0x1, 0x60(%rax)
jl 0x3a1e3
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0x3a1ed
movl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3a1ed
movl -0x44(%rbp), %eax
movslq %eax, %rdi
movq -0x10(%rbp), %rax
movslq 0x64(%rax), %rsi
movq -0x10(%rbp), %r9
addq $0x40, %r9
movl $0x4, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
leaq 0xd82b9(%rip), %rax     # 0x1124d0
movq %rax, (%rsp)
callq 0x16180
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
jmp 0x3a22b
movq -0x10(%rbp), %rax
movl $0x0, 0x60(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
cmpb $0x0, 0x1(%rax)
je 0x3a342
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x3a268
jmp 0x3a342
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x3a276
jmp 0x3a23e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movq -0x10(%rbp), %rax
addq 0x48(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x60(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
movq -0x10(%rbp), %rdx
addq $0x48, %rdx
callq 0x3bd50
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x48(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq -0x10(%rbp), %rdx
movslq 0x60(%rdx), %rdx
movq (%rcx,%rdx,8), %rcx
subq %rcx, %rax
movslq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jle 0x3a310
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x48(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq -0x10(%rbp), %rdx
movslq 0x60(%rdx), %rdx
movq (%rcx,%rdx,8), %rcx
subq %rcx, %rax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x60(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq %rax, -0x30(%rbp)
jmp 0x3a23e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movq -0x10(%rbp), %rax
addq 0x48(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x60(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
movq -0x10(%rbp), %rdx
addq $0x48, %rdx
callq 0x3bd50
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x48(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq -0x10(%rbp), %rdx
movslq 0x60(%rdx), %rdx
movq (%rcx,%rdx,8), %rcx
subq %rcx, %rax
movslq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jle 0x3a3dc
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x48(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq -0x10(%rbp), %rdx
movslq 0x60(%rdx), %rdx
movq (%rcx,%rdx,8), %rcx
subq %rcx, %rax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x60(%rax)
movl -0x28(%rbp), %edx
movl $0x1, %ecx
movl $0x4, %eax
cmpl $0x1, %edx
cmovgl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x68(%rax)
movq -0x20(%rbp), %rdi
callq 0x55f10
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movl 0x68(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x3a436
movl -0x3c(%rbp), %edx
andl $0x4, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3a455
movl -0x3c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop