#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 /*<<< orphan*/ Lcd_Write_Data(unsigned int);
void Address_set(unsigned int x1, unsigned int y1, unsigned int x2,
                 unsigned int y2) {
  Lcd_Write_Com(0x2a);
  Lcd_Write_Data(x1 >> 8);
  Lcd_Write_Data(x1);
  Lcd_Write_Data(x2 >> 8);
  Lcd_Write_Data(x2);
  Lcd_Write_Com(0x2b);
  Lcd_Write_Data(y1 >> 8);
  Lcd_Write_Data(y1);
  Lcd_Write_Data(y2 >> 8);
  Lcd_Write_Data(y2);
  Lcd_Write_Com(0x2c);
}


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)
mov    $0x2a,%edi
call   1030 <Lcd_Write_Com@plt>
mov    -0x4(%rbp),%edi
shr    $0x8,%edi
call   1040 <Lcd_Write_Data@plt>
mov    -0x4(%rbp),%edi
call   1040 <Lcd_Write_Data@plt>
mov    -0xc(%rbp),%edi
shr    $0x8,%edi
call   1040 <Lcd_Write_Data@plt>
mov    -0xc(%rbp),%edi
call   1040 <Lcd_Write_Data@plt>
mov    $0x2b,%edi
call   1030 <Lcd_Write_Com@plt>
mov    -0x8(%rbp),%edi
shr    $0x8,%edi
call   1040 <Lcd_Write_Data@plt>
mov    -0x8(%rbp),%edi
call   1040 <Lcd_Write_Data@plt>
mov    -0x10(%rbp),%edi
shr    $0x8,%edi
call   1040 <Lcd_Write_Data@plt>
mov    -0x10(%rbp),%edi
call   1040 <Lcd_Write_Data@plt>
mov    $0x2c,%edi
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   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %esi,%r15d
mov    %edi,%ebp
mov    $0x2a,%edi
call   1030 <Lcd_Write_Com@plt>
mov    %ebp,%edi
shr    $0x8,%edi
call   1040 <Lcd_Write_Data@plt>
mov    %ebp,%edi
call   1040 <Lcd_Write_Data@plt>
mov    %ebx,%edi
shr    $0x8,%edi
call   1040 <Lcd_Write_Data@plt>
mov    %ebx,%edi
call   1040 <Lcd_Write_Data@plt>
mov    $0x2b,%edi
call   1030 <Lcd_Write_Com@plt>
mov    %r15d,%edi
shr    $0x8,%edi
call   1040 <Lcd_Write_Data@plt>
mov    %r15d,%edi
call   1040 <Lcd_Write_Data@plt>
mov    %r14d,%edi
shr    $0x8,%edi
call   1040 <Lcd_Write_Data@plt>
mov    %r14d,%edi
call   1040 <Lcd_Write_Data@plt>
mov    $0x2c,%edi
add    $0x8,%rsp
pop    %rbx
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 42)
%10 = load i32, i32* %5
%11 = lshr i32 %10, 8
%12 = call i32 @Lcd_Write_Data(i32 %11)
%13 = load i32, i32* %5
%14 = call i32 @Lcd_Write_Data(i32 %13)
%15 = load i32, i32* %7
%16 = lshr i32 %15, 8
%17 = call i32 @Lcd_Write_Data(i32 %16)
%18 = load i32, i32* %7
%19 = call i32 @Lcd_Write_Data(i32 %18)
%20 = call i32 @Lcd_Write_Com(i32 43)
%21 = load i32, i32* %6
%22 = lshr i32 %21, 8
%23 = call i32 @Lcd_Write_Data(i32 %22)
%24 = load i32, i32* %6
%25 = call i32 @Lcd_Write_Data(i32 %24)
%26 = load i32, i32* %8
%27 = lshr i32 %26, 8
%28 = call i32 @Lcd_Write_Data(i32 %27)
%29 = load i32, i32* %8
%30 = call i32 @Lcd_Write_Data(i32 %29)
%31 = call i32 @Lcd_Write_Com(i32 44)
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 42)
%6 = lshr i32 %0, 8
%7 = tail call i32 @Lcd_Write_Data(i32 %6)
%8 = tail call i32 @Lcd_Write_Data(i32 %0)
%9 = lshr i32 %2, 8
%10 = tail call i32 @Lcd_Write_Data(i32 %9)
%11 = tail call i32 @Lcd_Write_Data(i32 %2)
%12 = tail call i32 @Lcd_Write_Com(i32 43)
%13 = lshr i32 %1, 8
%14 = tail call i32 @Lcd_Write_Data(i32 %13)
%15 = tail call i32 @Lcd_Write_Data(i32 %1)
%16 = lshr i32 %3, 8
%17 = tail call i32 @Lcd_Write_Data(i32 %16)
%18 = tail call i32 @Lcd_Write_Data(i32 %3)
%19 = tail call i32 @Lcd_Write_Com(i32 44)
ret void
}