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

; 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._FlConn = type { ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i8, ptr, ptr, i32, i8, float, i8, ptr, ptr, i8, float, i32 }

@gnum_fl_conn = external global i32, align 4
@gfl_conn = external global ptr, align 8
@extend_fluent_levels.highest_seen = external hidden global i32, align 4

; 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 allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

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

10:                                               ; preds = %1
  store i32 25, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %50, %10
  %12 = load i32, ptr %5, align 4, !tbaa !5
  %13 = load i32, ptr @gnum_fl_conn, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %15, label %53

15:                                               ; preds = %11
  %16 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = call noalias ptr @calloc(i64 noundef %17, i64 noundef 1) #5
  %19 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds %struct._FlConn, ptr %19, i64 %21
  %23 = getelementptr inbounds %struct._FlConn, ptr %22, i32 0, i32 17
  store ptr %18, ptr %23, align 8, !tbaa !11
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %38, %15
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %41

28:                                               ; preds = %24
  %29 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %struct._FlConn, ptr %29, i64 %31
  %33 = getelementptr inbounds %struct._FlConn, ptr %32, i32 0, i32 17
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i8, ptr %34, i64 %36
  store i8 0, ptr %37, align 1, !tbaa !14
  br label %38

38:                                               ; preds = %28
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %6, align 4, !tbaa !5
  br label %24, !llvm.loop !15

41:                                               ; preds = %24
  %42 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = call noalias ptr @calloc(i64 noundef %43, i64 noundef 4) #5
  %45 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct._FlConn, ptr %45, i64 %47
  %49 = getelementptr inbounds %struct._FlConn, ptr %48, i32 0, i32 18
  store ptr %44, ptr %49, align 8, !tbaa !17
  br label %50

50:                                               ; preds = %41
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %5, align 4, !tbaa !5
  br label %11, !llvm.loop !18

53:                                               ; preds = %11
  store i32 1, ptr %7, align 4
  br label %204

54:                                               ; preds = %1
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  %57 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %54
  store i32 1, ptr %7, align 4
  br label %204

60:                                               ; preds = %54
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = call noalias ptr @calloc(i64 noundef %63, i64 noundef 1) #5
  store ptr %64, ptr %3, align 8, !tbaa !9
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = call noalias ptr @calloc(i64 noundef %67, i64 noundef 4) #5
  store ptr %68, ptr %4, align 8, !tbaa !9
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = add nsw i32 %69, 10
  store i32 %70, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %198, %60
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = load i32, ptr @gnum_fl_conn, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %75, label %201

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

76:                                               ; preds = %109, %75
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = icmp sle i32 %77, %78
  br i1 %79, label %80, label %112

80:                                               ; preds = %76
  %81 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct._FlConn, ptr %81, i64 %83
  %85 = getelementptr inbounds %struct._FlConn, ptr %84, i32 0, i32 17
  %86 = load ptr, ptr %85, align 8, !tbaa !11
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %86, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !14
  %91 = load ptr, ptr %3, align 8, !tbaa !9
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %91, i64 %93
  store i8 %90, ptr %94, align 1, !tbaa !14
  %95 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds %struct._FlConn, ptr %95, i64 %97
  %99 = getelementptr inbounds %struct._FlConn, ptr %98, i32 0, i32 18
  %100 = load ptr, ptr %99, align 8, !tbaa !17
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds float, ptr %100, i64 %102
  %104 = load float, ptr %103, align 4, !tbaa !19
  %105 = load ptr, ptr %4, align 8, !tbaa !9
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds float, ptr %105, i64 %107
  store float %104, ptr %108, align 4, !tbaa !19
  br label %109

109:                                              ; preds = %80
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %6, align 4, !tbaa !5
  br label %76, !llvm.loop !20

