#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 ADC_Init(void) {
  (*((volatile uint32_t *)0x400FE608)) |= 0x10;
  while (((*((volatile uint32_t *)0x400FEA08)) & 0x10) == 0) {
  };
  (*((volatile uint32_t *)0x4002451C)) &= ~0x04;
  (*((volatile uint32_t *)0x40024420)) |= 0x04;
  (*((volatile uint32_t *)0x40024528)) |= 0x04;
  (*((volatile uint32_t *)0x40024400)) &= ~0x04;
  (*((volatile uint32_t *)0x400FE638)) |= 0x01;
  volatile uint32_t delay;
  delay = (*((volatile uint32_t *)0x400FE638));
  delay = (*((volatile uint32_t *)0x400FE638));
  delay = (*((volatile uint32_t *)0x400FE638));
  (*((volatile uint32_t *)0x40038FC4)) = 0x01;
  (*((volatile uint32_t *)0x40038020)) = 0x0123;
  (*((volatile uint32_t *)0x40038000)) &= ~0x08;
  (*((volatile uint32_t *)0x40038014)) &= ~0xF000;
  (*((volatile uint32_t *)0x400380A0)) =
      ((*((volatile uint32_t *)0x400380A0)) & ~0xF) + 1;
  (*((volatile uint32_t *)0x400380A4)) = 0x06;
  (*((volatile uint32_t *)0x40038008)) &= ~0x08;
  (*((volatile uint32_t *)0x40038000)) |= 0x08;
}


x86 assembly (clang, -O0):
<ADC_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe608,%eax
mov    (%rax),%ecx
or     $0x10,%ecx
mov    $0x400fe608,%eax
mov    %ecx,(%rax)
mov    $0x400fea08,%eax
mov    (%rax),%eax
and    $0x10,%eax
cmp    $0x0,%eax
jne    112d <ADC_Init+0x2d>
jmp    1115 <ADC_Init+0x15>
mov    $0x4002451c,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    $0x4002451c,%eax
mov    %ecx,(%rax)
mov    $0x40024420,%eax
mov    (%rax),%ecx
or     $0x4,%ecx
mov    $0x40024420,%eax
mov    %ecx,(%rax)
mov    $0x40024528,%eax
mov    (%rax),%ecx
or     $0x4,%ecx
mov    $0x40024528,%eax
mov    %ecx,(%rax)
mov    $0x40024400,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    $0x40024400,%eax
mov    %ecx,(%rax)
mov    $0x400fe638,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0x400fe638,%eax
mov    %ecx,(%rax)
mov    $0x400fe638,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x400fe638,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x400fe638,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x40038fc4,%eax
movl   $0x1,(%rax)
mov    $0x40038020,%eax
movl   $0x123,(%rax)
mov    $0x40038000,%eax
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    $0x40038000,%eax
mov    %ecx,(%rax)
mov    $0x40038014,%eax
mov    (%rax),%ecx
and    $0xffff0fff,%ecx
mov    $0x40038014,%eax
mov    %ecx,(%rax)
mov    $0x400380a0,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
add    $0x1,%ecx
mov    $0x400380a0,%eax
mov    %ecx,(%rax)
mov    $0x400380a4,%eax
movl   $0x6,(%rax)
mov    $0x40038008,%eax
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    $0x40038008,%eax
mov    %ecx,(%rax)
mov    $0x40038000,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x40038000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_Init>:
orl    $0x10,0x400fe608
10
nopl   0x0(%rax,%rax,1)
testl  $0x10,0x400fea08
je     1110 <ADC_Init+0x10>
andl   $0xfffffffb,0x4002451c
fb
orl    $0x4,0x40024420
04
orl    $0x4,0x40024528
04
andl   $0xfffffffb,0x40024400
fb
orl    $0x1,0x400fe638
01
mov    0x400fe638,%eax
mov    %eax,-0x4(%rsp)
mov    0x400fe638,%eax
mov    %eax,-0x4(%rsp)
mov    0x400fe638,%eax
mov    %eax,-0x4(%rsp)
movl   $0x1,0x40038fc4
movl   $0x123,0x40038020
andl   $0xfffffff7,0x40038000
f7
andl   $0xffff0fff,0x40038014
ff 0f ff ff
mov    0x400380a0,%eax
and    $0xfffffff0,%eax
or     $0x1,%eax
mov    %eax,0x400380a0
movl   $0x6,0x400380a4
andl   $0xfffffff7,0x40038008
f7
orl    $0x8,0x40038000
08
ret

