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

; 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._Fact = type { i32, [5 x i32] }
%struct._WffNode = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32, ptr, ptr, i8 }
%struct._Action = type { ptr, ptr, i8, ptr, i32, [15 x i32], [15 x i32], ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, ptr, i32, ptr }
%struct._ActionEffect = type { ptr, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i8, i8, float }

@gactions = external global ptr, align 8
@gnum_actions = external global i32, align 4
@garity = external global [50 x i32], align 16
@lindex = external dso_local global [50 x ptr], align 16
@lp = external dso_local global i32, align 4
@largs = external dso_local global [15 x i32], align 16
@gnum_relevant_facts = external global i32, align 4
@grelevant_facts = external global [150000 x %struct._Fact], align 16
@.str.12 = external hidden unnamed_addr constant [52 x i8], align 1
@lnum_effects = external dso_local global i32, align 4
@gnum_logic_goal = external global i32, align 4
@glogic_goal = external global ptr, align 8
@gnum_numeric_goal = external global i32, align 4
@gnumeric_goal_comp = external global ptr, align 8
@gnumeric_goal_lh = external global ptr, align 8
@gnumeric_goal_rh = external global ptr, align 8
@ggoal = external global ptr, align 8
@.str.35 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [64 x i8], align 1
@gnum_plan_ops = external global i32, align 4
@.str.37 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [66 x i8], align 1

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @fact_adress() #2

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare ptr @new_Action() #3

; 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
define dso_local void @create_final_goal_state() #2 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %8 = call zeroext i8 @set_relevants_in_wff(ptr noundef @ggoal)
  %9 = icmp ne i8 %8, 0
  br i1 %9, label %12, label %10

10:                                               ; preds = %0
  %11 = call i32 (ptr, ...) @printf(ptr noundef @.str.35)
  call void @exit(i32 noundef 1) #6
  unreachable

12:                                               ; preds = %0
  call void @cleanup_wff(ptr noundef @ggoal)
  %13 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct._WffNode, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !9
  %16 = icmp eq i32 %15, 2000
  br i1 %16, label %17, label %19

17:                                               ; preds = %12
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.36)
  store i32 0, ptr @gnum_plan_ops, align 4, !tbaa !12
  call void @exit(i32 noundef 1) #6
  unreachable

19:                                               ; preds = %12
  %20 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._WffNode, ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = icmp eq i32 %22, 2001
  br i1 %23, label %24, label %26

24:                                               ; preds = %19
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  call void @exit(i32 noundef 1) #6
  unreachable

26:                                               ; preds = %19
  %27 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._WffNode, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !9
  switch i32 %29, label %603 [
    i32 2007, label %30
    i32 2006, label %406
    i32 2002, label %541
    i32 2003, label %582
  ]

30:                                               ; preds = %26
  %31 = load i32, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %32 = icmp eq i32 %31, 150000
  br i1 %32, label %33, label %35

33:                                               ; preds = %30
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef 150000)
  call void @exit(i32 noundef 1) #6
  unreachable

35:                                               ; preds = %30
  %36 = load i32, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [150000 x %struct._Fact], ptr @grelevant_facts, i64 0, i64 %37
  %39 = getelementptr inbounds %struct._Fact, ptr %38, i32 0, i32 0
  store i32 -3, ptr %39, align 8, !tbaa !13
  %40 = load i32, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %42 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._WffNode, ptr %42, i32 0, i32 4
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  store ptr %44, ptr %1, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %396, %35
  %46 = load ptr, ptr %1, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %400

48:                                               ; preds = %45
  %49 = call ptr @new_Action()
  store ptr %49, ptr %7, align 8, !tbaa !5
  %50 = load ptr, ptr %1, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._WffNode, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !9
  %53 = icmp eq i32 %52, 2006
  br i1 %53, label %54, label %209

54:                                               ; preds = %48
  store i32 0, ptr %3, align 4, !tbaa !12
  store i32 0, ptr %4, align 4, !tbaa !12
  %55 = load ptr, ptr %1, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._WffNode, ptr %55, i32 0, i32 4
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  store ptr %57, ptr %2, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %78, %54
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %82

61:                                               ; preds = %58
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._WffNode, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 8, !tbaa !9
  %65 = icmp eq i32 %64, 2002
  br i1 %65, label %66, label %69

66:                                               ; preds = %61
  %67 = load i32, ptr %3, align 4, !tbaa !12
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %3, align 4, !tbaa !12
  br label %69

69:                                               ; preds = %66, %61
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._WffNode, ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !9
  %73 = icmp eq i32 %72, 2003
  br i1 %73, label %74, label %77

74:                                               ; preds = %69
  %75 = load i32, ptr %4, align 4, !tbaa !12
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %4, align 4, !tbaa !12
  br label %77

77:                                               ; preds = %74, %69
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._WffNode, ptr %79, i32 0, i32 5
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  store ptr %81, ptr %2, align 8, !tbaa !5
  br label %58, !llvm.loop !17

82:                                               ; preds = %58
  %83 = load i32, ptr %3, align 4, !tbaa !12
  %84 = sext i32 %83 to i64
  %85 = call noalias ptr @calloc(i64 noundef %84, i64 noundef 4) #7
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._Action, ptr %86, i32 0, i32 7
  store ptr %85, ptr %87, align 8, !tbaa !19
  %88 = load i32, ptr %4, align 4, !tbaa !12
  %89 = sext i32 %88 to i64
  %90 = call noalias ptr @calloc(i64 noundef %89, i64 noundef 4) #7
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._Action, ptr %91, i32 0, i32 9
  store ptr %90, ptr %92, align 8, !tbaa !21
  %93 = load i32, ptr %4, align 4, !tbaa !12
  %94 = sext i32 %93 to i64
  %95 = call noalias ptr @calloc(i64 noundef %94, i64 noundef 8) #7
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._Action, ptr %96, i32 0, i32 10
  store ptr %95, ptr %97, align 8, !tbaa !22
  %98 = load i32, ptr %4, align 4, !tbaa !12
  %99 = sext i32 %98 to i64
  %100 = call noalias ptr @calloc(i64 noundef %99, i64 noundef 8) #7
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._Action, ptr %101, i32 0, i32 11
  store ptr %100, ptr %102, align 8, !tbaa !23
  %103 = load i32, ptr %3, align 4, !tbaa !12
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._Action, ptr %104, i32 0, i32 8
  store i32 %103, ptr %105, align 8, !tbaa !24
  %106 = load i32, ptr %4, align 4, !tbaa !12
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._Action, ptr %107, i32 0, i32 12
  store i32 %106, ptr %108, align 8, !tbaa !25
  store i32 0, ptr %3, align 4, !tbaa !12
  store i32 0, ptr %4, align 4, !tbaa !12
  %109 = load ptr, ptr %1, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._WffNode, ptr %109, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !15
  store ptr %111, ptr %2, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %204, %82
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %208

115:                                              ; preds = %112
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._WffNode, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 8, !tbaa !9
  %119 = icmp eq i32 %118, 2002
  br i1 %119, label %120, label %166

120:                                              ; preds = %115
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._WffNode, ptr %121, i32 0, i32 7
  %123 = load ptr, ptr %122, align 8, !tbaa !26
  %124 = getelementptr inbounds %struct._Fact, ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 4, !tbaa !13
  store i32 %125, ptr @lp, align 4, !tbaa !12
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %126

126:                                              ; preds = %145, %120
  %127 = load i32, ptr %5, align 4, !tbaa !12
  %128 = load i32, ptr @lp, align 4, !tbaa !12
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !12
  %132 = icmp slt i32 %127, %131
  br i1 %132, label %133, label %148

133:                                              ; preds = %126
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._WffNode, ptr %134, i32 0, i32 7
  %136 = load ptr, ptr %135, align 8, !tbaa !26
  %137 = getelementptr inbounds %struct._Fact, ptr %136, i32 0, i32 1
  %138 = load i32, ptr %5, align 4, !tbaa !12
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [5 x i32], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !12
  %142 = load i32, ptr %5, align 4, !tbaa !12
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %143
  store i32 %141, ptr %144, align 4, !tbaa !12
  br label %145

145:                                              ; preds = %133
  %146 = load i32, ptr %5, align 4, !tbaa !12
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %5, align 4, !tbaa !12
  br label %126, !llvm.loop !27

148:                                              ; preds = %126
  %149 = call i32 @fact_adress()
  store i32 %149, ptr %6, align 4, !tbaa !12
  %150 = load i32, ptr @lp, align 4, !tbaa !12
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [50 x ptr], ptr @lindex, i64 0, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = load i32, ptr %6, align 4, !tbaa !12
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i32, ptr %153, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !12
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct._Action, ptr %158, i32 0, i32 7
  %160 = load ptr, ptr %159, align 8, !tbaa !19
  %161 = load i32, ptr %3, align 4, !tbaa !12
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %160, i64 %162
  store i32 %157, ptr %163, align 4, !tbaa !12
  %164 = load i32, ptr %3, align 4, !tbaa !12
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %3, align 4, !tbaa !12
  br label %166

166:                                              ; preds = %148, %115
  %167 = load ptr, ptr %2, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._WffNode, ptr %167, i32 0, i32 0
  %169 = load i32, ptr %168, align 8, !tbaa !9
  %170 = icmp eq i32 %169, 2003
  br i1 %170, label %171, label %203

171:                                              ; preds = %166
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct._WffNode, ptr %172, i32 0, i32 10
  %174 = load i32, ptr %173, align 8, !tbaa !28
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct._Action, ptr %175, i32 0, i32 9
  %177 = load ptr, ptr %176, align 8, !tbaa !21
  %178 = load i32, ptr %4, align 4, !tbaa !12
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds i32, ptr %177, i64 %179
  store i32 %174, ptr %180, align 4, !tbaa !12
  %181 = load ptr, ptr %2, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._WffNode, ptr %181, i32 0, i32 11
  %183 = load ptr, ptr %182, align 8, !tbaa !29
  %184 = call ptr @copy_Exp(ptr noundef %183)
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._Action, ptr %185, i32 0, i32 10
  %187 = load ptr, ptr %186, align 8, !tbaa !22
  %188 = load i32, ptr %4, align 4, !tbaa !12
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds ptr, ptr %187, i64 %189
  store ptr %184, ptr %190, align 8, !tbaa !5
  %191 = load ptr, ptr %2, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct._WffNode, ptr %191, i32 0, i32 12
  %193 = load ptr, ptr %192, align 8, !tbaa !30
  %194 = call ptr @copy_Exp(ptr noundef %193)
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._Action, ptr %195, i32 0, i32 11
  %197 = load ptr, ptr %196, align 8, !tbaa !23
  %198 = load i32, ptr %4, align 4, !tbaa !12
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds ptr, ptr %197, i64 %199
  store ptr %194, ptr %200, align 8, !tbaa !5
  %201 = load i32, ptr %4, align 4, !tbaa !12
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %4, align 4, !tbaa !12
  br label %203

203:                                              ; preds = %171, %166
  br label %204

204:                                              ; preds = %203
  %205 = load ptr, ptr %2, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._WffNode, ptr %205, i32 0, i32 5
  %207 = load ptr, ptr %206, align 8, !tbaa !16
  store ptr %207, ptr %2, align 8, !tbaa !5
  br label %112, !llvm.loop !31

208:                                              ; preds = %112
  br label %302

209:                                              ; preds = %48
  %210 = load ptr, ptr %1, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct._WffNode, ptr %210, i32 0, i32 0
  %212 = load i32, ptr %211, align 8, !tbaa !9
  %213 = icmp eq i32 %212, 2002
  br i1 %213, label %214, label %261

