#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*/ off_t;

/* Variables and functions */
int Compare_2_files(char *, char *, char *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int main(int argc, char **argv) {
  int ret, i, with_ctime = 1;
  char adr1[4096], adr2[4096], adrc[4096];
  if (sizeof(off_t) < 8) {
    fprintf(stderr,
            "%s : FATAL : Compile time misconfiguration. sizeof(off_t) too "
            "small.\n\n",
            argv[0]);
    exit(4);
  }
  if (argc < 4) {
    fprintf(stderr, "usage: %s  path  prefix1  prefix2\n", argv[0]);
    exit(2);
  }
  for (i = 4; i < argc; i++) {
    if (strcmp(argv[i], "-no_ctime") == 0)
      with_ctime = 0;
    else {
      fprintf(stderr, "%s : Option not recognized: '%s'\n", argv[0], argv[i]);
      exit(2);
    }
  }
  if (strncmp(argv[1], argv[2], strlen(argv[2])) != 0) {
    fprintf(stderr, "%s: path '%s' does not match prefix1 '%s'\n", argv[0],
            argv[1], argv[2]);
    exit(2);
  }
  strcpy(adr1, argv[1]);
  strcpy(adrc, argv[1] + strlen(argv[2]));
  sprintf(adr2, "%s%s%s", argv[3], (adrc[0] == '/' || adrc[0] == 0 ? "" : "/"),
          adrc);
  ret = Compare_2_files(adr1, adr2, adrc, (with_ctime << 1));
  exit(ret <= 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3020,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xea9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x4,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x4,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [71 x i8] c"%s : FATAL : Compile time misconfiguration. sizeof(off_t) too small.\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [4096 x i8]
%10 = alloca [4096 x i8]
%11 = alloca [4096 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %8
%12 = load i32, i32* @stderr
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = call i32 @exit(i32 4)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [71 x i8] c"%s : FATAL : Compile time misconfiguration. sizeof(off_t) too small.\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = tail call i32 @exit(i32 4)
unreachable
}