#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*/ LCDPutChar(int /*<<< orphan*/, int, int, int, int, int);
void LCDPutStr(char *pString, int x, int y, int Size, int fColor, int bColor) {
  while (*pString != 0x00) {
    LCDPutChar(*pString++, x, y, Size, fColor, bColor);
    if (Size == 0)
      y = y + 6;
    else if (Size == 1)
      y = y + 8;
    else
      y = y + 8;
    if (y > 131)
      break;
  }
}


x86 assembly (clang, -O0):
<LCDPutStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11ba <LCDPutStr+0xaa>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
call   1030 <LCDPutChar@plt>
cmpl   $0x0,-0x14(%rbp)
jne    117d <LCDPutStr+0x6d>
mov    -0x10(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x10(%rbp)
jmp    11a3 <LCDPutStr+0x93>
cmpl   $0x1,-0x14(%rbp)
jne    1195 <LCDPutStr+0x85>
mov    -0x10(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x10(%rbp)
jmp    119e <LCDPutStr+0x8e>
mov    -0x10(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x10(%rbp)
jmp    11a3 <LCDPutStr+0x93>
cmpl   $0x83,-0x10(%rbp)
jle    11b5 <LCDPutStr+0xa5>
jmp    11ba <LCDPutStr+0xaa>
jmp    112d <LCDPutStr+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDPutStr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,0x4(%rsp)
mov    %r8d,%r15d
mov    %ecx,%r13d
mov    %edx,%ebp
mov    %esi,%r12d
mov    %rdi,%rbx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
lea    (%rax,%rax,1),%r14d
add    $0x6,%r14d
nopl   (%rax)
movsbl (%rbx),%edi
test   %edi,%edi
je     116b <LCDPutStr+0x5b>
add    $0x1,%rbx
mov    %r12d,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    %r15d,%r8d
mov    0x4(%rsp),%r9d
call   1030 <LCDPutChar@plt>
add    %r14d,%ebp
cmp    $0x84,%ebp
jl     1140 <LCDPutStr+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @LCDPutStr(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
br label %13
13: ; preds = %48, %6
%14 = load i8*, i8** %7
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %49
18: ; preds = %13
%19 = load i8*, i8** %7
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %7
%21 = load i8, i8* %19
%22 = sext i8 %21 to i32
%23 = load i32, i32* %8
%24 = load i32, i32* %9
%25 = load i32, i32* %10
%26 = load i32, i32* %11
%27 = load i32, i32* %12
%28 = call i32 @LCDPutChar(i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27)
%29 = load i32, i32* %10
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %18
%32 = load i32, i32* %9
%33 = add nsw i32 %32, 6
store i32 %33, i32* %9
br label %44
34: ; preds = %18
%35 = load i32, i32* %10
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %40
37: ; preds = %34
%38 = load i32, i32* %9
%39 = add nsw i32 %38, 8
store i32 %39, i32* %9
br label %43
40: ; preds = %34
%41 = load i32, i32* %9
%42 = add nsw i32 %41, 8
store i32 %42, i32* %9
br label %43
43: ; preds = %40, %37
br label %44
44: ; preds = %43, %31
%45 = load i32, i32* %9
%46 = icmp sgt i32 %45, 131
br i1 %46, label %47, label %48
47: ; preds = %44
br label %49
48: ; preds = %44
br label %13
49: ; preds = %47, %13
ret void
}

LLVM IR (-O2):
define void @LCDPutStr(i8* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp eq i32 %3, 0
%8 = select i1 %7, i32 6, i32 8
br label %9
9: ; preds = %14, %6
%10 = phi i32 [ %2, %6 ], [ %18, %14 ]
%11 = phi i8* [ %0, %6 ], [ %16, %14 ]
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %20, label %14
14: ; preds = %9
%15 = sext i8 %12 to i32
%16 = getelementptr inbounds i8, i8* %11, i64 1
%17 = tail call i32 @LCDPutChar(i32 %15, i32 %1, i32 %10, i32 %3, i32 %4, i32 %5)
%18 = add nsw i32 %10, %8
%19 = icmp sgt i32 %18, 131
br i1 %19, label %20, label %9
20: ; preds = %14, %9
ret void
}