#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 */
struct PIN_LCD {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ LCD_Command(int, struct PIN_LCD *);
void LCD_XY(char x, char y, struct PIN_LCD *PIN_LCD) {
  if ((y == 1) && ((x >= 0) && (x <= 16))) {
    LCD_Command((128 | x), PIN_LCD);
  } else if (y == 2 && ((x >= 0 && x <= 16))) {
    LCD_Command((128 | (x + 64)), PIN_LCD);
  }
}


x86 assembly (clang, -O0):
<LCD_XY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    1167 <LCD_XY+0x57>
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jl     1167 <LCD_XY+0x57>
movsbl -0x1(%rbp),%eax
cmp    $0x10,%eax
jg     1167 <LCD_XY+0x57>
movsbl -0x1(%rbp),%edi
or     $0x80,%edi
mov    -0x10(%rbp),%rsi
call   1030 <LCD_Command@plt>
jmp    11a9 <LCD_XY+0x99>
movsbl -0x2(%rbp),%eax
cmp    $0x2,%eax
jne    11a4 <LCD_XY+0x94>
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jl     11a4 <LCD_XY+0x94>
movsbl -0x1(%rbp),%eax
cmp    $0x10,%eax
jg     11a4 <LCD_XY+0x94>
movsbl -0x1(%rbp),%edi
add    $0x40,%edi
or     $0x80,%edi
mov    -0x10(%rbp),%rsi
call   1030 <LCD_Command@plt>
jmp    11a9 <LCD_XY+0x99>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_XY>:
cmp    $0x10,%dil
ja     111c <LCD_XY+0xc>
cmp    $0x1,%sil
je     112b <LCD_XY+0x1b>
cmp    $0x10,%dil
ja     1139 <LCD_XY+0x29>
cmp    $0x2,%sil
jne    1139 <LCD_XY+0x29>
add    $0x40,%edi
or     $0x80,%edi
mov    %rdx,%rsi
jmp    1030 <LCD_Command@plt>
ret

LLVM IR (-O0):
%struct.PIN_LCD = type { i32 }
define void @LCD_XY(i8 signext %0, i8 signext %1, %struct.PIN_LCD* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca %struct.PIN_LCD*
store i8 %0, i8* %4
store i8 %1, i8* %5
store %struct.PIN_LCD* %2, %struct.PIN_LCD** %6
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %24
10: ; preds = %3
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 0
br i1 %13, label %14, label %24
14: ; preds = %10
%15 = load i8, i8* %4
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 16
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load i8, i8* %4
%20 = sext i8 %19 to i32
%21 = or i32 128, %20
%22 = load %struct.PIN_LCD*, %struct.PIN_LCD** %6
%23 = call i32 @LCD_Command(i32 %21, %struct.PIN_LCD* %22)
br label %44
24: ; preds = %14, %10, %3
%25 = load i8, i8* %5
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 2
br i1 %27, label %28, label %43
28: ; preds = %24
%29 = load i8, i8* %4
%30 = sext i8 %29 to i32
%31 = icmp sge i32 %30, 0
br i1 %31, label %32, label %43
32: ; preds = %28
%33 = load i8, i8* %4
%34 = sext i8 %33 to i32
%35 = icmp sle i32 %34, 16
br i1 %35, label %36, label %43
36: ; preds = %32
%37 = load i8, i8* %4
%38 = sext i8 %37 to i32
%39 = add nsw i32 %38, 64
%40 = or i32 128, %39
%41 = load %struct.PIN_LCD*, %struct.PIN_LCD** %6
%42 = call i32 @LCD_Command(i32 %40, %struct.PIN_LCD* %41)
br label %43
43: ; preds = %36, %32, %28, %24
br label %44
44: ; preds = %43, %18
ret void
}

LLVM IR (-O2):
%struct.PIN_LCD = type { i32 }
define void @LCD_XY(i8 signext %0, i8 signext %1, %struct.PIN_LCD* %2) {
%4 = icmp eq i8 %1, 1
%5 = sext i8 %0 to i32
%6 = icmp ult i8 %0, 17
%7 = and i1 %6, %4
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = icmp eq i8 %1, 2
%10 = and i1 %6, %9
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = add nsw i32 %5, 64
br label %13
13: ; preds = %3, %11
%14 = phi i32 [ %12, %11 ], [ %5, %3 ]
%15 = or i32 %14, 128
%16 = tail call i32 @LCD_Command(i32 %15, %struct.PIN_LCD* %2)
br label %17
17: ; preds = %13, %8
ret void
}