// File: /workspace/github_c_makefile_star2_O1/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 0x1e257
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1e233
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 0x1dc9b
cmpl $0x20, %eax
je 0x1dc9b
cmpl $0x7c, %eax
jne 0x1dd7e
cmpb $0x7c, (%rcx)
je 0x1dd7e
movb %bpl, 0xf(%rsp)
movq %r15, %rdx
movq %r12, %rsi
movq %r13, %rdi
movq %r14, %r8
movq %rbx, %rbp
movq %r9, %rbx
callq 0x1e257
testl %eax, %eax
jne 0x1e185
movzbl 0x10(%rsp), %eax
testl %eax, %eax
movq %rbx, %r9
movq %rbp, %rbx
movb 0xf(%rsp), %bpl
je 0x1dd0e
cmpl $0x1, %eax
jne 0x1dd07
cmpq $0x0, 0x28(%rsp)
je 0x1dd77
testb %al, %al
je 0x1dd0e
testq %rbx, %rbx
jne 0x1dd25
jmp 0x1dd77
xorl %ecx, %ecx
testq %rbx, %rbx
je 0x1dc96
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1dc96
movzbl (%rbx), %ecx
testl %ecx, %ecx
je 0x1dd3c
cmpl $0x1, %ecx
jne 0x1dd47
cmpq $0x0, 0x18(%rbx)
je 0x1dd77
testb %cl, %cl
jne 0x1dd47
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1dd77
movb (%rbx), %cl
orb %al, %cl
jne 0x1e168
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 0x1dc98
xorl %ecx, %ecx
jmp 0x1dc96
movq 0x28(%rsp), %rdi
callq 0x45c0
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
testb $0x1, %bpl
jne 0x1ddbc
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 0x1ddbf
cmpl $0x9, %eax
je 0x1ddbf
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
movzbl -0x1(%rcx), %edx
xorl %ebp, %ebp
movb $0x1, %al
cmpl $0x3c, %edx
je 0x1df99
cmpl $0x3e, %edx
jne 0x1e1b0
cmpb $0x3d, (%rcx)
jne 0x1decb
incq %rcx
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x1dc49
movl %eax, %ebp
testq %rbx, %rbx
je 0x1e10b
movzbl (%rbx), %eax
testl %eax, %eax
je 0x1de4b
cmpl $0x1, %eax
jne 0x1de5a
cmpq $0x0, 0x18(%rbx)
je 0x1e10b
testb %al, %al
jne 0x1de5a
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e10b
movzbl 0x10(%rsp), %eax
testl %eax, %eax
je 0x1de78
cmpl $0x1, %eax
jne 0x1de88
cmpq $0x0, 0x28(%rsp)
je 0x1e10b
testb %al, %al
jne 0x1de88
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e10b
movb (%rbx), %cl
testb %cl, %cl
je 0x1e13c
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
setne %dl
testb %al, %al
setne %r8b
andb %dl, %r8b
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
setne %dl
andb %r8b, %dl
cmpb $0x1, %dl
jne 0x1e13c
callq 0x46c0
testl %eax, %eax
setns %al
jmp 0x1e199
cmpl $0x3c, %edx
je 0x1df99
cmpl $0x3e, %edx
jne 0x1e1b0
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x1dc49
movl %eax, %ebp
testq %rbx, %rbx
je 0x1e10b
movzbl (%rbx), %eax
testl %eax, %eax
je 0x1df19
cmpl $0x1, %eax
jne 0x1df28
cmpq $0x0, 0x18(%rbx)
je 0x1e10b
testb %al, %al
jne 0x1df28
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e10b
movzbl 0x10(%rsp), %eax
testl %eax, %eax
je 0x1df46
cmpl $0x1, %eax
jne 0x1df56
cmpq $0x0, 0x28(%rsp)
je 0x1e10b
testb %al, %al
jne 0x1df56
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e10b
movb (%rbx), %cl
testb %cl, %cl
je 0x1e18f
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
setne %dl
testb %al, %al
setne %r8b
andb %dl, %r8b
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
setne %dl
andb %r8b, %dl
cmpb $0x1, %dl
jne 0x1e18f
callq 0x46c0
testl %eax, %eax
setg %al
jmp 0x1e199
cmpb $0x3d, (%rcx)
jne 0x1e061
incq %rcx
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x1dc49
movl %eax, %ebp
testq %rbx, %rbx
je 0x1e10b
movzbl (%rbx), %eax
testl %eax, %eax
je 0x1dfe1
cmpl $0x1, %eax
jne 0x1dff0
cmpq $0x0, 0x18(%rbx)
je 0x1e10b
testb %al, %al
jne 0x1dff0
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e10b
movzbl 0x10(%rsp), %eax
testl %eax, %eax
je 0x1e00e
cmpl $0x1, %eax
jne 0x1e01e
cmpq $0x0, 0x28(%rsp)
je 0x1e10b
testb %al, %al
jne 0x1e01e
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e10b
movb (%rbx), %cl
testb %cl, %cl
je 0x1e12b
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
setne %dl
testb %al, %al
setne %r8b
andb %dl, %r8b
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
setne %dl
andb %r8b, %dl
cmpb $0x1, %dl
jne 0x1e12b
callq 0x46c0
testl %eax, %eax
setle %al
jmp 0x1e199
cmpl $0x3c, %edx
jne 0x1e1b0
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x1dc49
movl %eax, %ebp
testq %rbx, %rbx
je 0x1e10b
movzbl (%rbx), %eax
testl %eax, %eax
je 0x1e0a2
cmpl $0x1, %eax
jne 0x1e0ad
cmpq $0x0, 0x18(%rbx)
je 0x1e10b
testb %al, %al
jne 0x1e0ad
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e10b
movzbl 0x10(%rsp), %ecx
testl %ecx, %ecx
je 0x1e0c7
cmpl $0x1, %ecx
jne 0x1e0d3
cmpq $0x0, 0x28(%rsp)
je 0x1e10b
testb %cl, %cl
jne 0x1e0d3
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e10b
movb (%rbx), %dl
testb %dl, %dl
je 0x1e150
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
setne %al
testb %cl, %cl
setne %r8b
andb %al, %r8b
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
setne %al
andb %r8b, %al
cmpb $0x1, %al
jne 0x1e150
callq 0x46c0
shrl $0x1f, %eax
jmp 0x1e19c
movq $0x0, 0x8(%rbx)
movw $0x0, (%rbx)
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x20(%rbx)
jmp 0x1e1ae
orb %al, %cl
jne 0x1e197
movsd 0x30(%rsp), %xmm0
ucomisd 0x20(%rbx), %xmm0
jmp 0x1e14b
orb %al, %cl
jne 0x1e197
movsd 0x20(%rbx), %xmm0
ucomisd 0x30(%rsp), %xmm0
setae %al
jmp 0x1e199
xorl %eax, %eax
orb %cl, %dl
jne 0x1e19c
movsd 0x30(%rsp), %xmm0
xorl %eax, %eax
ucomisd 0x20(%rbx), %xmm0
seta %al
jmp 0x1e19c
movq 0x28(%rsp), %rdi
callq 0x45c0
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x1e233
orb %al, %cl
je 0x1e244
xorl %eax, %eax
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x20(%rbx)
movb %al, 0x1(%rbx)
movb $0x0, (%rbx)
xorl %eax, %eax
testb %al, %al
jne 0x1e223
movzbl 0x10(%rsp), %eax
testl %eax, %eax
je 0x1e1d5
cmpl $0x1, %eax
jne 0x1e1ce
cmpq $0x0, 0x28(%rsp)
je 0x1e208
testb %al, %al
je 0x1e1d5
testq %rbx, %rbx
jne 0x1e1e6
jmp 0x1e208
testq %rbx, %rbx
je 0x1e208
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e208
movzbl (%rbx), %eax
testl %eax, %eax
je 0x1e1fd
cmpl $0x1, %eax
jne 0x1e223
cmpq $0x0, 0x18(%rbx)
je 0x1e208
testb %al, %al
jne 0x1e223
movsd 0x20(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jnp 0x1e223
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
movsd 0x20(%rbx), %xmm0
ucomisd 0x30(%rsp), %xmm0
seta %al
jmp 0x1e199