#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 uint8_t;

/* Variables and functions */
int /*<<< orphan*/ Delay_ms(int);
int /*<<< orphan*/ I2C1_NoAck();
int I2C1_ReceiveByte();
int /*<<< orphan*/ I2C1_SendByte(int);
int /*<<< orphan*/ I2C1_Start();
int /*<<< orphan*/ I2C1_Stop();
int /*<<< orphan*/ I2C1_WaitAck();
int MPU6050_Init(void) {
  uint8_t mpu_adr;
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x75);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(1);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFF));
  I2C1_WaitAck();
  mpu_adr = I2C1_ReceiveByte();
  I2C1_NoAck();
  I2C1_Stop();
  if (mpu_adr != 0x68) {
    return -1;
  }
  Delay_ms(5);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x6B);
  I2C1_WaitAck();
  I2C1_SendByte(0x80);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(150);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x6B);
  I2C1_WaitAck();
  I2C1_SendByte(0x03);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(5);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x6C);
  I2C1_WaitAck();
  I2C1_SendByte(0x00);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(5);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x19);
  I2C1_WaitAck();
  I2C1_SendByte(0x00);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(5);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x1A);
  I2C1_WaitAck();
  I2C1_SendByte(0x00);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(5);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x1B);
  I2C1_WaitAck();
  I2C1_SendByte(0x00);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(5);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x1C);
  I2C1_WaitAck();
  I2C1_SendByte(0x00);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(5);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x37);
  I2C1_WaitAck();
  I2C1_SendByte(0x00);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(5);
  I2C1_Start();
  I2C1_SendByte(((0xD0 + 1) & 0xFE));
  I2C1_WaitAck();
  I2C1_SendByte(0x38);
  I2C1_WaitAck();
  I2C1_SendByte(0x00);
  I2C1_WaitAck();
  I2C1_Stop();
  Delay_ms(5);
  return 0;
}


