#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(int);
int /*<<< orphan*/ Delay_ms(int);
int /*<<< orphan*/ SPI_2825_WrCmd(int);
int /*<<< orphan*/ SPI_2825_WrReg(int, int);
int /*<<< orphan*/ SPI_WriteData(int);
int /*<<< orphan*/ Set_RST(int);
int /*<<< orphan*/ ssd2828_no_sleep(int);
void Init_SSD2805_step1(void) {
  ssd2828_no_sleep(1);
  Set_RST(0);
  Delay_ms(20);
  Set_RST(1);
  Delay_ms(30);
  SPI_2825_WrCmd(0xb7);
  SPI_WriteData(0x50);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xb8);
  SPI_WriteData(0x00);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xb9);
  SPI_WriteData(0x00);
  SPI_WriteData(0x00);
  SPI_2825_WrReg(0xBA, (0x4214));
  SPI_2825_WrCmd(0xBB);
  SPI_WriteData(0x03);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xb9);
  SPI_WriteData(0x01);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xDE);
  SPI_WriteData(0x03);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xc9);
  SPI_WriteData(0x02);
  SPI_WriteData(0x23);
  SPI_2825_WrCmd(0xb7);
  SPI_WriteData(0x50);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xb8);
  SPI_WriteData(0x00);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xb9);
  SPI_WriteData(0x00);
  SPI_WriteData(0x00);
  SPI_2825_WrReg(0xBA, (0x8224));
  SPI_2825_WrCmd(0xBB);
  SPI_WriteData(0x07);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xb9);
  SPI_WriteData(0x01);
  SPI_WriteData(0x00);
  SPI_2825_WrCmd(0xc9);
  SPI_WriteData(0x02);
  SPI_WriteData(0x23);
  Delay(5);
  SPI_2825_WrCmd(0xCA);
  SPI_WriteData(0x01);
  SPI_WriteData(0x23);
  SPI_2825_WrCmd(0xCB);
  SPI_WriteData(0x10);
  SPI_WriteData(0x05);
  SPI_2825_WrCmd(0xCC);
  SPI_WriteData(0x05);
  SPI_WriteData(0x10);
  Delay(5);
  SPI_2825_WrCmd(0xD0);
  SPI_WriteData(0x00);
  SPI_WriteData(0x00);
  Delay(5);
}


x86 assembly (clang, -O0):
<Init_SSD2805_step1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1080 <ssd2828_no_sleep@plt>
xor    %edi,%edi
call   1060 <Set_RST@plt>
mov    $0x14,%edi
call   1090 <Delay_ms@plt>
mov    $0x1,%edi
call   1060 <Set_RST@plt>
mov    $0x1e,%edi
call   1090 <Delay_ms@plt>
mov    $0xb7,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x50,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb8,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb9,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xba,%edi
mov    $0x4214,%esi
call   1050 <SPI_2825_WrReg@plt>
mov    $0xbb,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x3,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb9,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x1,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xde,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x3,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xc9,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x2,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x23,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb7,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x50,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb8,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb9,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xba,%edi
mov    $0x8224,%esi
call   1050 <SPI_2825_WrReg@plt>
mov    $0xbb,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x7,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb9,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x1,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xc9,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x2,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x23,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x5,%edi
call   1030 <Delay@plt>
mov    $0xca,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x1,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x23,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xcb,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x10,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x5,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xcc,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x5,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x10,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x5,%edi
call   1030 <Delay@plt>
mov    $0xd0,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x5,%edi
call   1030 <Delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init_SSD2805_step1>:
push   %rax
mov    $0x1,%edi
call   1080 <ssd2828_no_sleep@plt>
xor    %edi,%edi
call   1060 <Set_RST@plt>
mov    $0x14,%edi
call   1090 <Delay_ms@plt>
mov    $0x1,%edi
call   1060 <Set_RST@plt>
mov    $0x1e,%edi
call   1090 <Delay_ms@plt>
mov    $0xb7,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x50,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb8,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb9,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xba,%edi
mov    $0x4214,%esi
call   1050 <SPI_2825_WrReg@plt>
mov    $0xbb,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x3,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb9,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x1,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xde,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x3,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xc9,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x2,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x23,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb7,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x50,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb8,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb9,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xba,%edi
mov    $0x8224,%esi
call   1050 <SPI_2825_WrReg@plt>
mov    $0xbb,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x7,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xb9,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x1,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xc9,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x2,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x23,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x5,%edi
call   1030 <Delay@plt>
mov    $0xca,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x1,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x23,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xcb,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x10,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x5,%edi
call   1040 <SPI_WriteData@plt>
mov    $0xcc,%edi
call   1070 <SPI_2825_WrCmd@plt>
mov    $0x5,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x10,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x5,%edi
call   1030 <Delay@plt>
mov    $0xd0,%edi
call   1070 <SPI_2825_WrCmd@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
xor    %edi,%edi
call   1040 <SPI_WriteData@plt>
mov    $0x5,%edi
pop    %rax
jmp    1030 <Delay@plt>