214:                                              ; preds = %209
  %215 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 4) #7
  %216 = load ptr, ptr %7, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct._Action, ptr %216, i32 0, i32 7
  store ptr %215, ptr %217, align 8, !tbaa !19
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct._Action, ptr %218, i32 0, i32 8
  store i32 1, ptr %219, align 8, !tbaa !24
  %220 = load ptr, ptr %1, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct._WffNode, ptr %220, i32 0, i32 7
  %222 = load ptr, ptr %221, align 8, !tbaa !26
  %223 = getelementptr inbounds %struct._Fact, ptr %222, i32 0, i32 0
  %224 = load i32, ptr %223, align 4, !tbaa !13
  store i32 %224, ptr @lp, align 4, !tbaa !12
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %225

225:                                              ; preds = %244, %214
  %226 = load i32, ptr %5, align 4, !tbaa !12
  %227 = load i32, ptr @lp, align 4, !tbaa !12
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !12
  %231 = icmp slt i32 %226, %230
  br i1 %231, label %232, label %247

232:                                              ; preds = %225
  %233 = load ptr, ptr %1, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct._WffNode, ptr %233, i32 0, i32 7
  %235 = load ptr, ptr %234, align 8, !tbaa !26
  %236 = getelementptr inbounds %struct._Fact, ptr %235, i32 0, i32 1
  %237 = load i32, ptr %5, align 4, !tbaa !12
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [5 x i32], ptr %236, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !12
  %241 = load i32, ptr %5, align 4, !tbaa !12
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %242
  store i32 %240, ptr %243, align 4, !tbaa !12
  br label %244

244:                                              ; preds = %232
  %245 = load i32, ptr %5, align 4, !tbaa !12
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %5, align 4, !tbaa !12
  br label %225, !llvm.loop !32

247:                                              ; preds = %225
  %248 = call i32 @fact_adress()
  store i32 %248, ptr %6, align 4, !tbaa !12
  %249 = load i32, ptr @lp, align 4, !tbaa !12
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [50 x ptr], ptr @lindex, i64 0, i64 %250
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  %253 = load i32, ptr %6, align 4, !tbaa !12
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds i32, ptr %252, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !12
  %257 = load ptr, ptr %7, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct._Action, ptr %257, i32 0, i32 7
  %259 = load ptr, ptr %258, align 8, !tbaa !19
  %260 = getelementptr inbounds i32, ptr %259, i64 0
  store i32 %256, ptr %260, align 4, !tbaa !12
  br label %261

261:                                              ; preds = %247, %209
  %262 = load ptr, ptr %1, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct._WffNode, ptr %262, i32 0, i32 0
  %264 = load i32, ptr %263, align 8, !tbaa !9
  %265 = icmp eq i32 %264, 2003
  br i1 %265, label %266, label %301

266:                                              ; preds = %261
  %267 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 4) #7
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct._Action, ptr %268, i32 0, i32 9
  store ptr %267, ptr %269, align 8, !tbaa !21
  %270 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 8) #7
  %271 = load ptr, ptr %7, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct._Action, ptr %271, i32 0, i32 10
  store ptr %270, ptr %272, align 8, !tbaa !22
  %273 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 8) #7
  %274 = load ptr, ptr %7, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct._Action, ptr %274, i32 0, i32 11
  store ptr %273, ptr %275, align 8, !tbaa !23
  %276 = load ptr, ptr %1, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct._WffNode, ptr %276, i32 0, i32 10
  %278 = load i32, ptr %277, align 8, !tbaa !28
  %279 = load ptr, ptr %7, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct._Action, ptr %279, i32 0, i32 9
  %281 = load ptr, ptr %280, align 8, !tbaa !21
  %282 = getelementptr inbounds i32, ptr %281, i64 0
  store i32 %278, ptr %282, align 4, !tbaa !12
  %283 = load ptr, ptr %1, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct._WffNode, ptr %283, i32 0, i32 11
  %285 = load ptr, ptr %284, align 8, !tbaa !29
  %286 = call ptr @copy_Exp(ptr noundef %285)
  %287 = load ptr, ptr %7, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct._Action, ptr %287, i32 0, i32 10
  %289 = load ptr, ptr %288, align 8, !tbaa !22
  %290 = getelementptr inbounds ptr, ptr %289, i64 0
  store ptr %286, ptr %290, align 8, !tbaa !5
  %291 = load ptr, ptr %1, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct._WffNode, ptr %291, i32 0, i32 12
  %293 = load ptr, ptr %292, align 8, !tbaa !30
  %294 = call ptr @copy_Exp(ptr noundef %293)
  %295 = load ptr, ptr %7, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct._Action, ptr %295, i32 0, i32 11
  %297 = load ptr, ptr %296, align 8, !tbaa !23
  %298 = getelementptr inbounds ptr, ptr %297, i64 0
  store ptr %294, ptr %298, align 8, !tbaa !5
  %299 = load ptr, ptr %7, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct._Action, ptr %299, i32 0, i32 12
  store i32 1, ptr %300, align 8, !tbaa !25
  br label %301

301:                                              ; preds = %266, %261
  br label %302

302:                                              ; preds = %301, %208
  %303 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 184) #7
  %304 = load ptr, ptr %7, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct._Action, ptr %304, i32 0, i32 17
  store ptr %303, ptr %305, align 8, !tbaa !33
  %306 = load ptr, ptr %7, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct._Action, ptr %306, i32 0, i32 18
  store i32 1, ptr %307, align 8, !tbaa !34
  %308 = load ptr, ptr %7, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct._Action, ptr %308, i32 0, i32 17
  %310 = load ptr, ptr %309, align 8, !tbaa !33
  %311 = getelementptr inbounds %struct._ActionEffect, ptr %310, i64 0
  %312 = getelementptr inbounds %struct._ActionEffect, ptr %311, i32 0, i32 0
  store ptr null, ptr %312, align 8, !tbaa !35
  %313 = load ptr, ptr %7, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct._Action, ptr %313, i32 0, i32 17
  %315 = load ptr, ptr %314, align 8, !tbaa !33
  %316 = getelementptr inbounds %struct._ActionEffect, ptr %315, i64 0
  %317 = getelementptr inbounds %struct._ActionEffect, ptr %316, i32 0, i32 1
  store i32 0, ptr %317, align 8, !tbaa !38
  %318 = load ptr, ptr %7, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct._Action, ptr %318, i32 0, i32 17
  %320 = load ptr, ptr %319, align 8, !tbaa !33
  %321 = getelementptr inbounds %struct._ActionEffect, ptr %320, i64 0
  %322 = getelementptr inbounds %struct._ActionEffect, ptr %321, i32 0, i32 4
  store ptr null, ptr %322, align 8, !tbaa !39
  %323 = load ptr, ptr %7, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct._Action, ptr %323, i32 0, i32 17
  %325 = load ptr, ptr %324, align 8, !tbaa !33
  %326 = getelementptr inbounds %struct._ActionEffect, ptr %325, i64 0
  %327 = getelementptr inbounds %struct._ActionEffect, ptr %326, i32 0, i32 5
  store i32 0, ptr %327, align 8, !tbaa !40
  %328 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 4) #7
  %329 = load ptr, ptr %7, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct._Action, ptr %329, i32 0, i32 17
  %331 = load ptr, ptr %330, align 8, !tbaa !33
  %332 = getelementptr inbounds %struct._ActionEffect, ptr %331, i64 0
  %333 = getelementptr inbounds %struct._ActionEffect, ptr %332, i32 0, i32 2
  store ptr %328, ptr %333, align 8, !tbaa !41
  %334 = load i32, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %335 = sub nsw i32 %334, 1
  %336 = load ptr, ptr %7, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct._Action, ptr %336, i32 0, i32 17
  %338 = load ptr, ptr %337, align 8, !tbaa !33
  %339 = getelementptr inbounds %struct._ActionEffect, ptr %338, i64 0
  %340 = getelementptr inbounds %struct._ActionEffect, ptr %339, i32 0, i32 2
  %341 = load ptr, ptr %340, align 8, !tbaa !41
  %342 = getelementptr inbounds i32, ptr %341, i64 0
  store i32 %335, ptr %342, align 4, !tbaa !12
  %343 = load ptr, ptr %7, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct._Action, ptr %343, i32 0, i32 17
  %345 = load ptr, ptr %344, align 8, !tbaa !33
  %346 = getelementptr inbounds %struct._ActionEffect, ptr %345, i64 0
  %347 = getelementptr inbounds %struct._ActionEffect, ptr %346, i32 0, i32 3
  store i32 1, ptr %347, align 8, !tbaa !42
  %348 = load ptr, ptr %7, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct._Action, ptr %348, i32 0, i32 17
  %350 = load ptr, ptr %349, align 8, !tbaa !33
  %351 = getelementptr inbounds %struct._ActionEffect, ptr %350, i64 0
  %352 = getelementptr inbounds %struct._ActionEffect, ptr %351, i32 0, i32 6
  store ptr null, ptr %352, align 8, !tbaa !43
  %353 = load ptr, ptr %7, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct._Action, ptr %353, i32 0, i32 17
  %355 = load ptr, ptr %354, align 8, !tbaa !33
  %356 = getelementptr inbounds %struct._ActionEffect, ptr %355, i64 0
  %357 = getelementptr inbounds %struct._ActionEffect, ptr %356, i32 0, i32 7
  store ptr null, ptr %357, align 8, !tbaa !44
  %358 = load ptr, ptr %7, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct._Action, ptr %358, i32 0, i32 17
  %360 = load ptr, ptr %359, align 8, !tbaa !33
  %361 = getelementptr inbounds %struct._ActionEffect, ptr %360, i64 0
  %362 = getelementptr inbounds %struct._ActionEffect, ptr %361, i32 0, i32 8
  store ptr null, ptr %362, align 8, !tbaa !45
  %363 = load ptr, ptr %7, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct._Action, ptr %363, i32 0, i32 17
  %365 = load ptr, ptr %364, align 8, !tbaa !33
  %366 = getelementptr inbounds %struct._ActionEffect, ptr %365, i64 0
  %367 = getelementptr inbounds %struct._ActionEffect, ptr %366, i32 0, i32 9
  store i32 0, ptr %367, align 8, !tbaa !46
  %368 = load ptr, ptr %7, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct._Action, ptr %368, i32 0, i32 17
  %370 = load ptr, ptr %369, align 8, !tbaa !33
  %371 = getelementptr inbounds %struct._ActionEffect, ptr %370, i64 0
  %372 = getelementptr inbounds %struct._ActionEffect, ptr %371, i32 0, i32 10
  store ptr null, ptr %372, align 8, !tbaa !47
  %373 = load ptr, ptr %7, align 8, !tbaa !5
  %374 = getelementptr inbounds %struct._Action, ptr %373, i32 0, i32 17
  %375 = load ptr, ptr %374, align 8, !tbaa !33
  %376 = getelementptr inbounds %struct._ActionEffect, ptr %375, i64 0
  %377 = getelementptr inbounds %struct._ActionEffect, ptr %376, i32 0, i32 11
  store ptr null, ptr %377, align 8, !tbaa !48
  %378 = load ptr, ptr %7, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct._Action, ptr %378, i32 0, i32 17
  %380 = load ptr, ptr %379, align 8, !tbaa !33
  %381 = getelementptr inbounds %struct._ActionEffect, ptr %380, i64 0
  %382 = getelementptr inbounds %struct._ActionEffect, ptr %381, i32 0, i32 12
  store ptr null, ptr %382, align 8, !tbaa !49
  %383 = load ptr, ptr %7, align 8, !tbaa !5
  %384 = getelementptr inbounds %struct._Action, ptr %383, i32 0, i32 17
  %385 = load ptr, ptr %384, align 8, !tbaa !33
  %386 = getelementptr inbounds %struct._ActionEffect, ptr %385, i64 0
  %387 = getelementptr inbounds %struct._ActionEffect, ptr %386, i32 0, i32 13
  store i32 0, ptr %387, align 8, !tbaa !50
  %388 = load ptr, ptr @gactions, align 8, !tbaa !5
  %389 = load ptr, ptr %7, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct._Action, ptr %389, i32 0, i32 19
  store ptr %388, ptr %390, align 8, !tbaa !51
  %391 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %391, ptr @gactions, align 8, !tbaa !5
  %392 = load i32, ptr @gnum_actions, align 4, !tbaa !12
  %393 = add nsw i32 %392, 1
  store i32 %393, ptr @gnum_actions, align 4, !tbaa !12
  %394 = load i32, ptr @lnum_effects, align 4, !tbaa !12
  %395 = add nsw i32 %394, 1
  store i32 %395, ptr @lnum_effects, align 4, !tbaa !12
  br label %396

