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

; 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_mdgrid = type { ptr, ptr, i32, i32, i32, float, i32 }
%struct.s_pdb = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, float, float, float, float, float, float, [83 x i8], [500 x i8], float, float, float, i32, i32 }
%struct.s_atm = type { i32, float, float, float, float, float, float, float, [5 x i8], [7 x i8], [16 x i8], [16 x i8], [3 x i8], [8 x i8], i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, i8, i8, float, float, float, float, i16, ptr, i32 }

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #1

; Function Attrs: nounwind uwtable
define dso_local void @project_grid_on_atoms(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.s_mdgrid, ptr %18, i32 0, i32 5
  %20 = load float, ptr %19, align 4, !tbaa !9
  %21 = fdiv float 2.000000e+00, %20
  store float %21, ptr %17, align 4, !tbaa !13
  store i32 0, ptr %15, align 4, !tbaa !14
  br label %22

22:                                               ; preds = %241, %2
  %23 = load i32, ptr %15, align 4, !tbaa !14
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.s_pdb, ptr %24, i32 0, i32 10
  %26 = load i32, ptr %25, align 4, !tbaa !15
  %27 = icmp slt i32 %23, %26
  br i1 %27, label %28, label %244

28:                                               ; preds = %22
  store float 0.000000e+00, ptr %16, align 4, !tbaa !13
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.s_pdb, ptr %29, i32 0, i32 3
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = load i32, ptr %15, align 4, !tbaa !14
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds ptr, ptr %31, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %35, ptr %5, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.s_atm, ptr %36, i32 0, i32 5
  %38 = load float, ptr %37, align 4, !tbaa !18
  store float %38, ptr %6, align 4, !tbaa !13
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.s_atm, ptr %39, i32 0, i32 6
  %41 = load float, ptr %40, align 8, !tbaa !21
  store float %41, ptr %7, align 4, !tbaa !13
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.s_atm, ptr %42, i32 0, i32 7
  %44 = load float, ptr %43, align 4, !tbaa !22
  store float %44, ptr %8, align 4, !tbaa !13
  %45 = load float, ptr %6, align 4, !tbaa !13
  %46 = fpext float %45 to double
  %47 = fsub double %46, 2.000000e+00
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.s_mdgrid, ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !23
  %51 = getelementptr inbounds float, ptr %50, i64 0
  %52 = load float, ptr %51, align 4, !tbaa !13
  %53 = fpext float %52 to double
  %54 = fsub double %47, %53
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.s_mdgrid, ptr %55, i32 0, i32 5
  %57 = load float, ptr %56, align 4, !tbaa !9
  %58 = fpext float %57 to double
  %59 = fdiv double %54, %58
  %60 = call double @llvm.floor.f64(double %59)
  %61 = fptosi double %60 to i32
  store i32 %61, ptr %9, align 4, !tbaa !14
  %62 = load float, ptr %6, align 4, !tbaa !13
  %63 = fpext float %62 to double
  %64 = fadd double %63, 2.000000e+00
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.s_mdgrid, ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !23
  %68 = getelementptr inbounds float, ptr %67, i64 0
  %69 = load float, ptr %68, align 4, !tbaa !13
  %70 = fpext float %69 to double
  %71 = fsub double %64, %70
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.s_mdgrid, ptr %72, i32 0, i32 5
  %74 = load float, ptr %73, align 4, !tbaa !9
  %75 = fpext float %74 to double
  %76 = fdiv double %71, %75
  %77 = call double @llvm.ceil.f64(double %76)
  %78 = fptosi double %77 to i32
  %79 = sitofp i32 %78 to float
  store float %79, ptr %12, align 4, !tbaa !13
  %80 = load float, ptr %7, align 4, !tbaa !13
  %81 = fpext float %80 to double
  %82 = fadd double %81, 2.000000e+00
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.s_mdgrid, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !23
  %86 = getelementptr inbounds float, ptr %85, i64 1
  %87 = load float, ptr %86, align 4, !tbaa !13
  %88 = fpext float %87 to double
  %89 = fsub double %82, %88
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.s_mdgrid, ptr %90, i32 0, i32 5
  %92 = load float, ptr %91, align 4, !tbaa !9
  %93 = fpext float %92 to double
  %94 = fdiv double %89, %93
  %95 = call double @llvm.ceil.f64(double %94)
  %96 = fptosi double %95 to i32
  %97 = sitofp i32 %96 to float
  store float %97, ptr %13, align 4, !tbaa !13
  %98 = load float, ptr %8, align 4, !tbaa !13
  %99 = fpext float %98 to double
  %100 = fadd double %99, 2.000000e+00
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.s_mdgrid, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !23
  %104 = getelementptr inbounds float, ptr %103, i64 2
  %105 = load float, ptr %104, align 4, !tbaa !13
  %106 = fpext float %105 to double
  %107 = fsub double %100, %106
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.s_mdgrid, ptr %108, i32 0, i32 5
  %110 = load float, ptr %109, align 4, !tbaa !9
  %111 = fpext float %110 to double
  %112 = fdiv double %107, %111
  %113 = call double @llvm.ceil.f64(double %112)
  %114 = fptosi double %113 to i32
  %115 = sitofp i32 %114 to float
  store float %115, ptr %14, align 4, !tbaa !13
  br label %116

116:                                              ; preds = %223, %28
  %117 = load i32, ptr %9, align 4, !tbaa !14
  %118 = sitofp i32 %117 to float
  %119 = load float, ptr %12, align 4, !tbaa !13
  %120 = fcmp ole float %118, %119
  br i1 %120, label %121, label %130

121:                                              ; preds = %116
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.s_mdgrid, ptr %122, i32 0, i32 2
  %124 = load i32, ptr %123, align 8, !tbaa !24
  %125 = load i32, ptr %9, align 4, !tbaa !14
  %126 = icmp sgt i32 %124, %125
  br i1 %126, label %127, label %130

127:                                              ; preds = %121
  %128 = load i32, ptr %9, align 4, !tbaa !14
  %129 = icmp sge i32 %128, 0
  br label %130

130:                                              ; preds = %127, %121, %116
  %131 = phi i1 [ false, %121 ], [ false, %116 ], [ %129, %127 ]
  br i1 %131, label %132, label %226

132:                                              ; preds = %130
  %133 = load float, ptr %7, align 4, !tbaa !13
  %134 = fpext float %133 to double
  %135 = fsub double %134, 2.000000e+00
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.s_mdgrid, ptr %136, i32 0, i32 1
  %138 = load ptr, ptr %137, align 8, !tbaa !23
  %139 = getelementptr inbounds float, ptr %138, i64 1
  %140 = load float, ptr %139, align 4, !tbaa !13
  %141 = fpext float %140 to double
  %142 = fsub double %135, %141
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.s_mdgrid, ptr %143, i32 0, i32 5
  %145 = load float, ptr %144, align 4, !tbaa !9
  %146 = fpext float %145 to double
  %147 = fdiv double %142, %146
  %148 = call double @llvm.floor.f64(double %147)
  %149 = fptosi double %148 to i32
  store i32 %149, ptr %10, align 4, !tbaa !14
  br label %150

150:                                              ; preds = %220, %132
  %151 = load i32, ptr %10, align 4, !tbaa !14
  %152 = sitofp i32 %151 to float
  %153 = load float, ptr %13, align 4, !tbaa !13
  %154 = fcmp ole float %152, %153
  br i1 %154, label %155, label %164

155:                                              ; preds = %150
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.s_mdgrid, ptr %156, i32 0, i32 3
  %158 = load i32, ptr %157, align 4, !tbaa !25
  %159 = load i32, ptr %10, align 4, !tbaa !14
  %160 = icmp sgt i32 %158, %159
  br i1 %160, label %161, label %164

161:                                              ; preds = %155
  %162 = load i32, ptr %10, align 4, !tbaa !14
  %163 = icmp sge i32 %162, 0
  br label %164

164:                                              ; preds = %161, %155, %150
  %165 = phi i1 [ false, %155 ], [ false, %150 ], [ %163, %161 ]
  br i1 %165, label %166, label %223

166:                                              ; preds = %164
  %167 = load float, ptr %8, align 4, !tbaa !13
  %168 = fpext float %167 to double
  %169 = fsub double %168, 2.000000e+00
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.s_mdgrid, ptr %170, i32 0, i32 1
  %172 = load ptr, ptr %171, align 8, !tbaa !23
  %173 = getelementptr inbounds float, ptr %172, i64 2
  %174 = load float, ptr %173, align 4, !tbaa !13
  %175 = fpext float %174 to double
  %176 = fsub double %169, %175
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.s_mdgrid, ptr %177, i32 0, i32 5
  %179 = load float, ptr %178, align 4, !tbaa !9
  %180 = fpext float %179 to double
  %181 = fdiv double %176, %180
  %182 = call double @llvm.floor.f64(double %181)
  %183 = fptosi double %182 to i32
  store i32 %183, ptr %11, align 4, !tbaa !14
  br label %184

184:                                              ; preds = %200, %166
  %185 = load i32, ptr %11, align 4, !tbaa !14
  %186 = sitofp i32 %185 to float
  %187 = load float, ptr %14, align 4, !tbaa !13
  %188 = fcmp ole float %186, %187
  br i1 %188, label %189, label %198

189:                                              ; preds = %184
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.s_mdgrid, ptr %190, i32 0, i32 4
  %192 = load i32, ptr %191, align 8, !tbaa !26
  %193 = load i32, ptr %11, align 4, !tbaa !14
  %194 = icmp sgt i32 %192, %193
  br i1 %194, label %195, label %198

195:                                              ; preds = %189
  %196 = load i32, ptr %11, align 4, !tbaa !14
  %197 = icmp sge i32 %196, 0
  br label %198

198:                                              ; preds = %195, %189, %184
  %199 = phi i1 [ false, %189 ], [ false, %184 ], [ %197, %195 ]
  br i1 %199, label %200, label %220

200:                                              ; preds = %198
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.s_mdgrid, ptr %201, i32 0, i32 0
  %203 = load ptr, ptr %202, align 8, !tbaa !27
  %204 = load i32, ptr %9, align 4, !tbaa !14
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds ptr, ptr %203, i64 %205
  %207 = load ptr, ptr %206, align 8, !tbaa !5
  %208 = load i32, ptr %10, align 4, !tbaa !14
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds ptr, ptr %207, i64 %209
  %211 = load ptr, ptr %210, align 8, !tbaa !5
  %212 = load i32, ptr %11, align 4, !tbaa !14
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds float, ptr %211, i64 %213
  %215 = load float, ptr %214, align 4, !tbaa !13
  %216 = load float, ptr %16, align 4, !tbaa !13
  %217 = fadd float %216, %215
  store float %217, ptr %16, align 4, !tbaa !13
  %218 = load i32, ptr %11, align 4, !tbaa !14
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %11, align 4, !tbaa !14
  br label %184, !llvm.loop !28

220:                                              ; preds = %198
  %221 = load i32, ptr %10, align 4, !tbaa !14
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %10, align 4, !tbaa !14
  br label %150, !llvm.loop !30

223:                                              ; preds = %164
  %224 = load i32, ptr %9, align 4, !tbaa !14
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %9, align 4, !tbaa !14
  br label %116, !llvm.loop !31

226:                                              ; preds = %130
  %227 = load float, ptr %16, align 4, !tbaa !13
  %228 = load float, ptr %17, align 4, !tbaa !13
  %229 = fdiv float %227, %228
  %230 = load ptr, ptr %3, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.s_mdgrid, ptr %230, i32 0, i32 6
  %232 = load i32, ptr %231, align 8, !tbaa !32
  %233 = sitofp i32 %232 to float
  %234 = fdiv float %229, %233
  %235 = fadd float 1.000000e+00, %234
  %236 = fpext float %235 to double
  %237 = call double @log(double noundef %236) #4
  %238 = fptrunc double %237 to float
  %239 = load ptr, ptr %5, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.s_atm, ptr %239, i32 0, i32 24
  store float %238, ptr %240, align 8, !tbaa !33
  br label %241

241:                                              ; preds = %226
  %242 = load i32, ptr %15, align 4, !tbaa !14
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %15, align 4, !tbaa !14
  br label %22, !llvm.loop !34

244:                                              ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  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 8, ptr %5) #4
  ret void
}

