// File: /workspace/github_c_makefile_star2_O0/ryvnf[P]czc/parse.c
// Function: parse_stmt
static struct ast *parse_stmt(struct parse *parse)
{
    struct loc *line = get_linenr(parse);
    switch (peek_tok(parse)->type)
    {
        case IF_TOK:
            return parse_if_stmt(parse);

        case FOR_TOK:
            return parse_for_stmt(parse);

        case SWITCH_TOK:
            return parse_switch_stmt(parse);

        case TYPE_TOK:
            return parse_type_def(parse);

        case DEFINE_TOK:
            return parse_alias_def(parse);

        case RETURN_TOK:
            parse->pos++;
            return term_semicolon(parse, ast_new_ast(line, RETURN_STMT, 1, parse_expr(parse)));

        case GOTO_TOK:
            return term_semicolon(parse, parse_goto_stmt(parse));

        case BREAK_TOK:
            parse->pos++;
            return term_semicolon(parse, ast_new(line, BREAK_STMT));

        case CONTINUE_TOK:
            parse->pos++;
            return term_semicolon(parse, ast_new(line, CONTINUE_STMT));

        case FALLTHROUGH_TOK:
            parse->pos++;
            return term_semicolon(parse, ast_new(line, FALLTHROUGH_STMT));

        case IDENT_TOK:  {
            size_t pos = parse->pos;
            struct ast *lbl = parse_label_stmt(parse);
            if (lbl == NULL) {
                parse->pos = pos;
                break;
            }

            return lbl;
        }
    }

    return term_semicolon(parse, parse_expr(parse));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcb70
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcd10
movl (%rax), %eax
addl $0xfffffefe, %eax       # imm = 0xFFFFFEFE
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x2b, %eax
ja 0xea8d
movq -0x30(%rbp), %rax
leaq 0x5b69(%rip), %rcx      # 0x1443c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
callq 0xeac0
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rdi
callq 0xebf0
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rdi
callq 0xed50
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rdi
callq 0xd1c0
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rdi
callq 0xd260
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd870
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl $0x4105, %esi           # imm = 0x4105
movl $0x1, %edx
movb $0x0, %al
callq 0x2510
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0xd720
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0xee20
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0xd720
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movl $0x3, %esi
callq 0x2360
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0xd720
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x2360
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0xd720
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movl $0x5, %esi
callq 0x2360
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0xd720
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rax
movslq 0x14(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xeea0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xea83
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0xea8d
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xeaae
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd870
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0xd720
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)