// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/lib/bcore/bcore_st.c
// Function: c_match
static bl_t c_match( sc_t o, uz_t on, sc_t f, uz_t* fi )
{
    if( f[ *fi ] == '\'' || f[ *fi ] == '[' )
    {
        uz_t i = *fi;
        char c1 = c_char( o, on, f, &i );
        uz_t i0 = i;
        char rc1 = f[ i ];
        char rc2 = f[ i + 1 ];
        if( rc1 ) i += ( rc2 == '=' ) ? 2 : 1;
        char c2 = c_char( o, on, f, &i );
        *fi = i;
        switch( rc1 )
        {
            case '=': return ( rc2 == '=' ) ? ( c1 == c2 ) : false;
            case '>': return ( rc2 == '=' ) ? ( c1 >= c2 ) : ( c1 > c2 );
            case '<': return ( rc2 == '=' ) ? ( c1 <= c2 ) : ( c1 < c2 );
            case '!': return ( rc2 == '=' ) ? ( c1 != c2 ) : false;
            default: ERR( "Format '%s' at position %zu: relation expected.", f, i0 );
        }
    }
    else if( f[ *fi ] == '(' )
    {
        uz_t i = *fi + 1;
        bl_t flag = c_match( o, on, f, &i );
        while( f[ i ] && f[ i ] != ')' )
        {
            if( f[ i ] == '&' && f[ i + 1 ] == '&' )
            {
                i+= 2;
                bl_t flag2 = c_match( o, on, f,  &i );
                flag = flag && flag2;
            }
            else if( f[ i ] == '|' && f[ i + 1 ] == '|' )
            {
                i+= 2;
                bl_t flag2 = c_match( o, on, f,  &i );
                flag = flag || flag2;
            }
            else
            {
                ERR( "Format '%s' at position %zu: logical operator (&& or ||) expected.", f, i );
            }
        }
        if( f[ i ] != ')' ) ERR( "Format '%s' at position %zu: ) expected.", f, i );
        i++;
        *fi = i;
        return flag;
    }
    else if( f[ *fi ] == '!' )
    {
        ( *fi )++;
        return !c_match( o, on, f, fi );
    }
    else
    {
        ERR( "Format '%s' at position %zu: invalid expression.", f, *fi );
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbp
movq (%rcx), %r9
xorl %ebx, %ebx
movzbl (%r14,%r9), %eax
cmpl $0x21, %eax
jne 0x10d3ce
incq %r9
movq %r9, (%r13)
xorb $0x1, %bl
jmp 0x10d3b8
cmpl $0x5b, %eax
je 0x10d3e5
cmpl $0x28, %eax
je 0x10d478
cmpl $0x27, %eax
jne 0x10d573
leaq 0x8(%rsp), %r15
movq %r9, (%r15)
movq %rbp, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x10eb8e
movq %r12, %rsi
movq (%r15), %r12
movq %rbp, %rdi
movzbl (%r14,%r12), %ebp
testl %ebp, %ebp
je 0x10d594
movb %al, 0x4(%rsp)
movb 0x1(%r14,%r12), %cl
xorl %eax, %eax
movb %cl, 0x10(%rsp)
cmpb $0x3d, %cl
sete %al
addq %r12, %rax
incq %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %r14, %rdx
movq %r15, %rcx
callq 0x10eb8e
movq (%r15), %rcx
movq %rcx, (%r13)
cmpl $0x3c, %ebp
jg 0x10d5d9
cmpl $0x21, %ebp
je 0x10d630
cmpl $0x3c, %ebp
jne 0x10d5ab
xorl %ecx, %ecx
xorl %ebp, %ebp
cmpb %al, 0x4(%rsp)
setle %cl
setl %bpl
jmp 0x10d654
movq %r13, 0x10(%rsp)
incq %r9
leaq 0x8(%rsp), %rcx
movq %r9, (%rcx)
movq %rbp, 0x18(%rsp)
movq %rbp, %rdi
movq %r12, 0x20(%rsp)
movq %r12, %rsi
movq %r14, %rdx
callq 0x10d399
movl %eax, 0x4(%rsp)
leaq 0x3ee4a(%rip), %r12     # 0x14c2f5
leaq 0x3eaae(%rip), %r13     # 0x14bf60
leaq 0x3ee74(%rip), %rbp     # 0x14c32d
movq 0x8(%rsp), %r15
movzbl (%r14,%r15), %eax
cmpl $0x28, %eax
jg 0x10d4d7
cmpl $0x26, %eax
jne 0x10d4e6
cmpb $0x26, 0x1(%r14,%r15)
jne 0x10d4f8
jmp 0x10d544
cmpl $0x7c, %eax
jne 0x10d4ef
cmpb $0x7c, 0x1(%r14,%r15)
jne 0x10d4f8
jmp 0x10d515
testl %eax, %eax
jne 0x10d4f8
jmp 0x10d5f8
cmpl $0x29, %eax
je 0x10d61f
movq %r12, %rdi
movq %r13, %rsi
movl $0x577, %edx            # imm = 0x577
movq %rbp, %rcx
movq %r14, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0xbe592
jmp 0x10d4be
addq $0x2, %r15
movq %r15, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
leaq 0x8(%rsp), %rcx
callq 0x10d399
movl 0x4(%rsp), %ecx
orb %al, %cl
movl %ecx, 0x4(%rsp)
jmp 0x10d4b9
addq $0x2, %r15
movq %r15, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
leaq 0x8(%rsp), %rcx
callq 0x10d399
movl 0x4(%rsp), %ecx
andb %al, %cl
movl %ecx, 0x4(%rsp)
jmp 0x10d4b9
leaq 0x3ed7b(%rip), %rdi     # 0x14c2f5
leaq 0x3e9df(%rip), %rsi     # 0x14bf60
leaq 0x3ee11(%rip), %rcx     # 0x14c399
xorl %ebp, %ebp
movl $0x586, %edx            # imm = 0x586
movq %r14, %r8
jmp 0x10d5cd
leaq 0x8(%rsp), %r15
movq %r14, %rdx
movq %r15, %rcx
callq 0x10eb8e
movq (%r15), %rax
movq %rax, (%r13)
leaq 0x3ed43(%rip), %rdi     # 0x14c2f5
leaq 0x3e9a7(%rip), %rsi     # 0x14bf60
leaq 0x3ed3d(%rip), %rcx     # 0x14c2fd
xorl %ebp, %ebp
movl $0x560, %edx            # imm = 0x560
movq %r14, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xbe592
jmp 0x10d65c
cmpl $0x3e, %ebp
je 0x10d645
cmpl $0x3d, %ebp
jne 0x10d5ab
movb 0x10(%rsp), %dl
xorb $0x3d, %dl
movb 0x4(%rsp), %cl
xorb %al, %cl
orb %dl, %cl
sete %bpl
jmp 0x10d65c
leaq 0x3ecf6(%rip), %rdi     # 0x14c2f5
leaq 0x3e95a(%rip), %rsi     # 0x14bf60
leaq 0x3ed63(%rip), %rcx     # 0x14c370
movl $0x57a, %edx            # imm = 0x57A
movq %r14, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0xbe592
incq %r15
movq 0x10(%rsp), %rax
movq %r15, (%rax)
movl 0x4(%rsp), %ebp
jmp 0x10d65c
cmpb $0x3d, 0x10(%rsp)
sete %cl
cmpb %al, 0x4(%rsp)
setne %bpl
andb %cl, %bpl
jmp 0x10d65c
xorl %ecx, %ecx
xorl %ebp, %ebp
cmpb %al, 0x4(%rsp)
setge %cl
setg %bpl
cmpb $0x3d, 0x10(%rsp)
cmovel %ecx, %ebp
xorb %bpl, %bl
andb $0x1, %bl
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq