#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*/ gpio_write_and_close(int /*<<< orphan*/, int);
int /*<<< orphan*/ screen_ssd1306_clear();
int /*<<< orphan*/ screen_ssd1306_send_command(int);
int /*<<< orphan*/ usleep(int);
void screen_ssd1306_init(void) {
  gpio_write_and_close(0, 1);
  usleep(1000);
  gpio_write_and_close(0, 0);
  usleep(10000);
  gpio_write_and_close(0, 1);
  usleep(1000);
  screen_ssd1306_send_command(0xAE);
  screen_ssd1306_send_command(0xD5);
  screen_ssd1306_send_command(0x80);
  screen_ssd1306_send_command(0xA8);
  screen_ssd1306_send_command(0x3F);
  screen_ssd1306_send_command(0xD3);
  screen_ssd1306_send_command(0x00);
  screen_ssd1306_send_command(0x40 | 0x00);
  screen_ssd1306_send_command(0x8D);
  screen_ssd1306_send_command(0x14);
  screen_ssd1306_send_command(0x20);
  screen_ssd1306_send_command(0x00);
  screen_ssd1306_send_command(0xA0 | 0x10);
  screen_ssd1306_send_command(0xC8);
  screen_ssd1306_send_command(0xDA);
  screen_ssd1306_send_command(0x12);
  screen_ssd1306_send_command(0x81);
  screen_ssd1306_send_command(0xCF);
  screen_ssd1306_send_command(0xD9);
  screen_ssd1306_send_command(0xF1);
  screen_ssd1306_send_command(0xDB);
  screen_ssd1306_send_command(0x40);
  screen_ssd1306_send_command(0xA4);
  screen_ssd1306_send_command(0xA6);
  screen_ssd1306_send_command(0xAF);
  screen_ssd1306_clear();
}


x86 assembly (clang, -O0):
<screen_ssd1306_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <gpio_write_and_close@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <gpio_write_and_close@plt>
mov    $0x2710,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <gpio_write_and_close@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0xae,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xd5,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x80,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xa8,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x3f,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xd3,%edi
call   1040 <screen_ssd1306_send_command@plt>
xor    %edi,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x40,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x8d,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x14,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x20,%edi
call   1040 <screen_ssd1306_send_command@plt>
xor    %edi,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xb0,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xc8,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xda,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x12,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x81,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xcf,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xd9,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xf1,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xdb,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x40,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xa4,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xa6,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xaf,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x0,%al
call   1050 <screen_ssd1306_clear@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_ssd1306_init>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <gpio_write_and_close@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <gpio_write_and_close@plt>
mov    $0x2710,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <gpio_write_and_close@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0xae,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xd5,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x80,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xa8,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x3f,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xd3,%edi
call   1040 <screen_ssd1306_send_command@plt>
xor    %edi,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x40,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x8d,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x14,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x20,%edi
call   1040 <screen_ssd1306_send_command@plt>
xor    %edi,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xb0,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xc8,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xda,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x12,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x81,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xcf,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xd9,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xf1,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xdb,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0x40,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xa4,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xa6,%edi
call   1040 <screen_ssd1306_send_command@plt>
mov    $0xaf,%edi
call   1040 <screen_ssd1306_send_command@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <screen_ssd1306_clear@plt>

