#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 */
struct yppushresp_xfr {
  scalar_t__ status;
};
struct svc_req {
  int dummy;
};
typedef int /*<<< orphan*/ result;

/* Variables and functions */
scalar_t__ YPPUSH_SUCC;
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ warnx(char *, int /*<<< orphan*/);
int /*<<< orphan*/ yppush_err_string(scalar_t__);
void *yppushproc_xfrresp_1_svc(void *argp, struct svc_req *rqstp) {
  struct yppushresp_xfr *resp = argp;
  static char result;
  if (resp->status != YPPUSH_SUCC)
    warnx("%s", yppush_err_string(resp->status));
  (void)memset(&result, 0, sizeof(result));
  return ((void *)&result);
}


x86 assembly (clang, -O0):
<yppushproc_xfrresp_1_svc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%rax
je     1179 <yppushproc_xfrresp_1_svc+0x49>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1050 <yppush_err_string@plt>
mov    %eax,%esi
lea    0xe8c(%rip),%rdi
call   1030 <warnx@plt>
lea    0x2ec0(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <memset@plt>
lea    0x2ead(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yppushproc_xfrresp_1_svc>:
push   %rbx
mov    (%rdi),%rdi
mov    0x2ead(%rip),%rax
cmp    (%rax),%rdi
je     1153 <yppushproc_xfrresp_1_svc+0x23>
call   1050 <yppush_err_string@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1030 <warnx@plt>
lea    0x2ee6(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.svc_req = type { i32 }
%struct.yppushresp_xfr = type { i64 }
@yppushproc_xfrresp_1_svc.result = internal global i8 0
@YPPUSH_SUCC = global i64 0
@.str = [3 x i8] c"%s\00"
define i8* @yppushproc_xfrresp_1_svc(i8* %0, %struct.svc_req* %1) {
%3 = alloca i8*
%4 = alloca %struct.svc_req*
%5 = alloca %struct.yppushresp_xfr*
store i8* %0, i8** %3
store %struct.svc_req* %1, %struct.svc_req** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.yppushresp_xfr*
store %struct.yppushresp_xfr* %7, %struct.yppushresp_xfr** %5
%8 = load %struct.yppushresp_xfr*, %struct.yppushresp_xfr** %5
%9 = getelementptr inbounds %struct.yppushresp_xfr, %struct.yppushresp_xfr* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = load i64, i64* @YPPUSH_SUCC
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load %struct.yppushresp_xfr*, %struct.yppushresp_xfr** %5
%15 = getelementptr inbounds %struct.yppushresp_xfr, %struct.yppushresp_xfr* %14, i32 0, i32 0
%16 = load i64, i64* %15
%17 = call i32 @yppush_err_string(i64 %16)
%18 = call i32 @warnx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %13, %2
%20 = call i32 @memset(i8* @yppushproc_xfrresp_1_svc.result, i32 0, i32 1)
ret i8* @yppushproc_xfrresp_1_svc.result
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
@yppushproc_xfrresp_1_svc.result = internal global i8 0
@YPPUSH_SUCC = global i64 0
@.str = [3 x i8] c"%s\00"
define i8* @yppushproc_xfrresp_1_svc(i8* nocapture %0, %struct.svc_req* nocapture readnone %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = load i64, i64* @YPPUSH_SUCC
%6 = icmp eq i64 %4, %5
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 @yppush_err_string(i64 %4)
%9 = tail call i32 @warnx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %2
%11 = tail call i32 @memset(i8* @yppushproc_xfrresp_1_svc.result, i32 0, i32 1)
ret i8* @yppushproc_xfrresp_1_svc.result
}