// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rdi, %r14
movl $0x1, %edi
movl $0x28, %esi
callq 0x2170
movq %rax, %rbx
movq 0x38(%r14), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x8(%rbx)
movq 0x48(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x38(%r14), %r13
cmpq 0x20(%r14), %r13
jae 0x6448
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
leaq -0x1b1(%rip), %rdx      # 0x5d48
callq 0x5338
testq %rax, %rax
je 0x6551
movq %rax, %rbp
movq 0x20(%rsp), %r12
cmpq $0x1, %rax
je 0x6018
leaq 0x2ffa(%rip), %rax      # 0x8f1a
cmpq $0x1, %rax
sete %al
cmpq $0x4, %r12
setne %cl
orb %al, %cl
jne 0x5f4c
movq %rbp, %rdi
leaq 0x2fde(%rip), %rsi      # 0x8f1a
movq %r12, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
leaq 0x22d6(%rip), %rax      # 0x8229
cmpq $0x1, %rax
sete %al
cmpq $0x5, %r12
setne %cl
orb %al, %cl
jne 0x5f7f
movq %rbp, %rdi
leaq 0x22ba(%rip), %rsi      # 0x8229
movq %r12, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
leaq 0x22a9(%rip), %rax      # 0x822f
cmpq $0x1, %rax
sete %al
cmpq $0x8, %r12
setne %cl
orb %al, %cl
jne 0x5fb2
movq %rbp, %rdi
leaq 0x228d(%rip), %rsi      # 0x822f
movq %r12, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
leaq 0x2ed2(%rip), %rax      # 0x8e8b
cmpq $0x1, %rax
sete %al
cmpq $0x3, %r12
setne %cl
orb %al, %cl
jne 0x5fe5
movq %rbp, %rdi
leaq 0x2eb6(%rip), %rsi      # 0x8e8b
movq %r12, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
leaq 0x2ea7(%rip), %rax      # 0x8e93
cmpq $0x1, %rax
sete %al
cmpq $0x9, %r12
setne %cl
orb %al, %cl
jne 0x6018
movq %rbp, %rdi
leaq 0x2e8b(%rip), %rsi      # 0x8e93
movq %r12, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
cmpq $0x1, %rbp
sete %al
cmpq $0x3, %r12
setne %cl
orb %al, %cl
jne 0x6145
movl $0x3, %edx
leaq 0x2c6d(%rip), %rdi      # 0x8ca7
movq %rbp, %rsi
callq 0x21d0
testl %eax, %eax
jne 0x6145
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
leaq -0x311(%rip), %rdx      # 0x5d48
callq 0x5338
cmpq $0x1, %rax
je 0x6145
movq %rax, %r12
testq %rax, %rax
je 0x6570
leaq 0x2e9f(%rip), %rax      # 0x8f1a
cmpq $0x1, %rax
sete %al
movq 0x18(%rsp), %rbp
cmpq $0x4, %rbp
setne %cl
orb %al, %cl
jne 0x60ac
movq %r12, %rdi
leaq 0x2e7e(%rip), %rsi      # 0x8f1a
movq %rbp, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
leaq 0x2176(%rip), %rax      # 0x8229
cmpq $0x1, %rax
sete %al
cmpq $0x5, %rbp
setne %cl
orb %al, %cl
jne 0x60df
movq %r12, %rdi
leaq 0x215a(%rip), %rsi      # 0x8229
movq %rbp, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
leaq 0x2149(%rip), %rax      # 0x822f
cmpq $0x1, %rax
sete %al
cmpq $0x8, %rbp
setne %cl
orb %al, %cl
jne 0x6112
movq %r12, %rdi
leaq 0x212d(%rip), %rsi      # 0x822f
movq %rbp, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
leaq 0x2e13(%rip), %rax      # 0x8f2c
cmpq $0x1, %rax
sete %al
cmpq $0x3, %rbp
setne %cl
orb %al, %cl
jne 0x6145
movq %r12, %rdi
leaq 0x2df7(%rip), %rsi      # 0x8f2c
movq %rbp, %rdx
callq 0x21d0
testl %eax, %eax
je 0x6448
movq 0x38(%r14), %rax
cmpq 0x20(%r14), %rax
je 0x6448
movq %r13, 0x38(%r14)
movq 0x30(%r14), %r12
subq %r13, %r12
movl $0x7, %ecx
movq %r13, %rdi
movq %r12, %rsi
leaq 0x2f43(%rip), %rdx      # 0x90b3
callq 0x67d9
testq %rax, %rax
je 0x628b
movq %rax, %r13
testq %r15, %r15
jne 0x6198
movq %r14, %rdi
movq %r13, %rsi
leaq 0x2f28(%rip), %rdx      # 0x90bb
callq 0x5000
leaq 0x7(%r13), %r12
movq 0x30(%r14), %rbp
subq %r12, %rbp
cmpq $0x7, %rbp
jb 0x61c5
movl $0x6, %edx
movq %r12, %rdi
leaq 0x2f1f(%rip), %rsi      # 0x90d7
callq 0x21d0
testl %eax, %eax
je 0x62bd
cmpq $0x5, %rbp
jb 0x61e7
movl $0x4, %edx
movq %r12, %rdi
leaq 0x20e0(%rip), %rsi      # 0x82ba
callq 0x21d0
testl %eax, %eax
je 0x6381
cmpq $0x6, %rbp
jb 0x6209
movl $0x5, %edx
movq %r12, %rdi
leaq 0x22c9(%rip), %rsi      # 0x84c5
callq 0x21d0
testl %eax, %eax
je 0x63ae
cmpq $0xb, %rbp
jb 0x622b
movl $0xa, %edx
movq %r12, %rdi
leaq 0x2369(%rip), %rsi      # 0x8587
callq 0x21d0
testl %eax, %eax
je 0x63c6
cmpq $0x6, %rbp
jb 0x624d
movl $0x5, %edx
movq %r12, %rdi
leaq 0x2308(%rip), %rsi      # 0x8548
callq 0x21d0
testl %eax, %eax
je 0x63de
cmpq $0xa, %rbp
jb 0x6309
movl $0x9, %edx
movq %r12, %rdi
leaq 0x22de(%rip), %rsi      # 0x8544
callq 0x21d0
testl %eax, %eax
jne 0x6309
movq %r13, %rax
addq $0x10, %rax
movq %rax, 0x40(%r14)
movl $0x3, 0xc(%rsp)
jmp 0x630c
movq 0x38(%r14), %rdi
movl $0x5, %ecx
movq %r12, %rsi
leaq 0x267a(%rip), %rdx      # 0x8918
callq 0x67d9
testq %rax, %rax
je 0x6309
movq %rax, %r13
addq $0x5, %rax
movq %rax, 0x40(%r14)
movl $0x7, 0xc(%rsp)
jmp 0x630c
leaq 0xd(%r13), %r12
addq $-0x6, %rbp
cmpq $0xb, %rbp
jb 0x62e7
movl $0xa, %edx
movq %r12, %rdi
leaq 0x22ad(%rip), %rsi      # 0x8587
callq 0x21d0
testl %eax, %eax
je 0x640a
cmpq $0x6, %rbp
jb 0x6309
movl $0x5, %edx
movq %r12, %rdi
leaq 0x224c(%rip), %rsi      # 0x8548
callq 0x21d0
testl %eax, %eax
je 0x6429
xorl %r13d, %r13d
testq %r13, %r13
je 0x635a
movq 0x28(%r14), %rax
leaq -0x1(%r13), %rcx
cmpq %rax, %rcx
jb 0x632e
cmpb $0x21, (%rcx)
leaq -0x1(%rcx), %rcx
jne 0x6319
xorl %r13d, %r13d
xorl %eax, %eax
jmp 0x6356
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rsi
movb $0x1, %al
cmpq %rcx, %rsi
jae 0x6356
movzbl (%rsi), %edx
cmpl $0x9, %edx
je 0x634a
cmpl $0x20, %edx
jne 0x6399
incq %rsi
movq %rsi, 0x40(%r14)
cmpq %rcx, %rsi
jne 0x633d
testb %al, %al
je 0x635d
xorl %r13d, %r13d
testq %r13, %r13
jne 0x6493
movq %r14, %rdi
callq 0x51de
movq 0x38(%r14), %r13
cmpq 0x20(%r14), %r13
jb 0x5eea
jmp 0x6448
movq %r13, %rax
addq $0xb, %rax
movq %rax, 0x40(%r14)
movl $0x0, 0xc(%rsp)
jmp 0x630c
cmpl $0x28, %edx
jne 0x63f6
incq %rsi
movq %rsi, 0x40(%r14)
movq %r13, 0x38(%r14)
jmp 0x632a
movq %r13, %rax
addq $0xc, %rax
movq %rax, 0x40(%r14)
movl $0x1, 0xc(%rsp)
jmp 0x630c
movq %r13, %rax
addq $0x11, %rax
movq %rax, 0x40(%r14)
movl $0x4, 0xc(%rsp)
jmp 0x630c
movq %r13, %rax
addq $0xc, %rax
movq %rax, 0x40(%r14)
movl $0x2, 0xc(%rsp)
jmp 0x630c
movq %r14, %rdi
leaq 0x2cde(%rip), %rdx      # 0x90de
callq 0x5000
jmp 0x6327
movl $0x1, (%r15)
movq %r13, %rax
addq $0x17, %rax
movq %rax, 0x40(%r14)
movl $0x6, 0xc(%rsp)
jmp 0x630c
movl $0x1, (%r15)
movq %r13, %rax
addq $0x12, %rax
movq %rax, 0x40(%r14)
movl $0x5, 0xc(%rsp)
jmp 0x630c
movq 0x28(%r14), %rax
cmpq 0x20(%r14), %rax
jae 0x646f
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 0x6481
movq %r14, %rdi
callq 0x51ce
movq %rbx, %rdi
callq 0x5cf2
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq 0x38(%r14), %rax
subq %rcx, %rax
movq %rax, 0x20(%rbx)
movq 0x40(%r14), %rax
movq %rax, 0x38(%r14)
movl $0x1, %edi
movl $0x28, %esi
callq 0x2170
movq %rax, %r12
leaq 0x18(%rsp), %r13
movl $0x0, (%r13)
movl $0x1, 0x8(%rax)
movq 0x48(%r14), %rax
movq %rax, 0x10(%r12)
movl 0xc(%rsp), %eax
movl %eax, 0x18(%r12)
movq %r14, %rdi
movq %r13, %rsi
callq 0x6880
movq %rax, 0x20(%r12)
cmpl $0x0, (%r13)
jne 0x6535
testq %rax, %rax
je 0x6522
movq 0x40(%r14), %rax
incq %rax
movq %rax, 0x38(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5e9e
movq %rax, (%r12)
testq %rax, %rax
jne 0x6540
movq 0x38(%r14), %rsi
leaq 0x2c16(%rip), %rdx      # 0x9143
movq %r14, %rdi
callq 0x5000
movq %r12, %rdi
callq 0x5cf2
xorl %r12d, %r12d
movq %r12, (%rbx)
testq %r12, %r12
jne 0x6481
jmp 0x6477
leaq 0x29e9(%rip), %rdi      # 0x8f41
leaq 0x2894(%rip), %rsi      # 0x8df3
leaq 0x2ae6(%rip), %rcx      # 0x904c
movl $0x20a, %edx            # imm = 0x20A
callq 0x2120
leaq 0x29ca(%rip), %rdi      # 0x8f41
leaq 0x2875(%rip), %rsi      # 0x8df3
leaq 0x2afe(%rip), %rcx      # 0x9083
movl $0x1f2, %edx            # imm = 0x1F2
callq 0x2120