112:                                              ; preds = %76
  %113 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %struct._FlConn, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct._FlConn, ptr %116, i32 0, i32 17
  %118 = load ptr, ptr %117, align 8, !tbaa !11
  call void @free(ptr noundef %118) #4
  %119 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %120 = load i32, ptr %5, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds %struct._FlConn, ptr %119, i64 %121
  %123 = getelementptr inbounds %struct._FlConn, ptr %122, i32 0, i32 18
  %124 = load ptr, ptr %123, align 8, !tbaa !17
  call void @free(ptr noundef %124) #4
  %125 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = call noalias ptr @calloc(i64 noundef %126, i64 noundef 1) #5
  %128 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %129 = load i32, ptr %5, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds %struct._FlConn, ptr %128, i64 %130
  %132 = getelementptr inbounds %struct._FlConn, ptr %131, i32 0, i32 17
  store ptr %127, ptr %132, align 8, !tbaa !11
  %133 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = call noalias ptr @calloc(i64 noundef %134, i64 noundef 4) #5
  %136 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %137 = load i32, ptr %5, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %struct._FlConn, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct._FlConn, ptr %139, i32 0, i32 18
  store ptr %135, ptr %140, align 8, !tbaa !17
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %174, %112
  %142 = load i32, ptr %6, align 4, !tbaa !5
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = icmp sle i32 %142, %143
  br i1 %144, label %145, label %177

145:                                              ; preds = %141
  %146 = load ptr, ptr %3, align 8, !tbaa !9
  %147 = load i32, ptr %6, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i8, ptr %146, i64 %148
  %150 = load i8, ptr %149, align 1, !tbaa !14
  %151 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %152 = load i32, ptr %5, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds %struct._FlConn, ptr %151, i64 %153
  %155 = getelementptr inbounds %struct._FlConn, ptr %154, i32 0, i32 17
  %156 = load ptr, ptr %155, align 8, !tbaa !11
  %157 = load i32, ptr %6, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i8, ptr %156, i64 %158
  store i8 %150, ptr %159, align 1, !tbaa !14
  %160 = load ptr, ptr %4, align 8, !tbaa !9
  %161 = load i32, ptr %6, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds float, ptr %160, i64 %162
  %164 = load float, ptr %163, align 4, !tbaa !19
  %165 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds %struct._FlConn, ptr %165, i64 %167
  %169 = getelementptr inbounds %struct._FlConn, ptr %168, i32 0, i32 18
  %170 = load ptr, ptr %169, align 8, !tbaa !17
  %171 = load i32, ptr %6, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds float, ptr %170, i64 %172
  store float %164, ptr %173, align 4, !tbaa !19
  br label %174

174:                                              ; preds = %145
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %6, align 4, !tbaa !5
  br label %141, !llvm.loop !21

177:                                              ; preds = %141
  %178 = load i32, ptr %2, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %6, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %194, %177
  %181 = load i32, ptr %6, align 4, !tbaa !5
  %182 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %184, label %197

184:                                              ; preds = %180
  %185 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %186 = load i32, ptr %5, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds %struct._FlConn, ptr %185, i64 %187
  %189 = getelementptr inbounds %struct._FlConn, ptr %188, i32 0, i32 17
  %190 = load ptr, ptr %189, align 8, !tbaa !11
  %191 = load i32, ptr %6, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i8, ptr %190, i64 %192
  store i8 0, ptr %193, align 1, !tbaa !14
  br label %194

194:                                              ; preds = %184
  %195 = load i32, ptr %6, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %6, align 4, !tbaa !5
  br label %180, !llvm.loop !22

197:                                              ; preds = %180
  br label %198

198:                                              ; preds = %197
  %199 = load i32, ptr %5, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %5, align 4, !tbaa !5
  br label %71, !llvm.loop !23

201:                                              ; preds = %71
  %202 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %202) #4
  %203 = load ptr, ptr %4, align 8, !tbaa !9
  call void @free(ptr noundef %203) #4
  store i32 0, ptr %7, align 4
  br label %204

204:                                              ; preds = %201, %59, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  %205 = load i32, ptr %7, align 4
  switch i32 %205, label %207 [
    i32 0, label %206
    i32 1, label %206
  ]

206:                                              ; preds = %204, %204
  ret void

207:                                              ; preds = %204
  unreachable
}

