#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_Cursor(unsigned char);
int /*<<< orphan*/ LCD_DisplayString(int, char *);
int /*<<< orphan*/ LCD_WriteData(unsigned char);
int /*<<< orphan*/ sendScore(int);
int /*<<< orphan*/ updateCredits(int /*<<< orphan*/);
void screenFormat() {
  unsigned char scoreMessage[] = {'S', 'c', 'o', 'r', 'e', ':'};
  unsigned char sz = 6, temp = 0, cursor = 17;
  LCD_DisplayString(1, "    Credits: ");
  for (temp = 0; temp < sz; ++temp) {
    LCD_Cursor(cursor + temp);
    LCD_WriteData(scoreMessage[temp]);
  }
  sendScore(22);
  updateCredits(0);
  LCD_Cursor(0);
}


x86 assembly (clang, -O0):
<screenFormat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xea2(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xe9c(%rip),%ax
mov    %ax,-0x2(%rbp)
movb   $0x6,-0x7(%rbp)
movb   $0x0,-0x8(%rbp)
movb   $0x11,-0x9(%rbp)
mov    $0x1,%edi
lea    0xe82(%rip),%rsi
call   1060 <LCD_DisplayString@plt>
movb   $0x0,-0x8(%rbp)
movzbl -0x8(%rbp),%eax
movzbl -0x7(%rbp),%ecx
cmp    %ecx,%eax
jge    11ca <screenFormat+0x7a>
movzbl -0x9(%rbp),%eax
movzbl -0x8(%rbp),%ecx
add    %ecx,%eax
movzbl %al,%edi
call   1040 <LCD_Cursor@plt>
movzbl -0x8(%rbp),%eax
movzbl -0x6(%rbp,%rax,1),%edi
call   1050 <LCD_WriteData@plt>
mov    -0x8(%rbp),%al
add    $0x1,%al
mov    %al,-0x8(%rbp)
jmp    118d <screenFormat+0x3d>
mov    $0x16,%edi
call   1030 <sendScore@plt>
xor    %edi,%edi
call   1070 <updateCredits@plt>
xor    %edi,%edi
call   1040 <LCD_Cursor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<screenFormat>:
push   %rax
lea    0xea8(%rip),%rsi
mov    $0x1,%edi
call   1060 <LCD_DisplayString@plt>
mov    $0x11,%edi
call   1040 <LCD_Cursor@plt>
mov    $0x53,%edi
call   1050 <LCD_WriteData@plt>
mov    $0x12,%edi
call   1040 <LCD_Cursor@plt>
mov    $0x63,%edi
call   1050 <LCD_WriteData@plt>
mov    $0x13,%edi
call   1040 <LCD_Cursor@plt>
mov    $0x6f,%edi
call   1050 <LCD_WriteData@plt>
mov    $0x14,%edi
call   1040 <LCD_Cursor@plt>
mov    $0x72,%edi
call   1050 <LCD_WriteData@plt>
mov    $0x15,%edi
call   1040 <LCD_Cursor@plt>
mov    $0x65,%edi
call   1050 <LCD_WriteData@plt>
mov    $0x16,%edi
call   1040 <LCD_Cursor@plt>
mov    $0x3a,%edi
call   1050 <LCD_WriteData@plt>
mov    $0x16,%edi
call   1030 <sendScore@plt>
xor    %edi,%edi
call   1070 <updateCredits@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <LCD_Cursor@plt>

LLVM IR (-O0):
@__const.screenFormat.scoreMessage = [6 x i8] c"Score:"
@.str = [14 x i8] c" Credits: \00"
define void @screenFormat() {
%1 = alloca [6 x i8]
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = bitcast [6 x i8]* %1 to i8*
store i8 6, i8* %2
store i8 0, i8* %3
store i8 17, i8* %4
%6 = call i32 @LCD_DisplayString(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i8 0, i8* %3
br label %7
7: ; preds = %26, %0
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %29
13: ; preds = %7
%14 = load i8, i8* %4
%15 = zext i8 %14 to i32
%16 = load i8, i8* %3
%17 = zext i8 %16 to i32
%18 = add nsw i32 %15, %17
%19 = trunc i32 %18 to i8
%20 = call i32 @LCD_Cursor(i8 zeroext %19)
%21 = load i8, i8* %3
%22 = zext i8 %21 to i64
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = call i32 @LCD_WriteData(i8 zeroext %24)
br label %26
26: ; preds = %13
%27 = load i8, i8* %3
%28 = add i8 %27, 1
store i8 %28, i8* %3
br label %7
29: ; preds = %7
%30 = call i32 @sendScore(i32 22)
%31 = call i32 @updateCredits(i32 0)
%32 = call i32 @LCD_Cursor(i8 zeroext 0)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c" Credits: \00"
define void @screenFormat() {
%1 = tail call i32 @LCD_DisplayString(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @LCD_Cursor(i8 zeroext 17)
%3 = tail call i32 @LCD_WriteData(i8 zeroext 83)
%4 = tail call i32 @LCD_Cursor(i8 zeroext 18)
%5 = tail call i32 @LCD_WriteData(i8 zeroext 99)
%6 = tail call i32 @LCD_Cursor(i8 zeroext 19)
%7 = tail call i32 @LCD_WriteData(i8 zeroext 111)
%8 = tail call i32 @LCD_Cursor(i8 zeroext 20)
%9 = tail call i32 @LCD_WriteData(i8 zeroext 114)
%10 = tail call i32 @LCD_Cursor(i8 zeroext 21)
%11 = tail call i32 @LCD_WriteData(i8 zeroext 101)
%12 = tail call i32 @LCD_Cursor(i8 zeroext 22)
%13 = tail call i32 @LCD_WriteData(i8 zeroext 58)
%14 = tail call i32 @sendScore(i32 22)
%15 = tail call i32 @updateCredits(i32 0)
%16 = tail call i32 @LCD_Cursor(i8 zeroext 0)
ret void
}