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

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void LCDRasterACBiasIntCountSet(uint32_t ui32Base, uint8_t ui8Count) {
  uint32_t ui32Val;
  ASSERT(ui32Base == 0x44050000);
  ASSERT(ui8Count < 16);
  ui32Val = (*((volatile uint32_t *)(ui32Base + 0x00000034)));
  ui32Val &= ~0x000F0000;
  ui32Val |= ((ui8Count << 16) & 0x000F0000);
  (*((volatile uint32_t *)(ui32Base + 0x00000034))) = ui32Val;
}


x86 assembly (clang, -O0):
<LCDRasterACBiasIntCountSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x44050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x10,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x34,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xfff0ffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
and    $0xf0000,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x34,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDRasterACBiasIntCountSet>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x44050000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x10,%ebx
setl   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
mov    $0xfff0ffff,%ecx
and    0x34(%rax),%ecx
and    $0xf,%ebx
shl    $0x10,%ebx
or     %ecx,%ebx
mov    %ebx,0x34(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @LCDRasterACBiasIntCountSet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1141178368
%8 = zext i1 %7 to i32
%9 = call i32 @ASSERT(i32 %8)
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 16
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 52
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = and i32 %19, -983041
store i32 %20, i32* %5
%21 = load i32, i32* %4
%22 = shl i32 %21, 16
%23 = and i32 %22, 983040
%24 = load i32, i32* %5
%25 = or i32 %24, %23
store i32 %25, i32* %5
%26 = load i32, i32* %5
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 52
%29 = sext i32 %28 to i64
%30 = inttoptr i64 %29 to i32*
store volatile i32 %26, i32* %30
ret void
}

LLVM IR (-O2):
define void @LCDRasterACBiasIntCountSet(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1141178368
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp slt i32 %1, 16
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = add nsw i32 %0, 52
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, -983041
%14 = shl i32 %1, 16
%15 = and i32 %14, 983040
%16 = or i32 %13, %15
store volatile i32 %16, i32* %11
ret void
}