; Function Attrs: nounwind
declare void @free(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 = { 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 = { nounwind }
attributes #5 = { 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 = !{!"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 = !{!12, !10, i64 112}
!12 = !{!"_FlConn", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !6, i64 72, !7, i64 76, !10, i64 80, !10, i64 88, !6, i64 96, !7, i64 100, !13, i64 104, !7, i64 108, !10, i64 112, !10, i64 120, !7, i64 128, !13, i64 132, !6, i64 136}
!13 = !{!"float", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !10, i64 120}
!18 = distinct !{!18, !16}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}


; 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._FlConn = type { ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i8, ptr, ptr, i32, i8, float, i8, ptr, ptr, i8, float, i32 }

@gnum_fl_conn = external local_unnamed_addr global i32, align 4
@gfl_conn = external local_unnamed_addr global ptr, align 8
@extend_fluent_levels.highest_seen = external hidden local_unnamed_addr global i32, align 4

; 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
define dso_local void @extend_fluent_levels(i32 noundef %0) local_unnamed_addr #1 {
  %2 = icmp eq i32 %0, -1
  br i1 %2, label %3, label %27

3:                                                ; preds = %1
  store i32 25, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %4 = load i32, ptr @gnum_fl_conn, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph71.split, label %.loopexit

.lr.ph71.split:                                   ; preds = %3, %._crit_edge68
  %6 = phi i32 [ %20, %._crit_edge68 ], [ %4, %3 ]
  %7 = phi i32 [ %21, %._crit_edge68 ], [ 25, %3 ]
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %._crit_edge68 ], [ 0, %3 ]
  %8 = sext i32 %7 to i64
  %9 = tail call noalias ptr @calloc(i64 noundef %8, i64 noundef 1) #4
  %10 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %11 = getelementptr inbounds %struct._FlConn, ptr %10, i64 %indvars.iv90, i32 17
  store ptr %9, ptr %11, align 8, !tbaa !11
  %12 = icmp sgt i32 %7, 0
  br i1 %12, label %.lr.ph67, label %._crit_edge68

.lr.ph67:                                         ; preds = %.lr.ph71.split, %.lr.ph67
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %.lr.ph67 ], [ 0, %.lr.ph71.split ]
  %13 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %14 = getelementptr inbounds %struct._FlConn, ptr %13, i64 %indvars.iv90, i32 17
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %15, i64 %indvars.iv87
  store i8 0, ptr %16, align 1, !tbaa !14
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %17 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = icmp slt i64 %indvars.iv.next88, %18
  br i1 %19, label %.lr.ph67, label %._crit_edge68.loopexit, !llvm.loop !15

._crit_edge68.loopexit:                           ; preds = %.lr.ph67
  %.pre96 = load i32, ptr @gnum_fl_conn, align 4, !tbaa !5
  br label %._crit_edge68

._crit_edge68:                                    ; preds = %._crit_edge68.loopexit, %.lr.ph71.split
  %.pre-phi = phi i64 [ %18, %._crit_edge68.loopexit ], [ %8, %.lr.ph71.split ]
  %20 = phi i32 [ %.pre96, %._crit_edge68.loopexit ], [ %6, %.lr.ph71.split ]
  %21 = phi i32 [ %17, %._crit_edge68.loopexit ], [ %7, %.lr.ph71.split ]
  %22 = tail call noalias ptr @calloc(i64 noundef %.pre-phi, i64 noundef 4) #4
  %23 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct._FlConn, ptr %23, i64 %indvars.iv90, i32 18
  store ptr %22, ptr %24, align 8, !tbaa !17
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %25 = sext i32 %20 to i64
  %26 = icmp slt i64 %indvars.iv.next91, %25
  br i1 %26, label %.lr.ph71.split, label %.loopexit, !llvm.loop !18

27:                                               ; preds = %1
  %28 = add nuw i32 %0, 1
  %29 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %.loopexit, label %31