x86 assembly (clang, -O0):
<MPU6050_Init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x75,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x1,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd1,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1060 <I2C1_ReceiveByte@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1080 <I2C1_NoAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
cmpl   $0x68,-0x8(%rbp)
je     11f8 <MPU6050_Init+0x88>
movl   $0xffffffff,-0x4(%rbp)
jmp    1497 <MPU6050_Init+0x327>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x6b,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x80,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x96,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x6b,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x3,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x6c,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x19,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x1a,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x1b,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x1c,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x37,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
mov    $0x0,%al
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x38,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
mov    $0x0,%al
call   1070 <I2C1_WaitAck@plt>
mov    $0x0,%al
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPU6050_Init>:
push   %rbx
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x75,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x1,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd1,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1060 <I2C1_ReceiveByte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <I2C1_NoAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0xffffffff,%eax
cmp    $0x68,%ebx
jne    1482 <MPU6050_Init+0x312>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x6b,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x80,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x96,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x6b,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x3,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x6c,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x19,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x1a,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x1b,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x1c,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x37,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
call   1050 <I2C1_Start@plt>
mov    $0xd0,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
mov    $0x38,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %edi,%edi
call   1030 <I2C1_SendByte@plt>
xor    %eax,%eax
call   1070 <I2C1_WaitAck@plt>
xor    %eax,%eax
call   1040 <I2C1_Stop@plt>
mov    $0x5,%edi
call   1090 <Delay_ms@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @MPU6050_Init() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @I2C1_Start()
%4 = call i32 @I2C1_SendByte(i32 208)
%5 = call i32 (...) @I2C1_WaitAck()
%6 = call i32 @I2C1_SendByte(i32 117)
%7 = call i32 (...) @I2C1_WaitAck()
%8 = call i32 (...) @I2C1_Stop()
%9 = call i32 @Delay_ms(i32 1)
%10 = call i32 (...) @I2C1_Start()
%11 = call i32 @I2C1_SendByte(i32 209)
%12 = call i32 (...) @I2C1_WaitAck()
%13 = call i32 (...) @I2C1_ReceiveByte()
store i32 %13, i32* %2
%14 = call i32 (...) @I2C1_NoAck()
%15 = call i32 (...) @I2C1_Stop()
%16 = load i32, i32* %2
%17 = icmp ne i32 %16, 104
br i1 %17, label %18, label %19
18: ; preds = %0
store i32 -1, i32* %1
br label %102
19: ; preds = %0
%20 = call i32 @Delay_ms(i32 5)
%21 = call i32 (...) @I2C1_Start()
%22 = call i32 @I2C1_SendByte(i32 208)
%23 = call i32 (...) @I2C1_WaitAck()
%24 = call i32 @I2C1_SendByte(i32 107)
%25 = call i32 (...) @I2C1_WaitAck()
%26 = call i32 @I2C1_SendByte(i32 128)
%27 = call i32 (...) @I2C1_WaitAck()
%28 = call i32 (...) @I2C1_Stop()
%29 = call i32 @Delay_ms(i32 150)
%30 = call i32 (...) @I2C1_Start()
%31 = call i32 @I2C1_SendByte(i32 208)
%32 = call i32 (...) @I2C1_WaitAck()
%33 = call i32 @I2C1_SendByte(i32 107)
%34 = call i32 (...) @I2C1_WaitAck()
%35 = call i32 @I2C1_SendByte(i32 3)
%36 = call i32 (...) @I2C1_WaitAck()
%37 = call i32 (...) @I2C1_Stop()
%38 = call i32 @Delay_ms(i32 5)
%39 = call i32 (...) @I2C1_Start()
%40 = call i32 @I2C1_SendByte(i32 208)
%41 = call i32 (...) @I2C1_WaitAck()
%42 = call i32 @I2C1_SendByte(i32 108)
%43 = call i32 (...) @I2C1_WaitAck()
%44 = call i32 @I2C1_SendByte(i32 0)
%45 = call i32 (...) @I2C1_WaitAck()
%46 = call i32 (...) @I2C1_Stop()
%47 = call i32 @Delay_ms(i32 5)
%48 = call i32 (...) @I2C1_Start()
%49 = call i32 @I2C1_SendByte(i32 208)
%50 = call i32 (...) @I2C1_WaitAck()
%51 = call i32 @I2C1_SendByte(i32 25)
%52 = call i32 (...) @I2C1_WaitAck()
%53 = call i32 @I2C1_SendByte(i32 0)
%54 = call i32 (...) @I2C1_WaitAck()
%55 = call i32 (...) @I2C1_Stop()
%56 = call i32 @Delay_ms(i32 5)
%57 = call i32 (...) @I2C1_Start()
%58 = call i32 @I2C1_SendByte(i32 208)
%59 = call i32 (...) @I2C1_WaitAck()
%60 = call i32 @I2C1_SendByte(i32 26)
%61 = call i32 (...) @I2C1_WaitAck()
%62 = call i32 @I2C1_SendByte(i32 0)
%63 = call i32 (...) @I2C1_WaitAck()
%64 = call i32 (...) @I2C1_Stop()
%65 = call i32 @Delay_ms(i32 5)
%66 = call i32 (...) @I2C1_Start()
%67 = call i32 @I2C1_SendByte(i32 208)
%68 = call i32 (...) @I2C1_WaitAck()
%69 = call i32 @I2C1_SendByte(i32 27)
%70 = call i32 (...) @I2C1_WaitAck()
%71 = call i32 @I2C1_SendByte(i32 0)
%72 = call i32 (...) @I2C1_WaitAck()
%73 = call i32 (...) @I2C1_Stop()
%74 = call i32 @Delay_ms(i32 5)
%75 = call i32 (...) @I2C1_Start()
%76 = call i32 @I2C1_SendByte(i32 208)
%77 = call i32 (...) @I2C1_WaitAck()
%78 = call i32 @I2C1_SendByte(i32 28)
%79 = call i32 (...) @I2C1_WaitAck()
%80 = call i32 @I2C1_SendByte(i32 0)
%81 = call i32 (...) @I2C1_WaitAck()
%82 = call i32 (...) @I2C1_Stop()
%83 = call i32 @Delay_ms(i32 5)
%84 = call i32 (...) @I2C1_Start()
%85 = call i32 @I2C1_SendByte(i32 208)
%86 = call i32 (...) @I2C1_WaitAck()
%87 = call i32 @I2C1_SendByte(i32 55)
%88 = call i32 (...) @I2C1_WaitAck()
%89 = call i32 @I2C1_SendByte(i32 0)
%90 = call i32 (...) @I2C1_WaitAck()
%91 = call i32 (...) @I2C1_Stop()
%92 = call i32 @Delay_ms(i32 5)
%93 = call i32 (...) @I2C1_Start()
%94 = call i32 @I2C1_SendByte(i32 208)
%95 = call i32 (...) @I2C1_WaitAck()
%96 = call i32 @I2C1_SendByte(i32 56)
%97 = call i32 (...) @I2C1_WaitAck()
%98 = call i32 @I2C1_SendByte(i32 0)
%99 = call i32 (...) @I2C1_WaitAck()
%100 = call i32 (...) @I2C1_Stop()
%101 = call i32 @Delay_ms(i32 5)
store i32 0, i32* %1
br label %102
102: ; preds = %19, %18
%103 = load i32, i32* %1
ret i32 %103
}

