#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_COM(int, int);
int /*<<< orphan*/ LCD_Write_DATA(unsigned int, unsigned int);
void Address_set(unsigned int x1, unsigned int y1, unsigned int x2,
                 unsigned int y2) {
  LCD_Write_COM(0x00, 0x20);
  LCD_Write_DATA(x1 >> 8, x1);
  LCD_Write_COM(0x00, 0x21);
  LCD_Write_DATA(y1 >> 8, y1);
  LCD_Write_COM(0x00, 0x37);
  LCD_Write_DATA(x1 >> 8, x1);
  LCD_Write_COM(0x00, 0x39);
  LCD_Write_DATA(y1 >> 8, y1);
  LCD_Write_COM(0x00, 0x36);
  LCD_Write_DATA(x2 >> 8, x2);
  LCD_Write_COM(0x00, 0x38);
  LCD_Write_DATA(y2 >> 8, y2);
  LCD_Write_COM(0x00, 0x22);
}


x86 assembly (clang, -O0):
<Address_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
xor    %edi,%edi
mov    $0x20,%esi
call   1030 <LCD_Write_COM@plt>
mov    -0x4(%rbp),%edi
shr    $0x8,%edi
mov    -0x4(%rbp),%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x21,%esi
call   1030 <LCD_Write_COM@plt>
mov    -0x8(%rbp),%edi
shr    $0x8,%edi
mov    -0x8(%rbp),%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x37,%esi
call   1030 <LCD_Write_COM@plt>
mov    -0x4(%rbp),%edi
shr    $0x8,%edi
mov    -0x4(%rbp),%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x39,%esi
call   1030 <LCD_Write_COM@plt>
mov    -0x8(%rbp),%edi
shr    $0x8,%edi
mov    -0x8(%rbp),%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x36,%esi
call   1030 <LCD_Write_COM@plt>
mov    -0xc(%rbp),%edi
shr    $0x8,%edi
mov    -0xc(%rbp),%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x38,%esi
call   1030 <LCD_Write_COM@plt>
mov    -0x10(%rbp),%edi
shr    $0x8,%edi
mov    -0x10(%rbp),%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x22,%esi
call   1030 <LCD_Write_COM@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Address_set>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%r12d
mov    %edi,%r13d
xor    %edi,%edi
mov    $0x20,%esi
call   1030 <LCD_Write_COM@plt>
mov    %r13d,%ebp
shr    $0x8,%ebp
mov    %ebp,%edi
mov    %r13d,%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x21,%esi
call   1030 <LCD_Write_COM@plt>
mov    %r12d,%ebx
shr    $0x8,%ebx
mov    %ebx,%edi
mov    %r12d,%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x37,%esi
call   1030 <LCD_Write_COM@plt>
mov    %ebp,%edi
mov    %r13d,%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x39,%esi
call   1030 <LCD_Write_COM@plt>
mov    %ebx,%edi
mov    %r12d,%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x36,%esi
call   1030 <LCD_Write_COM@plt>
mov    %r15d,%edi
shr    $0x8,%edi
mov    %r15d,%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x38,%esi
call   1030 <LCD_Write_COM@plt>
mov    %r14d,%edi
shr    $0x8,%edi
mov    %r14d,%esi
call   1040 <LCD_Write_DATA@plt>
xor    %edi,%edi
mov    $0x22,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <LCD_Write_COM@plt>

LLVM IR (-O0):
define void @Address_set(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 @LCD_Write_COM(i32 0, i32 32)
%10 = load i32, i32* %5
%11 = lshr i32 %10, 8
%12 = load i32, i32* %5
%13 = call i32 @LCD_Write_DATA(i32 %11, i32 %12)
%14 = call i32 @LCD_Write_COM(i32 0, i32 33)
%15 = load i32, i32* %6
%16 = lshr i32 %15, 8
%17 = load i32, i32* %6
%18 = call i32 @LCD_Write_DATA(i32 %16, i32 %17)
%19 = call i32 @LCD_Write_COM(i32 0, i32 55)
%20 = load i32, i32* %5
%21 = lshr i32 %20, 8
%22 = load i32, i32* %5
%23 = call i32 @LCD_Write_DATA(i32 %21, i32 %22)
%24 = call i32 @LCD_Write_COM(i32 0, i32 57)
%25 = load i32, i32* %6
%26 = lshr i32 %25, 8
%27 = load i32, i32* %6
%28 = call i32 @LCD_Write_DATA(i32 %26, i32 %27)
%29 = call i32 @LCD_Write_COM(i32 0, i32 54)
%30 = load i32, i32* %7
%31 = lshr i32 %30, 8
%32 = load i32, i32* %7
%33 = call i32 @LCD_Write_DATA(i32 %31, i32 %32)
%34 = call i32 @LCD_Write_COM(i32 0, i32 56)
%35 = load i32, i32* %8
%36 = lshr i32 %35, 8
%37 = load i32, i32* %8
%38 = call i32 @LCD_Write_DATA(i32 %36, i32 %37)
%39 = call i32 @LCD_Write_COM(i32 0, i32 34)
ret void
}

LLVM IR (-O2):
define void @Address_set(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @LCD_Write_COM(i32 0, i32 32)
%6 = lshr i32 %0, 8
%7 = tail call i32 @LCD_Write_DATA(i32 %6, i32 %0)
%8 = tail call i32 @LCD_Write_COM(i32 0, i32 33)
%9 = lshr i32 %1, 8
%10 = tail call i32 @LCD_Write_DATA(i32 %9, i32 %1)
%11 = tail call i32 @LCD_Write_COM(i32 0, i32 55)
%12 = tail call i32 @LCD_Write_DATA(i32 %6, i32 %0)
%13 = tail call i32 @LCD_Write_COM(i32 0, i32 57)
%14 = tail call i32 @LCD_Write_DATA(i32 %9, i32 %1)
%15 = tail call i32 @LCD_Write_COM(i32 0, i32 54)
%16 = lshr i32 %2, 8
%17 = tail call i32 @LCD_Write_DATA(i32 %16, i32 %2)
%18 = tail call i32 @LCD_Write_COM(i32 0, i32 56)
%19 = lshr i32 %3, 8
%20 = tail call i32 @LCD_Write_DATA(i32 %19, i32 %3)
%21 = tail call i32 @LCD_Write_COM(i32 0, i32 34)
ret void
}