#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 DAC_Init(void) {
  (*((volatile uint32_t *)0x400FE608)) |= 0x02;
  while (((*((volatile uint32_t *)0x400FEA08)) & 0x02) == 0) {
  };
  (*((volatile uint32_t *)0x40005400)) |= 0X3F;
  (*((volatile uint32_t *)0x40005420)) &= ~0X3F;
  (*((volatile uint32_t *)0x4000551C)) |= 0X3F;
  (*((volatile uint32_t *)0x40005528)) &= ~0x40;
  (*((volatile uint32_t *)0x4000552C)) = 0x00;
  (*((volatile uint32_t *)0x40005508)) |= 0x3F;
}


x86 assembly (clang, -O0):
<DAC_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe608,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0x400fe608,%eax
mov    %ecx,(%rax)
mov    $0x400fea08,%eax
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    112d <DAC_Init+0x2d>
jmp    1115 <DAC_Init+0x15>
mov    $0x40005400,%eax
mov    (%rax),%ecx
or     $0x3f,%ecx
mov    $0x40005400,%eax
mov    %ecx,(%rax)
mov    $0x40005420,%eax
mov    (%rax),%ecx
and    $0xffffffc0,%ecx
mov    $0x40005420,%eax
mov    %ecx,(%rax)
mov    $0x4000551c,%eax
mov    (%rax),%ecx
or     $0x3f,%ecx
mov    $0x4000551c,%eax
mov    %ecx,(%rax)
mov    $0x40005528,%eax
mov    (%rax),%ecx
and    $0xffffffbf,%ecx
mov    $0x40005528,%eax
mov    %ecx,(%rax)
mov    $0x4000552c,%eax
movl   $0x0,(%rax)
mov    $0x40005508,%eax
mov    (%rax),%ecx
or     $0x3f,%ecx
mov    $0x40005508,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DAC_Init>:
orl    $0x2,0x400fe608
02
nopl   0x0(%rax,%rax,1)
testl  $0x2,0x400fea08
je     1110 <DAC_Init+0x10>
orl    $0x3f,0x40005400
3f
andl   $0xffffffc0,0x40005420
c0
orl    $0x3f,0x4000551c
3f
andl   $0xffffffbf,0x40005528
bf
movl   $0x0,0x4000552c
orl    $0x3f,0x40005508
3f
ret

LLVM IR (-O0):
define void @DAC_Init() {
%1 = load volatile i32, i32* inttoptr (i64 1074783752 to i32*)
%2 = or i32 %1, 2
store volatile i32 %2, i32* inttoptr (i64 1074783752 to i32*)
br label %3
3: ; preds = %7, %0
%4 = load volatile i32, i32* inttoptr (i64 1074784776 to i32*)
%5 = and i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load volatile i32, i32* inttoptr (i64 1073763328 to i32*)
%10 = or i32 %9, 63
store volatile i32 %10, i32* inttoptr (i64 1073763328 to i32*)
%11 = load volatile i32, i32* inttoptr (i64 1073763360 to i32*)
%12 = and i32 %11, -64
store volatile i32 %12, i32* inttoptr (i64 1073763360 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 1073763612 to i32*)
%14 = or i32 %13, 63
store volatile i32 %14, i32* inttoptr (i64 1073763612 to i32*)
%15 = load volatile i32, i32* inttoptr (i64 1073763624 to i32*)
%16 = and i32 %15, -65
store volatile i32 %16, i32* inttoptr (i64 1073763624 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073763628 to i32*)
%17 = load volatile i32, i32* inttoptr (i64 1073763592 to i32*)
%18 = or i32 %17, 63
store volatile i32 %18, i32* inttoptr (i64 1073763592 to i32*)
ret void
}

LLVM IR (-O2):
define void @DAC_Init() {
%1 = load volatile i32, i32* inttoptr (i64 1074783752 to i32*)
%2 = or i32 %1, 2
store volatile i32 %2, i32* inttoptr (i64 1074783752 to i32*)
br label %3
3: ; preds = %3, %0
%4 = load volatile i32, i32* inttoptr (i64 1074784776 to i32*)
%5 = and i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3
%8 = load volatile i32, i32* inttoptr (i64 1073763328 to i32*)
%9 = or i32 %8, 63
store volatile i32 %9, i32* inttoptr (i64 1073763328 to i32*)
%10 = load volatile i32, i32* inttoptr (i64 1073763360 to i32*)
%11 = and i32 %10, -64
store volatile i32 %11, i32* inttoptr (i64 1073763360 to i32*)
%12 = load volatile i32, i32* inttoptr (i64 1073763612 to i32*)
%13 = or i32 %12, 63
store volatile i32 %13, i32* inttoptr (i64 1073763612 to i32*)
%14 = load volatile i32, i32* inttoptr (i64 1073763624 to i32*)
%15 = and i32 %14, -65
store volatile i32 %15, i32* inttoptr (i64 1073763624 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073763628 to i32*)
%16 = load volatile i32, i32* inttoptr (i64 1073763592 to i32*)
%17 = or i32 %16, 63
store volatile i32 %17, i32* inttoptr (i64 1073763592 to i32*)
ret void
}