#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*/ ClearLCD();
int /*<<< orphan*/ PutString2LCD(int, int, int, char *);
int /*<<< orphan*/ PutStringLCD(int, int, int, char *);
void DrawMenu() {
  ClearLCD();
  PutString2LCD(48, 32, 0xF, "TANK COMMANDER");
  PutStringLCD(116, 96, 0xF, "A) New Game");
  PutStringLCD(116, 128, 0xF, "B) Scores");
  PutStringLCD(116, 160, 0xF, "C) Help");
}


x86 assembly (clang, -O0):
<DrawMenu>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <ClearLCD@plt>
mov    $0x30,%edi
mov    $0x20,%esi
mov    $0xf,%edx
lea    0xeaf(%rip),%rcx
call   1030 <PutString2LCD@plt>
mov    $0x74,%edi
mov    $0x60,%esi
mov    $0xf,%edx
lea    0xea3(%rip),%rcx
call   1040 <PutStringLCD@plt>
mov    $0x74,%edi
mov    $0x80,%esi
mov    $0xf,%edx
lea    0xe94(%rip),%rcx
call   1040 <PutStringLCD@plt>
mov    $0x74,%edi
mov    $0xa0,%esi
mov    $0xf,%edx
lea    0xe83(%rip),%rcx
call   1040 <PutStringLCD@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawMenu>:
push   %rax
xor    %eax,%eax
call   1050 <ClearLCD@plt>
lea    0xec1(%rip),%rcx
mov    $0x30,%edi
mov    $0x20,%esi
mov    $0xf,%edx
call   1030 <PutString2LCD@plt>
lea    0xeb5(%rip),%rcx
mov    $0x74,%edi
mov    $0x60,%esi
mov    $0xf,%edx
call   1040 <PutStringLCD@plt>
lea    0xea6(%rip),%rcx
mov    $0x74,%edi
mov    $0x80,%esi
mov    $0xf,%edx
call   1040 <PutStringLCD@plt>
lea    0xe95(%rip),%rcx
mov    $0x74,%edi
mov    $0xa0,%esi
mov    $0xf,%edx
pop    %rax
jmp    1040 <PutStringLCD@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"TANK COMMANDER\00"
@.str.1 = [12 x i8] c"A) New Game\00"
@.str.2 = [10 x i8] c"B) Scores\00"
@.str.3 = [8 x i8] c"C) Help\00"
define void @DrawMenu() {
%1 = call i32 (...) @ClearLCD()
%2 = call i32 @PutString2LCD(i32 48, i32 32, i32 15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @PutStringLCD(i32 116, i32 96, i32 15, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @PutStringLCD(i32 116, i32 128, i32 15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @PutStringLCD(i32 116, i32 160, i32 15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"TANK COMMANDER\00"
@.str.1 = [12 x i8] c"A) New Game\00"
@.str.2 = [10 x i8] c"B) Scores\00"
@.str.3 = [8 x i8] c"C) Help\00"
define void @DrawMenu() {
%1 = tail call i32 (...) @ClearLCD()
%2 = tail call i32 @PutString2LCD(i32 48, i32 32, i32 15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @PutStringLCD(i32 116, i32 96, i32 15, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @PutStringLCD(i32 116, i32 128, i32 15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @PutStringLCD(i32 116, i32 160, i32 15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
ret void
}