#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__ equiv(int *, int /*<<< orphan*/ *, int *, int /*<<< orphan*/ *);
scalar_t__ find(int **, int, int *);
int /*<<< orphan*/ free_l(void **);
int length_l(void **);
int **r_medial(int *);
int **r_mix(int *);
int **r_switch(int *);
int validinputs(int *, int /*<<< orphan*/ *);
int slowprove(int *f1, int *f2, int f2vi) {
  if (f1 == NULL || f2 == NULL)
    return 0;
  if (equiv(f1, NULL, f2, NULL))
    return 1;
  if (validinputs(f1, NULL) + 2 > f2vi)
    return 0;
  int **next_mix = r_mix(f1);
  int n_next_mix = length_l((void **)next_mix);
  if (find(next_mix, n_next_mix, f2) >= 0) {
    free_l((void **)next_mix);
    return 1;
  }
  int **next_switch = r_switch(f1);
  int n_next_switch = length_l((void **)next_switch);
  if (find(next_switch, n_next_switch, f2) >= 0) {
    free_l((void **)next_mix);
    free_l((void **)next_switch);
    return 1;
  }
  int **next_medial = r_medial(f1);
  int n_next_medial = length_l((void **)next_medial);
  if (find(next_medial, n_next_medial, f2) >= 0) {
    free_l((void **)next_mix);
    free_l((void **)next_switch);
    free_l((void **)next_medial);
    return 1;
  }
  int i;
  for (i = 0; i < n_next_mix; i++) {
    if (slowprove(next_mix[i], f2, f2vi)) {
      free_l((void **)next_mix);
      free_l((void **)next_switch);
      free_l((void **)next_medial);
      return 1;
    }
  }
  for (i = 0; i < n_next_switch; i++) {
    if (slowprove(next_switch[i], f2, f2vi)) {
      free_l((void **)next_mix);
      free_l((void **)next_switch);
      free_l((void **)next_medial);
      return 1;
    }
  }
  for (i = 0; i < n_next_medial; i++) {
    if (slowprove(next_medial[i], f2, f2vi)) {
      free_l((void **)next_mix);
      free_l((void **)next_switch);
      free_l((void **)next_medial);
      return 1;
    }
  }
  free_l((void **)next_mix);
  free_l((void **)next_switch);
  free_l((void **)next_medial);
  return 0;
}


