// File: /workspace/github_c_makefile_star2_O0/ieyasu[P]funit/parse_test_file.c
// Function: split_macro_arg
static char *split_macro_arg(struct ParseState *ps)
{
    int paren_count = 0, in_string = 0;
    char string_delim;

    ps->next_pos = ps->read_pos;
    while (ps->next_pos < ps->next_line_pos) {
        switch (*ps->next_pos) {
        case '\'':
        case '"': // open or close a string
            if (in_string) {
                if (*ps->next_pos == string_delim) {
                    if (*(ps->next_pos + 1) == string_delim) {
                        ps->next_pos++; // doubled to escape
                    } else {
                        in_string = 0; // close quote
                    }
                }
            } else {
                in_string = 1;
                string_delim = *ps->next_pos;
            }
            break;
        case '(':
            if (!in_string) {
                paren_count++;
            }
            break;
        case ')':
            if (!in_string) {
                if (paren_count == 0) {
                    return ps->next_pos; // closing paren or separating comma
                } else {
                    paren_count--;
                }
            }
            break;
        case ',':
            if (!in_string && paren_count == 0) {
                return ps->next_pos; // closing paren or separating comma
            }
            break;
        case '&': // line continuation
            if (in_string) {
                if (!skip_ampersand_in_string(ps))
                    return NULL;
            } else { // line continuation
                if (!skip_line_continuation(ps, 0))
                    return NULL;
            }
            break;
        case '\r':
        case '\n':
            parse_fail(ps, ps->next_pos, "unexpected end of line");
            return NULL;
        default:
            break;
        }
        assert(paren_count >= 0);
        ps->next_pos++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x8d77
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movsbl (%rax), %eax
addl $-0xa, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x22, %eax
ja 0x8d39
movq -0x28(%rbp), %rax
leaq 0x3400(%rip), %rcx      # 0xc008
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x18(%rbp)
je 0x8c5b
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movsbl (%rax), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x8c59
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movsbl 0x1(%rax), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x8c50
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x8c57
movl $0x0, -0x18(%rbp)
jmp 0x8c59
jmp 0x8c6f
movl $0x1, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
jmp 0x8d3b
cmpl $0x0, -0x18(%rbp)
jne 0x8c83
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8d3b
cmpl $0x0, -0x18(%rbp)
jne 0x8cb0
cmpl $0x0, -0x14(%rbp)
jne 0x8ca5
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x8d7f
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8cb0
jmp 0x8d3b
cmpl $0x0, -0x18(%rbp)
jne 0x8cd2
cmpl $0x0, -0x14(%rbp)
jne 0x8cd2
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x8d7f
jmp 0x8d3b
cmpl $0x0, -0x18(%rbp)
je 0x8cf8
movq -0x10(%rbp), %rdi
callq 0x8d90
cmpq $0x0, %rax
jne 0x8cf6
movq $0x0, -0x8(%rbp)
jmp 0x8d7f
jmp 0x8d15
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x8e70
cmpq $0x0, %rax
jne 0x8d13
movq $0x0, -0x8(%rbp)
jmp 0x8d7f
jmp 0x8d15
jmp 0x8d3b
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
leaq 0x373b(%rip), %rdx      # 0xc465
callq 0x63e0
movq $0x0, -0x8(%rbp)
jmp 0x8d7f
jmp 0x8d3b
cmpl $0x0, -0x14(%rbp)
jl 0x8d43
jmp 0x8d62
leaq 0x3732(%rip), %rdi      # 0xc47c
leaq 0x334e(%rip), %rsi      # 0xc09f
movl $0x145, %edx            # imm = 0x145
leaq 0x3730(%rip), %rcx      # 0xc48d
callq 0x2120
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x8bca
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)