#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 {
  scalar_t__ modtime;
  int /*<<< orphan*/ actime;
};
struct stat {
  scalar_t__ st_mtime;
  int /*<<< orphan*/ st_atime;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stat(char *, struct stat *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ utime(char *, struct utimbuf *);
int main(int argc, char **argv) {
  char ar_file_name[256], obj_file_name[256];
  struct stat ar_file_stat, obj_file_stat;
  struct utimbuf obj_file_utb;
  if (argc != 3) {
    printf("\nUsage: adj_time archive_file obj_file\n");
  } else {
    strcpy(ar_file_name, argv[1]);
    strcpy(obj_file_name, argv[2]);
    stat(ar_file_name, &ar_file_stat);
    stat(obj_file_name, &obj_file_stat);
    if (ar_file_stat.st_mtime == obj_file_stat.st_mtime) {
      obj_file_utb.actime = obj_file_stat.st_atime;
      obj_file_utb.modtime = obj_file_stat.st_mtime + 1;
      utime(obj_file_name, &obj_file_utb);
    }
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1184 <main+0x34>
lea    0xe86(%rip),%rdi
call   1050 <printf@plt>
jmp    121c <main+0xcc>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x110(%rbp),%rdi
lea    -0x220(%rbp),%rsi
call   1060 <stat@plt>
lea    -0x210(%rbp),%rdi
lea    -0x230(%rbp),%rsi
call   1060 <stat@plt>
mov    -0x220(%rbp),%rax
cmp    -0x230(%rbp),%rax
jne    1217 <main+0xc7>
mov    -0x228(%rbp),%eax
mov    %eax,-0x238(%rbp)
mov    -0x230(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x240(%rbp)
lea    -0x210(%rbp),%rdi
lea    -0x240(%rbp),%rsi
call   1030 <utime@plt>
jmp    121c <main+0xcc>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x238,%rsp
cmp    $0x3,%edi
jne    11d1 <main+0x81>
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0x130(%rsp),%r14
mov    %r14,%rdi
call   1040 <strcpy@plt>
mov    0x10(%rbx),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
lea    0x20(%rsp),%rsi
mov    %r14,%rdi
call   1060 <stat@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <stat@plt>
mov    0x20(%rsp),%rax
cmp    0x10(%rsp),%rax
jne    11ca <main+0x7a>
mov    0x18(%rsp),%ecx
mov    %ecx,0x8(%rsp)
add    $0x1,%rax
mov    %rax,(%rsp)
lea    0x30(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <utime@plt>
xor    %edi,%edi
call   1070 <exit@plt>
lea    0xe28(%rip),%rdi
call   1050 <puts@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i64, i32 }
%struct.utimbuf = type { i64, i32 }
@.str = [40 x i8] c"\0AUsage: adj_time archive_file obj_file\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = alloca %struct.stat
%9 = alloca %struct.stat
%10 = alloca %struct.utimbuf
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 3
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %46
15: ; preds = %2
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @strcpy(i8* %16, i8* %19)
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 2
%24 = load i8*, i8** %23
%25 = call i32 @strcpy(i8* %21, i8* %24)
%26 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%27 = call i32 @stat(i8* %26, %struct.stat* %8)
%28 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%29 = call i32 @stat(i8* %28, %struct.stat* %9)
%30 = getelementptr inbounds %struct.stat, %struct.stat* %8, i32 0, i32 0
%31 = load i64, i64* %30
%32 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%33 = load i64, i64* %32
%34 = icmp eq i64 %31, %33
br i1 %34, label %35, label %45
35: ; preds = %15
%36 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 1
%37 = load i32, i32* %36
%38 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %10, i32 0, i32 1
store i32 %37, i32* %38
%39 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%40 = load i64, i64* %39
%41 = add nsw i64 %40, 1
%42 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %10, i32 0, i32 0
store i64 %41, i64* %42
%43 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%44 = call i32 @utime(i8* %43, %struct.utimbuf* %10)
br label %45
45: ; preds = %35, %15
br label %46
46: ; preds = %45, %13
%47 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.stat = type { i64, i32 }
%struct.utimbuf = type { i64, i32 }
@str = [39 x i8] c"\0AUsage: adj_time archive_file obj_file\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = alloca %struct.stat
%6 = alloca %struct.stat
%7 = alloca %struct.utimbuf
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%10 = bitcast %struct.stat* %5 to i8*
%11 = bitcast %struct.stat* %6 to i8*
%12 = bitcast %struct.utimbuf* %7 to i8*
%13 = icmp eq i32 %0, 3
br i1 %13, label %16, label %14
14: ; preds = %2
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
br label %37
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @strcpy(i8* %8, i8* %18)
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = call i32 @strcpy(i8* %9, i8* %21)
%23 = call i32 @stat(i8* %8, %struct.stat* %5)
%24 = call i32 @stat(i8* %9, %struct.stat* %6)
%25 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 0
%26 = load i64, i64* %25
%27 = getelementptr inbounds %struct.stat, %struct.stat* %6, i64 0, i32 0
%28 = load i64, i64* %27
%29 = icmp eq i64 %26, %28
br i1 %29, label %30, label %37
30: ; preds = %16
%31 = getelementptr inbounds %struct.stat, %struct.stat* %6, i64 0, i32 1
%32 = load i32, i32* %31
%33 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %7, i64 0, i32 1
store i32 %32, i32* %33
%34 = add nsw i64 %26, 1
%35 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %7, i64 0, i32 0
store i64 %34, i64* %35
%36 = call i32 @utime(i8* %9, %struct.utimbuf* %7)
br label %37
37: ; preds = %16, %30, %14
%38 = call i32 @exit(i32 0)
unreachable
}