LLVM IR (-O0):
define void @Init_SSD2805_step1() {
%1 = call i32 @ssd2828_no_sleep(i32 1)
%2 = call i32 @Set_RST(i32 0)
%3 = call i32 @Delay_ms(i32 20)
%4 = call i32 @Set_RST(i32 1)
%5 = call i32 @Delay_ms(i32 30)
%6 = call i32 @SPI_2825_WrCmd(i32 183)
%7 = call i32 @SPI_WriteData(i32 80)
%8 = call i32 @SPI_WriteData(i32 0)
%9 = call i32 @SPI_2825_WrCmd(i32 184)
%10 = call i32 @SPI_WriteData(i32 0)
%11 = call i32 @SPI_WriteData(i32 0)
%12 = call i32 @SPI_2825_WrCmd(i32 185)
%13 = call i32 @SPI_WriteData(i32 0)
%14 = call i32 @SPI_WriteData(i32 0)
%15 = call i32 @SPI_2825_WrReg(i32 186, i32 16916)
%16 = call i32 @SPI_2825_WrCmd(i32 187)
%17 = call i32 @SPI_WriteData(i32 3)
%18 = call i32 @SPI_WriteData(i32 0)
%19 = call i32 @SPI_2825_WrCmd(i32 185)
%20 = call i32 @SPI_WriteData(i32 1)
%21 = call i32 @SPI_WriteData(i32 0)
%22 = call i32 @SPI_2825_WrCmd(i32 222)
%23 = call i32 @SPI_WriteData(i32 3)
%24 = call i32 @SPI_WriteData(i32 0)
%25 = call i32 @SPI_2825_WrCmd(i32 201)
%26 = call i32 @SPI_WriteData(i32 2)
%27 = call i32 @SPI_WriteData(i32 35)
%28 = call i32 @SPI_2825_WrCmd(i32 183)
%29 = call i32 @SPI_WriteData(i32 80)
%30 = call i32 @SPI_WriteData(i32 0)
%31 = call i32 @SPI_2825_WrCmd(i32 184)
%32 = call i32 @SPI_WriteData(i32 0)
%33 = call i32 @SPI_WriteData(i32 0)
%34 = call i32 @SPI_2825_WrCmd(i32 185)
%35 = call i32 @SPI_WriteData(i32 0)
%36 = call i32 @SPI_WriteData(i32 0)
%37 = call i32 @SPI_2825_WrReg(i32 186, i32 33316)
%38 = call i32 @SPI_2825_WrCmd(i32 187)
%39 = call i32 @SPI_WriteData(i32 7)
%40 = call i32 @SPI_WriteData(i32 0)
%41 = call i32 @SPI_2825_WrCmd(i32 185)
%42 = call i32 @SPI_WriteData(i32 1)
%43 = call i32 @SPI_WriteData(i32 0)
%44 = call i32 @SPI_2825_WrCmd(i32 201)
%45 = call i32 @SPI_WriteData(i32 2)
%46 = call i32 @SPI_WriteData(i32 35)
%47 = call i32 @Delay(i32 5)
%48 = call i32 @SPI_2825_WrCmd(i32 202)
%49 = call i32 @SPI_WriteData(i32 1)
%50 = call i32 @SPI_WriteData(i32 35)
%51 = call i32 @SPI_2825_WrCmd(i32 203)
%52 = call i32 @SPI_WriteData(i32 16)
%53 = call i32 @SPI_WriteData(i32 5)
%54 = call i32 @SPI_2825_WrCmd(i32 204)
%55 = call i32 @SPI_WriteData(i32 5)
%56 = call i32 @SPI_WriteData(i32 16)
%57 = call i32 @Delay(i32 5)
%58 = call i32 @SPI_2825_WrCmd(i32 208)
%59 = call i32 @SPI_WriteData(i32 0)
%60 = call i32 @SPI_WriteData(i32 0)
%61 = call i32 @Delay(i32 5)
ret void
}

