#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_PROGNOTREGISTERED;
int callrpc(char *, int, int, int, int /*<<< orphan*/, char *,
            int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ xdr_int;
int main(int argn, char *argc[]) {
  int test_status = 1;
  enum clnt_stat cs;
  int var_snd = 0;
  cs = callrpc(argc[1], 667, 1, 1, (xdrproc_t)xdr_int, (char *)&var_snd,
               (xdrproc_t)xdr_int, (char *)&var_snd);
  test_status = (cs != RPC_PROGNOTREGISTERED);
  printf("%d\n", test_status);
  return test_status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2e95(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r8d
lea    -0x1c(%rbp),%r9
mov    0x2e84(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r10d
lea    -0x1c(%rbp),%rax
mov    $0x29b,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <callrpc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    0x2e4b(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
mov    0x8(%rsi),%rdi
mov    0x2eb0(%rip),%rax
mov    (%rax),%r8d
lea    0xc(%rsp),%r9
mov    $0x29b,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
push   %r9
push   %r8
call   1040 <callrpc@plt>
add    $0x10,%rsp
mov    0x2e7d(%rip),%rcx
xor    %ebx,%ebx
cmp    (%rcx),%eax
setne  %bl
lea    0xe8f(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@xdr_int = global i64 0
@RPC_PROGNOTREGISTERED = global i32 0
@.str = [4 x i8] c"%d\0A\00"
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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store i32 0, i32* %8
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = load i64, i64* @xdr_int
%13 = trunc i64 %12 to i32
%14 = bitcast i32* %8 to i8*
%15 = load i64, i64* @xdr_int
%16 = trunc i64 %15 to i32
%17 = bitcast i32* %8 to i8*
%18 = call i32 @callrpc(i8* %11, i32 667, i32 1, i32 1, i32 %13, i8* %14, i32 %16, i8* %17)
store i32 %18, i32* %7
%19 = load i32, i32* %7
%20 = load i32, i32* @RPC_PROGNOTREGISTERED
%21 = icmp ne i32 %19, %20
%22 = zext i1 %21 to i32
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %6
ret i32 %25
}

LLVM IR (-O2):
@xdr_int = global i64 0
@RPC_PROGNOTREGISTERED = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i64, i64* @xdr_int
%8 = trunc i64 %7 to i32
%9 = call i32 @callrpc(i8* %6, i32 667, i32 1, i32 1, i32 %8, i8* %4, i32 %8, i8* %4)
%10 = load i32, i32* @RPC_PROGNOTREGISTERED
%11 = icmp ne i32 %9, %10
%12 = zext i1 %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 %12
}