#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 */

/* Variables and functions */
int /*<<< orphan*/ Delay_ms(int);
int /*<<< orphan*/ Soft_I2C_Init();
int /*<<< orphan*/ Soft_I2C_Start();
int /*<<< orphan*/ Soft_I2C_Stop();
int /*<<< orphan*/ Soft_I2C_Write(int);
void main() {
  Soft_I2C_Init();
  Soft_I2C_Start();
  Delay_ms(10);
  Soft_I2C_Write(0xA0);
  Soft_I2C_Write(0);
  Soft_I2C_Write(0x80);
  Soft_I2C_Write(0);
  Soft_I2C_Write(0);
  Soft_I2C_Write(0x59);
  Soft_I2C_Write(0x23);
  Soft_I2C_Write(0x31);
  Soft_I2C_Write(0x12);
  Soft_I2C_Stop();
  Soft_I2C_Start();
  Soft_I2C_Write(0xA0);
  Soft_I2C_Write(0);
  Soft_I2C_Write(0);
  Soft_I2C_Stop();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <Soft_I2C_Init@plt>
mov    $0x0,%al
call   1030 <Soft_I2C_Start@plt>
mov    $0xa,%edi
call   1070 <Delay_ms@plt>
mov    $0xa0,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x80,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x59,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x23,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x31,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x12,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x0,%al
call   1060 <Soft_I2C_Stop@plt>
mov    $0x0,%al
call   1030 <Soft_I2C_Start@plt>
mov    $0xa0,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x0,%al
call   1060 <Soft_I2C_Stop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <Soft_I2C_Init@plt>
xor    %eax,%eax
call   1030 <Soft_I2C_Start@plt>
mov    $0xa,%edi
call   1070 <Delay_ms@plt>
mov    $0xa0,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x80,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x59,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x23,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x31,%edi
call   1040 <Soft_I2C_Write@plt>
mov    $0x12,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %eax,%eax
call   1060 <Soft_I2C_Stop@plt>
xor    %eax,%eax
call   1030 <Soft_I2C_Start@plt>
mov    $0xa0,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %edi,%edi
call   1040 <Soft_I2C_Write@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <Soft_I2C_Stop@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @Soft_I2C_Init()
%2 = call i32 (...) @Soft_I2C_Start()
%3 = call i32 @Delay_ms(i32 10)
%4 = call i32 @Soft_I2C_Write(i32 160)
%5 = call i32 @Soft_I2C_Write(i32 0)
%6 = call i32 @Soft_I2C_Write(i32 128)
%7 = call i32 @Soft_I2C_Write(i32 0)
%8 = call i32 @Soft_I2C_Write(i32 0)
%9 = call i32 @Soft_I2C_Write(i32 89)
%10 = call i32 @Soft_I2C_Write(i32 35)
%11 = call i32 @Soft_I2C_Write(i32 49)
%12 = call i32 @Soft_I2C_Write(i32 18)
%13 = call i32 (...) @Soft_I2C_Stop()
%14 = call i32 (...) @Soft_I2C_Start()
%15 = call i32 @Soft_I2C_Write(i32 160)
%16 = call i32 @Soft_I2C_Write(i32 0)
%17 = call i32 @Soft_I2C_Write(i32 0)
%18 = call i32 (...) @Soft_I2C_Stop()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @Soft_I2C_Init()
%2 = tail call i32 (...) @Soft_I2C_Start()
%3 = tail call i32 @Delay_ms(i32 10)
%4 = tail call i32 @Soft_I2C_Write(i32 160)
%5 = tail call i32 @Soft_I2C_Write(i32 0)
%6 = tail call i32 @Soft_I2C_Write(i32 128)
%7 = tail call i32 @Soft_I2C_Write(i32 0)
%8 = tail call i32 @Soft_I2C_Write(i32 0)
%9 = tail call i32 @Soft_I2C_Write(i32 89)
%10 = tail call i32 @Soft_I2C_Write(i32 35)
%11 = tail call i32 @Soft_I2C_Write(i32 49)
%12 = tail call i32 @Soft_I2C_Write(i32 18)
%13 = tail call i32 (...) @Soft_I2C_Stop()
%14 = tail call i32 (...) @Soft_I2C_Start()
%15 = tail call i32 @Soft_I2C_Write(i32 160)
%16 = tail call i32 @Soft_I2C_Write(i32 0)
%17 = tail call i32 @Soft_I2C_Write(i32 0)
%18 = tail call i32 (...) @Soft_I2C_Stop()
ret void
}