#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 */

/* Variables and functions */
scalar_t__ CheckCentOff();
scalar_t__ CheckHitT();
scalar_t__ CheckLeftOff();
scalar_t__ CheckRightOff();
int TMR_IsTimerExpired(int);
unsigned char CheckEventsGentLeft(void) {
  if (CheckHitT() != 0)
    return 7;
  if (CheckLeftOff() != 0)
    return 2;
  if (CheckRightOff() != 0)
    return 6;
  if (CheckCentOff() != 0)
    return 4;
  if (TMR_IsTimerExpired(1) == 1)
    return 8;
}


x86 assembly (clang, -O0):
<CheckEventsGentLeft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <CheckHitT@plt>
cmp    $0x0,%rax
je     1172 <CheckEventsGentLeft+0x22>
movb   $0x7,-0x1(%rbp)
jmp    11d7 <CheckEventsGentLeft+0x87>
mov    $0x0,%al
call   1040 <CheckLeftOff@plt>
cmp    $0x0,%rax
je     118c <CheckEventsGentLeft+0x3c>
movb   $0x2,-0x1(%rbp)
jmp    11d7 <CheckEventsGentLeft+0x87>
mov    $0x0,%al
call   1050 <CheckRightOff@plt>
cmp    $0x0,%rax
je     11a6 <CheckEventsGentLeft+0x56>
movb   $0x6,-0x1(%rbp)
jmp    11d7 <CheckEventsGentLeft+0x87>
mov    $0x0,%al
call   1070 <CheckCentOff@plt>
cmp    $0x0,%rax
je     11c0 <CheckEventsGentLeft+0x70>
movb   $0x4,-0x1(%rbp)
jmp    11d7 <CheckEventsGentLeft+0x87>
mov    $0x1,%edi
call   1060 <TMR_IsTimerExpired@plt>
cmp    $0x1,%eax
jne    11d7 <CheckEventsGentLeft+0x87>
movb   $0x8,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckEventsGentLeft>:
push   %rax
xor    %eax,%eax
call   1030 <CheckHitT@plt>
mov    %rax,%rcx
mov    $0x7,%al
test   %rcx,%rcx
je     1164 <CheckEventsGentLeft+0x14>
pop    %rcx
ret
xor    %eax,%eax
call   1040 <CheckLeftOff@plt>
mov    %rax,%rcx
mov    $0x2,%al
test   %rcx,%rcx
jne    1162 <CheckEventsGentLeft+0x12>
xor    %eax,%eax
call   1050 <CheckRightOff@plt>
mov    %rax,%rcx
mov    $0x6,%al
test   %rcx,%rcx
jne    1162 <CheckEventsGentLeft+0x12>
xor    %eax,%eax
call   1070 <CheckCentOff@plt>
mov    %rax,%rcx
mov    $0x4,%al
test   %rcx,%rcx
jne    1162 <CheckEventsGentLeft+0x12>
mov    $0x1,%edi
call   1060 <TMR_IsTimerExpired@plt>
mov    $0x8,%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @CheckEventsGentLeft() {
%1 = alloca i8
%2 = call i64 (...) @CheckHitT()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8 7, i8* %1
br label %21
5: ; preds = %0
%6 = call i64 (...) @CheckLeftOff()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i8 2, i8* %1
br label %21
9: ; preds = %5
%10 = call i64 (...) @CheckRightOff()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i8 6, i8* %1
br label %21
13: ; preds = %9
%14 = call i64 (...) @CheckCentOff()
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i8 4, i8* %1
br label %21
17: ; preds = %13
%18 = call i32 @TMR_IsTimerExpired(i32 1)
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %21
20: ; preds = %17
store i8 8, i8* %1
br label %21
21: ; preds = %4, %8, %12, %16, %20, %17
%22 = load i8, i8* %1
ret i8 %22
}

LLVM IR (-O2):
define zeroext i8 @CheckEventsGentLeft() {
%1 = tail call i64 (...) @CheckHitT()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %14
3: ; preds = %0
%4 = tail call i64 (...) @CheckLeftOff()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = tail call i64 (...) @CheckRightOff()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = tail call i64 (...) @CheckCentOff()
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 @TMR_IsTimerExpired(i32 1)
br label %14
14: ; preds = %12, %9, %6, %3, %0
%15 = phi i8 [ 7, %0 ], [ 2, %3 ], [ 6, %6 ], [ 4, %9 ], [ 8, %12 ]
ret i8 %15
}