#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 *, ...);
scalar_t__ strcmp(char *, char *);
void showUsage(char *applet) {
  if (strcmp(applet, "ibase") == 0) {
    printf("\n\x20Usage: %s [-i In Base] [-o Out Base] arg1 arg2 arg3 ...\n",
           applet);
    printf("\x20\x20-h   This help\n");
    printf("\x20\x20-i   Base of input values\n");
    printf("\x20\x20-o   Base of output values\n\n");
  } else {
    printf("\n\x20Usage: %s [-r] arg1 arg2 arg3 ...\n", applet);
    printf("\x20\x20-h   This help\n");
    printf("\x20\x20-r   Reverse conversion\n\n");
  }
}


x86 assembly (clang, -O0):
<showUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1187 <showUsage+0x67>
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b5 <showUsage+0x95>
mov    -0x8(%rbp),%rsi
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showUsage>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1166 <showUsage+0x36>
lea    0xef5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf09(%rip),%rbx
lea    0xf1d(%rip),%rdi
jmp    1191 <showUsage+0x61>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xf24(%rip),%rbx
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ibase\00"
@.str.1 = [59 x i8] c"\0A Usage: %s [-i In Base] [-o Out Base] arg1 arg2 arg3 ...\0A\00"
@.str.2 = [18 x i8] c" -h This help\0A\00"
@.str.3 = [29 x i8] c" -i Base of input values\0A\00"
@.str.4 = [31 x i8] c" -o Base of output values\0A\0A\00"
@.str.5 = [37 x i8] c"\0A Usage: %s [-r] arg1 arg2 arg3 ...\0A\00"
@.str.6 = [28 x i8] c" -r Reverse conversion\0A\0A\00"
define void @showUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %17
12: ; preds = %1
%13 = load i8*, i8** %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
br label %17
17: ; preds = %12, %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ibase\00"
@.str.1 = [59 x i8] c"\0A Usage: %s [-i In Base] [-o Out Base] arg1 arg2 arg3 ...\0A\00"
@.str.5 = [37 x i8] c"\0A Usage: %s [-r] arg1 arg2 arg3 ...\0A\00"
@str.7 = [27 x i8] c" -r Reverse conversion\0A\00"
@str.8 = [17 x i8] c" -h This help\00"
@str.9 = [28 x i8] c" -i Base of input values\00"
@str.10 = [30 x i8] c" -o Base of output values\0A\00"
define void @showUsage(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.8, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %4
%10 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.8, i64 0, i64 0), %7 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @str.9, i64 0, i64 0), %4 ]
%11 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.7, i64 0, i64 0), %7 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.10, i64 0, i64 0), %4 ]
%12 = tail call i32 @puts(i8* dereferenceable(1) %10)
%13 = tail call i32 @puts(i8* dereferenceable(1) %11)
ret void
}