#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*/ feof(int /*<<< orphan*/ *);
int have_more_data(FILE **fp, int count) {
  size_t i;
  for (i = 1; i < count; i++) {
    if (!feof(fp[i]))
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<have_more_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movq   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmp    %rcx,%rax
jae    1174 <have_more_data+0x64>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <feof@plt>
cmp    $0x0,%eax
jne    115e <have_more_data+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    117b <have_more_data+0x6b>
jmp    1163 <have_more_data+0x53>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1127 <have_more_data+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<have_more_data>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
cmp    $0x2,%esi
jb     114e <have_more_data+0x3e>
mov    %rdi,%r15
movslq %esi,%rbp
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <feof@plt>
test   %eax,%eax
je     1148 <have_more_data+0x38>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <have_more_data+0x20>
jmp    114e <have_more_data+0x3e>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @have_more_data(i32** %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i64
store i32** %0, i32*** %4
store i32 %1, i32* %5
store i64 1, i64* %6
br label %7
7: ; preds = %21, %2
%8 = load i64, i64* %6
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = icmp ult i64 %8, %10
br i1 %11, label %12, label %24
12: ; preds = %7
%13 = load i32**, i32*** %4
%14 = load i64, i64* %6
%15 = getelementptr inbounds i32*, i32** %13, i64 %14
%16 = load i32*, i32** %15
%17 = call i32 @feof(i32* %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %12
store i32 1, i32* %3
br label %25
20: ; preds = %12
br label %21
21: ; preds = %20
%22 = load i64, i64* %6
%23 = add i64 %22, 1
store i64 %23, i64* %6
br label %7
24: ; preds = %7
store i32 0, i32* %3
br label %25
25: ; preds = %24, %19
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @have_more_data(i32** nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = icmp ugt i32 %1, 1
br i1 %4, label %7, label %14
5: ; preds = %7
%6 = icmp eq i64 %13, %3
br i1 %6, label %14, label %7
7: ; preds = %2, %5
%8 = phi i64 [ %13, %5 ], [ 1, %2 ]
%9 = getelementptr inbounds i32*, i32** %0, i64 %8
%10 = load i32*, i32** %9
%11 = tail call i32 @feof(i32* %10)
%12 = icmp eq i32 %11, 0
%13 = add nuw i64 %8, 1
br i1 %12, label %14, label %5
14: ; preds = %7, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %7 ]
ret i32 %15
}