#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*/ CLIENT;

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ *clnt_create(char *, int, int, char *);
char *clnt_spcreateerror(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argn, char *argc[]) {
  int test_status = 1;
  int progNum = atoi(argc[2]);
  CLIENT *clnt = NULL;
  char nettype[8] = "udp";
  char *rslt = NULL;
  clnt = clnt_create(argc[1], progNum, 1, nettype);
  rslt = clnt_spcreateerror("#SUCCESS");
  test_status = (rslt == NULL);
  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)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0xe84(%rip),%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x18(%rbp),%esi
lea    -0x28(%rbp),%rcx
mov    $0x1,%edx
call   1050 <clnt_create@plt>
mov    %rax,-0x20(%rbp)
lea    0xe5c(%rip),%rdi
call   1040 <clnt_spcreateerror@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe42(%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
mov    %rsi,%rbx
mov    0x10(%rsi),%rdi
call   1060 <atoi@plt>
movq   $0x706475,0x8(%rsp)
mov    0x8(%rbx),%rdi
lea    0x8(%rsp),%rcx
mov    %eax,%esi
mov    $0x1,%edx
call   1050 <clnt_create@plt>
lea    0xe8a(%rip),%rdi
call   1040 <clnt_spcreateerror@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
lea    0xe7f(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.nettype = [8 x i8] c"udp\00\00\00\00\00"
@.str = [9 x i8] c"#SUCCESS\00"
@.str.1 = [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*
%9 = alloca [8 x i8]
%10 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
%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* %7
store i32* null, i32** %8
%15 = bitcast [8 x i8]* %9 to i8*
store i8* null, i8** %10
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = load i32, i32* %7
%20 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
%21 = call i32* @clnt_create(i8* %18, i32 %19, i32 1, i8* %20)
store i32* %21, i32** %8
%22 = call i8* @clnt_spcreateerror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %22, i8** %10
%23 = load i8*, i8** %10
%24 = icmp eq i8* %23, null
%25 = zext i1 %24 to i32
store i32 %25, i32* %6
%26 = load i32, i32* %6
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %6
ret i32 %28
}

LLVM IR (-O2):
@.str = [9 x i8] c"#SUCCESS\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = getelementptr inbounds i8*, i8** %1, i64 2
%5 = load i8*, i8** %4
%6 = tail call i32 @atoi(i8* %5)
%7 = bitcast i64* %3 to i8*
store i64 7365749, i64* %3
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = call i32* @clnt_create(i8* %9, i32 %6, i32 1, i8* %7)
%11 = call i8* @clnt_spcreateerror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i8* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 %13
}