#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 */
scalar_t__ Ptngc_magic(int const);
unsigned int positive_int(int const);
int is_quite_large(const int *input, const int small_index,
                   const int max_large_index) {
  int is = 0;
  int i;
  if (small_index + 3 >= max_large_index)
    is = 1;
  else {
    for (i = 0; i < 3; i++)
      if (positive_int(input[i]) > (unsigned int)Ptngc_magic(small_index + 3)) {
        is = 1;
        break;
      }
  }
  return is;
}


x86 assembly (clang, -O0):
<is_quite_large>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3,%eax
cmp    -0x10(%rbp),%eax
jl     1154 <is_quite_large+0x34>
movl   $0x1,-0x14(%rbp)
jmp    11b5 <is_quite_large+0x95>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    11b0 <is_quite_large+0x90>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <positive_int@plt>
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
add    $0x3,%edi
call   1040 <Ptngc_magic@plt>
mov    %rax,%rcx
mov    -0x1c(%rbp),%eax
cmp    %ecx,%eax
jbe    119d <is_quite_large+0x7d>
movl   $0x1,-0x14(%rbp)
jmp    11b0 <is_quite_large+0x90>
jmp    11a2 <is_quite_large+0x82>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115b <is_quite_large+0x3b>
jmp    11b5 <is_quite_large+0x95>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_quite_large>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
add    $0x3,%ebp
mov    $0x1,%ebx
cmp    %edx,%ebp
jge    1181 <is_quite_large+0x61>
mov    %rdi,%r14
mov    (%rdi),%edi
call   1030 <positive_int@plt>
mov    %eax,%r15d
mov    %ebp,%edi
call   1040 <Ptngc_magic@plt>
cmp    %eax,%r15d
ja     1181 <is_quite_large+0x61>
mov    0x4(%r14),%edi
call   1030 <positive_int@plt>
mov    %eax,%r15d
mov    %ebp,%edi
call   1040 <Ptngc_magic@plt>
cmp    %eax,%r15d
ja     1181 <is_quite_large+0x61>
mov    0x8(%r14),%edi
call   1030 <positive_int@plt>
mov    %eax,%r14d
mov    %ebp,%edi
call   1040 <Ptngc_magic@plt>
xor    %ebx,%ebx
cmp    %eax,%r14d
seta   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_quite_large(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 3
%11 = load i32, i32* %6
%12 = icmp sge i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 1, i32* %7
br label %36
14: ; preds = %3
store i32 0, i32* %8
br label %15
15: ; preds = %32, %14
%16 = load i32, i32* %8
%17 = icmp slt i32 %16, 3
br i1 %17, label %18, label %35
18: ; preds = %15
%19 = load i32*, i32** %4
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
%23 = load i32, i32* %22
%24 = call i32 @positive_int(i32 %23)
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 3
%27 = call i64 @Ptngc_magic(i32 %26)
%28 = trunc i64 %27 to i32
%29 = icmp ugt i32 %24, %28
br i1 %29, label %30, label %31
30: ; preds = %18
store i32 1, i32* %7
br label %35
31: ; preds = %18
br label %32
32: ; preds = %31
%33 = load i32, i32* %8
%34 = add nsw i32 %33, 1
store i32 %34, i32* %8
br label %15
35: ; preds = %30, %15
br label %36
36: ; preds = %35, %13
%37 = load i32, i32* %7
ret i32 %37
}

LLVM IR (-O2):
define i32 @is_quite_large(i32* nocapture %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, 3
%5 = icmp slt i32 %4, %2
br i1 %5, label %6, label %27
6: ; preds = %3
%7 = load i32, i32* %0
%8 = tail call i32 @positive_int(i32 %7)
%9 = tail call i64 @Ptngc_magic(i32 %4)
%10 = trunc i64 %9 to i32
%11 = icmp ugt i32 %8, %10
br i1 %11, label %27, label %12
12: ; preds = %6
%13 = getelementptr inbounds i32, i32* %0, i64 1
%14 = load i32, i32* %13
%15 = tail call i32 @positive_int(i32 %14)
%16 = tail call i64 @Ptngc_magic(i32 %4)
%17 = trunc i64 %16 to i32
%18 = icmp ugt i32 %15, %17
br i1 %18, label %27, label %19
19: ; preds = %12
%20 = getelementptr inbounds i32, i32* %0, i64 2
%21 = load i32, i32* %20
%22 = tail call i32 @positive_int(i32 %21)
%23 = tail call i64 @Ptngc_magic(i32 %4)
%24 = trunc i64 %23 to i32
%25 = icmp ugt i32 %22, %24
%26 = zext i1 %25 to i32
br label %27
27: ; preds = %19, %6, %12, %3
%28 = phi i32 [ 1, %3 ], [ 1, %6 ], [ 1, %12 ], [ %26, %19 ]
ret i32 %28
}