#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*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ *tmpfile();
void revindexFilesOpenNET(FILE *revindexFilesHa[]) {
  int i;
  for (i = 0; i < 64; i++) {
    if ((revindexFilesHa[i] = tmpfile()) == NULL) {
      perror("tmpfile");
      exit(1);
    }
  }
}


x86 assembly (clang, -O0):
<revindexFilesOpenNET>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1193 <revindexFilesOpenNET+0x63>
mov    $0x0,%al
call   1030 <tmpfile@plt>
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
mov    %rax,(%rcx,%rdx,8)
cmp    $0x0,%rax
jne    1180 <revindexFilesOpenNET+0x50>
lea    0xe8f(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    1185 <revindexFilesOpenNET+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <revindexFilesOpenNET+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<revindexFilesOpenNET>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <tmpfile@plt>
mov    %rax,(%r14,%rbx,8)
test   %rax,%rax
je     1162 <revindexFilesOpenNET+0x32>
add    $0x1,%rbx
cmp    $0x40,%rbx
jne    1140 <revindexFilesOpenNET+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe97(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"tmpfile\00"
define void @revindexFilesOpenNET(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 64
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = call i32* (...) @tmpfile()
%9 = load i32**, i32*** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32*, i32** %9, i64 %11
store i32* %8, i32** %12
%13 = icmp eq i32* %8, null
br i1 %13, label %14, label %17
14: ; preds = %7
%15 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %7
br label %18
18: ; preds = %17
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"tmpfile\00"
define void @revindexFilesOpenNET(i32** nocapture writeonly %0) {
br label %5
2: ; preds = %5
%3 = add nuw nsw i64 %6, 1
%4 = icmp eq i64 %3, 64
br i1 %4, label %13, label %5
5: ; preds = %1, %2
%6 = phi i64 [ 0, %1 ], [ %3, %2 ]
%7 = tail call i32* (...) @tmpfile()
%8 = getelementptr inbounds i32*, i32** %0, i64 %6
store i32* %7, i32** %8
%9 = icmp eq i32* %7, null
br i1 %9, label %10, label %2
10: ; preds = %5
%11 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %2
ret void
}