#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 {
  int st_size;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
scalar_t__ isnan(double);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stat(char *, struct stat *);
int main(int argc, char *argv[]) {
  char *first, *second;
  int i, ended, flag;
  FILE *fp1, *fp2;
  struct stat stat1, stat2;
  double *df, *ds;
  int dsize;
  double double_min;
  double_min = (1e-10);
  if (argc < 3 || argc > 4) {
    printf("usage:\t./data_compare_bin file1 file2 [precision]\n");
    exit(1);
  }
  if ((fp1 = fopen(argv[1], "r")) == NULL) {
    printf("%s:\tfile1 not found\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/ebaty/ParallelProgramming/refs/heads/"
           "master/grav/data_compare.c");
    exit(1);
  }
  if ((fp2 = fopen(argv[2], "r")) == NULL) {
    printf("%s:\tfile2 not found\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/ebaty/ParallelProgramming/refs/heads/"
           "master/grav/data_compare.c");
    exit(1);
  }
  if (argc == 4) {
    double_min = atof(argv[3]);
  }
  stat(argv[1], &stat1);
  stat(argv[2], &stat2);
  if (stat1.st_size != stat2.st_size) {
    printf("%s:\twrong file size\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/ebaty/ParallelProgramming/refs/heads/"
           "master/grav/data_compare.c");
    exit(1);
  }
  first = (char *)malloc(stat1.st_size);
  second = (char *)malloc(stat2.st_size);
  ended = 0;
  while (1) {
    ended += fread(first + ended, 1, stat1.st_size - ended, fp1);
    if (ended >= stat1.st_size)
      break;
  }
  fclose(fp1);
  ended = 0;
  while (1) {
    ended += fread(second + ended, 1, stat2.st_size - ended, fp2);
    if (ended >= stat2.st_size)
      break;
  }
  fclose(fp2);
  dsize = stat1.st_size / (sizeof(double) / sizeof(char));
  df = (double *)first;
  ds = (double *)second;
  flag = 0;
  for (i = 0; i < dsize; ++i) {
    if (isnan(df[i]) || isnan(ds[i]) || (df[i] - ds[i]) / df[i] > double_min ||
        (ds[i] - df[i]) / ds[i] > double_min) {
      printf("error:\n\ta[%d]=%.20e\n\tb[%d]=%.20e\n", i, df[i], i, ds[i]);
      ++flag;
    }
  }
  if (flag == 0)
    printf("No error. Same data. (different less than %1.20f.)\n", double_min);
  else
    printf("%d errors in %d. different data. \n", flag, i);
  free(first);
  free(second);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xe42(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     11d7 <main+0x37>
cmpl   $0x4,-0x8(%rbp)
jle    11ef <main+0x4f>
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe3d(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1230 <main+0x90>
lea    0xe25(%rip),%rdi
lea    0xe33(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xdfc(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    1271 <main+0xd1>
lea    0xe93(%rip),%rdi
lea    0xdf2(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
cmpl   $0x4,-0x8(%rbp)
jne    128d <main+0xed>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atof@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x48(%rbp),%rsi
call   1080 <stat@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    -0x50(%rbp),%rsi
call   1080 <stat@plt>
mov    -0x48(%rbp),%eax
cmp    -0x50(%rbp),%eax
je     12da <main+0x13a>
lea    0xe3f(%rip),%rdi
lea    0xd89(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x48(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x50(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0x28(%rbp),%rax
add    %rax,%rdi
mov    -0x48(%rbp),%edx
sub    -0x28(%rbp),%edx
mov    -0x38(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x48(%rbp),%eax
jl     1336 <main+0x196>
jmp    133b <main+0x19b>
jmp    12f9 <main+0x159>
mov    -0x38(%rbp),%rdi
call   1060 <fclose@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
movslq -0x28(%rbp),%rax
add    %rax,%rdi
mov    -0x50(%rbp),%edx
sub    -0x28(%rbp),%edx
mov    -0x40(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x50(%rbp),%eax
jl     1388 <main+0x1e8>
jmp    138d <main+0x1ed>
jmp    134b <main+0x1ab>
mov    -0x40(%rbp),%rdi
call   1060 <fclose@plt>
movslq -0x48(%rbp),%rax
shr    $0x3,%rax
mov    %eax,-0x64(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    14b1 <main+0x311>
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   10a0 <isnan@plt>
cmp    $0x0,%rax
jne    1467 <main+0x2c7>
mov    -0x60(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   10a0 <isnan@plt>
cmp    $0x0,%rax
jne    1467 <main+0x2c7>
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x24(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
ucomisd -0x70(%rbp),%xmm0
ja     1467 <main+0x2c7>
mov    -0x60(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x24(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    149e <main+0x2fe>
mov    -0x24(%rbp),%esi
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x24(%rbp),%edx
mov    -0x60(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0xc88(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    14a3 <main+0x303>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13bf <main+0x21f>
cmpl   $0x0,-0x2c(%rbp)
jne    14d3 <main+0x333>
movsd  -0x70(%rbp),%xmm0
lea    0xc71(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
jmp    14e7 <main+0x347>
mov    -0x2c(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    -0x5(%rbp),%eax
cmp    $0xfffffffd,%eax
jbe    13b9 <main+0x209>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xe2e(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     13cf <main+0x21f>
mov    %rax,%r13
mov    0x10(%rbx),%rdi
lea    0xe12(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     13d8 <main+0x228>
mov    %rax,%r12
cmp    $0x4,%ebp
jne    1217 <main+0x67>
mov    0x18(%rbx),%rdi
call   1060 <atof@plt>
jmp    121f <main+0x6f>
movsd  0xde1(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    0x8(%rbx),%rdi
lea    0x10(%rsp),%rsi
call   1090 <stat@plt>
mov    0x10(%rbx),%rdi
lea    0x8(%rsp),%rsi
call   1090 <stat@plt>
mov    0x10(%rsp),%ebx
cmp    0x8(%rsp),%ebx
jne    13e1 <main+0x231>
mov    %ebx,%edi
call   10a0 <malloc@plt>
mov    %rax,%r15
mov    %ebx,%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq %eax,%rbp
lea    (%r15,%rbp,1),%rdi
mov    %ebx,%edx
sub    %ebp,%edx
mov    $0x1,%esi
mov    %r13,%rcx
call   1050 <fread@plt>
add    %ebp,%eax
cmp    %ebx,%eax
jl     1270 <main+0xc0>
mov    %r13,%rdi
call   1070 <fclose@plt>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movslq %eax,%rbp
lea    (%r14,%rbp,1),%rdi
mov    %ebx,%edx
sub    %ebp,%edx
mov    $0x1,%esi
mov    %r12,%rcx
call   1050 <fread@plt>
add    %ebp,%eax
cmp    %ebx,%eax
jl     12a0 <main+0xf0>
mov    %r12,%rdi
call   1070 <fclose@plt>
cmp    $0x8,%ebx
jl     1385 <main+0x1d5>
shr    $0x3,%rbx
xor    %ebp,%ebp
lea    0xe07(%rip),%r13
xor    %r12d,%r12d
nop
movsd  (%r15,%rbp,8),%xmm0
call   10b0 <isnan@plt>
test   %rax,%rax
jne    1340 <main+0x190>
movsd  (%r14,%rbp,8),%xmm0
call   10b0 <isnan@plt>
test   %rax,%rax
jne    1340 <main+0x190>
movsd  (%r15,%rbp,8),%xmm1
movsd  (%r14,%rbp,8),%xmm0
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
divsd  %xmm1,%xmm2
ucomisd (%rsp),%xmm2
ja     1340 <main+0x190>
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
ucomisd (%rsp),%xmm2
jbe    135e <main+0x1ae>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r15,%rbp,8),%xmm0
movsd  (%r14,%rbp,8),%xmm1
mov    %r13,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
mov    $0x2,%al
call   1080 <printf@plt>
add    $0x1,%r12d
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    12e0 <main+0x130>
test   %r12d,%r12d
je     1385 <main+0x1d5>
lea    0xdc2(%rip),%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1080 <printf@plt>
jmp    1398 <main+0x1e8>
lea    0xd79(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1080 <printf@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd9c(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
lea    0xc34(%rip),%rdi
jmp    13e8 <main+0x238>
lea    0xcda(%rip),%rdi
jmp    13e8 <main+0x238>
lea    0xce6(%rip),%rdi
lea    0xc30(%rip),%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [51 x i8] c"usage:\09./data_compare_bin file1 file2 [precision]\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [21 x i8] c"%s:\09file1 not found\0A\00"
@.str.3 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ebaty/ParallelProgramming/refs/heads/master/grav/data_compare.c\00"
@.str.4 = [21 x i8] c"%s:\09file2 not found\0A\00"
@.str.5 = [21 x i8] c"%s:\09wrong file size\0A\00"
@.str.6 = [34 x i8] c"error:\0A\09a[%d]=%.20e\0A\09b[%d]=%.20e\0A\00"
@.str.7 = [52 x i8] c"No error. Same data. (different less than %1.20f.)\0A\00"
@.str.8 = [35 x i8] c"%d errors in %d. different data. \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca %struct.stat
%14 = alloca %struct.stat
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32
%18 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e-10, double* %18
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 3
br i1 %20, label %24, label %21
21: ; preds = %2
%22 = load i32, i32* %4
%23 = icmp sgt i32 %22, 4
br i1 %23, label %24, label %27
24: ; preds = %21, %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%26 = call i32 @exit(i32 1)
unreachable
27: ; preds = %21
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32* @fopen(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %31, i32** %11
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %36
33: ; preds = %27
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 @exit(i32 1)
unreachable
36: ; preds = %27
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 2
%39 = load i8*, i8** %38
%40 = call i32* @fopen(i8* %39, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %40, i32** %12
%41 = icmp eq i32* %40, null
br i1 %41, label %42, label %45
42: ; preds = %36
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.3, i64 0, i64 0))
%44 = call i32 @exit(i32 1)
unreachable
45: ; preds = %36
%46 = load i32, i32* %4
%47 = icmp eq i32 %46, 4
br i1 %47, label %48, label %53
48: ; preds = %45
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 3
%51 = load i8*, i8** %50
%52 = call double @atof(i8* %51)
store double %52, double* %18
br label %53
53: ; preds = %48, %45
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 1
%56 = load i8*, i8** %55
%57 = call i32 @stat(i8* %56, %struct.stat* %13)
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 2
%60 = load i8*, i8** %59
%61 = call i32 @stat(i8* %60, %struct.stat* %14)
%62 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%63 = load i32, i32* %62
%64 = getelementptr inbounds %struct.stat, %struct.stat* %14, i32 0, i32 0
%65 = load i32, i32* %64
%66 = icmp ne i32 %63, %65
br i1 %66, label %67, label %70
67: ; preds = %53
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.3, i64 0, i64 0))
%69 = call i32 @exit(i32 1)
unreachable
70: ; preds = %53
%71 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%72 = load i32, i32* %71
%73 = call i64 @malloc(i32 %72)
%74 = inttoptr i64 %73 to i8*
store i8* %74, i8** %6
%75 = getelementptr inbounds %struct.stat, %struct.stat* %14, i32 0, i32 0
%76 = load i32, i32* %75
%77 = call i64 @malloc(i32 %76)
%78 = inttoptr i64 %77 to i8*
store i8* %78, i8** %7
store i32 0, i32* %9
br label %79
79: ; preds = %70, %99
%80 = load i8*, i8** %6
%81 = load i32, i32* %9
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i8, i8* %80, i64 %82
%84 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%85 = load i32, i32* %84
%86 = load i32, i32* %9
%87 = sub nsw i32 %85, %86
%88 = load i32*, i32** %11
%89 = call i64 @fread(i8* %83, i32 1, i32 %87, i32* %88)
%90 = load i32, i32* %9
%91 = sext i32 %90 to i64
%92 = add nsw i64 %91, %89
%93 = trunc i64 %92 to i32
store i32 %93, i32* %9
%94 = load i32, i32* %9
%95 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%96 = load i32, i32* %95
%97 = icmp sge i32 %94, %96
br i1 %97, label %98, label %99
98: ; preds = %79
br label %100
99: ; preds = %79
br label %79
100: ; preds = %98
%101 = load i32*, i32** %11
%102 = call i32 @fclose(i32* %101)
store i32 0, i32* %9
br label %103
103: ; preds = %100, %123
%104 = load i8*, i8** %7
%105 = load i32, i32* %9
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8, i8* %104, i64 %106
%108 = getelementptr inbounds %struct.stat, %struct.stat* %14, i32 0, i32 0
%109 = load i32, i32* %108
%110 = load i32, i32* %9
%111 = sub nsw i32 %109, %110
%112 = load i32*, i32** %12
%113 = call i64 @fread(i8* %107, i32 1, i32 %111, i32* %112)
%114 = load i32, i32* %9
%115 = sext i32 %114 to i64
%116 = add nsw i64 %115, %113
%117 = trunc i64 %116 to i32
store i32 %117, i32* %9
%118 = load i32, i32* %9
%119 = getelementptr inbounds %struct.stat, %struct.stat* %14, i32 0, i32 0
%120 = load i32, i32* %119
%121 = icmp sge i32 %118, %120
br i1 %121, label %122, label %123
122: ; preds = %103
br label %124
123: ; preds = %103
br label %103
124: ; preds = %122
%125 = load i32*, i32** %12
%126 = call i32 @fclose(i32* %125)
%127 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%128 = load i32, i32* %127
%129 = sext i32 %128 to i64
%130 = udiv i64 %129, 8
%131 = trunc i64 %130 to i32
store i32 %131, i32* %17
%132 = load i8*, i8** %6
%133 = bitcast i8* %132 to double*
store double* %133, double** %15
%134 = load i8*, i8** %7
%135 = bitcast i8* %134 to double*
store double* %135, double** %16
store i32 0, i32* %10
store i32 0, i32* %8
br label %136
136: ; preds = %213, %124
%137 = load i32, i32* %8
%138 = load i32, i32* %17
%139 = icmp slt i32 %137, %138
br i1 %139, label %140, label %216
140: ; preds = %136
%141 = load double*, double** %15
%142 = load i32, i32* %8
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double, double* %141, i64 %143
%145 = load double, double* %144
%146 = call i64 @isnan(double %145)
%147 = icmp ne i64 %146, 0
br i1 %147, label %196, label %148
148: ; preds = %140
%149 = load double*, double** %16
%150 = load i32, i32* %8
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %149, i64 %151
%153 = load double, double* %152
%154 = call i64 @isnan(double %153)
%155 = icmp ne i64 %154, 0
br i1 %155, label %196, label %156
156: ; preds = %148
%157 = load double*, double** %15
%158 = load i32, i32* %8
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %157, i64 %159
%161 = load double, double* %160
%162 = load double*, double** %16
%163 = load i32, i32* %8
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double, double* %162, i64 %164
%166 = load double, double* %165
%167 = fsub double %161, %166
%168 = load double*, double** %15
%169 = load i32, i32* %8
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds double, double* %168, i64 %170
%172 = load double, double* %171
%173 = fdiv double %167, %172
%174 = load double, double* %18
%175 = fcmp ogt double %173, %174
br i1 %175, label %196, label %176
176: ; preds = %156
%177 = load double*, double** %16
%178 = load i32, i32* %8
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds double, double* %177, i64 %179
%181 = load double, double* %180
%182 = load double*, double** %15
%183 = load i32, i32* %8
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds double, double* %182, i64 %184
%186 = load double, double* %185
%187 = fsub double %181, %186
%188 = load double*, double** %16
%189 = load i32, i32* %8
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds double, double* %188, i64 %190
%192 = load double, double* %191
%193 = fdiv double %187, %192
%194 = load double, double* %18
%195 = fcmp ogt double %193, %194
br i1 %195, label %196, label %212
196: ; preds = %176, %156, %148, %140
%197 = load i32, i32* %8
%198 = load double*, double** %15
%199 = load i32, i32* %8
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds double, double* %198, i64 %200
%202 = load double, double* %201
%203 = load i32, i32* %8
%204 = load double*, double** %16
%205 = load i32, i32* %8
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds double, double* %204, i64 %206
%208 = load double, double* %207
%209 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %197, double %202, i32 %203, double %208)
%210 = load i32, i32* %10
%211 = add nsw i32 %210, 1
store i32 %211, i32* %10
br label %212
212: ; preds = %196, %176
br label %213
213: ; preds = %212
%214 = load i32, i32* %8
%215 = add nsw i32 %214, 1
store i32 %215, i32* %8
br label %136
216: ; preds = %136
%217 = load i32, i32* %10
%218 = icmp eq i32 %217, 0
br i1 %218, label %219, label %222
219: ; preds = %216
%220 = load double, double* %18
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0), double %220)
br label %226
222: ; preds = %216
%223 = load i32, i32* %10
%224 = load i32, i32* %8
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %223, i32 %224)
br label %226
226: ; preds = %222, %219
%227 = load i8*, i8** %6
%228 = call i32 @free(i8* %227)
%229 = load i8*, i8** %7
%230 = call i32 @free(i8* %229)
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [21 x i8] c"%s:\09file1 not found\0A\00"
@.str.3 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ebaty/ParallelProgramming/refs/heads/master/grav/data_compare.c\00"
@.str.4 = [21 x i8] c"%s:\09file2 not found\0A\00"
@.str.5 = [21 x i8] c"%s:\09wrong file size\0A\00"
@.str.6 = [34 x i8] c"error:\0A\09a[%d]=%.20e\0A\09b[%d]=%.20e\0A\00"
@.str.7 = [52 x i8] c"No error. Same data. (different less than %1.20f.)\0A\00"
@.str.8 = [35 x i8] c"%d errors in %d. different data. \0A\00"
@str = [50 x i8] c"usage:\09./data_compare_bin file1 file2 [precision]\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = alloca %struct.stat
%5 = bitcast %struct.stat* %3 to i8*
%6 = bitcast %struct.stat* %4 to i8*
%7 = add i32 %0, -5
%8 = icmp ult i32 %7, -2
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.3, i64 0, i64 0))
%19 = tail call i32 @exit(i32 1)
unreachable
20: ; preds = %12
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = tail call i32* @fopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %28
25: ; preds = %20
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.3, i64 0, i64 0))
%27 = tail call i32 @exit(i32 1)
unreachable
28: ; preds = %20
%29 = icmp eq i32 %0, 4
br i1 %29, label %30, label %34
30: ; preds = %28
%31 = getelementptr inbounds i8*, i8** %1, i64 3
%32 = load i8*, i8** %31
%33 = tail call double @atof(i8* %32)
br label %34
34: ; preds = %30, %28
%35 = phi double [ %33, %30 ], [ 1.000000e-10, %28 ]
%36 = load i8*, i8** %13
%37 = call i32 @stat(i8* %36, %struct.stat* %3)
%38 = load i8*, i8** %21
%39 = call i32 @stat(i8* %38, %struct.stat* %4)
%40 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%41 = load i32, i32* %40
%42 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%43 = load i32, i32* %42
%44 = icmp eq i32 %41, %43
br i1 %44, label %48, label %45
45: ; preds = %34
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.3, i64 0, i64 0))
%47 = tail call i32 @exit(i32 1)
unreachable
48: ; preds = %34
%49 = tail call i64 @malloc(i32 %41)
%50 = inttoptr i64 %49 to i8*
%51 = tail call i64 @malloc(i32 %41)
br label %52
52: ; preds = %52, %48
%53 = phi i32 [ 0, %48 ], [ %59, %52 ]
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i8, i8* %50, i64 %54
%56 = sub nsw i32 %41, %53
%57 = tail call i64 @fread(i8* %55, i32 1, i32 %56, i32* %15)
%58 = trunc i64 %57 to i32
%59 = add i32 %53, %58
%60 = icmp slt i32 %59, %41
br i1 %60, label %52, label %61
61: ; preds = %52
%62 = inttoptr i64 %51 to i8*
%63 = tail call i32 @fclose(i32* %15)
br label %64
64: ; preds = %64, %61
%65 = phi i32 [ 0, %61 ], [ %71, %64 ]
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i8, i8* %62, i64 %66
%68 = sub nsw i32 %41, %65
%69 = tail call i64 @fread(i8* %67, i32 1, i32 %68, i32* %23)
%70 = trunc i64 %69 to i32
%71 = add i32 %65, %70
%72 = icmp slt i32 %71, %41
br i1 %72, label %64, label %73
73: ; preds = %64
%74 = tail call i32 @fclose(i32* %23)
%75 = inttoptr i64 %49 to double*
%76 = inttoptr i64 %51 to double*
%77 = icmp sgt i32 %41, 7
br i1 %77, label %78, label %116
78: ; preds = %73
%79 = lshr i32 %41, 3
%80 = zext i32 %79 to i64
br label %81
81: ; preds = %78, %110
%82 = phi i64 [ 0, %78 ], [ %112, %110 ]
%83 = phi i32 [ 0, %78 ], [ %111, %110 ]
%84 = getelementptr inbounds double, double* %75, i64 %82
%85 = load double, double* %84
%86 = tail call i64 @isnan(double %85)
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %103
88: ; preds = %81
%89 = getelementptr inbounds double, double* %76, i64 %82
%90 = load double, double* %89
%91 = tail call i64 @isnan(double %90)
%92 = icmp eq i64 %91, 0
br i1 %92, label %93, label %103
93: ; preds = %88
%94 = load double, double* %84
%95 = load double, double* %89
%96 = fsub double %94, %95
%97 = fdiv double %96, %94
%98 = fcmp ogt double %97, %35
br i1 %98, label %103, label %99
99: ; preds = %93
%100 = fsub double %95, %94
%101 = fdiv double %100, %95
%102 = fcmp ogt double %101, %35
br i1 %102, label %103, label %110
103: ; preds = %99, %93, %88, %81
%104 = load double, double* %84
%105 = getelementptr inbounds double, double* %76, i64 %82
%106 = load double, double* %105
%107 = trunc i64 %82 to i32
%108 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %107, double %104, i32 %107, double %106)
%109 = add nsw i32 %83, 1
br label %110
110: ; preds = %99, %103
%111 = phi i32 [ %109, %103 ], [ %83, %99 ]
%112 = add nuw nsw i64 %82, 1
%113 = icmp eq i64 %112, %80
br i1 %113, label %114, label %81
114: ; preds = %110
%115 = icmp eq i32 %111, 0
br i1 %115, label %116, label %118
116: ; preds = %73, %114
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0), double %35)
br label %120
118: ; preds = %114
%119 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %111, i32 %79)
br label %120
120: ; preds = %118, %116
%121 = tail call i32 @free(i8* %50)
%122 = tail call i32 @free(i8* %62)
ret i32 0
}