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

    str = *end;
    hts_expr_val_t val = HTS_EXPR_VAL_INIT;
    while (*str) {
        str = ws(str);
        if (*str == '*' || *str == '/' || *str == '%') {
            if (unary_expr(filt, data, fn, str+1, end, &val)) return -1;
            if (!hts_expr_val_exists(&val) || !hts_expr_val_exists(res)) {
                hts_expr_val_undef(res);
            } else if (val.is_str || res->is_str) {
                hts_expr_val_free(&val);
                return -1; // arith on strings
            }
        }

        if (*str == '*')
            res->d *= val.d;
        else if (*str == '/')
            res->d /= val.d;
        else if (*str == '%') {
            if (val.d)
                res->d = (int64_t)res->d % (int64_t)val.d;
            else
                hts_expr_val_undef(res);
        } else
            break;

        res->is_true = hts_expr_val_exists(res) && (res->d != 0);
        str = *end;
    }

    hts_expr_val_free(&val);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
callq 0x1e2d3
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1e2af
movq (%r15), %rbx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movapd %xmm0, (%rsp)
movq $0x0, 0x20(%rsp)
movb (%rbx), %al
testb %al, %al
je 0x1e2a6
cmpb $0x2f, %al
ja 0x1e1e1
movzbl %al, %eax
movabsq $0x842000000000, %rcx   # imm = 0x842000000000
btq %rax, %rcx
jae 0x1e159
leaq 0x1(%rbx), %rcx
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %r8
movq %rsp, %r9
callq 0x1e2d3
testl %eax, %eax
jne 0x1e2c0
movzbl (%rsp), %eax
testl %eax, %eax
je 0x1e171
cmpl $0x1, %eax
jne 0x1e189
cmpq $0x0, 0x18(%rsp)
setne %cl
jmp 0x1e17e
movabsq $0x100000200, %rcx      # imm = 0x100000200
btq %rax, %rcx
jae 0x1e1e1
movb 0x1(%rbx), %al
incq %rbx
jmp 0x1e106
movsd 0x20(%rsp), %xmm0
ucomisd %xmm0, %xmm0
setnp %cl
testq %r14, %r14
je 0x1e1bb
testb %cl, %cl
jne 0x1e18e
jmp 0x1e1bb
testq %r14, %r14
je 0x1e1bb
movzbl (%r14), %ecx
cmpl $0x1, %ecx
je 0x1e1b0
testl %ecx, %ecx
jne 0x1e1d9
movsd 0x20(%r14), %xmm0
ucomisd %xmm0, %xmm0
jp 0x1e1bb
testb %al, %al
je 0x1e1e1
jmp 0x1e2c7
cmpq $0x0, 0x18(%r14)
jne 0x1e2c7
movq $0x0, 0x8(%r14)
movw $0x0, (%r14)
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x20(%r14)
jmp 0x1e1e1
orb %cl, %al
jne 0x1e2c7
movzbl (%rbx), %eax
cmpl $0x25, %eax
je 0x1e213
cmpl $0x2f, %eax
je 0x1e205
cmpl $0x2a, %eax
jne 0x1e29f
movsd 0x20(%rsp), %xmm0
mulsd 0x20(%r14), %xmm0
jmp 0x1e23d
movsd 0x20(%r14), %xmm0
divsd 0x20(%rsp), %xmm0
jmp 0x1e23d
movsd 0x20(%rsp), %xmm0
ucomisd 0x74de7(%rip), %xmm0    # 0x93008
jne 0x1e225
jnp 0x1e272
cvttsd2si 0x20(%r14), %rax
cvttsd2si %xmm0, %rcx
cqto
idivq %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
movsd %xmm0, 0x20(%r14)
movzbl (%r14), %eax
cmpl $0x1, %eax
je 0x1e258
testl %eax, %eax
jne 0x1e25f
ucomisd %xmm0, %xmm0
jnp 0x1e25f
jmp 0x1e28c
cmpq $0x0, 0x18(%r14)
je 0x1e28c
cmpneqsd 0x74da0(%rip), %xmm0    # 0x93008
movq %xmm0, %rax
andl $0x1, %eax
jmp 0x1e28e
movq $0x0, 0x8(%r14)
movb $0x0, (%r14)
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x20(%r14)
xorl %eax, %eax
movb %al, 0x1(%r14)
movq (%r15), %rbx
movb (%rbx), %al
testb %al, %al
jne 0x1e106
movq 0x18(%rsp), %rdi
jmp 0x1e2a8
xorl %edi, %edi
xorl %ebx, %ebx
callq 0x45c0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1e2af
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x18(%rsp), %rdi
jmp 0x1e2aa