// File: /workspace/github_c_makefile_star2_O0/ieyasu[P]funit/parse_test_file.c
// Function: parse_set
static struct TestSet *parse_set(struct ParseState *ps)
{
    struct TestSet *set = NEW0(struct TestSet);
    char *tok;
    size_t len;

    assert(ps->next_pos != NULL);
    assert(ps->next_pos > ps->read_pos);

    set->name = expect_name(ps, &set->namelen, "set");
    if (!set->name) goto err;

    if (expect_eol(ps)) goto err;

    // set contents: dep, tolerance, setup, teardown, test case, fortran
    set->tolerance = 0.0; // XXX magic number == BAD
    for (;;) {
        tok = next_token(ps, &len);
        if (tok == END_OF_LINE) {
            if (!next_line(ps)) {
                syntax_error(ps);
                goto err; // EOF
            }
        } else if (tok) {
            if (same_token("dep", 3, tok, len)) {
                struct TestDependency *dep = parse_dependency(ps);
                if (!dep)
                    goto err;
                dep->next = set->deps;
                set->deps = dep;
                set->n_deps++;
            } else if (same_token("use", 3, tok, len)) {
                struct TestModule *mod = parse_module(ps);
                if (!mod)
                    goto err;

                mod->next = set->mods;
                set->mods = mod;
                set->n_mods++;
            } else if (same_token("tolerance", 9, tok, len)) {
                char *tolend;
                tok = next_token(ps, &len);
                if (!tok || tok == END_OF_LINE) {
                    parse_fail(ps, ps->read_pos, "expected tolerance value");
                    goto err;
                }
                set->tolerance = strtod(ps->read_pos, &tolend);
                if (tolend == ps->read_pos || tolend != ps->next_pos) {
                    parse_fail(ps, ps->read_pos, "not a floating point value");
                    goto err;
                }
                ps->next_pos = tolend;
            } else if (same_token("setup", 5, tok, len)) {
                if (set->setup) {
                    parse_fail(ps, ps->next_pos,
                         "more than one setup case specified");
                    goto err;
                }
                set->setup = parse_support(ps, "setup");
                if (!set->setup)
                    goto err;
            } else if (same_token("teardown", 8, tok, len)) {
                if (set->teardown) {
                    parse_fail(ps, ps->next_pos,
                         "more than one teardown case specified");
                    goto err;
                }
                set->teardown = parse_support(ps, "teardown");
                if (!set->teardown)
                    goto err;
            } else if (same_token("test", 4, tok, len)) {
                struct TestCase *test = parse_test_case(ps);
                if (!test)
                    goto err;
                test->next = set->tests;
                set->tests = test;
                set->n_tests++;
            } else if (same_token("end", 3, tok, len)) {
                ps->next_pos = ps->read_pos;
                break; // end of test set
            } else { // fortran code
                struct Code *code;
                ps->next_pos = ps->read_pos = ps->line_pos;
                code = parse_fortran(ps, NULL);
                // XXX check for parse fail?
                code->next = set->code;
                set->code = code;
            }
        } else { // EOF
            parse_fail(ps, ps->read_pos, "expected end set");
            goto err;
        }
    }

    // end set name
    if (parse_end_sequence(ps, "set", set->name, set->namelen))
        goto err;

