// File: /workspace/github_c_makefile_star2_O1/yutopp[P]cc/parser.c
// Function: parse_stmt
ParserResult parse_stmt(Parser *parser) {
    ParserResult res;

    res = parse_stmt_compound(parser);
    if (res.result == PARSER_OK) {
        goto finish;
    }

    res = parse_stmt_expr(parser);
    if (res.result == PARSER_OK) {
        goto finish;
    }

    res = parse_stmt_selection(parser);
    if (res.result == PARSER_OK) {
        goto finish;
    }

    res = parse_stmt_jump(parser);
    if (res.result == PARSER_OK) {
        goto finish;
    }

    // Not matched...
    res.result = PARSER_ERROR;
    res.error.kind = PARSER_ERROR_KIND_UNEXPECTED; // TODO: fix
    fprintf(DEBUGOUT, "failed: parse stmt\n");

finish:
    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2384
cmpl $0x0, (%rbx)
je 0x28b4
movq 0x89da(%rip), %rbp      # 0xafd8
movq (%rbp), %rcx
leaq 0x4d22(%rip), %rdi      # 0x732b
movl $0x18, %esi
movl $0x1, %edx
callq 0x11b0
movq 0x10(%r14), %r12
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2a71
xorl %r13d, %r13d
cmpl $0x0, (%r15)
je 0x2638
xorl %r15d, %r15d
jmp 0x2657
movq (%rbp), %rcx
leaq 0x4d01(%rip), %rdi      # 0x7344
movl $0x1a, %esi
movl $0x1, %edx
callq 0x11b0
movq 0x18(%rsp), %r15
movq (%rbp), %rcx
leaq 0x4cfd(%rip), %rdi      # 0x735f
movl $0x17, %esi
movl $0x1, %edx
callq 0x11b0
movq %r14, %rdi
callq 0x2460
movq (%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x3216
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
je 0x26a1
xorl %r13d, %r13d
cmpl $0xa, (%rax)
setne %r13b
movl $0x1, %edx
cmovnel %edx, %ecx
movl %ecx, (%rsp)
movl %r13d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
testl %ecx, %ecx
je 0x26bd
movq %r12, 0x10(%r14)
jmp 0x26e0
incq 0x10(%r14)
movq 0x8(%r14), %rdi
callq 0x3876
movl $0x3, (%rax)
movq %r15, 0x8(%rax)
movl $0x0, (%rsp)
movq %rax, 0x18(%rsp)
movl (%rsp), %eax
movq 0x4(%rsp), %rcx
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rsi
movq %rsi, 0x10(%rbx)
movq 0x18(%rsp), %rsi
movq %rsi, 0x18(%rbx)
movl %eax, (%rbx)
movq %rcx, 0x4(%rbx)
movl %edx, 0xc(%rbx)
cmpl $0x0, (%rbx)
je 0x28b4
movq 0x10(%r14), %r15
movq (%rbp), %rcx
leaq 0x4c58(%rip), %rdi      # 0x7377
movl $0x1d, %esi
movl $0x1, %edx
callq 0x11b0
movq (%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x3216
movq %rax, %r12
testq %rax, %rax
je 0x2780
movq 0x10(%r14), %rsi
incq %rsi
movq %rsi, 0x10(%r14)
cmpl $0x1a, (%r12)
jne 0x278b
movq (%r14), %rdi
callq 0x3216
movq %rax, %r12
xorl %r13d, %r13d
testq %rax, %rax
sete %r13b
je 0x279b
xorl %ecx, %ecx
cmpl $0x4, (%r12)
setne %cl
movl $0x1, %eax
cmovnel %eax, %r13d
jmp 0x279d
sete %al
movzbl %al, %r13d
xorl %ecx, %ecx
jmp 0x27a9
movl $0x1, %ecx
movq %r12, %rax
movl $0x1, %r13d
jmp 0x27a9
xorl %ecx, %ecx
testl %r13d, %r13d
je 0x28c6
movq %r12, %rax
movq %r15, 0x10(%r14)
movl %r13d, (%rbx)
movl %esi, 0x4(%rbx)
movl %ecx, 0x8(%rbx)
movl %edx, 0xc(%rbx)
movq %rax, 0x10(%rbx)
movq %r12, 0x18(%rbx)
testl %r13d, %r13d
je 0x28b4
movq (%r14), %rdi
movq 0x10(%r14), %r15
movq %r15, %rsi
callq 0x3216
movq %rax, %r12
xorl %eax, %eax
testq %r12, %r12
sete %al
movl %eax, (%rsp)
movl $0x0, 0x8(%rsp)
movq %r12, 0x18(%rsp)
je 0x285b
incq 0x10(%r14)
cmpl $0x19, (%r12)
jne 0x284a
movq %rsp, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x2a71
cmpl $0x1, (%r13)
je 0x285b
movq 0x18(%rsp), %r13
movq (%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x3216
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
je 0x2928
xorl %edx, %edx
cmpl $0xa, (%rax)
setne %dl
movl $0x1, %esi
cmovnel %esi, %ecx
jmp 0x292a
movl $0x1, %eax
movl %eax, (%rsp)
movl %eax, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq %r15, 0x10(%r14)
movl (%rsp), %eax
movl 0x4(%rsp), %ecx
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdi
movq %rdi, 0x10(%rbx)
movq 0x18(%rsp), %rdi
movq %rdi, 0x18(%rbx)
movl %eax, (%rbx)
movl %ecx, 0x4(%rbx)
movl %edx, 0x8(%rbx)
movl %esi, 0xc(%rbx)
cmpl $0x0, (%rbx)
je 0x28b4
movl $0x1, %eax
movl %eax, (%rbx)
movl %eax, 0x8(%rbx)
movq (%rbp), %rcx
leaq 0x4a72(%rip), %rdi      # 0x7317
movl $0x13, %esi
movl $0x1, %edx
callq 0x11b0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incq 0x10(%r14)
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2a71
movl (%r12), %r13d
movq 0x18(%r12), %r12
cmpl $0x1, %r13d
jne 0x28fd
movl 0x4(%rsp), %esi
movl 0x8(%rsp), %ecx
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rax
jmp 0x27a9
movq (%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x3216
xorl %r13d, %r13d
testq %rax, %rax
sete %r13b
je 0x2972
xorl %ecx, %ecx
cmpl $0x5, (%rax)
setne %cl
movl $0x1, %edx
cmovnel %edx, %r13d
jmp 0x2974
xorl %edx, %edx
movl %ecx, (%rsp)
movl %edx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
testl %ecx, %ecx
jne 0x285b
incq 0x10(%r14)
movq 0x8(%r14), %rdi
callq 0x3876
movl $0x5, (%rax)
movl (%r12), %ecx
movl %ecx, 0x8(%rax)
movq %r13, 0x10(%rax)
movl $0x0, (%rsp)
movq %rax, 0x18(%rsp)
jmp 0x285f
xorl %ecx, %ecx
testl %r13d, %r13d
je 0x2981
movq %rax, %r12
jmp 0x27a9
incq 0x10(%r14)
movq %rsp, %rdi
movq %rdi, %r13
movq %r14, %rsi
callq 0x25d5
movq %r13, %rax
movl (%r13), %r13d
movq 0x18(%rax), %rdi
cmpl $0x1, %r13d
jne 0x29bd
movl 0x4(%rsp), %esi
movl 0x8(%rsp), %ecx
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rax
movq %rdi, %r12
jmp 0x27a9
movq %rdi, %r15
movq 0x8(%r14), %rdi
callq 0x3876
movl $0x4, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %rax, 0x20(%rsp)
movq $0x0, 0x18(%rax)
movq (%r14), %rdi
movq 0x10(%r14), %r15
movq %r15, %rsi
callq 0x3216
xorl %r13d, %r13d
movl $0x0, %ecx
testq %rax, %rax
sete %dl
je 0x2a14
sete %sil
xorl %ecx, %ecx
cmpl $0x1b, (%rax)
setne %cl
movl %ecx, %edx
orb %sil, %dl
testb %dl, %dl
je 0x2a22
movq 0x20(%rsp), %r12
jmp 0x27a9
incq 0x10(%r14)
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x25d5
movl 0x4(%r12), %esi
movl 0x8(%r12), %ecx
movl 0xc(%r12), %edx
movq 0x10(%r12), %rax
cmpl $0x1, (%r12)
jne 0x2a59
movq 0x20(%rsp), %r12
jmp 0x27a9
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %r12
movq %rdi, 0x18(%r12)
movq 0x10(%r14), %r15
jmp 0x27a9