#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 modtime;
  scalar_t__ actime;
};

/* Variables and functions */
int /*<<< orphan*/ err_ret(char *, char *);
int /*<<< orphan*/ err_sys(char *);
int /*<<< orphan*/ puts(char *);
int utime(char *, struct utimbuf *);
int main(int argc, char *argv[]) {
  if (argc < 2)
    err_ret("usage: %s <filename>", argv[0]);
  struct utimbuf utb;
  utb.actime = 0;
  utb.modtime = 3600;
  if (utime(argv[1], &utb) == -1)
    err_sys("utime error");
  else
    puts("utime success");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1173 <main+0x33>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe92(%rip),%rdi
call   1060 <err_ret@plt>
movq   $0x0,-0x18(%rbp)
movl   $0xe10,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <utime@plt>
cmp    $0xffffffff,%eax
jne    11ad <main+0x6d>
lea    0xe72(%rip),%rdi
call   1050 <err_sys@plt>
jmp    11b9 <main+0x79>
lea    0xe6d(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     115c <main+0x1c>
mov    (%rbx),%rsi
lea    0xea9(%rip),%rdi
call   1060 <err_ret@plt>
movq   $0x0,0x8(%rsp)
movl   $0xe10,(%rsp)
mov    0x8(%rbx),%rdi
mov    %rsp,%rsi
call   1030 <utime@plt>
cmp    $0xffffffff,%eax
je     118b <main+0x4b>
lea    0xe9d(%rip),%rdi
call   1040 <puts@plt>
jmp    1197 <main+0x57>
lea    0xe83(%rip),%rdi
call   1050 <err_sys@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.utimbuf = type { i32, i64 }
@.str = [21 x i8] c"usage: %s <filename>\00"
@.str.1 = [12 x i8] c"utime error\00"
@.str.2 = [14 x i8] c"utime success\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.utimbuf
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @err_ret(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %9, %2
%15 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %6, i32 0, i32 1
store i64 0, i64* %15
%16 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %6, i32 0, i32 0
store i32 3600, i32* %16
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @utime(i8* %19, %struct.utimbuf* %6)
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %24
22: ; preds = %14
%23 = call i32 @err_sys(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %26
24: ; preds = %14
%25 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
ret i32 0
}

LLVM IR (-O2):
%struct.utimbuf = type { i32, i64 }
@.str = [21 x i8] c"usage: %s <filename>\00"
@.str.1 = [12 x i8] c"utime error\00"
@.str.2 = [14 x i8] c"utime success\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.utimbuf
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i8*, i8** %1
%7 = tail call i32 @err_ret(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %5, %2
%9 = bitcast %struct.utimbuf* %3 to i8*
%10 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %3, i64 0, i32 1
store i64 0, i64* %10
%11 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %3, i64 0, i32 0
store i32 3600, i32* %11
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @utime(i8* %13, %struct.utimbuf* %3)
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %18
16: ; preds = %8
%17 = tail call i32 @err_sys(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %20
18: ; preds = %8
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
ret i32 0
}