#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*/ printString(char *);
int readFile(char *, char *, int /*<<< orphan*/);
void displayHelpMessage() {
  char helpMessage[12];
  char buffer[13312];
  int result;
  helpMessage[0] = 'h';
  helpMessage[1] = 'e';
  helpMessage[2] = 'l';
  helpMessage[3] = 'p';
  helpMessage[4] = 'M';
  helpMessage[5] = 'e';
  helpMessage[6] = 's';
  helpMessage[7] = 's';
  helpMessage[8] = 'a';
  helpMessage[9] = 'g';
  helpMessage[10] = 'e';
  helpMessage[11] = '\0';
  result = readFile(helpMessage, buffer, 0);
  if (result == 0) {
    printString(buffer);
  }
}


x86 assembly (clang, -O0):
<displayHelpMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3420,%rsp
movb   $0x68,-0xc(%rbp)
movb   $0x65,-0xb(%rbp)
movb   $0x6c,-0xa(%rbp)
movb   $0x70,-0x9(%rbp)
movb   $0x4d,-0x8(%rbp)
movb   $0x65,-0x7(%rbp)
movb   $0x73,-0x6(%rbp)
movb   $0x73,-0x5(%rbp)
movb   $0x61,-0x4(%rbp)
movb   $0x67,-0x3(%rbp)
movb   $0x65,-0x2(%rbp)
movb   $0x0,-0x1(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x3410(%rbp),%rsi
xor    %edx,%edx
call   1040 <readFile@plt>
mov    %eax,-0x3414(%rbp)
cmpl   $0x0,-0x3414(%rbp)
jne    118c <displayHelpMessage+0x6c>
lea    -0x3410(%rbp),%rdi
call   1030 <printString@plt>
add    $0x3420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayHelpMessage>:
sub    $0x3418,%rsp
movabs $0x7373654d706c6568,%rax
65 73 73
mov    %rax,0x4(%rsp)
movl   $0x656761,0xc(%rsp)
lea    0x4(%rsp),%rdi
lea    0x10(%rsp),%rsi
xor    %edx,%edx
call   1040 <readFile@plt>
test   %eax,%eax
je     115b <displayHelpMessage+0x3b>
add    $0x3418,%rsp
ret
lea    0x10(%rsp),%rdi
call   1030 <printString@plt>
add    $0x3418,%rsp
ret

LLVM IR (-O0):
define void @displayHelpMessage() {
%1 = alloca [12 x i8]
%2 = alloca [13312 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
store i8 104, i8* %4
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 1
store i8 101, i8* %5
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 2
store i8 108, i8* %6
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 3
store i8 112, i8* %7
%8 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 4
store i8 77, i8* %8
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 5
store i8 101, i8* %9
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 6
store i8 115, i8* %10
%11 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 7
store i8 115, i8* %11
%12 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 8
store i8 97, i8* %12
%13 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 9
store i8 103, i8* %13
%14 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 10
store i8 101, i8* %14
%15 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 11
store i8 0, i8* %15
%16 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%17 = getelementptr inbounds [13312 x i8], [13312 x i8]* %2, i64 0, i64 0
%18 = call i32 @readFile(i8* %16, i8* %17, i32 0)
store i32 %18, i32* %3
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %0
%22 = getelementptr inbounds [13312 x i8], [13312 x i8]* %2, i64 0, i64 0
%23 = call i32 @printString(i8* %22)
br label %24
24: ; preds = %21, %0
ret void
}

LLVM IR (-O2):
define void @displayHelpMessage() {
%1 = alloca [12 x i8]
%2 = alloca [13312 x i8]
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [13312 x i8], [13312 x i8]* %2, i64 0, i64 0
store i8 104, i8* %3
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 1
store i8 101, i8* %5
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 2
store i8 108, i8* %6
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 3
store i8 112, i8* %7
%8 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 4
store i8 77, i8* %8
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 5
store i8 101, i8* %9
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 6
store i8 115, i8* %10
%11 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 7
store i8 115, i8* %11
%12 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 8
store i8 97, i8* %12
%13 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 9
store i8 103, i8* %13
%14 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 10
store i8 101, i8* %14
%15 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 11
store i8 0, i8* %15
%16 = call i32 @readFile(i8* %3, i8* %4, i32 0)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %0
%19 = call i32 @printString(i8* %4)
br label %20
20: ; preds = %18, %0
ret void
}