#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*/ exit(int);
int /*<<< orphan*/ nfs4_program_4(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char *host;
  if (argc == 1)
    host = "localhost";
  else if (argc == 2)
    host = argv[1];
  else {
    printf("usage: %s\n", argv[0]);
    exit(1);
  }
  nfs4_program_4(host);
  exit(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)
jne    1160 <main+0x30>
lea    0xea9(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    119d <main+0x6d>
cmpl   $0x2,-0x8(%rbp)
jne    117b <main+0x4b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1198 <main+0x68>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    119d <main+0x6d>
mov    -0x18(%rbp),%rdi
call   1040 <nfs4_program_4@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
je     1141 <main+0x11>
cmp    $0x2,%edi
jne    1154 <main+0x24>
mov    0x8(%rsi),%rdi
jmp    1148 <main+0x18>
lea    0xeb8(%rip),%rdi
call   1040 <nfs4_program_4@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    (%rsi),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [11 x i8] c"usage: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %6
br label %24
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
store i8* %16, i8** %6
br label %23
17: ; preds = %10
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %13
br label %24
24: ; preds = %23, %9
%25 = load i8*, i8** %6
%26 = call i32 @nfs4_program_4(i8* %25)
%27 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [11 x i8] c"usage: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %6 [
i32 1, label %10
i32 2, label %3
]
3: ; preds = %2
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
br label %10
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2, %3
%11 = phi i8* [ %5, %3 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %2 ]
%12 = tail call i32 @nfs4_program_4(i8* %11)
%13 = tail call i32 @exit(i32 0)
unreachable
}