#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 utimbuf {
  int /*<<< orphan*/ modtime;
  int /*<<< orphan*/ actime;
};
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int PATH_MAX;
int /*<<< orphan*/ eacces(int);
scalar_t__ get_fn(int, int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ status_return(int, int /*<<< orphan*/);
int /*<<< orphan*/ utime(char *, struct utimbuf *);
int /*<<< orphan*/ xdr_long(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void ltspfs_utime(int sockfd, XDR *in) {
  char path[PATH_MAX];
  struct utimbuf timbuf;
  if (!xdr_long(in, &timbuf.actime)) {
    eacces(sockfd);
    return;
  }
  if (!xdr_long(in, &timbuf.modtime)) {
    eacces(sockfd);
    return;
  }
  if (get_fn(sockfd, in, path)) {
    eacces(sockfd);
    return;
  }
  status_return(sockfd, utime(path, &timbuf));
}


x86 assembly (clang, -O0):
<ltspfs_utime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
add    $0x4,%rsi
call   1060 <xdr_long@plt>
cmp    $0x0,%eax
jne    11b9 <ltspfs_utime+0x69>
mov    -0x4(%rbp),%edi
call   1050 <eacces@plt>
movl   $0x1,-0x2c(%rbp)
jmp    1235 <ltspfs_utime+0xe5>
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1060 <xdr_long@plt>
cmp    $0x0,%eax
jne    11e3 <ltspfs_utime+0x93>
mov    -0x4(%rbp),%edi
call   1050 <eacces@plt>
movl   $0x1,-0x2c(%rbp)
jmp    1235 <ltspfs_utime+0xe5>
mov    -0x38(%rbp),%rdx
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <get_fn@plt>
cmp    $0x0,%rax
je     1211 <ltspfs_utime+0xc1>
mov    -0x4(%rbp),%edi
call   1050 <eacces@plt>
movl   $0x1,-0x2c(%rbp)
jmp    1235 <ltspfs_utime+0xe5>
mov    -0x38(%rbp),%rdi
mov    -0x4(%rbp),%eax
mov    %eax,-0x3c(%rbp)
lea    -0x28(%rbp),%rsi
call   1030 <utime@plt>
mov    -0x3c(%rbp),%edi
mov    %eax,%esi
call   1040 <status_return@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltspfs_utime>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %edi,%r14d
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    -0x1c(%rbp),%rsi
mov    %r15,%rdi
call   1060 <xdr_long@plt>
test   %eax,%eax
je     11ad <ltspfs_utime+0x5d>
lea    -0x20(%rbp),%rsi
mov    %r15,%rdi
call   1060 <xdr_long@plt>
test   %eax,%eax
je     11ad <ltspfs_utime+0x5d>
mov    %r14d,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1070 <get_fn@plt>
test   %rax,%rax
je     11c0 <ltspfs_utime+0x70>
mov    %r14d,%edi
call   1050 <eacces@plt>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    -0x20(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <utime@plt>
mov    %r14d,%edi
mov    %eax,%esi
call   1040 <status_return@plt>
jmp    11b5 <ltspfs_utime+0x65>

LLVM IR (-O0):
%struct.utimbuf = type { i32, i32 }
@PATH_MAX = global i32 0
define void @ltspfs_utime(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca %struct.utimbuf
%8 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%9 = load i32, i32* @PATH_MAX
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %5
%12 = alloca i8, i64 %10
store i64 %10, i64* %6
%13 = load i32*, i32** %4
%14 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %7, i32 0, i32 1
%15 = call i32 @xdr_long(i32* %13, i32* %14)
%16 = icmp ne i32 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %2
%18 = load i32, i32* %3
%19 = call i32 @eacces(i32 %18)
store i32 1, i32* %8
br label %40
20: ; preds = %2
%21 = load i32*, i32** %4
%22 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %7, i32 0, i32 0
%23 = call i32 @xdr_long(i32* %21, i32* %22)
%24 = icmp ne i32 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %20
%26 = load i32, i32* %3
%27 = call i32 @eacces(i32 %26)
store i32 1, i32* %8
br label %40
28: ; preds = %20
%29 = load i32, i32* %3
%30 = load i32*, i32** %4
%31 = call i64 @get_fn(i32 %29, i32* %30, i8* %12)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %28
%34 = load i32, i32* %3
%35 = call i32 @eacces(i32 %34)
store i32 1, i32* %8
br label %40
36: ; preds = %28
%37 = load i32, i32* %3
%38 = call i32 @utime(i8* %12, %struct.utimbuf* %7)
%39 = call i32 @status_return(i32 %37, i32 %38)
store i32 0, i32* %8
br label %40
40: ; preds = %36, %33, %25, %17
%41 = load i8*, i8** %5
%42 = load i32, i32* %8
switch i32 %42, label %44 [
i32 0, label %43
i32 1, label %43
]
43: ; preds = %40, %40
ret void
44: ; preds = %40
unreachable
}

LLVM IR (-O2):
%struct.utimbuf = type { i32, i32 }
@PATH_MAX = global i32 0
define void @ltspfs_utime(i32 %0, i32* %1) {
%3 = alloca %struct.utimbuf
%4 = load i32, i32* @PATH_MAX
%5 = zext i32 %4 to i64
%6 = alloca i8, i64 %5
%7 = bitcast %struct.utimbuf* %3 to i8*
%8 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %3, i64 0, i32 1
%9 = call i32 @xdr_long(i32* %1, i32* %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @eacces(i32 %0)
br label %27
13: ; preds = %2
%14 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %3, i64 0, i32 0
%15 = call i32 @xdr_long(i32* %1, i32* %14)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 @eacces(i32 %0)
br label %27
19: ; preds = %13
%20 = call i64 @get_fn(i32 %0, i32* %1, i8* %6)
%21 = icmp eq i64 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = call i32 @eacces(i32 %0)
br label %27
24: ; preds = %19
%25 = call i32 @utime(i8* %6, %struct.utimbuf* %3)
%26 = call i32 @status_return(i32 %0, i32 %25)
br label %27
27: ; preds = %24, %22, %17, %11
ret void
}