; 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._LnfExpNode = type { [25 x i32], [25 x float], i32, [25 x i32], [25 x float], 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 }

@glnf_metric = external global %struct._LnfExpNode, align 4
@gactions = external global ptr, align 8
@gnum_lnf_goal = external global i32, align 4
@glnf_goal_lh = external global ptr, align 8

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

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

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

9:                                                ; preds = %33, %1
  %10 = load i32, ptr %6, align 4, !tbaa !9
  %11 = load i32, ptr @gnum_lnf_goal, align 4, !tbaa !9
  %12 = icmp slt i32 %10, %11
  br i1 %12, label %13, label %36

13:                                               ; preds = %9
  %14 = load ptr, ptr @glnf_goal_lh, align 8, !tbaa !5
  %15 = load i32, ptr %6, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds ptr, ptr %14, i64 %16
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._LnfExpNode, ptr %18, i32 0, i32 5
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %22, label %32

22:                                               ; preds = %13
  %23 = load ptr, ptr @glnf_goal_lh, align 8, !tbaa !5
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds ptr, ptr %23, i64 %25
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._LnfExpNode, ptr %27, i32 0, i32 3
  %29 = getelementptr inbounds [25 x i32], ptr %28, i64 0, i64 0
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  store i32 %30, ptr %31, align 4, !tbaa !9
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %178

32:                                               ; preds = %13
  br label %33

33:                                               ; preds = %32
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %6, align 4, !tbaa !9
  br label %9, !llvm.loop !14

36:                                               ; preds = %9
  %37 = load ptr, ptr @gactions, align 8, !tbaa !5
  store ptr %37, ptr %4, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %167, %36
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %171

41:                                               ; preds = %38
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %72, %41
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._Action, ptr %44, i32 0, i32 16
  %46 = load i32, ptr %45, align 8, !tbaa !16
  %47 = icmp slt i32 %43, %46
  br i1 %47, label %48, label %75

48:                                               ; preds = %42
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._Action, ptr %49, i32 0, i32 14
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  %52 = load i32, ptr %6, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %51, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._LnfExpNode, ptr %55, i32 0, i32 5
  %57 = load i32, ptr %56, align 4, !tbaa !11
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %59, label %71

59:                                               ; preds = %48
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._Action, ptr %60, i32 0, i32 14
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds ptr, ptr %62, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._LnfExpNode, ptr %66, i32 0, i32 3
  %68 = getelementptr inbounds [25 x i32], ptr %67, i64 0, i64 0
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  store i32 %69, ptr %70, align 4, !tbaa !9
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %178

71:                                               ; preds = %48
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %6, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %6, align 4, !tbaa !9
  br label %42, !llvm.loop !19

75:                                               ; preds = %42
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %163, %75
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._Action, ptr %78, i32 0, i32 18
  %80 = load i32, ptr %79, align 8, !tbaa !20
  %81 = icmp slt i32 %77, %80
  br i1 %81, label %82, label %166

82:                                               ; preds = %76
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._Action, ptr %83, i32 0, i32 17
  %85 = load ptr, ptr %84, align 8, !tbaa !21
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %struct._ActionEffect, ptr %85, i64 %87
  store ptr %88, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %119, %82
  %90 = load i32, ptr %7, align 4, !tbaa !9
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._ActionEffect, ptr %91, i32 0, i32 17
  %93 = load i32, ptr %92, align 8, !tbaa !22
  %94 = icmp slt i32 %90, %93
  br i1 %94, label %95, label %122

95:                                               ; preds = %89
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._ActionEffect, ptr %96, i32 0, i32 15
  %98 = load ptr, ptr %97, align 8, !tbaa !24
  %99 = load i32, ptr %7, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds ptr, ptr %98, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._LnfExpNode, ptr %102, i32 0, i32 5
  %104 = load i32, ptr %103, align 4, !tbaa !11
  %105 = icmp sgt i32 %104, 0
  br i1 %105, label %106, label %118

106:                                              ; preds = %95
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._ActionEffect, ptr %107, i32 0, i32 15
  %109 = load ptr, ptr %108, align 8, !tbaa !24
  %110 = load i32, ptr %7, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds ptr, ptr %109, i64 %111
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._LnfExpNode, ptr %113, i32 0, i32 3
  %115 = getelementptr inbounds [25 x i32], ptr %114, i64 0, i64 0
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  store i32 %116, ptr %117, align 4, !tbaa !9
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %178