31:                                               ; preds = %27
  %32 = sext i32 %28 to i64
  %33 = tail call noalias ptr @calloc(i64 noundef %32, i64 noundef 1) #4
  %34 = tail call noalias ptr @calloc(i64 noundef %32, i64 noundef 4) #4
  %35 = add nsw i32 %0, 10
  store i32 %35, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %36 = load i32, ptr @gnum_fl_conn, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.preheader53.lr.ph, label %._crit_edge64

.preheader53.lr.ph:                               ; preds = %31
  %.not54 = icmp slt i32 %0, 0
  %38 = zext i32 %28 to i64
  %39 = shl nuw nsw i64 %38, 2
  %xtraiter = and i64 %38, 1
  %40 = icmp eq i32 %0, 0
  %unroll_iter = and i64 %38, 4294967294
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader53

.preheader53:                                     ; preds = %.preheader53.lr.ph, %._crit_edge62
  %indvars.iv79 = phi i64 [ 0, %.preheader53.lr.ph ], [ %indvars.iv.next80, %._crit_edge62 ]
  %.pre = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %.phi.trans.insert = getelementptr inbounds %struct._FlConn, ptr %.pre, i64 %indvars.iv79, i32 17
  %.pre93 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !11
  br i1 %.not54, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader53
  %41 = getelementptr inbounds %struct._FlConn, ptr %.pre, i64 %indvars.iv79, i32 18
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %33, ptr noundef nonnull align 1 dereferenceable(1) %.pre93, i64 %38, i1 false), !tbaa !14
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %34, ptr noundef nonnull align 4 dereferenceable(1) %42, i64 %39, i1 false), !tbaa !20
  br label %._crit_edge

._crit_edge:                                      ; preds = %.preheader53, %.lr.ph
  tail call void @free(ptr noundef %.pre93) #5
  %43 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct._FlConn, ptr %43, i64 %indvars.iv79, i32 18
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  tail call void @free(ptr noundef %45) #5
  %46 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = tail call noalias ptr @calloc(i64 noundef %47, i64 noundef 1) #4
  %49 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct._FlConn, ptr %49, i64 %indvars.iv79, i32 17
  store ptr %48, ptr %50, align 8, !tbaa !11
  %51 = tail call noalias ptr @calloc(i64 noundef %47, i64 noundef 4) #4
  %52 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct._FlConn, ptr %52, i64 %indvars.iv79, i32 18
  store ptr %51, ptr %53, align 8, !tbaa !17
  br i1 %.not54, label %.preheader, label %.lr.ph59.preheader

.lr.ph59.preheader:                               ; preds = %._crit_edge
  %.pre94 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  br i1 %40, label %.preheader.loopexit.unr-lcssa, label %.lr.ph59

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph59, %.lr.ph59.preheader
  %.unr = phi ptr [ %.pre94, %.lr.ph59.preheader ], [ %86, %.lr.ph59 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph59.preheader ], [ %indvars.iv.next.1, %.lr.ph59 ]
  br i1 %lcmp.mod.not, label %.preheader.loopexit, label %.lr.ph59.epil

.lr.ph59.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa
  %54 = getelementptr inbounds i8, ptr %33, i64 %indvars.iv.unr
  %55 = load i8, ptr %54, align 1, !tbaa !14
  %56 = getelementptr inbounds %struct._FlConn, ptr %.unr, i64 %indvars.iv79, i32 17
  %57 = load ptr, ptr %56, align 8, !tbaa !11
  %58 = getelementptr inbounds i8, ptr %57, i64 %indvars.iv.unr
  store i8 %55, ptr %58, align 1, !tbaa !14
  %59 = getelementptr inbounds float, ptr %34, i64 %indvars.iv.unr
  %60 = load float, ptr %59, align 4, !tbaa !20
  %61 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct._FlConn, ptr %61, i64 %indvars.iv79, i32 18
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  %64 = getelementptr inbounds float, ptr %63, i64 %indvars.iv.unr
  store float %60, ptr %64, align 4, !tbaa !20
  br label %.preheader.loopexit