396:                                              ; preds = %302
  %397 = load ptr, ptr %1, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct._WffNode, ptr %397, i32 0, i32 5
  %399 = load ptr, ptr %398, align 8, !tbaa !16
  store ptr %399, ptr %1, align 8, !tbaa !5
  br label %45, !llvm.loop !52

400:                                              ; preds = %45
  %401 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 4) #7
  store ptr %401, ptr @glogic_goal, align 8, !tbaa !5
  %402 = load i32, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %403 = sub nsw i32 %402, 1
  %404 = load ptr, ptr @glogic_goal, align 8, !tbaa !5
  %405 = getelementptr inbounds i32, ptr %404, i64 0
  store i32 %403, ptr %405, align 4, !tbaa !12
  store i32 1, ptr @gnum_logic_goal, align 4, !tbaa !12
  br label %605

406:                                              ; preds = %26
  store i32 0, ptr %3, align 4, !tbaa !12
  store i32 0, ptr %4, align 4, !tbaa !12
  %407 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct._WffNode, ptr %407, i32 0, i32 4
  %409 = load ptr, ptr %408, align 8, !tbaa !15
  store ptr %409, ptr %1, align 8, !tbaa !5
  br label %410

410:                                              ; preds = %430, %406
  %411 = load ptr, ptr %1, align 8, !tbaa !5
  %412 = icmp ne ptr %411, null
  br i1 %412, label %413, label %434

413:                                              ; preds = %410
  %414 = load ptr, ptr %1, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct._WffNode, ptr %414, i32 0, i32 0
  %416 = load i32, ptr %415, align 8, !tbaa !9
  %417 = icmp eq i32 %416, 2002
  br i1 %417, label %418, label %421

418:                                              ; preds = %413
  %419 = load i32, ptr %3, align 4, !tbaa !12
  %420 = add nsw i32 %419, 1
  store i32 %420, ptr %3, align 4, !tbaa !12
  br label %421

421:                                              ; preds = %418, %413
  %422 = load ptr, ptr %1, align 8, !tbaa !5
  %423 = getelementptr inbounds %struct._WffNode, ptr %422, i32 0, i32 0
  %424 = load i32, ptr %423, align 8, !tbaa !9
  %425 = icmp eq i32 %424, 2003
  br i1 %425, label %426, label %429

426:                                              ; preds = %421
  %427 = load i32, ptr %4, align 4, !tbaa !12
  %428 = add nsw i32 %427, 1
  store i32 %428, ptr %4, align 4, !tbaa !12
  br label %429

429:                                              ; preds = %426, %421
  br label %430

430:                                              ; preds = %429
  %431 = load ptr, ptr %1, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct._WffNode, ptr %431, i32 0, i32 5
  %433 = load ptr, ptr %432, align 8, !tbaa !16
  store ptr %433, ptr %1, align 8, !tbaa !5
  br label %410, !llvm.loop !53

434:                                              ; preds = %410
  %435 = load i32, ptr %3, align 4, !tbaa !12
  %436 = sext i32 %435 to i64
  %437 = call noalias ptr @calloc(i64 noundef %436, i64 noundef 4) #7
  store ptr %437, ptr @glogic_goal, align 8, !tbaa !5
  %438 = load i32, ptr %4, align 4, !tbaa !12
  %439 = sext i32 %438 to i64
  %440 = call noalias ptr @calloc(i64 noundef %439, i64 noundef 4) #7
  store ptr %440, ptr @gnumeric_goal_comp, align 8, !tbaa !5
  %441 = load i32, ptr %4, align 4, !tbaa !12
  %442 = sext i32 %441 to i64
  %443 = call noalias ptr @calloc(i64 noundef %442, i64 noundef 8) #7
  store ptr %443, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %444 = load i32, ptr %4, align 4, !tbaa !12
  %445 = sext i32 %444 to i64
  %446 = call noalias ptr @calloc(i64 noundef %445, i64 noundef 8) #7
  store ptr %446, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  %447 = load i32, ptr %3, align 4, !tbaa !12
  store i32 %447, ptr @gnum_logic_goal, align 4, !tbaa !12
  %448 = load i32, ptr %4, align 4, !tbaa !12
  store i32 %448, ptr @gnum_numeric_goal, align 4, !tbaa !12
  store i32 0, ptr %3, align 4, !tbaa !12
  store i32 0, ptr %4, align 4, !tbaa !12
  %449 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct._WffNode, ptr %449, i32 0, i32 4
  %451 = load ptr, ptr %450, align 8, !tbaa !15
  store ptr %451, ptr %1, align 8, !tbaa !5
  br label %452

452:                                              ; preds = %536, %434
  %453 = load ptr, ptr %1, align 8, !tbaa !5
  %454 = icmp ne ptr %453, null
  br i1 %454, label %455, label %540

455:                                              ; preds = %452
  %456 = load ptr, ptr %1, align 8, !tbaa !5
  %457 = getelementptr inbounds %struct._WffNode, ptr %456, i32 0, i32 0
  %458 = load i32, ptr %457, align 8, !tbaa !9
  %459 = icmp eq i32 %458, 2002
  br i1 %459, label %460, label %504

460:                                              ; preds = %455
  %461 = load ptr, ptr %1, align 8, !tbaa !5
  %462 = getelementptr inbounds %struct._WffNode, ptr %461, i32 0, i32 7
  %463 = load ptr, ptr %462, align 8, !tbaa !26
  %464 = getelementptr inbounds %struct._Fact, ptr %463, i32 0, i32 0
  %465 = load i32, ptr %464, align 4, !tbaa !13
  store i32 %465, ptr @lp, align 4, !tbaa !12
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %466

466:                                              ; preds = %485, %460
  %467 = load i32, ptr %5, align 4, !tbaa !12
  %468 = load i32, ptr @lp, align 4, !tbaa !12
  %469 = sext i32 %468 to i64
  %470 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %469
  %471 = load i32, ptr %470, align 4, !tbaa !12
  %472 = icmp slt i32 %467, %471
  br i1 %472, label %473, label %488

473:                                              ; preds = %466
  %474 = load ptr, ptr %1, align 8, !tbaa !5
  %475 = getelementptr inbounds %struct._WffNode, ptr %474, i32 0, i32 7
  %476 = load ptr, ptr %475, align 8, !tbaa !26
  %477 = getelementptr inbounds %struct._Fact, ptr %476, i32 0, i32 1
  %478 = load i32, ptr %5, align 4, !tbaa !12
  %479 = sext i32 %478 to i64
  %480 = getelementptr inbounds [5 x i32], ptr %477, i64 0, i64 %479
  %481 = load i32, ptr %480, align 4, !tbaa !12
  %482 = load i32, ptr %5, align 4, !tbaa !12
  %483 = sext i32 %482 to i64
  %484 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %483
  store i32 %481, ptr %484, align 4, !tbaa !12
  br label %485

485:                                              ; preds = %473
  %486 = load i32, ptr %5, align 4, !tbaa !12
  %487 = add nsw i32 %486, 1
  store i32 %487, ptr %5, align 4, !tbaa !12
  br label %466, !llvm.loop !54

488:                                              ; preds = %466
  %489 = call i32 @fact_adress()
  store i32 %489, ptr %6, align 4, !tbaa !12
  %490 = load i32, ptr @lp, align 4, !tbaa !12
  %491 = sext i32 %490 to i64
  %492 = getelementptr inbounds [50 x ptr], ptr @lindex, i64 0, i64 %491
  %493 = load ptr, ptr %492, align 8, !tbaa !5
  %494 = load i32, ptr %6, align 4, !tbaa !12
  %495 = sext i32 %494 to i64
  %496 = getelementptr inbounds i32, ptr %493, i64 %495
  %497 = load i32, ptr %496, align 4, !tbaa !12
  %498 = load ptr, ptr @glogic_goal, align 8, !tbaa !5
  %499 = load i32, ptr %3, align 4, !tbaa !12
  %500 = sext i32 %499 to i64
  %501 = getelementptr inbounds i32, ptr %498, i64 %500
  store i32 %497, ptr %501, align 4, !tbaa !12
  %502 = load i32, ptr %3, align 4, !tbaa !12
  %503 = add nsw i32 %502, 1
  store i32 %503, ptr %3, align 4, !tbaa !12
  br label %504

504:                                              ; preds = %488, %455
  %505 = load ptr, ptr %1, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct._WffNode, ptr %505, i32 0, i32 0
  %507 = load i32, ptr %506, align 8, !tbaa !9
  %508 = icmp eq i32 %507, 2003
  br i1 %508, label %509, label %535

509:                                              ; preds = %504
  %510 = load ptr, ptr %1, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct._WffNode, ptr %510, i32 0, i32 10
  %512 = load i32, ptr %511, align 8, !tbaa !28
  %513 = load ptr, ptr @gnumeric_goal_comp, align 8, !tbaa !5
  %514 = load i32, ptr %4, align 4, !tbaa !12
  %515 = sext i32 %514 to i64
  %516 = getelementptr inbounds i32, ptr %513, i64 %515
  store i32 %512, ptr %516, align 4, !tbaa !12
  %517 = load ptr, ptr %1, align 8, !tbaa !5
  %518 = getelementptr inbounds %struct._WffNode, ptr %517, i32 0, i32 11
  %519 = load ptr, ptr %518, align 8, !tbaa !29
  %520 = call ptr @copy_Exp(ptr noundef %519)
  %521 = load ptr, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %522 = load i32, ptr %4, align 4, !tbaa !12
  %523 = sext i32 %522 to i64
  %524 = getelementptr inbounds ptr, ptr %521, i64 %523
  store ptr %520, ptr %524, align 8, !tbaa !5
  %525 = load ptr, ptr %1, align 8, !tbaa !5
  %526 = getelementptr inbounds %struct._WffNode, ptr %525, i32 0, i32 12
  %527 = load ptr, ptr %526, align 8, !tbaa !30
  %528 = call ptr @copy_Exp(ptr noundef %527)
  %529 = load ptr, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  %530 = load i32, ptr %4, align 4, !tbaa !12
  %531 = sext i32 %530 to i64
  %532 = getelementptr inbounds ptr, ptr %529, i64 %531
  store ptr %528, ptr %532, align 8, !tbaa !5
  %533 = load i32, ptr %4, align 4, !tbaa !12
  %534 = add nsw i32 %533, 1
  store i32 %534, ptr %4, align 4, !tbaa !12
  br label %535

535:                                              ; preds = %509, %504
  br label %536

