#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 */
typedef int /*<<< orphan*/ tv;
struct timeval {
  void *tv_sec;
};
typedef void *int64_t;

/* Variables and functions */
int /*<<< orphan*/ memset(struct timeval *, int /*<<< orphan*/, int);
int /*<<< orphan*/ utimes(char const *, struct timeval *);
void file_set_mtime(const char *zFilename, int64_t newMTime) {
  struct timeval tv[2];
  memset(tv, 0, sizeof(tv[0]) * 2);
  tv[0].tv_sec = newMTime;
  tv[1].tv_sec = newMTime;
  utimes(zFilename, tv);
}


x86 assembly (clang, -O0):
<file_set_mtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <utimes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_set_mtime>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsp,%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
mov    %rbx,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <utimes@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.timeval = type { i8* }
define void @file_set_mtime(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [2 x %struct.timeval]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [2 x %struct.timeval], [2 x %struct.timeval]* %5, i64 0, i64 0
%7 = call i32 @memset(%struct.timeval* %6, i32 0, i32 16)
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [2 x %struct.timeval], [2 x %struct.timeval]* %5, i64 0, i64 0
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 0
store i8* %8, i8** %10
%11 = load i8*, i8** %4
%12 = getelementptr inbounds [2 x %struct.timeval], [2 x %struct.timeval]* %5, i64 0, i64 1
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
store i8* %11, i8** %13
%14 = load i8*, i8** %3
%15 = getelementptr inbounds [2 x %struct.timeval], [2 x %struct.timeval]* %5, i64 0, i64 0
%16 = call i32 @utimes(i8* %14, %struct.timeval* %15)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i8* }
define void @file_set_mtime(i8* nocapture %0, i8* %1) {
%3 = alloca [2 x %struct.timeval]
%4 = bitcast [2 x %struct.timeval]* %3 to i8*
%5 = getelementptr inbounds [2 x %struct.timeval], [2 x %struct.timeval]* %3, i64 0, i64 0
%6 = call i32 @memset(%struct.timeval* %5, i32 0, i32 16)
%7 = getelementptr inbounds [2 x %struct.timeval], [2 x %struct.timeval]* %3, i64 0, i64 0, i32 0
store i8* %1, i8** %7
%8 = getelementptr inbounds [2 x %struct.timeval], [2 x %struct.timeval]* %3, i64 0, i64 1, i32 0
store i8* %1, i8** %8
%9 = call i32 @utimes(i8* %0, %struct.timeval* %5)
ret void
}