118:                                              ; preds = %95
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %7, align 4, !tbaa !9
  br label %89, !llvm.loop !25

122:                                              ; preds = %89
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._ActionEffect, ptr %123, i32 0, i32 22
  %125 = load i8, ptr %124, align 4, !tbaa !26
  %126 = icmp ne i8 %125, 0
  br i1 %126, label %127, label %128

127:                                              ; preds = %122
  br label %163

128:                                              ; preds = %122
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %159, %128
  %130 = load i32, ptr %7, align 4, !tbaa !9
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._ActionEffect, ptr %131, i32 0, i32 21
  %133 = load i32, ptr %132, align 8, !tbaa !27
  %134 = icmp slt i32 %130, %133
  br i1 %134, label %135, label %162

135:                                              ; preds = %129
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct._ActionEffect, ptr %136, i32 0, i32 20
  %138 = load ptr, ptr %137, align 8, !tbaa !28
  %139 = load i32, ptr %7, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds ptr, ptr %138, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._LnfExpNode, ptr %142, i32 0, i32 5
  %144 = load i32, ptr %143, align 4, !tbaa !11
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %146, label %158

146:                                              ; preds = %135
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._ActionEffect, ptr %147, i32 0, i32 20
  %149 = load ptr, ptr %148, align 8, !tbaa !28
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds ptr, ptr %149, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._LnfExpNode, ptr %153, i32 0, i32 3
  %155 = getelementptr inbounds [25 x i32], ptr %154, i64 0, i64 0
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  store i32 %156, ptr %157, align 4, !tbaa !9
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %178

158:                                              ; preds = %135
  br label %159

159:                                              ; preds = %158
  %160 = load i32, ptr %7, align 4, !tbaa !9
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %7, align 4, !tbaa !9
  br label %129, !llvm.loop !29

162:                                              ; preds = %129
  br label %163

163:                                              ; preds = %162, %127
  %164 = load i32, ptr %6, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %6, align 4, !tbaa !9
  br label %76, !llvm.loop !30

166:                                              ; preds = %76
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._Action, ptr %168, i32 0, i32 19
  %170 = load ptr, ptr %169, align 8, !tbaa !31
  store ptr %170, ptr %4, align 8, !tbaa !5
  br label %38, !llvm.loop !32

171:                                              ; preds = %38
  %172 = load i32, ptr getelementptr inbounds (%struct._LnfExpNode, ptr @glnf_metric, i32 0, i32 5), align 4, !tbaa !11
  %173 = icmp sgt i32 %172, 0
  br i1 %173, label %174, label %177

174:                                              ; preds = %171
  %175 = load i32, ptr getelementptr inbounds (%struct._LnfExpNode, ptr @glnf_metric, i32 0, i32 3), align 4, !tbaa !9
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  store i32 %175, ptr %176, align 4, !tbaa !9
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %178

177:                                              ; preds = %171
  store i8 0, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %178

