; LLVM IR from Discngine/fpocket :: src (energy)

; 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.s_min_max_pocket = type { float, float, float, float, float, float }
%struct.s_grid = type { ptr, ptr, i32, i32, i32, float }

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

; Function Attrs: nounwind uwtable
define dso_local ptr @init_pocket_grid(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %15 = call ptr @my_malloc(i64 noundef 32)
  store ptr %15, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = call ptr @float_get_min_max_from_pocket(ptr noundef %16)
  store ptr %17, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.s_min_max_pocket, ptr %18, i32 0, i32 3
  %20 = load float, ptr %19, align 4, !tbaa !9
  store float %20, ptr %5, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.s_min_max_pocket, ptr %21, i32 0, i32 4
  %23 = load float, ptr %22, align 4, !tbaa !13
  store float %23, ptr %6, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.s_min_max_pocket, ptr %24, i32 0, i32 5
  %26 = load float, ptr %25, align 4, !tbaa !14
  store float %26, ptr %7, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.s_min_max_pocket, ptr %27, i32 0, i32 0
  %29 = load float, ptr %28, align 4, !tbaa !15
  store float %29, ptr %8, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.s_min_max_pocket, ptr %30, i32 0, i32 1
  %32 = load float, ptr %31, align 4, !tbaa !16
  store float %32, ptr %9, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.s_min_max_pocket, ptr %33, i32 0, i32 2
  %35 = load float, ptr %34, align 4, !tbaa !17
  store float %35, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store float 0xBF50624DE0000000, ptr %11, align 4, !tbaa !12
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  call void @my_free(ptr noundef %36)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.s_grid, ptr %37, i32 0, i32 5
  store float 0x3FD3333340000000, ptr %38, align 4, !tbaa !18
  %39 = load float, ptr %5, align 4, !tbaa !12
  %40 = load float, ptr %8, align 4, !tbaa !12
  %41 = fsub float %39, %40
  %42 = fptosi float %41 to i32
  %43 = sitofp i32 %42 to float
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.s_grid, ptr %44, i32 0, i32 5
  %46 = load float, ptr %45, align 4, !tbaa !18
  %47 = fdiv float %43, %46
  %48 = fadd float 1.000000e+00, %47
  %49 = fptosi float %48 to i32
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.s_grid, ptr %50, i32 0, i32 2
  store i32 %49, ptr %51, align 8, !tbaa !21
  %52 = load float, ptr %6, align 4, !tbaa !12
  %53 = load float, ptr %9, align 4, !tbaa !12
  %54 = fsub float %52, %53
  %55 = fptosi float %54 to i32
  %56 = sitofp i32 %55 to float
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.s_grid, ptr %57, i32 0, i32 5
  %59 = load float, ptr %58, align 4, !tbaa !18
  %60 = fdiv float %56, %59
  %61 = fadd float 1.000000e+00, %60
  %62 = fptosi float %61 to i32
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.s_grid, ptr %63, i32 0, i32 3
  store i32 %62, ptr %64, align 4, !tbaa !22
  %65 = load float, ptr %7, align 4, !tbaa !12
  %66 = load float, ptr %10, align 4, !tbaa !12
  %67 = fsub float %65, %66
  %68 = fptosi float %67 to i32
  %69 = sitofp i32 %68 to float
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.s_grid, ptr %70, i32 0, i32 5
  %72 = load float, ptr %71, align 4, !tbaa !18
  %73 = fdiv float %69, %72
  %74 = fadd float 1.000000e+00, %73
  %75 = fptosi float %74 to i32
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.s_grid, ptr %76, i32 0, i32 4
  store i32 %75, ptr %77, align 8, !tbaa !23
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.s_grid, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 8, !tbaa !21
  %81 = sext i32 %80 to i64
  %82 = mul i64 8, %81
  %83 = call noalias ptr @malloc(i64 noundef %82) #5
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.s_grid, ptr %84, i32 0, i32 0
  store ptr %83, ptr %85, align 8, !tbaa !24
  store i32 0, ptr %12, align 4, !tbaa !25
  br label %86

86:                                               ; preds = %158, %1
  %87 = load i32, ptr %12, align 4, !tbaa !25
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.s_grid, ptr %88, i32 0, i32 2
  %90 = load i32, ptr %89, align 8, !tbaa !21
  %91 = icmp slt i32 %87, %90
  br i1 %91, label %92, label %161

92:                                               ; preds = %86
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.s_grid, ptr %93, i32 0, i32 3
  %95 = load i32, ptr %94, align 4, !tbaa !22
  %96 = sext i32 %95 to i64
  %97 = mul i64 8, %96
  %98 = call noalias ptr @malloc(i64 noundef %97) #5
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.s_grid, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !24
  %102 = load i32, ptr %12, align 4, !tbaa !25
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  store ptr %98, ptr %104, align 8, !tbaa !5
  store i32 0, ptr %13, align 4, !tbaa !25
  br label %105

105:                                              ; preds = %154, %92
  %106 = load i32, ptr %13, align 4, !tbaa !25
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.s_grid, ptr %107, i32 0, i32 3
  %109 = load i32, ptr %108, align 4, !tbaa !22
  %110 = icmp slt i32 %106, %109
  br i1 %110, label %111, label %157

111:                                              ; preds = %105
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.s_grid, ptr %112, i32 0, i32 4
  %114 = load i32, ptr %113, align 8, !tbaa !23
  %115 = sext i32 %114 to i64
  %116 = mul i64 4, %115
  %117 = call noalias ptr @malloc(i64 noundef %116) #5
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.s_grid, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !24
  %121 = load i32, ptr %12, align 4, !tbaa !25
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds ptr, ptr %120, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = load i32, ptr %13, align 4, !tbaa !25
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds ptr, ptr %124, i64 %126
  store ptr %117, ptr %127, align 8, !tbaa !5
  store i32 0, ptr %14, align 4, !tbaa !25
  br label %128

128:                                              ; preds = %150, %111
  %129 = load i32, ptr %14, align 4, !tbaa !25
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.s_grid, ptr %130, i32 0, i32 4
  %132 = load i32, ptr %131, align 8, !tbaa !23
  %133 = icmp slt i32 %129, %132
  br i1 %133, label %134, label %153

134:                                              ; preds = %128
  %135 = load float, ptr %11, align 4, !tbaa !12
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.s_grid, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !24
  %139 = load i32, ptr %12, align 4, !tbaa !25
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds ptr, ptr %138, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = load i32, ptr %13, align 4, !tbaa !25
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds ptr, ptr %142, i64 %144
  %146 = load ptr, ptr %145, align 8, !tbaa !5
  %147 = load i32, ptr %14, align 4, !tbaa !25
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds float, ptr %146, i64 %148
  store float %135, ptr %149, align 4, !tbaa !12
  br label %150

150:                                              ; preds = %134
  %151 = load i32, ptr %14, align 4, !tbaa !25
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %14, align 4, !tbaa !25
  br label %128, !llvm.loop !26

153:                                              ; preds = %128
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %13, align 4, !tbaa !25
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %13, align 4, !tbaa !25
  br label %105, !llvm.loop !28

157:                                              ; preds = %105
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %12, align 4, !tbaa !25
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %12, align 4, !tbaa !25
  br label %86, !llvm.loop !29

161:                                              ; preds = %86
  %162 = call noalias ptr @malloc(i64 noundef 12) #5
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.s_grid, ptr %163, i32 0, i32 1
  store ptr %162, ptr %164, align 8, !tbaa !30
  %165 = load float, ptr %8, align 4, !tbaa !12
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.s_grid, ptr %166, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8, !tbaa !30
  %169 = getelementptr inbounds float, ptr %168, i64 0
  store float %165, ptr %169, align 4, !tbaa !12
  %170 = load float, ptr %9, align 4, !tbaa !12
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.s_grid, ptr %171, i32 0, i32 1
  %173 = load ptr, ptr %172, align 8, !tbaa !30
  %174 = getelementptr inbounds float, ptr %173, i64 1
  store float %170, ptr %174, align 4, !tbaa !12
  %175 = load float, ptr %10, align 4, !tbaa !12
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.s_grid, ptr %176, i32 0, i32 1
  %178 = load ptr, ptr %177, align 8, !tbaa !30
  %179 = getelementptr inbounds float, ptr %178, i64 2
  store float %175, ptr %179, align 4, !tbaa !12
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  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
  ret ptr %180
}

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

