#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 */
struct ssd1306Display {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ ssd1306_displayPowerOff(struct ssd1306Display *);
int /*<<< orphan*/ ssd1306_displayPowerOn(struct ssd1306Display *);
struct ssd1306Display *ssd1306_initDisplay(int, int);
void ssd1306_demo() {
  sleep(20);
  printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
  printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
  printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
  printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
  struct ssd1306Display *display = ssd1306_initDisplay(1, 0x3d);
  ssd1306_displayPowerOn(display);
  sleep(20);
  printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
  printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
  printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
  printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
  printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
  printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
  printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
  printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
  ssd1306_displayPowerOff(display);
}


x86 assembly (clang, -O0):
<ssd1306_demo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x14,%edi
call   1060 <sleep@plt>
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe73(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x3d,%esi
call   1030 <ssd1306_initDisplay@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <ssd1306_displayPowerOn@plt>
mov    $0x14,%edi
call   1060 <sleep@plt>
lea    0xe5f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe53(%rip),%rdi
call   1040 <printf@plt>
lea    0xe47(%rip),%rdi
call   1040 <printf@plt>
lea    0xe3b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe2f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe23(%rip),%rdi
call   1040 <printf@plt>
lea    0xe17(%rip),%rdi
call   1040 <printf@plt>
lea    0xe0b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <ssd1306_displayPowerOff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssd1306_demo>:
push   %r14
push   %rbx
push   %rax
mov    $0x14,%edi
call   1060 <sleep@plt>
lea    0xe9b(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x3d,%esi
call   1030 <ssd1306_initDisplay@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1070 <ssd1306_displayPowerOn@plt>
mov    $0x14,%edi
call   1060 <sleep@plt>
lea    0xe6d(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <ssd1306_displayPowerOff@plt>

LLVM IR (-O0):
%struct.ssd1306Display = type { i32 }
@.str = [30 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!\0A\00"
@.str.1 = [30 x i8] c"@@@@@@@@@@@@@@@@@@@@@@@@@@@@\0A\00"
define void @ssd1306_demo() {
%1 = alloca %struct.ssd1306Display*
%2 = call i32 @sleep(i32 20)
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%7 = call %struct.ssd1306Display* @ssd1306_initDisplay(i32 1, i32 61)
store %struct.ssd1306Display* %7, %struct.ssd1306Display** %1
%8 = load %struct.ssd1306Display*, %struct.ssd1306Display** %1
%9 = call i32 @ssd1306_displayPowerOn(%struct.ssd1306Display* %8)
%10 = call i32 @sleep(i32 20)
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%19 = load %struct.ssd1306Display*, %struct.ssd1306Display** %1
%20 = call i32 @ssd1306_displayPowerOff(%struct.ssd1306Display* %19)
ret void
}

LLVM IR (-O2):
%struct.ssd1306Display = type { i32 }
@str.4 = [29 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!\00"
@str.12 = [29 x i8] c"@@@@@@@@@@@@@@@@@@@@@@@@@@@@\00"
define void @ssd1306_demo() {
%1 = tail call i32 @sleep(i32 20)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.4, i64 0, i64 0))
%6 = tail call %struct.ssd1306Display* @ssd1306_initDisplay(i32 1, i32 61)
%7 = tail call i32 @ssd1306_displayPowerOn(%struct.ssd1306Display* %6)
%8 = tail call i32 @sleep(i32 20)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%17 = tail call i32 @ssd1306_displayPowerOff(%struct.ssd1306Display* %6)
ret void
}