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

; 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._command_line = type { [256 x i8], [256 x i8], [256 x i8], i32, i32, i32, i8, i32, float }
%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 }

@gcmd_line = external global %struct._command_line, align 4
@gactions = external global ptr, align 8
@gnum_numeric_goal = external global i32, align 4
@gnumeric_goal_lh = external global ptr, align 8
@gnumeric_goal_rh = external global ptr, align 8
@gmetric = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [69 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @is_linear_task() #1 {
  %1 = alloca i8, align 1
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %7 = load ptr, ptr @gactions, align 8, !tbaa !5
  store ptr %7, ptr %2, align 8, !tbaa !5
  br label %8

8:                                                ; preds = %151, %0
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = icmp ne ptr %9, null
  br i1 %10, label %11, label %155

11:                                               ; preds = %8
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %41, %11
  %13 = load i32, ptr %4, align 4, !tbaa !9
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._Action, ptr %14, i32 0, i32 12
  %16 = load i32, ptr %15, align 8, !tbaa !11
  %17 = icmp slt i32 %13, %16
  br i1 %17, label %18, label %44

18:                                               ; preds = %12
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._Action, ptr %19, i32 0, i32 10
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = load i32, ptr %4, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds ptr, ptr %21, i64 %23
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = call zeroext i8 @is_linear_expression(ptr noundef %25)
  %27 = icmp ne i8 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %18
  store i8 0, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

29:                                               ; preds = %18
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._Action, ptr %30, i32 0, i32 11
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = load i32, ptr %4, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds ptr, ptr %32, i64 %34
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = call zeroext i8 @is_linear_expression(ptr noundef %36)
  %38 = icmp ne i8 %37, 0
  br i1 %38, label %40, label %39

39:                                               ; preds = %29
  store i8 0, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

40:                                               ; preds = %29
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %4, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %4, align 4, !tbaa !9
  br label %12, !llvm.loop !15

44:                                               ; preds = %12
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %147, %44
  %46 = load i32, ptr %4, align 4, !tbaa !9
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._Action, ptr %47, i32 0, i32 18
  %49 = load i32, ptr %48, align 8, !tbaa !17
  %50 = icmp slt i32 %46, %49
  br i1 %50, label %51, label %150

51:                                               ; preds = %45
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._Action, ptr %52, i32 0, i32 17
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct._ActionEffect, ptr %54, i64 %56
  store ptr %57, ptr %3, align 8, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %87, %51
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._ActionEffect, ptr %60, i32 0, i32 9
  %62 = load i32, ptr %61, align 8, !tbaa !19
  %63 = icmp slt i32 %59, %62
  br i1 %63, label %64, label %90

64:                                               ; preds = %58
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._ActionEffect, ptr %65, i32 0, i32 7
  %67 = load ptr, ptr %66, align 8, !tbaa !22
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds ptr, ptr %67, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = call zeroext i8 @is_linear_expression(ptr noundef %71)
  %73 = icmp ne i8 %72, 0
  br i1 %73, label %75, label %74

74:                                               ; preds = %64
  store i8 0, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

75:                                               ; preds = %64
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._ActionEffect, ptr %76, i32 0, i32 8
  %78 = load ptr, ptr %77, align 8, !tbaa !23
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds ptr, ptr %78, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = call zeroext i8 @is_linear_expression(ptr noundef %82)
  %84 = icmp ne i8 %83, 0
  br i1 %84, label %86, label %85

85:                                               ; preds = %75
  store i8 0, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

86:                                               ; preds = %75
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %5, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %5, align 4, !tbaa !9
  br label %58, !llvm.loop !24

90:                                               ; preds = %58
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._ActionEffect, ptr %91, i32 0, i32 22
  %93 = load i8, ptr %92, align 4, !tbaa !25
  %94 = icmp ne i8 %93, 0
  br i1 %94, label %95, label %96

95:                                               ; preds = %90
  br label %147

96:                                               ; preds = %90
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %143, %96
  %98 = load i32, ptr %5, align 4, !tbaa !9
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._ActionEffect, ptr %99, i32 0, i32 13
  %101 = load i32, ptr %100, align 8, !tbaa !26
  %102 = icmp slt i32 %98, %101
  br i1 %102, label %103, label %146

103:                                              ; preds = %97
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._ActionEffect, ptr %104, i32 0, i32 10
  %106 = load ptr, ptr %105, align 8, !tbaa !27
  %107 = load i32, ptr %5, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %106, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !9
  %111 = icmp ne i32 %110, 4003
  br i1 %111, label %112, label %131

112:                                              ; preds = %103
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._ActionEffect, ptr %113, i32 0, i32 10
  %115 = load ptr, ptr %114, align 8, !tbaa !27
  %116 = load i32, ptr %5, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %115, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = icmp ne i32 %119, 4004
  br i1 %120, label %121, label %131

121:                                              ; preds = %112
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._ActionEffect, ptr %122, i32 0, i32 10
  %124 = load ptr, ptr %123, align 8, !tbaa !27
  %125 = load i32, ptr %5, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %124, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !9
  %129 = icmp ne i32 %128, 4000
  br i1 %129, label %130, label %131

130:                                              ; preds = %121
  store i8 0, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

131:                                              ; preds = %121, %112, %103
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._ActionEffect, ptr %132, i32 0, i32 12
  %134 = load ptr, ptr %133, align 8, !tbaa !28
  %135 = load i32, ptr %5, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds ptr, ptr %134, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = call zeroext i8 @is_linear_expression(ptr noundef %138)
  %140 = icmp ne i8 %139, 0
  br i1 %140, label %142, label %141

141:                                              ; preds = %131
  store i8 0, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

142:                                              ; preds = %131
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %5, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %5, align 4, !tbaa !9
  br label %97, !llvm.loop !29

146:                                              ; preds = %97
  br label %147

147:                                              ; preds = %146, %95
  %148 = load i32, ptr %4, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %4, align 4, !tbaa !9
  br label %45, !llvm.loop !30

150:                                              ; preds = %45
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %2, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct._Action, ptr %152, i32 0, i32 19
  %154 = load ptr, ptr %153, align 8, !tbaa !31
  store ptr %154, ptr %2, align 8, !tbaa !5
  br label %8, !llvm.loop !32

155:                                              ; preds = %8
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %179, %155
  %157 = load i32, ptr %4, align 4, !tbaa !9
  %158 = load i32, ptr @gnum_numeric_goal, align 4, !tbaa !9
  %159 = icmp slt i32 %157, %158
  br i1 %159, label %160, label %182

160:                                              ; preds = %156
  %161 = load ptr, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %162 = load i32, ptr %4, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds ptr, ptr %161, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  %166 = call zeroext i8 @is_linear_expression(ptr noundef %165)
  %167 = icmp ne i8 %166, 0
  br i1 %167, label %169, label %168

168:                                              ; preds = %160
  store i8 0, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

169:                                              ; preds = %160
  %170 = load ptr, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  %171 = load i32, ptr %4, align 4, !tbaa !9
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds ptr, ptr %170, i64 %172
  %174 = load ptr, ptr %173, align 8, !tbaa !5
  %175 = call zeroext i8 @is_linear_expression(ptr noundef %174)
  %176 = icmp ne i8 %175, 0
  br i1 %176, label %178, label %177

177:                                              ; preds = %169
  store i8 0, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

178:                                              ; preds = %169
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %4, align 4, !tbaa !9
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %4, align 4, !tbaa !9
  br label %156, !llvm.loop !33

182:                                              ; preds = %156
  %183 = load ptr, ptr @gmetric, align 8, !tbaa !5
  %184 = icmp ne ptr %183, null
  br i1 %184, label %185, label %197

185:                                              ; preds = %182
  %186 = load ptr, ptr @gmetric, align 8, !tbaa !5
  %187 = call zeroext i8 @is_linear_expression(ptr noundef %186)
  %188 = icmp ne i8 %187, 0
  br i1 %188, label %196, label %189

189:                                              ; preds = %185
  %190 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 3), align 4, !tbaa !34
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %194

