#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 */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ u_long;
struct TYPE_4__ {
  int /*<<< orphan*/ cl_auth;
};
typedef TYPE_1__ CLIENT;

/* Variables and functions */
int /*<<< orphan*/ authunix_create_default();
TYPE_1__ *clnt_create(char *, int /*<<< orphan*/, int /*<<< orphan*/, char *);
int /*<<< orphan*/ clnt_pcreateerror(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ mountproc_umntall_1(int /*<<< orphan*/ *, TYPE_1__ *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  char *host;
  CLIENT *mountcl;
  if (argc != 2) {
    printf("usage: hmount <host>\n");
    exit(1);
  }
  host = argv[1];
  mountcl = clnt_create(host, ((u_long)100005), ((u_long)1), "udp");
  if (mountcl == NULL) {
    clnt_pcreateerror(host);
    return 0;
  }
  mountcl->cl_auth = authunix_create_default();
  mountproc_umntall_1(NULL, mountcl);
}


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   $0x2,-0x8(%rbp)
je     1196 <main+0x36>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x186a5,%esi
mov    $0x1,%edx
lea    0xe5f(%rip),%rcx
call   1050 <clnt_create@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11e0 <main+0x80>
mov    -0x18(%rbp),%rdi
call   1070 <clnt_pcreateerror@plt>
movl   $0x0,-0x4(%rbp)
jmp    11fc <main+0x9c>
mov    $0x0,%al
call   1040 <authunix_create_default@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1060 <mountproc_umntall_1@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    11b5 <main+0x55>
mov    0x8(%rsi),%r14
lea    0xe8c(%rip),%rcx
mov    %r14,%rdi
mov    $0x186a5,%esi
mov    $0x1,%edx
call   1050 <clnt_create@plt>
test   %rax,%rax
je     11a3 <main+0x43>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <authunix_create_default@plt>
mov    %eax,(%rbx)
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <mountproc_umntall_1@plt>
jmp    11ab <main+0x4b>
mov    %r14,%rdi
call   1070 <clnt_pcreateerror@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe48(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32 }
@.str = [22 x i8] c"usage: hmount <host>\0A\00"
@.str.1 = [4 x i8] c"udp\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca %struct.TYPE_4__*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
store i8* %16, i8** %6
%17 = load i8*, i8** %6
%18 = call %struct.TYPE_4__* @clnt_create(i8* %17, i32 100005, i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store %struct.TYPE_4__* %18, %struct.TYPE_4__** %7
%19 = load %struct.TYPE_4__*, %struct.TYPE_4__** %7
%20 = icmp eq %struct.TYPE_4__* %19, null
br i1 %20, label %21, label %24
21: ; preds = %13
%22 = load i8*, i8** %6
%23 = call i32 @clnt_pcreateerror(i8* %22)
store i32 0, i32* %3
br label %30
24: ; preds = %13
%25 = call i32 (...) @authunix_create_default()
%26 = load %struct.TYPE_4__*, %struct.TYPE_4__** %7
%27 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %26, i32 0, i32 0
store i32 %25, i32* %27
%28 = load %struct.TYPE_4__*, %struct.TYPE_4__** %7
%29 = call i32 @mountproc_umntall_1(i32* null, %struct.TYPE_4__* %28)
br label %30
30: ; preds = %24, %21
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32 }
@.str.1 = [4 x i8] c"udp\00"
@str = [21 x i8] c"usage: hmount <host>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call %struct.TYPE_4__* @clnt_create(i8* %9, i32 100005, i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq %struct.TYPE_4__* %10, null
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = tail call i32 @clnt_pcreateerror(i8* %9)
br label %18
14: ; preds = %7
%15 = tail call i32 (...) @authunix_create_default()
%16 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i64 0, i32 0
store i32 %15, i32* %16
%17 = tail call i32 @mountproc_umntall_1(i32* null, %struct.TYPE_4__* %10)
br label %18
18: ; preds = %14, %12
ret i32 0
}