// File: /workspace/github_c_makefile_star2_O0/ieyasu[P]funit/parse_test_file.c
// Function: find_macro
static char *
find_macro(struct ParseState *ps, enum MacroType *type, int *need_array_it)
{
    size_t len = ps->next_line_pos - ps->read_pos;
    char *assert_pos;

    assert_pos = strncasestr(ps->read_pos, len, "assert_", 7);
    if (assert_pos) {
        if (!need_array_it) {
            parse_fail(ps, assert_pos, "assertions not allowed here");
        }
        char *s = assert_pos + 7;
        size_t rest_len = ps->next_line_pos - s;
        if (rest_len > 6 && !strncasecmp(s, "array_", 6)) { // accept array_
            s += 6;
            rest_len -= 6;
            if (rest_len > 10 && !strncasecmp(s, "equal_with", 10)) {
                *need_array_it = 1;
                ps->next_pos = s + 10;
                *type = ASSERT_ARRAY_EQUAL_WITH;
            } else if (rest_len > 5 && !strncasecmp(s, "equal", 5)) {
                *need_array_it = 1;
                ps->next_pos = s + 5;
                *type = ASSERT_ARRAY_EQUAL;
            } else {
                assert_pos = NULL; // not an assert macro
            }
        } else if (rest_len >  4 && !strncasecmp(s, "true",        4)) {
            ps->next_pos = s + 4;
            *type = ASSERT_TRUE;
        } else if (rest_len >  5 && !strncasecmp(s, "false",       5)) {
            ps->next_pos = s + 5;
            *type = ASSERT_FALSE;
        } else if (rest_len > 10 && !strncasecmp(s, "equal_with", 10)) {
            ps->next_pos = s + 10;
            *type = ASSERT_EQUAL_WITH;
        } else if (rest_len >  5 && !strncasecmp(s, "equal",       5)) {
            ps->next_pos = s + 5;
            *type = ASSERT_EQUAL;
        } else if (rest_len >  9 && !strncasecmp(s, "not_equal",   9)) {
            ps->next_pos = s + 9;
            *type = ASSERT_NOT_EQUAL;
        } else {
            assert_pos = NULL; // not an assert macro
        }
    } else {
        assert_pos = strncasestr(ps->read_pos, len, "flunk",  5);
        if (assert_pos) {
            ps->next_pos = assert_pos + 5;
            *type = FLUNK;
        } else {
            assert_pos = NULL; // no assertions found
        }
    }

    if (assert_pos) {
        // make sure not commented out
        char *s = assert_pos;
        while (--s >= ps->line_pos) {
            if (*s == '!')
                return NULL;
        }

        // find open paren
        while (ps->next_pos < ps->next_line_pos) {
            switch (*ps->next_pos) {
            case ' ':
            case '\t':
                ps->next_pos++;
                break;
            case '(':
                ps->next_pos++;
                ps->read_pos = assert_pos;
                return assert_pos;
            default:
                parse_fail(ps, ps->next_pos, "expected '('");
                return NULL;
            }
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x28(%rbp), %rsi
leaq 0x3f21(%rip), %rdx      # 0xc35f
movl $0x7, %ecx
callq 0x8910
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x86bd
cmpq $0x0, -0x20(%rbp)
jne 0x8472
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq 0x3efa(%rip), %rdx      # 0xc367
callq 0x63e0
movq -0x30(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
cmpq $0x6, -0x40(%rbp)
jbe 0x856f
movq -0x38(%rbp), %rdi
leaq 0x3edc(%rip), %rsi      # 0xc383
movl $0x6, %edx
callq 0x21f0
cmpl $0x0, %eax
jne 0x856f
movq -0x38(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
subq $0x6, %rax
movq %rax, -0x40(%rbp)
cmpq $0xa, -0x40(%rbp)
jbe 0x8519
movq -0x38(%rbp), %rdi
leaq 0x3288(%rip), %rsi      # 0xb76c
movl $0xa, %edx
callq 0x21f0
cmpl $0x0, %eax
jne 0x8519
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x38(%rbp), %rcx
addq $0xa, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x6, (%rax)
jmp 0x856a
cmpq $0x5, -0x40(%rbp)
jbe 0x8560
movq -0x38(%rbp), %rdi
leaq 0x3202(%rip), %rsi      # 0xb72d
movl $0x5, %edx
callq 0x21f0
cmpl $0x0, %eax
jne 0x8560
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x38(%rbp), %rcx
addq $0x5, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x5, (%rax)
jmp 0x8568
movq $0x0, -0x30(%rbp)
jmp 0x856a
jmp 0x86bb
cmpq $0x4, -0x40(%rbp)
jbe 0x85af
movq -0x38(%rbp), %rdi
leaq 0x2f1e(%rip), %rsi      # 0xb49f
movl $0x4, %edx
callq 0x21f0
cmpl $0x0, %eax
jne 0x85af
movq -0x38(%rbp), %rcx
addq $0x4, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
jmp 0x86b9
cmpq $0x5, -0x40(%rbp)
jbe 0x85ef
movq -0x38(%rbp), %rdi
leaq 0x30e9(%rip), %rsi      # 0xb6aa
movl $0x5, %edx
callq 0x21f0
cmpl $0x0, %eax
jne 0x85ef
movq -0x38(%rbp), %rcx
addq $0x5, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
jmp 0x86b7
cmpq $0xa, -0x40(%rbp)
jbe 0x862f
movq -0x38(%rbp), %rdi
leaq 0x316b(%rip), %rsi      # 0xb76c
movl $0xa, %edx
callq 0x21f0
cmpl $0x0, %eax
jne 0x862f
movq -0x38(%rbp), %rcx
addq $0xa, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x4, (%rax)
jmp 0x86b5
cmpq $0x5, -0x40(%rbp)
jbe 0x866c
movq -0x38(%rbp), %rdi
leaq 0x30ec(%rip), %rsi      # 0xb72d
movl $0x5, %edx
callq 0x21f0
cmpl $0x0, %eax
jne 0x866c
movq -0x38(%rbp), %rcx
addq $0x5, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
jmp 0x86b3
cmpq $0x9, -0x40(%rbp)
jbe 0x86a9
movq -0x38(%rbp), %rdi
leaq 0x30ab(%rip), %rsi      # 0xb729
movl $0x9, %edx
callq 0x21f0
cmpl $0x0, %eax
jne 0x86a9
movq -0x38(%rbp), %rcx
addq $0x9, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
jmp 0x86b1
movq $0x0, -0x30(%rbp)
jmp 0x86b3
jmp 0x86b5
jmp 0x86b7
jmp 0x86b9
jmp 0x86bb
jmp 0x870b
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x28(%rbp), %rsi
leaq 0x342d(%rip), %rdx      # 0xbafd
movl $0x5, %ecx
callq 0x8910
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x8701
movq -0x30(%rbp), %rcx
addq $0x5, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x7, (%rax)
jmp 0x8709
movq $0x0, -0x30(%rbp)
jmp 0x870b
cmpq $0x0, -0x30(%rbp)
je 0x87f1
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jb 0x874f
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
jne 0x874d
movq $0x0, -0x8(%rbp)
jmp 0x87f9
jmp 0x871e
jmp 0x8751
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x87ef
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x4c(%rbp)
subl $0x9, %eax
je 0x8790
jmp 0x877c
movl -0x4c(%rbp), %eax
subl $0x20, %eax
je 0x8790
jmp 0x8786
movl -0x4c(%rbp), %eax
subl $0x28, %eax
je 0x87a2
jmp 0x87c8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x87ea
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x87f9
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
leaq 0x3baf(%rip), %rdx      # 0xc38a
callq 0x63e0
movq $0x0, -0x8(%rbp)
jmp 0x87f9
jmp 0x8751
jmp 0x87f1
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)