declare ptr @my_malloc(i64 noundef) #2

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

declare void @my_free(ptr noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

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

!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 12}
!10 = !{!"s_min_max_pocket", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!11 = !{!"float", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 16}
!14 = !{!10, !11, i64 20}
!15 = !{!10, !11, i64 0}
!16 = !{!10, !11, i64 4}
!17 = !{!10, !11, i64 8}
!18 = !{!19, !11, i64 28}
!19 = !{!"s_grid", !6, i64 0, !6, i64 8, !20, i64 16, !20, i64 20, !20, i64 24, !11, i64 28}
!20 = !{!"int", !7, i64 0}
!21 = !{!19, !20, i64 16}
!22 = !{!19, !20, i64 20}
!23 = !{!19, !20, i64 24}
!24 = !{!19, !6, i64 0}
!25 = !{!20, !20, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}
!30 = !{!19, !6, i64 8}


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

; Function Attrs: nounwind uwtable
define dso_local ptr @init_pocket_grid(ptr noundef %0) local_unnamed_addr #0 {
  %2 = tail call ptr @my_malloc(i64 noundef 32) #3
  %3 = tail call ptr @float_get_min_max_from_pocket(ptr noundef %0)
  %4 = getelementptr inbounds i8, ptr %3, i64 12
  %5 = getelementptr inbounds i8, ptr %3, i64 20
  %6 = load float, ptr %5, align 4, !tbaa !5
  %7 = load <2 x float>, ptr %3, align 4, !tbaa !10
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  %9 = load float, ptr %8, align 4, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %2, i64 28
  %11 = getelementptr inbounds i8, ptr %2, i64 16
  %12 = load <2 x float>, ptr %4, align 4, !tbaa !10
  tail call void @my_free(ptr noundef nonnull %3) #3
  store float 0x3FD3333340000000, ptr %10, align 4, !tbaa !12
  %13 = fsub <2 x float> %12, %7
  %14 = fptosi <2 x float> %13 to <2 x i32>
  %15 = sitofp <2 x i32> %14 to <2 x float>
  %16 = fdiv <2 x float> %15, <float 0x3FD3333340000000, float 0x3FD3333340000000>
  %17 = fadd <2 x float> %16, <float 1.000000e+00, float 1.000000e+00>
  %18 = fptosi <2 x float> %17 to <2 x i32>
  store <2 x i32> %18, ptr %11, align 8, !tbaa !16
  %19 = fsub float %6, %9
  %20 = fptosi float %19 to i32
  %21 = sitofp i32 %20 to float
  %22 = fdiv float %21, 0x3FD3333340000000
  %23 = fadd float %22, 1.000000e+00
  %24 = fptosi float %23 to i32
  %25 = getelementptr inbounds i8, ptr %2, i64 24
  store i32 %24, ptr %25, align 8, !tbaa !17
  %26 = extractelement <2 x i32> %18, i64 0
  %27 = sext i32 %26 to i64
  %28 = shl nsw i64 %27, 3
  %29 = tail call noalias ptr @malloc(i64 noundef %28) #4
  store ptr %29, ptr %2, align 8, !tbaa !18
  %30 = icmp sgt i32 %26, 0
  br i1 %30, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %31 = extractelement <2 x i32> %18, i64 1
  %32 = sext i32 %31 to i64
  %33 = shl nsw i64 %32, 3
  %34 = icmp sgt i32 %31, 0
  %35 = sext i32 %24 to i64
  %36 = shl nsw i64 %35, 2
  br i1 %34, label %.lr.ph.split.us, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %wide.trip.count = zext nneg i32 %26 to i64
  br label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %37 = icmp sgt i32 %24, 0
  %wide.trip.count88 = zext nneg i32 %26 to i64
  %wide.trip.count83 = zext nneg i32 %31 to i64
  br i1 %37, label %.lr.ph56.us.us.preheader, label %.lr.ph56.us

.lr.ph56.us.us.preheader:                         ; preds = %.lr.ph.split.us
  %wide.trip.count78 = zext nneg i32 %24 to i64
  %min.iters.check = icmp ult i32 %24, 8
  %n.vec = and i64 %wide.trip.count78, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count78
  br label %.lr.ph56.us.us

.lr.ph56.us.us:                                   ; preds = %.lr.ph56.us.us.preheader, %._crit_edge57.split.us.us.us
  %38 = phi ptr [ %29, %.lr.ph56.us.us.preheader ], [ %44, %._crit_edge57.split.us.us.us ]
  %indvars.iv85 = phi i64 [ 0, %.lr.ph56.us.us.preheader ], [ %indvars.iv.next86, %._crit_edge57.split.us.us.us ]
  %39 = tail call noalias ptr @malloc(i64 noundef %33) #4
  %40 = getelementptr inbounds ptr, ptr %38, i64 %indvars.iv85
  store ptr %39, ptr %40, align 8, !tbaa !19
  %.pre = load ptr, ptr %2, align 8, !tbaa !18
  %.phi.trans.insert = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv85
  %.pre90 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !19
  br label %.lr.ph.us.us.us

.lr.ph.us.us.us:                                  ; preds = %._crit_edge.us.us.us, %.lr.ph56.us.us
  %41 = phi ptr [ %46, %._crit_edge.us.us.us ], [ %.pre90, %.lr.ph56.us.us ]
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %._crit_edge.us.us.us ], [ 0, %.lr.ph56.us.us ]
  %42 = tail call noalias ptr @malloc(i64 noundef %36) #4
  %43 = getelementptr inbounds ptr, ptr %41, i64 %indvars.iv80
  store ptr %42, ptr %43, align 8, !tbaa !19
  %44 = load ptr, ptr %2, align 8, !tbaa !18
  %45 = getelementptr inbounds ptr, ptr %44, i64 %indvars.iv85
  %46 = load ptr, ptr %45, align 8, !tbaa !19
  %47 = getelementptr inbounds ptr, ptr %46, i64 %indvars.iv80
  %48 = load ptr, ptr %47, align 8, !tbaa !19
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.lr.ph.us.us.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph.us.us.us ]
  %49 = getelementptr inbounds float, ptr %48, i64 %index
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  store <4 x float> <float 0xBF50624DE0000000, float 0xBF50624DE0000000, float 0xBF50624DE0000000, float 0xBF50624DE0000000>, ptr %49, align 4, !tbaa !10
  store <4 x float> <float 0xBF50624DE0000000, float 0xBF50624DE0000000, float 0xBF50624DE0000000, float 0xBF50624DE0000000>, ptr %50, align 4, !tbaa !10
  %index.next = add nuw i64 %index, 8
  %51 = icmp eq i64 %index.next, %n.vec
  br i1 %51, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us.us.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph.us.us.us
  %indvars.iv75.ph = phi i64 [ 0, %.lr.ph.us.us.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %scalar.ph ], [ %indvars.iv75.ph, %scalar.ph.preheader ]
  %52 = getelementptr inbounds float, ptr %48, i64 %indvars.iv75
  store float 0xBF50624DE0000000, ptr %52, align 4, !tbaa !10
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count78
  br i1 %exitcond79.not, label %._crit_edge.us.us.us, label %scalar.ph, !llvm.loop !24

