#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 */
scalar_t__ I2C_setup();
int /*<<< orphan*/ SSD1306_writeCmd(int);
int /*<<< orphan*/ usleep(int);
int SSD1306_setup() {
  int i;
  if (I2C_setup() < 0) {
    return -1;
  }
  SSD1306_writeCmd(0xAE);
  SSD1306_writeCmd(0xD5);
  SSD1306_writeCmd(0x80);
  SSD1306_writeCmd(0xA8);
  SSD1306_writeCmd(0x3F);
  SSD1306_writeCmd(0xD3);
  SSD1306_writeCmd(0x00);
  SSD1306_writeCmd(((0 >= 0x40) && (0 < 0x80) ? 0 : 0x40));
  SSD1306_writeCmd(0x8D);
  SSD1306_writeCmd(0x14);
  SSD1306_writeCmd(0xA0);
  SSD1306_writeCmd(0xC0);
  SSD1306_writeCmd(0xDA);
  SSD1306_writeCmd(0x12);
  SSD1306_writeCmd(0x81);
  SSD1306_writeCmd(0xCF);
  SSD1306_writeCmd(0xD9);
  SSD1306_writeCmd(0xF1);
  SSD1306_writeCmd(0xDB);
  SSD1306_writeCmd(0x40);
  SSD1306_writeCmd(0xA4);
  SSD1306_writeCmd(0xA6);
  SSD1306_writeCmd(0x20);
  SSD1306_writeCmd(0x00);
  SSD1306_writeCmd(0xAF);
  SSD1306_writeCmd(((0 < 0xB7) && (0 >= 0xB0) ? 0xB0 + 0 : 0xB0));
  SSD1306_writeCmd((0 < 0x10 ? 0 : 0));
  SSD1306_writeCmd(((0x10 < 0x20) && (0x10 >= 0x10) ? 0x10 : 0x10));
  usleep(100);
}


x86 assembly (clang, -O0):
<SSD1306_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <I2C_setup@plt>
cmp    $0x0,%rax
jge    1155 <SSD1306_setup+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    126e <SSD1306_setup+0x13e>
mov    $0xae,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xd5,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x80,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xa8,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x3f,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xd3,%edi
call   1030 <SSD1306_writeCmd@plt>
xor    %edi,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x40,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x8d,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x14,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xa0,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xc0,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xda,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x12,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x81,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xcf,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xd9,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xf1,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xdb,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x40,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xa4,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xa6,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x20,%edi
call   1030 <SSD1306_writeCmd@plt>
xor    %edi,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xaf,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xb0,%edi
call   1030 <SSD1306_writeCmd@plt>
xor    %edi,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x10,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x64,%edi
call   1050 <usleep@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSD1306_setup>:
push   %rax
xor    %eax,%eax
call   1040 <I2C_setup@plt>
test   %rax,%rax
js     125a <SSD1306_setup+0x12a>
mov    $0xae,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xd5,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x80,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xa8,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x3f,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xd3,%edi
call   1030 <SSD1306_writeCmd@plt>
xor    %edi,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x40,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x8d,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x14,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xa0,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xc0,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xda,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x12,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x81,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xcf,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xd9,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xf1,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xdb,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x40,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xa4,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xa6,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x20,%edi
call   1030 <SSD1306_writeCmd@plt>
xor    %edi,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xaf,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0xb0,%edi
call   1030 <SSD1306_writeCmd@plt>
xor    %edi,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x10,%edi
call   1030 <SSD1306_writeCmd@plt>
mov    $0x64,%edi
call   1050 <usleep@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SSD1306_setup() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 (...) @I2C_setup()
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 -1, i32* %1
br label %36
6: ; preds = %0
%7 = call i32 @SSD1306_writeCmd(i32 174)
%8 = call i32 @SSD1306_writeCmd(i32 213)
%9 = call i32 @SSD1306_writeCmd(i32 128)
%10 = call i32 @SSD1306_writeCmd(i32 168)
%11 = call i32 @SSD1306_writeCmd(i32 63)
%12 = call i32 @SSD1306_writeCmd(i32 211)
%13 = call i32 @SSD1306_writeCmd(i32 0)
%14 = call i32 @SSD1306_writeCmd(i32 64)
%15 = call i32 @SSD1306_writeCmd(i32 141)
%16 = call i32 @SSD1306_writeCmd(i32 20)
%17 = call i32 @SSD1306_writeCmd(i32 160)
%18 = call i32 @SSD1306_writeCmd(i32 192)
%19 = call i32 @SSD1306_writeCmd(i32 218)
%20 = call i32 @SSD1306_writeCmd(i32 18)
%21 = call i32 @SSD1306_writeCmd(i32 129)
%22 = call i32 @SSD1306_writeCmd(i32 207)
%23 = call i32 @SSD1306_writeCmd(i32 217)
%24 = call i32 @SSD1306_writeCmd(i32 241)
%25 = call i32 @SSD1306_writeCmd(i32 219)
%26 = call i32 @SSD1306_writeCmd(i32 64)
%27 = call i32 @SSD1306_writeCmd(i32 164)
%28 = call i32 @SSD1306_writeCmd(i32 166)
%29 = call i32 @SSD1306_writeCmd(i32 32)
%30 = call i32 @SSD1306_writeCmd(i32 0)
%31 = call i32 @SSD1306_writeCmd(i32 175)
%32 = call i32 @SSD1306_writeCmd(i32 176)
%33 = call i32 @SSD1306_writeCmd(i32 0)
%34 = call i32 @SSD1306_writeCmd(i32 16)
%35 = call i32 @usleep(i32 100)
br label %36
36: ; preds = %6, %5
%37 = load i32, i32* %1
ret i32 %37
}

