#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*/ lcd_write_index_register(int);
int /*<<< orphan*/ lcd_write_wdr(int);
void lcd_write_pixel(unsigned int x, unsigned int y, int color) {
  lcd_write_index_register(0x20);
  lcd_write_wdr(x);
  lcd_write_index_register(0x21);
  lcd_write_wdr(y);
  lcd_write_index_register(0x50);
  lcd_write_wdr(x);
  lcd_write_index_register(0x51);
  lcd_write_wdr(x);
  lcd_write_index_register(0x52);
  lcd_write_wdr(y);
  lcd_write_index_register(0x53);
  lcd_write_wdr(y);
  lcd_write_index_register(0x22);
  lcd_write_wdr(color);
}


x86 assembly (clang, -O0):
<lcd_write_pixel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x20,%edi
call   1030 <lcd_write_index_register@plt>
mov    -0x4(%rbp),%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x21,%edi
call   1030 <lcd_write_index_register@plt>
mov    -0x8(%rbp),%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x50,%edi
call   1030 <lcd_write_index_register@plt>
mov    -0x4(%rbp),%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x51,%edi
call   1030 <lcd_write_index_register@plt>
mov    -0x4(%rbp),%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x52,%edi
call   1030 <lcd_write_index_register@plt>
mov    -0x8(%rbp),%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x53,%edi
call   1030 <lcd_write_index_register@plt>
mov    -0x8(%rbp),%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x22,%edi
call   1030 <lcd_write_index_register@plt>
mov    -0xc(%rbp),%edi
call   1040 <lcd_write_wdr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_write_pixel>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x20,%edi
call   1030 <lcd_write_index_register@plt>
mov    %ebx,%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x21,%edi
call   1030 <lcd_write_index_register@plt>
mov    %ebp,%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x50,%edi
call   1030 <lcd_write_index_register@plt>
mov    %ebx,%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x51,%edi
call   1030 <lcd_write_index_register@plt>
mov    %ebx,%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x52,%edi
call   1030 <lcd_write_index_register@plt>
mov    %ebp,%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x53,%edi
call   1030 <lcd_write_index_register@plt>
mov    %ebp,%edi
call   1040 <lcd_write_wdr@plt>
mov    $0x22,%edi
call   1030 <lcd_write_index_register@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <lcd_write_wdr@plt>

LLVM IR (-O0):
define void @lcd_write_pixel(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 @lcd_write_index_register(i32 32)
%8 = load i32, i32* %4
%9 = call i32 @lcd_write_wdr(i32 %8)
%10 = call i32 @lcd_write_index_register(i32 33)
%11 = load i32, i32* %5
%12 = call i32 @lcd_write_wdr(i32 %11)
%13 = call i32 @lcd_write_index_register(i32 80)
%14 = load i32, i32* %4
%15 = call i32 @lcd_write_wdr(i32 %14)
%16 = call i32 @lcd_write_index_register(i32 81)
%17 = load i32, i32* %4
%18 = call i32 @lcd_write_wdr(i32 %17)
%19 = call i32 @lcd_write_index_register(i32 82)
%20 = load i32, i32* %5
%21 = call i32 @lcd_write_wdr(i32 %20)
%22 = call i32 @lcd_write_index_register(i32 83)
%23 = load i32, i32* %5
%24 = call i32 @lcd_write_wdr(i32 %23)
%25 = call i32 @lcd_write_index_register(i32 34)
%26 = load i32, i32* %6
%27 = call i32 @lcd_write_wdr(i32 %26)
ret void
}

LLVM IR (-O2):
define void @lcd_write_pixel(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @lcd_write_index_register(i32 32)
%5 = tail call i32 @lcd_write_wdr(i32 %0)
%6 = tail call i32 @lcd_write_index_register(i32 33)
%7 = tail call i32 @lcd_write_wdr(i32 %1)
%8 = tail call i32 @lcd_write_index_register(i32 80)
%9 = tail call i32 @lcd_write_wdr(i32 %0)
%10 = tail call i32 @lcd_write_index_register(i32 81)
%11 = tail call i32 @lcd_write_wdr(i32 %0)
%12 = tail call i32 @lcd_write_index_register(i32 82)
%13 = tail call i32 @lcd_write_wdr(i32 %1)
%14 = tail call i32 @lcd_write_index_register(i32 83)
%15 = tail call i32 @lcd_write_wdr(i32 %1)
%16 = tail call i32 @lcd_write_index_register(i32 34)
%17 = tail call i32 @lcd_write_wdr(i32 %2)
ret void
}