.preheader.loopexit:                              ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph59.epil
  %.pre95 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %._crit_edge
  %65 = phi i32 [ %.pre95, %.preheader.loopexit ], [ %46, %._crit_edge ]
  %66 = icmp slt i32 %28, %65
  br i1 %66, label %.lr.ph61, label %._crit_edge62

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %.lr.ph59
  %67 = phi ptr [ %86, %.lr.ph59 ], [ %.pre94, %.lr.ph59.preheader ]
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph59 ], [ 0, %.lr.ph59.preheader ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph59 ], [ 0, %.lr.ph59.preheader ]
  %68 = getelementptr inbounds i8, ptr %33, i64 %indvars.iv
  %69 = load i8, ptr %68, align 1, !tbaa !14
  %70 = getelementptr inbounds %struct._FlConn, ptr %67, i64 %indvars.iv79, i32 17
  %71 = load ptr, ptr %70, align 8, !tbaa !11
  %72 = getelementptr inbounds i8, ptr %71, i64 %indvars.iv
  store i8 %69, ptr %72, align 1, !tbaa !14
  %73 = getelementptr inbounds float, ptr %34, i64 %indvars.iv
  %74 = load float, ptr %73, align 4, !tbaa !20
  %75 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct._FlConn, ptr %75, i64 %indvars.iv79, i32 18
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  %78 = getelementptr inbounds float, ptr %77, i64 %indvars.iv
  store float %74, ptr %78, align 4, !tbaa !20
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %79 = getelementptr inbounds i8, ptr %33, i64 %indvars.iv.next
  %80 = load i8, ptr %79, align 1, !tbaa !14
  %81 = getelementptr inbounds %struct._FlConn, ptr %75, i64 %indvars.iv79, i32 17
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = getelementptr inbounds i8, ptr %82, i64 %indvars.iv.next
  store i8 %80, ptr %83, align 1, !tbaa !14
  %84 = getelementptr inbounds float, ptr %34, i64 %indvars.iv.next
  %85 = load float, ptr %84, align 4, !tbaa !20
  %86 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct._FlConn, ptr %86, i64 %indvars.iv79, i32 18
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  %89 = getelementptr inbounds float, ptr %88, i64 %indvars.iv.next
  store float %85, ptr %89, align 4, !tbaa !20
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.loopexit.unr-lcssa, label %.lr.ph59, !llvm.loop !21

.lr.ph61:                                         ; preds = %.preheader, %.lr.ph61
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %.lr.ph61 ], [ %32, %.preheader ]
  %90 = load ptr, ptr @gfl_conn, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct._FlConn, ptr %90, i64 %indvars.iv79, i32 17
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds i8, ptr %92, i64 %indvars.iv76
  store i8 0, ptr %93, align 1, !tbaa !14
  %indvars.iv.next77 = add nsw i64 %indvars.iv76, 1
  %94 = load i32, ptr @extend_fluent_levels.highest_seen, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = icmp slt i64 %indvars.iv.next77, %95
  br i1 %96, label %.lr.ph61, label %._crit_edge62, !llvm.loop !22

._crit_edge62:                                    ; preds = %.lr.ph61, %.preheader
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %97 = load i32, ptr @gnum_fl_conn, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next80, %98
  br i1 %99, label %.preheader53, label %._crit_edge64, !llvm.loop !23

._crit_edge64:                                    ; preds = %._crit_edge62, %31
  tail call void @free(ptr noundef %33) #5
  tail call void @free(ptr noundef %34) #5
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge68, %3, %27, %._crit_edge64
  ret void
}

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind allocsize(0,1) }
attributes #5 = { 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 = !{!"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 = !{!12, !10, i64 112}
!12 = !{!"_FlConn", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !6, i64 72, !7, i64 76, !10, i64 80, !10, i64 88, !6, i64 96, !7, i64 100, !13, i64 104, !7, i64 108, !10, i64 112, !10, i64 120, !7, i64 128, !13, i64 132, !6, i64 136}
!13 = !{!"float", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !10, i64 120}
!18 = distinct !{!18, !16, !19}
!19 = !{!"llvm.loop.unswitch.partial.disable"}
!20 = !{!13, !13, i64 0}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass