#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*/ LCDdriver_WriteCom(int);
int /*<<< orphan*/ LCDdriver_WriteData(int);
void LCD_PlotPoint(int x, int y, int color) {
  LCDdriver_WriteCom(0x2a);
  LCDdriver_WriteData(x);
  LCDdriver_WriteData(x);
  LCDdriver_WriteCom(0x2b);
  LCDdriver_WriteData(y + 1);
  LCDdriver_WriteData(y + 1);
  LCDdriver_WriteCom(0x2c);
  LCDdriver_WriteData(color >> 8);
  LCDdriver_WriteData(color);
}


x86 assembly (clang, -O0):
<LCD_PlotPoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x2a,%edi
call   1040 <LCDdriver_WriteCom@plt>
mov    -0x4(%rbp),%edi
call   1030 <LCDdriver_WriteData@plt>
mov    -0x4(%rbp),%edi
call   1030 <LCDdriver_WriteData@plt>
mov    $0x2b,%edi
call   1040 <LCDdriver_WriteCom@plt>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <LCDdriver_WriteData@plt>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <LCDdriver_WriteData@plt>
mov    $0x2c,%edi
call   1040 <LCDdriver_WriteCom@plt>
mov    -0xc(%rbp),%edi
sar    $0x8,%edi
call   1030 <LCDdriver_WriteData@plt>
mov    -0xc(%rbp),%edi
call   1030 <LCDdriver_WriteData@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_PlotPoint>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x2a,%edi
call   1040 <LCDdriver_WriteCom@plt>
mov    %ebx,%edi
call   1030 <LCDdriver_WriteData@plt>
mov    %ebx,%edi
call   1030 <LCDdriver_WriteData@plt>
mov    $0x2b,%edi
call   1040 <LCDdriver_WriteCom@plt>
add    $0x1,%ebp
mov    %ebp,%edi
call   1030 <LCDdriver_WriteData@plt>
mov    %ebp,%edi
call   1030 <LCDdriver_WriteData@plt>
mov    $0x2c,%edi
call   1040 <LCDdriver_WriteCom@plt>
mov    %r14d,%edi
sar    $0x8,%edi
call   1030 <LCDdriver_WriteData@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <LCDdriver_WriteData@plt>

LLVM IR (-O0):
define void @LCD_PlotPoint(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @LCDdriver_WriteCom(i32 42)
%8 = load i32, i32* %4
%9 = call i32 @LCDdriver_WriteData(i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @LCDdriver_WriteData(i32 %10)
%12 = call i32 @LCDdriver_WriteCom(i32 43)
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = call i32 @LCDdriver_WriteData(i32 %14)
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
%18 = call i32 @LCDdriver_WriteData(i32 %17)
%19 = call i32 @LCDdriver_WriteCom(i32 44)
%20 = load i32, i32* %6
%21 = ashr i32 %20, 8
%22 = call i32 @LCDdriver_WriteData(i32 %21)
%23 = load i32, i32* %6
%24 = call i32 @LCDdriver_WriteData(i32 %23)
ret void
}

LLVM IR (-O2):
define void @LCD_PlotPoint(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @LCDdriver_WriteCom(i32 42)
%5 = tail call i32 @LCDdriver_WriteData(i32 %0)
%6 = tail call i32 @LCDdriver_WriteData(i32 %0)
%7 = tail call i32 @LCDdriver_WriteCom(i32 43)
%8 = add nsw i32 %1, 1
%9 = tail call i32 @LCDdriver_WriteData(i32 %8)
%10 = tail call i32 @LCDdriver_WriteData(i32 %8)
%11 = tail call i32 @LCDdriver_WriteCom(i32 44)
%12 = ashr i32 %2, 8
%13 = tail call i32 @LCDdriver_WriteData(i32 %12)
%14 = tail call i32 @LCDdriver_WriteData(i32 %2)
ret void
}