#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__ CheckCentOn();
scalar_t__ CheckHitT();
scalar_t__ CheckRightOff();
int TMR_IsTimerExpired(int);
unsigned char CheckEventsGentRight(void) {
  if (CheckHitT() != 0)
    return 7;
  if (CheckCentOn() != 0)
    return 3;
  if (CheckRightOff() != 0)
    return 6;
  if (TMR_IsTimerExpired(1) == 1)
    return 8;
}


x86 assembly (clang, -O0):
<CheckEventsGentRight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <CheckHitT@plt>
cmp    $0x0,%rax
je     1162 <CheckEventsGentRight+0x22>
movb   $0x7,-0x1(%rbp)
jmp    11ad <CheckEventsGentRight+0x6d>
mov    $0x0,%al
call   1060 <CheckCentOn@plt>
cmp    $0x0,%rax
je     117c <CheckEventsGentRight+0x3c>
movb   $0x3,-0x1(%rbp)
jmp    11ad <CheckEventsGentRight+0x6d>
mov    $0x0,%al
call   1040 <CheckRightOff@plt>
cmp    $0x0,%rax
je     1196 <CheckEventsGentRight+0x56>
movb   $0x6,-0x1(%rbp)
jmp    11ad <CheckEventsGentRight+0x6d>
mov    $0x1,%edi
call   1050 <TMR_IsTimerExpired@plt>
cmp    $0x1,%eax
jne    11ad <CheckEventsGentRight+0x6d>
movb   $0x8,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckEventsGentRight>:
push   %rax
xor    %eax,%eax
call   1030 <CheckHitT@plt>
mov    %rax,%rcx
mov    $0x7,%al
test   %rcx,%rcx
je     1154 <CheckEventsGentRight+0x14>
pop    %rcx
ret
xor    %eax,%eax
call   1060 <CheckCentOn@plt>
mov    %rax,%rcx
mov    $0x3,%al
test   %rcx,%rcx
jne    1152 <CheckEventsGentRight+0x12>
xor    %eax,%eax
call   1040 <CheckRightOff@plt>
mov    %rax,%rcx
mov    $0x6,%al
test   %rcx,%rcx
jne    1152 <CheckEventsGentRight+0x12>
mov    $0x1,%edi
call   1050 <TMR_IsTimerExpired@plt>
mov    $0x8,%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @CheckEventsGentRight() {
%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 %17
5: ; preds = %0
%6 = call i64 (...) @CheckCentOn()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i8 3, i8* %1
br label %17
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 %17
13: ; preds = %9
%14 = call i32 @TMR_IsTimerExpired(i32 1)
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %17
16: ; preds = %13
store i8 8, i8* %1
br label %17
17: ; preds = %4, %8, %12, %16, %13
%18 = load i8, i8* %1
ret i8 %18
}

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