; Function Attrs: nounwind
declare double @log(double noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 }

!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, !12, i64 28}
!10 = !{!"s_mdgrid", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 28, !11, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !11, i64 76}
!16 = !{!"s_pdb", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !7, i64 116, !7, i64 199, !12, i64 700, !12, i64 704, !12, i64 708, !11, i64 712, !11, i64 716}
!17 = !{!16, !6, i64 24}
!18 = !{!19, !12, i64 20}
!19 = !{!"s_atm", !11, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !7, i64 32, !7, i64 37, !7, i64 44, !7, i64 60, !7, i64 76, !7, i64 79, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !7, i64 144, !7, i64 145, !12, i64 148, !12, i64 152, !12, i64 156, !12, i64 160, !20, i64 164, !6, i64 168, !11, i64 176}
!20 = !{!"short", !7, i64 0}
!21 = !{!19, !12, i64 24}
!22 = !{!19, !12, i64 28}
!23 = !{!10, !6, i64 8}
!24 = !{!10, !11, i64 16}
!25 = !{!10, !11, i64 20}
!26 = !{!10, !11, i64 24}
!27 = !{!10, !6, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}
!32 = !{!10, !11, i64 32}
!33 = !{!19, !12, i64 128}
!34 = distinct !{!34, !29}


; 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #0

