; LLVM IR from robotics-upo/Heuristic_path_planners :: include/voro++-0.4.6/src (container_prd)

; 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.voro::particle_record" = type { i32, i32, i32, i32, i32 }
%"class.voro::container_periodic" = type { %"class.voro::container_periodic_base", %"class.voro::voro_compute" }
%"class.voro::container_periodic_base" = type { %"class.voro::unitcell", %"class.voro::voro_base", i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%"class.voro::unitcell" = type { double, double, double, double, double, double, %"class.voro::voronoicell", double, double }
%"class.voro::voronoicell" = type { %"class.voro::voronoicell_base" }
%"class.voro::voronoicell_base" = type { ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, double, double, double, double }
%"class.voro::voro_base" = type { i32, i32, i32, i32, i32, double, double, double, double, double, double, ptr }
%"class.voro::voro_compute" = type { ptr, double, double, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, double, i32, i32, ptr, ptr, ptr, ptr, ptr }

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4voro18container_periodic17find_voronoi_cellEdddRdS1_S1_Ri(ptr noundef nonnull align 8 dereferenceable(544) %0, double noundef %1, double noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %7) #3 align 2 {
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.voro::particle_record", align 4
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store double %1, ptr %11, align 8, !tbaa !9
  store double %2, ptr %12, align 8, !tbaa !9
  store double %3, ptr %13, align 8, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  %28 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 20, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @_ZN4voro23container_periodic_base5remapERiS1_S1_S1_S1_S1_RdS2_S2_S1_(ptr noundef nonnull align 8 dereferenceable(384) %28, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %29 = getelementptr inbounds %"class.voro::container_periodic", ptr %28, i32 0, i32 1
  %30 = load double, ptr %11, align 8, !tbaa !9
  %31 = load double, ptr %12, align 8, !tbaa !9
  %32 = load double, ptr %13, align 8, !tbaa !9
  %33 = load i32, ptr %21, align 4, !tbaa !11
  %34 = load i32, ptr %22, align 4, !tbaa !11
  %35 = load i32, ptr %23, align 4, !tbaa !11
  %36 = load i32, ptr %24, align 4, !tbaa !11
  call void @_ZN4voro12voro_computeINS_18container_periodicEE17find_voronoi_cellEdddiiiiRNS_15particle_recordERd(ptr noundef nonnull align 8 dereferenceable(160) %29, double noundef %30, double noundef %31, double noundef %32, i32 noundef %33, i32 noundef %34, i32 noundef %35, i32 noundef %36, ptr noundef nonnull align 4 dereferenceable(20) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %37 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %38 = load i32, ptr %37, align 4, !tbaa !13
  %39 = icmp ne i32 %38, -1
  br i1 %39, label %40, label %150

40:                                               ; preds = %8
  %41 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 2
  %42 = load i32, ptr %41, align 4, !tbaa !15
  %43 = load i32, ptr %21, align 4, !tbaa !11
  %44 = add nsw i32 %43, %42
  store i32 %44, ptr %21, align 4, !tbaa !11
  %45 = load i32, ptr %21, align 4, !tbaa !11
  %46 = icmp slt i32 %45, 0
  br i1 %46, label %53, label %47

47:                                               ; preds = %40
  %48 = load i32, ptr %21, align 4, !tbaa !11
  %49 = getelementptr inbounds i8, ptr %28, i64 224
  %50 = getelementptr inbounds %"class.voro::voro_base", ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !16
  %52 = icmp sge i32 %48, %51
  br i1 %52, label %53, label %62

53:                                               ; preds = %47, %40
  %54 = getelementptr inbounds i8, ptr %28, i64 224
  %55 = load i32, ptr %21, align 4, !tbaa !11
  %56 = getelementptr inbounds i8, ptr %28, i64 224
  %57 = getelementptr inbounds %"class.voro::voro_base", ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !16
  %59 = call noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80) %54, i32 noundef %55, i32 noundef %58)
  %60 = load i32, ptr %18, align 4, !tbaa !11
  %61 = add nsw i32 %60, %59
  store i32 %61, ptr %18, align 4, !tbaa !11
  br label %62

62:                                               ; preds = %53, %47
  %63 = getelementptr inbounds %"class.voro::container_periodic_base", ptr %28, i32 0, i32 10
  %64 = load ptr, ptr %63, align 8, !tbaa !18
  %65 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %66 = load i32, ptr %65, align 4, !tbaa !13
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %64, i64 %67
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !23
  %72 = mul nsw i32 3, %71
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %69, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = load i32, ptr %20, align 4, !tbaa !11
  %77 = sitofp i32 %76 to double
  %78 = getelementptr inbounds %"class.voro::unitcell", ptr %28, i32 0, i32 3
  %79 = load double, ptr %78, align 8, !tbaa !24
  %80 = call double @llvm.fmuladd.f64(double %77, double %79, double %75)
  %81 = load i32, ptr %19, align 4, !tbaa !11
  %82 = sitofp i32 %81 to double
  %83 = getelementptr inbounds %"class.voro::unitcell", ptr %28, i32 0, i32 1
  %84 = load double, ptr %83, align 8, !tbaa !25
  %85 = call double @llvm.fmuladd.f64(double %82, double %84, double %80)
  %86 = load i32, ptr %18, align 4, !tbaa !11
  %87 = sitofp i32 %86 to double
  %88 = getelementptr inbounds %"class.voro::unitcell", ptr %28, i32 0, i32 0
  %89 = load double, ptr %88, align 8, !tbaa !26
  %90 = call double @llvm.fmuladd.f64(double %87, double %89, double %85)
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  store double %90, ptr %91, align 8, !tbaa !9
  %92 = getelementptr inbounds %"class.voro::container_periodic_base", ptr %28, i32 0, i32 10
  %93 = load ptr, ptr %92, align 8, !tbaa !18
  %94 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %95 = load i32, ptr %94, align 4, !tbaa !13
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds ptr, ptr %93, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !23
  %101 = mul nsw i32 3, %100
  %102 = add nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds double, ptr %98, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !9
  %106 = load i32, ptr %20, align 4, !tbaa !11
  %107 = sitofp i32 %106 to double
  %108 = getelementptr inbounds %"class.voro::unitcell", ptr %28, i32 0, i32 4
  %109 = load double, ptr %108, align 8, !tbaa !27
  %110 = call double @llvm.fmuladd.f64(double %107, double %109, double %105)
  %111 = load i32, ptr %19, align 4, !tbaa !11
  %112 = sitofp i32 %111 to double
  %113 = getelementptr inbounds %"class.voro::unitcell", ptr %28, i32 0, i32 2
  %114 = load double, ptr %113, align 8, !tbaa !28
  %115 = call double @llvm.fmuladd.f64(double %112, double %114, double %110)
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  store double %115, ptr %116, align 8, !tbaa !9
  %117 = getelementptr inbounds %"class.voro::container_periodic_base", ptr %28, i32 0, i32 10
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  %119 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %120 = load i32, ptr %119, align 4, !tbaa !13
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %118, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !23
  %126 = mul nsw i32 3, %125
  %127 = add nsw i32 %126, 2
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds double, ptr %123, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !9
  %131 = load i32, ptr %20, align 4, !tbaa !11
  %132 = sitofp i32 %131 to double
  %133 = getelementptr inbounds %"class.voro::unitcell", ptr %28, i32 0, i32 5
  %134 = load double, ptr %133, align 8, !tbaa !29
  %135 = call double @llvm.fmuladd.f64(double %132, double %134, double %130)
  %136 = load ptr, ptr %16, align 8, !tbaa !5
  store double %135, ptr %136, align 8, !tbaa !9
  %137 = getelementptr inbounds %"class.voro::container_periodic_base", ptr %28, i32 0, i32 9
  %138 = load ptr, ptr %137, align 8, !tbaa !30
  %139 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %140 = load i32, ptr %139, align 4, !tbaa !13
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds ptr, ptr %138, i64 %141
  %143 = load ptr, ptr %142, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 1
  %145 = load i32, ptr %144, align 4, !tbaa !23
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %143, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !11
  %149 = load ptr, ptr %17, align 8, !tbaa !5
  store i32 %148, ptr %149, align 4, !tbaa !11
  store i1 true, ptr %9, align 1
  store i32 1, ptr %27, align 4
  br label %151

150:                                              ; preds = %8
  store i1 false, ptr %9, align 1
  store i32 1, ptr %27, align 4
  br label %151

151:                                              ; preds = %150, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 20, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %152 = load i1, ptr %9, align 1
  ret i1 %152
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4voro23container_periodic_base5remapERiS1_S1_S1_S1_S1_RdS2_S2_S1_(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

declare void @_ZN4voro12voro_computeINS_18container_periodicEE17find_voronoi_cellEdddiiiiRNS_15particle_recordERd(ptr noundef nonnull align 8 dereferenceable(160), double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(8)) #4

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress 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 = { mustprogress 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 #4 = { "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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN4voro15particle_recordE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16}
!15 = !{!14, !12, i64 8}
!16 = !{!17, !12, i64 0}
!17 = !{!"_ZTSN4voro9voro_baseE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !6, i64 72}
!18 = !{!19, !6, i64 344}
!19 = !{!"_ZTSN4voro23container_periodic_baseE", !20, i64 0, !17, i64 224, !12, i64 304, !12, i64 308, !12, i64 312, !12, i64 316, !12, i64 320, !12, i64 324, !12, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !12, i64 376, !12, i64 380}
!20 = !{!"_ZTSN4voro8unitcellE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !21, i64 48, !10, i64 208, !10, i64 216}
!21 = !{!"_ZTSN4voro11voronoicellE", !22, i64 0}
!22 = !{!"_ZTSN4voro16voronoicell_baseE", !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !12, i64 112, !12, i64 116, !6, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152}
!23 = !{!14, !12, i64 4}
!24 = !{!20, !10, i64 24}
!25 = !{!20, !10, i64 8}
!26 = !{!20, !10, i64 0}
!27 = !{!20, !10, i64 32}
!28 = !{!20, !10, i64 16}
!29 = !{!20, !10, i64 40}
!30 = !{!19, !6, i64 336}


; 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.voro::particle_record" = type { i32, i32, i32, i32, i32 }

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4voro18container_periodic17find_voronoi_cellEdddRdS1_S1_Ri(ptr noundef nonnull align 8 dereferenceable(544) %0, double noundef %1, double noundef %2, double noundef %3, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %4, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %5, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %6, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %7) local_unnamed_addr #3 align 2 {
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.voro::particle_record", align 4
  %20 = alloca double, align 8
  store double %1, ptr %9, align 8, !tbaa !5
  store double %2, ptr %10, align 8, !tbaa !5
  store double %3, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #5
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #5
  call void @_ZN4voro23container_periodic_base5remapERiS1_S1_S1_S1_S1_RdS2_S2_S1_(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %21 = getelementptr inbounds i8, ptr %0, i64 384
  %22 = load double, ptr %9, align 8, !tbaa !5
  %23 = load double, ptr %10, align 8, !tbaa !5
  %24 = load double, ptr %11, align 8, !tbaa !5
  %25 = load i32, ptr %15, align 4, !tbaa !9
  %26 = load i32, ptr %16, align 4, !tbaa !9
  %27 = load i32, ptr %17, align 4, !tbaa !9
  %28 = load i32, ptr %18, align 4, !tbaa !9
  call void @_ZN4voro12voro_computeINS_18container_periodicEE17find_voronoi_cellEdddiiiiRNS_15particle_recordERd(ptr noundef nonnull align 8 dereferenceable(160) %21, double noundef %22, double noundef %23, double noundef %24, i32 noundef %25, i32 noundef %26, i32 noundef %27, i32 noundef %28, ptr noundef nonnull align 4 dereferenceable(20) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %29 = load i32, ptr %19, align 4, !tbaa !11
  %.not = icmp ne i32 %29, -1
  br i1 %.not, label %30, label %89

30:                                               ; preds = %8
  %31 = getelementptr inbounds i8, ptr %19, i64 8
  %32 = load i32, ptr %31, align 4, !tbaa !13
  %33 = load i32, ptr %15, align 4, !tbaa !9
  %34 = add nsw i32 %33, %32
  store i32 %34, ptr %15, align 4, !tbaa !9
  %35 = icmp sgt i32 %34, -1
  %36 = getelementptr inbounds i8, ptr %0, i64 224
  %37 = load i32, ptr %36, align 8
  %.not7 = icmp slt i32 %34, %37
  %or.cond = select i1 %35, i1 %.not7, i1 false
  br i1 %or.cond, label %._crit_edge, label %38

._crit_edge:                                      ; preds = %30
  %.pre9 = load i32, ptr %12, align 4, !tbaa !9
  br label %42

38:                                               ; preds = %30
  %39 = call noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80) %36, i32 noundef %34, i32 noundef %37)
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = add nsw i32 %40, %39
  store i32 %41, ptr %12, align 4, !tbaa !9
  %.pre = load i32, ptr %19, align 4, !tbaa !11
  br label %42

42:                                               ; preds = %._crit_edge, %38
  %43 = phi i32 [ %.pre9, %._crit_edge ], [ %41, %38 ]
  %44 = phi i32 [ %29, %._crit_edge ], [ %.pre, %38 ]
  %45 = getelementptr inbounds i8, ptr %0, i64 344
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = sext i32 %44 to i64
  %48 = getelementptr inbounds ptr, ptr %46, i64 %47
  %49 = load ptr, ptr %48, align 8, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %19, i64 4
  %51 = load i32, ptr %50, align 4, !tbaa !22
  %52 = mul nsw i32 %51, 3
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %49, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = sitofp i32 %56 to double
  %58 = getelementptr inbounds i8, ptr %0, i64 24
  %59 = load double, ptr %58, align 8, !tbaa !23
  %60 = call double @llvm.fmuladd.f64(double %57, double %59, double %55)
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = sitofp i32 %61 to double
  %63 = getelementptr inbounds i8, ptr %0, i64 8
  %64 = load double, ptr %63, align 8, !tbaa !24
  %65 = call double @llvm.fmuladd.f64(double %62, double %64, double %60)
  %66 = sitofp i32 %43 to double
  %67 = load double, ptr %0, align 8, !tbaa !25
  %68 = call double @llvm.fmuladd.f64(double %66, double %67, double %65)
  store double %68, ptr %4, align 8, !tbaa !5
  %69 = getelementptr i8, ptr %54, i64 8
  %70 = load double, ptr %69, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %0, i64 32
  %72 = load double, ptr %71, align 8, !tbaa !26
  %73 = call double @llvm.fmuladd.f64(double %57, double %72, double %70)
  %74 = getelementptr inbounds i8, ptr %0, i64 16
  %75 = load double, ptr %74, align 8, !tbaa !27
  %76 = call double @llvm.fmuladd.f64(double %62, double %75, double %73)
  store double %76, ptr %5, align 8, !tbaa !5
  %77 = getelementptr i8, ptr %54, i64 16
  %78 = load double, ptr %77, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %0, i64 40
  %80 = load double, ptr %79, align 8, !tbaa !28
  %81 = call double @llvm.fmuladd.f64(double %57, double %80, double %78)
  store double %81, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %0, i64 336
  %83 = load ptr, ptr %82, align 8, !tbaa !29
  %84 = getelementptr inbounds ptr, ptr %83, i64 %47
  %85 = load ptr, ptr %84, align 8, !tbaa !21
  %86 = sext i32 %51 to i64
  %87 = getelementptr inbounds i32, ptr %85, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !9
  store i32 %88, ptr %7, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %8, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  ret i1 %.not
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4voro23container_periodic_base5remapERiS1_S1_S1_S1_S1_RdS2_S2_S1_(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

declare void @_ZN4voro12voro_computeINS_18container_periodicEE17find_voronoi_cellEdddiiiiRNS_15particle_recordERd(ptr noundef nonnull align 8 dereferenceable(160), double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress 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 = { mustprogress 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 #4 = { "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 #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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN4voro15particle_recordE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !19, i64 344}
!15 = !{!"_ZTSN4voro23container_periodic_baseE", !16, i64 0, !20, i64 224, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !10, i64 328, !19, i64 336, !19, i64 344, !19, i64 352, !19, i64 360, !19, i64 368, !10, i64 376, !10, i64 380}
!16 = !{!"_ZTSN4voro8unitcellE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !17, i64 48, !6, i64 208, !6, i64 216}
!17 = !{!"_ZTSN4voro11voronoicellE", !18, i64 0}
!18 = !{!"_ZTSN4voro16voronoicell_baseE", !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !19, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !19, i64 88, !19, i64 96, !19, i64 104, !10, i64 112, !10, i64 116, !19, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152}
!19 = !{!"any pointer", !7, i64 0}
!20 = !{!"_ZTSN4voro9voro_baseE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !19, i64 72}
!21 = !{!19, !19, i64 0}
!22 = !{!12, !10, i64 4}
!23 = !{!16, !6, i64 24}
!24 = !{!16, !6, i64 8}
!25 = !{!16, !6, i64 0}
!26 = !{!16, !6, i64 32}
!27 = !{!16, !6, i64 16}
!28 = !{!16, !6, i64 40}
!29 = !{!15, !19, i64 336}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass