; LLVM IR from askforalfred/alfred :: gen/ff_planner (inst_hard)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._Effect = type { i32, [15 x i32], [15 x ptr], ptr, ptr, ptr, ptr, ptr }
%struct._WffNode = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32, ptr, ptr, i8 }
%struct._Literal = type { i8, %struct._Fact, ptr, ptr }
%struct._Fact = type { i32, [5 x i32] }
%struct._NumericEffect = type { %struct._Fluent, i32, ptr, ptr, ptr }
%struct._Fluent = type { i32, [5 x i32] }

@garity = external global [50 x i32], align 16
@gf_arity = external global [50 x i32], align 16
@linst_table = external dso_local global [15 x i32], align 16

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @instantiate_wff(ptr noundef) #1

declare ptr @copy_Exp(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @instantiate_Effect(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %11, ptr %5, align 8, !tbaa !5
  br label %12

12:                                               ; preds = %306, %1
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %310

15:                                               ; preds = %12
  %16 = call ptr @new_Effect()
  store ptr %16, ptr %4, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %35, %15
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._Effect, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = icmp slt i32 %18, %21
  br i1 %22, label %23, label %38

23:                                               ; preds = %17
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._Effect, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [15 x i32], ptr %25, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._Effect, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %10, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [15 x i32], ptr %31, i64 0, i64 %33
  store i32 %29, ptr %34, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %23
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %10, align 4, !tbaa !9
  br label %17, !llvm.loop !13

38:                                               ; preds = %17
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._Effect, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._Effect, ptr %42, i32 0, i32 0
  store i32 %41, ptr %43, align 8, !tbaa !11
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._Effect, ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = call ptr @instantiate_wff(ptr noundef %46)
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._Effect, ptr %48, i32 0, i32 3
  store ptr %47, ptr %49, align 8, !tbaa !15
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._Effect, ptr %50, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !15
  %53 = getelementptr inbounds %struct._WffNode, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !16
  %55 = icmp eq i32 %54, 2001
  br i1 %55, label %56, label %58

56:                                               ; preds = %38
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free_partial_Effect(ptr noundef %57)
  br label %306

58:                                               ; preds = %38
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._Effect, ptr %59, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  store ptr %61, ptr %7, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %168, %58
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %172

65:                                               ; preds = %62
  %66 = call ptr @new_Literal()
  store ptr %66, ptr %6, align 8, !tbaa !5
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._Literal, ptr %67, i32 0, i32 0
  %69 = load i8, ptr %68, align 8, !tbaa !19
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._Literal, ptr %70, i32 0, i32 0
  store i8 %69, ptr %71, align 8, !tbaa !19
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._Literal, ptr %72, i32 0, i32 1
  %74 = getelementptr inbounds %struct._Fact, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 4, !tbaa !22
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._Literal, ptr %76, i32 0, i32 1
  %78 = getelementptr inbounds %struct._Fact, ptr %77, i32 0, i32 0
  store i32 %75, ptr %78, align 4, !tbaa !22
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %145, %65
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._Literal, ptr %81, i32 0, i32 1
  %83 = getelementptr inbounds %struct._Fact, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 4, !tbaa !22
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = icmp slt i32 %80, %87
  br i1 %88, label %89, label %148

89:                                               ; preds = %79
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._Literal, ptr %90, i32 0, i32 1
  %92 = getelementptr inbounds %struct._Fact, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %10, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [5 x i32], ptr %92, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._Literal, ptr %97, i32 0, i32 1
  %99 = getelementptr inbounds %struct._Fact, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [5 x i32], ptr %99, i64 0, i64 %101
  store i32 %96, ptr %102, align 4, !tbaa !9
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._Literal, ptr %103, i32 0, i32 1
  %105 = getelementptr inbounds %struct._Fact, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %10, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [5 x i32], ptr %105, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !9
  %110 = icmp slt i32 %109, 0
  br i1 %110, label %111, label %144

111:                                              ; preds = %89
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._Literal, ptr %112, i32 0, i32 1
  %114 = getelementptr inbounds %struct._Fact, ptr %113, i32 0, i32 1
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [5 x i32], ptr %114, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  %120 = mul nsw i32 %119, -1
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [15 x i32], ptr @linst_table, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = icmp ne i32 %123, -1
  br i1 %124, label %125, label %144

125:                                              ; preds = %111
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._Literal, ptr %126, i32 0, i32 1
  %128 = getelementptr inbounds %struct._Fact, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %10, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [5 x i32], ptr %128, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  %134 = mul nsw i32 %133, -1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [15 x i32], ptr @linst_table, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._Literal, ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds %struct._Fact, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [5 x i32], ptr %140, i64 0, i64 %142
  store i32 %137, ptr %143, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %125, %111, %89
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %10, align 4, !tbaa !9
  br label %79, !llvm.loop !23

148:                                              ; preds = %79
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._Effect, ptr %149, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !18
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct._Literal, ptr %152, i32 0, i32 2
  store ptr %151, ptr %153, align 8, !tbaa !24
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._Effect, ptr %154, i32 0, i32 4
  %156 = load ptr, ptr %155, align 8, !tbaa !18
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %164

158:                                              ; preds = %148
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct._Effect, ptr %160, i32 0, i32 4
  %162 = load ptr, ptr %161, align 8, !tbaa !18
  %163 = getelementptr inbounds %struct._Literal, ptr %162, i32 0, i32 3
  store ptr %159, ptr %163, align 8, !tbaa !25
  br label %164

164:                                              ; preds = %158, %148
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct._Effect, ptr %166, i32 0, i32 4
  store ptr %165, ptr %167, align 8, !tbaa !18
  br label %168

168:                                              ; preds = %164
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._Literal, ptr %169, i32 0, i32 2
  %171 = load ptr, ptr %170, align 8, !tbaa !24
  store ptr %171, ptr %7, align 8, !tbaa !5
  br label %62, !llvm.loop !26

172:                                              ; preds = %62
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct._Effect, ptr %173, i32 0, i32 5
  %175 = load ptr, ptr %174, align 8, !tbaa !27
  store ptr %175, ptr %8, align 8, !tbaa !5
  br label %176

176:                                              ; preds = %290, %172
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %294

179:                                              ; preds = %176
  %180 = call ptr @new_NumericEffect()
  store ptr %180, ptr %9, align 8, !tbaa !5
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._NumericEffect, ptr %181, i32 0, i32 1
  %183 = load i32, ptr %182, align 8, !tbaa !28
  %184 = load ptr, ptr %9, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct._NumericEffect, ptr %184, i32 0, i32 1
  store i32 %183, ptr %185, align 8, !tbaa !28
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._NumericEffect, ptr %186, i32 0, i32 0
  %188 = getelementptr inbounds %struct._Fluent, ptr %187, i32 0, i32 0
  %189 = load i32, ptr %188, align 8, !tbaa !31
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct._NumericEffect, ptr %190, i32 0, i32 0
  %192 = getelementptr inbounds %struct._Fluent, ptr %191, i32 0, i32 0
  store i32 %189, ptr %192, align 8, !tbaa !31
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %259, %179
  %194 = load i32, ptr %10, align 4, !tbaa !9
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._NumericEffect, ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds %struct._Fluent, ptr %196, i32 0, i32 0
  %198 = load i32, ptr %197, align 8, !tbaa !31
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [50 x i32], ptr @gf_arity, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !9
  %202 = icmp slt i32 %194, %201
  br i1 %202, label %203, label %262

203:                                              ; preds = %193
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct._NumericEffect, ptr %204, i32 0, i32 0
  %206 = getelementptr inbounds %struct._Fluent, ptr %205, i32 0, i32 1
  %207 = load i32, ptr %10, align 4, !tbaa !9
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [5 x i32], ptr %206, i64 0, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !9
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._NumericEffect, ptr %211, i32 0, i32 0
  %213 = getelementptr inbounds %struct._Fluent, ptr %212, i32 0, i32 1
  %214 = load i32, ptr %10, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [5 x i32], ptr %213, i64 0, i64 %215
  store i32 %210, ptr %216, align 4, !tbaa !9
  %217 = load ptr, ptr %9, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct._NumericEffect, ptr %217, i32 0, i32 0
  %219 = getelementptr inbounds %struct._Fluent, ptr %218, i32 0, i32 1
  %220 = load i32, ptr %10, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [5 x i32], ptr %219, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = icmp slt i32 %223, 0
  br i1 %224, label %225, label %258

225:                                              ; preds = %203
  %226 = load ptr, ptr %9, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct._NumericEffect, ptr %226, i32 0, i32 0
  %228 = getelementptr inbounds %struct._Fluent, ptr %227, i32 0, i32 1
  %229 = load i32, ptr %10, align 4, !tbaa !9
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [5 x i32], ptr %228, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !9
  %233 = add nsw i32 %232, 1
  %234 = mul nsw i32 %233, -1
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [15 x i32], ptr @linst_table, i64 0, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !9
  %238 = icmp ne i32 %237, -1
  br i1 %238, label %239, label %258

239:                                              ; preds = %225
  %240 = load ptr, ptr %9, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct._NumericEffect, ptr %240, i32 0, i32 0
  %242 = getelementptr inbounds %struct._Fluent, ptr %241, i32 0, i32 1
  %243 = load i32, ptr %10, align 4, !tbaa !9
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [5 x i32], ptr %242, i64 0, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !9
  %247 = add nsw i32 %246, 1
  %248 = mul nsw i32 %247, -1
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [15 x i32], ptr @linst_table, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !9
  %252 = load ptr, ptr %9, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct._NumericEffect, ptr %252, i32 0, i32 0
  %254 = getelementptr inbounds %struct._Fluent, ptr %253, i32 0, i32 1
  %255 = load i32, ptr %10, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [5 x i32], ptr %254, i64 0, i64 %256
  store i32 %251, ptr %257, align 4, !tbaa !9
  br label %258

258:                                              ; preds = %239, %225, %203
  br label %259

259:                                              ; preds = %258
  %260 = load i32, ptr %10, align 4, !tbaa !9
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %10, align 4, !tbaa !9
  br label %193, !llvm.loop !32

262:                                              ; preds = %193
  %263 = load ptr, ptr %8, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct._NumericEffect, ptr %263, i32 0, i32 2
  %265 = load ptr, ptr %264, align 8, !tbaa !33
  %266 = call ptr @copy_Exp(ptr noundef %265)
  %267 = load ptr, ptr %9, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct._NumericEffect, ptr %267, i32 0, i32 2
  store ptr %266, ptr %268, align 8, !tbaa !33
  %269 = load ptr, ptr %9, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct._NumericEffect, ptr %269, i32 0, i32 2
  call void @instantiate_exp(ptr noundef %270)
  %271 = load ptr, ptr %4, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct._Effect, ptr %271, i32 0, i32 5
  %273 = load ptr, ptr %272, align 8, !tbaa !27
  %274 = load ptr, ptr %9, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct._NumericEffect, ptr %274, i32 0, i32 3
  store ptr %273, ptr %275, align 8, !tbaa !34
  %276 = load ptr, ptr %4, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct._Effect, ptr %276, i32 0, i32 5
  %278 = load ptr, ptr %277, align 8, !tbaa !27
  %279 = icmp ne ptr %278, null
  br i1 %279, label %280, label %286

280:                                              ; preds = %262
  %281 = load ptr, ptr %9, align 8, !tbaa !5
  %282 = load ptr, ptr %4, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct._Effect, ptr %282, i32 0, i32 5
  %284 = load ptr, ptr %283, align 8, !tbaa !27
  %285 = getelementptr inbounds %struct._NumericEffect, ptr %284, i32 0, i32 4
  store ptr %281, ptr %285, align 8, !tbaa !35
  br label %286

286:                                              ; preds = %280, %262
  %287 = load ptr, ptr %9, align 8, !tbaa !5
  %288 = load ptr, ptr %4, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct._Effect, ptr %288, i32 0, i32 5
  store ptr %287, ptr %289, align 8, !tbaa !27
  br label %290

290:                                              ; preds = %286
  %291 = load ptr, ptr %8, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct._NumericEffect, ptr %291, i32 0, i32 3
  %293 = load ptr, ptr %292, align 8, !tbaa !34
  store ptr %293, ptr %8, align 8, !tbaa !5
  br label %176, !llvm.loop !36

294:                                              ; preds = %176
  %295 = load ptr, ptr %3, align 8, !tbaa !5
  %296 = load ptr, ptr %4, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct._Effect, ptr %296, i32 0, i32 6
  store ptr %295, ptr %297, align 8, !tbaa !37
  %298 = load ptr, ptr %3, align 8, !tbaa !5
  %299 = icmp ne ptr %298, null
  br i1 %299, label %300, label %304

300:                                              ; preds = %294
  %301 = load ptr, ptr %4, align 8, !tbaa !5
  %302 = load ptr, ptr %3, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct._Effect, ptr %302, i32 0, i32 7
  store ptr %301, ptr %303, align 8, !tbaa !38
  br label %304

304:                                              ; preds = %300, %294
  %305 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %305, ptr %3, align 8, !tbaa !5
  br label %306

306:                                              ; preds = %304, %56
  %307 = load ptr, ptr %5, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct._Effect, ptr %307, i32 0, i32 6
  %309 = load ptr, ptr %308, align 8, !tbaa !37
  store ptr %309, ptr %5, align 8, !tbaa !5
  br label %12, !llvm.loop !39

310:                                              ; preds = %12
  %311 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret ptr %311
}

declare ptr @new_Effect() #2

declare void @free_partial_Effect(ptr noundef) #2

declare ptr @new_Literal() #2

declare ptr @new_NumericEffect() #2

; Function Attrs: nounwind uwtable
declare dso_local void @instantiate_exp(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_Effect", !10, i64 0, !7, i64 4, !7, i64 64, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!12, !6, i64 184}
!16 = !{!17, !10, i64 0}
!17 = !{!"_WffNode", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !10, i64 72, !6, i64 80, !6, i64 88, !7, i64 96}
!18 = !{!12, !6, i64 192}
!19 = !{!20, !7, i64 0}
!20 = !{!"_Literal", !7, i64 0, !21, i64 4, !6, i64 32, !6, i64 40}
!21 = !{!"_Fact", !10, i64 0, !7, i64 4}
!22 = !{!20, !10, i64 4}
!23 = distinct !{!23, !14}
!24 = !{!20, !6, i64 32}
!25 = !{!20, !6, i64 40}
!26 = distinct !{!26, !14}
!27 = !{!12, !6, i64 200}
!28 = !{!29, !10, i64 24}
!29 = !{!"_NumericEffect", !30, i64 0, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!30 = !{!"_Fluent", !10, i64 0, !7, i64 4}
!31 = !{!29, !10, i64 0}
!32 = distinct !{!32, !14}
!33 = !{!29, !6, i64 32}
!34 = !{!29, !6, i64 40}
!35 = !{!29, !6, i64 48}
!36 = distinct !{!36, !14}
!37 = !{!12, !6, i64 208}
!38 = !{!12, !6, i64 216}
!39 = distinct !{!39, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@garity = external local_unnamed_addr global [50 x i32], align 16
@gf_arity = external local_unnamed_addr global [50 x i32], align 16
@linst_table = external dso_local local_unnamed_addr global [15 x i32], align 16

; Function Attrs: nounwind uwtable
declare dso_local ptr @instantiate_wff(ptr noundef) local_unnamed_addr #0

declare ptr @copy_Exp(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local ptr @instantiate_Effect(ptr noundef readonly %0) local_unnamed_addr #0 {
  %.not123 = icmp eq ptr %0, null
  br i1 %.not123, label %._crit_edge128, label %.lr.ph127

.lr.ph127:                                        ; preds = %1, %99
  %.083125 = phi ptr [ %.184, %99 ], [ null, %1 ]
  %.087124 = phi ptr [ %101, %99 ], [ %0, %1 ]
  %2 = tail call ptr @new_Effect() #2
  %3 = load i32, ptr %.087124, align 8, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph127
  %5 = getelementptr inbounds i8, ptr %.087124, i64 4
  %6 = getelementptr inbounds i8, ptr %2, i64 4
  br label %7

7:                                                ; preds = %.lr.ph, %7
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %7 ]
  %8 = getelementptr inbounds [15 x i32], ptr %5, i64 0, i64 %indvars.iv
  %9 = load i32, ptr %8, align 4, !tbaa !11
  %10 = getelementptr inbounds [15 x i32], ptr %6, i64 0, i64 %indvars.iv
  store i32 %9, ptr %10, align 4, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr %.087124, align 8, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = icmp slt i64 %indvars.iv.next, %12
  br i1 %13, label %7, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %7, %.lr.ph127
  %.lcssa = phi i32 [ %3, %.lr.ph127 ], [ %11, %7 ]
  store i32 %.lcssa, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %.087124, i64 184
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %16 = tail call ptr @instantiate_wff(ptr noundef %15)
  %17 = getelementptr inbounds i8, ptr %2, i64 184
  store ptr %16, ptr %17, align 8, !tbaa !14
  %18 = load i32, ptr %16, align 8, !tbaa !15
  %19 = icmp eq i32 %18, 2001
  br i1 %19, label %20, label %21

20:                                               ; preds = %._crit_edge
  tail call void @free_partial_Effect(ptr noundef nonnull %2) #2
  br label %99

21:                                               ; preds = %._crit_edge
  %22 = getelementptr inbounds i8, ptr %.087124, i64 192
  %.086107 = load ptr, ptr %22, align 8, !tbaa !17
  %.not95108 = icmp eq ptr %.086107, null
  br i1 %.not95108, label %._crit_edge112, label %.lr.ph111

.lr.ph111:                                        ; preds = %21
  %23 = getelementptr inbounds i8, ptr %2, i64 192
  br label %24

24:                                               ; preds = %.lr.ph111, %55
  %.086109 = phi ptr [ %.086107, %.lr.ph111 ], [ %.086, %55 ]
  %25 = tail call ptr @new_Literal() #2
  %26 = load i8, ptr %.086109, align 8, !tbaa !18
  store i8 %26, ptr %25, align 8, !tbaa !18
  %27 = getelementptr inbounds i8, ptr %.086109, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !21
  %29 = getelementptr inbounds i8, ptr %25, i64 4
  store i32 %28, ptr %29, align 4, !tbaa !21
  %30 = sext i32 %28 to i64
  %31 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph105, label %._crit_edge106

.lr.ph105:                                        ; preds = %24
  %34 = getelementptr inbounds i8, ptr %.086109, i64 8
  %35 = getelementptr inbounds i8, ptr %25, i64 8
  br label %36

36:                                               ; preds = %.lr.ph105, %47
  %indvars.iv132 = phi i64 [ 0, %.lr.ph105 ], [ %indvars.iv.next133, %47 ]
  %37 = getelementptr inbounds [5 x i32], ptr %34, i64 0, i64 %indvars.iv132
  %38 = load i32, ptr %37, align 4, !tbaa !11
  %39 = getelementptr inbounds [5 x i32], ptr %35, i64 0, i64 %indvars.iv132
  store i32 %38, ptr %39, align 4, !tbaa !11
  %40 = icmp slt i32 %38, 0
  br i1 %40, label %41, label %47

41:                                               ; preds = %36
  %42 = xor i32 %38, -1
  %43 = zext nneg i32 %42 to i64
  %44 = getelementptr inbounds [15 x i32], ptr @linst_table, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %.not101 = icmp eq i32 %45, -1
  br i1 %.not101, label %47, label %46

46:                                               ; preds = %41
  store i32 %45, ptr %39, align 4, !tbaa !11
  br label %47

47:                                               ; preds = %36, %41, %46
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %48 = load i32, ptr %31, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next133, %49
  br i1 %50, label %36, label %._crit_edge106, !llvm.loop !22

._crit_edge106:                                   ; preds = %47, %24
  %51 = load ptr, ptr %23, align 8, !tbaa !23
  %52 = getelementptr inbounds i8, ptr %25, i64 32
  store ptr %51, ptr %52, align 8, !tbaa !24
  %.not100 = icmp eq ptr %51, null
  br i1 %.not100, label %55, label %53

53:                                               ; preds = %._crit_edge106
  %54 = getelementptr inbounds i8, ptr %51, i64 40
  store ptr %25, ptr %54, align 8, !tbaa !25
  br label %55

55:                                               ; preds = %53, %._crit_edge106
  store ptr %25, ptr %23, align 8, !tbaa !23
  %56 = getelementptr inbounds i8, ptr %.086109, i64 32
  %.086 = load ptr, ptr %56, align 8, !tbaa !17
  %.not95 = icmp eq ptr %.086, null
  br i1 %.not95, label %._crit_edge112, label %24, !llvm.loop !26

._crit_edge112:                                   ; preds = %55, %21
  %57 = getelementptr inbounds i8, ptr %.087124, i64 200
  %.085117 = load ptr, ptr %57, align 8, !tbaa !17
  %.not96118 = icmp eq ptr %.085117, null
  br i1 %.not96118, label %._crit_edge122, label %.lr.ph121

.lr.ph121:                                        ; preds = %._crit_edge112
  %58 = getelementptr inbounds i8, ptr %2, i64 200
  br label %59

59:                                               ; preds = %.lr.ph121, %94
  %.085119 = phi ptr [ %.085117, %.lr.ph121 ], [ %.085, %94 ]
  %60 = tail call ptr @new_NumericEffect() #2
  %61 = getelementptr inbounds i8, ptr %.085119, i64 24
  %62 = load i32, ptr %61, align 8, !tbaa !27
  %63 = getelementptr inbounds i8, ptr %60, i64 24
  store i32 %62, ptr %63, align 8, !tbaa !27
  %64 = load i32, ptr %.085119, align 8, !tbaa !30
  store i32 %64, ptr %60, align 8, !tbaa !30
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [50 x i32], ptr @gf_arity, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.lr.ph115, label %._crit_edge116

.lr.ph115:                                        ; preds = %59
  %69 = getelementptr inbounds i8, ptr %.085119, i64 4
  %70 = getelementptr inbounds i8, ptr %60, i64 4
  br label %71

71:                                               ; preds = %.lr.ph115, %82
  %indvars.iv135 = phi i64 [ 0, %.lr.ph115 ], [ %indvars.iv.next136, %82 ]
  %72 = getelementptr inbounds [5 x i32], ptr %69, i64 0, i64 %indvars.iv135
  %73 = load i32, ptr %72, align 4, !tbaa !11
  %74 = getelementptr inbounds [5 x i32], ptr %70, i64 0, i64 %indvars.iv135
  store i32 %73, ptr %74, align 4, !tbaa !11
  %75 = icmp slt i32 %73, 0
  br i1 %75, label %76, label %82

76:                                               ; preds = %71
  %77 = xor i32 %73, -1
  %78 = zext nneg i32 %77 to i64
  %79 = getelementptr inbounds [15 x i32], ptr @linst_table, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !11
  %.not99 = icmp eq i32 %80, -1
  br i1 %.not99, label %82, label %81

81:                                               ; preds = %76
  store i32 %80, ptr %74, align 4, !tbaa !11
  br label %82

82:                                               ; preds = %71, %76, %81
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %83 = load i32, ptr %66, align 4, !tbaa !11
  %84 = sext i32 %83 to i64
  %85 = icmp slt i64 %indvars.iv.next136, %84
  br i1 %85, label %71, label %._crit_edge116, !llvm.loop !31

._crit_edge116:                                   ; preds = %82, %59
  %86 = getelementptr inbounds i8, ptr %.085119, i64 32
  %87 = load ptr, ptr %86, align 8, !tbaa !32
  %88 = tail call ptr @copy_Exp(ptr noundef %87) #2
  %89 = getelementptr inbounds i8, ptr %60, i64 32
  store ptr %88, ptr %89, align 8, !tbaa !32
  tail call void @instantiate_exp(ptr noundef nonnull %89)
  %90 = load ptr, ptr %58, align 8, !tbaa !33
  %91 = getelementptr inbounds i8, ptr %60, i64 40
  store ptr %90, ptr %91, align 8, !tbaa !34
  %.not98 = icmp eq ptr %90, null
  br i1 %.not98, label %94, label %92

92:                                               ; preds = %._crit_edge116
  %93 = getelementptr inbounds i8, ptr %90, i64 48
  store ptr %60, ptr %93, align 8, !tbaa !35
  br label %94

94:                                               ; preds = %92, %._crit_edge116
  store ptr %60, ptr %58, align 8, !tbaa !33
  %95 = getelementptr inbounds i8, ptr %.085119, i64 40
  %.085 = load ptr, ptr %95, align 8, !tbaa !17
  %.not96 = icmp eq ptr %.085, null
  br i1 %.not96, label %._crit_edge122, label %59, !llvm.loop !36

._crit_edge122:                                   ; preds = %94, %._crit_edge112
  %96 = getelementptr inbounds i8, ptr %2, i64 208
  store ptr %.083125, ptr %96, align 8, !tbaa !37
  %.not97 = icmp eq ptr %.083125, null
  br i1 %.not97, label %99, label %97

97:                                               ; preds = %._crit_edge122
  %98 = getelementptr inbounds i8, ptr %.083125, i64 216
  store ptr %2, ptr %98, align 8, !tbaa !38
  br label %99

99:                                               ; preds = %._crit_edge122, %97, %20
  %.184 = phi ptr [ %.083125, %20 ], [ %2, %97 ], [ %2, %._crit_edge122 ]
  %100 = getelementptr inbounds i8, ptr %.087124, i64 208
  %101 = load ptr, ptr %100, align 8, !tbaa !37
  %.not = icmp eq ptr %101, null
  br i1 %.not, label %._crit_edge128, label %.lr.ph127, !llvm.loop !39

._crit_edge128:                                   ; preds = %99, %1
  %.083.lcssa = phi ptr [ null, %1 ], [ %.184, %99 ]
  ret ptr %.083.lcssa
}

declare ptr @new_Effect() local_unnamed_addr #1

declare void @free_partial_Effect(ptr noundef) local_unnamed_addr #1

declare ptr @new_Literal() local_unnamed_addr #1

declare ptr @new_NumericEffect() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @instantiate_exp(ptr noundef) local_unnamed_addr #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_Effect", !7, i64 0, !8, i64 4, !8, i64 64, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!6, !10, i64 184}
!15 = !{!16, !7, i64 0}
!16 = !{!"_WffNode", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !10, i64 88, !8, i64 96}
!17 = !{!10, !10, i64 0}
!18 = !{!19, !8, i64 0}
!19 = !{!"_Literal", !8, i64 0, !20, i64 4, !10, i64 32, !10, i64 40}
!20 = !{!"_Fact", !7, i64 0, !8, i64 4}
!21 = !{!19, !7, i64 4}
!22 = distinct !{!22, !13}
!23 = !{!6, !10, i64 192}
!24 = !{!19, !10, i64 32}
!25 = !{!19, !10, i64 40}
!26 = distinct !{!26, !13}
!27 = !{!28, !7, i64 24}
!28 = !{!"_NumericEffect", !29, i64 0, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!29 = !{!"_Fluent", !7, i64 0, !8, i64 4}
!30 = !{!28, !7, i64 0}
!31 = distinct !{!31, !13}
!32 = !{!28, !10, i64 32}
!33 = !{!6, !10, i64 200}
!34 = !{!28, !10, i64 40}
!35 = !{!28, !10, i64 48}
!36 = distinct !{!36, !13}
!37 = !{!6, !10, i64 208}
!38 = !{!6, !10, i64 216}
!39 = distinct !{!39, !13}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass