#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 */
typedef int uint32_t;

/* Variables and functions */
void AONRTCCompareValueSet(uint32_t ui32Channel, uint32_t ui32CompValue) {

  ;
  if (ui32Channel & 0x1) {
    (*((volatile unsigned long *)(0x40092000 + 0x00000018))) = ui32CompValue;
  }
  if (ui32Channel & 0x2) {
    (*((volatile unsigned long *)(0x40092000 + 0x0000001C))) = ui32CompValue;
  }
  if (ui32Channel & 0x4) {
    (*((volatile unsigned long *)(0x40092000 + 0x00000020))) = ui32CompValue;
  }
}


x86 assembly (clang, -O0):
<AONRTCCompareValueSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1125 <AONRTCCompareValueSet+0x25>
movslq -0x8(%rbp),%rcx
mov    $0x40092018,%eax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1140 <AONRTCCompareValueSet+0x40>
movslq -0x8(%rbp),%rcx
mov    $0x4009201c,%eax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     115b <AONRTCCompareValueSet+0x5b>
movslq -0x8(%rbp),%rcx
mov    $0x40092020,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AONRTCCompareValueSet>:
movslq %esi,%rax
test   $0x1,%dil
jne    1116 <AONRTCCompareValueSet+0x16>
test   $0x2,%dil
jne    1124 <AONRTCCompareValueSet+0x24>
test   $0x4,%dil
jne    1132 <AONRTCCompareValueSet+0x32>
ret
mov    %rax,0x40092018
40
test   $0x2,%dil
je     110f <AONRTCCompareValueSet+0xf>
mov    %rax,0x4009201c
40
test   $0x4,%dil
je     1115 <AONRTCCompareValueSet+0x15>
mov    %rax,0x40092020
40
ret

LLVM IR (-O0):
define void @AONRTCCompareValueSet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
store volatile i64 %10, i64* inttoptr (i64 1074339864 to i64*)
br label %11
11: ; preds = %8, %2
%12 = load i32, i32* %3
%13 = and i32 %12, 2
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
store volatile i64 %17, i64* inttoptr (i64 1074339868 to i64*)
br label %18
18: ; preds = %15, %11
%19 = load i32, i32* %3
%20 = and i32 %19, 4
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
store volatile i64 %24, i64* inttoptr (i64 1074339872 to i64*)
br label %25
25: ; preds = %22, %18
ret void
}

LLVM IR (-O2):
define void @AONRTCCompareValueSet(i32 %0, i32 %1) {
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = sext i32 %1 to i64
store volatile i64 %6, i64* inttoptr (i64 1074339864 to i64*)
br label %7
7: ; preds = %5, %2
%8 = and i32 %0, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = sext i32 %1 to i64
store volatile i64 %11, i64* inttoptr (i64 1074339868 to i64*)
br label %12
12: ; preds = %10, %7
%13 = and i32 %0, 4
%14 = icmp eq i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = sext i32 %1 to i64
store volatile i64 %16, i64* inttoptr (i64 1074339872 to i64*)
br label %17
17: ; preds = %15, %12
ret void
}