192:                                              ; preds = %189
  %193 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %194

194:                                              ; preds = %192, %189
  %195 = load ptr, ptr @gmetric, align 8, !tbaa !5
  call void @free_ExpNode(ptr noundef %195)
  store ptr null, ptr @gmetric, align 8, !tbaa !5
  br label %196

196:                                              ; preds = %194, %185
  br label %197

197:                                              ; preds = %196, %182
  store i8 1, ptr %1, align 1
  store i32 1, ptr %6, align 4
  br label %198

198:                                              ; preds = %197, %177, %168, %141, %130, %85, %74, %39, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  %199 = load i8, ptr %1, align 1
  ret i8 %199
}

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

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

declare void @free_ExpNode(ptr noundef) #0

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 200}
!12 = !{!"_Action", !6, i64 0, !6, i64 8, !7, i64 16, !6, i64 24, !10, i64 32, !7, i64 36, !7, i64 96, !6, i64 160, !10, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !10, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !10, i64 232, !6, i64 240, !10, i64 248, !6, i64 256}
!13 = !{!12, !6, i64 184}
!14 = !{!12, !6, i64 192}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !10, i64 248}
!18 = !{!12, !6, i64 240}
!19 = !{!20, !10, i64 72}
!20 = !{!"_ActionEffect", !6, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !10, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !10, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !10, i64 168, !7, i64 172, !7, i64 173, !21, i64 176}
!21 = !{!"float", !7, i64 0}
!22 = !{!20, !6, i64 56}
!23 = !{!20, !6, i64 64}
!24 = distinct !{!24, !16}
!25 = !{!20, !7, i64 172}
!26 = !{!20, !10, i64 104}
!27 = !{!20, !6, i64 80}
!28 = !{!20, !6, i64 96}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !16}
!31 = !{!12, !6, i64 256}
!32 = distinct !{!32, !16}
!33 = distinct !{!33, !16}
!34 = !{!35, !10, i64 768}
!35 = !{!"_command_line", !7, i64 0, !7, i64 256, !7, i64 512, !10, i64 768, !10, i64 772, !10, i64 776, !7, i64 780, !10, i64 784, !21, i64 788}


