#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 *, ...);
void putHelp(char *extra_message) {
  printf("[ERROR] %s\n", extra_message);
  printf("[INFO] Valid commands are: 'p', 'm', 'n'.\n");
  printf("[INFO] \tp <card>: play <card> into the arena\n");
  printf("[INFO] \tm <c1> <c2>: move card 1 onto card 2\n");
  printf("[INFO] \tn: draw the next card from the deck\n");
  printf("[INFO] \tq: exit\n");
  printf("[INFO] Cards are specified as follows <card><suit>\n");
  printf("[INFO] where <card> is one of: 23456789tjqka \n");
  printf("[INFO] where <suit> is one of: \n");
  printf("[INFO] \ts: spades\n");
  printf("[INFO] \th: hearts\n");
  printf("[INFO] \tc: clubs\n");
  printf("[INFO] \td: diamonds.\n");
}


x86 assembly (clang, -O0):
<putHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfbe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putHelp>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf12(%rip),%rdi
call   1030 <puts@plt>
lea    0xf33(%rip),%rdi
call   1030 <puts@plt>
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0xf57(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7e(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfba(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc5(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"[ERROR] %s\0A\00"
@.str.1 = [43 x i8] c"[INFO] Valid commands are: 'p', 'm', 'n'.\0A\00"
@.str.2 = [46 x i8] c"[INFO] \09p <card>: play <card> into the arena\0A\00"
@.str.3 = [46 x i8] c"[INFO] \09m <c1> <c2>: move card 1 onto card 2\0A\00"
@.str.4 = [45 x i8] c"[INFO] \09n: draw the next card from the deck\0A\00"
@.str.5 = [17 x i8] c"[INFO] \09q: exit\0A\00"
@.str.6 = [52 x i8] c"[INFO] Cards are specified as follows <card><suit>\0A\00"
@.str.7 = [47 x i8] c"[INFO] where <card> is one of: 23456789tjqka \0A\00"
@.str.8 = [33 x i8] c"[INFO] where <suit> is one of: \0A\00"
@.str.9 = [19 x i8] c"[INFO] \09s: spades\0A\00"
@.str.10 = [19 x i8] c"[INFO] \09h: hearts\0A\00"
@.str.11 = [18 x i8] c"[INFO] \09c: clubs\0A\00"
@.str.12 = [22 x i8] c"[INFO] \09d: diamonds.\0A\00"
define void @putHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"[ERROR] %s\0A\00"
@str = [42 x i8] c"[INFO] Valid commands are: 'p', 'm', 'n'.\00"
@str.13 = [45 x i8] c"[INFO] \09p <card>: play <card> into the arena\00"
@str.14 = [45 x i8] c"[INFO] \09m <c1> <c2>: move card 1 onto card 2\00"
@str.15 = [44 x i8] c"[INFO] \09n: draw the next card from the deck\00"
@str.16 = [16 x i8] c"[INFO] \09q: exit\00"
@str.17 = [51 x i8] c"[INFO] Cards are specified as follows <card><suit>\00"
@str.18 = [46 x i8] c"[INFO] where <card> is one of: 23456789tjqka \00"
@str.19 = [32 x i8] c"[INFO] where <suit> is one of: \00"
@str.20 = [18 x i8] c"[INFO] \09s: spades\00"
@str.21 = [18 x i8] c"[INFO] \09h: hearts\00"
@str.22 = [17 x i8] c"[INFO] \09c: clubs\00"
@str.23 = [21 x i8] c"[INFO] \09d: diamonds.\00"
define void @putHelp(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.20, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.21, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.22, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0))
ret void
}