536:                                              ; preds = %535
  %537 = load ptr, ptr %1, align 8, !tbaa !5
  %538 = getelementptr inbounds %struct._WffNode, ptr %537, i32 0, i32 5
  %539 = load ptr, ptr %538, align 8, !tbaa !16
  store ptr %539, ptr %1, align 8, !tbaa !5
  br label %452, !llvm.loop !55

540:                                              ; preds = %452
  br label %605

541:                                              ; preds = %26
  %542 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 4) #7
  store ptr %542, ptr @glogic_goal, align 8, !tbaa !5
  store i32 1, ptr @gnum_logic_goal, align 4, !tbaa !12
  %543 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %544 = getelementptr inbounds %struct._WffNode, ptr %543, i32 0, i32 7
  %545 = load ptr, ptr %544, align 8, !tbaa !26
  %546 = getelementptr inbounds %struct._Fact, ptr %545, i32 0, i32 0
  %547 = load i32, ptr %546, align 4, !tbaa !13
  store i32 %547, ptr @lp, align 4, !tbaa !12
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %548

548:                                              ; preds = %567, %541
  %549 = load i32, ptr %5, align 4, !tbaa !12
  %550 = load i32, ptr @lp, align 4, !tbaa !12
  %551 = sext i32 %550 to i64
  %552 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %551
  %553 = load i32, ptr %552, align 4, !tbaa !12
  %554 = icmp slt i32 %549, %553
  br i1 %554, label %555, label %570

555:                                              ; preds = %548
  %556 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %557 = getelementptr inbounds %struct._WffNode, ptr %556, i32 0, i32 7
  %558 = load ptr, ptr %557, align 8, !tbaa !26
  %559 = getelementptr inbounds %struct._Fact, ptr %558, i32 0, i32 1
  %560 = load i32, ptr %5, align 4, !tbaa !12
  %561 = sext i32 %560 to i64
  %562 = getelementptr inbounds [5 x i32], ptr %559, i64 0, i64 %561
  %563 = load i32, ptr %562, align 4, !tbaa !12
  %564 = load i32, ptr %5, align 4, !tbaa !12
  %565 = sext i32 %564 to i64
  %566 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %565
  store i32 %563, ptr %566, align 4, !tbaa !12
  br label %567

567:                                              ; preds = %555
  %568 = load i32, ptr %5, align 4, !tbaa !12
  %569 = add nsw i32 %568, 1
  store i32 %569, ptr %5, align 4, !tbaa !12
  br label %548, !llvm.loop !56

570:                                              ; preds = %548
  %571 = call i32 @fact_adress()
  store i32 %571, ptr %6, align 4, !tbaa !12
  %572 = load i32, ptr @lp, align 4, !tbaa !12
  %573 = sext i32 %572 to i64
  %574 = getelementptr inbounds [50 x ptr], ptr @lindex, i64 0, i64 %573
  %575 = load ptr, ptr %574, align 8, !tbaa !5
  %576 = load i32, ptr %6, align 4, !tbaa !12
  %577 = sext i32 %576 to i64
  %578 = getelementptr inbounds i32, ptr %575, i64 %577
  %579 = load i32, ptr %578, align 4, !tbaa !12
  %580 = load ptr, ptr @glogic_goal, align 8, !tbaa !5
  %581 = getelementptr inbounds i32, ptr %580, i64 0
  store i32 %579, ptr %581, align 4, !tbaa !12
  br label %605

582:                                              ; preds = %26
  %583 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 4) #7
  store ptr %583, ptr @gnumeric_goal_comp, align 8, !tbaa !5
  %584 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 8) #7
  store ptr %584, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %585 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 8) #7
  store ptr %585, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  store i32 1, ptr @gnum_numeric_goal, align 4, !tbaa !12
  %586 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %587 = getelementptr inbounds %struct._WffNode, ptr %586, i32 0, i32 10
  %588 = load i32, ptr %587, align 8, !tbaa !28
  %589 = load ptr, ptr @gnumeric_goal_comp, align 8, !tbaa !5
  %590 = getelementptr inbounds i32, ptr %589, i64 0
  store i32 %588, ptr %590, align 4, !tbaa !12
  %591 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %592 = getelementptr inbounds %struct._WffNode, ptr %591, i32 0, i32 11
  %593 = load ptr, ptr %592, align 8, !tbaa !29
  %594 = call ptr @copy_Exp(ptr noundef %593)
  %595 = load ptr, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %596 = getelementptr inbounds ptr, ptr %595, i64 0
  store ptr %594, ptr %596, align 8, !tbaa !5
  %597 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %598 = getelementptr inbounds %struct._WffNode, ptr %597, i32 0, i32 12
  %599 = load ptr, ptr %598, align 8, !tbaa !30
  %600 = call ptr @copy_Exp(ptr noundef %599)
  %601 = load ptr, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  %602 = getelementptr inbounds ptr, ptr %601, i64 0
  store ptr %600, ptr %602, align 8, !tbaa !5
  br label %605

603:                                              ; preds = %26
  %604 = call i32 (ptr, ...) @printf(ptr noundef @.str.38)
  call void @exit(i32 noundef 1) #6
  unreachable

605:                                              ; preds = %582, %570, %540, %400
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @set_relevants_in_wff(ptr noundef) #2

declare void @cleanup_wff(ptr noundef) #3

declare ptr @copy_Exp(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(0,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 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 #3 = { "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 #4 = { noreturn nounwind "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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind allocsize(0,1) }

!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, !11, i64 0}
!10 = !{!"_WffNode", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !11, i64 72, !6, i64 80, !6, i64 88, !7, i64 96}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 0}
!14 = !{!"_Fact", !11, i64 0, !7, i64 4}
!15 = !{!10, !6, i64 24}
!16 = !{!10, !6, i64 32}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !6, i64 160}
!20 = !{!"_Action", !6, i64 0, !6, i64 8, !7, i64 16, !6, i64 24, !11, i64 32, !7, i64 36, !7, i64 96, !6, i64 160, !11, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !11, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !11, i64 232, !6, i64 240, !11, i64 248, !6, i64 256}
!21 = !{!20, !6, i64 176}
!22 = !{!20, !6, i64 184}
!23 = !{!20, !6, i64 192}
!24 = !{!20, !11, i64 168}
!25 = !{!20, !11, i64 200}
!26 = !{!10, !6, i64 48}
!27 = distinct !{!27, !18}
!28 = !{!10, !11, i64 72}
!29 = !{!10, !6, i64 80}
!30 = !{!10, !6, i64 88}
!31 = distinct !{!31, !18}
!32 = distinct !{!32, !18}
!33 = !{!20, !6, i64 240}
!34 = !{!20, !11, i64 248}
!35 = !{!36, !6, i64 0}
!36 = !{!"_ActionEffect", !6, i64 0, !11, i64 8, !6, i64 16, !11, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !11, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !11, i64 168, !7, i64 172, !7, i64 173, !37, i64 176}
!37 = !{!"float", !7, i64 0}
!38 = !{!36, !11, i64 8}
!39 = !{!36, !6, i64 32}
!40 = !{!36, !11, i64 40}
!41 = !{!36, !6, i64 16}
!42 = !{!36, !11, i64 24}
!43 = !{!36, !6, i64 48}
!44 = !{!36, !6, i64 56}
!45 = !{!36, !6, i64 64}
!46 = !{!36, !11, i64 72}
!47 = !{!36, !6, i64 80}
!48 = !{!36, !6, i64 88}
!49 = !{!36, !6, i64 96}
!50 = !{!36, !11, i64 104}
!51 = !{!20, !6, i64 256}
!52 = distinct !{!52, !18}
!53 = distinct !{!53, !18}
!54 = distinct !{!54, !18}
!55 = distinct !{!55, !18}
!56 = distinct !{!56, !18}


; 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"

%struct._Fact = type { i32, [5 x i32] }

@gactions = external local_unnamed_addr global ptr, align 8
@gnum_actions = external local_unnamed_addr global i32, align 4
@garity = external local_unnamed_addr global [50 x i32], align 16
@lindex = external dso_local local_unnamed_addr global [50 x ptr], align 16
@lp = external dso_local local_unnamed_addr global i32, align 4
@largs = external dso_local local_unnamed_addr global [15 x i32], align 16
@gnum_relevant_facts = external local_unnamed_addr global i32, align 4
@grelevant_facts = external local_unnamed_addr global [150000 x %struct._Fact], align 16
@.str.12 = external hidden unnamed_addr constant [52 x i8], align 1
@lnum_effects = external dso_local local_unnamed_addr global i32, align 4
@gnum_logic_goal = external local_unnamed_addr global i32, align 4
@glogic_goal = external local_unnamed_addr global ptr, align 8
@gnum_numeric_goal = external local_unnamed_addr global i32, align 4
@gnumeric_goal_comp = external local_unnamed_addr global ptr, align 8
@gnumeric_goal_lh = external local_unnamed_addr global ptr, align 8
@gnumeric_goal_rh = external local_unnamed_addr global ptr, align 8
@ggoal = external global ptr, align 8
@.str.35 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [64 x i8], align 1
@gnum_plan_ops = external local_unnamed_addr global i32, align 4
@.str.37 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @fact_adress() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

declare ptr @new_Action() local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @create_final_goal_state() local_unnamed_addr #1 {
  %1 = tail call zeroext i8 @set_relevants_in_wff(ptr noundef nonnull @ggoal)
  %.not = icmp eq i8 %1, 0
  br i1 %.not, label %2, label %4

2:                                                ; preds = %0
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.35)
  tail call void @exit(i32 noundef 1) #6
  unreachable

4:                                                ; preds = %0
  tail call void @cleanup_wff(ptr noundef nonnull @ggoal) #7
  %5 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %6 = load i32, ptr %5, align 8, !tbaa !9
  switch i32 %6, label %340 [
    i32 2000, label %7
    i32 2001, label %9
    i32 2007, label %11
    i32 2006, label %199
    i32 2002, label %282
    i32 2003, label %325
  ]

7:                                                ; preds = %4
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.36)
  store i32 0, ptr @gnum_plan_ops, align 4, !tbaa !12
  tail call void @exit(i32 noundef 1) #6
  unreachable

9:                                                ; preds = %4
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  tail call void @exit(i32 noundef 1) #6
  unreachable

11:                                               ; preds = %4
  %12 = load i32, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %13 = icmp eq i32 %12, 150000
  br i1 %13, label %14, label %16

14:                                               ; preds = %11
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef 150000)
  tail call void @exit(i32 noundef 1) #6
  unreachable

16:                                               ; preds = %11
  %17 = sext i32 %12 to i64
  %18 = getelementptr inbounds [150000 x %struct._Fact], ptr @grelevant_facts, i64 0, i64 %17
  store i32 -3, ptr %18, align 8, !tbaa !13
  %19 = add nsw i32 %12, 1
  store i32 %19, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %5, i64 24
  %.0199 = load ptr, ptr %20, align 8, !tbaa !5
  %.not146200 = icmp eq ptr %.0199, null
  br i1 %.not146200, label %._crit_edge205, label %.lr.ph204

.lr.ph204:                                        ; preds = %16, %.loopexit
  %.0201 = phi ptr [ %.0, %.loopexit ], [ %.0199, %16 ]
  %21 = tail call ptr @new_Action() #7
  %22 = load i32, ptr %.0201, align 8, !tbaa !9
  switch i32 %22, label %157 [
    i32 2006, label %23
    i32 2002, label %112
  ]

