// File: /workspace/github_c_makefile_star2_O2/ieyasu[P]funit/parse_test_file.c
// Function: parse_fortran
static struct Code *parse_fortran(struct ParseState *ps, int *need_array_it)
{
    struct Code *code = NEW0(struct Code);
    char *start = ps->read_pos, *tok, *save_pos;
    enum MacroType mtype;
    size_t len;

    code->type = FORTRAN_CODE;
    code->lineno = ps->lineno;

    // read lines until a recognized end sequence appears
    while (ps->read_pos < ps->file_end) {
        // look for end sequence
        save_pos = ps->read_pos;
        tok = next_token(ps, &len);
        assert(tok != NULL);
        if (is_test_token(tok, len) ||
            (same_token("end", 3, tok, len) && next_is_test_end_token(ps))) {
            break;
        } else if (ps->read_pos == ps->file_end) {
            break;
        } else { // not found, this is fortran
            ps->read_pos = save_pos;
        }

        if (find_macro(ps, &mtype, need_array_it)) {
            //  record initial fortran code
            code->u.c.str = start;
            code->u.c.len = ps->read_pos - start;
            // parse the macro
            ps->read_pos = ps->next_pos;
            code->next = parse_macro(ps, mtype, need_array_it);
            // parse_macro recurses to parse more code, so just return here
            if (!code->next)
                goto error;
            return code;
        } else {
            next_line(ps);
        }
    }
    if (ps->line_pos < ps->file_end) { // found non-fortran code
        // record bounds of fortran code
        code->u.c.str = start;
        code->u.c.len = ps->line_pos - start;
        ps->next_pos = ps->read_pos = ps->line_pos;
        return code;
    }
    syntax_error(ps);
 error:
    free_code(code);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0x2170
movq %rax, %rbx
movq 0x38(%r14), %r15
movq 0x48(%r14), %rax
movq %rax, 0x10(%rbx)
pushq $0x3
popq %rbp
movq %r15, 0x10(%rsp)
cmpq 0x20(%r14), %r15
jae 0x5ce2
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
callq 0x56c9
testq %rax, %rax
je 0x5dd6
movq %rax, %r12
movq 0x20(%rsp), %r13
cmpq $0x1, %rax
je 0x59b3
movq %r12, %rdi
movq %r13, %rsi
leaq 0x34fb(%rip), %rdx      # 0x8e2a
pushq $0x4
popq %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
movq %r12, %rdi
movq %r13, %rsi
leaq 0x27ed(%rip), %rdx      # 0x8139
pushq $0x5
popq %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
movq %r12, %rdi
movq %r13, %rsi
leaq 0x27d6(%rip), %rdx      # 0x813f
pushq $0x8
popq %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
movq %r12, %rdi
movq %r13, %rsi
leaq 0x3415(%rip), %rdx      # 0x8d9b
movq %rbp, %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
movq %r12, %rdi
movq %r13, %rsi
leaq 0x3400(%rip), %rdx      # 0x8da3
pushq $0x9
popq %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
leaq 0x31fd(%rip), %rdi      # 0x8bb7
movq %rbp, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x56d5
testl %eax, %eax
je 0x5a6c
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
callq 0x56c9
cmpq $0x1, %rax
je 0x5a6c
movq %rax, %r12
testq %rax, %rax
je 0x5df5
movq 0x18(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
leaq 0x3425(%rip), %rdx      # 0x8e2a
pushq $0x4
popq %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
movq %r12, %rdi
movq %r13, %rsi
leaq 0x2717(%rip), %rdx      # 0x8139
pushq $0x5
popq %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
movq %r12, %rdi
movq %r13, %rsi
leaq 0x2700(%rip), %rdx      # 0x813f
pushq $0x8
popq %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
movq %r12, %rdi
movq %r13, %rsi
leaq 0x33e0(%rip), %rdx      # 0x8e3c
movq %rbp, %rcx
callq 0x56d5
testl %eax, %eax
jne 0x5ce2
movq 0x38(%r14), %rax
cmpq 0x20(%r14), %rax
je 0x5ce2
movq %r15, 0x38(%r14)
movq 0x30(%r14), %r12
subq %r15, %r12
movq %r15, %rdi
movq %r12, %rsi
leaq 0x3531(%rip), %rdx      # 0x8fc3
pushq $0x7
popq %rcx
callq 0x602e
testq %rax, %rax
je 0x5b2d
movq %rax, %r15
cmpq $0x0, 0x8(%rsp)
jne 0x5ac0
movq %r14, %rdi
movq %r15, %rsi
leaq 0x3510(%rip), %rdx      # 0x8fcb
callq 0x4a70
leaq 0x7(%r15), %r12
movq 0x30(%r14), %r13
subq %r12, %r13
cmpq $0x7, %r13
jb 0x5b5f
movq %r12, %rdi
leaq 0x3508(%rip), %rsi      # 0x8fe7
pushq $0x6
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x5b69
leaq 0xd(%r15), %r12
addq $-0x6, %r13
cmpq $0xb, %r13
jb 0x5c72
movq %r12, %rdi
leaq 0x2990(%rip), %rsi      # 0x8497
pushq $0xa
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x5c78
movq 0x8(%rsp), %rax
movl $0x1, (%rax)
movq %r15, %rsi
addq $0x17, %rsi
pushq $0x6
jmp 0x5b58
movq 0x38(%r14), %rdi
movq %r12, %rsi
leaq 0x2ced(%rip), %rdx      # 0x8828
pushq $0x5
popq %rcx
callq 0x602e
testq %rax, %rax
je 0x5c8e
movq %rax, %r15
movq %rax, %rsi
addq $0x5, %rsi
pushq $0x7
popq %r13
jmp 0x5c1d
cmpq $0x5, %r13
jb 0x5c8e
movq %r12, %rdi
leaq 0x2657(%rip), %rsi      # 0x81ca
pushq $0x4
popq %rdx
callq 0x21d0
testl %eax, %eax
je 0x5c13
cmpq $0x6, %r13
jb 0x5c8e
movq %r12, %rdi
leaq 0x283e(%rip), %rsi      # 0x83d5
pushq $0x5
popq %rdx
callq 0x21d0
testl %eax, %eax
je 0x5c9f
cmpq $0xb, %r13
jb 0x5bc7
movq %r12, %rdi
leaq 0x28e0(%rip), %rsi      # 0x8497
pushq $0xa
popq %rdx
callq 0x21d0
testl %eax, %eax
je 0x5cd4
movq %r12, %rdi
leaq 0x2887(%rip), %rsi      # 0x8458
pushq $0x5
popq %rdx
callq 0x21d0
testl %eax, %eax
je 0x5cc6
cmpq $0xa, %r13
jb 0x5c8e
movq %r12, %rdi
leaq 0x285f(%rip), %rsi      # 0x8454
pushq $0x9
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x5c8e
movq %r15, %rsi
addq $0x10, %rsi
pushq $0x3
jmp 0x5b58
movq %r15, %rsi
addq $0xb, %rsi
xorl %r13d, %r13d
movq %rsi, 0x40(%r14)
movq 0x28(%r14), %rax
leaq -0x1(%r15), %rcx
cmpq %rax, %rcx
jb 0x5c39
cmpb $0x21, (%rcx)
leaq -0x1(%rcx), %rcx
jne 0x5c29
jmp 0x5c8e
movq 0x30(%r14), %rax
cmpq %rax, %rsi
jae 0x5c8e
movzbl (%rsi), %ecx
cmpl $0x9, %ecx
je 0x5c4f
cmpl $0x20, %ecx
jne 0x5c58
incq %rsi
movq %rsi, 0x40(%r14)
jmp 0x5c3d
cmpl $0x28, %ecx
je 0x5d19
movq %r14, %rdi
leaq 0x3383(%rip), %rdx      # 0x8fee
callq 0x4a70
jmp 0x5c8e
cmpq $0x6, %r13
jb 0x5c8e
movq %r12, %rdi
leaq 0x27d6(%rip), %rsi      # 0x8458
pushq $0x5
popq %rdx
callq 0x21d0
testl %eax, %eax
je 0x5cad
movq %r14, %rdi
callq 0x4c69
movq 0x38(%r14), %r15
jmp 0x58f0
movq %r15, %rsi
addq $0xc, %rsi
pushq $0x1
jmp 0x5b58
movq 0x8(%rsp), %rax
movl $0x1, (%rax)
movq %r15, %rsi
addq $0x12, %rsi
pushq $0x5
jmp 0x5b58
movq %r15, %rsi
addq $0xc, %rsi
pushq $0x2
jmp 0x5b58
movq %r15, %rsi
addq $0x11, %rsi
pushq $0x4
jmp 0x5b58
movq 0x28(%r14), %rax
cmpq 0x20(%r14), %rax
jae 0x5d0c
movq 0x10(%rsp), %rdx
movq %rdx, 0x18(%rbx)
movq %rax, %rcx
subq %rdx, %rcx
movq %rcx, 0x20(%rbx)
movq %rax, 0x38(%r14)
movq %rax, 0x40(%r14)
jmp 0x5dc4
movq %r14, %rdi
callq 0x4c59
jmp 0x5dba
incq %rsi
movq %rsi, 0x40(%r14)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
subq %rax, %r15
movq %r15, 0x20(%rbx)
movq %rsi, 0x38(%r14)
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0x2170
movq %rax, %r15
leaq 0x18(%rsp), %r12
andl $0x0, (%r12)
movl $0x1, 0x8(%rax)
movq 0x48(%r14), %rax
movq %rax, 0x10(%r15)
movl %r13d, 0x18(%r15)
movq %r14, %rdi
movq %r12, %rsi
callq 0x60d1
movq %rax, 0x20(%r15)
cmpl $0x0, (%r12)
jne 0x5db2
testq %rax, %rax
je 0x5d9f
movq 0x40(%r14), %rax
incq %rax
movq %rax, 0x38(%r14)
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x58b8
movq %rax, (%r15)
testq %rax, %rax
je 0x5d9f
movq %r15, (%rbx)
jmp 0x5dc4
movq 0x38(%r14), %rsi
leaq 0x32a9(%rip), %rdx      # 0x9053
movq %r14, %rdi
callq 0x4a70
movq %r15, %rdi
callq 0x5721
movq %rbx, %rdi
callq 0x5721
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3074(%rip), %rdi      # 0x8e51
leaq 0x2f1f(%rip), %rsi      # 0x8d03
leaq 0x3171(%rip), %rcx      # 0x8f5c
movl $0x20a, %edx            # imm = 0x20A
callq 0x2120
leaq 0x3055(%rip), %rdi      # 0x8e51
leaq 0x2f00(%rip), %rsi      # 0x8d03
leaq 0x3189(%rip), %rcx      # 0x8f93
movl $0x1f2, %edx            # imm = 0x1F2
callq 0x2120