178:                                              ; preds = %177, %174, %146, %106, %59, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #2
  %179 = load i8, ptr %2, align 1
  ret i8 %179
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 404}
!12 = !{!"_LnfExpNode", !7, i64 0, !7, i64 100, !10, i64 200, !7, i64 204, !7, i64 304, !10, i64 404, !13, i64 408}
!13 = !{!"float", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !10, i64 232}
!17 = !{!"_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}
!18 = !{!17, !6, i64 216}
!19 = distinct !{!19, !15}
!20 = !{!17, !10, i64 248}
!21 = !{!17, !6, i64 240}
!22 = !{!23, !10, i64 136}
!23 = !{!"_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, !13, i64 176}
!24 = !{!23, !6, i64 120}
!25 = distinct !{!25, !15}
!26 = !{!23, !7, i64 172}
!27 = !{!23, !10, i64 168}
!28 = !{!23, !6, i64 160}
!29 = distinct !{!29, !15}
!30 = distinct !{!30, !15}
!31 = !{!17, !6, i64 256}
!32 = distinct !{!32, !15}


; 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._LnfExpNode = type { [25 x i32], [25 x float], i32, [25 x i32], [25 x float], 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 }

@glnf_metric = external local_unnamed_addr global %struct._LnfExpNode, align 4
@gactions = external local_unnamed_addr global ptr, align 8
@gnum_lnf_goal = external local_unnamed_addr global i32, align 4
@glnf_goal_lh = external local_unnamed_addr global ptr, align 8

; Function Attrs: nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local zeroext range(i8 0, 2) i8 @ex_fl_in_nF_of_pre_cond_eff_goal(ptr nocapture noundef writeonly %0) local_unnamed_addr #0 {
  %2 = load i32, ptr @gnum_lnf_goal, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %.preheader45

.lr.ph:                                           ; preds = %1
  %4 = load ptr, ptr @glnf_goal_lh, align 8, !tbaa !9
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %6

5:                                                ; preds = %6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader45, label %6, !llvm.loop !11

.preheader45:                                     ; preds = %5, %1
  %.04159 = load ptr, ptr @gactions, align 8, !tbaa !9
  %.not60 = icmp eq ptr %.04159, null
  br i1 %.not60, label %._crit_edge62, label %.preheader44

6:                                                ; preds = %.lr.ph, %5
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %5 ]
  %7 = getelementptr inbounds ptr, ptr %4, i64 %indvars.iv
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds i8, ptr %8, i64 404
  %10 = load i32, ptr %9, align 4, !tbaa !13
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %12, label %5

12:                                               ; preds = %6
  %13 = getelementptr inbounds i8, ptr %8, i64 204
  br label %.sink.split

.preheader44:                                     ; preds = %.preheader45, %._crit_edge58
  %.04161 = phi ptr [ %.041, %._crit_edge58 ], [ %.04159, %.preheader45 ]
  %14 = getelementptr inbounds i8, ptr %.04161, i64 232
  %15 = load i32, ptr %14, align 8, !tbaa !16
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph51, label %.preheader43

.lr.ph51:                                         ; preds = %.preheader44
  %17 = getelementptr inbounds i8, ptr %.04161, i64 216
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %wide.trip.count74 = zext nneg i32 %15 to i64
  br label %25

19:                                               ; preds = %25
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %.preheader43, label %25, !llvm.loop !19

.preheader43:                                     ; preds = %19, %.preheader44
  %20 = getelementptr inbounds i8, ptr %.04161, i64 248
  %21 = load i32, ptr %20, align 8, !tbaa !20
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph57, label %._crit_edge58

.lr.ph57:                                         ; preds = %.preheader43
  %23 = getelementptr inbounds i8, ptr %.04161, i64 240
  %24 = load ptr, ptr %23, align 8, !tbaa !21
  %wide.trip.count89 = zext nneg i32 %21 to i64
  br label %33

25:                                               ; preds = %.lr.ph51, %19
  %indvars.iv71 = phi i64 [ 0, %.lr.ph51 ], [ %indvars.iv.next72, %19 ]
  %26 = getelementptr inbounds ptr, ptr %18, i64 %indvars.iv71
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds i8, ptr %27, i64 404
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %19

31:                                               ; preds = %25
  %32 = getelementptr inbounds i8, ptr %27, i64 204
  br label %.sink.split

33:                                               ; preds = %.lr.ph57, %.loopexit
  %indvars.iv86 = phi i64 [ 0, %.lr.ph57 ], [ %indvars.iv.next87, %.loopexit ]
  %34 = getelementptr inbounds %struct._ActionEffect, ptr %24, i64 %indvars.iv86
  %35 = getelementptr inbounds i8, ptr %34, i64 136
  %36 = load i32, ptr %35, align 8, !tbaa !22
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph53, label %._crit_edge

.lr.ph53:                                         ; preds = %33
  %38 = getelementptr inbounds i8, ptr %34, i64 120
  %39 = load ptr, ptr %38, align 8, !tbaa !24
  %wide.trip.count79 = zext nneg i32 %36 to i64
  br label %41

40:                                               ; preds = %41
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count79
  br i1 %exitcond80.not, label %._crit_edge, label %41, !llvm.loop !25

41:                                               ; preds = %.lr.ph53, %40
  %indvars.iv76 = phi i64 [ 0, %.lr.ph53 ], [ %indvars.iv.next77, %40 ]
  %42 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv76
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %43, i64 404
  %45 = load i32, ptr %44, align 4, !tbaa !13
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %47, label %40

47:                                               ; preds = %41
  %48 = getelementptr inbounds i8, ptr %43, i64 204
  br label %.sink.split

._crit_edge:                                      ; preds = %40, %33
  %49 = getelementptr inbounds i8, ptr %34, i64 172
  %50 = load i8, ptr %49, align 4, !tbaa !26
  %.not42 = icmp eq i8 %50, 0
  br i1 %.not42, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %._crit_edge
  %51 = getelementptr inbounds i8, ptr %34, i64 168
  %52 = load i32, ptr %51, align 8, !tbaa !27
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.lr.ph55, label %.loopexit

.lr.ph55:                                         ; preds = %.preheader
  %54 = getelementptr inbounds i8, ptr %34, i64 160
  %55 = load ptr, ptr %54, align 8, !tbaa !28
  %wide.trip.count84 = zext nneg i32 %52 to i64
  br label %57

56:                                               ; preds = %57
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %.loopexit, label %57, !llvm.loop !29

57:                                               ; preds = %.lr.ph55, %56
  %indvars.iv81 = phi i64 [ 0, %.lr.ph55 ], [ %indvars.iv.next82, %56 ]
  %58 = getelementptr inbounds ptr, ptr %55, i64 %indvars.iv81
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %59, i64 404
  %61 = load i32, ptr %60, align 4, !tbaa !13
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %63, label %56

63:                                               ; preds = %57
  %64 = getelementptr inbounds i8, ptr %59, i64 204
  br label %.sink.split

.loopexit:                                        ; preds = %56, %.preheader, %._crit_edge
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %._crit_edge58, label %33, !llvm.loop !30

._crit_edge58:                                    ; preds = %.loopexit, %.preheader43
  %65 = getelementptr inbounds i8, ptr %.04161, i64 256
  %.041 = load ptr, ptr %65, align 8, !tbaa !9
  %.not = icmp eq ptr %.041, null
  br i1 %.not, label %._crit_edge62, label %.preheader44, !llvm.loop !31

._crit_edge62:                                    ; preds = %._crit_edge58, %.preheader45
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @glnf_metric, i64 404), align 4, !tbaa !13
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.sink.split, label %69

