#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 atoi(char const *);
int /*<<< orphan*/ farr16();
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ robPrintAscii();
int /*<<< orphan*/ robPrintMessage(int);
int /*<<< orphan*/ username2();
int main(int argc, const char *argv[]) {
  if ((argc != 1) && (argc != 2)) {
    printf("usage: %s <number> \n", argv[0]);
    return -1;
  }
  if (argc == 1) {
    robPrintAscii();
    return 0;
  }
  int num = atoi(argv[1]);
  robPrintAscii();
  robPrintMessage(num);
  farr16();
  username2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     11a9 <main+0x49>
cmpl   $0x2,-0x8(%rbp)
je     11a9 <main+0x49>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11fa <main+0x9a>
cmpl   $0x1,-0x8(%rbp)
jne    11c6 <main+0x66>
mov    $0x0,%al
call   1040 <robPrintAscii@plt>
movl   $0x0,-0x4(%rbp)
jmp    11fa <main+0x9a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <robPrintAscii@plt>
mov    -0x14(%rbp),%edi
call   1050 <robPrintMessage@plt>
mov    $0x0,%al
call   1070 <farr16@plt>
mov    $0x0,%al
call   1080 <username2@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    -0x3(%rdi),%eax
cmp    $0xfffffffd,%eax
ja     1181 <main+0x21>
mov    (%rsi),%rsi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%ebx
jmp    11ba <main+0x5a>
cmp    $0x1,%edi
jne    1191 <main+0x31>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <robPrintAscii@plt>
jmp    11ba <main+0x5a>
mov    0x8(%rsi),%rdi
call   1060 <atoi@plt>
mov    %eax,%ebp
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <robPrintAscii@plt>
mov    %ebp,%edi
call   1050 <robPrintMessage@plt>
xor    %eax,%eax
call   1070 <farr16@plt>
xor    %eax,%eax
call   1080 <username2@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"usage: %s <number> \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 2
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %15)
store i32 -1, i32* %3
br label %32
17: ; preds = %9, %2
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 (...) @robPrintAscii()
store i32 0, i32* %3
br label %32
22: ; preds = %17
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @atoi(i8* %25)
store i32 %26, i32* %6
%27 = call i32 (...) @robPrintAscii()
%28 = load i32, i32* %6
%29 = call i32 @robPrintMessage(i32 %28)
%30 = call i32 (...) @farr16()
%31 = call i32 (...) @username2()
store i32 0, i32* %3
br label %32
32: ; preds = %22, %20, %12
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
@.str = [21 x i8] c"usage: %s <number> \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add i32 %0, -3
%4 = icmp ult i32 %3, -2
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i8*, i8** %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %20
8: ; preds = %2
%9 = icmp eq i32 %0, 1
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = tail call i32 (...) @robPrintAscii()
br label %20
12: ; preds = %8
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32 @atoi(i8* %14)
%16 = tail call i32 (...) @robPrintAscii()
%17 = tail call i32 @robPrintMessage(i32 %15)
%18 = tail call i32 (...) @farr16()
%19 = tail call i32 (...) @username2()
br label %20
20: ; preds = %12, %10, %5
%21 = phi i32 [ -1, %5 ], [ 0, %10 ], [ 0, %12 ]
ret i32 %21
}