#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*/ prout(char *);
int /*<<< orphan*/ proutn(char *);
void listCommands(int x) {
  prout("   SRSCAN    MOVE      PHASERS   CALL\n"
        "   STATUS    IMPULSE   PHOTONS   ABANDON\n"
        "   LRSCAN    WARP      SHIELDS   DESTRUCT\n"
        "   CHART     REST      DOCK      QUIT\n"
        "   DAMAGES   REPORT    SENSORS   ORBIT\n"
        "   TRANSPORT MINE      CRYSTALS  SHUTTLE\n"
        "   PLANETS   REQUEST   DEATHRAY  FREEZE\n"
        "   COMPUTER  EMEXIT    PROBE     COMMANDS");
  proutn("   ");
  if (x)
    proutn("HELP     ");
  prout("");
}


x86 assembly (clang, -O0):
<listCommands>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <prout@plt>
lea    0x1009(%rip),%rdi
call   1030 <proutn@plt>
cmpl   $0x0,-0x4(%rbp)
je     1159 <listCommands+0x39>
lea    0xfed(%rip),%rdi
call   1030 <proutn@plt>
lea    0xfea(%rip),%rdi
call   1040 <prout@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listCommands>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <prout@plt>
lea    0x1011(%rip),%rdi
call   1030 <proutn@plt>
test   %ebx,%ebx
je     114b <listCommands+0x2b>
lea    0xffb(%rip),%rdi
call   1030 <proutn@plt>
lea    0xff8(%rip),%rdi
pop    %rbx
jmp    1040 <prout@plt>

LLVM IR (-O0):
@.str = [321 x i8] c" SRSCAN MOVE PHASERS CALL\0A STATUS IMPULSE PHOTONS ABANDON\0A LRSCAN WARP SHIELDS DESTRUCT\0A CHART REST DOCK QUIT\0A DAMAGES REPORT SENSORS ORBIT\0A TRANSPORT MINE CRYSTALS SHUTTLE\0A PLANETS REQUEST DEATHRAY FREEZE\0A COMPUTER EMEXIT PROBE COMMANDS\00"
@.str.1 = [4 x i8] c" \00"
@.str.2 = [10 x i8] c"HELP \00"
@.str.3 = [1 x i8] zeroinitializer
define void @listCommands(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @prout(i8* getelementptr inbounds ([321 x i8], [321 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @proutn(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @proutn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = call i32 @prout(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [321 x i8] c" SRSCAN MOVE PHASERS CALL\0A STATUS IMPULSE PHOTONS ABANDON\0A LRSCAN WARP SHIELDS DESTRUCT\0A CHART REST DOCK QUIT\0A DAMAGES REPORT SENSORS ORBIT\0A TRANSPORT MINE CRYSTALS SHUTTLE\0A PLANETS REQUEST DEATHRAY FREEZE\0A COMPUTER EMEXIT PROBE COMMANDS\00"
@.str.1 = [4 x i8] c" \00"
@.str.2 = [10 x i8] c"HELP \00"
@.str.3 = [1 x i8] zeroinitializer
define void @listCommands(i32 %0) {
%2 = tail call i32 @prout(i8* getelementptr inbounds ([321 x i8], [321 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @proutn(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @proutn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @prout(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}