._crit_edge.us.us.us:                             ; preds = %scalar.ph, %middle.block
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83
  br i1 %exitcond84.not, label %._crit_edge57.split.us.us.us, label %.lr.ph.us.us.us, !llvm.loop !25

._crit_edge57.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count88
  br i1 %exitcond89.not, label %._crit_edge, label %.lr.ph56.us.us, !llvm.loop !26

.lr.ph56.us:                                      ; preds = %.lr.ph.split.us, %._crit_edge57.split.us60
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %._crit_edge57.split.us60 ], [ 0, %.lr.ph.split.us ]
  %53 = tail call noalias ptr @malloc(i64 noundef %33) #4
  %54 = load ptr, ptr %2, align 8, !tbaa !18
  %55 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv70
  store ptr %53, ptr %55, align 8, !tbaa !19
  br label %56

56:                                               ; preds = %.lr.ph56.us, %56
  %indvars.iv65 = phi i64 [ 0, %.lr.ph56.us ], [ %indvars.iv.next66, %56 ]
  %57 = tail call noalias ptr @malloc(i64 noundef %36) #4
  %58 = load ptr, ptr %2, align 8, !tbaa !18
  %59 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv70
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = getelementptr inbounds ptr, ptr %60, i64 %indvars.iv65
  store ptr %57, ptr %61, align 8, !tbaa !19
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count83
  br i1 %exitcond69.not, label %._crit_edge57.split.us60, label %56, !llvm.loop !25

