#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 */
typedef struct TYPE_10__ TYPE_4__;
typedef struct TYPE_9__ TYPE_3__;
typedef struct TYPE_8__ TYPE_2__;
typedef struct TYPE_7__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ xdrproc_t;
struct TYPE_9__ {
  int /*<<< orphan*/ proc;
  int /*<<< orphan*/ where;
};
struct TYPE_8__ {
  TYPE_3__ ar_results;
  int /*<<< orphan*/ ar_stat;
  int /*<<< orphan*/ ar_verf;
};
struct TYPE_7__ {
  int /*<<< orphan*/ rp_stat;
};
struct rpc_msg {
  TYPE_2__ acpted_rply;
  TYPE_1__ rm_reply;
  int /*<<< orphan*/ rm_direction;
};
typedef int /*<<< orphan*/ caddr_t;
typedef int /*<<< orphan*/ bool_t;
struct TYPE_10__ {
  int /*<<< orphan*/ xp_verf;
};
typedef TYPE_4__ SVCXPRT;

/* Variables and functions */
int /*<<< orphan*/ MSG_ACCEPTED;
int /*<<< orphan*/ REPLY;
int /*<<< orphan*/ SUCCESS;
int /*<<< orphan*/ SVC_REPLY(TYPE_4__ *, struct rpc_msg *);
bool_t svc_sendreply(register SVCXPRT *xprt, xdrproc_t xdr_results,
                     caddr_t xdr_location) {
  struct rpc_msg rply;
  rply.rm_direction = REPLY;
  rply.rm_reply.rp_stat = MSG_ACCEPTED;
  rply.acpted_rply.ar_verf = xprt->xp_verf;
  rply.acpted_rply.ar_stat = SUCCESS;
  rply.acpted_rply.ar_results.where = xdr_location;
  rply.acpted_rply.ar_results.proc = xdr_results;
  return SVC_REPLY(xprt, &rply);
}


x86 assembly (clang, -O0):
<svc_sendreply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <SVC_REPLY@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svc_sendreply>:
sub    $0x18,%rsp
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    (%rdi),%eax
mov    %eax,0xc(%rsp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
mov    %edx,0x4(%rsp)
mov    %esi,(%rsp)
mov    %rsp,%rsi
call   1030 <SVC_REPLY@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.TYPE_10__ = type { i32 }
%struct.rpc_msg = type { %struct.TYPE_8__, %struct.TYPE_7__, i32 }
%struct.TYPE_8__ = type { %struct.TYPE_9__, i32, i32 }
%struct.TYPE_9__ = type { i32, i32 }
%struct.TYPE_7__ = type { i32 }
@REPLY = global i32 0
@MSG_ACCEPTED = global i32 0
@SUCCESS = global i32 0
define i32 @svc_sendreply(%struct.TYPE_10__* %0, i32 %1, i32 %2) {
%4 = alloca %struct.TYPE_10__*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.rpc_msg
store %struct.TYPE_10__* %0, %struct.TYPE_10__** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* @REPLY
%9 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %7, i32 0, i32 2
store i32 %8, i32* %9
%10 = load i32, i32* @MSG_ACCEPTED
%11 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %7, i32 0, i32 1
%12 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %11, i32 0, i32 0
store i32 %10, i32* %12
%13 = load %struct.TYPE_10__*, %struct.TYPE_10__** %4
%14 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %13, i32 0, i32 0
%15 = load i32, i32* %14
%16 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %7, i32 0, i32 0
%17 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %16, i32 0, i32 2
store i32 %15, i32* %17
%18 = load i32, i32* @SUCCESS
%19 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %7, i32 0, i32 0
%20 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %19, i32 0, i32 1
store i32 %18, i32* %20
%21 = load i32, i32* %6
%22 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %7, i32 0, i32 0
%23 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %22, i32 0, i32 0
%24 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %23, i32 0, i32 1
store i32 %21, i32* %24
%25 = load i32, i32* %5
%26 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %7, i32 0, i32 0
%27 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %26, i32 0, i32 0
%28 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %27, i32 0, i32 0
store i32 %25, i32* %28
%29 = load %struct.TYPE_10__*, %struct.TYPE_10__** %4
%30 = call i32 @SVC_REPLY(%struct.TYPE_10__* %29, %struct.rpc_msg* %7)
ret i32 %30
}

LLVM IR (-O2):
%struct.TYPE_10__ = type { i32 }
%struct.rpc_msg = type { %struct.TYPE_8__, %struct.TYPE_7__, i32 }
%struct.TYPE_8__ = type { %struct.TYPE_9__, i32, i32 }
%struct.TYPE_9__ = type { i32, i32 }
%struct.TYPE_7__ = type { i32 }
@REPLY = global i32 0
@MSG_ACCEPTED = global i32 0
@SUCCESS = global i32 0
define i32 @svc_sendreply(%struct.TYPE_10__* %0, i32 %1, i32 %2) {
%4 = alloca %struct.rpc_msg
%5 = bitcast %struct.rpc_msg* %4 to i8*
%6 = load i32, i32* @REPLY
%7 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %4, i64 0, i32 2
store i32 %6, i32* %7
%8 = load i32, i32* @MSG_ACCEPTED
%9 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %4, i64 0, i32 1, i32 0
store i32 %8, i32* %9
%10 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %0, i64 0, i32 0
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %4, i64 0, i32 0, i32 2
store i32 %11, i32* %12
%13 = load i32, i32* @SUCCESS
%14 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %4, i64 0, i32 0, i32 1
store i32 %13, i32* %14
%15 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %4, i64 0, i32 0, i32 0, i32 1
store i32 %2, i32* %15
%16 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %4, i64 0, i32 0, i32 0, i32 0
store i32 %1, i32* %16
%17 = call i32 @SVC_REPLY(%struct.TYPE_10__* %0, %struct.rpc_msg* %4)
ret i32 %17
}