#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*/ prints(char *);
int /*<<< orphan*/ quit(int);
void usage(int q) {
  prints("Usage: s9 [-hv?] [-i name|-] [-gqu] [-d image]");
  prints(" [-k size[m]] [-l prog]");
  prints("\n");
  prints("          [-n size[m]] [[-f] prog [arg ...]]");
  prints(" [-- [arg ...]]");
  prints("\n");
  if (q)
    quit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <prints@plt>
lea    0xef1(%rip),%rdi
call   1040 <prints@plt>
lea    0xefd(%rip),%rdi
call   1040 <prints@plt>
lea    0xef3(%rip),%rdi
call   1040 <prints@plt>
lea    0xf14(%rip),%rdi
call   1040 <prints@plt>
lea    0xed9(%rip),%rdi
call   1040 <prints@plt>
cmpl   $0x0,-0x4(%rbp)
je     1187 <usage+0x67>
mov    $0x1,%edi
call   1030 <quit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xed4(%rip),%rdi
call   1040 <prints@plt>
lea    0xef7(%rip),%rdi
call   1040 <prints@plt>
lea    0xf03(%rip),%rbx
mov    %rbx,%rdi
call   1040 <prints@plt>
lea    0xef6(%rip),%rdi
call   1040 <prints@plt>
lea    0xf17(%rip),%rdi
call   1040 <prints@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
test   %ebp,%ebp
je     1180 <usage+0x60>
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <quit@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Usage: s9 [-hv?] [-i name|-] [-gqu] [-d image]\00"
@.str.1 = [24 x i8] c" [-k size[m]] [-l prog]\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [45 x i8] c" [-n size[m]] [[-f] prog [arg ...]]\00"
@.str.4 = [16 x i8] c" [-- [arg ...]]\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @prints(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @prints(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @prints(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @prints(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @quit(i32 1)
br label %13
13: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"Usage: s9 [-hv?] [-i name|-] [-gqu] [-d image]\00"
@.str.1 = [24 x i8] c" [-k size[m]] [-l prog]\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [45 x i8] c" [-n size[m]] [[-f] prog [arg ...]]\00"
@.str.4 = [16 x i8] c" [-- [arg ...]]\00"
define void @usage(i32 %0) {
%2 = tail call i32 @prints(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @prints(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @prints(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @prints(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%8 = icmp eq i32 %0, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = tail call i32 @quit(i32 1)
br label %11
11: ; preds = %9, %1
ret void
}