#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);
void gpio_iic_start() {
  (*((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 *)0xE02000C4)) &= ~(1 << 0x00);
  delay((10));
  (*((volatile uint32_t *)0xE02000C4)) &= ~(1 << 0x01);
  delay((10));
}


x86 assembly (clang, -O0):
<gpio_iic_start>:
push   %rbp
mov    %rsp,%rbp
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    $0xe02000c4,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    $0xe02000c4,%eax
mov    %ecx,(%rax)
mov    $0xa,%edi
call   1030 <delay@plt>
mov    $0xe02000c4,%eax
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    $0xe02000c4,%eax
mov    %ecx,(%rax)
mov    $0xa,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_iic_start>:
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   $0xfffffffe,(%rbx)
mov    $0xa,%edi
call   1030 <delay@plt>
andl   $0xfffffffd,(%rbx)
mov    $0xa,%edi
pop    %rbx
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @gpio_iic_start() {
%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 = 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 = call i32 @delay(i32 10)
%10 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%11 = and i32 %10, -2
store volatile i32 %11, i32* inttoptr (i64 3760193732 to i32*)
%12 = call i32 @delay(i32 10)
%13 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%14 = and i32 %13, -3
store volatile i32 %14, i32* inttoptr (i64 3760193732 to i32*)
%15 = call i32 @delay(i32 10)
ret void
}

LLVM IR (-O2):
define void @gpio_iic_start() {
%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 3760193732 to i32*)
%11 = and i32 %10, -2
store volatile i32 %11, i32* inttoptr (i64 3760193732 to i32*)
%12 = tail call i32 @delay(i32 10)
%13 = load volatile i32, i32* inttoptr (i64 3760193732 to i32*)
%14 = and i32 %13, -3
store volatile i32 %14, i32* inttoptr (i64 3760193732 to i32*)
%15 = tail call i32 @delay(i32 10)
ret void
}