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

/* Variables and functions */
int /*<<< orphan*/ fgetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *find_TS(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ *find_VL(int /*<<< orphan*/ *, char *, char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, float *);
int /*<<< orphan*/ fsetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int extract(FILE *fpin, 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;
  fpos_t fpin_pos;
  char inStr[255];
  rewind(fpin);
  fgetpos(fpin, &fpin_pos);
  for (it = 0; it < NumTimes; it++) {
    fsetpos(fpin, &fpin_pos);
    fpin = find_TS(fpin, TStepName[it]);
    if (fpin == NULL)
      goto err;
    fgetpos(fpin, &fpin_pos);
    for (iv = 0; iv < NumVars; iv++) {
      for (il = 0; il < Nl[iv]; il++) {
        fsetpos(fpin, &fpin_pos);
        fpin = find_VL(fpin, VarName[iv], LevName[il], TStepName[it]);
        if (flag_i == 1)
          printf("[%s][%s][%s]\n", TStepName[it], VarName[iv], LevName[il]);
        if (fpin == NULL)
          goto err;
        for (skip = 1; skip <= 14; skip++) {
          fgets(inStr, 255, fpin);
          fprintf(fpout, "%s", inStr);
        }
        val_cnt = 0;
        for (ir = 1; ir <= Nr; ir++) {
          for (ic = 1; ic <= Nc; ic++) {
            fscanf(fpin, " %f", &val);
            if ((ir <= south_bound) && (ir >= north_bound) &&
                (ic >= west_bound) && (ic <= east_bound)) {
              val_cnt++;
              if (val_cnt >= 8) {
                fprintf(fpout, "%.6e\n", val);
                val_cnt = 0;
              } else
                fprintf(fpout, "%.6e ", val);
            }
          }
        }
        if (val_cnt != 0) {
          fprintf(fpout, "\n");
          val_cnt = 0;
        }
      }
    }
  }
  return 0;
err:
  return -1;
}


x86 assembly (clang, -O0):
<extract>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <rewind@plt>
mov    -0x10(%rbp),%rdi
lea    -0x54(%rbp),%rsi
call   1040 <fgetpos@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    14a3 <extract+0x313>
mov    -0x10(%rbp),%rdi
lea    -0x54(%rbp),%rsi
call   10b0 <fsetpos@plt>
mov    -0x10(%rbp),%rdi
mov    0x30(%rbp),%rsi
movslq -0x34(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rsi
call   1060 <find_TS@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1234 <extract+0xa4>
jmp    14af <extract+0x31f>
mov    -0x10(%rbp),%rdi
lea    -0x54(%rbp),%rsi
call   1040 <fgetpos@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1490 <extract+0x300>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x30(%rbp),%rcx
movslq -0x38(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    147d <extract+0x2ed>
mov    -0x10(%rbp),%rdi
lea    -0x54(%rbp),%rsi
call   10b0 <fsetpos@plt>
mov    -0x10(%rbp),%rdi
mov    0x20(%rbp),%rsi
movslq -0x38(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rsi
mov    0x28(%rbp),%rdx
movslq -0x44(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rdx
mov    0x30(%rbp),%rcx
movslq -0x34(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rcx
call   10a0 <find_VL@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x1,0x58(%rbp)
jne    12f9 <extract+0x169>
mov    0x30(%rbp),%rsi
movslq -0x34(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rsi
mov    0x20(%rbp),%rdx
movslq -0x38(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rdx
mov    0x28(%rbp),%rcx
movslq -0x44(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rcx
lea    0xd0c(%rip),%rdi
call   1030 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1309 <extract+0x179>
jmp    14af <extract+0x31f>
movl   $0x1,-0x48(%rbp)
cmpl   $0xe,-0x48(%rbp)
jg     1356 <extract+0x1c6>
lea    -0x160(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0xff,%esi
call   1080 <fgets@plt>
mov    -0x18(%rbp),%rdi
lea    -0x160(%rbp),%rdx
lea    0xccd(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1310 <extract+0x180>
movl   $0x0,-0x4c(%rbp)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     1447 <extract+0x2b7>
movl   $0x1,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     1434 <extract+0x2a4>
mov    -0x10(%rbp),%rdi
lea    0xc83(%rip),%rsi
lea    -0x50(%rbp),%rdx
call   1070 <fscanf@plt>
mov    -0x3c(%rbp),%eax
cmp    0x50(%rbp),%eax
jg     1421 <extract+0x291>
mov    -0x3c(%rbp),%eax
cmp    0x48(%rbp),%eax
jl     1421 <extract+0x291>
mov    -0x40(%rbp),%eax
cmp    0x40(%rbp),%eax
jl     1421 <extract+0x291>
mov    -0x40(%rbp),%eax
cmp    0x38(%rbp),%eax
jg     1421 <extract+0x291>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
cmpl   $0x8,-0x4c(%rbp)
jl     1401 <extract+0x271>
mov    -0x18(%rbp),%rdi
movss  -0x50(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc27(%rip),%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movl   $0x0,-0x4c(%rbp)
jmp    141c <extract+0x28c>
mov    -0x18(%rbp),%rdi
movss  -0x50(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc06(%rip),%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
jmp    1421 <extract+0x291>
jmp    1426 <extract+0x296>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1377 <extract+0x1e7>
jmp    1439 <extract+0x2a9>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1364 <extract+0x1d4>
cmpl   $0x0,-0x4c(%rbp)
je     146a <extract+0x2da>
mov    -0x18(%rbp),%rdi
lea    0xbb0(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x0,-0x4c(%rbp)
jmp    146f <extract+0x2df>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    125b <extract+0xcb>
jmp    1482 <extract+0x2f2>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1248 <extract+0xb8>
jmp    1495 <extract+0x305>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11ef <extract+0x5f>
movl   $0x0,-0x4(%rbp)
jmp    14b6 <extract+0x326>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %r9,0x28(%rsp)
mov    %r8d,%r12d
mov    %edx,%ebp
mov    %rsi,0x10(%rsp)
mov    %rdi,%r15
call   1050 <rewind@plt>
lea    0xc(%rsp),%rsi
mov    %r15,%rdi
call   1040 <fgetpos@plt>
test   %r12d,%r12d
jle    161c <extract+0x46c>
mov    0x1e0(%rsp),%ebx
mov    0x1d0(%rsp),%r14
mov    0x1b8(%rsp),%eax
mov    %r12d,%ecx
mov    %rcx,0x38(%rsp)
mov    %ebp,%ecx
mov    %rcx,0x48(%rsp)
neg    %eax
mov    %rax,0x68(%rsp)
lea    0xc(%rsp),%r12
xor    %r13d,%r13d
mov    %ebp,0x18(%rsp)
mov    %r15,%rdi
mov    %r12,%rsi
call   10d0 <fsetpos@plt>
lea    0x0(,%r13,4),%rax
add    %r13,%rax
lea    (%r14,%rax,4),%rsi
mov    %r15,%rdi
mov    %rsi,0x20(%rsp)
call   1060 <find_TS@plt>
mov    %rax,%r15
mov    $0xffffffff,%eax
test   %r15,%r15
je     1625 <extract+0x475>
mov    %r13,0x40(%rsp)
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <fgetpos@plt>
mov    0x18(%rsp),%ebp
test   %ebp,%ebp
jle    1600 <extract+0x450>
xor    %ecx,%ecx
mov    0x20(%rsp),%r13
jmp    129f <extract+0xef>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rcx
cmp    0x48(%rsp),%rcx
je     1600 <extract+0x450>
mov    0x28(%rsp),%rax
cmpl   $0x0,(%rax,%rcx,4)
jle    1290 <extract+0xe0>
lea    (%rcx,%rcx,4),%rax
mov    %rcx,0x50(%rsp)
mov    0x1c0(%rsp),%rcx
lea    (%rcx,%rax,2),%rax
mov    %rax,0x30(%rsp)
xor    %ebp,%ebp
jmp    12ec <extract+0x13c>
nopl   0x0(%rax,%rax,1)
mov    0x58(%rsp),%rbp
add    $0x1,%rbp
mov    0x28(%rsp),%rax
mov    0x50(%rsp),%rcx
movslq (%rax,%rcx,4),%rax
cmp    %rax,%rbp
jge    1290 <extract+0xe0>
mov    %r15,%rdi
mov    %r12,%rsi
call   10d0 <fsetpos@plt>
lea    0x0(,%rbp,4),%rax
add    %rbp,%rax
mov    0x1c8(%rsp),%rcx
lea    (%rcx,%rax,2),%r14
mov    %r15,%rdi
mov    0x30(%rsp),%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   10c0 <find_VL@plt>
mov    %rax,%r15
cmpl   $0x1,0x1f8(%rsp)
01
jne    1345 <extract+0x195>
lea    0xccb(%rip),%rdi
mov    %r13,%rsi
mov    0x30(%rsp),%rdx
mov    %r14,%rcx
call   1030 <printf@plt>
test   %r15,%r15
je     1620 <extract+0x470>
mov    %rbp,0x58(%rsp)
lea    0x70(%rsp),%r14
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    0x10(%rsp),%rbp
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
mov    $0xff,%esi
mov    %r15,%rdx
call   10a0 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <fputs@plt>
cmpl   $0x0,0x1b0(%rsp)
jle    12d0 <extract+0x120>
mov    $0x1,%ecx
xor    %ebp,%ebp
jmp    1507 <extract+0x357>
xchg   %ax,%ax
mov    0x60(%rsp),%rcx
lea    0x1(%rcx),%eax
cmp    0x1b0(%rsp),%ecx
mov    %eax,%ecx
je     15d0 <extract+0x420>
cmpl   $0x0,0x1b8(%rsp)
mov    %rcx,0x60(%rsp)
jle    14f0 <extract+0x340>
cmp    0x1f0(%rsp),%ecx
setg   %al
cmp    0x1e8(%rsp),%ecx
setl   %r13b
or     %al,%r13b
mov    $0x1,%r12d
jmp    1559 <extract+0x3a9>
cs nopw 0x0(%rax,%rax,1)
mov    0x68(%rsp),%rax
add    %r12d,%eax
add    $0x1,%eax
mov    %r12d,%ecx
add    $0x1,%ecx
mov    %ecx,%r12d
cmp    $0x1,%eax
je     14f0 <extract+0x340>
mov    %r15,%rdi
lea    0xaab(%rip),%rsi
lea    0x1c(%rsp),%rdx
call   1080 <fscanf@plt>
cmp    %ebx,%r12d
setl   %al
or     %r13b,%al
jne    1540 <extract+0x390>
cmp    0x1d8(%rsp),%r12d
jg     1540 <extract+0x390>
mov    %r15,%r14
lea    0x1(%rbp),%r15d
cmp    $0x7,%ebp
lea    0xa85(%rip),%rsi
lea    0xa78(%rip),%rax
cmovge %rax,%rsi
movss  0x1c(%rsp),%xmm0
mov    $0x0,%eax
cmovge %eax,%r15d
cvtss2sd %xmm0,%xmm0
mov    0x10(%rsp),%rdi
mov    $0x1,%al
call   10b0 <fprintf@plt>
mov    %r15d,%ebp
mov    %r14,%r15
jmp    1540 <extract+0x390>
nopl   0x0(%rax,%rax,1)
test   %ebp,%ebp
lea    0xc(%rsp),%r12
mov    0x20(%rsp),%r13
je     12d0 <extract+0x120>
mov    $0xa,%edi
mov    0x10(%rsp),%rsi
call   1090 <fputc@plt>
jmp    12d0 <extract+0x120>
cs nopw 0x0(%rax,%rax,1)
mov    0x40(%rsp),%r13
add    $0x1,%r13
cmp    0x38(%rsp),%r13
mov    0x1d0(%rsp),%r14
jne    1226 <extract+0x76>
xor    %eax,%eax
jmp    1625 <extract+0x475>
mov    $0xffffffff,%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 @extract(i32* %0, i32* %1, i32 %2, i32 %3, i32 %4, i32* %5, i32 %6, i32 %7, [10 x i8]* %8, [10 x i8]* %9, [20 x i8]* %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15) {
%17 = alloca i32
%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 [10 x i8]*
%27 = alloca [10 x i8]*
%28 = alloca [20 x i8]*
%29 = alloca i32
%30 = alloca i32
%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 float
%42 = alloca i32
%43 = alloca [255 x i8]
store i32* %0, i32** %18
store i32* %1, i32** %19
store i32 %2, i32* %20
store i32 %3, i32* %21
store i32 %4, i32* %22
store i32* %5, i32** %23
store i32 %6, i32* %24
store i32 %7, i32* %25
store [10 x i8]* %8, [10 x i8]** %26
store [10 x i8]* %9, [10 x i8]** %27
store [20 x i8]* %10, [20 x i8]** %28
store i32 %11, i32* %29
store i32 %12, i32* %30
store i32 %13, i32* %31
store i32 %14, i32* %32
store i32 %15, i32* %33
%44 = load i32*, i32** %18
%45 = call i32 @rewind(i32* %44)
%46 = load i32*, i32** %18
%47 = call i32 @fgetpos(i32* %46, i32* %42)
store i32 0, i32* %34
br label %48
48: ; preds = %205, %16
%49 = load i32, i32* %34
%50 = load i32, i32* %22
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %208
52: ; preds = %48
%53 = load i32*, i32** %18
%54 = call i32 @fsetpos(i32* %53, i32* %42)
%55 = load i32*, i32** %18
%56 = load [20 x i8]*, [20 x i8]** %28
%57 = load i32, i32* %34
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [20 x i8], [20 x i8]* %56, i64 %58
%60 = getelementptr inbounds [20 x i8], [20 x i8]* %59, i64 0, i64 0
%61 = call i32* @find_TS(i32* %55, i8* %60)
store i32* %61, i32** %18
%62 = load i32*, i32** %18
%63 = icmp eq i32* %62, null
br i1 %63, label %64, label %65
64: ; preds = %52
br label %209
65: ; preds = %52
%66 = load i32*, i32** %18
%67 = call i32 @fgetpos(i32* %66, i32* %42)
store i32 0, i32* %35
br label %68
68: ; preds = %201, %65
%69 = load i32, i32* %35
%70 = load i32, i32* %20
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %204
72: ; preds = %68
store i32 0, i32* %38
br label %73
73: ; preds = %197, %72
%74 = load i32, i32* %38
%75 = load i32*, i32** %23
%76 = load i32, i32* %35
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i32, i32* %75, i64 %77
%79 = load i32, i32* %78
%80 = icmp slt i32 %74, %79
br i1 %80, label %81, label %200
81: ; preds = %73
%82 = load i32*, i32** %18
%83 = call i32 @fsetpos(i32* %82, i32* %42)
%84 = load i32*, i32** %18
%85 = load [10 x i8]*, [10 x i8]** %26
%86 = load i32, i32* %35
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [10 x i8], [10 x i8]* %85, i64 %87
%89 = getelementptr inbounds [10 x i8], [10 x i8]* %88, i64 0, i64 0
%90 = load [10 x i8]*, [10 x i8]** %27
%91 = load i32, i32* %38
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [10 x i8], [10 x i8]* %90, i64 %92
%94 = getelementptr inbounds [10 x i8], [10 x i8]* %93, i64 0, i64 0
%95 = load [20 x i8]*, [20 x i8]** %28
%96 = load i32, i32* %34
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [20 x i8], [20 x i8]* %95, i64 %97
%99 = getelementptr inbounds [20 x i8], [20 x i8]* %98, i64 0, i64 0
%100 = call i32* @find_VL(i32* %84, i8* %89, i8* %94, i8* %99)
store i32* %100, i32** %18
%101 = load i32, i32* %33
%102 = icmp eq i32 %101, 1
br i1 %102, label %103, label %120
103: ; preds = %81
%104 = load [20 x i8]*, [20 x i8]** %28
%105 = load i32, i32* %34
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [20 x i8], [20 x i8]* %104, i64 %106
%108 = getelementptr inbounds [20 x i8], [20 x i8]* %107, i64 0, i64 0
%109 = load [10 x i8]*, [10 x i8]** %26
%110 = load i32, i32* %35
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [10 x i8], [10 x i8]* %109, i64 %111
%113 = getelementptr inbounds [10 x i8], [10 x i8]* %112, i64 0, i64 0
%114 = load [10 x i8]*, [10 x i8]** %27
%115 = load i32, i32* %38
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [10 x i8], [10 x i8]* %114, i64 %116
%118 = getelementptr inbounds [10 x i8], [10 x i8]* %117, i64 0, i64 0
%119 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %108, i8* %113, i8* %118)
br label %120
120: ; preds = %103, %81
%121 = load i32*, i32** %18
%122 = icmp eq i32* %121, null
br i1 %122, label %123, label %124
123: ; preds = %120
br label %209
124: ; preds = %120
store i32 1, i32* %39
br label %125
125: ; preds = %135, %124
%126 = load i32, i32* %39
%127 = icmp sle i32 %126, 14
br i1 %127, label %128, label %138
128: ; preds = %125
%129 = getelementptr inbounds [255 x i8], [255 x i8]* %43, i64 0, i64 0
%130 = load i32*, i32** %18
%131 = call i32 @fgets(i8* %129, i32 255, i32* %130)
%132 = load i32*, i32** %19
%133 = getelementptr inbounds [255 x i8], [255 x i8]* %43, i64 0, i64 0
%134 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %133)
br label %135
135: ; preds = %128
%136 = load i32, i32* %39
%137 = add nsw i32 %136, 1
store i32 %137, i32* %39
br label %125
138: ; preds = %125
store i32 0, i32* %40
store i32 1, i32* %36
br label %139
139: ; preds = %187, %138
%140 = load i32, i32* %36
%141 = load i32, i32* %24
%142 = icmp sle i32 %140, %141
br i1 %142, label %143, label %190
143: ; preds = %139
store i32 1, i32* %37
br label %144
144: ; preds = %183, %143
%145 = load i32, i32* %37
%146 = load i32, i32* %25
%147 = icmp sle i32 %145, %146
br i1 %147, label %148, label %186
148: ; preds = %144
%149 = load i32*, i32** %18
%150 = call i32 @fscanf(i32* %149, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %41)
%151 = load i32, i32* %36
%152 = load i32, i32* %32
%153 = icmp sle i32 %151, %152
br i1 %153, label %154, label %182
154: ; preds = %148
%155 = load i32, i32* %36
%156 = load i32, i32* %31
%157 = icmp sge i32 %155, %156
br i1 %157, label %158, label %182
158: ; preds = %154
%159 = load i32, i32* %37
%160 = load i32, i32* %30
%161 = icmp sge i32 %159, %160
br i1 %161, label %162, label %182
162: ; preds = %158
%163 = load i32, i32* %37
%164 = load i32, i32* %29
%165 = icmp sle i32 %163, %164
br i1 %165, label %166, label %182
166: ; preds = %162
%167 = load i32, i32* %40
%168 = add nsw i32 %167, 1
store i32 %168, i32* %40
%169 = load i32, i32* %40
%170 = icmp sge i32 %169, 8
br i1 %170, label %171, label %176
171: ; preds = %166
%172 = load i32*, i32** %19
%173 = load float, float* %41
%174 = fpext float %173 to double
%175 = call i32 (i32*, i8*, ...) @fprintf(i32* %172, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %174)
store i32 0, i32* %40
br label %181
176: ; preds = %166
%177 = load i32*, i32** %19
%178 = load float, float* %41
%179 = fpext float %178 to double
%180 = call i32 (i32*, i8*, ...) @fprintf(i32* %177, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %179)
br label %181
181: ; preds = %176, %171
br label %182
182: ; preds = %181, %162, %158, %154, %148
br label %183
183: ; preds = %182
%184 = load i32, i32* %37
%185 = add nsw i32 %184, 1
store i32 %185, i32* %37
br label %144
186: ; preds = %144
br label %187
187: ; preds = %186
%188 = load i32, i32* %36
%189 = add nsw i32 %188, 1
store i32 %189, i32* %36
br label %139
190: ; preds = %139
%191 = load i32, i32* %40
%192 = icmp ne i32 %191, 0
br i1 %192, label %193, label %196
193: ; preds = %190
%194 = load i32*, i32** %19
%195 = call i32 (i32*, i8*, ...) @fprintf(i32* %194, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %40
br label %196
196: ; preds = %193, %190
br label %197
197: ; preds = %196
%198 = load i32, i32* %38
%199 = add nsw i32 %198, 1
store i32 %199, i32* %38
br label %73
200: ; preds = %73
br label %201
201: ; preds = %200
%202 = load i32, i32* %35
%203 = add nsw i32 %202, 1
store i32 %203, i32* %35
br label %68
204: ; preds = %68
br label %205
205: ; preds = %204
%206 = load i32, i32* %34
%207 = add nsw i32 %206, 1
store i32 %207, i32* %34
br label %48
208: ; preds = %48
store i32 0, i32* %17
br label %210
209: ; preds = %123, %64
store i32 -1, i32* %17
br label %210
210: ; preds = %209, %208
%211 = load i32, i32* %17
ret i32 %211
}

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