#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 */
unsigned int LCDVersionGet();
void RasterIntEnable(unsigned int baseAddr, unsigned int flag) {
  unsigned int version = 0;
  version = LCDVersionGet();
  if (2u == version) {
    (*((volatile unsigned int *)(baseAddr + (0x60)))) |= flag;
  } else if (1u == version) {
    (*((volatile unsigned int *)(baseAddr + (0x28)))) |= flag;
  } else {
    ;
  }
}


x86 assembly (clang, -O0):
<RasterIntEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <LCDVersionGet@plt>
mov    %eax,-0xc(%rbp)
mov    $0x2,%eax
cmp    -0xc(%rbp),%eax
jne    1153 <RasterIntEnable+0x43>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x60,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
jmp    1181 <RasterIntEnable+0x71>
mov    $0x1,%eax
cmp    -0xc(%rbp),%eax
jne    1177 <RasterIntEnable+0x67>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x28,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
jmp    117c <RasterIntEnable+0x6c>
jmp    117c <RasterIntEnable+0x6c>
jmp    1181 <RasterIntEnable+0x71>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RasterIntEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <LCDVersionGet@plt>
cmp    $0x2,%eax
je     112f <RasterIntEnable+0x1f>
cmp    $0x1,%eax
jne    1138 <RasterIntEnable+0x28>
mov    $0x28,%eax
jmp    1134 <RasterIntEnable+0x24>
mov    $0x60,%eax
add    %ebp,%eax
or     %ebx,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @RasterIntEnable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = call i32 (...) @LCDVersionGet()
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = icmp eq i32 2, %7
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = add i32 %11, 96
%13 = zext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = load volatile i32, i32* %14
%16 = or i32 %15, %10
store volatile i32 %16, i32* %14
br label %30
17: ; preds = %2
%18 = load i32, i32* %5
%19 = icmp eq i32 1, %18
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = add i32 %22, 40
%24 = zext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
%26 = load volatile i32, i32* %25
%27 = or i32 %26, %21
store volatile i32 %27, i32* %25
br label %29
28: ; preds = %17
br label %29
29: ; preds = %28, %20
br label %30
30: ; preds = %29, %9
ret void
}

LLVM IR (-O2):
define void @RasterIntEnable(i32 %0, i32 %1) {
%3 = tail call i32 (...) @LCDVersionGet()
switch i32 %3, label %12 [
i32 2, label %5
i32 1, label %4
]
4: ; preds = %2
br label %5
5: ; preds = %2, %4
%6 = phi i32 [ 40, %4 ], [ 96, %2 ]
%7 = add i32 %6, %0
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = or i32 %10, %1
store volatile i32 %11, i32* %9
br label %12
12: ; preds = %5, %2
ret void
}