LLVM IR (-O2):
define void @Init_SSD2805_step1() {
%1 = tail call i32 @ssd2828_no_sleep(i32 1)
%2 = tail call i32 @Set_RST(i32 0)
%3 = tail call i32 @Delay_ms(i32 20)
%4 = tail call i32 @Set_RST(i32 1)
%5 = tail call i32 @Delay_ms(i32 30)
%6 = tail call i32 @SPI_2825_WrCmd(i32 183)
%7 = tail call i32 @SPI_WriteData(i32 80)
%8 = tail call i32 @SPI_WriteData(i32 0)
%9 = tail call i32 @SPI_2825_WrCmd(i32 184)
%10 = tail call i32 @SPI_WriteData(i32 0)
%11 = tail call i32 @SPI_WriteData(i32 0)
%12 = tail call i32 @SPI_2825_WrCmd(i32 185)
%13 = tail call i32 @SPI_WriteData(i32 0)
%14 = tail call i32 @SPI_WriteData(i32 0)
%15 = tail call i32 @SPI_2825_WrReg(i32 186, i32 16916)
%16 = tail call i32 @SPI_2825_WrCmd(i32 187)
%17 = tail call i32 @SPI_WriteData(i32 3)
%18 = tail call i32 @SPI_WriteData(i32 0)
%19 = tail call i32 @SPI_2825_WrCmd(i32 185)
%20 = tail call i32 @SPI_WriteData(i32 1)
%21 = tail call i32 @SPI_WriteData(i32 0)
%22 = tail call i32 @SPI_2825_WrCmd(i32 222)
%23 = tail call i32 @SPI_WriteData(i32 3)
%24 = tail call i32 @SPI_WriteData(i32 0)
%25 = tail call i32 @SPI_2825_WrCmd(i32 201)
%26 = tail call i32 @SPI_WriteData(i32 2)
%27 = tail call i32 @SPI_WriteData(i32 35)
%28 = tail call i32 @SPI_2825_WrCmd(i32 183)
%29 = tail call i32 @SPI_WriteData(i32 80)
%30 = tail call i32 @SPI_WriteData(i32 0)
%31 = tail call i32 @SPI_2825_WrCmd(i32 184)
%32 = tail call i32 @SPI_WriteData(i32 0)
%33 = tail call i32 @SPI_WriteData(i32 0)
%34 = tail call i32 @SPI_2825_WrCmd(i32 185)
%35 = tail call i32 @SPI_WriteData(i32 0)
%36 = tail call i32 @SPI_WriteData(i32 0)
%37 = tail call i32 @SPI_2825_WrReg(i32 186, i32 33316)
%38 = tail call i32 @SPI_2825_WrCmd(i32 187)
%39 = tail call i32 @SPI_WriteData(i32 7)
%40 = tail call i32 @SPI_WriteData(i32 0)
%41 = tail call i32 @SPI_2825_WrCmd(i32 185)
%42 = tail call i32 @SPI_WriteData(i32 1)
%43 = tail call i32 @SPI_WriteData(i32 0)
%44 = tail call i32 @SPI_2825_WrCmd(i32 201)
%45 = tail call i32 @SPI_WriteData(i32 2)
%46 = tail call i32 @SPI_WriteData(i32 35)
%47 = tail call i32 @Delay(i32 5)
%48 = tail call i32 @SPI_2825_WrCmd(i32 202)
%49 = tail call i32 @SPI_WriteData(i32 1)
%50 = tail call i32 @SPI_WriteData(i32 35)
%51 = tail call i32 @SPI_2825_WrCmd(i32 203)
%52 = tail call i32 @SPI_WriteData(i32 16)
%53 = tail call i32 @SPI_WriteData(i32 5)
%54 = tail call i32 @SPI_2825_WrCmd(i32 204)
%55 = tail call i32 @SPI_WriteData(i32 5)
%56 = tail call i32 @SPI_WriteData(i32 16)
%57 = tail call i32 @Delay(i32 5)
%58 = tail call i32 @SPI_2825_WrCmd(i32 208)
%59 = tail call i32 @SPI_WriteData(i32 0)
%60 = tail call i32 @SPI_WriteData(i32 0)
%61 = tail call i32 @Delay(i32 5)
ret void
}