#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 */
struct TYPE_9__ {
  void *high;
  void *low;
};
struct TYPE_8__ {
  TYPE_3__ ar_vers;
  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 void *rpcvers_t;
struct TYPE_10__ {
  int /*<<< orphan*/ xp_verf;
};
typedef TYPE_4__ SVCXPRT;

/* Variables and functions */
int /*<<< orphan*/ MSG_ACCEPTED;
int /*<<< orphan*/ PROG_MISMATCH;
int /*<<< orphan*/ REPLY;
int /*<<< orphan*/ SVC_REPLY(TYPE_4__ *, struct rpc_msg *);
void svcerr_progvers(register SVCXPRT *xprt, rpcvers_t low_vers,
                     rpcvers_t high_vers) {
  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 = PROG_MISMATCH;
  rply.acpted_rply.ar_vers.low = low_vers;
  rply.acpted_rply.ar_vers.high = high_vers;
  SVC_REPLY(xprt, &rply);
}


x86 assembly (clang, -O0):
<svcerr_progvers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2e8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1030 <SVC_REPLY@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svcerr_progvers>:
sub    $0x28,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x24(%rsp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
mov    (%rdi),%eax
mov    %eax,0x1c(%rsp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdx,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1030 <SVC_REPLY@plt>
add    $0x28,%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 { i8*, i8* }
%struct.TYPE_7__ = type { i32 }
@REPLY = global i32 0
@MSG_ACCEPTED = global i32 0
@PROG_MISMATCH = global i32 0
define void @svcerr_progvers(%struct.TYPE_10__* %0, i8* %1, i8* %2) {
%4 = alloca %struct.TYPE_10__*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.rpc_msg
store %struct.TYPE_10__* %0, %struct.TYPE_10__** %4
store i8* %1, i8** %5
store i8* %2, i8** %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* @PROG_MISMATCH
%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 i8*, i8** %5
%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 i8* %21, i8** %24
%25 = load i8*, i8** %6
%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 i8* %25, i8** %28
%29 = load %struct.TYPE_10__*, %struct.TYPE_10__** %4
%30 = call i32 @SVC_REPLY(%struct.TYPE_10__* %29, %struct.rpc_msg* %7)
ret void
}

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 { i8*, i8* }
%struct.TYPE_7__ = type { i32 }
@REPLY = global i32 0
@MSG_ACCEPTED = global i32 0
@PROG_MISMATCH = global i32 0
define void @svcerr_progvers(%struct.TYPE_10__* %0, i8* %1, i8* %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* @PROG_MISMATCH
%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 i8* %1, i8** %15
%16 = getelementptr inbounds %struct.rpc_msg, %struct.rpc_msg* %4, i64 0, i32 0, i32 0, i32 0
store i8* %2, i8** %16
%17 = call i32 @SVC_REPLY(%struct.TYPE_10__* %0, %struct.rpc_msg* %4)
ret void
}