#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);
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;
  int varRcv = 0;
  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 *)&varRcv);
  if (cs != RPC_SUCCESS)
    clnt_perrno(cs);
  if (varSnd == varRcv)
    test_status = 0;
  return test_status;
}


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   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    119b <main+0x5b>
mov    -0x1c(%rbp),%esi
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x1c(%rbp),%esi
mov    0x2e3b(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r8d
lea    -0x24(%rbp),%r9
mov    0x2e2a(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r10d
lea    -0x28(%rbp),%rax
mov    $0x1,%ecx
mov    %ecx,%edx
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1060 <callrpc@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    0x2df6(%rip),%rcx
cmp    (%rcx),%eax
je     11fa <main+0xba>
mov    -0x20(%rbp),%edi
call   1040 <clnt_perrno@plt>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    120d <main+0xcd>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%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   1040 <atoi@plt>
movl   $0x1,0xc(%rsp)
movl   $0x0,0x8(%rsp)
mov    0x8(%rbx),%rdi
mov    0x2e8c(%rip),%rcx
mov    (%rcx),%r8d
lea    0x8(%rsp),%rbx
lea    0xc(%rsp),%r9
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
push   %rbx
push   %r8
call   1050 <callrpc@plt>
add    $0x10,%rsp
mov    0x2e58(%rip),%rcx
cmp    (%rcx),%eax
je     1193 <main+0x63>
mov    %eax,%edi
call   1030 <clnt_perrno@plt>
mov    0xc(%rsp),%ecx
xor    %eax,%eax
cmp    0x8(%rsp),%ecx
setne  %al
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
%11 = 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
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %8
store i32 1, i32* %10
store i32 0, i32* %11
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = load i32, i32* %8
%20 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %18, %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = load i32, i32* %8
%26 = load i64, i64* @xdr_int
%27 = trunc i64 %26 to i32
%28 = bitcast i32* %10 to i8*
%29 = load i64, i64* @xdr_int
%30 = trunc i64 %29 to i32
%31 = bitcast i32* %11 to i8*
%32 = call i32 @callrpc(i8* %24, i32 %25, i32 1, i32 1, i32 %27, i8* %28, i32 %30, i8* %31)
store i32 %32, i32* %9
%33 = load i32, i32* %9
%34 = load i32, i32* @RPC_SUCCESS
%35 = icmp ne i32 %33, %34
br i1 %35, label %36, label %39
36: ; preds = %21
%37 = load i32, i32* %9
%38 = call i32 @clnt_perrno(i32 %37)
br label %39
39: ; preds = %36, %21
%40 = load i32, i32* %10
%41 = load i32, i32* %11
%42 = icmp eq i32 %40, %41
br i1 %42, label %43, label %44
43: ; preds = %39
store i32 0, i32* %7
br label %44
44: ; preds = %43, %39
%45 = load i32, i32* %7
ret i32 %45
}

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 = alloca i32
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = bitcast i32* %3 to i8*
store i32 1, i32* %3
%9 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = load i64, i64* @xdr_int
%13 = trunc i64 %12 to i32
%14 = call i32 @callrpc(i8* %11, i32 %7, i32 1, i32 1, i32 %13, i8* %8, i32 %13, i8* %9)
%15 = load i32, i32* @RPC_SUCCESS
%16 = icmp eq i32 %14, %15
br i1 %16, label %19, label %17
17: ; preds = %2
%18 = call i32 @clnt_perrno(i32 %14)
br label %19
19: ; preds = %17, %2
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = icmp ne i32 %20, %21
%23 = zext i1 %22 to i32
ret i32 %23
}