#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_Chr_CP(char);
int /*<<< orphan*/ Lcd_Cmd(unsigned char);
void Lcd_Chr(unsigned char y, unsigned char x, char Chr) {
  unsigned char data;
  switch (y) {
  case 1:
    data = 127 + x;
    break;
  case 2:
    data = 191 + x;
    break;
  case 3:
    data = 147 + x;
    break;
  case 4:
    data = 211 + x;
    break;
  default:
    break;
  }
  Lcd_Cmd(data);
  Lcd_Chr_CP(Chr);
}


x86 assembly (clang, -O0):
<Lcd_Chr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     11a5 <Lcd_Chr+0x85>
mov    -0x10(%rbp),%rax
lea    0xea6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movzbl -0x2(%rbp),%eax
add    $0x7f,%eax
mov    %al,-0x4(%rbp)
jmp    11aa <Lcd_Chr+0x8a>
movzbl -0x2(%rbp),%eax
add    $0xbf,%eax
mov    %al,-0x4(%rbp)
jmp    11aa <Lcd_Chr+0x8a>
movzbl -0x2(%rbp),%eax
add    $0x93,%eax
mov    %al,-0x4(%rbp)
jmp    11aa <Lcd_Chr+0x8a>
movzbl -0x2(%rbp),%eax
add    $0xd3,%eax
mov    %al,-0x4(%rbp)
jmp    11aa <Lcd_Chr+0x8a>
jmp    11aa <Lcd_Chr+0x8a>
movzbl -0x4(%rbp),%edi
call   1030 <Lcd_Cmd@plt>
movsbl -0x3(%rbp),%edi
call   1040 <Lcd_Chr_CP@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lcd_Chr>:
push   %rbx
add    $0xff,%dil
movzbl %dil,%ecx
shl    $0x3,%ecx
mov    $0xd393bf7f,%eax
shr    %cl,%eax
mov    %edx,%ebx
add    %sil,%al
movzbl %al,%edi
call   1030 <Lcd_Cmd@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <Lcd_Chr_CP@plt>

LLVM IR (-O0):
define void @Lcd_Chr(i8 zeroext %0, i8 zeroext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
switch i32 %9, label %30 [
i32 1, label %10
i32 2, label %15
i32 3, label %20
i32 4, label %25
]
10: ; preds = %3
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = add nsw i32 127, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
br label %31
15: ; preds = %3
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = add nsw i32 191, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %7
br label %31
20: ; preds = %3
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = add nsw i32 147, %22
%24 = trunc i32 %23 to i8
store i8 %24, i8* %7
br label %31
25: ; preds = %3
%26 = load i8, i8* %5
%27 = zext i8 %26 to i32
%28 = add nsw i32 211, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
br label %31
30: ; preds = %3
br label %31
31: ; preds = %30, %25, %20, %15, %10
%32 = load i8, i8* %7
%33 = call i32 @Lcd_Cmd(i8 zeroext %32)
%34 = load i8, i8* %6
%35 = call i32 @Lcd_Chr_CP(i8 signext %34)
ret void
}

LLVM IR (-O2):
define void @Lcd_Chr(i8 zeroext %0, i8 zeroext %1, i8 signext %2) {
%4 = add i8 %0, -1
%5 = zext i8 %4 to i32
%6 = shl nuw nsw i32 %5, 3
%7 = lshr i32 -745291905, %6
%8 = trunc i32 %7 to i8
%9 = add i8 %8, %1
%10 = tail call i32 @Lcd_Cmd(i8 zeroext %9)
%11 = tail call i32 @Lcd_Chr_CP(i8 signext %2)
ret void
}