#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 Timer3_Init(void) {
  unsigned long volatile delay;
  (*((volatile uint32_t *)0x400FE604)) |= 0x08;
  delay = (*((volatile uint32_t *)0x400FE604));
  (*((volatile uint32_t *)0x4003300C)) = 0x00000000;
  (*((volatile uint32_t *)0x40033000)) = 0x00000000;
  (*((volatile uint32_t *)0x40033004)) = 0x00000002;
  (*((volatile uint32_t *)0x40033028)) = 29999999;
  (*((volatile uint32_t *)0x40033038)) = 0;
  (*((volatile uint32_t *)0x40033024)) = 0x00000001;
  (*((volatile uint32_t *)0x40033018)) = 0x00000001;
  (*((volatile uint32_t *)0xE000E420)) =
      ((*((volatile uint32_t *)0xE000E414)) & 0x00FFFFFF) | 0xA0000000;
  (*((volatile uint32_t *)0xE000E104)) = 1 << 3;
  (*((volatile uint32_t *)0x4003300C)) = 0x00000001;
}


x86 assembly (clang, -O0):
<Timer3_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe604,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x400fe604,%eax
mov    %ecx,(%rax)
mov    $0x400fe604,%eax
mov    (%rax),%eax
cltq
mov    %rax,-0x8(%rbp)
mov    $0x4003300c,%eax
movl   $0x0,(%rax)
mov    $0x40033000,%eax
movl   $0x0,(%rax)
mov    $0x40033004,%eax
movl   $0x2,(%rax)
mov    $0x40033028,%eax
movl   $0x1c9c37f,(%rax)
mov    $0x40033038,%eax
movl   $0x0,(%rax)
mov    $0x40033024,%eax
movl   $0x1,(%rax)
mov    $0x40033018,%eax
movl   $0x1,(%rax)
mov    $0xe000e414,%eax
mov    (%rax),%ecx
and    $0xffffff,%ecx
or     $0xa0000000,%ecx
mov    $0xe000e420,%eax
mov    %ecx,(%rax)
mov    $0xe000e104,%eax
movl   $0x8,(%rax)
mov    $0x4003300c,%eax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Timer3_Init>:
orl    $0x8,0x400fe604
08
movslq 0x400fe604,%rax
40
mov    %rax,-0x8(%rsp)
movl   $0x0,0x4003300c
movl   $0x0,0x40033000
movl   $0x2,0x40033004
movl   $0x1c9c37f,0x40033028
7f c3 c9 01
movl   $0x0,0x40033038
movl   $0x1,0x40033024
movl   $0x1,0x40033018
mov    $0xe000e104,%eax
mov    $0xffffff,%ecx
and    0x310(%rax),%ecx
or     $0xa0000000,%ecx
mov    %ecx,0x31c(%rax)
movl   $0x8,(%rax)
movl   $0x1,0x4003300c
ret

LLVM IR (-O0):
define void @Timer3_Init() {
%1 = alloca i64
%2 = load volatile i32, i32* inttoptr (i64 1074783748 to i32*)
%3 = or i32 %2, 8
store volatile i32 %3, i32* inttoptr (i64 1074783748 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1074783748 to i32*)
%5 = sext i32 %4 to i64
store volatile i64 %5, i64* %1
store volatile i32 0, i32* inttoptr (i64 1073950732 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073950720 to i32*)
store volatile i32 2, i32* inttoptr (i64 1073950724 to i32*)
store volatile i32 29999999, i32* inttoptr (i64 1073950760 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073950776 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073950756 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073950744 to i32*)
%6 = load volatile i32, i32* inttoptr (i64 3758154772 to i32*)
%7 = and i32 %6, 16777215
%8 = or i32 %7, -1610612736
store volatile i32 %8, i32* inttoptr (i64 3758154784 to i32*)
store volatile i32 8, i32* inttoptr (i64 3758153988 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073950732 to i32*)
ret void
}

LLVM IR (-O2):
define void @Timer3_Init() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load volatile i32, i32* inttoptr (i64 1074783748 to i32*)
%4 = or i32 %3, 8
store volatile i32 %4, i32* inttoptr (i64 1074783748 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1074783748 to i32*)
%6 = sext i32 %5 to i64
store volatile i64 %6, i64* %1
store volatile i32 0, i32* inttoptr (i64 1073950732 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073950720 to i32*)
store volatile i32 2, i32* inttoptr (i64 1073950724 to i32*)
store volatile i32 29999999, i32* inttoptr (i64 1073950760 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073950776 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073950756 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073950744 to i32*)
%7 = load volatile i32, i32* inttoptr (i64 3758154772 to i32*)
%8 = and i32 %7, 16777215
%9 = or i32 %8, -1610612736
store volatile i32 %9, i32* inttoptr (i64 3758154784 to i32*)
store volatile i32 8, i32* inttoptr (i64 3758153988 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073950732 to i32*)
ret void
}