#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*/ Slcd_Chr_Cp(char);
int /*<<< orphan*/ Slcd_Cmd(int);
void Slcd_Chr(unsigned char row, unsigned char column, char out_char) {
  if ((column - 1) > 0x27)
    return;
  if (row == 1)
    Slcd_Cmd(0x80 | (column - 1));
  else if (row == 2)
    Slcd_Cmd(0x80 | 0x40 | (column - 1));
  else
    return;
  Slcd_Chr_Cp(out_char);
}


x86 assembly (clang, -O0):
<Slcd_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 -0x2(%rbp),%eax
sub    $0x1,%eax
cmp    $0x27,%eax
jle    114e <Slcd_Chr+0x2e>
jmp    11a9 <Slcd_Chr+0x89>
movzbl -0x1(%rbp),%eax
cmp    $0x1,%eax
jne    1172 <Slcd_Chr+0x52>
movzbl -0x2(%rbp),%edi
sub    $0x1,%edi
or     $0x80,%edi
call   1040 <Slcd_Cmd@plt>
jmp    11a0 <Slcd_Chr+0x80>
movzbl -0x1(%rbp),%eax
cmp    $0x2,%eax
jne    1196 <Slcd_Chr+0x76>
movzbl -0x2(%rbp),%edi
sub    $0x1,%edi
or     $0xc0,%edi
call   1040 <Slcd_Cmd@plt>
jmp    119b <Slcd_Chr+0x7b>
jmp    11a9 <Slcd_Chr+0x89>
jmp    11a0 <Slcd_Chr+0x80>
movsbl -0x3(%rbp),%edi
call   1030 <Slcd_Chr_Cp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Slcd_Chr>:
push   %rbx
cmp    $0x28,%sil
ja     113c <Slcd_Chr+0x1c>
mov    %edx,%ebx
cmp    $0x1,%dil
je     113e <Slcd_Chr+0x1e>
cmp    $0x2,%dil
jne    113c <Slcd_Chr+0x1c>
mov    $0xc0,%eax
jmp    1143 <Slcd_Chr+0x23>
pop    %rbx
ret
mov    $0x80,%eax
add    $0xffffffff,%esi
or     %eax,%esi
mov    %esi,%edi
call   1040 <Slcd_Cmd@plt>
movsbl %bl,%edi
pop    %rbx
jmp    1030 <Slcd_Chr_Cp@plt>

LLVM IR (-O0):
define void @Slcd_Chr(i8 zeroext %0, i8 zeroext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %5
%8 = zext i8 %7 to i32
%9 = sub nsw i32 %8, 1
%10 = icmp sgt i32 %9, 39
br i1 %10, label %11, label %12
11: ; preds = %3
br label %37
12: ; preds = %3
%13 = load i8, i8* %4
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %22
16: ; preds = %12
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = sub nsw i32 %18, 1
%20 = or i32 128, %19
%21 = call i32 @Slcd_Cmd(i32 %20)
br label %34
22: ; preds = %12
%23 = load i8, i8* %4
%24 = zext i8 %23 to i32
%25 = icmp eq i32 %24, 2
br i1 %25, label %26, label %32
26: ; preds = %22
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = sub nsw i32 %28, 1
%30 = or i32 192, %29
%31 = call i32 @Slcd_Cmd(i32 %30)
br label %33
32: ; preds = %22
br label %37
33: ; preds = %26
br label %34
34: ; preds = %33, %16
%35 = load i8, i8* %6
%36 = call i32 @Slcd_Chr_Cp(i8 signext %35)
br label %37
37: ; preds = %34, %32, %11
ret void
}

LLVM IR (-O2):
define void @Slcd_Chr(i8 zeroext %0, i8 zeroext %1, i8 signext %2) {
%4 = zext i8 %1 to i32
%5 = add nsw i32 %4, -1
%6 = icmp ugt i8 %1, 40
br i1 %6, label %14, label %7
7: ; preds = %3
switch i8 %0, label %14 [
i8 1, label %9
i8 2, label %8
]
8: ; preds = %7
br label %9
9: ; preds = %7, %8
%10 = phi i32 [ 192, %8 ], [ 128, %7 ]
%11 = or i32 %5, %10
%12 = tail call i32 @Slcd_Cmd(i32 %11)
%13 = tail call i32 @Slcd_Chr_Cp(i8 signext %2)
br label %14
14: ; preds = %7, %3, %9
ret void
}