#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct case_data {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int eat_clears(int /*<<< orphan*/ *, struct case_data *);
int eat_combos(int /*<<< orphan*/ *, struct case_data *);
int eat_invoke(int /*<<< orphan*/ *, struct case_data *);
int parse_line(FILE *in, struct case_data *cd) {
  int ret;
  if ((ret = eat_combos(in, cd)))
    return ret;
  if ((ret = eat_clears(in, cd)))
    return ret;
  if ((ret = eat_invoke(in, cd)))
    return ret;
  return 0;
}


x86 assembly (clang, -O0):
<parse_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <eat_combos@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1164 <parse_line+0x34>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11b3 <parse_line+0x83>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <eat_clears@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1188 <parse_line+0x58>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11b3 <parse_line+0x83>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <eat_invoke@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     11ac <parse_line+0x7c>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11b3 <parse_line+0x83>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_line>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <eat_combos@plt>
test   %eax,%eax
jne    1152 <parse_line+0x22>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <eat_clears@plt>
test   %eax,%eax
je     115a <parse_line+0x2a>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <eat_invoke@plt>

LLVM IR (-O0):
%struct.case_data = type { i32 }
define i32 @parse_line(i32* %0, %struct.case_data* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.case_data*
%6 = alloca i32
store i32* %0, i32** %4
store %struct.case_data* %1, %struct.case_data** %5
%7 = load i32*, i32** %4
%8 = load %struct.case_data*, %struct.case_data** %5
%9 = call i32 @eat_combos(i32* %7, %struct.case_data* %8)
store i32 %9, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %6
store i32 %12, i32* %3
br label %28
13: ; preds = %2
%14 = load i32*, i32** %4
%15 = load %struct.case_data*, %struct.case_data** %5
%16 = call i32 @eat_clears(i32* %14, %struct.case_data* %15)
store i32 %16, i32* %6
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %13
%19 = load i32, i32* %6
store i32 %19, i32* %3
br label %28
20: ; preds = %13
%21 = load i32*, i32** %4
%22 = load %struct.case_data*, %struct.case_data** %5
%23 = call i32 @eat_invoke(i32* %21, %struct.case_data* %22)
store i32 %23, i32* %6
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %20
%26 = load i32, i32* %6
store i32 %26, i32* %3
br label %28
27: ; preds = %20
store i32 0, i32* %3
br label %28
28: ; preds = %27, %25, %18, %11
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
%struct.case_data = type { i32 }
define i32 @parse_line(i32* %0, %struct.case_data* %1) {
%3 = tail call i32 @eat_combos(i32* %0, %struct.case_data* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 @eat_clears(i32* %0, %struct.case_data* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @eat_invoke(i32* %0, %struct.case_data* %1)
br label %10
10: ; preds = %8, %5, %2
%11 = phi i32 [ %3, %2 ], [ %6, %5 ], [ %9, %8 ]
ret i32 %11
}