#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 */
typedef int /*<<< orphan*/ xdrproc_t;
typedef enum clnt_stat { ____Placeholder_clnt_stat } clnt_stat;

/* Variables and functions */
int RPC_SUCCESS;
int atoi(char *);
int callrpc(char *, int, int, int, int /*<<< orphan*/, char *,
            int /*<<< orphan*/, char *);
int /*<<< orphan*/ clnt_perrno(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ tst_exit();
scalar_t__ xdr_int;
int main(int argn, char *argc[]) {
  int run_mode = 0;
  int test_status = 1;
  int progNum = atoi(argc[2]);
  enum clnt_stat cs;
  int varSnd = 1;
  if (run_mode == 1) {
    printf("progNum : %d\n", progNum);
  }
  cs = callrpc(argc[1], progNum, 1, 1, (xdrproc_t)xdr_int, (char *)&varSnd,
               (xdrproc_t)xdr_int, (char *)&varSnd);
  if (cs != RPC_SUCCESS)
    clnt_perrno(cs);
  tst_exit();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x24(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    11a4 <main+0x54>
mov    -0x1c(%rbp),%esi
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x1c(%rbp),%esi
mov    0x2e32(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r8d
lea    -0x24(%rbp),%r9
mov    0x2e21(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r10d
lea    -0x24(%rbp),%rax
mov    $0x1,%ecx
mov    %ecx,%edx
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1070 <callrpc@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    0x2ded(%rip),%rcx
cmp    (%rcx),%eax
je     1203 <main+0xb3>
mov    -0x20(%rbp),%edi
call   1050 <clnt_perrno@plt>
mov    $0x0,%al
call   1040 <tst_exit@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    0x10(%rsi),%rdi
call   1050 <atoi@plt>
movl   $0x1,0xc(%rsp)
mov    0x8(%rbx),%rdi
mov    0x2e84(%rip),%rcx
mov    (%rcx),%r8d
lea    0xc(%rsp),%r9
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
push   %r9
push   %r8
call   1060 <callrpc@plt>
add    $0x10,%rsp
mov    0x2e54(%rip),%rcx
cmp    (%rcx),%eax
je     1197 <main+0x57>
mov    %eax,%edi
call   1040 <clnt_perrno@plt>
xor    %eax,%eax
call   1030 <tst_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"progNum : %d\0A\00"
@xdr_int = global i64 0
@RPC_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 2
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %8
store i32 1, i32* %10
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i32, i32* %8
%19 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %17, %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = load i32, i32* %8
%25 = load i64, i64* @xdr_int
%26 = trunc i64 %25 to i32
%27 = bitcast i32* %10 to i8*
%28 = load i64, i64* @xdr_int
%29 = trunc i64 %28 to i32
%30 = bitcast i32* %10 to i8*
%31 = call i32 @callrpc(i8* %23, i32 %24, i32 1, i32 1, i32 %26, i8* %27, i32 %29, i8* %30)
store i32 %31, i32* %9
%32 = load i32, i32* %9
%33 = load i32, i32* @RPC_SUCCESS
%34 = icmp ne i32 %32, %33
br i1 %34, label %35, label %38
35: ; preds = %20
%36 = load i32, i32* %9
%37 = call i32 @clnt_perrno(i32 %36)
br label %38
38: ; preds = %35, %20
%39 = call i32 (...) @tst_exit()
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
@xdr_int = global i64 0
@RPC_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = getelementptr inbounds i8*, i8** %1, i64 2
%5 = load i8*, i8** %4
%6 = tail call i32 @atoi(i8* %5)
%7 = bitcast i32* %3 to i8*
store i32 1, i32* %3
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = load i64, i64* @xdr_int
%11 = trunc i64 %10 to i32
%12 = call i32 @callrpc(i8* %9, i32 %6, i32 1, i32 1, i32 %11, i8* %7, i32 %11, i8* %7)
%13 = load i32, i32* @RPC_SUCCESS
%14 = icmp eq i32 %12, %13
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = call i32 @clnt_perrno(i32 %12)
br label %17
17: ; preds = %15, %2
%18 = call i32 (...) @tst_exit()
ret i32 0
}