#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 switch_Init(void) {
  unsigned long volatile delay;
  (*((volatile uint32_t *)0x400FE108)) |= 0x00000020;
  delay = (*((volatile uint32_t *)0x400FE108));
  (*((volatile uint32_t *)0x40025520)) = 0x4C4F434B;
  (*((volatile uint32_t *)0x40025524)) = 0x08;
  (*((volatile uint32_t *)0x40025400)) |= 0x08;
  (*((volatile uint32_t *)0x40025420)) &= ~0x08;
  (*((volatile uint32_t *)0x4002551C)) |= 0x08;
  (*((volatile uint32_t *)0x4002552C)) &= ~0xFFFFFFFF;
  (*((volatile uint32_t *)0x40025528)) &= ~0x08;
}


x86 assembly (clang, -O0):
<switch_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe108,%eax
mov    (%rax),%ecx
or     $0x20,%ecx
mov    $0x400fe108,%eax
mov    %ecx,(%rax)
mov    $0x400fe108,%eax
mov    (%rax),%eax
cltq
mov    %rax,-0x8(%rbp)
mov    $0x40025520,%eax
movl   $0x4c4f434b,(%rax)
mov    $0x40025524,%eax
movl   $0x8,(%rax)
mov    $0x40025400,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x40025400,%eax
mov    %ecx,(%rax)
mov    $0x40025420,%eax
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    $0x40025420,%eax
mov    %ecx,(%rax)
mov    $0x4002551c,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x4002551c,%eax
mov    %ecx,(%rax)
mov    $0x4002552c,%eax
mov    (%rax),%ecx
and    $0x0,%ecx
mov    $0x4002552c,%eax
mov    %ecx,(%rax)
mov    $0x40025528,%eax
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    $0x40025528,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_Init>:
orl    $0x20,0x400fe108
20
movslq 0x400fe108,%rax
40
mov    %rax,-0x8(%rsp)
movl   $0x4c4f434b,0x40025520
4b 43 4f 4c
movl   $0x8,0x40025524
orl    $0x8,0x40025400
08
andl   $0xfffffff7,0x40025420
f7
orl    $0x8,0x4002551c
08
mov    0x4002552c,%eax
movl   $0x0,0x4002552c
andl   $0xfffffff7,0x40025528
f7
ret

LLVM IR (-O0):
define void @switch_Init() {
%1 = alloca i64
%2 = load volatile i32, i32* inttoptr (i64 1074782472 to i32*)
%3 = or i32 %2, 32
store volatile i32 %3, i32* inttoptr (i64 1074782472 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1074782472 to i32*)
%5 = sext i32 %4 to i64
store volatile i64 %5, i64* %1
store volatile i32 1280262987, i32* inttoptr (i64 1073894688 to i32*)
store volatile i32 8, i32* inttoptr (i64 1073894692 to i32*)
%6 = load volatile i32, i32* inttoptr (i64 1073894400 to i32*)
%7 = or i32 %6, 8
store volatile i32 %7, i32* inttoptr (i64 1073894400 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 1073894432 to i32*)
%9 = and i32 %8, -9
store volatile i32 %9, i32* inttoptr (i64 1073894432 to i32*)
%10 = load volatile i32, i32* inttoptr (i64 1073894684 to i32*)
%11 = or i32 %10, 8
store volatile i32 %11, i32* inttoptr (i64 1073894684 to i32*)
%12 = load volatile i32, i32* inttoptr (i64 1073894700 to i32*)
%13 = and i32 %12, 0
store volatile i32 %13, i32* inttoptr (i64 1073894700 to i32*)
%14 = load volatile i32, i32* inttoptr (i64 1073894696 to i32*)
%15 = and i32 %14, -9
store volatile i32 %15, i32* inttoptr (i64 1073894696 to i32*)
ret void
}

LLVM IR (-O2):
define void @switch_Init() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load volatile i32, i32* inttoptr (i64 1074782472 to i32*)
%4 = or i32 %3, 32
store volatile i32 %4, i32* inttoptr (i64 1074782472 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1074782472 to i32*)
%6 = sext i32 %5 to i64
store volatile i64 %6, i64* %1
store volatile i32 1280262987, i32* inttoptr (i64 1073894688 to i32*)
store volatile i32 8, i32* inttoptr (i64 1073894692 to i32*)
%7 = load volatile i32, i32* inttoptr (i64 1073894400 to i32*)
%8 = or i32 %7, 8
store volatile i32 %8, i32* inttoptr (i64 1073894400 to i32*)
%9 = load volatile i32, i32* inttoptr (i64 1073894432 to i32*)
%10 = and i32 %9, -9
store volatile i32 %10, i32* inttoptr (i64 1073894432 to i32*)
%11 = load volatile i32, i32* inttoptr (i64 1073894684 to i32*)
%12 = or i32 %11, 8
store volatile i32 %12, i32* inttoptr (i64 1073894684 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 1073894700 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073894700 to i32*)
%14 = load volatile i32, i32* inttoptr (i64 1073894696 to i32*)
%15 = and i32 %14, -9
store volatile i32 %15, i32* inttoptr (i64 1073894696 to i32*)
ret void
}