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

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *find_TSVL(int /*<<< orphan*/ *, char *, char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, float *);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int difference2(FILE *fpin1, FILE *fpin2, FILE *fpout, int NumVars, int NumLev,
                int NumTimes, int Nl[], int Nr, int Nc, char VarName[][10],
                char LevName[][10], char TStepName[][20], int east_bound,
                int west_bound, int north_bound, int south_bound, int flag_i) {
  int it, iv, ir, ic, il, skip, val_cnt;
  float val, val2;
  char inStr[255];
  rewind(fpin1);
  rewind(fpin2);
  for (it = 0; it < NumTimes; it++) {
    for (iv = 0; iv < NumVars; iv++) {
      for (il = 0; il < Nl[iv]; il++) {
        if (flag_i == 1)
          printf("[%s][%s][%s]\n", TStepName[it], VarName[iv], LevName[il]);
        fpin1 = find_TSVL(fpin1, TStepName[it], VarName[iv], LevName[il]);
        fpin2 = find_TSVL(fpin2, TStepName[it], VarName[iv], LevName[il]);
        if ((fpin1 == NULL) || (fpin2 == NULL))
          goto err;
        for (skip = 1; skip <= 14; skip++) {
          fgets(inStr, 255, fpin1);
          fgets(inStr, 255, fpin2);
          fprintf(fpout, "%s", inStr);
        }
        val_cnt = 0;
        for (ir = 1; ir <= Nr; ir++) {
          for (ic = 1; ic <= Nc; ic++) {
            fscanf(fpin1, " %f", &val);
            fscanf(fpin2, " %f", &val2);
            if ((ir <= south_bound) && (ir >= north_bound) &&
                (ic >= west_bound) && (ic <= east_bound)) {
              val_cnt++;
              if (val_cnt >= 8) {
                fprintf(fpout, "%.6e\n", val - val2);
                val_cnt = 0;
              } else
                fprintf(fpout, "%.6e ", val - val2);
            }
          }
        }
        if (val_cnt != 0) {
          fprintf(fpout, "\n");
          val_cnt = 0;
        }
      }
    }
  }
  return 0;
err:
  return -1;
}