; 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._command_line = type { [256 x i8], [256 x i8], [256 x i8], i32, i32, i32, i8, i32, float }
%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 }

@gcmd_line = external local_unnamed_addr global %struct._command_line, align 4
@gactions = external local_unnamed_addr global ptr, align 8
@gnum_numeric_goal = external local_unnamed_addr global i32, align 4
@gnumeric_goal_lh = external local_unnamed_addr global ptr, align 8
@gnumeric_goal_rh = external local_unnamed_addr global ptr, align 8
@gmetric = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [69 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local zeroext range(i8 0, 2) i8 @is_linear_task() local_unnamed_addr #1 {
  %.04072 = load ptr, ptr @gactions, align 8, !tbaa !5
  %.not73 = icmp eq ptr %.04072, null
  br i1 %.not73, label %.preheader, label %.preheader62

.preheader62:                                     ; preds = %0, %._crit_edge71
  %.04074 = phi ptr [ %.040, %._crit_edge71 ], [ %.04072, %0 ]
  %1 = getelementptr inbounds i8, ptr %.04074, i64 200
  %2 = load i32, ptr %1, align 8, !tbaa !9
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %.preheader61

.lr.ph:                                           ; preds = %.preheader62
  %4 = getelementptr inbounds i8, ptr %.04074, i64 184
  %5 = getelementptr inbounds i8, ptr %.04074, i64 192
  br label %16

.preheader:                                       ; preds = %._crit_edge71, %0
  %6 = load i32, ptr @gnum_numeric_goal, align 4, !tbaa !12
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph76, label %._crit_edge77

8:                                                ; preds = %21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = load i32, ptr %1, align 8, !tbaa !9
  %10 = sext i32 %9 to i64
  %11 = icmp slt i64 %indvars.iv.next, %10
  br i1 %11, label %16, label %.preheader61, !llvm.loop !13

.preheader61:                                     ; preds = %8, %.preheader62
  %12 = getelementptr inbounds i8, ptr %.04074, i64 248
  %13 = load i32, ptr %12, align 8, !tbaa !15
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph70, label %._crit_edge71

.lr.ph70:                                         ; preds = %.preheader61
  %15 = getelementptr inbounds i8, ptr %.04074, i64 240
  br label %26

16:                                               ; preds = %.lr.ph, %8
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %8 ]
  %17 = load ptr, ptr %4, align 8, !tbaa !16
  %18 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = tail call zeroext i8 @is_linear_expression(ptr noundef %19)
  %.not55 = icmp eq i8 %20, 0
  br i1 %.not55, label %.loopexit, label %21