23:                                               ; preds = %.lr.ph204
  %24 = getelementptr inbounds i8, ptr %.0201, i64 24
  %.0139178 = load ptr, ptr %24, align 8, !tbaa !5
  %.not147179 = icmp eq ptr %.0139178, null
  br i1 %.not147179, label %._crit_edge185, label %.lr.ph184

.lr.ph184:                                        ; preds = %23, %.lr.ph184
  %.0139182 = phi ptr [ %.0139, %.lr.ph184 ], [ %.0139178, %23 ]
  %.0127181 = phi i32 [ %.1128, %.lr.ph184 ], [ 0, %23 ]
  %.0131180 = phi i32 [ %spec.select, %.lr.ph184 ], [ 0, %23 ]
  %25 = load i32, ptr %.0139182, align 8, !tbaa !9
  %26 = icmp eq i32 %25, 2002
  %27 = zext i1 %26 to i32
  %spec.select = add nuw nsw i32 %.0131180, %27
  %28 = icmp eq i32 %25, 2003
  %29 = zext i1 %28 to i32
  %.1128 = add nuw nsw i32 %.0127181, %29
  %30 = getelementptr inbounds i8, ptr %.0139182, i64 32
  %.0139 = load ptr, ptr %30, align 8, !tbaa !5
  %.not147 = icmp eq ptr %.0139, null
  br i1 %.not147, label %._crit_edge185, label %.lr.ph184, !llvm.loop !15

._crit_edge185:                                   ; preds = %.lr.ph184, %23
  %.0131.lcssa = phi i32 [ 0, %23 ], [ %spec.select, %.lr.ph184 ]
  %.0127.lcssa = phi i32 [ 0, %23 ], [ %.1128, %.lr.ph184 ]
  %31 = zext nneg i32 %.0131.lcssa to i64
  %32 = tail call noalias ptr @calloc(i64 noundef %31, i64 noundef 4) #8
  %33 = getelementptr inbounds i8, ptr %21, i64 160
  store ptr %32, ptr %33, align 8, !tbaa !17
  %34 = zext nneg i32 %.0127.lcssa to i64
  %35 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #8
  %36 = getelementptr inbounds i8, ptr %21, i64 176
  store ptr %35, ptr %36, align 8, !tbaa !19
  %37 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 8) #8
  %38 = getelementptr inbounds i8, ptr %21, i64 184
  store ptr %37, ptr %38, align 8, !tbaa !20
  %39 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 8) #8
  %40 = getelementptr inbounds i8, ptr %21, i64 192
  store ptr %39, ptr %40, align 8, !tbaa !21
  %41 = getelementptr inbounds i8, ptr %21, i64 168
  store i32 %.0131.lcssa, ptr %41, align 8, !tbaa !22
  %42 = getelementptr inbounds i8, ptr %21, i64 200
  store i32 %.0127.lcssa, ptr %42, align 8, !tbaa !23
  %.1140192 = load ptr, ptr %24, align 8, !tbaa !5
  %.not148193 = icmp eq ptr %.1140192, null
  br i1 %.not148193, label %.loopexit, label %.lr.ph198

.lr.ph198:                                        ; preds = %._crit_edge185, %110
  %.1140196 = phi ptr [ %.1140, %110 ], [ %.1140192, %._crit_edge185 ]
  %.2129195 = phi i32 [ %.3130, %110 ], [ 0, %._crit_edge185 ]
  %.2133194 = phi i32 [ %.3134, %110 ], [ 0, %._crit_edge185 ]
  %43 = load i32, ptr %.1140196, align 8, !tbaa !9
  %44 = icmp eq i32 %43, 2002
  br i1 %44, label %45, label %90

45:                                               ; preds = %.lr.ph198
  %46 = getelementptr inbounds i8, ptr %.1140196, i64 48
  %47 = load ptr, ptr %46, align 8, !tbaa !24
  %48 = load i32, ptr %47, align 4, !tbaa !13
  store i32 %48, ptr @lp, align 4, !tbaa !12
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !12
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph190, label %._crit_edge191

.lr.ph190:                                        ; preds = %45
  %53 = ptrtoint ptr %47 to i64
  %54 = getelementptr inbounds i8, ptr %47, i64 4
  %wide.trip.count220 = zext nneg i32 %51 to i64
  %min.iters.check242 = icmp ult i32 %51, 8
  %55 = sub i64 add (i64 ptrtoint (ptr @largs to i64), i64 -4), %53
  %diff.check239 = icmp ult i64 %55, 32
  %or.cond = or i1 %min.iters.check242, %diff.check239
  br i1 %or.cond, label %scalar.ph241.preheader, label %vector.ph243

vector.ph243:                                     ; preds = %.lr.ph190
  %n.vec245 = and i64 %wide.trip.count220, 2147483640
  br label %vector.body247

vector.body247:                                   ; preds = %vector.body247, %vector.ph243
  %index248 = phi i64 [ 0, %vector.ph243 ], [ %index.next251, %vector.body247 ]
  %56 = getelementptr inbounds [5 x i32], ptr %54, i64 0, i64 %index248
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %wide.load249 = load <4 x i32>, ptr %56, align 4, !tbaa !12
  %wide.load250 = load <4 x i32>, ptr %57, align 4, !tbaa !12
  %58 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %index248
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  store <4 x i32> %wide.load249, ptr %58, align 16, !tbaa !12
  store <4 x i32> %wide.load250, ptr %59, align 16, !tbaa !12
  %index.next251 = add nuw i64 %index248, 8
  %60 = icmp eq i64 %index.next251, %n.vec245
  br i1 %60, label %middle.block240, label %vector.body247, !llvm.loop !25

middle.block240:                                  ; preds = %vector.body247
  %cmp.n252 = icmp eq i64 %n.vec245, %wide.trip.count220
  br i1 %cmp.n252, label %._crit_edge191, label %scalar.ph241.preheader

scalar.ph241.preheader:                           ; preds = %middle.block240, %.lr.ph190
  %indvars.iv217.ph = phi i64 [ 0, %.lr.ph190 ], [ %n.vec245, %middle.block240 ]
  %xtraiter277 = and i64 %wide.trip.count220, 3
  %lcmp.mod278.not = icmp eq i64 %xtraiter277, 0
  br i1 %lcmp.mod278.not, label %scalar.ph241.prol.loopexit, label %scalar.ph241.prol

scalar.ph241.prol:                                ; preds = %scalar.ph241.preheader, %scalar.ph241.prol
  %indvars.iv217.prol = phi i64 [ %indvars.iv.next218.prol, %scalar.ph241.prol ], [ %indvars.iv217.ph, %scalar.ph241.preheader ]
  %prol.iter279 = phi i64 [ %prol.iter279.next, %scalar.ph241.prol ], [ 0, %scalar.ph241.preheader ]
  %61 = getelementptr inbounds [5 x i32], ptr %54, i64 0, i64 %indvars.iv217.prol
  %62 = load i32, ptr %61, align 4, !tbaa !12
  %63 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv217.prol
  store i32 %62, ptr %63, align 4, !tbaa !12
  %indvars.iv.next218.prol = add nuw nsw i64 %indvars.iv217.prol, 1
  %prol.iter279.next = add i64 %prol.iter279, 1
  %prol.iter279.cmp.not = icmp eq i64 %prol.iter279.next, %xtraiter277
  br i1 %prol.iter279.cmp.not, label %scalar.ph241.prol.loopexit, label %scalar.ph241.prol, !llvm.loop !28

scalar.ph241.prol.loopexit:                       ; preds = %scalar.ph241.prol, %scalar.ph241.preheader
  %indvars.iv217.unr = phi i64 [ %indvars.iv217.ph, %scalar.ph241.preheader ], [ %indvars.iv.next218.prol, %scalar.ph241.prol ]
  %64 = sub nsw i64 %indvars.iv217.ph, %wide.trip.count220
  %65 = icmp ugt i64 %64, -4
  br i1 %65, label %._crit_edge191, label %scalar.ph241

scalar.ph241:                                     ; preds = %scalar.ph241.prol.loopexit, %scalar.ph241
  %indvars.iv217 = phi i64 [ %indvars.iv.next218.3, %scalar.ph241 ], [ %indvars.iv217.unr, %scalar.ph241.prol.loopexit ]
  %66 = getelementptr inbounds [5 x i32], ptr %54, i64 0, i64 %indvars.iv217
  %67 = load i32, ptr %66, align 4, !tbaa !12
  %68 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv217
  store i32 %67, ptr %68, align 4, !tbaa !12
  %indvars.iv.next218 = add nuw nsw i64 %indvars.iv217, 1
  %69 = getelementptr inbounds [5 x i32], ptr %54, i64 0, i64 %indvars.iv.next218
  %70 = load i32, ptr %69, align 4, !tbaa !12
  %71 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next218
  store i32 %70, ptr %71, align 4, !tbaa !12
  %indvars.iv.next218.1 = add nuw nsw i64 %indvars.iv217, 2
  %72 = getelementptr inbounds [5 x i32], ptr %54, i64 0, i64 %indvars.iv.next218.1
  %73 = load i32, ptr %72, align 4, !tbaa !12
  %74 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next218.1
  store i32 %73, ptr %74, align 4, !tbaa !12
  %indvars.iv.next218.2 = add nuw nsw i64 %indvars.iv217, 3
  %75 = getelementptr inbounds [5 x i32], ptr %54, i64 0, i64 %indvars.iv.next218.2
  %76 = load i32, ptr %75, align 4, !tbaa !12
  %77 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next218.2
  store i32 %76, ptr %77, align 4, !tbaa !12
  %indvars.iv.next218.3 = add nuw nsw i64 %indvars.iv217, 4
  %exitcond221.not.3 = icmp eq i64 %indvars.iv.next218.3, %wide.trip.count220
  br i1 %exitcond221.not.3, label %._crit_edge191, label %scalar.ph241, !llvm.loop !30

._crit_edge191:                                   ; preds = %scalar.ph241.prol.loopexit, %scalar.ph241, %middle.block240, %45
  %78 = tail call i32 @fact_adress()
  %79 = load i32, ptr @lp, align 4, !tbaa !12
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [50 x ptr], ptr @lindex, i64 0, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = sext i32 %78 to i64
  %84 = getelementptr inbounds i32, ptr %82, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !12
  %86 = load ptr, ptr %33, align 8, !tbaa !17
  %87 = sext i32 %.2133194 to i64
  %88 = getelementptr inbounds i32, ptr %86, i64 %87
  store i32 %85, ptr %88, align 4, !tbaa !12
  %89 = add nsw i32 %.2133194, 1
  %.pr = load i32, ptr %.1140196, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %._crit_edge191, %.lr.ph198
  %91 = phi i32 [ %.pr, %._crit_edge191 ], [ %43, %.lr.ph198 ]
  %.3134 = phi i32 [ %89, %._crit_edge191 ], [ %.2133194, %.lr.ph198 ]
  %92 = icmp eq i32 %91, 2003
  br i1 %92, label %93, label %110

93:                                               ; preds = %90
  %94 = getelementptr inbounds i8, ptr %.1140196, i64 72
  %95 = load i32, ptr %94, align 8, !tbaa !31
  %96 = load ptr, ptr %36, align 8, !tbaa !19
  %97 = sext i32 %.2129195 to i64
  %98 = getelementptr inbounds i32, ptr %96, i64 %97
  store i32 %95, ptr %98, align 4, !tbaa !12
  %99 = getelementptr inbounds i8, ptr %.1140196, i64 80
  %100 = load ptr, ptr %99, align 8, !tbaa !32
  %101 = tail call ptr @copy_Exp(ptr noundef %100) #7
  %102 = load ptr, ptr %38, align 8, !tbaa !20
  %103 = getelementptr inbounds ptr, ptr %102, i64 %97
  store ptr %101, ptr %103, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %.1140196, i64 88
  %105 = load ptr, ptr %104, align 8, !tbaa !33
  %106 = tail call ptr @copy_Exp(ptr noundef %105) #7
  %107 = load ptr, ptr %40, align 8, !tbaa !21
  %108 = getelementptr inbounds ptr, ptr %107, i64 %97
  store ptr %106, ptr %108, align 8, !tbaa !5
  %109 = add nsw i32 %.2129195, 1
  br label %110

