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

/* Variables and functions */
int close(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int pipes_fils_start_close(int num_fils, int **pipes) {
  int indice;
  if (close(pipes[0][0]) == -1) {
    fprintf(stderr, "Erreur lors de fermeture de pipes[0][0] \n");
  }
  for (indice = 1; indice < 5; indice++) {
    if (close(pipes[indice][1]) == -1) {
      fprintf(stderr, "Erreur lors de fermeture de pipes[%d][1] \n", indice);
    }
    if (num_fils != indice) {
      if (close(pipes[indice][0]) == -1) {
        fprintf(stderr, "Erreur lors de fermeture de pipes[%d][0] \n", indice);
      }
    }
  }
  for (indice = 5; indice < 9; indice++) {
    if (num_fils != (indice - 4)) {
      if (indice == 5) {
        if (close(pipes[8][0]) == -1) {
          fprintf(stderr, "Erreur lors de fermeture de pipes[8][0] \n");
        }
      } else {
        if (close(pipes[(indice - 1)][0]) == -1) {
          fprintf(stderr, "Erreur lors de fermeture de pipes[%d][0] \n",
                  indice);
        }
      }
      if (close(pipes[indice][1]) == -1) {
        fprintf(stderr, "Erreur lors de fermeture de pipes[%d][1] \n", indice);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<pipes_fils_start_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    115d <pipes_fils_start_close+0x3d>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    11ff <pipes_fils_start_close+0xdf>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    11a5 <pipes_fils_start_close+0x85>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xe8c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     11ec <pipes_fils_start_close+0xcc>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    11e7 <pipes_fils_start_close+0xc7>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xe75(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    11ec <pipes_fils_start_close+0xcc>
jmp    11f1 <pipes_fils_start_close+0xd1>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1164 <pipes_fils_start_close+0x44>
movl   $0x5,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jge    12ee <pipes_fils_start_close+0x1ce>
mov    -0x4(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x4,%ecx
cmp    %ecx,%eax
je     12db <pipes_fils_start_close+0x1bb>
cmpl   $0x5,-0x14(%rbp)
jne    125f <pipes_fils_start_close+0x13f>
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    125a <pipes_fils_start_close+0x13a>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
lea    0xe2d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    129f <pipes_fils_start_close+0x17f>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    129a <pipes_fils_start_close+0x17a>
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xdc2(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    129f <pipes_fils_start_close+0x17f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    12d6 <pipes_fils_start_close+0x1b6>
mov    0x2d1d(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xd5b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    12db <pipes_fils_start_close+0x1bb>
jmp    12e0 <pipes_fils_start_close+0x1c0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1206 <pipes_fils_start_close+0xe6>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipes_fils_start_close>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    114e <pipes_fils_start_close+0x2e>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x8(%rbx),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     1166 <pipes_fils_start_close+0x46>
cmp    $0x1,%ebp
jne    1187 <pipes_fils_start_close+0x67>
jmp    11b3 <pipes_fils_start_close+0x93>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x1,%ebp
je     11b3 <pipes_fils_start_close+0x93>
mov    0x8(%rbx),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    11b3 <pipes_fils_start_close+0x93>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x10(%rbx),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     11cb <pipes_fils_start_close+0xab>
cmp    $0x2,%ebp
jne    11ec <pipes_fils_start_close+0xcc>
jmp    1218 <pipes_fils_start_close+0xf8>
mov    0x2e0e(%rip),%rax
mov    (%rax),%edi
lea    0xe4f(%rip),%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x2,%ebp
je     1218 <pipes_fils_start_close+0xf8>
mov    0x10(%rbx),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1218 <pipes_fils_start_close+0xf8>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
lea    0xe49(%rip),%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x18(%rbx),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     1230 <pipes_fils_start_close+0x110>
cmp    $0x3,%ebp
jne    1251 <pipes_fils_start_close+0x131>
jmp    127d <pipes_fils_start_close+0x15d>
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
lea    0xdea(%rip),%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x3,%ebp
je     127d <pipes_fils_start_close+0x15d>
mov    0x18(%rbx),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    127d <pipes_fils_start_close+0x15d>
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
lea    0xde4(%rip),%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x20(%rbx),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     1295 <pipes_fils_start_close+0x175>
cmp    $0x4,%ebp
jne    12b6 <pipes_fils_start_close+0x196>
jmp    12c6 <pipes_fils_start_close+0x1a6>
mov    0x2d44(%rip),%rax
mov    (%rax),%edi
lea    0xd85(%rip),%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x4,%ebp
je     12c6 <pipes_fils_start_close+0x1a6>
mov    0x20(%rbx),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     1321 <pipes_fils_start_close+0x201>
cmp    $0x1,%ebp
je     1342 <pipes_fils_start_close+0x222>
mov    0x40(%rbx),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    12f2 <pipes_fils_start_close+0x1d2>
mov    0x2cfe(%rip),%rax
mov    (%rax),%edi
lea    0xd95(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x28(%rbx),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1342 <pipes_fils_start_close+0x222>
mov    0x2cd6(%rip),%rax
mov    (%rax),%edi
lea    0xd17(%rip),%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1342 <pipes_fils_start_close+0x222>
mov    0x2cb8(%rip),%rax
mov    (%rax),%edi
lea    0xd24(%rip),%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x1,%ebp
jne    12cb <pipes_fils_start_close+0x1ab>
cmp    $0x2,%ebp
je     13af <pipes_fils_start_close+0x28f>
mov    0x28(%rbx),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1373 <pipes_fils_start_close+0x253>
mov    0x2c82(%rip),%rax
mov    (%rax),%edi
lea    0xcee(%rip),%rsi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x30(%rbx),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     138e <pipes_fils_start_close+0x26e>
cmp    $0x3,%ebp
jne    13af <pipes_fils_start_close+0x28f>
jmp    1414 <pipes_fils_start_close+0x2f4>
mov    0x2c4b(%rip),%rax
mov    (%rax),%edi
lea    0xc8c(%rip),%rsi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x3,%ebp
je     1414 <pipes_fils_start_close+0x2f4>
mov    0x30(%rbx),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    13db <pipes_fils_start_close+0x2bb>
mov    0x2c1a(%rip),%rax
mov    (%rax),%edi
lea    0xc86(%rip),%rsi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x38(%rbx),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     13f3 <pipes_fils_start_close+0x2d3>
cmp    $0x4,%ebp
jne    1414 <pipes_fils_start_close+0x2f4>
jmp    146d <pipes_fils_start_close+0x34d>
mov    0x2be6(%rip),%rax
mov    (%rax),%edi
lea    0xc27(%rip),%rsi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x4,%ebp
je     146d <pipes_fils_start_close+0x34d>
mov    0x38(%rbx),%rax
mov    (%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1440 <pipes_fils_start_close+0x320>
mov    0x2bb5(%rip),%rax
mov    (%rax),%edi
lea    0xc21(%rip),%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x40(%rbx),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    146d <pipes_fils_start_close+0x34d>
mov    0x2b88(%rip),%rax
mov    (%rax),%edi
lea    0xbc9(%rip),%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"Erreur lors de fermeture de pipes[0][0] \0A\00"
@.str.1 = [43 x i8] c"Erreur lors de fermeture de pipes[%d][1] \0A\00"
@.str.2 = [43 x i8] c"Erreur lors de fermeture de pipes[%d][0] \0A\00"
@.str.3 = [42 x i8] c"Erreur lors de fermeture de pipes[8][0] \0A\00"
define i32 @pipes_fils_start_close(i32 %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i32
store i32 %0, i32* %3
store i32** %1, i32*** %4
%6 = load i32**, i32*** %4
%7 = getelementptr inbounds i32*, i32** %6, i64 0
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = call i32 @close(i32 %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %13, %2
store i32 1, i32* %5
br label %17
17: ; preds = %54, %16
%18 = load i32, i32* %5
%19 = icmp slt i32 %18, 5
br i1 %19, label %20, label %57
20: ; preds = %17
%21 = load i32**, i32*** %4
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32*, i32** %21, i64 %23
%25 = load i32*, i32** %24
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32, i32* %26
%28 = call i32 @close(i32 %27)
%29 = icmp eq i32 %28, -1
br i1 %29, label %30, label %34
30: ; preds = %20
%31 = load i32, i32* @stderr
%32 = load i32, i32* %5
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %30, %20
%35 = load i32, i32* %3
%36 = load i32, i32* %5
%37 = icmp ne i32 %35, %36
br i1 %37, label %38, label %53
38: ; preds = %34
%39 = load i32**, i32*** %4
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i32*, i32** %39, i64 %41
%43 = load i32*, i32** %42
%44 = getelementptr inbounds i32, i32* %43, i64 0
%45 = load i32, i32* %44
%46 = call i32 @close(i32 %45)
%47 = icmp eq i32 %46, -1
br i1 %47, label %48, label %52
48: ; preds = %38
%49 = load i32, i32* @stderr
%50 = load i32, i32* %5
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %50)
br label %52
52: ; preds = %48, %38
br label %53
53: ; preds = %52, %34
br label %54
54: ; preds = %53
%55 = load i32, i32* %5
%56 = add nsw i32 %55, 1
store i32 %56, i32* %5
br label %17
57: ; preds = %17
store i32 5, i32* %5
br label %58
58: ; preds = %113, %57
%59 = load i32, i32* %5
%60 = icmp slt i32 %59, 9
br i1 %60, label %61, label %116
61: ; preds = %58
%62 = load i32, i32* %3
%63 = load i32, i32* %5
%64 = sub nsw i32 %63, 4
%65 = icmp ne i32 %62, %64
br i1 %65, label %66, label %112
66: ; preds = %61
%67 = load i32, i32* %5
%68 = icmp eq i32 %67, 5
br i1 %68, label %69, label %81
69: ; preds = %66
%70 = load i32**, i32*** %4
%71 = getelementptr inbounds i32*, i32** %70, i64 8
%72 = load i32*, i32** %71
%73 = getelementptr inbounds i32, i32* %72, i64 0
%74 = load i32, i32* %73
%75 = call i32 @close(i32 %74)
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %80
77: ; preds = %69
%78 = load i32, i32* @stderr
%79 = call i32 (i32, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
br label %80
80: ; preds = %77, %69
br label %97
81: ; preds = %66
%82 = load i32**, i32*** %4
%83 = load i32, i32* %5
%84 = sub nsw i32 %83, 1
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32*, i32** %82, i64 %85
%87 = load i32*, i32** %86
%88 = getelementptr inbounds i32, i32* %87, i64 0
%89 = load i32, i32* %88
%90 = call i32 @close(i32 %89)
%91 = icmp eq i32 %90, -1
br i1 %91, label %92, label %96
92: ; preds = %81
%93 = load i32, i32* @stderr
%94 = load i32, i32* %5
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %92, %81
br label %97
97: ; preds = %96, %80
%98 = load i32**, i32*** %4
%99 = load i32, i32* %5
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32*, i32** %98, i64 %100
%102 = load i32*, i32** %101
%103 = getelementptr inbounds i32, i32* %102, i64 1
%104 = load i32, i32* %103
%105 = call i32 @close(i32 %104)
%106 = icmp eq i32 %105, -1
br i1 %106, label %107, label %111
107: ; preds = %97
%108 = load i32, i32* @stderr
%109 = load i32, i32* %5
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %108, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %109)
br label %111
111: ; preds = %107, %97
br label %112
112: ; preds = %111, %61
br label %113
113: ; preds = %112
%114 = load i32, i32* %5
%115 = add nsw i32 %114, 1
store i32 %115, i32* %5
br label %58
116: ; preds = %58
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"Erreur lors de fermeture de pipes[0][0] \0A\00"
@.str.1 = [43 x i8] c"Erreur lors de fermeture de pipes[%d][1] \0A\00"
@.str.2 = [43 x i8] c"Erreur lors de fermeture de pipes[%d][0] \0A\00"
@.str.3 = [42 x i8] c"Erreur lors de fermeture de pipes[8][0] \0A\00"
define i32 @pipes_fils_start_close(i32 %0, i32** nocapture %1) {
%3 = load i32*, i32** %1
%4 = load i32, i32* %3
%5 = tail call i32 @close(i32 %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %2
%11 = getelementptr inbounds i32*, i32** %1, i64 1
%12 = load i32*, i32** %11
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = tail call i32 @close(i32 %14)
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %20
17: ; preds = %10
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %20
20: ; preds = %17, %10
%21 = icmp eq i32 %0, 1
br i1 %21, label %30, label %22
22: ; preds = %20
%23 = load i32*, i32** %11
%24 = load i32, i32* %23
%25 = tail call i32 @close(i32 %24)
%26 = icmp eq i32 %25, -1
br i1 %26, label %27, label %30
27: ; preds = %22
%28 = load i32, i32* @stderr
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 1)
br label %30
30: ; preds = %20, %27, %22
%31 = getelementptr inbounds i32*, i32** %1, i64 2
%32 = load i32*, i32** %31
%33 = getelementptr inbounds i32, i32* %32, i64 1
%34 = load i32, i32* %33
%35 = tail call i32 @close(i32 %34)
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %40
37: ; preds = %30
%38 = load i32, i32* @stderr
%39 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 2)
br label %40
40: ; preds = %37, %30
%41 = icmp eq i32 %0, 2
br i1 %41, label %50, label %42
42: ; preds = %40
%43 = load i32*, i32** %31
%44 = load i32, i32* %43
%45 = tail call i32 @close(i32 %44)
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %50
47: ; preds = %42
%48 = load i32, i32* @stderr
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 2)
br label %50
50: ; preds = %47, %42, %40
%51 = getelementptr inbounds i32*, i32** %1, i64 3
%52 = load i32*, i32** %51
%53 = getelementptr inbounds i32, i32* %52, i64 1
%54 = load i32, i32* %53
%55 = tail call i32 @close(i32 %54)
%56 = icmp eq i32 %55, -1
br i1 %56, label %57, label %60
57: ; preds = %50
%58 = load i32, i32* @stderr
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 3)
br label %60
60: ; preds = %57, %50
%61 = icmp eq i32 %0, 3
br i1 %61, label %70, label %62
62: ; preds = %60
%63 = load i32*, i32** %51
%64 = load i32, i32* %63
%65 = tail call i32 @close(i32 %64)
%66 = icmp eq i32 %65, -1
br i1 %66, label %67, label %70
67: ; preds = %62
%68 = load i32, i32* @stderr
%69 = tail call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 3)
br label %70
70: ; preds = %67, %62, %60
%71 = getelementptr inbounds i32*, i32** %1, i64 4
%72 = load i32*, i32** %71
%73 = getelementptr inbounds i32, i32* %72, i64 1
%74 = load i32, i32* %73
%75 = tail call i32 @close(i32 %74)
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %80
77: ; preds = %70
%78 = load i32, i32* @stderr
%79 = tail call i32 (i32, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 4)
br label %80
80: ; preds = %77, %70
%81 = icmp eq i32 %0, 4
br i1 %81, label %90, label %82
82: ; preds = %80
%83 = load i32*, i32** %71
%84 = load i32, i32* %83
%85 = tail call i32 @close(i32 %84)
%86 = icmp eq i32 %85, -1
br i1 %86, label %87, label %90
87: ; preds = %82
%88 = load i32, i32* @stderr
%89 = tail call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 4)
br label %90
90: ; preds = %87, %82, %80
br i1 %21, label %110, label %91
91: ; preds = %90
%92 = getelementptr inbounds i32*, i32** %1, i64 8
%93 = load i32*, i32** %92
%94 = load i32, i32* %93
%95 = tail call i32 @close(i32 %94)
%96 = icmp eq i32 %95, -1
br i1 %96, label %97, label %100
97: ; preds = %91
%98 = load i32, i32* @stderr
%99 = tail call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
br label %100
100: ; preds = %97, %91
%101 = getelementptr inbounds i32*, i32** %1, i64 5
%102 = load i32*, i32** %101
%103 = getelementptr inbounds i32, i32* %102, i64 1
%104 = load i32, i32* %103
%105 = tail call i32 @close(i32 %104)
%106 = icmp eq i32 %105, -1
br i1 %106, label %107, label %110
107: ; preds = %100
%108 = load i32, i32* @stderr
%109 = tail call i32 (i32, i8*, ...) @fprintf(i32 %108, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 5)
br label %110
110: ; preds = %107, %100, %90
%111 = icmp eq i32 %0, 2
br i1 %111, label %133, label %112
112: ; preds = %110
%113 = getelementptr inbounds i32*, i32** %1, i64 5
%114 = load i32*, i32** %113
%115 = load i32, i32* %114
%116 = tail call i32 @close(i32 %115)
%117 = icmp eq i32 %116, -1
br i1 %117, label %118, label %121
118: ; preds = %112
%119 = load i32, i32* @stderr
%120 = tail call i32 (i32, i8*, ...) @fprintf(i32 %119, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 6)
br label %121
121: ; preds = %112, %118
%122 = getelementptr inbounds i32*, i32** %1, i64 6
%123 = load i32*, i32** %122
%124 = getelementptr inbounds i32, i32* %123, i64 1
%125 = load i32, i32* %124
%126 = tail call i32 @close(i32 %125)
%127 = icmp eq i32 %126, -1
br i1 %127, label %128, label %131
128: ; preds = %121
%129 = load i32, i32* @stderr
%130 = tail call i32 (i32, i8*, ...) @fprintf(i32 %129, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 6)
br label %131
131: ; preds = %128, %121
%132 = icmp eq i32 %0, 3
br i1 %132, label %154, label %133
133: ; preds = %131, %110
%134 = getelementptr inbounds i32*, i32** %1, i64 6
%135 = load i32*, i32** %134
%136 = load i32, i32* %135
%137 = tail call i32 @close(i32 %136)
%138 = icmp eq i32 %137, -1
br i1 %138, label %139, label %142
139: ; preds = %133
%140 = load i32, i32* @stderr
%141 = tail call i32 (i32, i8*, ...) @fprintf(i32 %140, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 7)
br label %142
142: ; preds = %139, %133
%143 = getelementptr inbounds i32*, i32** %1, i64 7
%144 = load i32*, i32** %143
%145 = getelementptr inbounds i32, i32* %144, i64 1
%146 = load i32, i32* %145
%147 = tail call i32 @close(i32 %146)
%148 = icmp eq i32 %147, -1
br i1 %148, label %149, label %152
149: ; preds = %142
%150 = load i32, i32* @stderr
%151 = tail call i32 (i32, i8*, ...) @fprintf(i32 %150, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 7)
br label %152
152: ; preds = %149, %142
%153 = icmp eq i32 %0, 4
br i1 %153, label %173, label %154
154: ; preds = %131, %152
%155 = getelementptr inbounds i32*, i32** %1, i64 7
%156 = load i32*, i32** %155
%157 = load i32, i32* %156
%158 = tail call i32 @close(i32 %157)
%159 = icmp eq i32 %158, -1
br i1 %159, label %160, label %163
160: ; preds = %154
%161 = load i32, i32* @stderr
%162 = tail call i32 (i32, i8*, ...) @fprintf(i32 %161, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 8)
br label %163
163: ; preds = %160, %154
%164 = getelementptr inbounds i32*, i32** %1, i64 8
%165 = load i32*, i32** %164
%166 = getelementptr inbounds i32, i32* %165, i64 1
%167 = load i32, i32* %166
%168 = tail call i32 @close(i32 %167)
%169 = icmp eq i32 %168, -1
br i1 %169, label %170, label %173
170: ; preds = %163
%171 = load i32, i32* @stderr
%172 = tail call i32 (i32, i8*, ...) @fprintf(i32 %171, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 8)
br label %173
173: ; preds = %170, %163, %152
ret i32 0
}