    return set;
 err:
    free_sets(set);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x2180
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x712c
jmp 0x714b
leaq 0x4d5d(%rip), %rdi      # 0xbe90
leaq 0x4f65(%rip), %rsi      # 0xc09f
movl $0x2dc, %edx            # imm = 0x2DC
leaq 0x4fa6(%rip), %rcx      # 0xc0ec
callq 0x2120
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x715f
jmp 0x717e
leaq 0x4fb5(%rip), %rdi      # 0xc11b
leaq 0x4f32(%rip), %rsi      # 0xc09f
movl $0x2dd, %edx            # imm = 0x2DD
leaq 0x4f73(%rip), %rcx      # 0xc0ec
callq 0x2120
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x58, %rsi
leaq 0x5047(%rip), %rdx      # 0xc1d8
callq 0x7750
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x71b1
jmp 0x75d1
movq -0x10(%rbp), %rdi
callq 0x77d0
cmpl $0x0, %eax
je 0x71c4
jmp 0x75d1
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rax)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7060
movq %rax, -0x20(%rbp)
movl $0x1, %eax
cmpq %rax, -0x20(%rbp)
jne 0x720e
movq -0x10(%rbp), %rdi
callq 0x66b0
cmpq $0x0, %rax
jne 0x7209
movq -0x10(%rbp), %rdi
callq 0x6680
jmp 0x75d1
jmp 0x759b
cmpq $0x0, -0x20(%rbp)
je 0x757f
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x4f0f(%rip), %rdi      # 0xc137
movl $0x3, %esi
callq 0x7090
cmpl $0x0, %eax
je 0x7280
movq -0x10(%rbp), %rdi
callq 0x7880
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x7250
jmp 0x75d1
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rax)
jmp 0x757d
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x4eac(%rip), %rdi      # 0xc13b
movl $0x3, %esi
callq 0x7090
cmpl $0x0, %eax
je 0x72e7
movq -0x10(%rbp), %rdi
callq 0x7910
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x72b7
jmp 0x75d1
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x757b
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x4e49(%rip), %rdi      # 0xc13f
movl $0x9, %esi
callq 0x7090
cmpl $0x0, %eax
je 0x73ad
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7060
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x732c
movl $0x1, %eax
cmpq %rax, -0x20(%rbp)
jne 0x7349
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
leaq 0x4e0a(%rip), %rdx      # 0xc149
callq 0x63e0
jmp 0x75d1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x20a0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x60(%rax)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
je 0x737f
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x40(%rcx), %rax
je 0x739c
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
leaq 0x4dd0(%rip), %rdx      # 0xc162
callq 0x63e0
jmp 0x75d1
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x7579
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x400d(%rip), %rdi      # 0xb3c9
movl $0x5, %esi
callq 0x7090
cmpl $0x0, %eax
je 0x7423
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x73f3
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
leaq 0x4d94(%rip), %rdx      # 0xc17d
callq 0x63e0
jmp 0x75d1
movq -0x10(%rbp), %rdi
leaq 0x3fcb(%rip), %rsi      # 0xb3c9
callq 0x7a20
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x741e
jmp 0x75d1
jmp 0x7577
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x3f9d(%rip), %rdi      # 0xb3cf
movl $0x8, %esi
callq 0x7090
cmpl $0x0, %eax
je 0x7499
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x7469
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
leaq 0x4d41(%rip), %rdx      # 0xc1a0
callq 0x63e0
jmp 0x75d1
movq -0x10(%rbp), %rdi
leaq 0x3f5b(%rip), %rsi      # 0xb3cf
callq 0x7a20
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x7494
jmp 0x75d1
jmp 0x7575
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x4d1e(%rip), %rdi      # 0xc1c6
movl $0x4, %esi
callq 0x7090
cmpl $0x0, %eax
je 0x74fd
movq -0x10(%rbp), %rdi
callq 0x7ab0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x74d0
jmp 0x75d1
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
jmp 0x7573
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x4980(%rip), %rdi      # 0xbe8c
movl $0x3, %esi
callq 0x7090
cmpl $0x0, %eax
je 0x752d
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x75a0
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7bd0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x7573
jmp 0x7575
jmp 0x7577
jmp 0x7579
jmp 0x757b
jmp 0x757d
jmp 0x7599
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
leaq 0x4c39(%rip), %rdx      # 0xc1cb
callq 0x63e0
jmp 0x75d1
jmp 0x759b
jmp 0x71d0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rcx
leaq 0x4c1d(%rip), %rsi      # 0xc1d8
callq 0x7de0
cmpl $0x0, %eax
je 0x75c7
jmp 0x75d1
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x75e2
movq -0x18(%rbp), %rdi
callq 0x6e60
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)