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

/* Variables and functions */
void SysCtlPeripheralReset(uint32_t ui32Peripheral) {
  volatile uint_fast8_t ui8Delay;
  ;
  (*((volatile unsigned long
          *)(((unsigned long)(0x400fe500 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400fe500 + ((ui32Peripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ui32Peripheral & 0xff) << 2)))) = 1;
  for (ui8Delay = 0; ui8Delay < 16; ui8Delay++) {
  }
  (*((volatile unsigned long
          *)(((unsigned long)(0x400fe500 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400fe500 + ((ui32Peripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ui32Peripheral & 0xff) << 2)))) = 0;
}


x86 assembly (clang, -O0):
<SysCtlPeripheralReset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fe500,%eax
cltq
movabs $0xf0000000,%rcx
and    %rcx,%rax
or     $0x2000000,%rax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe500,%ecx
movslq %ecx,%rcx
and    $0xfffff,%rcx
shl    $0x5,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
movq   $0x1,(%rax)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x10,%eax
jge    118e <SysCtlPeripheralReset+0x8e>
jmp    1180 <SysCtlPeripheralReset+0x80>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116f <SysCtlPeripheralReset+0x6f>
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fe500,%eax
cltq
movabs $0xf0000000,%rcx
and    %rcx,%rax
or     $0x2000000,%rax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe500,%ecx
movslq %ecx,%rcx
and    $0xfffff,%rcx
shl    $0x5,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPeripheralReset>:
movzbl %dil,%eax
shr    $0x3,%edi
and    $0x1fe0,%edi
shl    $0x2,%eax
or     %edi,%eax
movq   $0x1,0x43fca000(%rax)
or     $0x43fca000,%rax
movl   $0x0,-0x4(%rsp)
mov    -0x4(%rsp),%ecx
cmp    $0xf,%ecx
jg     114e <SysCtlPeripheralReset+0x4e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%ecx
cmp    $0x10,%ecx
jl     1140 <SysCtlPeripheralReset+0x40>
movq   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @SysCtlPeripheralReset(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 65280
%6 = ashr i32 %5, 8
%7 = add nsw i32 1074783488, %6
%8 = sext i32 %7 to i64
%9 = and i64 %8, 4026531840
%10 = or i64 %9, 33554432
%11 = load i32, i32* %2
%12 = and i32 %11, 65280
%13 = ashr i32 %12, 8
%14 = add nsw i32 1074783488, %13
%15 = sext i32 %14 to i64
%16 = and i64 %15, 1048575
%17 = shl i64 %16, 5
%18 = or i64 %10, %17
%19 = load i32, i32* %2
%20 = and i32 %19, 255
%21 = shl i32 %20, 2
%22 = sext i32 %21 to i64
%23 = or i64 %18, %22
%24 = inttoptr i64 %23 to i64*
store volatile i64 1, i64* %24
store volatile i32 0, i32* %3
br label %25
25: ; preds = %29, %1
%26 = load volatile i32, i32* %3
%27 = icmp slt i32 %26, 16
br i1 %27, label %28, label %32
28: ; preds = %25
br label %29
29: ; preds = %28
%30 = load volatile i32, i32* %3
%31 = add nsw i32 %30, 1
store volatile i32 %31, i32* %3
br label %25
32: ; preds = %25
%33 = load i32, i32* %2
%34 = and i32 %33, 65280
%35 = ashr i32 %34, 8
%36 = add nsw i32 1074783488, %35
%37 = sext i32 %36 to i64
%38 = and i64 %37, 4026531840
%39 = or i64 %38, 33554432
%40 = load i32, i32* %2
%41 = and i32 %40, 65280
%42 = ashr i32 %41, 8
%43 = add nsw i32 1074783488, %42
%44 = sext i32 %43 to i64
%45 = and i64 %44, 1048575
%46 = shl i64 %45, 5
%47 = or i64 %39, %46
%48 = load i32, i32* %2
%49 = and i32 %48, 255
%50 = shl i32 %49, 2
%51 = sext i32 %50 to i64
%52 = or i64 %47, %51
%53 = inttoptr i64 %52 to i64*
store volatile i64 0, i64* %53
ret void
}

LLVM IR (-O2):
define void @SysCtlPeripheralReset(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = lshr i32 %0, 3
%5 = and i32 %4, 8160
%6 = shl i32 %0, 2
%7 = and i32 %6, 1020
%8 = or i32 %7, %5
%9 = or i32 %8, 1140629504
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i64*
store volatile i64 1, i64* %11
store volatile i32 0, i32* %2
%12 = load volatile i32, i32* %2
%13 = icmp slt i32 %12, 16
br i1 %13, label %14, label %19
14: ; preds = %1, %14
%15 = load volatile i32, i32* %2
%16 = add nsw i32 %15, 1
store volatile i32 %16, i32* %2
%17 = load volatile i32, i32* %2
%18 = icmp slt i32 %17, 16
br i1 %18, label %14, label %19
19: ; preds = %14, %1
store volatile i64 0, i64* %11
ret void
}