LLVM IR (-O2):
define i32 @MPU6050_Init() {
%1 = tail call i32 (...) @I2C1_Start()
%2 = tail call i32 @I2C1_SendByte(i32 208)
%3 = tail call i32 (...) @I2C1_WaitAck()
%4 = tail call i32 @I2C1_SendByte(i32 117)
%5 = tail call i32 (...) @I2C1_WaitAck()
%6 = tail call i32 (...) @I2C1_Stop()
%7 = tail call i32 @Delay_ms(i32 1)
%8 = tail call i32 (...) @I2C1_Start()
%9 = tail call i32 @I2C1_SendByte(i32 209)
%10 = tail call i32 (...) @I2C1_WaitAck()
%11 = tail call i32 (...) @I2C1_ReceiveByte()
%12 = tail call i32 (...) @I2C1_NoAck()
%13 = tail call i32 (...) @I2C1_Stop()
%14 = icmp eq i32 %11, 104
br i1 %14, label %15, label %98
15: ; preds = %0
%16 = tail call i32 @Delay_ms(i32 5)
%17 = tail call i32 (...) @I2C1_Start()
%18 = tail call i32 @I2C1_SendByte(i32 208)
%19 = tail call i32 (...) @I2C1_WaitAck()
%20 = tail call i32 @I2C1_SendByte(i32 107)
%21 = tail call i32 (...) @I2C1_WaitAck()
%22 = tail call i32 @I2C1_SendByte(i32 128)
%23 = tail call i32 (...) @I2C1_WaitAck()
%24 = tail call i32 (...) @I2C1_Stop()
%25 = tail call i32 @Delay_ms(i32 150)
%26 = tail call i32 (...) @I2C1_Start()
%27 = tail call i32 @I2C1_SendByte(i32 208)
%28 = tail call i32 (...) @I2C1_WaitAck()
%29 = tail call i32 @I2C1_SendByte(i32 107)
%30 = tail call i32 (...) @I2C1_WaitAck()
%31 = tail call i32 @I2C1_SendByte(i32 3)
%32 = tail call i32 (...) @I2C1_WaitAck()
%33 = tail call i32 (...) @I2C1_Stop()
%34 = tail call i32 @Delay_ms(i32 5)
%35 = tail call i32 (...) @I2C1_Start()
%36 = tail call i32 @I2C1_SendByte(i32 208)
%37 = tail call i32 (...) @I2C1_WaitAck()
%38 = tail call i32 @I2C1_SendByte(i32 108)
%39 = tail call i32 (...) @I2C1_WaitAck()
%40 = tail call i32 @I2C1_SendByte(i32 0)
%41 = tail call i32 (...) @I2C1_WaitAck()
%42 = tail call i32 (...) @I2C1_Stop()
%43 = tail call i32 @Delay_ms(i32 5)
%44 = tail call i32 (...) @I2C1_Start()
%45 = tail call i32 @I2C1_SendByte(i32 208)
%46 = tail call i32 (...) @I2C1_WaitAck()
%47 = tail call i32 @I2C1_SendByte(i32 25)
%48 = tail call i32 (...) @I2C1_WaitAck()
%49 = tail call i32 @I2C1_SendByte(i32 0)
%50 = tail call i32 (...) @I2C1_WaitAck()
%51 = tail call i32 (...) @I2C1_Stop()
%52 = tail call i32 @Delay_ms(i32 5)
%53 = tail call i32 (...) @I2C1_Start()
%54 = tail call i32 @I2C1_SendByte(i32 208)
%55 = tail call i32 (...) @I2C1_WaitAck()
%56 = tail call i32 @I2C1_SendByte(i32 26)
%57 = tail call i32 (...) @I2C1_WaitAck()
%58 = tail call i32 @I2C1_SendByte(i32 0)
%59 = tail call i32 (...) @I2C1_WaitAck()
%60 = tail call i32 (...) @I2C1_Stop()
%61 = tail call i32 @Delay_ms(i32 5)
%62 = tail call i32 (...) @I2C1_Start()
%63 = tail call i32 @I2C1_SendByte(i32 208)
%64 = tail call i32 (...) @I2C1_WaitAck()
%65 = tail call i32 @I2C1_SendByte(i32 27)
%66 = tail call i32 (...) @I2C1_WaitAck()
%67 = tail call i32 @I2C1_SendByte(i32 0)
%68 = tail call i32 (...) @I2C1_WaitAck()
%69 = tail call i32 (...) @I2C1_Stop()
%70 = tail call i32 @Delay_ms(i32 5)
%71 = tail call i32 (...) @I2C1_Start()
%72 = tail call i32 @I2C1_SendByte(i32 208)
%73 = tail call i32 (...) @I2C1_WaitAck()
%74 = tail call i32 @I2C1_SendByte(i32 28)
%75 = tail call i32 (...) @I2C1_WaitAck()
%76 = tail call i32 @I2C1_SendByte(i32 0)
%77 = tail call i32 (...) @I2C1_WaitAck()
%78 = tail call i32 (...) @I2C1_Stop()
%79 = tail call i32 @Delay_ms(i32 5)
%80 = tail call i32 (...) @I2C1_Start()
%81 = tail call i32 @I2C1_SendByte(i32 208)
%82 = tail call i32 (...) @I2C1_WaitAck()
%83 = tail call i32 @I2C1_SendByte(i32 55)
%84 = tail call i32 (...) @I2C1_WaitAck()
%85 = tail call i32 @I2C1_SendByte(i32 0)
%86 = tail call i32 (...) @I2C1_WaitAck()
%87 = tail call i32 (...) @I2C1_Stop()
%88 = tail call i32 @Delay_ms(i32 5)
%89 = tail call i32 (...) @I2C1_Start()
%90 = tail call i32 @I2C1_SendByte(i32 208)
%91 = tail call i32 (...) @I2C1_WaitAck()
%92 = tail call i32 @I2C1_SendByte(i32 56)
%93 = tail call i32 (...) @I2C1_WaitAck()
%94 = tail call i32 @I2C1_SendByte(i32 0)
%95 = tail call i32 (...) @I2C1_WaitAck()
%96 = tail call i32 (...) @I2C1_Stop()
%97 = tail call i32 @Delay_ms(i32 5)
br label %98
98: ; preds = %0, %15
%99 = phi i32 [ 0, %15 ], [ -1, %0 ]
ret i32 %99
}