LLVM IR (-O0):
define void @screen_ssd1306_init() {
%1 = call i32 @gpio_write_and_close(i32 0, i32 1)
%2 = call i32 @usleep(i32 1000)
%3 = call i32 @gpio_write_and_close(i32 0, i32 0)
%4 = call i32 @usleep(i32 10000)
%5 = call i32 @gpio_write_and_close(i32 0, i32 1)
%6 = call i32 @usleep(i32 1000)
%7 = call i32 @screen_ssd1306_send_command(i32 174)
%8 = call i32 @screen_ssd1306_send_command(i32 213)
%9 = call i32 @screen_ssd1306_send_command(i32 128)
%10 = call i32 @screen_ssd1306_send_command(i32 168)
%11 = call i32 @screen_ssd1306_send_command(i32 63)
%12 = call i32 @screen_ssd1306_send_command(i32 211)
%13 = call i32 @screen_ssd1306_send_command(i32 0)
%14 = call i32 @screen_ssd1306_send_command(i32 64)
%15 = call i32 @screen_ssd1306_send_command(i32 141)
%16 = call i32 @screen_ssd1306_send_command(i32 20)
%17 = call i32 @screen_ssd1306_send_command(i32 32)
%18 = call i32 @screen_ssd1306_send_command(i32 0)
%19 = call i32 @screen_ssd1306_send_command(i32 176)
%20 = call i32 @screen_ssd1306_send_command(i32 200)
%21 = call i32 @screen_ssd1306_send_command(i32 218)
%22 = call i32 @screen_ssd1306_send_command(i32 18)
%23 = call i32 @screen_ssd1306_send_command(i32 129)
%24 = call i32 @screen_ssd1306_send_command(i32 207)
%25 = call i32 @screen_ssd1306_send_command(i32 217)
%26 = call i32 @screen_ssd1306_send_command(i32 241)
%27 = call i32 @screen_ssd1306_send_command(i32 219)
%28 = call i32 @screen_ssd1306_send_command(i32 64)
%29 = call i32 @screen_ssd1306_send_command(i32 164)
%30 = call i32 @screen_ssd1306_send_command(i32 166)
%31 = call i32 @screen_ssd1306_send_command(i32 175)
%32 = call i32 (...) @screen_ssd1306_clear()
ret void
}

LLVM IR (-O2):
define void @screen_ssd1306_init() {
%1 = tail call i32 @gpio_write_and_close(i32 0, i32 1)
%2 = tail call i32 @usleep(i32 1000)
%3 = tail call i32 @gpio_write_and_close(i32 0, i32 0)
%4 = tail call i32 @usleep(i32 10000)
%5 = tail call i32 @gpio_write_and_close(i32 0, i32 1)
%6 = tail call i32 @usleep(i32 1000)
%7 = tail call i32 @screen_ssd1306_send_command(i32 174)
%8 = tail call i32 @screen_ssd1306_send_command(i32 213)
%9 = tail call i32 @screen_ssd1306_send_command(i32 128)
%10 = tail call i32 @screen_ssd1306_send_command(i32 168)
%11 = tail call i32 @screen_ssd1306_send_command(i32 63)
%12 = tail call i32 @screen_ssd1306_send_command(i32 211)
%13 = tail call i32 @screen_ssd1306_send_command(i32 0)
%14 = tail call i32 @screen_ssd1306_send_command(i32 64)
%15 = tail call i32 @screen_ssd1306_send_command(i32 141)
%16 = tail call i32 @screen_ssd1306_send_command(i32 20)
%17 = tail call i32 @screen_ssd1306_send_command(i32 32)
%18 = tail call i32 @screen_ssd1306_send_command(i32 0)
%19 = tail call i32 @screen_ssd1306_send_command(i32 176)
%20 = tail call i32 @screen_ssd1306_send_command(i32 200)
%21 = tail call i32 @screen_ssd1306_send_command(i32 218)
%22 = tail call i32 @screen_ssd1306_send_command(i32 18)
%23 = tail call i32 @screen_ssd1306_send_command(i32 129)
%24 = tail call i32 @screen_ssd1306_send_command(i32 207)
%25 = tail call i32 @screen_ssd1306_send_command(i32 217)
%26 = tail call i32 @screen_ssd1306_send_command(i32 241)
%27 = tail call i32 @screen_ssd1306_send_command(i32 219)
%28 = tail call i32 @screen_ssd1306_send_command(i32 64)
%29 = tail call i32 @screen_ssd1306_send_command(i32 164)
%30 = tail call i32 @screen_ssd1306_send_command(i32 166)
%31 = tail call i32 @screen_ssd1306_send_command(i32 175)
%32 = tail call i32 (...) @screen_ssd1306_clear()
ret void
}