#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 */
int /*<<< orphan*/ delay(int);
char gpio_iic_Gack() {
  (*((volatile uint32_t *)0xE02000C0)) =
      ((*((volatile uint32_t *)0xE02000C0)) & 0xfffffff0) | 0x00000001;
  (*((volatile uint32_t *)0xE02000C4)) |= 1 << 0x00;
  delay((10));
  (*((volatile uint32_t *)0xE02000C4)) |= 1 << 0x01;
  delay((10));
  (*((volatile uint32_t *)0xE02000C0)) =
      ((*((volatile uint32_t *)0xE02000C0)) & 0xfffffff0);
  if (((*((volatile uint32_t *)0xE02000C4)) & 0x01) == 1)
    return 1;
  (*((volatile uint32_t *)0xE02000C4)) &= ~(1 << 0x01);
  delay((10));
  return 0;
}


x86 assembly (clang, -O0):
<gpio_iic_Gack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xe02000c0,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
or     $0x1,%ecx
mov    $0xe02000c0,%eax
mov    %ecx,(%rax)
mov    $0xe02000c4,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0xe02000c4,%eax
mov    %ecx,(%rax)
mov    $0xa,%edi
call   1030 <delay@plt>
mov    $0xe02000c4,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0xe02000c4,%eax
mov    %ecx,(%rax)
mov    $0xa,%edi
call   1030 <delay@plt>
mov    $0xe02000c0,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
mov    $0xe02000c0,%eax
mov    %ecx,(%rax)
mov    $0xe02000c4,%eax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    118f <gpio_iic_Gack+0x7f>
movb   $0x1,-0x1(%rbp)
jmp    11ae <gpio_iic_Gack+0x9e>
mov    $0xe02000c4,%eax
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    $0xe02000c4,%eax
mov    %ecx,(%rax)
mov    $0xa,%edi
call   1030 <delay@plt>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_iic_Gack>:
push   %rbx
mov    $0xe02000c4,%ebx
mov    -0x4(%rbx),%eax
and    $0xfffffff0,%eax
or     $0x1,%eax
mov    %eax,-0x4(%rbx)
orl    $0x1,(%rbx)
mov    $0xa,%edi
call   1030 <delay@plt>
orl    $0x2,(%rbx)
mov    $0xa,%edi
call   1030 <delay@plt>
andl   $0xfffffff0,-0x4(%rbx)
mov    (%rbx),%ecx
mov    $0x1,%al
test   $0x1,%cl
jne    1158 <gpio_iic_Gack+0x48>
andl   $0xfffffffd,(%rbx)
mov    $0xa,%edi
call   1030 <delay@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @gpio_iic_Gack() {
%1 = alloca i8
%2 = load volatile i32, i32* inttoptr (i64 3760193728 to i32*)
%3 = and i32 %2, -16
%4 = or i32 %3, 1
store volatile i32 %4, i32* inttoptr (i64 3760193728 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%6 = or i32 %5, 1
store volatile i32 %6, i32* inttoptr (i64 3760193732 to i32*)
%7 = call i32 @delay(i32 10)
%8 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%9 = or i32 %8, 2
store volatile i32 %9, i32* inttoptr (i64 3760193732 to i32*)
%10 = call i32 @delay(i32 10)
%11 = load volatile i32, i32* inttoptr (i64 3760193728 to i32*)
%12 = and i32 %11, -16
store volatile i32 %12, i32* inttoptr (i64 3760193728 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%14 = and i32 %13, 1
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %17
16: ; preds = %0
store i8 1, i8* %1
br label %21
17: ; preds = %0
%18 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%19 = and i32 %18, -3
store volatile i32 %19, i32* inttoptr (i64 3760193732 to i32*)
%20 = call i32 @delay(i32 10)
store i8 0, i8* %1
br label %21
21: ; preds = %17, %16
%22 = load i8, i8* %1
ret i8 %22
}

LLVM IR (-O2):
define signext i8 @gpio_iic_Gack() {
%1 = load volatile i32, i32* inttoptr (i64 3760193728 to i32*)
%2 = and i32 %1, -16
%3 = or i32 %2, 1
store volatile i32 %3, i32* inttoptr (i64 3760193728 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%5 = or i32 %4, 1
store volatile i32 %5, i32* inttoptr (i64 3760193732 to i32*)
%6 = tail call i32 @delay(i32 10)
%7 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%8 = or i32 %7, 2
store volatile i32 %8, i32* inttoptr (i64 3760193732 to i32*)
%9 = tail call i32 @delay(i32 10)
%10 = load volatile i32, i32* inttoptr (i64 3760193728 to i32*)
%11 = and i32 %10, -16
store volatile i32 %11, i32* inttoptr (i64 3760193728 to i32*)
%12 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%13 = and i32 %12, 1
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %0
%16 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%17 = and i32 %16, -3
store volatile i32 %17, i32* inttoptr (i64 3760193732 to i32*)
%18 = tail call i32 @delay(i32 10)
br label %19
19: ; preds = %0, %15
%20 = phi i8 [ 0, %15 ], [ 1, %0 ]
ret i8 %20
}