#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 unsigned long volatile uint32_t;

/* Variables and functions */
void LCDRasterSubPanelConfigSet(uint32_t ui32Base, uint32_t ui32Flags,
                                uint32_t ui32BottomLines,
                                uint32_t ui32DefaultPixel) {
  ;

  ;
  ;
  ui32BottomLines--;
  (*((volatile unsigned long *)(ui32Base + 0x00000038))) =
      ((*((volatile unsigned long *)(ui32Base + 0x00000038))) & 0x80000000) |
      ui32Flags | ((ui32DefaultPixel & 0xFFFF) << 0) |
      ((ui32BottomLines << 16) & 0x03FF0000);
  (*((volatile unsigned long *)(ui32Base + 0x0000003C))) =
      ((ui32DefaultPixel >> 16) & 0x000000FF) |
      (((ui32BottomLines >> 16) & 1) << 8);
}


x86 assembly (clang, -O0):
<LCDRasterSubPanelConfigSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rcx
movabs $0x80000000,%rax
and    %rax,%rcx
mov    -0x10(%rbp),%rax
or     %rax,%rcx
mov    -0x20(%rbp),%rax
and    $0xffff,%rax
shl    $0x0,%rax
or     %rax,%rcx
mov    -0x18(%rbp),%rax
shl    $0x10,%rax
and    $0x3ff0000,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x38(%rax)
mov    -0x20(%rbp),%rcx
shr    $0x10,%rcx
and    $0xff,%rcx
mov    -0x18(%rbp),%rax
shr    $0x10,%rax
and    $0x1,%rax
shl    $0x8,%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x3c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDRasterSubPanelConfigSet>:
mov    %rdi,-0x18(%rsp)
mov    %rsi,-0x8(%rsp)
mov    %rdx,-0x20(%rsp)
mov    %rcx,-0x10(%rsp)
addq   $0xffffffffffffffff,-0x20(%rsp)
mov    -0x18(%rsp),%rax
mov    0x38(%rax),%rax
and    $0x80000000,%eax
or     -0x8(%rsp),%rax
mov    -0x10(%rsp),%rcx
movzwl %cx,%ecx
mov    -0x20(%rsp),%rdx
shl    $0x10,%edx
and    $0x3ff0000,%edx
or     %rcx,%rdx
or     %rax,%rdx
mov    -0x18(%rsp),%rax
mov    %rdx,0x38(%rax)
mov    -0x10(%rsp),%rax
shr    $0x10,%eax
movzbl %al,%eax
mov    -0x20(%rsp),%rcx
shr    $0x8,%rcx
and    $0x100,%ecx
or     %rax,%rcx
mov    -0x18(%rsp),%rax
mov    %rcx,0x3c(%rax)
ret

LLVM IR (-O0):
define void @LCDRasterSubPanelConfigSet(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store volatile i64 %0, i64* %5
store volatile i64 %1, i64* %6
store volatile i64 %2, i64* %7
store volatile i64 %3, i64* %8
%9 = load volatile i64, i64* %7
%10 = add i64 %9, -1
store volatile i64 %10, i64* %7
%11 = load volatile i64, i64* %5
%12 = add i64 %11, 56
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = and i64 %14, 2147483648
%16 = load volatile i64, i64* %6
%17 = or i64 %15, %16
%18 = load volatile i64, i64* %8
%19 = and i64 %18, 65535
%20 = shl i64 %19, 0
%21 = or i64 %17, %20
%22 = load volatile i64, i64* %7
%23 = shl i64 %22, 16
%24 = and i64 %23, 67043328
%25 = or i64 %21, %24
%26 = load volatile i64, i64* %5
%27 = add i64 %26, 56
%28 = inttoptr i64 %27 to i64*
store volatile i64 %25, i64* %28
%29 = load volatile i64, i64* %8
%30 = lshr i64 %29, 16
%31 = and i64 %30, 255
%32 = load volatile i64, i64* %7
%33 = lshr i64 %32, 16
%34 = and i64 %33, 1
%35 = shl i64 %34, 8
%36 = or i64 %31, %35
%37 = load volatile i64, i64* %5
%38 = add i64 %37, 60
%39 = inttoptr i64 %38 to i64*
store volatile i64 %36, i64* %39
ret void
}

LLVM IR (-O2):
define void @LCDRasterSubPanelConfigSet(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store volatile i64 %0, i64* %5
store volatile i64 %1, i64* %6
store volatile i64 %2, i64* %7
store volatile i64 %3, i64* %8
%9 = load volatile i64, i64* %7
%10 = add i64 %9, -1
store volatile i64 %10, i64* %7
%11 = load volatile i64, i64* %5
%12 = add i64 %11, 56
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = and i64 %14, 2147483648
%16 = load volatile i64, i64* %6
%17 = or i64 %15, %16
%18 = load volatile i64, i64* %8
%19 = and i64 %18, 65535
%20 = or i64 %17, %19
%21 = load volatile i64, i64* %7
%22 = shl i64 %21, 16
%23 = and i64 %22, 67043328
%24 = or i64 %20, %23
%25 = load volatile i64, i64* %5
%26 = add i64 %25, 56
%27 = inttoptr i64 %26 to i64*
store volatile i64 %24, i64* %27
%28 = load volatile i64, i64* %8
%29 = lshr i64 %28, 16
%30 = and i64 %29, 255
%31 = load volatile i64, i64* %7
%32 = lshr i64 %31, 8
%33 = and i64 %32, 256
%34 = or i64 %33, %30
%35 = load volatile i64, i64* %5
%36 = add i64 %35, 60
%37 = inttoptr i64 %36 to i64*
store volatile i64 %34, i64* %37
ret void
}