#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_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int rj_why;
  int /*<<< orphan*/ rj_stat;
};
struct TYPE_3__ {
  int /*<<< orphan*/ rp_stat;
};
struct rpc_msg {
  TYPE_2__ rjcted_rply;
  TYPE_1__ rm_reply;
  int /*<<< orphan*/ rm_direction;
};
typedef enum auth_stat { ____Placeholder_auth_stat } auth_stat;
typedef int /*<<< orphan*/ SVCXPRT;

/* Variables and functions */
int /*<<< orphan*/ AUTH_ERROR;
int /*<<< orphan*/ MSG_DENIED;
int /*<<< orphan*/ REPLY;
int /*<<< orphan*/ SVC_REPLY(int /*<<< orphan*/ *, struct rpc_msg *);
void svcerr_auth(SVCXPRT *xprt, enum auth_stat why) {
  struct rpc_msg rply;
  rply.rm_direction = REPLY;
  rply.rm_reply.rp_stat = MSG_DENIED;
  rply.rjcted_rply.rj_stat = AUTH_ERROR;
  rply.rjcted_rply.rj_why = why;
  SVC_REPLY(xprt, &rply);
}


x86 assembly (clang, -O0):
<svcerr_auth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <SVC_REPLY@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svcerr_auth>:
sub    $0x18,%rsp
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
mov    %esi,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1030 <SVC_REPLY@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.rpc_msg = type { %struct.TYPE_4__, %struct.TYPE_3__, i32 }
%struct.TYPE_4__ = type { i32, i32 }
%struct.TYPE_3__ = type { i32 }
@REPLY = global i32 0
@MSG_DENIED = global i32 0
@AUTH_ERROR = global i32 0
define void @svcerr_auth(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca %struct.rpc_msg
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* @REPLY
%7 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %5, i32 0, i32 2
store i32 %6, i32* %7
%8 = load i32, i32* @MSG_DENIED
%9 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %5, i32 0, i32 1
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
store i32 %8, i32* %10
%11 = load i32, i32* @AUTH_ERROR
%12 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %5, i32 0, i32 0
%13 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %12, i32 0, i32 1
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %5, i32 0, i32 0
%16 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %15, i32 0, i32 0
store i32 %14, i32* %16
%17 = load i32*, i32** %3
%18 = call i32 @SVC_REPLY(i32* %17, %struct.rpc_msg* %5)
ret void
}

LLVM IR (-O2):
%struct.rpc_msg = type { %struct.TYPE_4__, %struct.TYPE_3__, i32 }
%struct.TYPE_4__ = type { i32, i32 }
%struct.TYPE_3__ = type { i32 }
@REPLY = global i32 0
@MSG_DENIED = global i32 0
@AUTH_ERROR = global i32 0
define void @svcerr_auth(i32* %0, i32 %1) {
%3 = alloca %struct.rpc_msg
%4 = bitcast %struct.rpc_msg* %3 to i8*
%5 = load i32, i32* @REPLY
%6 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %3, i64 0, i32 2
store i32 %5, i32* %6
%7 = load i32, i32* @MSG_DENIED
%8 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %3, i64 0, i32 1, i32 0
store i32 %7, i32* %8
%9 = load i32, i32* @AUTH_ERROR
%10 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %3, i64 0, i32 0, i32 1
store i32 %9, i32* %10
%11 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %3, i64 0, i32 0, i32 0
store i32 %1, i32* %11
%12 = call i32 @SVC_REPLY(i32* %0, %struct.rpc_msg* %3)
ret void
}