// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/hts_expr.c
// Function: cmp_expr
static int cmp_expr(hts_filter_t *filt, void *data, hts_expr_sym_func *fn,
                    char *str, char **end, hts_expr_val_t *res) {
    if (bitor_expr(filt, data, fn, str, end, res)) return -1;

    str = ws(*end);
    hts_expr_val_t val = HTS_EXPR_VAL_INIT;
    int err = 0, cmp_done = 0;

    if (*str == '>' && str[1] == '=') {
        cmp_done = 1;
        err = cmp_expr(filt, data, fn, str+2, end, &val);
        if (!hts_expr_val_exists(res) || !hts_expr_val_exists(&val)) {
            hts_expr_val_undef(res);
        } else {
            res->is_true=res->d
                = res->is_str && res->s.s && val.is_str && val.s.s
                ? strcmp(res->s.s, val.s.s) >= 0
                : !res->is_str && !val.is_str && res->d >= val.d;
            res->is_str = 0;
        }
    } else if (*str == '>') {
        cmp_done = 1;
        err = cmp_expr(filt, data, fn, str+1, end, &val);
        if (!hts_expr_val_exists(res) || !hts_expr_val_exists(&val)) {
            hts_expr_val_undef(res);
        } else {
            res->is_true=res->d
                = res->is_str && res->s.s && val.is_str && val.s.s
                ? strcmp(res->s.s, val.s.s) > 0
                : !res->is_str && !val.is_str && res->d > val.d;
            res->is_str = 0;
        }
    } else if (*str == '<' && str[1] == '=') {
        cmp_done = 1;
        err = cmp_expr(filt, data, fn, str+2, end, &val);
        if (!hts_expr_val_exists(res) || !hts_expr_val_exists(&val)) {
            hts_expr_val_undef(res);
        } else {
            res->is_true=res->d
                = res->is_str && res->s.s && val.is_str && val.s.s
                ? strcmp(res->s.s, val.s.s) <= 0
                : !res->is_str && !val.is_str && res->d <= val.d;
            res->is_str = 0;
        }
    } else if (*str == '<') {
        cmp_done = 1;
        err = cmp_expr(filt, data, fn, str+1, end, &val);
        if (!hts_expr_val_exists(res) || !hts_expr_val_exists(&val)) {
            hts_expr_val_undef(res);
        } else {
            res->is_true=res->d
                = res->is_str && res->s.s && val.is_str && val.s.s
                ? strcmp(res->s.s, val.s.s) < 0
                : !res->is_str && !val.is_str && res->d < val.d;
            res->is_str = 0;
        }
    }

    if (cmp_done && (!hts_expr_val_exists(&val) || !hts_expr_val_exists(res)))
        hts_expr_val_undef(res);
    hts_expr_val_free(&val);

    return err ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
callq 0x1dbc3
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1db8c
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %r9
movapd %xmm0, 0x10(%r9)
movapd %xmm0, (%r9)
movq $0x0, 0x20(%r9)
movb $0x1, %cl
movl %ecx, %ebp
movq (%r14), %rcx
incq %rcx
movzbl -0x1(%rcx), %eax
cmpl $0x9, %eax
je 0x1d5cd
cmpl $0x20, %eax
je 0x1d5cd
cmpl $0x7c, %eax
jne 0x1d6e0
cmpb $0x7c, (%rcx)
je 0x1d6e0
movb %bpl, 0xf(%rsp)
movq %r15, %rdx
movq %rbx, %r15
movq %r14, %r8
movq %r13, %rbp
movq %r13, %rdi
movq %r12, %r13
movq %r12, %rsi
movq %rdx, %r12
movq %r9, %rbx
callq 0x1dbc3
testl %eax, %eax
jne 0x1dadb
movzbl 0x10(%rsp), %eax
testl %eax, %eax
je 0x1d639
cmpl $0x1, %eax
movq %rbx, %r9
jne 0x1d665
cmpq $0x0, 0x28(%rsp)
setne %dl
jmp 0x1d649
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
setnp %dl
movq %rbx, %r9
movq %r15, %rbx
xorl %ecx, %ecx
testq %r15, %r15
movq %r12, %r15
je 0x1d6d5
testb %dl, %dl
movq %r13, %r12
movq %rbp, %r13
jne 0x1d676
jmp 0x1d5c8
movq %r15, %rbx
testq %r15, %r15
movq %r12, %r15
movq %r13, %r12
movq %rbp, %r13
je 0x1d6ce
movzbl (%rbx), %ecx
cmpl $0x1, %ecx
je 0x1d694
testl %ecx, %ecx
movb 0xf(%rsp), %bpl
jne 0x1d6a0
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jnp 0x1d6a0
jmp 0x1d6ce
cmpq $0x0, 0x18(%rbx)
movb 0xf(%rsp), %bpl
je 0x1d6ce
orb %al, %cl
jne 0x1dad1
cvttsd2si 0x20(%rbx), %rax
cvttsd2si 0x30(%rsp), %rcx
orq %rax, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movsd %xmm0, 0x20(%rbx)
setne 0x1(%rbx)
jmp 0x1d5ca
xorl %ecx, %ecx
jmp 0x1d5c8
movq %r13, %r12
movq %rbp, %r13
jmp 0x1d5c8
movq 0x28(%rsp), %rdi
callq 0x45c0
testb $0x1, %bpl
jne 0x1d70b
movq $0x0, 0x8(%rbx)
movw $0x0, (%rbx)
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x20(%rbx)
movq (%r14), %rcx
incq %rcx
movzbl -0x1(%rcx), %eax
cmpl $0x20, %eax
je 0x1d70e
cmpl $0x9, %eax
je 0x1d70e
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
movzbl -0x1(%rcx), %eax
cmpl $0x3c, %eax
je 0x1d7a1
xorl %ebp, %ebp
cmpl $0x3e, %eax
jne 0x1db7c
cmpb $0x3d, (%rcx)
jne 0x1d7f6
incq %rcx
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x1d57b
movl %eax, %ebp
testq %rbx, %rbx
je 0x1d9c0
movzbl (%rbx), %eax
cmpl $0x1, %eax
je 0x1d888
testl %eax, %eax
jne 0x1d893
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jnp 0x1d893
jmp 0x1d9c0
cmpb $0x3d, (%rcx)
jne 0x1d83f
incq %rcx
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x1d57b
movl %eax, %ebp
testq %rbx, %rbx
je 0x1d9c0
movzbl (%rbx), %eax
cmpl $0x1, %eax
je 0x1d904
testl %eax, %eax
jne 0x1d90f
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jnp 0x1d90f
jmp 0x1d9c0
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x1d57b
movl %eax, %ebp
testq %rbx, %rbx
je 0x1d9c0
movzbl (%rbx), %eax
cmpl $0x1, %eax
je 0x1d8c6
testl %eax, %eax
jne 0x1d8d1
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jnp 0x1d8d1
jmp 0x1d9c0
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x1d57b
movl %eax, %ebp
testq %rbx, %rbx
je 0x1d9c0
movzbl (%rbx), %eax
cmpl $0x1, %eax
je 0x1d93e
testl %eax, %eax
jne 0x1d945
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jnp 0x1d945
jmp 0x1d9c0
cmpq $0x0, 0x18(%rbx)
je 0x1d9c0
movzbl 0x10(%rsp), %ecx
cmpl $0x1, %ecx
je 0x1d970
testl %ecx, %ecx
jne 0x1d9e2
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1d9c0
testb %al, %al
jne 0x1d9ea
jmp 0x1dae9
cmpq $0x0, 0x18(%rbx)
je 0x1d9c0
movzbl 0x10(%rsp), %ecx
cmpl $0x1, %ecx
je 0x1d981
testl %ecx, %ecx
jne 0x1da1f
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1d9c0
testb %al, %al
jne 0x1da27
jmp 0x1dafa
cmpq $0x0, 0x18(%rbx)
je 0x1d9c0
movzbl 0x10(%rsp), %ecx
cmpl $0x1, %ecx
je 0x1d996
testl %ecx, %ecx
jne 0x1da5c
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1d9c0
testb %al, %al
jne 0x1da64
jmp 0x1db12
cmpq $0x0, 0x18(%rbx)
je 0x1d9c0
movzbl 0x10(%rsp), %ecx
cmpl $0x1, %ecx
je 0x1d9ab
testl %ecx, %ecx
jne 0x1da99
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1d9c0
testb %al, %al
jne 0x1daa1
jmp 0x1dbae
cmpq $0x0, 0x28(%rsp)
je 0x1d9c0
testb %al, %al
jne 0x1d9ea
jmp 0x1db0e
cmpq $0x0, 0x28(%rsp)
je 0x1d9c0
testb %al, %al
jne 0x1da27
jmp 0x1db0e
cmpq $0x0, 0x28(%rsp)
je 0x1d9c0
testb %al, %al
jne 0x1da64
jmp 0x1db0e
cmpq $0x0, 0x28(%rsp)
je 0x1d9c0
testb %al, %al
jne 0x1daa1
jmp 0x1dba7
movq $0x0, 0x8(%rbx)
movw $0x0, (%rbx)
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x20(%rbx)
xorl %eax, %eax
jmp 0x1db37
testb %al, %al
je 0x1dae5
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
setne %al
testb %cl, %cl
setne %cl
andb %al, %cl
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x1db0e
callq 0x46c0
testl %eax, %eax
setns %al
jmp 0x1db20
testb %al, %al
je 0x1daf6
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
setne %al
testb %cl, %cl
setne %cl
andb %al, %cl
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x1db0e
callq 0x46c0
testl %eax, %eax
setg %al
jmp 0x1db20
testb %al, %al
je 0x1db0a
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
setne %al
testb %cl, %cl
setne %cl
andb %al, %cl
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x1db0e
callq 0x46c0
testl %eax, %eax
setle %al
jmp 0x1db20
testb %al, %al
je 0x1dba3
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
setne %al
testb %cl, %cl
setne %cl
andb %al, %cl
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x1dba7
callq 0x46c0
shrl $0x1f, %eax
jmp 0x1db23
movq 0x28(%rsp), %rdi
callq 0x45c0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x1db8c
testb %cl, %cl
jne 0x1db0e
movsd 0x20(%rbx), %xmm0
ucomisd 0x30(%rsp), %xmm0
jmp 0x1db1d
testb %cl, %cl
jne 0x1db0e
movsd 0x20(%rbx), %xmm0
ucomisd 0x30(%rsp), %xmm0
seta %al
jmp 0x1db20
testb %cl, %cl
je 0x1db12
xorl %eax, %eax
jmp 0x1db20
movsd 0x30(%rsp), %xmm0
ucomisd 0x20(%rbx), %xmm0
setae %al
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x20(%rbx)
movb %al, 0x1(%rbx)
movb $0x0, (%rbx)
movb $0x1, %al
movzbl 0x10(%rsp), %ecx
cmpl $0x1, %ecx
je 0x1db54
testl %ecx, %ecx
jne 0x1db9d
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
setnp %cl
jmp 0x1db5d
cmpq $0x0, 0x28(%rsp)
setne %cl
testb %al, %cl
jne 0x1db7c
movq $0x0, 0x8(%rbx)
movw $0x0, (%rbx)
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x20(%rbx)
movq 0x28(%rsp), %rdi
callq 0x45c0
xorl %ecx, %ecx
negl %ebp
sbbl %ecx, %ecx
movl %ecx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %al, %al
je 0x1db61
jmp 0x1db7c
testb %cl, %cl
je 0x1dbae
xorl %eax, %eax
jmp 0x1db23
movsd 0x30(%rsp), %xmm0
xorl %eax, %eax
ucomisd 0x20(%rbx), %xmm0
seta %al
jmp 0x1db23