#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 uint32_t
          *)(((uint32_t)(0x400fe500 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((uint32_t)(0x400fe500 + ((ui32Peripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ui32Peripheral & 0xff) << 2)))) = 1;
  for (ui8Delay = 0; ui8Delay < 16; ui8Delay++) {
  }
  (*((volatile uint32_t
          *)(((uint32_t)(0x400fe500 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((uint32_t)(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
and    $0xf0000000,%eax
or     $0x2000000,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe500,%ecx
and    $0xfffff,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,%eax
movl   $0x1,(%rax)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x10,%eax
jge    117a <SysCtlPeripheralReset+0x7a>
jmp    116c <SysCtlPeripheralReset+0x6c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115b <SysCtlPeripheralReset+0x5b>
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fe500,%eax
and    $0xf0000000,%eax
or     $0x2000000,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe500,%ecx
and    $0xfffff,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,%eax
movl   $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
movl   $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)
nopl   (%rax)
addl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%ecx
cmp    $0x10,%ecx
jl     1140 <SysCtlPeripheralReset+0x40>
movl   $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 = and i32 %7, -268435456
%9 = or i32 %8, 33554432
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = ashr i32 %11, 8
%13 = add nsw i32 1074783488, %12
%14 = and i32 %13, 1048575
%15 = shl i32 %14, 5
%16 = or i32 %9, %15
%17 = load i32, i32* %2
%18 = and i32 %17, 255
%19 = shl i32 %18, 2
%20 = or i32 %16, %19
%21 = zext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
store volatile i32 1, i32* %22
store volatile i32 0, i32* %3
br label %23
23: ; preds = %27, %1
%24 = load volatile i32, i32* %3
%25 = icmp slt i32 %24, 16
br i1 %25, label %26, label %30
26: ; preds = %23
br label %27
27: ; preds = %26
%28 = load volatile i32, i32* %3
%29 = add nsw i32 %28, 1
store volatile i32 %29, i32* %3
br label %23
30: ; preds = %23
%31 = load i32, i32* %2
%32 = and i32 %31, 65280
%33 = ashr i32 %32, 8
%34 = add nsw i32 1074783488, %33
%35 = and i32 %34, -268435456
%36 = or i32 %35, 33554432
%37 = load i32, i32* %2
%38 = and i32 %37, 65280
%39 = ashr i32 %38, 8
%40 = add nsw i32 1074783488, %39
%41 = and i32 %40, 1048575
%42 = shl i32 %41, 5
%43 = or i32 %36, %42
%44 = load i32, i32* %2
%45 = and i32 %44, 255
%46 = shl i32 %45, 2
%47 = or i32 %43, %46
%48 = zext i32 %47 to i64
%49 = inttoptr i64 %48 to i32*
store volatile i32 0, i32* %49
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 i32*
store volatile i32 1, i32* %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 i32 0, i32* %11
ret void
}