21:                                               ; preds = %16
  %22 = load ptr, ptr %5, align 8, !tbaa !17
  %23 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = tail call zeroext i8 @is_linear_expression(ptr noundef %24)
  %.not56 = icmp eq i8 %25, 0
  br i1 %.not56, label %.loopexit, label %8

26:                                               ; preds = %.lr.ph70, %.loopexit58
  %indvars.iv88 = phi i64 [ 0, %.lr.ph70 ], [ %indvars.iv.next89, %.loopexit58 ]
  %27 = load ptr, ptr %15, align 8, !tbaa !18
  %28 = getelementptr inbounds %struct._ActionEffect, ptr %27, i64 %indvars.iv88
  %29 = getelementptr inbounds i8, ptr %28, i64 72
  %30 = load i32, ptr %29, align 8, !tbaa !19
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph66, label %._crit_edge

.lr.ph66:                                         ; preds = %26
  %32 = getelementptr inbounds i8, ptr %28, i64 56
  %33 = getelementptr inbounds i8, ptr %28, i64 64
  br label %38

34:                                               ; preds = %43
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %35 = load i32, ptr %29, align 8, !tbaa !19
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next83, %36
  br i1 %37, label %38, label %._crit_edge, !llvm.loop !22

38:                                               ; preds = %.lr.ph66, %34
  %indvars.iv82 = phi i64 [ 0, %.lr.ph66 ], [ %indvars.iv.next83, %34 ]
  %39 = load ptr, ptr %32, align 8, !tbaa !23
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv82
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = tail call zeroext i8 @is_linear_expression(ptr noundef %41)
  %.not53 = icmp eq i8 %42, 0
  br i1 %.not53, label %.loopexit, label %43

43:                                               ; preds = %38
  %44 = load ptr, ptr %33, align 8, !tbaa !24
  %45 = getelementptr inbounds ptr, ptr %44, i64 %indvars.iv82
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = tail call zeroext i8 @is_linear_expression(ptr noundef %46)
  %.not54 = icmp eq i8 %47, 0
  br i1 %.not54, label %.loopexit, label %34

._crit_edge:                                      ; preds = %34, %26
  %48 = getelementptr inbounds i8, ptr %28, i64 172
  %49 = load i8, ptr %48, align 4, !tbaa !25
  %.not48 = icmp eq i8 %49, 0
  br i1 %.not48, label %.preheader57, label %.loopexit58

.preheader57:                                     ; preds = %._crit_edge
  %50 = getelementptr inbounds i8, ptr %28, i64 104
  %51 = load i32, ptr %50, align 8, !tbaa !26
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph68, label %.loopexit58

.lr.ph68:                                         ; preds = %.preheader57
  %53 = getelementptr inbounds i8, ptr %28, i64 80
  %54 = getelementptr inbounds i8, ptr %28, i64 96
  br label %59

55:                                               ; preds = %63
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %56 = load i32, ptr %50, align 8, !tbaa !26
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next86, %57
  br i1 %58, label %59, label %.loopexit58, !llvm.loop !27

59:                                               ; preds = %.lr.ph68, %55
  %indvars.iv85 = phi i64 [ 0, %.lr.ph68 ], [ %indvars.iv.next86, %55 ]
  %60 = load ptr, ptr %53, align 8, !tbaa !28
  %61 = getelementptr inbounds i32, ptr %60, i64 %indvars.iv85
  %62 = load i32, ptr %61, align 4, !tbaa !12
  switch i32 %62, label %.loopexit [
    i32 4003, label %63
    i32 4004, label %63
    i32 4000, label %63
  ]

63:                                               ; preds = %59, %59, %59
  %64 = load ptr, ptr %54, align 8, !tbaa !29
  %65 = getelementptr inbounds ptr, ptr %64, i64 %indvars.iv85
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = tail call zeroext i8 @is_linear_expression(ptr noundef %66)
  %.not52 = icmp eq i8 %67, 0
  br i1 %.not52, label %.loopexit, label %55