.sink.split:                                      ; preds = %._crit_edge62, %12, %31, %47, %63
  %.sink98 = phi ptr [ %64, %63 ], [ %48, %47 ], [ %32, %31 ], [ %13, %12 ], [ getelementptr inbounds (i8, ptr @glnf_metric, i64 204), %._crit_edge62 ]
  %68 = load i32, ptr %.sink98, align 4, !tbaa !5
  store i32 %68, ptr %0, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %.sink.split, %._crit_edge62
  %.040 = phi i8 [ 0, %._crit_edge62 ], [ 1, %.sink.split ]
  ret i8 %.040
}

attributes #0 = { nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) 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" }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 404}
!14 = !{!"_LnfExpNode", !7, i64 0, !7, i64 100, !6, i64 200, !7, i64 204, !7, i64 304, !6, i64 404, !15, i64 408}
!15 = !{!"float", !7, i64 0}
!16 = !{!17, !6, i64 232}
!17 = !{!"_Action", !10, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !6, i64 32, !7, i64 36, !7, i64 96, !10, i64 160, !6, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !6, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !6, i64 232, !10, i64 240, !6, i64 248, !10, i64 256}
!18 = !{!17, !10, i64 216}
!19 = distinct !{!19, !12}
!20 = !{!17, !6, i64 248}
!21 = !{!17, !10, i64 240}
!22 = !{!23, !6, i64 136}
!23 = !{!"_ActionEffect", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !6, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !6, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !6, i64 168, !7, i64 172, !7, i64 173, !15, i64 176}
!24 = !{!23, !10, i64 120}
!25 = distinct !{!25, !12}
!26 = !{!23, !7, i64 172}
!27 = !{!23, !6, i64 168}
!28 = !{!23, !10, i64 160}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !12}


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