// File: /workspace/github_c_makefile_star2_O3/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 $0x18, %rsp
movq %rsi, (%rsp)
movq %rdi, %r14
movl $0x1, %edi
movl $0x28, %esi
callq 0x2170
movq %rax, %rbx
movq 0x38(%r14), %r12
movq 0x48(%r14), %rax
movq %rax, 0x10(%rbx)
cmpq 0x20(%r14), %r12
jae 0x622f
movq %r12, %rbp
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
leaq -0x1a3(%rip), %rdx      # 0x5bf6
callq 0x5258
testq %rax, %rax
je 0x6323
movq %rax, %r13
cmpq $0x1, %rax
je 0x5e27
movq 0x10(%rsp), %r15
leaq 0x306e(%rip), %rsi      # 0x8e2a
cmpq $0x1, %rsi
sete %al
cmpq $0x4, %r15
setne %cl
orb %al, %cl
jne 0x5dd5
movl $0x4, %edx
jmp 0x5e17
leaq 0x235d(%rip), %rsi      # 0x8139
cmpq $0x1, %rsi
sete %al
cmpq $0x5, %r15
setne %cl
orb %al, %cl
jne 0x5df5
movl $0x5, %edx
jmp 0x5e17
leaq 0x2343(%rip), %rsi      # 0x813f
cmpq $0x1, %rsi
sete %al
cmpq $0x8, %r15
setne %cl
orb %al, %cl
jne 0x5ffe
movl $0x8, %edx
movq %r13, %rdi
callq 0x21d0
testl %eax, %eax
je 0x622f
movq 0x38(%r14), %rax
cmpq 0x20(%r14), %rax
je 0x622f
movq %rbp, 0x38(%r14)
movq 0x30(%r14), %r13
subq %rbp, %r13
movl $0x7, %ecx
movq %rbp, %rdi
movq %r13, %rsi
leaq 0x3171(%rip), %rdx      # 0x8fc3
callq 0x65a0
testq %rax, %rax
je 0x5ef7
movq %rax, %rbp
cmpq $0x0, (%rsp)
jne 0x5e7c
movq %r14, %rdi
movq %rbp, %rsi
leaq 0x3154(%rip), %rdx      # 0x8fcb
callq 0x4f08
leaq 0x7(%rbp), %r13
movq 0x30(%r14), %r15
subq %r13, %r15
cmpq $0x7, %r15
jb 0x5f2d
movl $0x6, %edx
movq %r13, %rdi
leaq 0x3147(%rip), %rsi      # 0x8fe7
callq 0x21d0
testl %eax, %eax
jne 0x5f37
leaq 0xd(%rbp), %r13
addq $-0x6, %r15
cmpq $0xb, %r15
jb 0x6021
movl $0xa, %edx
movq %r13, %rdi
leaq 0x25c9(%rip), %rsi      # 0x8497
callq 0x21d0
testl %eax, %eax
jne 0x602b
movq (%rsp), %rax
movl $0x1, (%rax)
movq %rbp, %rsi
addq $0x17, %rsi
movl $0x6, %r15d
jmp 0x6141
movq 0x38(%r14), %rdi
movl $0x5, %ecx
movq %r13, %rsi
leaq 0x291e(%rip), %rdx      # 0x8828
callq 0x65a0
testq %rax, %rax
je 0x619c
movq %rax, %rbp
movq %rax, %rsi
addq $0x5, %rsi
movl $0x7, %r15d
jmp 0x6141
cmpq $0x5, %r15
jb 0x619c
movl $0x4, %edx
movq %r13, %rdi
leaq 0x2284(%rip), %rsi      # 0x81ca
callq 0x21d0
testl %eax, %eax
je 0x5fef
cmpq $0x6, %r15
jb 0x619c
movl $0x5, %edx
movq %r13, %rdi
leaq 0x2469(%rip), %rsi      # 0x83d5
callq 0x21d0
testl %eax, %eax
je 0x6063
cmpq $0xb, %r15
jb 0x5f9b
movl $0xa, %edx
movq %r13, %rdi
leaq 0x2509(%rip), %rsi      # 0x8497
callq 0x21d0
testl %eax, %eax
je 0x6134
movl $0x5, %edx
movq %r13, %rdi
leaq 0x24ae(%rip), %rsi      # 0x8458
callq 0x21d0
testl %eax, %eax
je 0x6125
cmpq $0xa, %r15
jb 0x619c
movl $0x9, %edx
movq %r13, %rdi
leaq 0x2484(%rip), %rsi      # 0x8454
callq 0x21d0
testl %eax, %eax
jne 0x619c
movq %rbp, %rsi
addq $0x10, %rsi
movl $0x3, %r15d
jmp 0x6141
movq %rbp, %rsi
addq $0xb, %rsi
xorl %r15d, %r15d
jmp 0x6141
leaq 0x2d96(%rip), %rsi      # 0x8d9b
cmpq $0x1, %rsi
sete %al
cmpq $0x3, %r15
setne %cl
orb %al, %cl
jne 0x6075
movl $0x3, %edx
movq %r13, %rdi
jmp 0x609d
cmpq $0x6, %r15
jb 0x619c
movl $0x5, %edx
movq %r13, %rdi
leaq 0x241e(%rip), %rsi      # 0x8458
callq 0x21d0
testl %eax, %eax
jne 0x619c
movq (%rsp), %rax
movl $0x1, (%rax)
movq %rbp, %rsi
addq $0x12, %rsi
movl $0x5, %r15d
jmp 0x6141
movq %rbp, %rsi
addq $0xc, %rsi
movl $0x1, %r15d
jmp 0x6141
leaq 0x2d27(%rip), %rax      # 0x8da3
cmpq $0x1, %rax
sete %al
cmpq $0x9, %r15
setne %cl
orb %al, %cl
jne 0x60aa
movl $0x9, %edx
movq %r13, %rdi
leaq 0x2d06(%rip), %rsi      # 0x8da3
callq 0x21d0
testl %eax, %eax
je 0x622f
cmpq $0x3, %r15
jne 0x5e27
movl $0x3, %edx
leaq 0x2af7(%rip), %rdi      # 0x8bb7
movq %r13, %rsi
callq 0x21d0
testl %eax, %eax
jne 0x5e27
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
leaq -0x4e9(%rip), %rdx      # 0x5bf6
callq 0x5258
cmpq $0x1, %rax
je 0x5e27
testq %rax, %rax
je 0x6342
leaq 0x2d2c(%rip), %rsi      # 0x8e2a
cmpq $0x1, %rsi
sete %dl
movq 0x8(%rsp), %rcx
cmpq $0x4, %rcx
setne %dil
orb %dl, %dil
jne 0x61b4
movl $0x4, %edx
jmp 0x61f6
movq %rbp, %rsi
addq $0xc, %rsi
movl $0x2, %r15d
jmp 0x6141
movq %rbp, %rsi
addq $0x11, %rsi
movl $0x4, %r15d
movq %rsi, 0x40(%r14)
movq 0x28(%r14), %rax
leaq -0x1(%rbp), %rcx
cmpq %rax, %rcx
jb 0x615d
cmpb $0x21, (%rcx)
leaq -0x1(%rcx), %rcx
jne 0x614d
jmp 0x619c
movq 0x30(%r14), %rax
cmpq %rax, %rsi
jae 0x619c
subq %rsi, %rax
movzbl (%rsi), %ecx
cmpl $0x9, %ecx
je 0x6176
cmpl $0x20, %ecx
jne 0x6184
incq %rsi
movq %rsi, 0x40(%r14)
decq %rax
jne 0x6169
jmp 0x619c
cmpl $0x28, %ecx
je 0x6261
movq %r14, %rdi
leaq 0x2e57(%rip), %rdx      # 0x8fee
callq 0x4f08
movq %r14, %rdi
callq 0x50f2
movq 0x38(%r14), %rbp
cmpq 0x20(%r14), %rbp
jb 0x5d8a
jmp 0x622f
leaq 0x1f7e(%rip), %rsi      # 0x8139
cmpq $0x1, %rsi
sete %dl
cmpq $0x5, %rcx
setne %dil
orb %dl, %dil
jne 0x61d6
movl $0x5, %edx
jmp 0x61f6
leaq 0x1f62(%rip), %rsi      # 0x813f
cmpq $0x1, %rsi
sete %dl
cmpq $0x8, %rcx
setne %dil
orb %dl, %dil
jne 0x61fe
movl $0x8, %edx
movq %rax, %rdi
jmp 0x5e1a
leaq 0x2c37(%rip), %rdx      # 0x8e3c
cmpq $0x1, %rdx
sete %dl
cmpq $0x3, %rcx
setne %cl
orb %dl, %cl
jne 0x5e27
movl $0x3, %edx
movq %rax, %rdi
leaq 0x2c12(%rip), %rsi      # 0x8e3c
jmp 0x5e1a
movq 0x28(%r14), %rax
cmpq 0x20(%r14), %rax
jae 0x6254
movq %r12, 0x18(%rbx)
movq %rax, %rcx
subq %r12, %rcx
movq %rcx, 0x20(%rbx)
movq %rax, 0x38(%r14)
movq %rax, 0x40(%r14)
jmp 0x6311
movq %r14, %rdi
callq 0x50e2
jmp 0x6307
incq %rsi
movq %rsi, 0x40(%r14)
movq %r12, 0x18(%rbx)
subq %r12, %rbp
movq %rbp, 0x20(%rbx)
movq %rsi, 0x38(%r14)
movl $0x1, %edi
movl $0x28, %esi
callq 0x2170
movq %rax, %r12
leaq 0x8(%rsp), %r13
movl $0x0, (%r13)
movl $0x1, 0x8(%rax)
movq 0x48(%r14), %rax
movq %rax, 0x10(%r12)
movl %r15d, 0x18(%r12)
movq %r14, %rdi
movq %r13, %rsi
callq 0x6647
movq %rax, 0x20(%r12)
cmpl $0x0, (%r13)
jne 0x62ff
testq %rax, %rax
je 0x62ec
movq 0x40(%r14), %rax
incq %rax
movq %rax, 0x38(%r14)
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x5d4a
movq %rax, (%r12)
testq %rax, %rax
je 0x62ec
movq %r12, (%rbx)
jmp 0x6311
movq 0x38(%r14), %rsi
leaq 0x2d5c(%rip), %rdx      # 0x9053
movq %r14, %rdi
callq 0x4f08
movq %r12, %rdi
callq 0x5ba0
movq %rbx, %rdi
callq 0x5ba0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2b27(%rip), %rdi      # 0x8e51
leaq 0x29d2(%rip), %rsi      # 0x8d03
leaq 0x2c24(%rip), %rcx      # 0x8f5c
movl $0x20a, %edx            # imm = 0x20A
callq 0x2120
leaq 0x2b08(%rip), %rdi      # 0x8e51
leaq 0x29b3(%rip), %rsi      # 0x8d03
leaq 0x2c3c(%rip), %rcx      # 0x8f93
movl $0x1f2, %edx            # imm = 0x1F2
callq 0x2120