110:                                              ; preds = %90, %93
  %.3130 = phi i32 [ %109, %93 ], [ %.2129195, %90 ]
  %111 = getelementptr inbounds i8, ptr %.1140196, i64 32
  %.1140 = load ptr, ptr %111, align 8, !tbaa !5
  %.not148 = icmp eq ptr %.1140, null
  br i1 %.not148, label %.loopexit, label %.lr.ph198, !llvm.loop !34

112:                                              ; preds = %.lr.ph204
  %113 = tail call noalias dereferenceable_or_null(4) ptr @calloc(i64 noundef 1, i64 noundef 4) #8
  %114 = getelementptr inbounds i8, ptr %21, i64 160
  store ptr %113, ptr %114, align 8, !tbaa !17
  %115 = getelementptr inbounds i8, ptr %21, i64 168
  store i32 1, ptr %115, align 8, !tbaa !22
  %116 = getelementptr inbounds i8, ptr %.0201, i64 48
  %117 = load ptr, ptr %116, align 8, !tbaa !24
  %118 = load i32, ptr %117, align 4, !tbaa !13
  store i32 %118, ptr @lp, align 4, !tbaa !12
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !12
  %122 = icmp sgt i32 %121, 0
  br i1 %122, label %.lr.ph176, label %._crit_edge177

.lr.ph176:                                        ; preds = %112
  %123 = ptrtoint ptr %117 to i64
  %124 = getelementptr inbounds i8, ptr %117, i64 4
  %wide.trip.count215 = zext nneg i32 %121 to i64
  %min.iters.check257 = icmp ult i32 %121, 8
  %125 = sub i64 add (i64 ptrtoint (ptr @largs to i64), i64 -4), %123
  %diff.check254 = icmp ult i64 %125, 32
  %or.cond268 = or i1 %min.iters.check257, %diff.check254
  br i1 %or.cond268, label %scalar.ph256.preheader, label %vector.ph258

vector.ph258:                                     ; preds = %.lr.ph176
  %n.vec260 = and i64 %wide.trip.count215, 2147483640
  br label %vector.body262

vector.body262:                                   ; preds = %vector.body262, %vector.ph258
  %index263 = phi i64 [ 0, %vector.ph258 ], [ %index.next266, %vector.body262 ]
  %126 = getelementptr inbounds [5 x i32], ptr %124, i64 0, i64 %index263
  %127 = getelementptr inbounds i8, ptr %126, i64 16
  %wide.load264 = load <4 x i32>, ptr %126, align 4, !tbaa !12
  %wide.load265 = load <4 x i32>, ptr %127, align 4, !tbaa !12
  %128 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %index263
  %129 = getelementptr inbounds i8, ptr %128, i64 16
  store <4 x i32> %wide.load264, ptr %128, align 16, !tbaa !12
  store <4 x i32> %wide.load265, ptr %129, align 16, !tbaa !12
  %index.next266 = add nuw i64 %index263, 8
  %130 = icmp eq i64 %index.next266, %n.vec260
  br i1 %130, label %middle.block255, label %vector.body262, !llvm.loop !35

middle.block255:                                  ; preds = %vector.body262
  %cmp.n267 = icmp eq i64 %n.vec260, %wide.trip.count215
  br i1 %cmp.n267, label %._crit_edge177, label %scalar.ph256.preheader

scalar.ph256.preheader:                           ; preds = %middle.block255, %.lr.ph176
  %indvars.iv212.ph = phi i64 [ 0, %.lr.ph176 ], [ %n.vec260, %middle.block255 ]
  %xtraiter274 = and i64 %wide.trip.count215, 3
  %lcmp.mod275.not = icmp eq i64 %xtraiter274, 0
  br i1 %lcmp.mod275.not, label %scalar.ph256.prol.loopexit, label %scalar.ph256.prol

scalar.ph256.prol:                                ; preds = %scalar.ph256.preheader, %scalar.ph256.prol
  %indvars.iv212.prol = phi i64 [ %indvars.iv.next213.prol, %scalar.ph256.prol ], [ %indvars.iv212.ph, %scalar.ph256.preheader ]
  %prol.iter276 = phi i64 [ %prol.iter276.next, %scalar.ph256.prol ], [ 0, %scalar.ph256.preheader ]
  %131 = getelementptr inbounds [5 x i32], ptr %124, i64 0, i64 %indvars.iv212.prol
  %132 = load i32, ptr %131, align 4, !tbaa !12
  %133 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv212.prol
  store i32 %132, ptr %133, align 4, !tbaa !12
  %indvars.iv.next213.prol = add nuw nsw i64 %indvars.iv212.prol, 1
  %prol.iter276.next = add i64 %prol.iter276, 1
  %prol.iter276.cmp.not = icmp eq i64 %prol.iter276.next, %xtraiter274
  br i1 %prol.iter276.cmp.not, label %scalar.ph256.prol.loopexit, label %scalar.ph256.prol, !llvm.loop !36

scalar.ph256.prol.loopexit:                       ; preds = %scalar.ph256.prol, %scalar.ph256.preheader
  %indvars.iv212.unr = phi i64 [ %indvars.iv212.ph, %scalar.ph256.preheader ], [ %indvars.iv.next213.prol, %scalar.ph256.prol ]
  %134 = sub nsw i64 %indvars.iv212.ph, %wide.trip.count215
  %135 = icmp ugt i64 %134, -4
  br i1 %135, label %._crit_edge177, label %scalar.ph256

scalar.ph256:                                     ; preds = %scalar.ph256.prol.loopexit, %scalar.ph256
  %indvars.iv212 = phi i64 [ %indvars.iv.next213.3, %scalar.ph256 ], [ %indvars.iv212.unr, %scalar.ph256.prol.loopexit ]
  %136 = getelementptr inbounds [5 x i32], ptr %124, i64 0, i64 %indvars.iv212
  %137 = load i32, ptr %136, align 4, !tbaa !12
  %138 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv212
  store i32 %137, ptr %138, align 4, !tbaa !12
  %indvars.iv.next213 = add nuw nsw i64 %indvars.iv212, 1
  %139 = getelementptr inbounds [5 x i32], ptr %124, i64 0, i64 %indvars.iv.next213
  %140 = load i32, ptr %139, align 4, !tbaa !12
  %141 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next213
  store i32 %140, ptr %141, align 4, !tbaa !12
  %indvars.iv.next213.1 = add nuw nsw i64 %indvars.iv212, 2
  %142 = getelementptr inbounds [5 x i32], ptr %124, i64 0, i64 %indvars.iv.next213.1
  %143 = load i32, ptr %142, align 4, !tbaa !12
  %144 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next213.1
  store i32 %143, ptr %144, align 4, !tbaa !12
  %indvars.iv.next213.2 = add nuw nsw i64 %indvars.iv212, 3
  %145 = getelementptr inbounds [5 x i32], ptr %124, i64 0, i64 %indvars.iv.next213.2
  %146 = load i32, ptr %145, align 4, !tbaa !12
  %147 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next213.2
  store i32 %146, ptr %147, align 4, !tbaa !12
  %indvars.iv.next213.3 = add nuw nsw i64 %indvars.iv212, 4
  %exitcond216.not.3 = icmp eq i64 %indvars.iv.next213.3, %wide.trip.count215
  br i1 %exitcond216.not.3, label %._crit_edge177, label %scalar.ph256, !llvm.loop !37

._crit_edge177:                                   ; preds = %scalar.ph256.prol.loopexit, %scalar.ph256, %middle.block255, %112
  %148 = tail call i32 @fact_adress()
  %149 = load i32, ptr @lp, align 4, !tbaa !12
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [50 x ptr], ptr @lindex, i64 0, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = sext i32 %148 to i64
  %154 = getelementptr inbounds i32, ptr %152, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !12
  %156 = load ptr, ptr %114, align 8, !tbaa !17
  store i32 %155, ptr %156, align 4, !tbaa !12
  %.pr150 = load i32, ptr %.0201, align 8, !tbaa !9
  br label %157

157:                                              ; preds = %.lr.ph204, %._crit_edge177
  %158 = phi i32 [ %22, %.lr.ph204 ], [ %.pr150, %._crit_edge177 ]
  %159 = icmp eq i32 %158, 2003
  br i1 %159, label %160, label %.loopexit

160:                                              ; preds = %157
  %161 = tail call noalias dereferenceable_or_null(4) ptr @calloc(i64 noundef 1, i64 noundef 4) #8
  %162 = getelementptr inbounds i8, ptr %21, i64 176
  store ptr %161, ptr %162, align 8, !tbaa !19
  %163 = tail call noalias dereferenceable_or_null(8) ptr @calloc(i64 noundef 1, i64 noundef 8) #8
  %164 = getelementptr inbounds i8, ptr %21, i64 184
  store ptr %163, ptr %164, align 8, !tbaa !20
  %165 = tail call noalias dereferenceable_or_null(8) ptr @calloc(i64 noundef 1, i64 noundef 8) #8
  %166 = getelementptr inbounds i8, ptr %21, i64 192
  store ptr %165, ptr %166, align 8, !tbaa !21
  %167 = getelementptr inbounds i8, ptr %.0201, i64 72
  %168 = load i32, ptr %167, align 8, !tbaa !31
  store i32 %168, ptr %161, align 4, !tbaa !12
  %169 = getelementptr inbounds i8, ptr %.0201, i64 80
  %170 = load ptr, ptr %169, align 8, !tbaa !32
  %171 = tail call ptr @copy_Exp(ptr noundef %170) #7
  %172 = load ptr, ptr %164, align 8, !tbaa !20
  store ptr %171, ptr %172, align 8, !tbaa !5
  %173 = getelementptr inbounds i8, ptr %.0201, i64 88
  %174 = load ptr, ptr %173, align 8, !tbaa !33
  %175 = tail call ptr @copy_Exp(ptr noundef %174) #7
  %176 = load ptr, ptr %166, align 8, !tbaa !21
  store ptr %175, ptr %176, align 8, !tbaa !5
  %177 = getelementptr inbounds i8, ptr %21, i64 200
  store i32 1, ptr %177, align 8, !tbaa !23
  br label %.loopexit