.loopexit58:                                      ; preds = %55, %.preheader57, %._crit_edge
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %68 = load i32, ptr %12, align 8, !tbaa !15
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next89, %69
  br i1 %70, label %26, label %._crit_edge71, !llvm.loop !30

._crit_edge71:                                    ; preds = %.loopexit58, %.preheader61
  %71 = getelementptr inbounds i8, ptr %.04074, i64 256
  %.040 = load ptr, ptr %71, align 8, !tbaa !5
  %.not = icmp eq ptr %.040, null
  br i1 %.not, label %.preheader, label %.preheader62, !llvm.loop !31

72:                                               ; preds = %80
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %73 = load i32, ptr @gnum_numeric_goal, align 4, !tbaa !12
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next92, %74
  br i1 %75, label %.lr.ph76, label %._crit_edge77, !llvm.loop !32

.lr.ph76:                                         ; preds = %.preheader, %72
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %72 ], [ 0, %.preheader ]
  %76 = load ptr, ptr @gnumeric_goal_lh, align 8, !tbaa !5
  %77 = getelementptr inbounds ptr, ptr %76, i64 %indvars.iv91
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = tail call zeroext i8 @is_linear_expression(ptr noundef %78)
  %.not46 = icmp eq i8 %79, 0
  br i1 %.not46, label %.loopexit, label %80

80:                                               ; preds = %.lr.ph76
  %81 = load ptr, ptr @gnumeric_goal_rh, align 8, !tbaa !5
  %82 = getelementptr inbounds ptr, ptr %81, i64 %indvars.iv91
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = tail call zeroext i8 @is_linear_expression(ptr noundef %83)
  %.not47 = icmp eq i8 %84, 0
  br i1 %.not47, label %.loopexit, label %72

._crit_edge77:                                    ; preds = %72, %.preheader
  %85 = load ptr, ptr @gmetric, align 8, !tbaa !5
  %.not43 = icmp eq ptr %85, null
  br i1 %.not43, label %.loopexit, label %86

86:                                               ; preds = %._crit_edge77
  %87 = tail call zeroext i8 @is_linear_expression(ptr noundef nonnull %85)
  %.not44 = icmp eq i8 %87, 0
  br i1 %.not44, label %88, label %.loopexit

88:                                               ; preds = %86
  %89 = load i32, ptr getelementptr inbounds (i8, ptr @gcmd_line, i64 768), align 4, !tbaa !33
  %.not45 = icmp eq i32 %89, 0
  br i1 %.not45, label %92, label %90

90:                                               ; preds = %88
  %91 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %92

92:                                               ; preds = %90, %88
  %93 = load ptr, ptr @gmetric, align 8, !tbaa !5
  tail call void @free_ExpNode(ptr noundef %93) #3
  store ptr null, ptr @gmetric, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %21, %16, %43, %38, %63, %59, %80, %.lr.ph76, %._crit_edge77, %92, %86
  %.039 = phi i8 [ 1, %86 ], [ 1, %92 ], [ 1, %._crit_edge77 ], [ 0, %.lr.ph76 ], [ 0, %80 ], [ 0, %59 ], [ 0, %63 ], [ 0, %38 ], [ 0, %43 ], [ 0, %16 ], [ 0, %21 ]
  ret i8 %.039
}

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

declare void @free_ExpNode(ptr noundef) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 200}
!10 = !{!"_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}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!10, !11, i64 248}
!16 = !{!10, !6, i64 184}
!17 = !{!10, !6, i64 192}
!18 = !{!10, !6, i64 240}
!19 = !{!20, !11, i64 72}
!20 = !{!"_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, !21, i64 176}
!21 = !{!"float", !7, i64 0}
!22 = distinct !{!22, !14}
!23 = !{!20, !6, i64 56}
!24 = !{!20, !6, i64 64}
!25 = !{!20, !7, i64 172}
!26 = !{!20, !11, i64 104}
!27 = distinct !{!27, !14}
!28 = !{!20, !6, i64 80}
!29 = !{!20, !6, i64 96}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}
!32 = distinct !{!32, !14}
!33 = !{!34, !11, i64 768}
!34 = !{!"_command_line", !7, i64 0, !7, i64 256, !7, i64 512, !11, i64 768, !11, i64 772, !11, i64 776, !7, i64 780, !11, i64 784, !21, i64 788}


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