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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ svc_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ *svcfd_create(int, int, int);
int /*<<< orphan*/ xprt_register(int /*<<< orphan*/ *);
int /*<<< orphan*/ xprt_unregister(int /*<<< orphan*/ *);
int main(int argn, char *argc[]) {
  int run_mode = 0;
  int test_status = 1;
  SVCXPRT *svcr = NULL;
  int fd = 0;
  svcr = svcfd_create(fd, 1024, 1024);
  xprt_register(svcr);
  xprt_unregister(svcr);
  test_status = 0;
  svc_destroy(svcr);
  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   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x400,%edx
mov    %edx,%esi
call   1070 <svcfd_create@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <xprt_register@plt>
mov    -0x20(%rbp),%rdi
call   1050 <xprt_unregister@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <svc_destroy@plt>
mov    -0x18(%rbp),%esi
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
mov    $0x400,%esi
mov    $0x400,%edx
call   1070 <svcfd_create@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <xprt_register@plt>
mov    %rbx,%rdi
call   1050 <xprt_unregister@plt>
mov    %rbx,%rdi
call   1040 <svc_destroy@plt>
lea    0xe7c(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.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*
%9 = 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
store i32* null, i32** %8
store i32 0, i32* %9
%10 = load i32, i32* %9
%11 = call i32* @svcfd_create(i32 %10, i32 1024, i32 1024)
store i32* %11, i32** %8
%12 = load i32*, i32** %8
%13 = call i32 @xprt_register(i32* %12)
%14 = load i32*, i32** %8
%15 = call i32 @xprt_unregister(i32* %14)
store i32 0, i32* %7
%16 = load i32*, i32** %8
%17 = call i32 @svc_destroy(i32* %16)
%18 = load i32, i32* %7
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32* @svcfd_create(i32 0, i32 1024, i32 1024)
%4 = tail call i32 @xprt_register(i32* %3)
%5 = tail call i32 @xprt_unregister(i32* %3)
%6 = tail call i32 @svc_destroy(i32* %3)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}