.loopexit:                                        ; preds = %110, %._crit_edge185, %157, %160
  %178 = tail call noalias dereferenceable_or_null(184) ptr @calloc(i64 noundef 1, i64 noundef 184) #8
  %179 = getelementptr inbounds i8, ptr %21, i64 240
  store ptr %178, ptr %179, align 8, !tbaa !38
  %180 = getelementptr inbounds i8, ptr %21, i64 248
  store i32 1, ptr %180, align 8, !tbaa !39
  store ptr null, ptr %178, align 8, !tbaa !40
  %181 = getelementptr inbounds i8, ptr %178, i64 8
  store i32 0, ptr %181, align 8, !tbaa !43
  %182 = getelementptr inbounds i8, ptr %178, i64 32
  store ptr null, ptr %182, align 8, !tbaa !44
  %183 = getelementptr inbounds i8, ptr %178, i64 40
  store i32 0, ptr %183, align 8, !tbaa !45
  %184 = tail call noalias dereferenceable_or_null(4) ptr @calloc(i64 noundef 1, i64 noundef 4) #8
  %185 = getelementptr inbounds i8, ptr %178, i64 16
  store ptr %184, ptr %185, align 8, !tbaa !46
  %186 = load i32, ptr @gnum_relevant_facts, align 4, !tbaa !12
  %187 = add nsw i32 %186, -1
  store i32 %187, ptr %184, align 4, !tbaa !12
  %188 = getelementptr inbounds i8, ptr %178, i64 24
  store i32 1, ptr %188, align 8, !tbaa !47
  %189 = getelementptr inbounds i8, ptr %178, i64 48
  %190 = getelementptr inbounds i8, ptr %178, i64 80
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %189, i8 0, i64 28, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %190, i8 0, i64 28, i1 false)
  %191 = load ptr, ptr @gactions, align 8, !tbaa !5
  %192 = getelementptr inbounds i8, ptr %21, i64 256
  store ptr %191, ptr %192, align 8, !tbaa !48
  store ptr %21, ptr @gactions, align 8, !tbaa !5
  %193 = load i32, ptr @gnum_actions, align 4, !tbaa !12
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr @gnum_actions, align 4, !tbaa !12
  %195 = load i32, ptr @lnum_effects, align 4, !tbaa !12
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr @lnum_effects, align 4, !tbaa !12
  %197 = getelementptr inbounds i8, ptr %.0201, i64 32
  %.0 = load ptr, ptr %197, align 8, !tbaa !5
  %.not146 = icmp eq ptr %.0, null
  br i1 %.not146, label %._crit_edge205, label %.lr.ph204, !llvm.loop !49

._crit_edge205:                                   ; preds = %.loopexit, %16
  %.pre-phi = phi i32 [ %12, %16 ], [ %187, %.loopexit ]
  %198 = tail call noalias dereferenceable_or_null(4) ptr @calloc(i64 noundef 1, i64 noundef 4) #8
  store ptr %198, ptr @glogic_goal, align 8, !tbaa !5
  store i32 %.pre-phi, ptr %198, align 4, !tbaa !12
  store i32 1, ptr @gnum_logic_goal, align 4, !tbaa !12
  br label %.loopexit152

199:                                              ; preds = %4
  %200 = getelementptr inbounds i8, ptr %5, i64 24
  %.1154 = load ptr, ptr %200, align 8, !tbaa !5
  %.not144155 = icmp eq ptr %.1154, null
  br i1 %.not144155, label %._crit_edge161, label %.lr.ph160

.lr.ph160:                                        ; preds = %199, %.lr.ph160
  %.1158 = phi ptr [ %.1, %.lr.ph160 ], [ %.1154, %199 ]
  %.4157 = phi i32 [ %.5, %.lr.ph160 ], [ 0, %199 ]
  %.4135156 = phi i32 [ %spec.select149, %.lr.ph160 ], [ 0, %199 ]
  %201 = load i32, ptr %.1158, align 8, !tbaa !9
  %202 = icmp eq i32 %201, 2002
  %203 = zext i1 %202 to i32
  %spec.select149 = add nuw nsw i32 %.4135156, %203
  %204 = icmp eq i32 %201, 2003
  %205 = zext i1 %204 to i32
  %.5 = add nuw nsw i32 %.4157, %205
  %206 = getelementptr inbounds i8, ptr %.1158, i64 32
  %.1 = load ptr, ptr %206, align 8, !tbaa !5
  %.not144 = icmp eq ptr %.1, null
  br i1 %.not144, label %._crit_edge161, label %.lr.ph160, !llvm.loop !50

._crit_edge161:                                   ; preds = %.lr.ph160, %199
  %.4135.lcssa = phi i32 [ 0, %199 ], [ %spec.select149, %.lr.ph160 ]
  %.4.lcssa = phi i32 [ 0, %199 ], [ %.5, %.lr.ph160 ]
  %207 = zext nneg i32 %.4135.lcssa to i64
  %208 = tail call noalias ptr @calloc(i64 noundef %207, i64 noundef 4) #8
  store ptr %208, ptr @glogic_goal, align 8, !tbaa !5
  %209 = zext nneg i32 %.4.lcssa to i64
  %210 = tail call noalias ptr @calloc(i64 noundef %209, i64 noundef 4) #8
  store ptr %210, ptr @gnumeric_goal_comp, align 8, !tbaa !5
  %211 = tail call noalias ptr @calloc(i64 noundef %209, i64 noundef 8) #8
  store ptr %211, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %212 = tail call noalias ptr @calloc(i64 noundef %209, i64 noundef 8) #8
  store ptr %212, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  store i32 %.4135.lcssa, ptr @gnum_logic_goal, align 4, !tbaa !12
  store i32 %.4.lcssa, ptr @gnum_numeric_goal, align 4, !tbaa !12
  br i1 %.not144155, label %.loopexit152, label %.lr.ph173

.lr.ph173:                                        ; preds = %._crit_edge161, %280
  %.2171 = phi ptr [ %.2, %280 ], [ %.1154, %._crit_edge161 ]
  %.6170 = phi i32 [ %.7, %280 ], [ 0, %._crit_edge161 ]
  %.6137169 = phi i32 [ %.7138, %280 ], [ 0, %._crit_edge161 ]
  %213 = load i32, ptr %.2171, align 8, !tbaa !9
  %214 = icmp eq i32 %213, 2002
  br i1 %214, label %215, label %260

215:                                              ; preds = %.lr.ph173
  %216 = getelementptr inbounds i8, ptr %.2171, i64 48
  %217 = load ptr, ptr %216, align 8, !tbaa !24
  %218 = load i32, ptr %217, align 4, !tbaa !13
  store i32 %218, ptr @lp, align 4, !tbaa !12
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !12
  %222 = icmp sgt i32 %221, 0
  br i1 %222, label %.lr.ph165, label %._crit_edge166

.lr.ph165:                                        ; preds = %215
  %223 = ptrtoint ptr %217 to i64
  %224 = getelementptr inbounds i8, ptr %217, i64 4
  %wide.trip.count210 = zext nneg i32 %221 to i64
  %min.iters.check227 = icmp ult i32 %221, 8
  %225 = sub i64 add (i64 ptrtoint (ptr @largs to i64), i64 -4), %223
  %diff.check224 = icmp ult i64 %225, 32
  %or.cond269 = or i1 %min.iters.check227, %diff.check224
  br i1 %or.cond269, label %scalar.ph226.preheader, label %vector.ph228

vector.ph228:                                     ; preds = %.lr.ph165
  %n.vec230 = and i64 %wide.trip.count210, 2147483640
  br label %vector.body232

vector.body232:                                   ; preds = %vector.body232, %vector.ph228
  %index233 = phi i64 [ 0, %vector.ph228 ], [ %index.next236, %vector.body232 ]
  %226 = getelementptr inbounds [5 x i32], ptr %224, i64 0, i64 %index233
  %227 = getelementptr inbounds i8, ptr %226, i64 16
  %wide.load234 = load <4 x i32>, ptr %226, align 4, !tbaa !12
  %wide.load235 = load <4 x i32>, ptr %227, align 4, !tbaa !12
  %228 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %index233
  %229 = getelementptr inbounds i8, ptr %228, i64 16
  store <4 x i32> %wide.load234, ptr %228, align 16, !tbaa !12
  store <4 x i32> %wide.load235, ptr %229, align 16, !tbaa !12
  %index.next236 = add nuw i64 %index233, 8
  %230 = icmp eq i64 %index.next236, %n.vec230
  br i1 %230, label %middle.block225, label %vector.body232, !llvm.loop !51

middle.block225:                                  ; preds = %vector.body232
  %cmp.n237 = icmp eq i64 %n.vec230, %wide.trip.count210
  br i1 %cmp.n237, label %._crit_edge166, label %scalar.ph226.preheader

scalar.ph226.preheader:                           ; preds = %middle.block225, %.lr.ph165
  %indvars.iv207.ph = phi i64 [ 0, %.lr.ph165 ], [ %n.vec230, %middle.block225 ]
  %xtraiter271 = and i64 %wide.trip.count210, 3
  %lcmp.mod272.not = icmp eq i64 %xtraiter271, 0
  br i1 %lcmp.mod272.not, label %scalar.ph226.prol.loopexit, label %scalar.ph226.prol

scalar.ph226.prol:                                ; preds = %scalar.ph226.preheader, %scalar.ph226.prol
  %indvars.iv207.prol = phi i64 [ %indvars.iv.next208.prol, %scalar.ph226.prol ], [ %indvars.iv207.ph, %scalar.ph226.preheader ]
  %prol.iter273 = phi i64 [ %prol.iter273.next, %scalar.ph226.prol ], [ 0, %scalar.ph226.preheader ]
  %231 = getelementptr inbounds [5 x i32], ptr %224, i64 0, i64 %indvars.iv207.prol
  %232 = load i32, ptr %231, align 4, !tbaa !12
  %233 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv207.prol
  store i32 %232, ptr %233, align 4, !tbaa !12
  %indvars.iv.next208.prol = add nuw nsw i64 %indvars.iv207.prol, 1
  %prol.iter273.next = add i64 %prol.iter273, 1
  %prol.iter273.cmp.not = icmp eq i64 %prol.iter273.next, %xtraiter271
  br i1 %prol.iter273.cmp.not, label %scalar.ph226.prol.loopexit, label %scalar.ph226.prol, !llvm.loop !52

scalar.ph226.prol.loopexit:                       ; preds = %scalar.ph226.prol, %scalar.ph226.preheader
  %indvars.iv207.unr = phi i64 [ %indvars.iv207.ph, %scalar.ph226.preheader ], [ %indvars.iv.next208.prol, %scalar.ph226.prol ]
  %234 = sub nsw i64 %indvars.iv207.ph, %wide.trip.count210
  %235 = icmp ugt i64 %234, -4
  br i1 %235, label %._crit_edge166, label %scalar.ph226

scalar.ph226:                                     ; preds = %scalar.ph226.prol.loopexit, %scalar.ph226
  %indvars.iv207 = phi i64 [ %indvars.iv.next208.3, %scalar.ph226 ], [ %indvars.iv207.unr, %scalar.ph226.prol.loopexit ]
  %236 = getelementptr inbounds [5 x i32], ptr %224, i64 0, i64 %indvars.iv207
  %237 = load i32, ptr %236, align 4, !tbaa !12
  %238 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv207
  store i32 %237, ptr %238, align 4, !tbaa !12
  %indvars.iv.next208 = add nuw nsw i64 %indvars.iv207, 1
  %239 = getelementptr inbounds [5 x i32], ptr %224, i64 0, i64 %indvars.iv.next208
  %240 = load i32, ptr %239, align 4, !tbaa !12
  %241 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next208
  store i32 %240, ptr %241, align 4, !tbaa !12
  %indvars.iv.next208.1 = add nuw nsw i64 %indvars.iv207, 2
  %242 = getelementptr inbounds [5 x i32], ptr %224, i64 0, i64 %indvars.iv.next208.1
  %243 = load i32, ptr %242, align 4, !tbaa !12
  %244 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next208.1
  store i32 %243, ptr %244, align 4, !tbaa !12
  %indvars.iv.next208.2 = add nuw nsw i64 %indvars.iv207, 3
  %245 = getelementptr inbounds [5 x i32], ptr %224, i64 0, i64 %indvars.iv.next208.2
  %246 = load i32, ptr %245, align 4, !tbaa !12
  %247 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next208.2
  store i32 %246, ptr %247, align 4, !tbaa !12
  %indvars.iv.next208.3 = add nuw nsw i64 %indvars.iv207, 4
  %exitcond211.not.3 = icmp eq i64 %indvars.iv.next208.3, %wide.trip.count210
  br i1 %exitcond211.not.3, label %._crit_edge166, label %scalar.ph226, !llvm.loop !53

