#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;
struct statstime {
  int dummy;
};
typedef enum clnt_stat { ____Placeholder_clnt_stat } clnt_stat;

/* Variables and functions */
int /*<<< orphan*/ RSTATPROC_STATS;
int /*<<< orphan*/ RSTATPROG;
int /*<<< orphan*/ RSTATVERS_TIME;
int callrpc(char *, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
            int /*<<< orphan*/, char *, int /*<<< orphan*/, char *);
scalar_t__ xdr_statstime;
scalar_t__ xdr_void;
enum clnt_stat rstat(char *host, struct statstime *statp) {
  return (callrpc(host, RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS,
                  (xdrproc_t)xdr_void, (char *)NULL, (xdrproc_t)xdr_statstime,
                  (char *)statp));
}


x86 assembly (clang, -O0):
<rstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    0x2e84(%rip),%rax
mov    (%rax),%edx
mov    0x2e93(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9a(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r8d
mov    0x2ea5(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r10d
mov    -0x10(%rbp),%rax
xor    %r9d,%r9d
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <callrpc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rstat>:
push   %rax
mov    %rsi,%r10
mov    0x2ead(%rip),%rcx
mov    (%rcx),%esi
mov    0x2e94(%rip),%rcx
mov    (%rcx),%edx
mov    0x2ea3(%rip),%rcx
mov    (%rcx),%ecx
mov    0x2eaa(%rip),%rax
mov    (%rax),%r8d
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
xor    %r9d,%r9d
push   %r10
push   %rax
call   1030 <callrpc@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.statstime = type { i32 }
@RSTATPROG = global i32 0
@RSTATVERS_TIME = global i32 0
@RSTATPROC_STATS = global i32 0
@xdr_void = global i64 0
@xdr_statstime = global i64 0
define i32 @rstat(i8* %0, %struct.statstime* %1) {
%3 = alloca i8*
%4 = alloca %struct.statstime*
store i8* %0, i8** %3
store %struct.statstime* %1, %struct.statstime** %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @RSTATPROG
%7 = load i32, i32* @RSTATVERS_TIME
%8 = load i32, i32* @RSTATPROC_STATS
%9 = load i64, i64* @xdr_void
%10 = trunc i64 %9 to i32
%11 = load i64, i64* @xdr_statstime
%12 = trunc i64 %11 to i32
%13 = load %struct.statstime*, %struct.statstime** %4
%14 = bitcast %struct.statstime* %13 to i8*
%15 = call i32 @callrpc(i8* %5, i32 %6, i32 %7, i32 %8, i32 %10, i8* null, i32 %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.statstime = type { i32 }
@RSTATPROG = global i32 0
@RSTATVERS_TIME = global i32 0
@RSTATPROC_STATS = global i32 0
@xdr_void = global i64 0
@xdr_statstime = global i64 0
define i32 @rstat(i8* %0, %struct.statstime* %1) {
%3 = load i32, i32* @RSTATPROG
%4 = load i32, i32* @RSTATVERS_TIME
%5 = load i32, i32* @RSTATPROC_STATS
%6 = load i64, i64* @xdr_void
%7 = trunc i64 %6 to i32
%8 = load i64, i64* @xdr_statstime
%9 = trunc i64 %8 to i32
%10 = bitcast %struct.statstime* %1 to i8*
%11 = tail call i32 @callrpc(i8* %0, i32 %3, i32 %4, i32 %5, i32 %7, i8* null, i32 %9, i8* %10)
ret i32 %11
}