LLVM IR (-O0):
define void @ADC_Init() {
%1 = alloca i32
%2 = load volatile i32, i32* inttoptr (i64 1074783752 to i32*)
%3 = or i32 %2, 16
store volatile i32 %3, i32* inttoptr (i64 1074783752 to i32*)
br label %4
4: ; preds = %8, %0
%5 = load volatile i32, i32* inttoptr (i64 1074784776 to i32*)
%6 = and i32 %5, 16
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
%10 = load volatile i32, i32* inttoptr (i64 1073890588 to i32*)
%11 = and i32 %10, -5
store volatile i32 %11, i32* inttoptr (i64 1073890588 to i32*)
%12 = load volatile i32, i32* inttoptr (i64 1073890336 to i32*)
%13 = or i32 %12, 4
store volatile i32 %13, i32* inttoptr (i64 1073890336 to i32*)
%14 = load volatile i32, i32* inttoptr (i64 1073890600 to i32*)
%15 = or i32 %14, 4
store volatile i32 %15, i32* inttoptr (i64 1073890600 to i32*)
%16 = load volatile i32, i32* inttoptr (i64 1073890304 to i32*)
%17 = and i32 %16, -5
store volatile i32 %17, i32* inttoptr (i64 1073890304 to i32*)
%18 = load volatile i32, i32* inttoptr (i64 1074783800 to i32*)
%19 = or i32 %18, 1
store volatile i32 %19, i32* inttoptr (i64 1074783800 to i32*)
%20 = load volatile i32, i32* inttoptr (i64 1074783800 to i32*)
store volatile i32 %20, i32* %1
%21 = load volatile i32, i32* inttoptr (i64 1074783800 to i32*)
store volatile i32 %21, i32* %1
%22 = load volatile i32, i32* inttoptr (i64 1074783800 to i32*)
store volatile i32 %22, i32* %1
store volatile i32 1, i32* inttoptr (i64 1073975236 to i32*)
store volatile i32 291, i32* inttoptr (i64 1073971232 to i32*)
%23 = load volatile i32, i32* inttoptr (i64 1073971200 to i32*)
%24 = and i32 %23, -9
store volatile i32 %24, i32* inttoptr (i64 1073971200 to i32*)
%25 = load volatile i32, i32* inttoptr (i64 1073971220 to i32*)
%26 = and i32 %25, -61441
store volatile i32 %26, i32* inttoptr (i64 1073971220 to i32*)
%27 = load volatile i32, i32* inttoptr (i64 1073971360 to i32*)
%28 = and i32 %27, -16
%29 = add nsw i32 %28, 1
store volatile i32 %29, i32* inttoptr (i64 1073971360 to i32*)
store volatile i32 6, i32* inttoptr (i64 1073971364 to i32*)
%30 = load volatile i32, i32* inttoptr (i64 1073971208 to i32*)
%31 = and i32 %30, -9
store volatile i32 %31, i32* inttoptr (i64 1073971208 to i32*)
%32 = load volatile i32, i32* inttoptr (i64 1073971200 to i32*)
%33 = or i32 %32, 8
store volatile i32 %33, i32* inttoptr (i64 1073971200 to i32*)
ret void
}

LLVM IR (-O2):
define void @ADC_Init() {
%1 = alloca i32
%2 = load volatile i32, i32* inttoptr (i64 1074783752 to i32*)
%3 = or i32 %2, 16
store volatile i32 %3, i32* inttoptr (i64 1074783752 to i32*)
br label %4
4: ; preds = %4, %0
%5 = load volatile i32, i32* inttoptr (i64 1074784776 to i32*)
%6 = and i32 %5, 16
%7 = icmp eq i32 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
%9 = load volatile i32, i32* inttoptr (i64 1073890588 to i32*)
%10 = and i32 %9, -5
store volatile i32 %10, i32* inttoptr (i64 1073890588 to i32*)
%11 = load volatile i32, i32* inttoptr (i64 1073890336 to i32*)
%12 = or i32 %11, 4
store volatile i32 %12, i32* inttoptr (i64 1073890336 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 1073890600 to i32*)
%14 = or i32 %13, 4
store volatile i32 %14, i32* inttoptr (i64 1073890600 to i32*)
%15 = load volatile i32, i32* inttoptr (i64 1073890304 to i32*)
%16 = and i32 %15, -5
store volatile i32 %16, i32* inttoptr (i64 1073890304 to i32*)
%17 = load volatile i32, i32* inttoptr (i64 1074783800 to i32*)
%18 = or i32 %17, 1
store volatile i32 %18, i32* inttoptr (i64 1074783800 to i32*)
%19 = bitcast i32* %1 to i8*
%20 = load volatile i32, i32* inttoptr (i64 1074783800 to i32*)
store volatile i32 %20, i32* %1
%21 = load volatile i32, i32* inttoptr (i64 1074783800 to i32*)
store volatile i32 %21, i32* %1
%22 = load volatile i32, i32* inttoptr (i64 1074783800 to i32*)
store volatile i32 %22, i32* %1
store volatile i32 1, i32* inttoptr (i64 1073975236 to i32*)
store volatile i32 291, i32* inttoptr (i64 1073971232 to i32*)
%23 = load volatile i32, i32* inttoptr (i64 1073971200 to i32*)
%24 = and i32 %23, -9
store volatile i32 %24, i32* inttoptr (i64 1073971200 to i32*)
%25 = load volatile i32, i32* inttoptr (i64 1073971220 to i32*)
%26 = and i32 %25, -61441
store volatile i32 %26, i32* inttoptr (i64 1073971220 to i32*)
%27 = load volatile i32, i32* inttoptr (i64 1073971360 to i32*)
%28 = and i32 %27, -16
%29 = or i32 %28, 1
store volatile i32 %29, i32* inttoptr (i64 1073971360 to i32*)
store volatile i32 6, i32* inttoptr (i64 1073971364 to i32*)
%30 = load volatile i32, i32* inttoptr (i64 1073971208 to i32*)
%31 = and i32 %30, -9
store volatile i32 %31, i32* inttoptr (i64 1073971208 to i32*)
%32 = load volatile i32, i32* inttoptr (i64 1073971200 to i32*)
%33 = or i32 %32, 8
store volatile i32 %33, i32* inttoptr (i64 1073971200 to i32*)
ret void
}