#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 i2cinit(void) {
  (*((volatile uint32_t *)0x400FE620)) |= 0x0002;
  (*((volatile uint32_t *)0x400FE608)) |= 0x0001;
  while (((*((volatile uint32_t *)0x400FEA08)) & 0x01) == 0) {
  };
  (*((volatile uint32_t *)0x40004528)) &= ~0xC0;
  (*((volatile uint32_t *)0x4000452C)) =
      ((*((volatile uint32_t *)0x4000452C)) & 0x00FFFFFF) + 0x33000000;
  (*((volatile uint32_t *)0x4000450C)) |= 0x80;
  (*((volatile uint32_t *)0x40004420)) |= 0xC0;
  (*((volatile uint32_t *)0x4000451C)) |= 0xC0;
  (*((volatile uint32_t *)0x40021020)) = 0x00000010;
  (*((volatile uint32_t *)0x4002100C)) = 39;
}


x86 assembly (clang, -O0):
<i2cinit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe620,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0x400fe620,%eax
mov    %ecx,(%rax)
mov    $0x400fe608,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0x400fe608,%eax
mov    %ecx,(%rax)
mov    $0x400fea08,%eax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    113e <i2cinit+0x3e>
jmp    1126 <i2cinit+0x26>
mov    $0x40004528,%eax
mov    (%rax),%ecx
and    $0xffffff3f,%ecx
mov    $0x40004528,%eax
mov    %ecx,(%rax)
mov    $0x4000452c,%eax
mov    (%rax),%ecx
and    $0xffffff,%ecx
add    $0x33000000,%ecx
mov    $0x4000452c,%eax
mov    %ecx,(%rax)
mov    $0x4000450c,%eax
mov    (%rax),%ecx
or     $0x80,%ecx
mov    $0x4000450c,%eax
mov    %ecx,(%rax)
mov    $0x40004420,%eax
mov    (%rax),%ecx
or     $0xc0,%ecx
mov    $0x40004420,%eax
mov    %ecx,(%rax)
mov    $0x4000451c,%eax
mov    (%rax),%ecx
or     $0xc0,%ecx
mov    $0x4000451c,%eax
mov    %ecx,(%rax)
mov    $0x40021020,%eax
movl   $0x10,(%rax)
mov    $0x4002100c,%eax
movl   $0x27,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2cinit>:
orl    $0x2,0x400fe620
02
orl    $0x1,0x400fe608
01
testl  $0x1,0x400fea08
je     1110 <i2cinit+0x10>
andl   $0xffffff3f,0x40004528
3f ff ff ff
mov    $0xffffff,%eax
and    0x4000452c,%eax
or     $0x33000000,%eax
mov    %eax,0x4000452c
orl    $0x80,0x4000450c
orl    $0xc0,0x40004420
orl    $0xc0,0x4000451c
movl   $0x10,0x40021020
movl   $0x27,0x4002100c
ret

LLVM IR (-O0):
define void @i2cinit() {
%1 = load volatile i32, i32* inttoptr (i64 1074783776 to i32*)
%2 = or i32 %1, 2
store volatile i32 %2, i32* inttoptr (i64 1074783776 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1074783752 to i32*)
%4 = or i32 %3, 1
store volatile i32 %4, i32* inttoptr (i64 1074783752 to i32*)
br label %5
5: ; preds = %9, %0
%6 = load volatile i32, i32* inttoptr (i64 1074784776 to i32*)
%7 = and i32 %6, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load volatile i32, i32* inttoptr (i64 1073759528 to i32*)
%12 = and i32 %11, -193
store volatile i32 %12, i32* inttoptr (i64 1073759528 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 1073759532 to i32*)
%14 = and i32 %13, 16777215
%15 = add nsw i32 %14, 855638016
store volatile i32 %15, i32* inttoptr (i64 1073759532 to i32*)
%16 = load volatile i32, i32* inttoptr (i64 1073759500 to i32*)
%17 = or i32 %16, 128
store volatile i32 %17, i32* inttoptr (i64 1073759500 to i32*)
%18 = load volatile i32, i32* inttoptr (i64 1073759264 to i32*)
%19 = or i32 %18, 192
store volatile i32 %19, i32* inttoptr (i64 1073759264 to i32*)
%20 = load volatile i32, i32* inttoptr (i64 1073759516 to i32*)
%21 = or i32 %20, 192
store volatile i32 %21, i32* inttoptr (i64 1073759516 to i32*)
store volatile i32 16, i32* inttoptr (i64 1073877024 to i32*)
store volatile i32 39, i32* inttoptr (i64 1073877004 to i32*)
ret void
}

LLVM IR (-O2):
define void @i2cinit() {
%1 = load volatile i32, i32* inttoptr (i64 1074783776 to i32*)
%2 = or i32 %1, 2
store volatile i32 %2, i32* inttoptr (i64 1074783776 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1074783752 to i32*)
%4 = or i32 %3, 1
store volatile i32 %4, i32* inttoptr (i64 1074783752 to i32*)
br label %5
5: ; preds = %5, %0
%6 = load volatile i32, i32* inttoptr (i64 1074784776 to i32*)
%7 = and i32 %6, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = load volatile i32, i32* inttoptr (i64 1073759528 to i32*)
%11 = and i32 %10, -193
store volatile i32 %11, i32* inttoptr (i64 1073759528 to i32*)
%12 = load volatile i32, i32* inttoptr (i64 1073759532 to i32*)
%13 = and i32 %12, 16777215
%14 = or i32 %13, 855638016
store volatile i32 %14, i32* inttoptr (i64 1073759532 to i32*)
%15 = load volatile i32, i32* inttoptr (i64 1073759500 to i32*)
%16 = or i32 %15, 128
store volatile i32 %16, i32* inttoptr (i64 1073759500 to i32*)
%17 = load volatile i32, i32* inttoptr (i64 1073759264 to i32*)
%18 = or i32 %17, 192
store volatile i32 %18, i32* inttoptr (i64 1073759264 to i32*)
%19 = load volatile i32, i32* inttoptr (i64 1073759516 to i32*)
%20 = or i32 %19, 192
store volatile i32 %20, i32* inttoptr (i64 1073759516 to i32*)
store volatile i32 16, i32* inttoptr (i64 1073877024 to i32*)
store volatile i32 39, i32* inttoptr (i64 1073877004 to i32*)
ret void
}