#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 stat {
  scalar_t__ st_dev;
  scalar_t__ st_ino;
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ S_ISLNK(int /*<<< orphan*/);
int errno;
int fprintf(int /*<<< orphan*/, char *, ...);
int lstat(char *, struct stat *);
int /*<<< orphan*/ perror(char *);
int stat(char *, struct stat *);
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  int error = 0;
  int fprintf_return = 0;
  int stat_return = 0;
  int lstat_return = 0;
  struct stat stat_file1;
  struct stat stat_file2;
  struct stat lstat_file1;
  struct stat lstat_file2;
  if (argc != 3) {
    fprintf(stdout,
            "Usage: %s <fichier 1 a comparer> <fichier 2 a comparer> \n",
            argv[0]);
    if (fprintf_return < 0) {
      perror("Error fprintf");
      return fprintf_return;
    }
    return -1;
  }
  lstat_return = lstat(argv[1], &lstat_file1);
  if (lstat_return == -1) {
    error = errno;
    perror("Error lstat");
    return error;
  }
  lstat_return = lstat(argv[2], &lstat_file2);
  if (lstat_return == -1) {
    error = errno;
    perror("Error lstat");
    return error;
  }
  if ((lstat_file1.st_dev == lstat_file2.st_dev) &&
      (lstat_file1.st_ino == lstat_file2.st_ino)) {
    fprintf_return = fprintf(stdout, "C'est le meme fichier ! \n");
    if (fprintf_return < 0) {
      perror("Error fprintf");
      return fprintf_return;
    }
    if (strcmp(argv[1], argv[2]) != 0) {
      fprintf_return = fprintf(stdout, "C'est un lien physique ! \n");
      if (fprintf_return < 0) {
        perror("Error fprintf");
        return fprintf_return;
      }
    }
    return EXIT_SUCCESS;
  } else if (S_ISLNK(lstat_file1.st_mode) && ~(S_ISLNK(lstat_file2.st_mode))) {
    stat_return = stat(argv[1], &stat_file1);
    if (stat_return == -1) {
      error = errno;
      perror("Error stat");
      return error;
    }
    if ((stat_file1.st_dev == lstat_file2.st_dev) &&
        (stat_file1.st_ino == lstat_file2.st_ino)) {
      fprintf_return = fprintf(stdout, "%s est un lien symbolique vers %s ! \n",
                               argv[1], argv[2]);
      if (fprintf_return < 0) {
        perror("Error fprintf");
        return fprintf_return;
      }
    }
    return EXIT_SUCCESS;
  } else if (S_ISLNK(lstat_file2.st_mode) && ~(S_ISLNK(lstat_file2.st_mode))) {
    stat_return = stat(argv[2], &stat_file2);
    if (stat_return == -1) {
      error = errno;
      perror("Error stat");
      return error;
    }
    if ((lstat_file1.st_dev == stat_file2.st_dev) &&
        (lstat_file1.st_ino == stat_file2.st_ino)) {
      fprintf_return = fprintf(stdout, "%s est un lien symbolique vers %s ! \n",
                               argv[2], argv[1]);
      if (fprintf_return < 0) {
        perror("Error fprintf");
        return fprintf_return;
      }
    }
    return EXIT_SUCCESS;
  } else if (S_ISLNK(lstat_file1.st_mode) && S_ISLNK(lstat_file2.st_mode)) {
    if ((stat_file1.st_dev == stat_file2.st_dev) &&
        (stat_file1.st_ino == stat_file2.st_ino)) {
      fprintf_return = fprintf(
          stdout, "Ce sont des liens symboliques sur le meme fichier ! \n");
      if (fprintf_return < 0) {
        perror("Error fpintf");
        return fprintf_return;
      }
    }
    return EXIT_SUCCESS;
  }
  fprintf_return = fprintf(stdout, "Ce n'est pas le meme fichier ! \n");
  if (fprintf_return < 0) {
    perror("Error fpintf");
    return fprintf_return;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11ea <main+0x8a>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe4a(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
cmpl   $0x0,-0x18(%rbp)
jge    11de <main+0x7e>
lea    0xe6c(%rip),%rdi
call   1080 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
movl   $0xffffffff,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x68(%rbp),%rsi
call   1040 <lstat@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    122b <main+0xcb>
mov    0x2dd1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xe2d(%rip),%rdi
call   1080 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    -0x80(%rbp),%rsi
call   1040 <lstat@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    126c <main+0x10c>
mov    0x2d90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xdec(%rip),%rdi
call   1080 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x68(%rbp),%rax
cmp    -0x80(%rbp),%rax
jne    1333 <main+0x1d3>
mov    -0x60(%rbp),%rax
cmp    -0x78(%rbp),%rax
jne    1333 <main+0x1d3>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
lea    0xdbc(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    12c3 <main+0x163>
lea    0xd87(%rip),%rdi
call   1080 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1322 <main+0x1c2>
mov    0x2cef(%rip),%rax
mov    (%rax),%edi
lea    0xd7c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    131d <main+0x1bd>
lea    0xd2d(%rip),%rdi
call   1080 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
jmp    1322 <main+0x1c2>
mov    0x2ca7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x58(%rbp),%edi
call   1030 <S_ISLNK@plt>
cmp    $0x0,%eax
je     1416 <main+0x2b6>
mov    -0x70(%rbp),%edi
call   1030 <S_ISLNK@plt>
xor    $0xffffffff,%eax
cmp    $0x0,%eax
je     1416 <main+0x2b6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x38(%rbp),%rsi
call   1070 <stat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1399 <main+0x239>
mov    0x2c63(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xd00(%rip),%rdi
call   1080 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x38(%rbp),%rax
cmp    -0x80(%rbp),%rax
jne    1405 <main+0x2a5>
mov    -0x30(%rbp),%rax
cmp    -0x78(%rbp),%rax
jne    1405 <main+0x2a5>
mov    0x2c1c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
lea    0xcbf(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1400 <main+0x2a0>
lea    0xc4a(%rip),%rdi
call   1080 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
jmp    1405 <main+0x2a5>
mov    0x2bc4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x70(%rbp),%edi
call   1030 <S_ISLNK@plt>
cmp    $0x0,%eax
je     14f9 <main+0x399>
mov    -0x70(%rbp),%edi
call   1030 <S_ISLNK@plt>
xor    $0xffffffff,%eax
cmp    $0x0,%eax
je     14f9 <main+0x399>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    -0x50(%rbp),%rsi
call   1070 <stat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    147c <main+0x31c>
mov    0x2b80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xc1d(%rip),%rdi
call   1080 <perror@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x68(%rbp),%rax
cmp    -0x50(%rbp),%rax
jne    14e8 <main+0x388>
mov    -0x60(%rbp),%rax
cmp    -0x48(%rbp),%rax
jne    14e8 <main+0x388>
mov    0x2b39(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xbdc(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    14e3 <main+0x383>
lea    0xb67(%rip),%rdi
call   1080 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
jmp    14e8 <main+0x388>
mov    0x2ae1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    -0x58(%rbp),%edi
call   1030 <S_ISLNK@plt>
cmp    $0x0,%eax
je     1588 <main+0x428>
mov    -0x70(%rbp),%edi
call   1030 <S_ISLNK@plt>
cmp    $0x0,%eax
je     1588 <main+0x428>
mov    -0x38(%rbp),%rax
cmp    -0x50(%rbp),%rax
jne    1577 <main+0x417>
mov    -0x30(%rbp),%rax
cmp    -0x48(%rbp),%rax
jne    1577 <main+0x417>
mov    0x2a9a(%rip),%rax
mov    (%rax),%edi
lea    0xb73(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1572 <main+0x412>
lea    0xb8e(%rip),%rdi
call   1080 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
jmp    1577 <main+0x417>
mov    0x2a52(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
jmp    158d <main+0x42d>
jmp    1592 <main+0x432>
jmp    1597 <main+0x437>
mov    0x2a3a(%rip),%rax
mov    (%rax),%edi
lea    0xb56(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    15d2 <main+0x472>
lea    0xb2e(%rip),%rdi
call   1080 <perror@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15de <main+0x47e>
mov    0x29f7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x50,%rsp
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    1219 <main+0xb9>
mov    0x8(%rbx),%rdi
lea    0x38(%rsp),%rsi
call   1040 <lstat@plt>
cmp    $0xffffffff,%eax
je     1361 <main+0x201>
mov    0x10(%rbx),%rdi
lea    0x20(%rsp),%rsi
call   1040 <lstat@plt>
cmp    $0xffffffff,%eax
je     1361 <main+0x201>
mov    0x38(%rsp),%r15
mov    0x20(%rsp),%rbp
cmp    %rbp,%r15
jne    123d <main+0xdd>
mov    0x40(%rsp),%rax
cmp    0x28(%rsp),%rax
jne    123d <main+0xdd>
mov    0x2e0c(%rip),%r14
mov    (%r14),%edi
lea    0xe7e(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %eax,%eax
js     130b <main+0x1ab>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1349 <main+0x1e9>
mov    (%r14),%edi
lea    0xe69(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %eax,%eax
jns    1349 <main+0x1e9>
jmp    130b <main+0x1ab>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xdd4(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0xffffffff,%ebp
jmp    1352 <main+0x1f2>
mov    0x48(%rsp),%r14d
mov    %r14d,%edi
call   1030 <S_ISLNK@plt>
mov    0x30(%rsp),%r12d
test   %eax,%eax
je     12a5 <main+0x145>
mov    %r12d,%edi
call   1030 <S_ISLNK@plt>
cmp    $0xffffffff,%eax
je     12a5 <main+0x145>
mov    0x8(%rbx),%rdi
lea    0x8(%rsp),%rsi
call   1070 <stat@plt>
cmp    $0xffffffff,%eax
je     1378 <main+0x218>
cmp    %rbp,0x8(%rsp)
jne    1349 <main+0x1e9>
mov    0x10(%rsp),%rax
cmp    0x28(%rsp),%rax
jne    1349 <main+0x1e9>
mov    0x2d3f(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
mov    0x10(%rbx),%rcx
jmp    12f9 <main+0x199>
mov    %r12d,%edi
call   1030 <S_ISLNK@plt>
test   %eax,%eax
je     1316 <main+0x1b6>
mov    %r12d,%edi
call   1030 <S_ISLNK@plt>
cmp    $0xffffffff,%eax
je     1316 <main+0x1b6>
mov    0x10(%rbx),%rdi
lea    0x8(%rsp),%rsi
call   1070 <stat@plt>
cmp    $0xffffffff,%eax
je     1378 <main+0x218>
cmp    0x8(%rsp),%r15
jne    1349 <main+0x1e9>
mov    0x40(%rsp),%rax
cmp    0x10(%rsp),%rax
jne    1349 <main+0x1e9>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rcx
mov    0x10(%rbx),%rdx
lea    0xd94(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %eax,%eax
jns    1349 <main+0x1e9>
mov    %eax,%ebp
lea    0xd26(%rip),%rdi
jmp    1371 <main+0x211>
mov    %r14d,%edi
call   1030 <S_ISLNK@plt>
test   %eax,%eax
je     132e <main+0x1ce>
mov    %r12d,%edi
call   1030 <S_ISLNK@plt>
test   %eax,%eax
jne    1349 <main+0x1e9>
mov    0x2ca3(%rip),%rax
mov    (%rax),%edi
lea    0xd89(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %eax,%eax
js     138a <main+0x22a>
mov    0x2c80(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c78(%rip),%rax
mov    (%rax),%ebp
lea    0xcd7(%rip),%rdi
call   1080 <perror@plt>
jmp    1352 <main+0x1f2>
mov    0x2c61(%rip),%rax
mov    (%rax),%ebp
lea    0xd01(%rip),%rdi
jmp    1371 <main+0x211>
mov    %eax,%ebp
lea    0xd27(%rip),%rdi
jmp    1371 <main+0x211>

LLVM IR (-O0):
%struct.stat = type { i64, i64, i32 }
@stdout = global i32 0
@.str = [58 x i8] c"Usage: %s <fichier 1 a comparer> <fichier 2 a comparer> \0A\00"
@.str.1 = [14 x i8] c"Error fprintf\00"
@errno = global i32 0
@.str.2 = [12 x i8] c"Error lstat\00"
@.str.3 = [26 x i8] c"C'est le meme fichier ! \0A\00"
@.str.4 = [27 x i8] c"C'est un lien physique ! \0A\00"
@EXIT_SUCCESS = global i32 0
@.str.5 = [11 x i8] c"Error stat\00"
@.str.6 = [38 x i8] c"%s est un lien symbolique vers %s ! \0A\00"
@.str.7 = [54 x i8] c"Ce sont des liens symboliques sur le meme fichier ! \0A\00"
@.str.8 = [13 x i8] c"Error fpintf\00"
@.str.9 = [33 x i8] c"Ce n'est pas le meme fichier ! \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 i32
%10 = alloca %struct.stat
%11 = alloca %struct.stat
%12 = alloca %struct.stat
%13 = alloca %struct.stat
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 3
br i1 %15, label %16, label %28
16: ; preds = %2
%17 = load i32, i32* @stdout
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = load i32, i32* %7
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %16
%25 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%26 = load i32, i32* %7
store i32 %26, i32* %3
br label %238
27: ; preds = %16
store i32 -1, i32* %3
br label %238
28: ; preds = %2
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32 @lstat(i8* %31, %struct.stat* %12)
store i32 %32, i32* %9
%33 = load i32, i32* %9
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %39
35: ; preds = %28
%36 = load i32, i32* @errno
store i32 %36, i32* %6
%37 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%38 = load i32, i32* %6
store i32 %38, i32* %3
br label %238
39: ; preds = %28
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 2
%42 = load i8*, i8** %41
%43 = call i32 @lstat(i8* %42, %struct.stat* %13)
store i32 %43, i32* %9
%44 = load i32, i32* %9
%45 = icmp eq i32 %44, -1
br i1 %45, label %46, label %50
46: ; preds = %39
%47 = load i32, i32* @errno
store i32 %47, i32* %6
%48 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%49 = load i32, i32* %6
store i32 %49, i32* %3
br label %238
50: ; preds = %39
%51 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 0
%52 = load i64, i64* %51
%53 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%54 = load i64, i64* %53
%55 = icmp eq i64 %52, %54
br i1 %55, label %56, label %90
56: ; preds = %50
%57 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 1
%58 = load i64, i64* %57
%59 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 1
%60 = load i64, i64* %59
%61 = icmp eq i64 %58, %60
br i1 %61, label %62, label %90
62: ; preds = %56
%63 = load i32, i32* @stdout
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 %64, i32* %7
%65 = load i32, i32* %7
%66 = icmp slt i32 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %62
%68 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%69 = load i32, i32* %7
store i32 %69, i32* %3
br label %238
70: ; preds = %62
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i64 1
%73 = load i8*, i8** %72
%74 = load i8**, i8*** %5
%75 = getelementptr inbounds i8*, i8** %74, i64 2
%76 = load i8*, i8** %75
%77 = call i64 @strcmp(i8* %73, i8* %76)
%78 = icmp ne i64 %77, 0
br i1 %78, label %79, label %88
79: ; preds = %70
%80 = load i32, i32* @stdout
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
store i32 %81, i32* %7
%82 = load i32, i32* %7
%83 = icmp slt i32 %82, 0
br i1 %83, label %84, label %87
84: ; preds = %79
%85 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%86 = load i32, i32* %7
store i32 %86, i32* %3
br label %238
87: ; preds = %79
br label %88
88: ; preds = %87, %70
%89 = load i32, i32* @EXIT_SUCCESS
store i32 %89, i32* %3
br label %238
90: ; preds = %56, %50
%91 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 2
%92 = load i32, i32* %91
%93 = call i32 @S_ISLNK(i32 %92)
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %141
95: ; preds = %90
%96 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 2
%97 = load i32, i32* %96
%98 = call i32 @S_ISLNK(i32 %97)
%99 = xor i32 %98, -1
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %141
101: ; preds = %95
%102 = load i8**, i8*** %5
%103 = getelementptr inbounds i8*, i8** %102, i64 1
%104 = load i8*, i8** %103
%105 = call i32 @stat(i8* %104, %struct.stat* %10)
store i32 %105, i32* %8
%106 = load i32, i32* %8
%107 = icmp eq i32 %106, -1
br i1 %107, label %108, label %112
108: ; preds = %101
%109 = load i32, i32* @errno
store i32 %109, i32* %6
%110 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%111 = load i32, i32* %6
store i32 %111, i32* %3
br label %238
112: ; preds = %101
%113 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%114 = load i64, i64* %113
%115 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%116 = load i64, i64* %115
%117 = icmp eq i64 %114, %116
br i1 %117, label %118, label %139
118: ; preds = %112
%119 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%120 = load i64, i64* %119
%121 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 1
%122 = load i64, i64* %121
%123 = icmp eq i64 %120, %122
br i1 %123, label %124, label %139
124: ; preds = %118
%125 = load i32, i32* @stdout
%126 = load i8**, i8*** %5
%127 = getelementptr inbounds i8*, i8** %126, i64 1
%128 = load i8*, i8** %127
%129 = load i8**, i8*** %5
%130 = getelementptr inbounds i8*, i8** %129, i64 2
%131 = load i8*, i8** %130
%132 = call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %128, i8* %131)
store i32 %132, i32* %7
%133 = load i32, i32* %7
%134 = icmp slt i32 %133, 0
br i1 %134, label %135, label %138
135: ; preds = %124
%136 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%137 = load i32, i32* %7
store i32 %137, i32* %3
br label %238
138: ; preds = %124
br label %139
139: ; preds = %138, %118, %112
%140 = load i32, i32* @EXIT_SUCCESS
store i32 %140, i32* %3
br label %238
141: ; preds = %95, %90
%142 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 2
%143 = load i32, i32* %142
%144 = call i32 @S_ISLNK(i32 %143)
%145 = icmp ne i32 %144, 0
br i1 %145, label %146, label %192
146: ; preds = %141
%147 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 2
%148 = load i32, i32* %147
%149 = call i32 @S_ISLNK(i32 %148)
%150 = xor i32 %149, -1
%151 = icmp ne i32 %150, 0
br i1 %151, label %152, label %192
152: ; preds = %146
%153 = load i8**, i8*** %5
%154 = getelementptr inbounds i8*, i8** %153, i64 2
%155 = load i8*, i8** %154
%156 = call i32 @stat(i8* %155, %struct.stat* %11)
store i32 %156, i32* %8
%157 = load i32, i32* %8
%158 = icmp eq i32 %157, -1
br i1 %158, label %159, label %163
159: ; preds = %152
%160 = load i32, i32* @errno
store i32 %160, i32* %6
%161 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%162 = load i32, i32* %6
store i32 %162, i32* %3
br label %238
163: ; preds = %152
%164 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 0
%165 = load i64, i64* %164
%166 = getelementptr inbounds %struct.stat, %struct.stat* %11, i32 0, i32 0
%167 = load i64, i64* %166
%168 = icmp eq i64 %165, %167
br i1 %168, label %169, label %190
169: ; preds = %163
%170 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 1
%171 = load i64, i64* %170
%172 = getelementptr inbounds %struct.stat, %struct.stat* %11, i32 0, i32 1
%173 = load i64, i64* %172
%174 = icmp eq i64 %171, %173
br i1 %174, label %175, label %190
175: ; preds = %169
%176 = load i32, i32* @stdout
%177 = load i8**, i8*** %5
%178 = getelementptr inbounds i8*, i8** %177, i64 2
%179 = load i8*, i8** %178
%180 = load i8**, i8*** %5
%181 = getelementptr inbounds i8*, i8** %180, i64 1
%182 = load i8*, i8** %181
%183 = call i32 (i32, i8*, ...) @fprintf(i32 %176, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %179, i8* %182)
store i32 %183, i32* %7
%184 = load i32, i32* %7
%185 = icmp slt i32 %184, 0
br i1 %185, label %186, label %189
186: ; preds = %175
%187 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%188 = load i32, i32* %7
store i32 %188, i32* %3
br label %238
189: ; preds = %175
br label %190
190: ; preds = %189, %169, %163
%191 = load i32, i32* @EXIT_SUCCESS
store i32 %191, i32* %3
br label %238
192: ; preds = %146, %141
%193 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 2
%194 = load i32, i32* %193
%195 = call i32 @S_ISLNK(i32 %194)
%196 = icmp ne i32 %195, 0
br i1 %196, label %197, label %225
197: ; preds = %192
%198 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 2
%199 = load i32, i32* %198
%200 = call i32 @S_ISLNK(i32 %199)
%201 = icmp ne i32 %200, 0
br i1 %201, label %202, label %225
202: ; preds = %197
%203 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%204 = load i64, i64* %203
%205 = getelementptr inbounds %struct.stat, %struct.stat* %11, i32 0, i32 0
%206 = load i64, i64* %205
%207 = icmp eq i64 %204, %206
br i1 %207, label %208, label %223
208: ; preds = %202
%209 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%210 = load i64, i64* %209
%211 = getelementptr inbounds %struct.stat, %struct.stat* %11, i32 0, i32 1
%212 = load i64, i64* %211
%213 = icmp eq i64 %210, %212
br i1 %213, label %214, label %223
214: ; preds = %208
%215 = load i32, i32* @stdout
%216 = call i32 (i32, i8*, ...) @fprintf(i32 %215, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, i64 0, i64 0))
store i32 %216, i32* %7
%217 = load i32, i32* %7
%218 = icmp slt i32 %217, 0
br i1 %218, label %219, label %222
219: ; preds = %214
%220 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%221 = load i32, i32* %7
store i32 %221, i32* %3
br label %238
222: ; preds = %214
br label %223
223: ; preds = %222, %208, %202
%224 = load i32, i32* @EXIT_SUCCESS
store i32 %224, i32* %3
br label %238
225: ; preds = %197, %192
br label %226
226: ; preds = %225
br label %227
227: ; preds = %226
br label %228
228: ; preds = %227
%229 = load i32, i32* @stdout
%230 = call i32 (i32, i8*, ...) @fprintf(i32 %229, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
store i32 %230, i32* %7
%231 = load i32, i32* %7
%232 = icmp slt i32 %231, 0
br i1 %232, label %233, label %236
233: ; preds = %228
%234 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%235 = load i32, i32* %7
store i32 %235, i32* %3
br label %238
236: ; preds = %228
%237 = load i32, i32* @EXIT_SUCCESS
store i32 %237, i32* %3
br label %238
238: ; preds = %236, %233, %223, %219, %190, %186, %159, %139, %135, %108, %88, %84, %67, %46, %35, %27, %24
%239 = load i32, i32* %3
ret i32 %239
}

LLVM IR (-O2):
%struct.stat = type { i64, i64, i32 }
@stdout = global i32 0
@.str = [58 x i8] c"Usage: %s <fichier 1 a comparer> <fichier 2 a comparer> \0A\00"
@.str.1 = [14 x i8] c"Error fprintf\00"
@errno = global i32 0
@.str.2 = [12 x i8] c"Error lstat\00"
@.str.3 = [26 x i8] c"C'est le meme fichier ! \0A\00"
@.str.4 = [27 x i8] c"C'est un lien physique ! \0A\00"
@EXIT_SUCCESS = global i32 0
@.str.5 = [11 x i8] c"Error stat\00"
@.str.6 = [38 x i8] c"%s est un lien symbolique vers %s ! \0A\00"
@.str.8 = [13 x i8] c"Error fpintf\00"
@.str.9 = [33 x i8] c"Ce n'est pas le meme fichier ! \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = alloca %struct.stat
%5 = alloca %struct.stat
%6 = alloca %struct.stat
%7 = bitcast %struct.stat* %3 to i8*
%8 = bitcast %struct.stat* %4 to i8*
%9 = bitcast %struct.stat* %5 to i8*
%10 = bitcast %struct.stat* %6 to i8*
%11 = icmp eq i32 %0, 3
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = load i32, i32* @stdout
%14 = load i8*, i8** %1
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %149
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @lstat(i8* %18, %struct.stat* %5)
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %24
21: ; preds = %16
%22 = load i32, i32* @errno
%23 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %149
24: ; preds = %16
%25 = getelementptr inbounds i8*, i8** %1, i64 2
%26 = load i8*, i8** %25
%27 = call i32 @lstat(i8* %26, %struct.stat* %6)
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %32
29: ; preds = %24
%30 = load i32, i32* @errno
%31 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %149
32: ; preds = %24
%33 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 0
%34 = load i64, i64* %33
%35 = getelementptr inbounds %struct.stat, %struct.stat* %6, i64 0, i32 0
%36 = load i64, i64* %35
%37 = icmp eq i64 %34, %36
br i1 %37, label %38, label %63
38: ; preds = %32
%39 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 1
%40 = load i64, i64* %39
%41 = getelementptr inbounds %struct.stat, %struct.stat* %6, i64 0, i32 1
%42 = load i64, i64* %41
%43 = icmp eq i64 %40, %42
br i1 %43, label %44, label %63
44: ; preds = %38
%45 = load i32, i32* @stdout
%46 = tail call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%47 = icmp slt i32 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %44
%49 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %149
50: ; preds = %44
%51 = load i8*, i8** %17
%52 = load i8*, i8** %25
%53 = tail call i64 @strcmp(i8* %51, i8* %52)
%54 = icmp eq i64 %53, 0
br i1 %54, label %61, label %55
55: ; preds = %50
%56 = load i32, i32* @stdout
%57 = tail call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%58 = icmp slt i32 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %55
%60 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %149
61: ; preds = %55, %50
%62 = load i32, i32* @EXIT_SUCCESS
br label %149
63: ; preds = %38, %32
%64 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 2
%65 = load i32, i32* %64
%66 = tail call i32 @S_ISLNK(i32 %65)
%67 = icmp eq i32 %66, 0
%68 = getelementptr inbounds %struct.stat, %struct.stat* %6, i64 0, i32 2
%69 = load i32, i32* %68
br i1 %67, label %100, label %70
70: ; preds = %63
%71 = tail call i32 @S_ISLNK(i32 %69)
%72 = icmp eq i32 %71, -1
br i1 %72, label %100, label %73
73: ; preds = %70
%74 = load i8*, i8** %17
%75 = call i32 @stat(i8* %74, %struct.stat* %3)
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %80
77: ; preds = %73
%78 = load i32, i32* @errno
%79 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %149
80: ; preds = %73
%81 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%82 = load i64, i64* %81
%83 = icmp eq i64 %82, %36
br i1 %83, label %84, label %98
84: ; preds = %80
%85 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%86 = load i64, i64* %85
%87 = getelementptr inbounds %struct.stat, %struct.stat* %6, i64 0, i32 1
%88 = load i64, i64* %87
%89 = icmp eq i64 %86, %88
br i1 %89, label %90, label %98
90: ; preds = %84
%91 = load i32, i32* @stdout
%92 = load i8*, i8** %17
%93 = load i8*, i8** %25
%94 = tail call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %92, i8* %93)
%95 = icmp slt i32 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %90
%97 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %149
98: ; preds = %90, %84, %80
%99 = load i32, i32* @EXIT_SUCCESS
br label %149
100: ; preds = %63, %70
%101 = tail call i32 @S_ISLNK(i32 %69)
%102 = icmp eq i32 %101, 0
br i1 %102, label %133, label %103
103: ; preds = %100
%104 = tail call i32 @S_ISLNK(i32 %69)
%105 = icmp eq i32 %104, -1
br i1 %105, label %133, label %106
106: ; preds = %103
%107 = load i8*, i8** %25
%108 = call i32 @stat(i8* %107, %struct.stat* %4)
%109 = icmp eq i32 %108, -1
br i1 %109, label %110, label %113
110: ; preds = %106
%111 = load i32, i32* @errno
%112 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %149
113: ; preds = %106
%114 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%115 = load i64, i64* %114
%116 = icmp eq i64 %34, %115
br i1 %116, label %117, label %131
117: ; preds = %113
%118 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 1
%119 = load i64, i64* %118
%120 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 1
%121 = load i64, i64* %120
%122 = icmp eq i64 %119, %121
br i1 %122, label %123, label %131
123: ; preds = %117
%124 = load i32, i32* @stdout
%125 = load i8*, i8** %25
%126 = load i8*, i8** %17
%127 = tail call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %125, i8* %126)
%128 = icmp slt i32 %127, 0
br i1 %128, label %129, label %131
129: ; preds = %123
%130 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %149
131: ; preds = %123, %117, %113
%132 = load i32, i32* @EXIT_SUCCESS
br label %149
133: ; preds = %103, %100
%134 = tail call i32 @S_ISLNK(i32 %65)
%135 = icmp eq i32 %134, 0
br i1 %135, label %141, label %136
136: ; preds = %133
%137 = tail call i32 @S_ISLNK(i32 %69)
%138 = icmp eq i32 %137, 0
br i1 %138, label %141, label %139
139: ; preds = %136
%140 = load i32, i32* @EXIT_SUCCESS
br label %149
141: ; preds = %133, %136
%142 = load i32, i32* @stdout
%143 = tail call i32 (i32, i8*, ...) @fprintf(i32 %142, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%144 = icmp slt i32 %143, 0
br i1 %144, label %145, label %147
145: ; preds = %141
%146 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
br label %149
147: ; preds = %141
%148 = load i32, i32* @EXIT_SUCCESS
br label %149
149: ; preds = %147, %145, %139, %131, %129, %110, %98, %96, %77, %61, %59, %48, %29, %21, %12
%150 = phi i32 [ -1, %12 ], [ %22, %21 ], [ %30, %29 ], [ %46, %48 ], [ %57, %59 ], [ %62, %61 ], [ %78, %77 ], [ %94, %96 ], [ %99, %98 ], [ %111, %110 ], [ %127, %129 ], [ %132, %131 ], [ %140, %139 ], [ %143, %145 ], [ %148, %147 ]
ret i32 %150
}