x86 assembly (clang, -O0):
<difference2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    0x60(%rbp),%eax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <rewind@plt>
mov    -0x18(%rbp),%rdi
call   1040 <rewind@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1499 <difference2+0x339>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1486 <difference2+0x326>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    0x10(%rbp),%rcx
movslq -0x34(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1473 <difference2+0x313>
cmpl   $0x1,0x60(%rbp)
jne    123d <difference2+0xdd>
mov    0x38(%rbp),%rsi
movslq -0x30(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rsi
mov    0x28(%rbp),%rdx
movslq -0x34(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rdx
mov    0x30(%rbp),%rcx
movslq -0x40(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rcx
lea    0xdc8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    0x38(%rbp),%rsi
movslq -0x30(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rsi
mov    0x28(%rbp),%rdx
movslq -0x34(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rdx
mov    0x30(%rbp),%rcx
movslq -0x40(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rcx
call   1080 <find_TSVL@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x38(%rbp),%rsi
movslq -0x30(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rsi
mov    0x28(%rbp),%rdx
movslq -0x34(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rdx
mov    0x30(%rbp),%rcx
movslq -0x40(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rcx
call   1080 <find_TSVL@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     12c7 <difference2+0x167>
cmpq   $0x0,-0x18(%rbp)
jne    12cc <difference2+0x16c>
jmp    14a5 <difference2+0x345>
movl   $0x1,-0x44(%rbp)
cmpl   $0xe,-0x44(%rbp)
jg     132e <difference2+0x1ce>
lea    -0x150(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0xff,%esi
call   1060 <fgets@plt>
lea    -0x150(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0xff,%esi
call   1060 <fgets@plt>
mov    -0x20(%rbp),%rdi
lea    -0x150(%rbp),%rdx
lea    0xcf5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12d3 <difference2+0x173>
movl   $0x0,-0x48(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     143d <difference2+0x2dd>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x20(%rbp),%eax
jg     142a <difference2+0x2ca>
mov    -0x10(%rbp),%rdi
lea    0xcab(%rip),%rsi
lea    -0x4c(%rbp),%rdx
call   1050 <fscanf@plt>
mov    -0x18(%rbp),%rdi
lea    0xc97(%rip),%rsi
lea    -0x50(%rbp),%rdx
call   1050 <fscanf@plt>
mov    -0x38(%rbp),%eax
cmp    0x58(%rbp),%eax
jg     1417 <difference2+0x2b7>
mov    -0x38(%rbp),%eax
cmp    0x50(%rbp),%eax
jl     1417 <difference2+0x2b7>
mov    -0x3c(%rbp),%eax
cmp    0x48(%rbp),%eax
jl     1417 <difference2+0x2b7>
mov    -0x3c(%rbp),%eax
cmp    0x40(%rbp),%eax
jg     1417 <difference2+0x2b7>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x8,-0x48(%rbp)
jl     13f2 <difference2+0x292>
mov    -0x20(%rbp),%rdi
movss  -0x4c(%rbp),%xmm0
subss  -0x50(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc36(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x48(%rbp)
jmp    1412 <difference2+0x2b2>
mov    -0x20(%rbp),%rdi
movss  -0x4c(%rbp),%xmm0
subss  -0x50(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc10(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
jmp    1417 <difference2+0x2b7>
jmp    141c <difference2+0x2bc>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    134f <difference2+0x1ef>
jmp    142f <difference2+0x2cf>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    133c <difference2+0x1dc>
cmpl   $0x0,-0x48(%rbp)
je     1460 <difference2+0x300>
mov    -0x20(%rbp),%rdi
lea    0xbba(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x48(%rbp)
jmp    1465 <difference2+0x305>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11e6 <difference2+0x86>
jmp    1478 <difference2+0x318>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11d3 <difference2+0x73>
jmp    148b <difference2+0x32b>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11c0 <difference2+0x60>
movl   $0x0,-0x4(%rbp)
jmp    14ac <difference2+0x34c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<difference2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %r9d,%r14d
mov    %ecx,%ebp
mov    %rdx,0x18(%rsp)
mov    %rsi,%r12
mov    %rdi,%rbx
call   1040 <rewind@plt>
mov    %r12,%rdi
call   1040 <rewind@plt>
test   %r14d,%r14d
jle    14d8 <difference2+0x358>
mov    %rbx,0x10(%rsp)
mov    0x1d0(%rsp),%r15
mov    0x1c0(%rsp),%eax
mov    %r14d,%ecx
mov    %rcx,0x38(%rsp)
mov    %ebp,%ecx
mov    %rcx,0x48(%rsp)
neg    %eax
mov    %rax,0x68(%rsp)
xor    %eax,%eax
lea    0xe24(%rip),%r14
mov    %ebp,0x24(%rsp)
test   %ebp,%ebp
mov    %rax,0x40(%rsp)
jle    14c0 <difference2+0x340>
lea    (%rax,%rax,4),%rax
mov    0x1d8(%rsp),%rcx
lea    (%rcx,%rax,4),%rax
mov    %rax,0x28(%rsp)
xor    %edx,%edx
jmp    122f <difference2+0xaf>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rdx
cmp    0x48(%rsp),%rdx
je     14c0 <difference2+0x340>
mov    0x1b0(%rsp),%rax
cmpl   $0x0,(%rax,%rdx,4)
jle    1220 <difference2+0xa0>
lea    (%rdx,%rdx,4),%rax
mov    0x1c8(%rsp),%rcx
lea    (%rcx,%rax,2),%rax
mov    %rax,0x30(%rsp)
xor    %ebp,%ebp
mov    %rdx,0x50(%rsp)
jmp    127f <difference2+0xff>
nopl   0x0(%rax,%rax,1)
mov    0x58(%rsp),%rbp
add    $0x1,%rbp
mov    0x1b0(%rsp),%rax
mov    0x50(%rsp),%rdx
movslq (%rax,%rdx,4),%rax
cmp    %rax,%rbp
jge    1220 <difference2+0xa0>
cmpl   $0x1,0x200(%rsp)
01
jne    12ae <difference2+0x12e>
lea    0x0(,%rbp,4),%rax
add    %rbp,%rax
lea    (%r15,%rax,2),%rcx
lea    0xd61(%rip),%rdi
mov    0x28(%rsp),%rsi
mov    0x30(%rsp),%rdx
call   1030 <printf@plt>
mov    %rbp,0x58(%rsp)
lea    0x0(,%rbp,4),%rax
add    %rbp,%rax
lea    (%r15,%rax,2),%r13
mov    0x10(%rsp),%rdi
mov    0x28(%rsp),%rbx
mov    %rbx,%rsi
mov    0x30(%rsp),%r15
mov    %r15,%rdx
mov    %r13,%rcx
call   10a0 <find_TSVL@plt>
mov    %rax,%rbp
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r13,%rcx
call   10a0 <find_TSVL@plt>
mov    %rax,%r12
mov    $0xffffffff,%eax
mov    %rbp,0x10(%rsp)
test   %rbp,%rbp
je     14da <difference2+0x35a>
test   %r12,%r12
je     14da <difference2+0x35a>
lea    0x70(%rsp),%rbx
mov    0x18(%rsp),%r15
mov    $0xe,%ebp
mov    0x10(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0xff,%esi
mov    %r13,%rdx
call   1080 <fgets@plt>
mov    %rbx,%rdi
mov    $0xff,%esi
mov    %r12,%rdx
call   1080 <fgets@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <fputs@plt>
add    $0xffffffff,%ebp
jne    1330 <difference2+0x1b0>
cmpl   $0x0,0x1b8(%rsp)
mov    0x1d0(%rsp),%r15
jle    1260 <difference2+0xe0>
mov    %r12,%rbp
mov    $0x1,%ecx
xor    %r15d,%r15d
mov    0x10(%rsp),%rbx
jmp    13a7 <difference2+0x227>
nopl   0x0(%rax,%rax,1)
mov    0x60(%rsp),%rcx
lea    0x1(%rcx),%eax
cmp    0x1b8(%rsp),%ecx
mov    %eax,%ecx
je     1490 <difference2+0x310>
cmpl   $0x0,0x1c0(%rsp)
mov    %rcx,0x60(%rsp)
jle    1390 <difference2+0x210>
cmp    0x1f8(%rsp),%ecx
setg   %al
cmp    0x1f0(%rsp),%ecx
setl   %r13b
or     %al,%r13b
mov    $0x1,%r12d
jmp    1424 <difference2+0x2a4>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r15d
movss  0xc(%rsp),%xmm0
subss  0x8(%rsp),%xmm0
lea    0xc21(%rip),%rsi
cvtss2sd %xmm0,%xmm0
mov    0x18(%rsp),%rdi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    0x68(%rsp),%rax
add    %r12d,%eax
add    $0x1,%eax
mov    %r12d,%ecx
add    $0x1,%ecx
mov    %ecx,%r12d
cmp    $0x1,%eax
je     1390 <difference2+0x210>
mov    %rbx,%rdi
mov    %r14,%rsi
lea    0xc(%rsp),%rdx
call   1060 <fscanf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
lea    0x8(%rsp),%rdx
call   1060 <fscanf@plt>
cmp    0x1e8(%rsp),%r12d
setl   %al
or     %r13b,%al
jne    1407 <difference2+0x287>
cmp    0x1e0(%rsp),%r12d
jg     1407 <difference2+0x287>
cmp    $0x7,%r15d
jl     13e0 <difference2+0x260>
movss  0xc(%rsp),%xmm0
subss  0x8(%rsp),%xmm0
xor    %r15d,%r15d
lea    0xb94(%rip),%rsi
jmp    13f7 <difference2+0x277>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %r15d,%r15d
mov    %rbp,%r12
mov    0x1d0(%rsp),%r15
je     1260 <difference2+0xe0>
mov    $0xa,%edi
mov    0x18(%rsp),%rsi
call   1070 <fputc@plt>
jmp    1260 <difference2+0xe0>
nopl   0x0(%rax,%rax,1)
mov    0x40(%rsp),%rax
add    $0x1,%rax
cmp    0x38(%rsp),%rax
mov    0x24(%rsp),%ebp
jne    11ee <difference2+0x6e>
xor    %eax,%eax
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"[%s][%s][%s]\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c" %f\00"
@.str.3 = [6 x i8] c"%.6e\0A\00"
@.str.4 = [6 x i8] c"%.6e \00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @difference2(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5, i32* %6, i32 %7, i32 %8, [10 x i8]* %9, [10 x i8]* %10, [20 x i8]* %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16) {
%18 = alloca i32
%19 = alloca i32*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32*
%26 = alloca i32
%27 = alloca i32
%28 = alloca [10 x i8]*
%29 = alloca [10 x i8]*
%30 = alloca [20 x i8]*
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32
%43 = alloca float
%44 = alloca float
%45 = alloca [255 x i8]
store i32* %0, i32** %19
store i32* %1, i32** %20
store i32* %2, i32** %21
store i32 %3, i32* %22
store i32 %4, i32* %23
store i32 %5, i32* %24
store i32* %6, i32** %25
store i32 %7, i32* %26
store i32 %8, i32* %27
store [10 x i8]* %9, [10 x i8]** %28
store [10 x i8]* %10, [10 x i8]** %29
store [20 x i8]* %11, [20 x i8]** %30
store i32 %12, i32* %31
store i32 %13, i32* %32
store i32 %14, i32* %33
store i32 %15, i32* %34
store i32 %16, i32* %35
%46 = load i32*, i32** %19
%47 = call i32 @rewind(i32* %46)
%48 = load i32*, i32** %20
%49 = call i32 @rewind(i32* %48)
store i32 0, i32* %36
br label %50
50: ; preds = %219, %17
%51 = load i32, i32* %36
%52 = load i32, i32* %24
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %222
54: ; preds = %50
store i32 0, i32* %37
br label %55
55: ; preds = %215, %54
%56 = load i32, i32* %37
%57 = load i32, i32* %22
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %218
59: ; preds = %55
store i32 0, i32* %40
br label %60
60: ; preds = %211, %59
%61 = load i32, i32* %40
%62 = load i32*, i32** %25
%63 = load i32, i32* %37
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %62, i64 %64
%66 = load i32, i32* %65
%67 = icmp slt i32 %61, %66
br i1 %67, label %68, label %214
68: ; preds = %60
%69 = load i32, i32* %35
%70 = icmp eq i32 %69, 1
br i1 %70, label %71, label %88
71: ; preds = %68
%72 = load [20 x i8]*, [20 x i8]** %30
%73 = load i32, i32* %36
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [20 x i8], [20 x i8]* %72, i64 %74
%76 = getelementptr inbounds [20 x i8], [20 x i8]* %75, i64 0, i64 0
%77 = load [10 x i8]*, [10 x i8]** %28
%78 = load i32, i32* %37
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [10 x i8], [10 x i8]* %77, i64 %79
%81 = getelementptr inbounds [10 x i8], [10 x i8]* %80, i64 0, i64 0
%82 = load [10 x i8]*, [10 x i8]** %29
%83 = load i32, i32* %40
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [10 x i8], [10 x i8]* %82, i64 %84
%86 = getelementptr inbounds [10 x i8], [10 x i8]* %85, i64 0, i64 0
%87 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %76, i8* %81, i8* %86)
br label %88
88: ; preds = %71, %68
%89 = load i32*, i32** %19
%90 = load [20 x i8]*, [20 x i8]** %30
%91 = load i32, i32* %36
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [20 x i8], [20 x i8]* %90, i64 %92
%94 = getelementptr inbounds [20 x i8], [20 x i8]* %93, i64 0, i64 0
%95 = load [10 x i8]*, [10 x i8]** %28
%96 = load i32, i32* %37
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [10 x i8], [10 x i8]* %95, i64 %97
%99 = getelementptr inbounds [10 x i8], [10 x i8]* %98, i64 0, i64 0
%100 = load [10 x i8]*, [10 x i8]** %29
%101 = load i32, i32* %40
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [10 x i8], [10 x i8]* %100, i64 %102
%104 = getelementptr inbounds [10 x i8], [10 x i8]* %103, i64 0, i64 0
%105 = call i32* @find_TSVL(i32* %89, i8* %94, i8* %99, i8* %104)
store i32* %105, i32** %19
%106 = load i32*, i32** %20
%107 = load [20 x i8]*, [20 x i8]** %30
%108 = load i32, i32* %36
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [20 x i8], [20 x i8]* %107, i64 %109
%111 = getelementptr inbounds [20 x i8], [20 x i8]* %110, i64 0, i64 0
%112 = load [10 x i8]*, [10 x i8]** %28
%113 = load i32, i32* %37
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [10 x i8], [10 x i8]* %112, i64 %114
%116 = getelementptr inbounds [10 x i8], [10 x i8]* %115, i64 0, i64 0
%117 = load [10 x i8]*, [10 x i8]** %29
%118 = load i32, i32* %40
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [10 x i8], [10 x i8]* %117, i64 %119
%121 = getelementptr inbounds [10 x i8], [10 x i8]* %120, i64 0, i64 0
%122 = call i32* @find_TSVL(i32* %106, i8* %111, i8* %116, i8* %121)
store i32* %122, i32** %20
%123 = load i32*, i32** %19
%124 = icmp eq i32* %123, null
br i1 %124, label %128, label %125
125: ; preds = %88
%126 = load i32*, i32** %20
%127 = icmp eq i32* %126, null
br i1 %127, label %128, label %129
128: ; preds = %125, %88
br label %223
129: ; preds = %125
store i32 1, i32* %41
br label %130
130: ; preds = %143, %129
%131 = load i32, i32* %41
%132 = icmp sle i32 %131, 14
br i1 %132, label %133, label %146
133: ; preds = %130
%134 = getelementptr inbounds [255 x i8], [255 x i8]* %45, i64 0, i64 0
%135 = load i32*, i32** %19
%136 = call i32 @fgets(i8* %134, i32 255, i32* %135)
%137 = getelementptr inbounds [255 x i8], [255 x i8]* %45, i64 0, i64 0
%138 = load i32*, i32** %20
%139 = call i32 @fgets(i8* %137, i32 255, i32* %138)
%140 = load i32*, i32** %21
%141 = getelementptr inbounds [255 x i8], [255 x i8]* %45, i64 0, i64 0
%142 = call i32 (i32*, i8*, ...) @fprintf(i32* %140, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %141)
br label %143
143: ; preds = %133
%144 = load i32, i32* %41
%145 = add nsw i32 %144, 1
store i32 %145, i32* %41
br label %130
146: ; preds = %130
store i32 0, i32* %42
store i32 1, i32* %38
br label %147
147: ; preds = %201, %146
%148 = load i32, i32* %38
%149 = load i32, i32* %26
%150 = icmp sle i32 %148, %149
br i1 %150, label %151, label %204
151: ; preds = %147
store i32 1, i32* %39
br label %152
152: ; preds = %197, %151
%153 = load i32, i32* %39
%154 = load i32, i32* %27
%155 = icmp sle i32 %153, %154
br i1 %155, label %156, label %200
156: ; preds = %152
%157 = load i32*, i32** %19
%158 = call i32 @fscanf(i32* %157, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %43)
%159 = load i32*, i32** %20
%160 = call i32 @fscanf(i32* %159, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %44)
%161 = load i32, i32* %38
%162 = load i32, i32* %34
%163 = icmp sle i32 %161, %162
br i1 %163, label %164, label %196
164: ; preds = %156
%165 = load i32, i32* %38
%166 = load i32, i32* %33
%167 = icmp sge i32 %165, %166
br i1 %167, label %168, label %196
168: ; preds = %164
%169 = load i32, i32* %39
%170 = load i32, i32* %32
%171 = icmp sge i32 %169, %170
br i1 %171, label %172, label %196
172: ; preds = %168
%173 = load i32, i32* %39
%174 = load i32, i32* %31
%175 = icmp sle i32 %173, %174
br i1 %175, label %176, label %196
176: ; preds = %172
%177 = load i32, i32* %42
%178 = add nsw i32 %177, 1
store i32 %178, i32* %42
%179 = load i32, i32* %42
%180 = icmp sge i32 %179, 8
br i1 %180, label %181, label %188
181: ; preds = %176
%182 = load i32*, i32** %21
%183 = load float, float* %43
%184 = load float, float* %44
%185 = fsub float %183, %184
%186 = fpext float %185 to double
%187 = call i32 (i32*, i8*, ...) @fprintf(i32* %182, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %186)
store i32 0, i32* %42
br label %195
188: ; preds = %176
%189 = load i32*, i32** %21
%190 = load float, float* %43
%191 = load float, float* %44
%192 = fsub float %190, %191
%193 = fpext float %192 to double
%194 = call i32 (i32*, i8*, ...) @fprintf(i32* %189, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %193)
br label %195
195: ; preds = %188, %181
br label %196
196: ; preds = %195, %172, %168, %164, %156
br label %197
197: ; preds = %196
%198 = load i32, i32* %39
%199 = add nsw i32 %198, 1
store i32 %199, i32* %39
br label %152
200: ; preds = %152
br label %201
201: ; preds = %200
%202 = load i32, i32* %38
%203 = add nsw i32 %202, 1
store i32 %203, i32* %38
br label %147
204: ; preds = %147
%205 = load i32, i32* %42
%206 = icmp ne i32 %205, 0
br i1 %206, label %207, label %210
207: ; preds = %204
%208 = load i32*, i32** %21
%209 = call i32 (i32*, i8*, ...) @fprintf(i32* %208, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %42
br label %210
210: ; preds = %207, %204
br label %211
211: ; preds = %210
%212 = load i32, i32* %40
%213 = add nsw i32 %212, 1
store i32 %213, i32* %40
br label %60
214: ; preds = %60
br label %215
215: ; preds = %214
%216 = load i32, i32* %37
%217 = add nsw i32 %216, 1
store i32 %217, i32* %37
br label %55
218: ; preds = %55
br label %219
219: ; preds = %218
%220 = load i32, i32* %36
%221 = add nsw i32 %220, 1
store i32 %221, i32* %36
br label %50
222: ; preds = %50
store i32 0, i32* %18
br label %224
223: ; preds = %128
store i32 -1, i32* %18
br label %224
224: ; preds = %223, %222
%225 = load i32, i32* %18
ret i32 %225
}

LLVM IR (-O2):
@.str = [14 x i8] c"[%s][%s][%s]\0A\00"
@.str.2 = [4 x i8] c" %f\00"
@.str.3 = [6 x i8] c"%.6e\0A\00"
@.str.4 = [6 x i8] c"%.6e \00"
define i32 @difference2(i32* %0, i32* %1, i32* nocapture %2, i32 %3, i32 %4, i32 %5, i32* nocapture %6, i32 %7, i32 %8, [10 x i8]* %9, [10 x i8]* %10, [20 x i8]* %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16) {
%18 = alloca float
%19 = alloca float
%20 = alloca [255 x i8]
%21 = bitcast float* %18 to i8*
%22 = bitcast float* %19 to i8*
%23 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%24 = tail call i32 @rewind(i32* %0)
%25 = tail call i32 @rewind(i32* %1)
%26 = icmp sgt i32 %5, 0
br i1 %26, label %27, label %131
27: ; preds = %17
%28 = icmp sgt i32 %3, 0
%29 = icmp eq i32 %16, 1
%30 = icmp slt i32 %7, 1
%31 = icmp slt i32 %8, 1
%32 = zext i32 %5 to i64
%33 = zext i32 %3 to i64
br label %34
34: ; preds = %27, %126
%35 = phi i64 [ 0, %27 ], [ %129, %126 ]
%36 = phi i32* [ %0, %27 ], [ %128, %126 ]
%37 = phi i32* [ %1, %27 ], [ %127, %126 ]
br i1 %28, label %38, label %126
38: ; preds = %34
%39 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 %35, i64 0
br label %40
40: ; preds = %38, %121
%41 = phi i64 [ 0, %38 ], [ %124, %121 ]
%42 = phi i32* [ %36, %38 ], [ %123, %121 ]
%43 = phi i32* [ %37, %38 ], [ %122, %121 ]
%44 = getelementptr inbounds i32, i32* %6, i64 %41
%45 = load i32, i32* %44
%46 = icmp sgt i32 %45, 0
br i1 %46, label %47, label %121
47: ; preds = %40
%48 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 %41, i64 0
br label %49
49: ; preds = %47, %116
%50 = phi i64 [ 0, %47 ], [ %117, %116 ]
%51 = phi i32* [ %42, %47 ], [ %58, %116 ]
%52 = phi i32* [ %43, %47 ], [ %59, %116 ]
br i1 %29, label %53, label %56
53: ; preds = %49
%54 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 %50, i64 0
%55 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %39, i8* %48, i8* %54)
br label %56
56: ; preds = %53, %49
%57 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 %50, i64 0
%58 = call i32* @find_TSVL(i32* %51, i8* %39, i8* %48, i8* %57)
%59 = call i32* @find_TSVL(i32* %52, i8* %39, i8* %48, i8* %57)
%60 = icmp eq i32* %58, null
%61 = icmp eq i32* %59, null
%62 = select i1 %60, i1 true, i1 %61
br i1 %62, label %131, label %64
63: ; preds = %64
br i1 %30, label %116, label %71
64: ; preds = %56, %64
%65 = phi i32 [ %69, %64 ], [ 1, %56 ]
%66 = call i32 @fgets(i8* %23, i32 255, i32* %58)
%67 = call i32 @fgets(i8* %23, i32 255, i32* %59)
%68 = call i32 @fputs(i8* %23, i32* %2)
%69 = add nuw nsw i32 %65, 1
%70 = icmp eq i32 %69, 15
br i1 %70, label %63, label %64
71: ; preds = %63, %108
%72 = phi i32 [ %109, %108 ], [ 0, %63 ]
%73 = phi i32 [ %110, %108 ], [ 1, %63 ]
br i1 %31, label %108, label %74
74: ; preds = %71
%75 = icmp sgt i32 %73, %15
%76 = icmp slt i32 %73, %14
%77 = or i1 %75, %76
br label %78
78: ; preds = %74, %104
%79 = phi i32 [ %72, %74 ], [ %105, %104 ]
%80 = phi i32 [ 1, %74 ], [ %106, %104 ]
%81 = call i32 @fscanf(i32* %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %18)
%82 = call i32 @fscanf(i32* %59, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %19)
%83 = icmp slt i32 %80, %13
%84 = select i1 %77, i1 true, i1 %83
%85 = icmp sgt i32 %80, %12
%86 = select i1 %84, i1 true, i1 %85
br i1 %86, label %104, label %87
87: ; preds = %78
%88 = icmp sgt i32 %79, 6
br i1 %88, label %89, label %93
89: ; preds = %87
%90 = load float, float* %18
%91 = load float, float* %19
%92 = fsub float %90, %91
br label %98
93: ; preds = %87
%94 = add nsw i32 %79, 1
%95 = load float, float* %18
%96 = load float, float* %19
%97 = fsub float %95, %96
br label %98
98: ; preds = %89, %93
%99 = phi float [ %97, %93 ], [ %92, %89 ]
%100 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %93 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %89 ]
%101 = phi i32 [ %94, %93 ], [ 0, %89 ]
%102 = fpext float %99 to double
%103 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* %100, double %102)
br label %104
104: ; preds = %98, %78
%105 = phi i32 [ %79, %78 ], [ %101, %98 ]
%106 = add nuw i32 %80, 1
%107 = icmp eq i32 %80, %8
br i1 %107, label %108, label %78
108: ; preds = %104, %71
%109 = phi i32 [ %72, %71 ], [ %105, %104 ]
%110 = add nuw i32 %73, 1
%111 = icmp eq i32 %73, %7
br i1 %111, label %112, label %71
112: ; preds = %108
%113 = icmp eq i32 %109, 0
br i1 %113, label %116, label %114
114: ; preds = %112
%115 = call i32 @fputc(i32 10, i32* %2)
br label %116
116: ; preds = %63, %112, %114
%117 = add nuw nsw i64 %50, 1
%118 = load i32, i32* %44
%119 = sext i32 %118 to i64
%120 = icmp slt i64 %117, %119
br i1 %120, label %49, label %121
121: ; preds = %116, %40
%122 = phi i32* [ %43, %40 ], [ %59, %116 ]
%123 = phi i32* [ %42, %40 ], [ %58, %116 ]
%124 = add nuw nsw i64 %41, 1
%125 = icmp eq i64 %124, %33
br i1 %125, label %126, label %40
126: ; preds = %121, %34
%127 = phi i32* [ %37, %34 ], [ %122, %121 ]
%128 = phi i32* [ %36, %34 ], [ %123, %121 ]
%129 = add nuw nsw i64 %35, 1
%130 = icmp eq i64 %129, %32
br i1 %130, label %131, label %34
131: ; preds = %126, %56, %17
%132 = phi i32 [ 0, %17 ], [ -1, %56 ], [ 0, %126 ]
ret i32 %132
}