LLVM IR (-O2):
define i32 @SSD1306_setup() {
%1 = tail call i64 (...) @I2C_setup()
%2 = icmp slt i64 %1, 0
br i1 %2, label %33, label %3
3: ; preds = %0
%4 = tail call i32 @SSD1306_writeCmd(i32 174)
%5 = tail call i32 @SSD1306_writeCmd(i32 213)
%6 = tail call i32 @SSD1306_writeCmd(i32 128)
%7 = tail call i32 @SSD1306_writeCmd(i32 168)
%8 = tail call i32 @SSD1306_writeCmd(i32 63)
%9 = tail call i32 @SSD1306_writeCmd(i32 211)
%10 = tail call i32 @SSD1306_writeCmd(i32 0)
%11 = tail call i32 @SSD1306_writeCmd(i32 64)
%12 = tail call i32 @SSD1306_writeCmd(i32 141)
%13 = tail call i32 @SSD1306_writeCmd(i32 20)
%14 = tail call i32 @SSD1306_writeCmd(i32 160)
%15 = tail call i32 @SSD1306_writeCmd(i32 192)
%16 = tail call i32 @SSD1306_writeCmd(i32 218)
%17 = tail call i32 @SSD1306_writeCmd(i32 18)
%18 = tail call i32 @SSD1306_writeCmd(i32 129)
%19 = tail call i32 @SSD1306_writeCmd(i32 207)
%20 = tail call i32 @SSD1306_writeCmd(i32 217)
%21 = tail call i32 @SSD1306_writeCmd(i32 241)
%22 = tail call i32 @SSD1306_writeCmd(i32 219)
%23 = tail call i32 @SSD1306_writeCmd(i32 64)
%24 = tail call i32 @SSD1306_writeCmd(i32 164)
%25 = tail call i32 @SSD1306_writeCmd(i32 166)
%26 = tail call i32 @SSD1306_writeCmd(i32 32)
%27 = tail call i32 @SSD1306_writeCmd(i32 0)
%28 = tail call i32 @SSD1306_writeCmd(i32 175)
%29 = tail call i32 @SSD1306_writeCmd(i32 176)
%30 = tail call i32 @SSD1306_writeCmd(i32 0)
%31 = tail call i32 @SSD1306_writeCmd(i32 16)
%32 = tail call i32 @usleep(i32 100)
br label %33
33: ; preds = %0, %3
ret i32 -1
}