#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__ satisfies(int *, int);
int test_satisfies(void) {
  int A[10];
  int n;
  n = 0;
  A[n++] = 1;
  if (!satisfies(A, n))
    return -1;
  n = 0;
  A[n++] = 1;
  A[n++] = 2;
  if (!satisfies(A, n))
    return -1;
  n = 0;
  A[n++] = 2;
  A[n++] = 3;
  A[n++] = 4;
  if (!satisfies(A, n))
    return -1;
  n = 0;
  A[n++] = 3;
  A[n++] = 5;
  A[n++] = 6;
  A[n++] = 7;
  if (!satisfies(A, n))
    return -1;
  n = 0;
  A[n++] = 6;
  A[n++] = 9;
  A[n++] = 11;
  A[n++] = 12;
  A[n++] = 13;
  if (!satisfies(A, n))
    return -1;
  n = 0;
  A[n++] = 6;
  A[n++] = 9;
  A[n++] = 11;
  A[n++] = 12;
  A[n++] = 130;
  if (satisfies(A, n))
    return -1;
  n = 0;
  A[n++] = 6;
  A[n++] = 9;
  A[n++] = 11;
  A[n++] = 11;
  A[n++] = 13;
  if (satisfies(A, n))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<test_satisfies>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x1,-0x30(%rbp,%rax,4)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <satisfies@plt>
cmp    $0x0,%rax
jne    1156 <test_satisfies+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    144b <test_satisfies+0x33b>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x1,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x2,-0x30(%rbp,%rax,4)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <satisfies@plt>
cmp    $0x0,%rax
jne    11a9 <test_satisfies+0x99>
movl   $0xffffffff,-0x4(%rbp)
jmp    144b <test_satisfies+0x33b>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x2,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x3,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x4,-0x30(%rbp,%rax,4)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <satisfies@plt>
cmp    $0x0,%rax
jne    1211 <test_satisfies+0x101>
movl   $0xffffffff,-0x4(%rbp)
jmp    144b <test_satisfies+0x33b>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x3,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x5,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x6,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x7,-0x30(%rbp,%rax,4)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <satisfies@plt>
cmp    $0x0,%rax
jne    128e <test_satisfies+0x17e>
movl   $0xffffffff,-0x4(%rbp)
jmp    144b <test_satisfies+0x33b>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x6,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x9,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0xb,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0xc,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0xd,-0x30(%rbp,%rax,4)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <satisfies@plt>
cmp    $0x0,%rax
jne    1320 <test_satisfies+0x210>
movl   $0xffffffff,-0x4(%rbp)
jmp    144b <test_satisfies+0x33b>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x6,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x9,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0xb,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0xc,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x82,-0x30(%rbp,%rax,4)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <satisfies@plt>
cmp    $0x0,%rax
je     13b2 <test_satisfies+0x2a2>
movl   $0xffffffff,-0x4(%rbp)
jmp    144b <test_satisfies+0x33b>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x6,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0x9,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0xb,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0xb,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
cltq
movl   $0xd,-0x30(%rbp,%rax,4)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <satisfies@plt>
cmp    $0x0,%rax
je     1444 <test_satisfies+0x334>
movl   $0xffffffff,-0x4(%rbp)
jmp    144b <test_satisfies+0x33b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_satisfies>:
push   %rbx
sub    $0x30,%rsp
movl   $0x1,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <satisfies@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
je     1213 <test_satisfies+0x103>
movabs $0x200000001,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <satisfies@plt>
test   %rax,%rax
je     1213 <test_satisfies+0x103>
movabs $0x300000002,%rax
mov    %rax,(%rsp)
movl   $0x4,0x8(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <satisfies@plt>
test   %rax,%rax
je     1213 <test_satisfies+0x103>
movaps 0xe72(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1030 <satisfies@plt>
test   %rax,%rax
je     1213 <test_satisfies+0x103>
movaps 0xe65(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0xd,0x10(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <satisfies@plt>
test   %rax,%rax
je     1213 <test_satisfies+0x103>
movaps 0xe40(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x82,0x10(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <satisfies@plt>
test   %rax,%rax
jne    1213 <test_satisfies+0x103>
movaps 0xe2b(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0xd,0x10(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <satisfies@plt>
neg    %rax
sbb    %ebx,%ebx
mov    %ebx,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_satisfies() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
store i32 0, i32* %3
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
%6 = sext i32 %4 to i64
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %6
store i32 1, i32* %7
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = call i64 @satisfies(i32* %8, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %0
store i32 -1, i32* %1
br label %146
13: ; preds = %0
store i32 0, i32* %3
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
%16 = sext i32 %14 to i64
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %16
store i32 1, i32* %17
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
%20 = sext i32 %18 to i64
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %20
store i32 2, i32* %21
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%23 = load i32, i32* %3
%24 = call i64 @satisfies(i32* %22, i32 %23)
%25 = icmp ne i64 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %13
store i32 -1, i32* %1
br label %146
27: ; preds = %13
store i32 0, i32* %3
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
%30 = sext i32 %28 to i64
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %30
store i32 2, i32* %31
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
%34 = sext i32 %32 to i64
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %34
store i32 3, i32* %35
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 1
store i32 %37, i32* %3
%38 = sext i32 %36 to i64
%39 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %38
store i32 4, i32* %39
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%41 = load i32, i32* %3
%42 = call i64 @satisfies(i32* %40, i32 %41)
%43 = icmp ne i64 %42, 0
br i1 %43, label %45, label %44
44: ; preds = %27
store i32 -1, i32* %1
br label %146
45: ; preds = %27
store i32 0, i32* %3
%46 = load i32, i32* %3
%47 = add nsw i32 %46, 1
store i32 %47, i32* %3
%48 = sext i32 %46 to i64
%49 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %48
store i32 3, i32* %49
%50 = load i32, i32* %3
%51 = add nsw i32 %50, 1
store i32 %51, i32* %3
%52 = sext i32 %50 to i64
%53 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %52
store i32 5, i32* %53
%54 = load i32, i32* %3
%55 = add nsw i32 %54, 1
store i32 %55, i32* %3
%56 = sext i32 %54 to i64
%57 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %56
store i32 6, i32* %57
%58 = load i32, i32* %3
%59 = add nsw i32 %58, 1
store i32 %59, i32* %3
%60 = sext i32 %58 to i64
%61 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %60
store i32 7, i32* %61
%62 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%63 = load i32, i32* %3
%64 = call i64 @satisfies(i32* %62, i32 %63)
%65 = icmp ne i64 %64, 0
br i1 %65, label %67, label %66
66: ; preds = %45
store i32 -1, i32* %1
br label %146
67: ; preds = %45
store i32 0, i32* %3
%68 = load i32, i32* %3
%69 = add nsw i32 %68, 1
store i32 %69, i32* %3
%70 = sext i32 %68 to i64
%71 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %70
store i32 6, i32* %71
%72 = load i32, i32* %3
%73 = add nsw i32 %72, 1
store i32 %73, i32* %3
%74 = sext i32 %72 to i64
%75 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %74
store i32 9, i32* %75
%76 = load i32, i32* %3
%77 = add nsw i32 %76, 1
store i32 %77, i32* %3
%78 = sext i32 %76 to i64
%79 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %78
store i32 11, i32* %79
%80 = load i32, i32* %3
%81 = add nsw i32 %80, 1
store i32 %81, i32* %3
%82 = sext i32 %80 to i64
%83 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %82
store i32 12, i32* %83
%84 = load i32, i32* %3
%85 = add nsw i32 %84, 1
store i32 %85, i32* %3
%86 = sext i32 %84 to i64
%87 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %86
store i32 13, i32* %87
%88 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%89 = load i32, i32* %3
%90 = call i64 @satisfies(i32* %88, i32 %89)
%91 = icmp ne i64 %90, 0
br i1 %91, label %93, label %92
92: ; preds = %67
store i32 -1, i32* %1
br label %146
93: ; preds = %67
store i32 0, i32* %3
%94 = load i32, i32* %3
%95 = add nsw i32 %94, 1
store i32 %95, i32* %3
%96 = sext i32 %94 to i64
%97 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %96
store i32 6, i32* %97
%98 = load i32, i32* %3
%99 = add nsw i32 %98, 1
store i32 %99, i32* %3
%100 = sext i32 %98 to i64
%101 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %100
store i32 9, i32* %101
%102 = load i32, i32* %3
%103 = add nsw i32 %102, 1
store i32 %103, i32* %3
%104 = sext i32 %102 to i64
%105 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %104
store i32 11, i32* %105
%106 = load i32, i32* %3
%107 = add nsw i32 %106, 1
store i32 %107, i32* %3
%108 = sext i32 %106 to i64
%109 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %108
store i32 12, i32* %109
%110 = load i32, i32* %3
%111 = add nsw i32 %110, 1
store i32 %111, i32* %3
%112 = sext i32 %110 to i64
%113 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %112
store i32 130, i32* %113
%114 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%115 = load i32, i32* %3
%116 = call i64 @satisfies(i32* %114, i32 %115)
%117 = icmp ne i64 %116, 0
br i1 %117, label %118, label %119
118: ; preds = %93
store i32 -1, i32* %1
br label %146
119: ; preds = %93
store i32 0, i32* %3
%120 = load i32, i32* %3
%121 = add nsw i32 %120, 1
store i32 %121, i32* %3
%122 = sext i32 %120 to i64
%123 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %122
store i32 6, i32* %123
%124 = load i32, i32* %3
%125 = add nsw i32 %124, 1
store i32 %125, i32* %3
%126 = sext i32 %124 to i64
%127 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %126
store i32 9, i32* %127
%128 = load i32, i32* %3
%129 = add nsw i32 %128, 1
store i32 %129, i32* %3
%130 = sext i32 %128 to i64
%131 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %130
store i32 11, i32* %131
%132 = load i32, i32* %3
%133 = add nsw i32 %132, 1
store i32 %133, i32* %3
%134 = sext i32 %132 to i64
%135 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %134
store i32 11, i32* %135
%136 = load i32, i32* %3
%137 = add nsw i32 %136, 1
store i32 %137, i32* %3
%138 = sext i32 %136 to i64
%139 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %138
store i32 13, i32* %139
%140 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%141 = load i32, i32* %3
%142 = call i64 @satisfies(i32* %140, i32 %141)
%143 = icmp ne i64 %142, 0
br i1 %143, label %144, label %145
144: ; preds = %119
store i32 -1, i32* %1
br label %146
145: ; preds = %119
store i32 0, i32* %1
br label %146
146: ; preds = %145, %144, %118, %92, %66, %44, %26, %12
%147 = load i32, i32* %1
ret i32 %147
}

LLVM IR (-O2):
define i32 @test_satisfies() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 1, i32* %3
%4 = call i64 @satisfies(i32* %3, i32 1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %32, label %6
6: ; preds = %0
store i32 1, i32* %3
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
store i32 2, i32* %7
%8 = call i64 @satisfies(i32* %3, i32 2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %32, label %10
10: ; preds = %6
store i32 2, i32* %3
store i32 3, i32* %7
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32 4, i32* %11
%12 = call i64 @satisfies(i32* %3, i32 3)
%13 = icmp eq i64 %12, 0
br i1 %13, label %32, label %14
14: ; preds = %10
%15 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 3, i32 5, i32 6, i32 7>, <4 x i32>* %15
%16 = call i64 @satisfies(i32* %3, i32 4)
%17 = icmp eq i64 %16, 0
br i1 %17, label %32, label %18
18: ; preds = %14
%19 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 6, i32 9, i32 11, i32 12>, <4 x i32>* %19
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
store i32 13, i32* %20
%21 = call i64 @satisfies(i32* %3, i32 5)
%22 = icmp eq i64 %21, 0
br i1 %22, label %32, label %23
23: ; preds = %18
%24 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 6, i32 9, i32 11, i32 12>, <4 x i32>* %24
store i32 130, i32* %20
%25 = call i64 @satisfies(i32* %3, i32 5)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 6, i32 9, i32 11, i32 11>, <4 x i32>* %28
store i32 13, i32* %20
%29 = call i64 @satisfies(i32* %3, i32 5)
%30 = icmp ne i64 %29, 0
%31 = sext i1 %30 to i32
br label %32
32: ; preds = %27, %23, %18, %14, %10, %6, %0
%33 = phi i32 [ -1, %0 ], [ -1, %6 ], [ -1, %10 ], [ -1, %14 ], [ -1, %18 ], [ -1, %23 ], [ %31, %27 ]
ret i32 %33
}