#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*/ WriteCommand(int);
int /*<<< orphan*/ WriteData(unsigned long);
void Formike128x128x16PixelDraw(void *pvDisplayData, long lX, long lY,
                                unsigned long ulValue) {
  WriteCommand(0x2a);
  WriteData(lX);
  WriteData(lX);
  WriteCommand(0x2b);
  WriteData(lY + 1);
  WriteData(lY + 1);
  WriteCommand(0x2c);
  WriteData(ulValue >> 8);
  WriteData(ulValue);
}


x86 assembly (clang, -O0):
<Formike128x128x16PixelDraw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x2a,%edi
call   1040 <WriteCommand@plt>
mov    -0x10(%rbp),%rdi
call   1030 <WriteData@plt>
mov    -0x10(%rbp),%rdi
call   1030 <WriteData@plt>
mov    $0x2b,%edi
call   1040 <WriteCommand@plt>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1030 <WriteData@plt>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1030 <WriteData@plt>
mov    $0x2c,%edi
call   1040 <WriteCommand@plt>
mov    -0x20(%rbp),%rdi
shr    $0x8,%rdi
call   1030 <WriteData@plt>
mov    -0x20(%rbp),%rdi
call   1030 <WriteData@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Formike128x128x16PixelDraw>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
mov    $0x2a,%edi
call   1040 <WriteCommand@plt>
mov    %r15,%rdi
call   1030 <WriteData@plt>
mov    %r15,%rdi
call   1030 <WriteData@plt>
mov    $0x2b,%edi
call   1040 <WriteCommand@plt>
add    $0x1,%rbx
mov    %rbx,%rdi
call   1030 <WriteData@plt>
mov    %rbx,%rdi
call   1030 <WriteData@plt>
mov    $0x2c,%edi
call   1040 <WriteCommand@plt>
mov    %r14,%rdi
shr    $0x8,%rdi
call   1030 <WriteData@plt>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <WriteData@plt>

LLVM IR (-O0):
define void @Formike128x128x16PixelDraw(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = call i32 @WriteCommand(i32 42)
%10 = load i64, i64* %6
%11 = call i32 @WriteData(i64 %10)
%12 = load i64, i64* %6
%13 = call i32 @WriteData(i64 %12)
%14 = call i32 @WriteCommand(i32 43)
%15 = load i64, i64* %7
%16 = add nsw i64 %15, 1
%17 = call i32 @WriteData(i64 %16)
%18 = load i64, i64* %7
%19 = add nsw i64 %18, 1
%20 = call i32 @WriteData(i64 %19)
%21 = call i32 @WriteCommand(i32 44)
%22 = load i64, i64* %8
%23 = lshr i64 %22, 8
%24 = call i32 @WriteData(i64 %23)
%25 = load i64, i64* %8
%26 = call i32 @WriteData(i64 %25)
ret void
}

LLVM IR (-O2):
define void @Formike128x128x16PixelDraw(i8* nocapture readnone %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @WriteCommand(i32 42)
%6 = tail call i32 @WriteData(i64 %1)
%7 = tail call i32 @WriteData(i64 %1)
%8 = tail call i32 @WriteCommand(i32 43)
%9 = add nsw i64 %2, 1
%10 = tail call i32 @WriteData(i64 %9)
%11 = tail call i32 @WriteData(i64 %9)
%12 = tail call i32 @WriteCommand(i32 44)
%13 = lshr i64 %3, 8
%14 = tail call i32 @WriteData(i64 %13)
%15 = tail call i32 @WriteData(i64 %3)
ret void
}