// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rdx, %r14
xorl %ebx, %ebx
movq (%r15), %r9
movzbl (%r14,%r9), %eax
cmpl $0x21, %eax
jne 0x118539
incq %r9
movq %r9, (%r15)
xorb $0x1, %bl
jmp 0x118521
cmpl $0x5b, %eax
je 0x118550
cmpl $0x28, %eax
je 0x11860f
cmpl $0x27, %eax
jne 0x118703
leaq 0x10(%rsp), %r12
movq %r9, (%r12)
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %r14, %rdx
movq %r12, %rcx
callq 0x119d84
movb %al, 0xc(%rsp)
movq (%r12), %r12
movzbl (%r14,%r12), %ebp
movb 0x1(%r14,%r12), %cl
testl %ebp, %ebp
je 0x118597
xorl %eax, %eax
cmpb $0x3d, %cl
sete %al
addq %r12, %rax
incq %rax
movq %rax, 0x10(%rsp)
movb %cl, 0xb(%rsp)
leaq 0x10(%rsp), %r13
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x119d84
movq (%r13), %rcx
movq %rcx, (%r15)
cmpl $0x3c, %ebp
jg 0x1185e6
cmpl $0x21, %ebp
je 0x11878f
cmpl $0x3c, %ebp
jne 0x118764
xorl %ecx, %ecx
xorl %edx, %edx
cmpb %al, 0xc(%rsp)
setle %cl
setl %dl
jmp 0x1187b0
cmpl $0x3e, %ebp
je 0x1187a2
cmpl $0x3d, %ebp
jne 0x118764
movb 0xb(%rsp), %dl
xorb $0x3d, %dl
movb 0xc(%rsp), %cl
xorb %al, %cl
orb %dl, %cl
sete %dl
jmp 0x1187b8
incq %r9
leaq 0x10(%rsp), %rcx
movq %r9, (%rcx)
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %r14, %rdx
callq 0x11850b
movl %eax, 0xc(%rsp)
leaq 0x3e901(%rip), %r13     # 0x156f38
leaq 0x3ecc7(%rip), %rbp     # 0x157305
movq 0x10(%rsp), %r12
movb (%r14,%r12), %cl
movzbl %cl, %eax
cmpl $0x28, %eax
jg 0x118663
cmpl $0x26, %eax
jne 0x118672
cmpb $0x26, 0x1(%r14,%r12)
je 0x1186d4
cmpb $0x7c, %cl
je 0x118668
jmp 0x118684
cmpl $0x7c, %eax
jne 0x11867b
cmpb $0x7c, 0x1(%r14,%r12)
jne 0x118684
jmp 0x1186a5
testl %eax, %eax
jne 0x118684
jmp 0x11872c
cmpl $0x29, %eax
je 0x118753
leaq 0x3ec42(%rip), %rdi     # 0x1572cd
movq %r13, %rsi
movl $0x577, %edx            # imm = 0x577
movq %rbp, %rcx
movq %r14, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xc80f6
jmp 0x118643
addq $0x2, %r12
movq %r12, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x11850b
movl 0xc(%rsp), %ecx
orb %al, %cl
movl %ecx, 0xc(%rsp)
jmp 0x11863e
addq $0x2, %r12
movq %r12, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x11850b
movl 0xc(%rsp), %ecx
andb %al, %cl
movl %ecx, 0xc(%rsp)
jmp 0x11863e
leaq 0x3ebc3(%rip), %rdi     # 0x1572cd
leaq 0x3e827(%rip), %rsi     # 0x156f38
leaq 0x3ec59(%rip), %rcx     # 0x157371
movl $0x586, %edx            # imm = 0x586
movq %r14, %r8
xorl %eax, %eax
callq 0xc80f6
jmp 0x1187be
leaq 0x3eb9a(%rip), %rdi     # 0x1572cd
leaq 0x3e7fe(%rip), %rsi     # 0x156f38
leaq 0x3ec07(%rip), %rcx     # 0x157348
movl $0x57a, %edx            # imm = 0x57A
movq %r14, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xc80f6
incq %r12
movq %r12, 0x10(%rsp)
movq %r12, (%r15)
movl 0xc(%rsp), %edx
jmp 0x1187c0
leaq 0x3eb62(%rip), %rdi     # 0x1572cd
leaq 0x3e7c6(%rip), %rsi     # 0x156f38
leaq 0x3eb5c(%rip), %rcx     # 0x1572d5
movl $0x560, %edx            # imm = 0x560
movq %r14, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xc80f6
movb $0x1, %al
jmp 0x1187ba
cmpb $0x3d, 0xb(%rsp)
sete %cl
cmpb %al, 0xc(%rsp)
setne %dl
andb %cl, %dl
jmp 0x1187b8
xorl %ecx, %ecx
xorl %edx, %edx
cmpb %al, 0xc(%rsp)
setge %cl
setg %dl
cmpb $0x3d, 0xb(%rsp)
cmovel %ecx, %edx
xorl %eax, %eax
testb %al, %al
je 0x1187c0
xorl %edx, %edx
xorb %dl, %bl
andb $0x1, %bl
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq