// File: /workspace/github_c_makefile_star2_O2/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 0x91ae1
incq %r9
movq %r9, (%r13)
xorb $0x1, %bl
jmp 0x91acb
cmpl $0x5b, %eax
je 0x91af8
cmpl $0x28, %eax
je 0x91b98
cmpl $0x27, %eax
jne 0x91c8c
leaq 0x8(%rsp), %r15
movq %r9, (%r15)
movq %rbp, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x93035
movq %r12, %rsi
movq (%r15), %r12
movq %rbp, %rdi
movzbl (%r14,%r12), %ebp
testl %ebp, %ebp
je 0x91cad
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 0x93035
movq (%r15), %rcx
movq %rcx, (%r13)
cmpl $0x21, %ebp
je 0x91d51
cmpl $0x3c, %ebp
je 0x91d27
cmpl $0x3e, %ebp
je 0x91d38
cmpl $0x3d, %ebp
jne 0x91cc4
movb 0x10(%rsp), %dl
xorb $0x3d, %dl
movb 0x4(%rsp), %cl
xorb %al, %cl
orb %dl, %cl
sete %bpl
jmp 0x91d64
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 0x91aac
movl %eax, 0x4(%rsp)
leaq 0x3878b(%rip), %r12     # 0xca356
leaq 0x383e6(%rip), %r13     # 0xc9fb8
leaq 0x387b5(%rip), %rbp     # 0xca38e
movq 0x8(%rsp), %r15
movzbl (%r14,%r15), %eax
cmpl $0x26, %eax
je 0x91bff
cmpl $0x7c, %eax
je 0x91c09
testl %eax, %eax
je 0x91cef
cmpl $0x29, %eax
jne 0x91c11
jmp 0x91d16
cmpb $0x26, 0x1(%r14,%r15)
jne 0x91c11
jmp 0x91c2e
cmpb $0x7c, 0x1(%r14,%r15)
je 0x91c5d
movq %r12, %rdi
movq %r13, %rsi
movl $0x577, %edx            # imm = 0x577
movq %rbp, %rcx
movq %r14, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0x60031
jmp 0x91bde
addq $0x2, %r15
movq %r15, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
leaq 0x8(%rsp), %rcx
callq 0x91aac
movl 0x4(%rsp), %ecx
andb %al, %cl
movl %ecx, 0x4(%rsp)
jmp 0x91bd9
addq $0x2, %r15
movq %r15, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
leaq 0x8(%rsp), %rcx
callq 0x91aac
movl 0x4(%rsp), %ecx
orb %al, %cl
movl %ecx, 0x4(%rsp)
jmp 0x91bd9
leaq 0x386c3(%rip), %rdi     # 0xca356
leaq 0x3831e(%rip), %rsi     # 0xc9fb8
leaq 0x38759(%rip), %rcx     # 0xca3fa
xorl %ebp, %ebp
movl $0x586, %edx            # imm = 0x586
movq %r14, %r8
jmp 0x91ce6
leaq 0x8(%rsp), %r15
movq %r14, %rdx
movq %r15, %rcx
callq 0x93035
movq (%r15), %rax
movq %rax, (%r13)
leaq 0x3868b(%rip), %rdi     # 0xca356
leaq 0x382e6(%rip), %rsi     # 0xc9fb8
leaq 0x38685(%rip), %rcx     # 0xca35e
xorl %ebp, %ebp
movl $0x560, %edx            # imm = 0x560
movq %r14, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x60031
jmp 0x91d64
leaq 0x38660(%rip), %rdi     # 0xca356
leaq 0x382bb(%rip), %rsi     # 0xc9fb8
leaq 0x386cd(%rip), %rcx     # 0xca3d1
movl $0x57a, %edx            # imm = 0x57A
movq %r14, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0x60031
incq %r15
movq 0x10(%rsp), %rax
movq %r15, (%rax)
movl 0x4(%rsp), %ebp
jmp 0x91d64
xorl %ecx, %ecx
xorl %ebp, %ebp
cmpb %al, 0x4(%rsp)
setle %cl
setl %bpl
jmp 0x91d47
xorl %ecx, %ecx
xorl %ebp, %ebp
cmpb %al, 0x4(%rsp)
setge %cl
setg %bpl
cmpb $0x3d, 0x10(%rsp)
cmovel %ecx, %ebp
jmp 0x91d64
cmpb $0x3d, 0x10(%rsp)
sete %cl
cmpb %al, 0x4(%rsp)
setne %bpl
andb %cl, %bpl
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