#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 time_t;
struct utimbuf {
  int actime;
  int modtime;
};
struct stat {
  int st_mtime;
  int st_atime;
};

/* Variables and functions */
int L_tmpnam;
int /*<<< orphan*/ close(int);
int creat(char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int, int, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ remove(char *);
scalar_t__ stat(char *, struct stat *);
int time(int /*<<< orphan*/ *);
scalar_t__ tmpnam(char *);
scalar_t__ utime(char *, struct utimbuf *);
int main(int argc, char *argv[]) {
  char file[L_tmpnam];
  struct utimbuf ut;
  struct stat st;
  struct stat stnow;
  time_t now1, now2;
  int fd;
  if (tmpnam(file) == 0) {
    perror("tmpnam");
    return 1;
  }
  fd = creat(file, 0666);
  if (fd < 0) {
    perror("creat");
    return 1;
  }
  close(fd);
  ut.actime = 500000000;
  ut.modtime = 500000001;
  if (utime(file, &ut)) {
    perror("utime");
    remove(file);
    return 1;
  }
  if (stat(file, &st)) {
    perror("stat");
    remove(file);
    return 1;
  }
  now1 = time(NULL);
  if (now1 == (time_t)-1) {
    perror("time");
    remove(file);
    return 1;
  }
  if (utime(file, NULL)) {
    perror("utime NULL");
    remove(file);
    return 1;
  }
  now2 = time(NULL);
  if (now2 == (time_t)-1) {
    perror("time");
    remove(file);
    return 1;
  }
  if (stat(file, &stnow)) {
    perror("stat");
    remove(file);
    return 1;
  }
  remove(file);
  if (st.st_mtime != ut.modtime) {
    printf("modtime %ld != %ld\n", st.st_mtime, ut.modtime);
    return 1;
  }
  if (st.st_atime != ut.actime) {
    printf("actime %ld != %ld\n", st.st_atime, ut.actime);
    return 1;
  }
  if (stnow.st_mtime < now1 || stnow.st_mtime > now2) {
    printf("modtime %ld <%ld >%ld\n", stnow.st_mtime, now1, now2);
    return 1;
  }
  if (stnow.st_atime < now1 || stnow.st_atime > now2) {
    printf("actime %ld <%ld >%ld\n", stnow.st_atime, now1, now2);
    return 1;
  }
  puts("Test succeeded.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e23(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x50(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
call   10c0 <tmpnam@plt>
cmp    $0x0,%rax
jne    1210 <main+0x70>
lea    0xe08(%rip),%rdi
call   10a0 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x50(%rbp),%rdi
mov    $0x1b6,%esi
call   10b0 <creat@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jge    124a <main+0xaa>
lea    0xdd5(%rip),%rdi
call   10a0 <perror@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x44(%rbp),%edi
call   1070 <close@plt>
mov    -0x50(%rbp),%rdi
movl   $0x1dcd6500,-0x28(%rbp)
movl   $0x1dcd6501,-0x24(%rbp)
lea    -0x28(%rbp),%rsi
call   1030 <utime@plt>
cmp    $0x0,%rax
je     129f <main+0xff>
lea    0xd8f(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x50(%rbp),%rdi
call   1040 <remove@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x50(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1080 <stat@plt>
cmp    $0x0,%rax
je     12de <main+0x13e>
lea    0xd56(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x50(%rbp),%rdi
call   1040 <remove@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0xffffffff,-0x3c(%rbp)
jne    131c <main+0x17c>
lea    0xd13(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x50(%rbp),%rdi
call   1040 <remove@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <utime@plt>
cmp    $0x0,%rax
je     135b <main+0x1bb>
lea    0xcde(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x50(%rbp),%rdi
call   1040 <remove@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0xffffffff,-0x40(%rbp)
jne    1399 <main+0x1f9>
lea    0xc96(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x50(%rbp),%rdi
call   1040 <remove@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1080 <stat@plt>
cmp    $0x0,%rax
je     13d8 <main+0x238>
lea    0xc5c(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x50(%rbp),%rdi
call   1040 <remove@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x50(%rbp),%rdi
call   1040 <remove@plt>
mov    -0x30(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     1414 <main+0x274>
mov    -0x30(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xc29(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
je     1447 <main+0x2a7>
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xc0a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jl     145f <main+0x2bf>
mov    -0x38(%rbp),%eax
cmp    -0x40(%rbp),%eax
jle    1489 <main+0x2e9>
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    -0x40(%rbp),%ecx
lea    0xbdb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jl     14a1 <main+0x301>
mov    -0x34(%rbp),%eax
cmp    -0x40(%rbp),%eax
jle    14cb <main+0x32b>
mov    -0x34(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    -0x40(%rbp),%ecx
lea    0xbb0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    14e5 <main+0x345>
lea    0xba5(%rip),%rdi
call   1050 <puts@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    0x2e2c(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   10c0 <tmpnam@plt>
test   %rax,%rax
je     1307 <main+0x167>
mov    %rbx,%rdi
mov    $0x1b6,%esi
call   10b0 <creat@plt>
test   %eax,%eax
js     1310 <main+0x170>
mov    %eax,%edi
call   1070 <close@plt>
movabs $0x1dcd65011dcd6500,%rax
65 cd 1d
mov    %rax,-0x30(%rbp)
lea    -0x30(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <utime@plt>
test   %rax,%rax
jne    131e <main+0x17e>
lea    -0x28(%rbp),%rsi
mov    %rbx,%rdi
call   1080 <stat@plt>
test   %rax,%rax
jne    12f5 <main+0x155>
xor    %edi,%edi
call   1090 <time@plt>
cmp    $0xffffffff,%eax
je     12ec <main+0x14c>
mov    %eax,%r14d
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <utime@plt>
test   %rax,%rax
jne    1327 <main+0x187>
xor    %edi,%edi
call   1090 <time@plt>
cmp    $0xffffffff,%eax
je     12ec <main+0x14c>
mov    %eax,%r15d
lea    -0x20(%rbp),%rsi
mov    %rbx,%rdi
call   1080 <stat@plt>
test   %rax,%rax
jne    12f5 <main+0x155>
mov    %rbx,%rdi
call   1040 <remove@plt>
mov    -0x28(%rbp),%esi
cmp    $0x1dcd6501,%esi
jne    12c9 <main+0x129>
mov    -0x24(%rbp),%esi
cmp    $0x1dcd6500,%esi
jne    12d7 <main+0x137>
mov    -0x20(%rbp),%esi
cmp    %r14d,%esi
jl     12fe <main+0x15e>
cmp    %r15d,%esi
jg     12fe <main+0x15e>
mov    -0x1c(%rbp),%esi
cmp    %r14d,%esi
jl     133d <main+0x19d>
cmp    %r15d,%esi
jg     133d <main+0x19d>
lea    0xdba(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
jmp    1356 <main+0x1b6>
lea    0xd53(%rip),%rdi
mov    $0x1dcd6501,%edx
jmp    12e3 <main+0x143>
lea    0xd59(%rip),%rdi
mov    $0x1dcd6500,%edx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1351 <main+0x1b1>
lea    0xd1b(%rip),%rdi
jmp    132e <main+0x18e>
lea    0xd17(%rip),%rdi
jmp    132e <main+0x18e>
lea    0xd45(%rip),%rdi
jmp    1344 <main+0x1a4>
lea    0xcf2(%rip),%rdi
jmp    1317 <main+0x177>
lea    0xcf0(%rip),%rdi
call   10a0 <perror@plt>
jmp    1351 <main+0x1b1>
lea    0xce8(%rip),%rdi
jmp    132e <main+0x18e>
lea    0xcea(%rip),%rdi
call   10a0 <perror@plt>
mov    %rbx,%rdi
call   1040 <remove@plt>
jmp    1351 <main+0x1b1>
lea    0xd1d(%rip),%rdi
mov    %r14d,%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%eax
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.utimbuf = type { i32, i32 }
%struct.stat = type { i32, i32 }
@L_tmpnam = global i32 0
@.str = [7 x i8] c"tmpnam\00"
@.str.1 = [6 x i8] c"creat\00"
@.str.2 = [6 x i8] c"utime\00"
@.str.3 = [5 x i8] c"stat\00"
@.str.4 = [5 x i8] c"time\00"
@.str.5 = [11 x i8] c"utime NULL\00"
@.str.6 = [20 x i8] c"modtime %ld != %ld\0A\00"
@.str.7 = [19 x i8] c"actime %ld != %ld\0A\00"
@.str.8 = [23 x i8] c"modtime %ld <%ld >%ld\0A\00"
@.str.9 = [22 x i8] c"actime %ld <%ld >%ld\0A\00"
@.str.10 = [16 x i8] c"Test succeeded.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca %struct.utimbuf
%9 = alloca %struct.stat
%10 = alloca %struct.stat
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* @L_tmpnam
%16 = zext i32 %15 to i64
%17 = call i8* @llvm.stacksave()
store i8* %17, i8** %6
%18 = alloca i8, i64 %16
store i64 %16, i64* %7
%19 = call i64 @tmpnam(i8* %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %2
%22 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
23: ; preds = %2
%24 = call i32 @creat(i8* %18, i32 438)
store i32 %24, i32* %13
%25 = load i32, i32* %13
%26 = icmp slt i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
29: ; preds = %23
%30 = load i32, i32* %13
%31 = call i32 @close(i32 %30)
%32 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %8, i32 0, i32 0
store i32 500000000, i32* %32
%33 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %8, i32 0, i32 1
store i32 500000001, i32* %33
%34 = call i64 @utime(i8* %18, %struct.utimbuf* %8)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %29
%37 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%38 = call i32 @remove(i8* %18)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
39: ; preds = %29
%40 = call i64 @stat(i8* %18, %struct.stat* %9)
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %39
%43 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%44 = call i32 @remove(i8* %18)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
45: ; preds = %39
%46 = call i32 @time(i32* null)
store i32 %46, i32* %11
%47 = load i32, i32* %11
%48 = icmp eq i32 %47, -1
br i1 %48, label %49, label %52
49: ; preds = %45
%50 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%51 = call i32 @remove(i8* %18)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
52: ; preds = %45
%53 = call i64 @utime(i8* %18, %struct.utimbuf* null)
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %52
%56 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%57 = call i32 @remove(i8* %18)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
58: ; preds = %52
%59 = call i32 @time(i32* null)
store i32 %59, i32* %12
%60 = load i32, i32* %12
%61 = icmp eq i32 %60, -1
br i1 %61, label %62, label %65
62: ; preds = %58
%63 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%64 = call i32 @remove(i8* %18)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
65: ; preds = %58
%66 = call i64 @stat(i8* %18, %struct.stat* %10)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %71
68: ; preds = %65
%69 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%70 = call i32 @remove(i8* %18)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
71: ; preds = %65
%72 = call i32 @remove(i8* %18)
%73 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%74 = load i32, i32* %73
%75 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %8, i32 0, i32 1
%76 = load i32, i32* %75
%77 = icmp ne i32 %74, %76
br i1 %77, label %78, label %84
78: ; preds = %71
%79 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%80 = load i32, i32* %79
%81 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %8, i32 0, i32 1
%82 = load i32, i32* %81
%83 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %80, i32 %82)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
84: ; preds = %71
%85 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 1
%86 = load i32, i32* %85
%87 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %8, i32 0, i32 0
%88 = load i32, i32* %87
%89 = icmp ne i32 %86, %88
br i1 %89, label %90, label %96
90: ; preds = %84
%91 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 1
%92 = load i32, i32* %91
%93 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %8, i32 0, i32 0
%94 = load i32, i32* %93
%95 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %92, i32 %94)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
96: ; preds = %84
%97 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%98 = load i32, i32* %97
%99 = load i32, i32* %11
%100 = icmp slt i32 %98, %99
br i1 %100, label %106, label %101
101: ; preds = %96
%102 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%103 = load i32, i32* %102
%104 = load i32, i32* %12
%105 = icmp sgt i32 %103, %104
br i1 %105, label %106, label %112
106: ; preds = %101, %96
%107 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%108 = load i32, i32* %107
%109 = load i32, i32* %11
%110 = load i32, i32* %12
%111 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %108, i32 %109, i32 %110)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
112: ; preds = %101
%113 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%114 = load i32, i32* %113
%115 = load i32, i32* %11
%116 = icmp slt i32 %114, %115
br i1 %116, label %122, label %117
117: ; preds = %112
%118 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%119 = load i32, i32* %118
%120 = load i32, i32* %12
%121 = icmp sgt i32 %119, %120
br i1 %121, label %122, label %128
122: ; preds = %117, %112
%123 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%124 = load i32, i32* %123
%125 = load i32, i32* %11
%126 = load i32, i32* %12
%127 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i32 %124, i32 %125, i32 %126)
store i32 1, i32* %3
store i32 1, i32* %14
br label %130
128: ; preds = %117
%129 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %3
store i32 1, i32* %14
br label %130
130: ; preds = %128, %122, %106, %90, %78, %68, %62, %55, %49, %42, %36, %27, %21
%131 = load i8*, i8** %6
%132 = load i32, i32* %3
ret i32 %132
}

LLVM IR (-O2):
%struct.utimbuf = type { i32, i32 }
%struct.stat = type { i32, i32 }
@L_tmpnam = global i32 0
@.str = [7 x i8] c"tmpnam\00"
@.str.1 = [6 x i8] c"creat\00"
@.str.2 = [6 x i8] c"utime\00"
@.str.3 = [5 x i8] c"stat\00"
@.str.4 = [5 x i8] c"time\00"
@.str.5 = [11 x i8] c"utime NULL\00"
@.str.6 = [20 x i8] c"modtime %ld != %ld\0A\00"
@.str.7 = [19 x i8] c"actime %ld != %ld\0A\00"
@.str.8 = [23 x i8] c"modtime %ld <%ld >%ld\0A\00"
@.str.9 = [22 x i8] c"actime %ld <%ld >%ld\0A\00"
@.str.10 = [16 x i8] c"Test succeeded.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.utimbuf
%4 = alloca %struct.stat
%5 = alloca %struct.stat
%6 = load i32, i32* @L_tmpnam
%7 = zext i32 %6 to i64
%8 = alloca i8, i64 %7
%9 = bitcast %struct.utimbuf* %3 to i8*
%10 = bitcast %struct.stat* %4 to i8*
%11 = bitcast %struct.stat* %5 to i8*
%12 = call i64 @tmpnam(i8* %8)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %91
16: ; preds = %2
%17 = call i32 @creat(i8* %8, i32 438)
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %91
21: ; preds = %16
%22 = call i32 @close(i32 %17)
%23 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %3, i64 0, i32 0
store i32 500000000, i32* %23
%24 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %3, i64 0, i32 1
store i32 500000001, i32* %24
%25 = call i64 @utime(i8* %8, %struct.utimbuf* %3)
%26 = icmp eq i64 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %21
%28 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%29 = call i32 @remove(i8* %8)
br label %91
30: ; preds = %21
%31 = call i64 @stat(i8* %8, %struct.stat* %4)
%32 = icmp eq i64 %31, 0
br i1 %32, label %36, label %33
33: ; preds = %30
%34 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 @remove(i8* %8)
br label %91
36: ; preds = %30
%37 = call i32 @time(i32* null)
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %42
39: ; preds = %36
%40 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%41 = call i32 @remove(i8* %8)
br label %91
42: ; preds = %36
%43 = call i64 @utime(i8* %8, %struct.utimbuf* null)
%44 = icmp eq i64 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %42
%46 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%47 = call i32 @remove(i8* %8)
br label %91
48: ; preds = %42
%49 = call i32 @time(i32* null)
%50 = icmp eq i32 %49, -1
br i1 %50, label %51, label %54
51: ; preds = %48
%52 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%53 = call i32 @remove(i8* %8)
br label %91
54: ; preds = %48
%55 = call i64 @stat(i8* %8, %struct.stat* %5)
%56 = icmp eq i64 %55, 0
br i1 %56, label %60, label %57
57: ; preds = %54
%58 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%59 = call i32 @remove(i8* %8)
br label %91
60: ; preds = %54
%61 = call i32 @remove(i8* %8)
%62 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%63 = load i32, i32* %62
%64 = icmp eq i32 %63, 500000001
br i1 %64, label %67, label %65
65: ; preds = %60
%66 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %63, i32 500000001)
br label %91
67: ; preds = %60
%68 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 1
%69 = load i32, i32* %68
%70 = icmp eq i32 %69, 500000000
br i1 %70, label %73, label %71
71: ; preds = %67
%72 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %69, i32 500000000)
br label %91
73: ; preds = %67
%74 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 0
%75 = load i32, i32* %74
%76 = icmp slt i32 %75, %37
%77 = icmp sgt i32 %75, %49
%78 = select i1 %76, i1 true, i1 %77
br i1 %78, label %79, label %81
79: ; preds = %73
%80 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %75, i32 %37, i32 %49)
br label %91
81: ; preds = %73
%82 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 1
%83 = load i32, i32* %82
%84 = icmp slt i32 %83, %37
%85 = icmp sgt i32 %83, %49
%86 = select i1 %84, i1 true, i1 %85
br i1 %86, label %87, label %89
87: ; preds = %81
%88 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i32 %83, i32 %37, i32 %49)
br label %91
89: ; preds = %81
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
br label %91
91: ; preds = %89, %87, %79, %71, %65, %57, %51, %45, %39, %33, %27, %19, %14
%92 = phi i32 [ 1, %14 ], [ 1, %19 ], [ 1, %27 ], [ 1, %33 ], [ 1, %39 ], [ 1, %45 ], [ 1, %51 ], [ 1, %57 ], [ 1, %65 ], [ 1, %71 ], [ 1, %79 ], [ 1, %87 ], [ 0, %89 ]
ret i32 %92
}