#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 member_0;
  int member_1;
};

/* Variables and functions */
int /*<<< orphan*/ create_file(char *, char *, int);
int /*<<< orphan*/ mkdir(char *, int);
int /*<<< orphan*/ symlink(char *, char *);
int /*<<< orphan*/ utime(char *, struct utimbuf *);
void setup() {
  struct utimbuf t = {1200000000, 1200000000};
  mkdir("folder", 0777);
  create_file("folder/file", "abcdef", 0777);
  symlink("file", "folder/file-link");
  utime("folder/file", &t);
  utime("folder", &t);
}


x86 assembly (clang, -O0):
<setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x1ff,%esi
call   1040 <mkdir@plt>
lea    0xea4(%rip),%rdi
lea    0xea9(%rip),%rsi
mov    $0x1ff,%edx
call   1060 <create_file@plt>
lea    0xe93(%rip),%rdi
lea    0xe98(%rip),%rsi
call   1050 <symlink@plt>
lea    0xe79(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <utime@plt>
lea    0xe62(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <utime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movabs $0x47868c0047868c00,%rax
8c 86 47
mov    %rax,0x8(%rsp)
lea    0xea1(%rip),%r14
mov    %r14,%rdi
mov    $0x1ff,%esi
call   1040 <mkdir@plt>
lea    0xe94(%rip),%r15
lea    0xe99(%rip),%rsi
mov    %r15,%rdi
mov    $0x1ff,%edx
call   1060 <create_file@plt>
lea    0xe80(%rip),%rdi
lea    0xe85(%rip),%rsi
call   1050 <symlink@plt>
lea    0x8(%rsp),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <utime@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <utime@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.utimbuf = type { i32, i32 }
@__const.setup.t = %struct.utimbuf { i32 1200000000, i32 1200000000 }
@.str = [7 x i8] c"folder\00"
@.str.1 = [12 x i8] c"folder/file\00"
@.str.2 = [7 x i8] c"abcdef\00"
@.str.3 = [5 x i8] c"file\00"
@.str.4 = [17 x i8] c"folder/file-link\00"
define void @setup() {
%1 = alloca %struct.utimbuf
%2 = bitcast %struct.utimbuf* %1 to i8*
%3 = call i32 @mkdir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 511)
%4 = call i32 @create_file(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 511)
%5 = call i32 @symlink(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @utime(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), %struct.utimbuf* %1)
%7 = call i32 @utime(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.utimbuf* %1)
ret void
}

LLVM IR (-O2):
%struct.utimbuf = type { i32, i32 }
@.str = [7 x i8] c"folder\00"
@.str.1 = [12 x i8] c"folder/file\00"
@.str.2 = [7 x i8] c"abcdef\00"
@.str.3 = [5 x i8] c"file\00"
@.str.4 = [17 x i8] c"folder/file-link\00"
define void @setup() {
%1 = alloca i64
%2 = bitcast i64* %1 to %struct.utimbuf*
%3 = bitcast i64* %1 to i8*
store i64 5153960756400000000, i64* %1
%4 = tail call i32 @mkdir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 511)
%5 = tail call i32 @create_file(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 511)
%6 = tail call i32 @symlink(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @utime(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), %struct.utimbuf* %2)
%8 = call i32 @utime(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.utimbuf* %2)
ret void
}