#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*/ printf(char *, char *, ...);
void playerMessage(char *gameName, char *address, char *planets) {
  printf("I am happy to report that you have been accepted for the game %s.\n"
         "Your address:\n"
         "   %s\n"
         "has been added to the list.\n"
         " \n",
         gameName, address);
  if (planets) {
    printf("Your planet sizes will be:\n  %s\n\n", planets);
  }
  printf("Please note that I am a program. My only function is to register\n"
         "your name. I am not smart enough to answer any questions that you\n"
         "might have put in your mail.\n"
         "\n"
         "For more information about GalaxyNG, have a look at\n"
         "  http://galaxyng.sourceforge.net/\n"
         "Now is a good time to read the manual:\n"
         "  http://galaxyng.sourceforge.net/manual.php\n"
         "and the FAQ: \n"
         "   http://galaxyng.sourceforge.net/faq.php\n\n"
         "If you then still have questions, join the Galaxy mailing list:\n"
         "  \n"
         "\n"
         "Happy Hunting in Galaxy %s!\n\n",
         gameName);
}


x86 assembly (clang, -O0):
<playerMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x18(%rbp)
je     1157 <playerMessage+0x47>
mov    -0x18(%rbp),%rsi
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<playerMessage>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    %rdi,%r14
lea    0xedc(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
test   %rbx,%rbx
je     1144 <playerMessage+0x34>
lea    0xf3b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf4c(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [117 x i8] c"I am happy to report that you have been accepted for the game %s.\0AYour address:\0A %s\0Ahas been added to the list.\0A \0A\00"
@.str.1 = [34 x i8] c"Your planet sizes will be:\0A %s\0A\0A\00"
@.str.2 = [488 x i8] c"Please note that I am a program. My only function is to register\0Ayour name. I am not smart enough to answer any questions that you\0Amight have put in your mail.\0A\0AFor more information about GalaxyNG, have a look at\0A http://galaxyng.sourceforge.net/\0ANow is a good time to read the manual:\0A http://galaxyng.sourceforge.net/manual.php\0Aand the FAQ: \0A http://galaxyng.sourceforge.net/faq.php\0A\0AIf you then still have questions, join the Galaxy mailing list:\0A \0A\0AHappy Hunting in Galaxy %s!\0A\0A\00"
define void @playerMessage(i8* %0, i8* %1, i8* %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** %4
%8 = load i8*, i8** %5
%9 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i8*, i8** %6
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %12, %3
%16 = load i8*, i8** %4
%17 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([488 x i8], [488 x i8]* @.str.2, i64 0, i64 0), i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [117 x i8] c"I am happy to report that you have been accepted for the game %s.\0AYour address:\0A %s\0Ahas been added to the list.\0A \0A\00"
@.str.1 = [34 x i8] c"Your planet sizes will be:\0A %s\0A\0A\00"
@.str.2 = [488 x i8] c"Please note that I am a program. My only function is to register\0Ayour name. I am not smart enough to answer any questions that you\0Amight have put in your mail.\0A\0AFor more information about GalaxyNG, have a look at\0A http://galaxyng.sourceforge.net/\0ANow is a good time to read the manual:\0A http://galaxyng.sourceforge.net/manual.php\0Aand the FAQ: \0A http://galaxyng.sourceforge.net/faq.php\0A\0AIf you then still have questions, join the Galaxy mailing list:\0A \0A\0AHappy Hunting in Galaxy %s!\0A\0A\00"
define void @playerMessage(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = icmp eq i8* %2, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %2)
br label %8
8: ; preds = %6, %3
%9 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([488 x i8], [488 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}