x86 assembly (clang, -O0):
<slowprove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11b9 <slowprove+0x29>
cmpq   $0x0,-0x18(%rbp)
jne    11c5 <slowprove+0x35>
movl   $0x0,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rsi
call   1030 <equiv@plt>
cmp    $0x0,%rax
je     11ef <slowprove+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <validinputs@plt>
add    $0x2,%eax
cmp    -0x1c(%rbp),%eax
jle    1214 <slowprove+0x84>
movl   $0x0,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
mov    -0x10(%rbp),%rdi
call   1090 <r_mix@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   10b0 <length_l@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1080 <find@plt>
cmp    $0x0,%rax
jl     125c <slowprove+0xcc>
mov    -0x28(%rbp),%rdi
call   1040 <free_l@plt>
movl   $0x1,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
mov    -0x10(%rbp),%rdi
call   1060 <r_switch@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   10b0 <length_l@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1080 <find@plt>
cmp    $0x0,%rax
jl     12ad <slowprove+0x11d>
mov    -0x28(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x38(%rbp),%rdi
call   1040 <free_l@plt>
movl   $0x1,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
mov    -0x10(%rbp),%rdi
call   10a0 <r_medial@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
call   10b0 <length_l@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x4c(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1080 <find@plt>
cmp    $0x0,%rax
jl     1307 <slowprove+0x177>
mov    -0x28(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x38(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free_l@plt>
movl   $0x1,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1375 <slowprove+0x1e5>
mov    -0x28(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1070 <slowprove@plt>
cmp    $0x0,%eax
je     1362 <slowprove+0x1d2>
mov    -0x28(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x38(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free_l@plt>
movl   $0x1,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
jmp    1367 <slowprove+0x1d7>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    130e <slowprove+0x17e>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    13e3 <slowprove+0x253>
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1070 <slowprove@plt>
cmp    $0x0,%eax
je     13d0 <slowprove+0x240>
mov    -0x28(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x38(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free_l@plt>
movl   $0x1,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
jmp    13d5 <slowprove+0x245>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    137c <slowprove+0x1ec>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    1451 <slowprove+0x2c1>
mov    -0x48(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1070 <slowprove@plt>
cmp    $0x0,%eax
je     143e <slowprove+0x2ae>
mov    -0x28(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x38(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free_l@plt>
movl   $0x1,-0x4(%rbp)
jmp    1473 <slowprove+0x2e3>
jmp    1443 <slowprove+0x2b3>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    13ea <slowprove+0x25a>
mov    -0x28(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x38(%rbp),%rdi
call   1040 <free_l@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free_l@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slowprove>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %ebx,%ebx
test   %rdi,%rdi
je     1251 <slowprove+0xc1>
mov    %rsi,%r13
test   %rsi,%rsi
je     1251 <slowprove+0xc1>
mov    %edx,%r14d
mov    %rdi,%rbp
xor    %ebx,%ebx
xor    %esi,%esi
mov    %r13,%rdx
xor    %ecx,%ecx
call   1030 <equiv@plt>
test   %rax,%rax
jne    124c <slowprove+0xbc>
mov    %rbp,%rdi
xor    %esi,%esi
call   1050 <validinputs@plt>
add    $0x2,%eax
cmp    %r14d,%eax
jg     1251 <slowprove+0xc1>
mov    %rbp,%rdi
call   1090 <r_mix@plt>
mov    %rax,%r15
mov    %rax,%rdi
call   10b0 <length_l@plt>
mov    %eax,%r12d
mov    %r15,%rdi
mov    %eax,%esi
mov    %r13,%rdx
call   1080 <find@plt>
test   %rax,%rax
jns    1244 <slowprove+0xb4>
mov    %r12d,0x24(%rsp)
mov    %r15,0x10(%rsp)
mov    %rbp,%rdi
call   1060 <r_switch@plt>
mov    %rax,%r15
mov    %rax,%rdi
call   10b0 <length_l@plt>
mov    %eax,%r12d
mov    %r15,%rdi
mov    %eax,%esi
mov    %r13,%rdx
call   1080 <find@plt>
test   %rax,%rax
js     1262 <slowprove+0xd2>
mov    0x10(%rsp),%rdi
call   1040 <free_l@plt>
mov    %r15,%rdi
call   1040 <free_l@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12d,0x20(%rsp)
mov    %r15,(%rsp)
mov    %rbp,%rdi
call   10a0 <r_medial@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   10b0 <length_l@plt>
mov    %eax,%r15d
mov    %rbp,%rdi
mov    %eax,%esi
mov    %r13,%rdx
call   1080 <find@plt>
test   %rax,%rax
js     12ab <slowprove+0x11b>
mov    0x10(%rsp),%rdi
call   1040 <free_l@plt>
mov    (%rsp),%rdi
call   1040 <free_l@plt>
mov    %rbp,%rdi
jmp    1247 <slowprove+0xb7>
mov    %r15d,0x1c(%rsp)
mov    %rbp,0x8(%rsp)
mov    0x24(%rsp),%eax
test   %eax,%eax
mov    0x10(%rsp),%r15
jle    12e7 <slowprove+0x157>
mov    %eax,%r12d
xor    %ebp,%ebp
mov    (%r15,%rbp,8),%rdi
mov    %r13,%rsi
mov    %r14d,%edx
call   1070 <slowprove@plt>
test   %eax,%eax
jne    1362 <slowprove+0x1d2>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    12c7 <slowprove+0x137>
mov    0x20(%rsp),%eax
test   %eax,%eax
jle    1314 <slowprove+0x184>
mov    %eax,%r12d
xor    %ebp,%ebp
mov    (%rsp),%rax
mov    (%rax,%rbp,8),%rdi
mov    %r13,%rsi
mov    %r14d,%edx
call   1070 <slowprove@plt>
test   %eax,%eax
jne    1362 <slowprove+0x1d2>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    12f4 <slowprove+0x164>
mov    0x1c(%rsp),%eax
test   %eax,%eax
jle    1342 <slowprove+0x1b2>
mov    %eax,%r12d
xor    %ebp,%ebp
mov    0x8(%rsp),%rax
mov    (%rax,%rbp,8),%rdi
mov    %r13,%rsi
mov    %r14d,%edx
call   1070 <slowprove@plt>
test   %eax,%eax
jne    1362 <slowprove+0x1d2>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1321 <slowprove+0x191>
mov    %r15,%rdi
call   1040 <free_l@plt>
mov    (%rsp),%rdi
call   1040 <free_l@plt>
mov    0x8(%rsp),%rdi
call   1040 <free_l@plt>
jmp    1251 <slowprove+0xc1>
mov    %r15,%rdi
call   1040 <free_l@plt>
mov    (%rsp),%rdi
call   1040 <free_l@plt>
mov    0x8(%rsp),%rdi
jmp    1247 <slowprove+0xb7>

LLVM IR (-O0):
define i32 @slowprove(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32**
%9 = alloca i32
%10 = alloca i32**
%11 = alloca i32
%12 = alloca i32**
%13 = alloca i32
%14 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
%15 = load i32*, i32** %5
%16 = icmp eq i32* %15, null
br i1 %16, label %20, label %17
17: ; preds = %3
%18 = load i32*, i32** %6
%19 = icmp eq i32* %18, null
br i1 %19, label %20, label %21
20: ; preds = %17, %3
store i32 0, i32* %4
br label %185
21: ; preds = %17
%22 = load i32*, i32** %5
%23 = load i32*, i32** %6
%24 = call i64 @equiv(i32* %22, i32* null, i32* %23, i32* null)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %21
store i32 1, i32* %4
br label %185
27: ; preds = %21
%28 = load i32*, i32** %5
%29 = call i32 @validinputs(i32* %28, i32* null)
%30 = add nsw i32 %29, 2
%31 = load i32, i32* %7
%32 = icmp sgt i32 %30, %31
br i1 %32, label %33, label %34
33: ; preds = %27
store i32 0, i32* %4
br label %185
34: ; preds = %27
%35 = load i32*, i32** %5
%36 = call i32** @r_mix(i32* %35)
store i32** %36, i32*** %8
%37 = load i32**, i32*** %8
%38 = bitcast i32** %37 to i8**
%39 = call i32 @length_l(i8** %38)
store i32 %39, i32* %9
%40 = load i32**, i32*** %8
%41 = load i32, i32* %9
%42 = load i32*, i32** %6
%43 = call i64 @find(i32** %40, i32 %41, i32* %42)
%44 = icmp sge i64 %43, 0
br i1 %44, label %45, label %49
45: ; preds = %34
%46 = load i32**, i32*** %8
%47 = bitcast i32** %46 to i8**
%48 = call i32 @free_l(i8** %47)
store i32 1, i32* %4
br label %185
49: ; preds = %34
%50 = load i32*, i32** %5
%51 = call i32** @r_switch(i32* %50)
store i32** %51, i32*** %10
%52 = load i32**, i32*** %10
%53 = bitcast i32** %52 to i8**
%54 = call i32 @length_l(i8** %53)
store i32 %54, i32* %11
%55 = load i32**, i32*** %10
%56 = load i32, i32* %11
%57 = load i32*, i32** %6
%58 = call i64 @find(i32** %55, i32 %56, i32* %57)
%59 = icmp sge i64 %58, 0
br i1 %59, label %60, label %67
60: ; preds = %49
%61 = load i32**, i32*** %8
%62 = bitcast i32** %61 to i8**
%63 = call i32 @free_l(i8** %62)
%64 = load i32**, i32*** %10
%65 = bitcast i32** %64 to i8**
%66 = call i32 @free_l(i8** %65)
store i32 1, i32* %4
br label %185
67: ; preds = %49
%68 = load i32*, i32** %5
%69 = call i32** @r_medial(i32* %68)
store i32** %69, i32*** %12
%70 = load i32**, i32*** %12
%71 = bitcast i32** %70 to i8**
%72 = call i32 @length_l(i8** %71)
store i32 %72, i32* %13
%73 = load i32**, i32*** %12
%74 = load i32, i32* %13
%75 = load i32*, i32** %6
%76 = call i64 @find(i32** %73, i32 %74, i32* %75)
%77 = icmp sge i64 %76, 0
br i1 %77, label %78, label %88
78: ; preds = %67
%79 = load i32**, i32*** %8
%80 = bitcast i32** %79 to i8**
%81 = call i32 @free_l(i8** %80)
%82 = load i32**, i32*** %10
%83 = bitcast i32** %82 to i8**
%84 = call i32 @free_l(i8** %83)
%85 = load i32**, i32*** %12
%86 = bitcast i32** %85 to i8**
%87 = call i32 @free_l(i8** %86)
store i32 1, i32* %4
br label %185
88: ; preds = %67
store i32 0, i32* %14
br label %89
89: ; preds = %114, %88
%90 = load i32, i32* %14
%91 = load i32, i32* %9
%92 = icmp slt i32 %90, %91
br i1 %92, label %93, label %117
93: ; preds = %89
%94 = load i32**, i32*** %8
%95 = load i32, i32* %14
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i32*, i32** %94, i64 %96
%98 = load i32*, i32** %97
%99 = load i32*, i32** %6
%100 = load i32, i32* %7
%101 = call i32 @slowprove(i32* %98, i32* %99, i32 %100)
%102 = icmp ne i32 %101, 0
br i1 %102, label %103, label %113
103: ; preds = %93
%104 = load i32**, i32*** %8
%105 = bitcast i32** %104 to i8**
%106 = call i32 @free_l(i8** %105)
%107 = load i32**, i32*** %10
%108 = bitcast i32** %107 to i8**
%109 = call i32 @free_l(i8** %108)
%110 = load i32**, i32*** %12
%111 = bitcast i32** %110 to i8**
%112 = call i32 @free_l(i8** %111)
store i32 1, i32* %4
br label %185
113: ; preds = %93
br label %114
114: ; preds = %113
%115 = load i32, i32* %14
%116 = add nsw i32 %115, 1
store i32 %116, i32* %14
br label %89
117: ; preds = %89
store i32 0, i32* %14
br label %118
118: ; preds = %143, %117
%119 = load i32, i32* %14
%120 = load i32, i32* %11
%121 = icmp slt i32 %119, %120
br i1 %121, label %122, label %146
122: ; preds = %118
%123 = load i32**, i32*** %10
%124 = load i32, i32* %14
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i32*, i32** %123, i64 %125
%127 = load i32*, i32** %126
%128 = load i32*, i32** %6
%129 = load i32, i32* %7
%130 = call i32 @slowprove(i32* %127, i32* %128, i32 %129)
%131 = icmp ne i32 %130, 0
br i1 %131, label %132, label %142
132: ; preds = %122
%133 = load i32**, i32*** %8
%134 = bitcast i32** %133 to i8**
%135 = call i32 @free_l(i8** %134)
%136 = load i32**, i32*** %10
%137 = bitcast i32** %136 to i8**
%138 = call i32 @free_l(i8** %137)
%139 = load i32**, i32*** %12
%140 = bitcast i32** %139 to i8**
%141 = call i32 @free_l(i8** %140)
store i32 1, i32* %4
br label %185
142: ; preds = %122
br label %143
143: ; preds = %142
%144 = load i32, i32* %14
%145 = add nsw i32 %144, 1
store i32 %145, i32* %14
br label %118
146: ; preds = %118
store i32 0, i32* %14
br label %147
147: ; preds = %172, %146
%148 = load i32, i32* %14
%149 = load i32, i32* %13
%150 = icmp slt i32 %148, %149
br i1 %150, label %151, label %175
151: ; preds = %147
%152 = load i32**, i32*** %12
%153 = load i32, i32* %14
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i32*, i32** %152, i64 %154
%156 = load i32*, i32** %155
%157 = load i32*, i32** %6
%158 = load i32, i32* %7
%159 = call i32 @slowprove(i32* %156, i32* %157, i32 %158)
%160 = icmp ne i32 %159, 0
br i1 %160, label %161, label %171
161: ; preds = %151
%162 = load i32**, i32*** %8
%163 = bitcast i32** %162 to i8**
%164 = call i32 @free_l(i8** %163)
%165 = load i32**, i32*** %10
%166 = bitcast i32** %165 to i8**
%167 = call i32 @free_l(i8** %166)
%168 = load i32**, i32*** %12
%169 = bitcast i32** %168 to i8**
%170 = call i32 @free_l(i8** %169)
store i32 1, i32* %4
br label %185
171: ; preds = %151
br label %172
172: ; preds = %171
%173 = load i32, i32* %14
%174 = add nsw i32 %173, 1
store i32 %174, i32* %14
br label %147
175: ; preds = %147
%176 = load i32**, i32*** %8
%177 = bitcast i32** %176 to i8**
%178 = call i32 @free_l(i8** %177)
%179 = load i32**, i32*** %10
%180 = bitcast i32** %179 to i8**
%181 = call i32 @free_l(i8** %180)
%182 = load i32**, i32*** %12
%183 = bitcast i32** %182 to i8**
%184 = call i32 @free_l(i8** %183)
store i32 0, i32* %4
br label %185
185: ; preds = %175, %161, %132, %103, %78, %60, %45, %33, %26, %20
%186 = load i32, i32* %4
ret i32 %186
}

LLVM IR (-O2):
define i32 @slowprove(i32* %0, i32* %1, i32 %2) {
%4 = icmp eq i32* %0, null
%5 = icmp eq i32* %1, null
%6 = or i1 %4, %5
br i1 %6, label %96, label %7
7: ; preds = %3
%8 = tail call i64 @equiv(i32* %0, i32* null, i32* %1, i32* null)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %96
10: ; preds = %7
%11 = tail call i32 @validinputs(i32* %0, i32* null)
%12 = add nsw i32 %11, 2
%13 = icmp sgt i32 %12, %2
br i1 %13, label %96, label %14
14: ; preds = %10
%15 = tail call i32** @r_mix(i32* %0)
%16 = bitcast i32** %15 to i8**
%17 = tail call i32 @length_l(i8** %16)
%18 = tail call i64 @find(i32** %15, i32 %17, i32* %1)
%19 = icmp sgt i64 %18, -1
br i1 %19, label %20, label %22
20: ; preds = %14
%21 = tail call i32 @free_l(i8** %16)
br label %96
22: ; preds = %14
%23 = tail call i32** @r_switch(i32* %0)
%24 = bitcast i32** %23 to i8**
%25 = tail call i32 @length_l(i8** %24)
%26 = tail call i64 @find(i32** %23, i32 %25, i32* %1)
%27 = icmp sgt i64 %26, -1
br i1 %27, label %28, label %31
28: ; preds = %22
%29 = tail call i32 @free_l(i8** %16)
%30 = tail call i32 @free_l(i8** %24)
br label %96
31: ; preds = %22
%32 = tail call i32** @r_medial(i32* %0)
%33 = bitcast i32** %32 to i8**
%34 = tail call i32 @length_l(i8** %33)
%35 = tail call i64 @find(i32** %32, i32 %34, i32* %1)
%36 = icmp sgt i64 %35, -1
br i1 %36, label %41, label %37
37: ; preds = %31
%38 = icmp sgt i32 %17, 0
br i1 %38, label %39, label %47
39: ; preds = %37
%40 = zext i32 %17 to i64
br label %51
41: ; preds = %31
%42 = tail call i32 @free_l(i8** %16)
%43 = tail call i32 @free_l(i8** %24)
%44 = tail call i32 @free_l(i8** %33)
br label %96
45: ; preds = %51
%46 = icmp eq i64 %57, %40
br i1 %46, label %47, label %51
47: ; preds = %45, %37
%48 = icmp sgt i32 %25, 0
br i1 %48, label %49, label %64
49: ; preds = %47
%50 = zext i32 %25 to i64
br label %68
51: ; preds = %39, %45
%52 = phi i64 [ 0, %39 ], [ %57, %45 ]
%53 = getelementptr inbounds i32*, i32** %15, i64 %52
%54 = load i32*, i32** %53
%55 = tail call i32 @slowprove(i32* %54, i32* %1, i32 %2)
%56 = icmp eq i32 %55, 0
%57 = add nuw nsw i64 %52, 1
br i1 %56, label %45, label %58
58: ; preds = %51
%59 = tail call i32 @free_l(i8** %16)
%60 = tail call i32 @free_l(i8** %24)
%61 = tail call i32 @free_l(i8** %33)
br label %96
62: ; preds = %68
%63 = icmp eq i64 %74, %50
br i1 %63, label %64, label %68
64: ; preds = %62, %47
%65 = icmp sgt i32 %34, 0
br i1 %65, label %66, label %92
66: ; preds = %64
%67 = zext i32 %34 to i64
br label %81
68: ; preds = %49, %62
%69 = phi i64 [ 0, %49 ], [ %74, %62 ]
%70 = getelementptr inbounds i32*, i32** %23, i64 %69
%71 = load i32*, i32** %70
%72 = tail call i32 @slowprove(i32* %71, i32* %1, i32 %2)
%73 = icmp eq i32 %72, 0
%74 = add nuw nsw i64 %69, 1
br i1 %73, label %62, label %75
75: ; preds = %68
%76 = tail call i32 @free_l(i8** %16)
%77 = tail call i32 @free_l(i8** %24)
%78 = tail call i32 @free_l(i8** %33)
br label %96
79: ; preds = %81
%80 = icmp eq i64 %87, %67
br i1 %80, label %92, label %81
81: ; preds = %66, %79
%82 = phi i64 [ 0, %66 ], [ %87, %79 ]
%83 = getelementptr inbounds i32*, i32** %32, i64 %82
%84 = load i32*, i32** %83
%85 = tail call i32 @slowprove(i32* %84, i32* %1, i32 %2)
%86 = icmp eq i32 %85, 0
%87 = add nuw nsw i64 %82, 1
br i1 %86, label %79, label %88
88: ; preds = %81
%89 = tail call i32 @free_l(i8** %16)
%90 = tail call i32 @free_l(i8** %24)
%91 = tail call i32 @free_l(i8** %33)
br label %96
92: ; preds = %79, %64
%93 = tail call i32 @free_l(i8** %16)
%94 = tail call i32 @free_l(i8** %24)
%95 = tail call i32 @free_l(i8** %33)
br label %96
96: ; preds = %20, %41, %92, %88, %75, %58, %28, %10, %7, %3
%97 = phi i32 [ 0, %3 ], [ 1, %7 ], [ 0, %10 ], [ 1, %20 ], [ 1, %28 ], [ 1, %41 ], [ 1, %58 ], [ 1, %75 ], [ 1, %88 ], [ 0, %92 ]
ret i32 %97
}