#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 uint32_t;

/* Variables and functions */
void stmod_pin_init(void) {
  uint32_t reg;
  (*(volatile uint32_t *)((0x40021000UL) + 0x4C)) |=
      (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 8);
  reg = (*((volatile uint32_t *)((0x48000C00UL) + 0x00))) & ~(0x03 << (3 * 2));
  (*((volatile uint32_t *)((0x48000C00UL) + 0x00))) = reg | (0x01 << (3 * 2));
  reg = (*((volatile uint32_t *)((0x48000400UL) + 0x00))) & ~(0x03 << (2 * 2));
  (*((volatile uint32_t *)((0x48000400UL) + 0x00))) = reg | (0x01 << (2 * 2));
  reg = (*((volatile uint32_t *)((0x48000000UL) + 0x00))) & ~(0x03 << (0 * 2));
  (*((volatile uint32_t *)((0x48000000UL) + 0x00))) = reg | (0x01 << (0 * 2));
  reg = (*((volatile uint32_t *)((0x48000800UL) + 0x00))) & ~(0x03 << (2 * 2));
  (*((volatile uint32_t *)((0x48000800UL) + 0x00))) = reg | (0x01 << (2 * 2));
  reg = (*((volatile uint32_t *)((0x48002000UL) + 0x00))) & ~(0x03 << (3 * 2));
  (*((volatile uint32_t *)((0x48002000UL) + 0x00))) = reg | (0x01 << (3 * 2));
}


x86 assembly (clang, -O0):
<stmod_pin_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4002104c,%eax
mov    (%rax),%ecx
or     $0x10f,%ecx
mov    $0x4002104c,%eax
mov    %ecx,(%rax)
mov    $0x48000c00,%eax
mov    (%rax),%eax
and    $0xffffff3f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
or     $0x40,%ecx
mov    $0x48000c00,%eax
mov    %ecx,(%rax)
mov    $0x48000400,%eax
mov    (%rax),%eax
and    $0xffffffcf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
or     $0x10,%ecx
mov    $0x48000400,%eax
mov    %ecx,(%rax)
mov    $0x48000000,%eax
mov    (%rax),%eax
and    $0xfffffffc,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
or     $0x1,%ecx
mov    $0x48000000,%eax
mov    %ecx,(%rax)
mov    $0x48000800,%eax
mov    (%rax),%eax
and    $0xffffffcf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
or     $0x10,%ecx
mov    $0x48000800,%eax
mov    %ecx,(%rax)
mov    $0x48002000,%eax
mov    (%rax),%eax
and    $0xffffff3f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
or     $0x40,%ecx
mov    $0x48002000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stmod_pin_init>:
orl    $0x10f,0x4002104c
mov    $0xffffff3f,%eax
mov    0x48000c00,%ecx
and    %eax,%ecx
or     $0x40,%ecx
mov    %ecx,0x48000c00
mov    0x48000400,%ecx
and    $0xffffffcf,%ecx
or     $0x10,%ecx
mov    %ecx,0x48000400
mov    0x48000000,%ecx
and    $0xfffffffc,%ecx
or     $0x1,%ecx
mov    %ecx,0x48000000
mov    0x48000800,%ecx
and    $0xffffffcf,%ecx
or     $0x10,%ecx
mov    %ecx,0x48000800
and    0x48002000,%eax
or     $0x40,%eax
mov    %eax,0x48002000
ret

LLVM IR (-O0):
define void @stmod_pin_init() {
%1 = alloca i32
%2 = load volatile i32, i32* inttoptr (i64 1073877068 to i32*)
%3 = or i32 %2, 271
store volatile i32 %3, i32* inttoptr (i64 1073877068 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1207962624 to i32*)
%5 = and i32 %4, -193
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = or i32 %6, 64
store volatile i32 %7, i32* inttoptr (i64 1207962624 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 1207960576 to i32*)
%9 = and i32 %8, -49
store i32 %9, i32* %1
%10 = load i32, i32* %1
%11 = or i32 %10, 16
store volatile i32 %11, i32* inttoptr (i64 1207960576 to i32*)
%12 = load volatile i32, i32* inttoptr (i64 1207959552 to i32*)
%13 = and i32 %12, -4
store i32 %13, i32* %1
%14 = load i32, i32* %1
%15 = or i32 %14, 1
store volatile i32 %15, i32* inttoptr (i64 1207959552 to i32*)
%16 = load volatile i32, i32* inttoptr (i64 1207961600 to i32*)
%17 = and i32 %16, -49
store i32 %17, i32* %1
%18 = load i32, i32* %1
%19 = or i32 %18, 16
store volatile i32 %19, i32* inttoptr (i64 1207961600 to i32*)
%20 = load volatile i32, i32* inttoptr (i64 1207967744 to i32*)
%21 = and i32 %20, -193
store i32 %21, i32* %1
%22 = load i32, i32* %1
%23 = or i32 %22, 64
store volatile i32 %23, i32* inttoptr (i64 1207967744 to i32*)
ret void
}

LLVM IR (-O2):
define void @stmod_pin_init() {
%1 = load volatile i32, i32* inttoptr (i64 1073877068 to i32*)
%2 = or i32 %1, 271
store volatile i32 %2, i32* inttoptr (i64 1073877068 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1207962624 to i32*)
%4 = and i32 %3, -193
%5 = or i32 %4, 64
store volatile i32 %5, i32* inttoptr (i64 1207962624 to i32*)
%6 = load volatile i32, i32* inttoptr (i64 1207960576 to i32*)
%7 = and i32 %6, -49
%8 = or i32 %7, 16
store volatile i32 %8, i32* inttoptr (i64 1207960576 to i32*)
%9 = load volatile i32, i32* inttoptr (i64 1207959552 to i32*)
%10 = and i32 %9, -4
%11 = or i32 %10, 1
store volatile i32 %11, i32* inttoptr (i64 1207959552 to i32*)
%12 = load volatile i32, i32* inttoptr (i64 1207961600 to i32*)
%13 = and i32 %12, -49
%14 = or i32 %13, 16
store volatile i32 %14, i32* inttoptr (i64 1207961600 to i32*)
%15 = load volatile i32, i32* inttoptr (i64 1207967744 to i32*)
%16 = and i32 %15, -193
%17 = or i32 %16, 64
store volatile i32 %17, i32* inttoptr (i64 1207967744 to i32*)
ret void
}