._crit_edge166:                                   ; preds = %scalar.ph226.prol.loopexit, %scalar.ph226, %middle.block225, %215
  %248 = tail call i32 @fact_adress()
  %249 = load i32, ptr @lp, align 4, !tbaa !12
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [50 x ptr], ptr @lindex, i64 0, i64 %250
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  %253 = sext i32 %248 to i64
  %254 = getelementptr inbounds i32, ptr %252, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !12
  %256 = load ptr, ptr @glogic_goal, align 8, !tbaa !5
  %257 = sext i32 %.6137169 to i64
  %258 = getelementptr inbounds i32, ptr %256, i64 %257
  store i32 %255, ptr %258, align 4, !tbaa !12
  %259 = add nsw i32 %.6137169, 1
  %.pr151 = load i32, ptr %.2171, align 8, !tbaa !9
  br label %260

260:                                              ; preds = %._crit_edge166, %.lr.ph173
  %261 = phi i32 [ %.pr151, %._crit_edge166 ], [ %213, %.lr.ph173 ]
  %.7138 = phi i32 [ %259, %._crit_edge166 ], [ %.6137169, %.lr.ph173 ]
  %262 = icmp eq i32 %261, 2003
  br i1 %262, label %263, label %280

263:                                              ; preds = %260
  %264 = getelementptr inbounds i8, ptr %.2171, i64 72
  %265 = load i32, ptr %264, align 8, !tbaa !31
  %266 = load ptr, ptr @gnumeric_goal_comp, align 8, !tbaa !5
  %267 = sext i32 %.6170 to i64
  %268 = getelementptr inbounds i32, ptr %266, i64 %267
  store i32 %265, ptr %268, align 4, !tbaa !12
  %269 = getelementptr inbounds i8, ptr %.2171, i64 80
  %270 = load ptr, ptr %269, align 8, !tbaa !32
  %271 = tail call ptr @copy_Exp(ptr noundef %270) #7
  %272 = load ptr, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %273 = getelementptr inbounds ptr, ptr %272, i64 %267
  store ptr %271, ptr %273, align 8, !tbaa !5
  %274 = getelementptr inbounds i8, ptr %.2171, i64 88
  %275 = load ptr, ptr %274, align 8, !tbaa !33
  %276 = tail call ptr @copy_Exp(ptr noundef %275) #7
  %277 = load ptr, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  %278 = getelementptr inbounds ptr, ptr %277, i64 %267
  store ptr %276, ptr %278, align 8, !tbaa !5
  %279 = add nsw i32 %.6170, 1
  br label %280

280:                                              ; preds = %260, %263
  %.7 = phi i32 [ %279, %263 ], [ %.6170, %260 ]
  %281 = getelementptr inbounds i8, ptr %.2171, i64 32
  %.2 = load ptr, ptr %281, align 8, !tbaa !5
  %.not145 = icmp eq ptr %.2, null
  br i1 %.not145, label %.loopexit152, label %.lr.ph173, !llvm.loop !54

282:                                              ; preds = %4
  %283 = tail call noalias dereferenceable_or_null(4) ptr @calloc(i64 noundef 1, i64 noundef 4) #8
  store ptr %283, ptr @glogic_goal, align 8, !tbaa !5
  store i32 1, ptr @gnum_logic_goal, align 4, !tbaa !12
  %284 = getelementptr inbounds i8, ptr %5, i64 48
  %285 = load ptr, ptr %284, align 8, !tbaa !24
  %286 = load i32, ptr %285, align 4, !tbaa !13
  store i32 %286, ptr @lp, align 4, !tbaa !12
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %287
  %289 = load i32, ptr %288, align 4, !tbaa !12
  %290 = icmp sgt i32 %289, 0
  br i1 %290, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %282
  %291 = ptrtoint ptr %285 to i64
  %292 = getelementptr inbounds i8, ptr %285, i64 4
  %wide.trip.count = zext nneg i32 %289 to i64
  %min.iters.check = icmp ult i32 %289, 8
  %293 = sub i64 add (i64 ptrtoint (ptr @largs to i64), i64 -4), %291
  %diff.check = icmp ult i64 %293, 32
  %or.cond270 = or i1 %min.iters.check, %diff.check
  br i1 %or.cond270, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %294 = getelementptr inbounds [5 x i32], ptr %292, i64 0, i64 %index
  %295 = getelementptr inbounds i8, ptr %294, i64 16
  %wide.load = load <4 x i32>, ptr %294, align 4, !tbaa !12
  %wide.load222 = load <4 x i32>, ptr %295, align 4, !tbaa !12
  %296 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %index
  %297 = getelementptr inbounds i8, ptr %296, i64 16
  store <4 x i32> %wide.load, ptr %296, align 16, !tbaa !12
  store <4 x i32> %wide.load222, ptr %297, align 16, !tbaa !12
  %index.next = add nuw i64 %index, 8
  %298 = icmp eq i64 %index.next, %n.vec
  br i1 %298, label %middle.block, label %vector.body, !llvm.loop !55

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %299 = getelementptr inbounds [5 x i32], ptr %292, i64 0, i64 %indvars.iv.prol
  %300 = load i32, ptr %299, align 4, !tbaa !12
  %301 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.prol
  store i32 %300, ptr %301, align 4, !tbaa !12
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !56

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %302 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %303 = icmp ugt i64 %302, -4
  br i1 %303, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %304 = getelementptr inbounds [5 x i32], ptr %292, i64 0, i64 %indvars.iv
  %305 = load i32, ptr %304, align 4, !tbaa !12
  %306 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv
  store i32 %305, ptr %306, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %307 = getelementptr inbounds [5 x i32], ptr %292, i64 0, i64 %indvars.iv.next
  %308 = load i32, ptr %307, align 4, !tbaa !12
  %309 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next
  store i32 %308, ptr %309, align 4, !tbaa !12
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %310 = getelementptr inbounds [5 x i32], ptr %292, i64 0, i64 %indvars.iv.next.1
  %311 = load i32, ptr %310, align 4, !tbaa !12
  %312 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next.1
  store i32 %311, ptr %312, align 4, !tbaa !12
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %313 = getelementptr inbounds [5 x i32], ptr %292, i64 0, i64 %indvars.iv.next.2
  %314 = load i32, ptr %313, align 4, !tbaa !12
  %315 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next.2
  store i32 %314, ptr %315, align 4, !tbaa !12
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge, label %scalar.ph, !llvm.loop !57

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %282
  %316 = tail call i32 @fact_adress()
  %317 = load i32, ptr @lp, align 4, !tbaa !12
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [50 x ptr], ptr @lindex, i64 0, i64 %318
  %320 = load ptr, ptr %319, align 8, !tbaa !5
  %321 = sext i32 %316 to i64
  %322 = getelementptr inbounds i32, ptr %320, i64 %321
  %323 = load i32, ptr %322, align 4, !tbaa !12
  %324 = load ptr, ptr @glogic_goal, align 8, !tbaa !5
  store i32 %323, ptr %324, align 4, !tbaa !12
  br label %.loopexit152

325:                                              ; preds = %4
  %326 = tail call noalias dereferenceable_or_null(4) ptr @calloc(i64 noundef 1, i64 noundef 4) #8
  store ptr %326, ptr @gnumeric_goal_comp, align 8, !tbaa !5
  %327 = tail call noalias dereferenceable_or_null(8) ptr @calloc(i64 noundef 1, i64 noundef 8) #8
  store ptr %327, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %328 = tail call noalias dereferenceable_or_null(8) ptr @calloc(i64 noundef 1, i64 noundef 8) #8
  store ptr %328, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  store i32 1, ptr @gnum_numeric_goal, align 4, !tbaa !12
  %329 = getelementptr inbounds i8, ptr %5, i64 72
  %330 = load i32, ptr %329, align 8, !tbaa !31
  store i32 %330, ptr %326, align 4, !tbaa !12
  %331 = getelementptr inbounds i8, ptr %5, i64 80
  %332 = load ptr, ptr %331, align 8, !tbaa !32
  %333 = tail call ptr @copy_Exp(ptr noundef %332) #7
  %334 = load ptr, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  store ptr %333, ptr %334, align 8, !tbaa !5
  %335 = load ptr, ptr @ggoal, align 8, !tbaa !5
  %336 = getelementptr inbounds i8, ptr %335, i64 88
  %337 = load ptr, ptr %336, align 8, !tbaa !33
  %338 = tail call ptr @copy_Exp(ptr noundef %337) #7
  %339 = load ptr, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  store ptr %338, ptr %339, align 8, !tbaa !5
  br label %.loopexit152

340:                                              ; preds = %4
  %341 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38)
  tail call void @exit(i32 noundef 1) #6
  unreachable

.loopexit152:                                     ; preds = %280, %._crit_edge161, %325, %._crit_edge, %._crit_edge205
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @set_relevants_in_wff(ptr noundef) local_unnamed_addr #1

declare void @cleanup_wff(ptr noundef) local_unnamed_addr #4

declare ptr @copy_Exp(ptr noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 = { nofree nounwind "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 = { noreturn nounwind "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 #4 = { "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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!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, !11, i64 0}
!10 = !{!"_WffNode", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !11, i64 72, !6, i64 80, !6, i64 88, !7, i64 96}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 0}
!14 = !{!"_Fact", !11, i64 0, !7, i64 4}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !6, i64 160}
!18 = !{!"_Action", !6, i64 0, !6, i64 8, !7, i64 16, !6, i64 24, !11, i64 32, !7, i64 36, !7, i64 96, !6, i64 160, !11, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !11, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !11, i64 232, !6, i64 240, !11, i64 248, !6, i64 256}
!19 = !{!18, !6, i64 176}
!20 = !{!18, !6, i64 184}
!21 = !{!18, !6, i64 192}
!22 = !{!18, !11, i64 168}
!23 = !{!18, !11, i64 200}
!24 = !{!10, !6, i64 48}
!25 = distinct !{!25, !16, !26, !27}
!26 = !{!"llvm.loop.isvectorized", i32 1}
!27 = !{!"llvm.loop.unroll.runtime.disable"}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.unroll.disable"}
!30 = distinct !{!30, !16, !26}
!31 = !{!10, !11, i64 72}
!32 = !{!10, !6, i64 80}
!33 = !{!10, !6, i64 88}
!34 = distinct !{!34, !16}
!35 = distinct !{!35, !16, !26, !27}
!36 = distinct !{!36, !29}
!37 = distinct !{!37, !16, !26}
!38 = !{!18, !6, i64 240}
!39 = !{!18, !11, i64 248}
!40 = !{!41, !6, i64 0}
!41 = !{!"_ActionEffect", !6, i64 0, !11, i64 8, !6, i64 16, !11, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !11, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !11, i64 168, !7, i64 172, !7, i64 173, !42, i64 176}
!42 = !{!"float", !7, i64 0}
!43 = !{!41, !11, i64 8}
!44 = !{!41, !6, i64 32}
!45 = !{!41, !11, i64 40}
!46 = !{!41, !6, i64 16}
!47 = !{!41, !11, i64 24}
!48 = !{!18, !6, i64 256}
!49 = distinct !{!49, !16}
!50 = distinct !{!50, !16}
!51 = distinct !{!51, !16, !26, !27}
!52 = distinct !{!52, !29}
!53 = distinct !{!53, !16, !26}
!54 = distinct !{!54, !16}
!55 = distinct !{!55, !16, !26, !27}
!56 = distinct !{!56, !29}
!57 = distinct !{!57, !16, !26}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass