#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 */

/* Variables and functions */
int /*<<< orphan*/ feed();
void Initialize(void) {
  *(volatile unsigned int *)0xE01FC084 = 0x24;
  feed();
  *(volatile unsigned int *)0xE01FC080 = 0x1;
  feed();
  while (!(*(volatile unsigned int *)0xE01FC088 & 0x400))
    ;
  *(volatile unsigned int *)0xE01FC080 = 0x3;
  feed();
  *(volatile unsigned int *)0xE01FC004 = 0x3;
  *(volatile unsigned int *)0xE01FC000 = 0x2;
  *(volatile unsigned int *)0xE01FC100 = 0x1;
}


x86 assembly (clang, -O0):
<Initialize>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe01fc084,%eax
movl   $0x24,(%rax)
mov    $0x0,%al
call   1030 <feed@plt>
mov    $0xe01fc080,%eax
movl   $0x1,(%rax)
mov    $0x0,%al
call   1030 <feed@plt>
mov    $0xe01fc088,%eax
mov    (%rax),%eax
and    $0x400,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1159 <Initialize+0x49>
jmp    115e <Initialize+0x4e>
jmp    1138 <Initialize+0x28>
mov    $0xe01fc080,%eax
movl   $0x3,(%rax)
mov    $0x0,%al
call   1030 <feed@plt>
mov    $0xe01fc004,%eax
movl   $0x3,(%rax)
mov    $0xe01fc000,%eax
movl   $0x2,(%rax)
mov    $0xe01fc100,%eax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Initialize>:
push   %rbx
mov    $0xe01fc080,%ebx
movl   $0x24,0x4(%rbx)
xor    %eax,%eax
call   1030 <feed@plt>
movl   $0x1,(%rbx)
xor    %eax,%eax
call   1030 <feed@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
testl  $0x400,0x8(%rbx)
je     1140 <Initialize+0x30>
movl   $0x3,(%rbx)
xor    %eax,%eax
call   1030 <feed@plt>
movl   $0x3,-0x7c(%rbx)
movl   $0x2,-0x80(%rbx)
movl   $0x1,0x80(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @Initialize() {
store volatile i32 36, i32* inttoptr (i64 3760177284 to i32*)
%1 = call i32 (...) @feed()
store volatile i32 1, i32* inttoptr (i64 3760177280 to i32*)
%2 = call i32 (...) @feed()
br label %3
3: ; preds = %8, %0
%4 = load volatile i32, i32* inttoptr (i64 3760177288 to i32*)
%5 = and i32 %4, 1024
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
store volatile i32 3, i32* inttoptr (i64 3760177280 to i32*)
%10 = call i32 (...) @feed()
store volatile i32 3, i32* inttoptr (i64 3760177156 to i32*)
store volatile i32 2, i32* inttoptr (i64 3760177152 to i32*)
store volatile i32 1, i32* inttoptr (i64 3760177408 to i32*)
ret void
}

LLVM IR (-O2):
define void @Initialize() {
store volatile i32 36, i32* inttoptr (i64 3760177284 to i32*)
%1 = tail call i32 (...) @feed()
store volatile i32 1, i32* inttoptr (i64 3760177280 to i32*)
%2 = tail call i32 (...) @feed()
br label %3
3: ; preds = %3, %0
%4 = load volatile i32, i32* inttoptr (i64 3760177288 to i32*)
%5 = and i32 %4, 1024
%6 = icmp eq i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3
store volatile i32 3, i32* inttoptr (i64 3760177280 to i32*)
%8 = tail call i32 (...) @feed()
store volatile i32 3, i32* inttoptr (i64 3760177156 to i32*)
store volatile i32 2, i32* inttoptr (i64 3760177152 to i32*)
store volatile i32 1, i32* inttoptr (i64 3760177408 to i32*)
ret void
}