; Function Attrs: nofree nounwind memory(readwrite, inaccessiblemem: write) uwtable
define dso_local void @project_grid_on_atoms(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 28
  %4 = load float, ptr %3, align 4, !tbaa !5
  %5 = fdiv float 2.000000e+00, %4
  %6 = getelementptr inbounds i8, ptr %1, i64 76
  %7 = load i32, ptr %6, align 4, !tbaa !12
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph96, label %._crit_edge

.lr.ph96:                                         ; preds = %2
  %9 = getelementptr inbounds i8, ptr %1, i64 24
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = getelementptr inbounds i8, ptr %0, i64 20
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = getelementptr inbounds i8, ptr %0, i64 32
  br label %15

15:                                               ; preds = %.lr.ph96, %.critedge
  %indvars.iv106 = phi i64 [ 0, %.lr.ph96 ], [ %indvars.iv.next107, %.critedge ]
  %16 = load ptr, ptr %9, align 8, !tbaa !14
  %17 = getelementptr inbounds ptr, ptr %16, i64 %indvars.iv106
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %18, i64 20
  %20 = load float, ptr %19, align 4, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %18, i64 24
  %22 = fpext float %20 to double
  %23 = fadd double %22, -2.000000e+00
  %24 = load ptr, ptr %10, align 8, !tbaa !19
  %25 = load float, ptr %24, align 4, !tbaa !20
  %26 = fpext float %25 to double
  %27 = fsub double %23, %26
  %28 = load float, ptr %3, align 4, !tbaa !5
  %29 = fpext float %28 to double
  %30 = fdiv double %27, %29
  %31 = tail call double @llvm.floor.f64(double %30)
  %32 = fadd double %22, 2.000000e+00
  %33 = fsub double %32, %26
  %34 = fdiv double %33, %29
  %35 = tail call double @llvm.ceil.f64(double %34)
  %36 = getelementptr inbounds i8, ptr %24, i64 4
  %37 = load <2 x float>, ptr %21, align 8, !tbaa !20
  %38 = fpext <2 x float> %37 to <2 x double>
  %39 = extractelement <2 x double> %38, i64 0
  %40 = fadd double %39, 2.000000e+00
  %41 = load <2 x float>, ptr %36, align 4, !tbaa !20
  %42 = fpext <2 x float> %41 to <2 x double>
  %43 = extractelement <2 x double> %42, i64 0
  %44 = fsub double %40, %43
  %45 = fdiv double %44, %29
  %46 = tail call double @llvm.ceil.f64(double %45)
  %47 = fptosi double %46 to i32
  %48 = sitofp i32 %47 to float
  %49 = extractelement <2 x double> %38, i64 1
  %50 = fadd double %49, 2.000000e+00
  %51 = extractelement <2 x double> %42, i64 1
  %52 = fsub double %50, %51
  %53 = fdiv double %52, %29
  %54 = tail call double @llvm.ceil.f64(double %53)
  %55 = fptosi double %54 to i32
  %56 = sitofp i32 %55 to float
  %57 = insertelement <2 x double> poison, double %31, i64 0
  %58 = insertelement <2 x double> %57, double %35, i64 1
  %59 = fptosi <2 x double> %58 to <2 x i32>
  %60 = sitofp <2 x i32> %59 to <2 x float>
  %61 = extractelement <2 x float> %60, i64 0
  %62 = extractelement <2 x float> %60, i64 1
  %63 = fcmp ugt float %61, %62
  br i1 %63, label %.critedge, label %.lr.ph79

.lr.ph79:                                         ; preds = %15
  %64 = load i32, ptr %11, align 8, !tbaa !21
  %65 = fadd <2 x double> %38, <double -2.000000e+00, double -2.000000e+00>
  %66 = fsub <2 x double> %65, %42
  %67 = insertelement <2 x double> poison, double %29, i64 0
  %68 = shufflevector <2 x double> %67, <2 x double> poison, <2 x i32> zeroinitializer
  %69 = fdiv <2 x double> %66, %68
  %70 = tail call <2 x double> @llvm.floor.v2f64(<2 x double> %69)
  %71 = fptosi <2 x double> %70 to <2 x i32>
  %72 = extractelement <2 x i32> %71, i64 0
  %73 = sitofp i32 %72 to float
  %74 = fcmp ugt float %73, %48
  %.fr85 = freeze i1 %74
  br i1 %.fr85, label %.critedge, label %.lr.ph79.split

.lr.ph79.split:                                   ; preds = %.lr.ph79
  %75 = extractelement <2 x i32> %71, i64 1
  %76 = sitofp i32 %75 to float
  %77 = fcmp ugt float %76, %56
  %.fr = freeze i1 %77
  br i1 %.fr, label %.critedge, label %.lr.ph79.split.split.preheader

.lr.ph79.split.split.preheader:                   ; preds = %.lr.ph79.split
  %78 = zext i32 %75 to i64
  %79 = zext i32 %72 to i64
  %80 = extractelement <2 x i32> %59, i64 0
  %81 = zext i32 %80 to i64
  %82 = icmp sgt i32 %80, -1
  %83 = icmp sgt <2 x i32> %71, <i32 -1, i32 -1>
  %84 = extractelement <2 x i1> %83, i64 0
  %85 = extractelement <2 x i1> %83, i64 1
  br label %.lr.ph79.split.split

.lr.ph79.split.split:                             ; preds = %.lr.ph79.split.split.preheader, %.critedge2
  %indvars.iv103 = phi i64 [ %81, %.lr.ph79.split.split.preheader ], [ %indvars.iv.next104, %.critedge2 ]
  %.078 = phi float [ 0.000000e+00, %.lr.ph79.split.split.preheader ], [ %.1.lcssa, %.critedge2 ]
  %86 = trunc nuw i64 %indvars.iv103 to i32
  %87 = icmp sgt i32 %64, %86
  %or.cond = and i1 %82, %87
  br i1 %or.cond, label %.lr.ph72, label %.critedge

.lr.ph72:                                         ; preds = %.lr.ph79.split.split
  %88 = load i32, ptr %12, align 4, !tbaa !22
  br label %89

89:                                               ; preds = %.lr.ph72, %.critedge4
  %indvars.iv100 = phi i64 [ %79, %.lr.ph72 ], [ %indvars.iv.next101, %.critedge4 ]
  %.171 = phi float [ %.078, %.lr.ph72 ], [ %.2.lcssa, %.critedge4 ]
  %90 = trunc nuw i64 %indvars.iv100 to i32
  %91 = icmp sgt i32 %88, %90
  %or.cond7 = and i1 %84, %91
  br i1 %or.cond7, label %.lr.ph, label %.critedge2

.lr.ph:                                           ; preds = %89
  %92 = load i32, ptr %13, align 8, !tbaa !23
  br label %93

93:                                               ; preds = %.lr.ph, %96
  %indvars.iv = phi i64 [ %78, %.lr.ph ], [ %indvars.iv.next, %96 ]
  %.267 = phi float [ %.171, %.lr.ph ], [ %104, %96 ]
  %94 = trunc nuw i64 %indvars.iv to i32
  %95 = icmp sgt i32 %92, %94
  %or.cond9 = and i1 %85, %95
  br i1 %or.cond9, label %96, label %.critedge4

96:                                               ; preds = %93
  %97 = load ptr, ptr %0, align 8, !tbaa !24
  %98 = getelementptr inbounds ptr, ptr %97, i64 %indvars.iv103
  %99 = load ptr, ptr %98, align 8, !tbaa !15
  %100 = getelementptr inbounds ptr, ptr %99, i64 %indvars.iv100
  %101 = load ptr, ptr %100, align 8, !tbaa !15
  %102 = getelementptr inbounds float, ptr %101, i64 %indvars.iv
  %103 = load float, ptr %102, align 4, !tbaa !20
  %104 = fadd float %.267, %103
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %105 = trunc nuw i64 %indvars.iv.next to i32
  %106 = sitofp i32 %105 to float
  %107 = fcmp ugt float %106, %56
  br i1 %107, label %.critedge4, label %93, !llvm.loop !25

.critedge4:                                       ; preds = %96, %93
  %.2.lcssa = phi float [ %.267, %93 ], [ %104, %96 ]
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %108 = trunc nuw i64 %indvars.iv.next101 to i32
  %109 = sitofp i32 %108 to float
  %110 = fcmp ugt float %109, %48
  br i1 %110, label %.critedge2, label %89, !llvm.loop !27

.critedge2:                                       ; preds = %.critedge4, %89
  %.1.lcssa = phi float [ %.171, %89 ], [ %.2.lcssa, %.critedge4 ]
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %111 = trunc nuw i64 %indvars.iv.next104 to i32
  %112 = sitofp i32 %111 to float
  %113 = fcmp ult float %62, %112
  br i1 %113, label %.critedge, label %.lr.ph79.split.split, !llvm.loop !28

.critedge:                                        ; preds = %.critedge2, %.lr.ph79.split.split, %.lr.ph79.split, %.lr.ph79, %15
  %.0.lcssa = phi float [ 0.000000e+00, %15 ], [ 0.000000e+00, %.lr.ph79 ], [ 0.000000e+00, %.lr.ph79.split ], [ %.078, %.lr.ph79.split.split ], [ %.1.lcssa, %.critedge2 ]
  %114 = fdiv float %.0.lcssa, %5
  %115 = load i32, ptr %14, align 8, !tbaa !29
  %116 = sitofp i32 %115 to float
  %117 = fdiv float %114, %116
  %118 = fadd float %117, 1.000000e+00
  %119 = fpext float %118 to double
  %120 = tail call double @log(double noundef %119) #4
  %121 = fptrunc double %120 to float
  %122 = getelementptr inbounds i8, ptr %18, i64 128
  store float %121, ptr %122, align 8, !tbaa !30
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %123 = load i32, ptr %6, align 4, !tbaa !12
  %124 = sext i32 %123 to i64
  %125 = icmp slt i64 %indvars.iv.next107, %124
  br i1 %125, label %15, label %._crit_edge, !llvm.loop !31

._crit_edge:                                      ; preds = %.critedge, %2
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.floor.v2f64(<2 x double>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nofree nounwind memory(readwrite, inaccessiblemem: write) 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 nofree nounwind willreturn memory(write) "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 nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !11, i64 28}
!6 = !{!"s_mdgrid", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !11, i64 28, !10, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!13, !10, i64 76}
!13 = !{!"s_pdb", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !8, i64 116, !8, i64 199, !11, i64 700, !11, i64 704, !11, i64 708, !10, i64 712, !10, i64 716}
!14 = !{!13, !7, i64 24}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !11, i64 20}
!17 = !{!"s_atm", !10, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !8, i64 32, !8, i64 37, !8, i64 44, !8, i64 60, !8, i64 76, !8, i64 79, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !8, i64 144, !8, i64 145, !11, i64 148, !11, i64 152, !11, i64 156, !11, i64 160, !18, i64 164, !7, i64 168, !10, i64 176}
!18 = !{!"short", !8, i64 0}
!19 = !{!6, !7, i64 8}
!20 = !{!11, !11, i64 0}
!21 = !{!6, !10, i64 16}
!22 = !{!6, !10, i64 20}
!23 = !{!6, !10, i64 24}
!24 = !{!6, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = !{!6, !10, i64 32}
!30 = !{!17, !11, i64 128}
!31 = distinct !{!31, !26}


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