#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 */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
unsigned long SysCtlPeripheralMapToNew(unsigned long);
int /*<<< orphan*/ SysCtlPeripheralValid(unsigned long);
void SysCtlPeripheralPowerOff(unsigned long ulPeripheral) {
  DEBUG_ASSERT(SysCtlPeripheralValid(ulPeripheral));
  ulPeripheral = SysCtlPeripheralMapToNew(ulPeripheral);
  (*((volatile unsigned long
          *)(((unsigned long)(0x400fe900 + ((ulPeripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400fe900 + ((ulPeripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ulPeripheral & 0xff) << 2)))) = 0;
}


x86 assembly (clang, -O0):
<SysCtlPeripheralPowerOff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <SysCtlPeripheralValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rdi
call   1040 <SysCtlPeripheralMapToNew@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff00,%rax
shr    $0x8,%rax
add    $0x400fe900,%rax
movabs $0xf0000000,%rcx
and    %rcx,%rax
or     $0x2000000,%rax
mov    -0x8(%rbp),%rcx
and    $0xff00,%rcx
shr    $0x8,%rcx
add    $0x400fe900,%rcx
and    $0xfffff,%rcx
shl    $0x5,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff,%rcx
shl    $0x2,%rcx
or     %rcx,%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPeripheralPowerOff>:
push   %rbx
mov    %rdi,%rbx
call   1050 <SysCtlPeripheralValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    %rbx,%rdi
call   1040 <SysCtlPeripheralMapToNew@plt>
movzbl %al,%ecx
shr    $0x3,%rax
and    $0x1fe0,%eax
shl    $0x2,%rcx
or     %rax,%rcx
movq   $0x0,0x43fd2000(%rcx)
pop    %rbx
ret

LLVM IR (-O0):
define void @SysCtlPeripheralPowerOff(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @SysCtlPeripheralValid(i64 %3)
%5 = call i32 @DEBUG_ASSERT(i32 %4)
%6 = load i64, i64* %2
%7 = call i64 @SysCtlPeripheralMapToNew(i64 %6)
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = and i64 %8, 65280
%10 = lshr i64 %9, 8
%11 = add i64 1074784512, %10
%12 = and i64 %11, 4026531840
%13 = or i64 %12, 33554432
%14 = load i64, i64* %2
%15 = and i64 %14, 65280
%16 = lshr i64 %15, 8
%17 = add i64 1074784512, %16
%18 = and i64 %17, 1048575
%19 = shl i64 %18, 5
%20 = or i64 %13, %19
%21 = load i64, i64* %2
%22 = and i64 %21, 255
%23 = shl i64 %22, 2
%24 = or i64 %20, %23
%25 = inttoptr i64 %24 to i64*
store volatile i64 0, i64* %25
ret void
}

LLVM IR (-O2):
define void @SysCtlPeripheralPowerOff(i64 %0) {
%2 = tail call i32 @SysCtlPeripheralValid(i64 %0)
%3 = tail call i32 @DEBUG_ASSERT(i32 %2)
%4 = tail call i64 @SysCtlPeripheralMapToNew(i64 %0)
%5 = lshr i64 %4, 3
%6 = and i64 %5, 8160
%7 = shl i64 %4, 2
%8 = and i64 %7, 1020
%9 = or i64 %8, %6
%10 = or i64 %9, 1140662272
%11 = inttoptr i64 %10 to i64*
store volatile i64 0, i64* %11
ret void
}