._crit_edge57.split.us60:                         ; preds = %56
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count88
  br i1 %exitcond74.not, label %._crit_edge, label %.lr.ph56.us, !llvm.loop !26

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %.lr.ph.split
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.preheader ], [ %indvars.iv.next, %.lr.ph.split ]
  %62 = tail call noalias ptr @malloc(i64 noundef %33) #4
  %63 = load ptr, ptr %2, align 8, !tbaa !18
  %64 = getelementptr inbounds ptr, ptr %63, i64 %indvars.iv
  store ptr %62, ptr %64, align 8, !tbaa !19
  %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 %._crit_edge, label %.lr.ph.split, !llvm.loop !26

._crit_edge:                                      ; preds = %.lr.ph.split, %._crit_edge57.split.us60, %._crit_edge57.split.us.us.us, %1
  %65 = tail call noalias dereferenceable_or_null(12) ptr @malloc(i64 noundef 12) #4
  %66 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %65, ptr %66, align 8, !tbaa !27
  store <2 x float> %7, ptr %65, align 4, !tbaa !10
  %67 = getelementptr inbounds i8, ptr %65, i64 8
  store float %9, ptr %67, align 4, !tbaa !10
  ret ptr %2
}

declare ptr @my_malloc(i64 noundef) local_unnamed_addr #1

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

declare void @my_free(ptr noundef) local_unnamed_addr #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 20}
!6 = !{!"s_min_max_pocket", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!7, !7, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!13, !7, i64 28}
!13 = !{!"s_grid", !14, i64 0, !14, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !7, i64 28}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"int", !8, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!13, !15, i64 24}
!18 = !{!13, !14, i64 0}
!19 = !{!14, !14, i64 0}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !21, !23, !22}
!25 = distinct !{!25, !21}
!26 = distinct !{!26, !21}
!27 = !{!13, !14, i64 8}


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