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

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

%"class.voro::pre_container_base" = type { double, double, double, double, double, double, i8, i8, i8, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; 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: mustprogress uwtable
define dso_local void @_ZN4voro18pre_container_poly5setupERNS_14container_polyE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(408) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %16 = getelementptr inbounds %"class.voro::pre_container_base", ptr %15, i32 0, i32 11
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  store ptr %17, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %18 = getelementptr inbounds %"class.voro::pre_container_base", ptr %15, i32 0, i32 16
  %19 = load ptr, ptr %18, align 8, !tbaa !14
  store ptr %19, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  br label %20

20:                                               ; preds = %60, %2
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.voro::pre_container_base", ptr %15, i32 0, i32 12
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = icmp ult ptr %21, %23
  br i1 %24, label %25, label %61

25:                                               ; preds = %20
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds ptr, ptr %26, i32 1
  store ptr %27, ptr %5, align 8, !tbaa !5
  %28 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %28, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds i32, ptr %29, i64 1024
  store ptr %30, ptr %7, align 8, !tbaa !5
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = getelementptr inbounds ptr, ptr %31, i32 1
  store ptr %32, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %33, ptr %10, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %38, %25
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = icmp ult ptr %35, %36
  br i1 %37, label %38, label %60

38:                                               ; preds = %34
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds i32, ptr %39, i32 1
  store ptr %40, ptr %6, align 8, !tbaa !5
  %41 = load i32, ptr %39, align 4, !tbaa !16
  store i32 %41, ptr %8, align 4, !tbaa !16
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds double, ptr %42, i32 1
  store ptr %43, ptr %10, align 8, !tbaa !5
  %44 = load double, ptr %42, align 8, !tbaa !17
  store double %44, ptr %11, align 8, !tbaa !17
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds double, ptr %45, i32 1
  store ptr %46, ptr %10, align 8, !tbaa !5
  %47 = load double, ptr %45, align 8, !tbaa !17
  store double %47, ptr %12, align 8, !tbaa !17
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds double, ptr %48, i32 1
  store ptr %49, ptr %10, align 8, !tbaa !5
  %50 = load double, ptr %48, align 8, !tbaa !17
  store double %50, ptr %13, align 8, !tbaa !17
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %51, i32 1
  store ptr %52, ptr %10, align 8, !tbaa !5
  %53 = load double, ptr %51, align 8, !tbaa !17
  store double %53, ptr %14, align 8, !tbaa !17
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load i32, ptr %8, align 4, !tbaa !16
  %56 = load double, ptr %11, align 8, !tbaa !17
  %57 = load double, ptr %12, align 8, !tbaa !17
  %58 = load double, ptr %13, align 8, !tbaa !17
  %59 = load double, ptr %14, align 8, !tbaa !17
  call void @_ZN4voro14container_poly3putEidddd(ptr noundef nonnull align 8 dereferenceable(408) %54, i32 noundef %55, double noundef %56, double noundef %57, double noundef %58, double noundef %59)
  br label %34, !llvm.loop !18

60:                                               ; preds = %34
  br label %20, !llvm.loop !20

61:                                               ; preds = %20
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  store ptr %63, ptr %6, align 8, !tbaa !5
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  store ptr %65, ptr %10, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %71, %61
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.voro::pre_container_base", ptr %15, i32 0, i32 14
  %69 = load ptr, ptr %68, align 8, !tbaa !21
  %70 = icmp ult ptr %67, %69
  br i1 %70, label %71, label %93

71:                                               ; preds = %66
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds i32, ptr %72, i32 1
  store ptr %73, ptr %6, align 8, !tbaa !5
  %74 = load i32, ptr %72, align 4, !tbaa !16
  store i32 %74, ptr %8, align 4, !tbaa !16
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = getelementptr inbounds double, ptr %75, i32 1
  store ptr %76, ptr %10, align 8, !tbaa !5
  %77 = load double, ptr %75, align 8, !tbaa !17
  store double %77, ptr %11, align 8, !tbaa !17
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds double, ptr %78, i32 1
  store ptr %79, ptr %10, align 8, !tbaa !5
  %80 = load double, ptr %78, align 8, !tbaa !17
  store double %80, ptr %12, align 8, !tbaa !17
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds double, ptr %81, i32 1
  store ptr %82, ptr %10, align 8, !tbaa !5
  %83 = load double, ptr %81, align 8, !tbaa !17
  store double %83, ptr %13, align 8, !tbaa !17
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds double, ptr %84, i32 1
  store ptr %85, ptr %10, align 8, !tbaa !5
  %86 = load double, ptr %84, align 8, !tbaa !17
  store double %86, ptr %14, align 8, !tbaa !17
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = load i32, ptr %8, align 4, !tbaa !16
  %89 = load double, ptr %11, align 8, !tbaa !17
  %90 = load double, ptr %12, align 8, !tbaa !17
  %91 = load double, ptr %13, align 8, !tbaa !17
  %92 = load double, ptr %14, align 8, !tbaa !17
  call void @_ZN4voro14container_poly3putEidddd(ptr noundef nonnull align 8 dereferenceable(408) %87, i32 noundef %88, double noundef %89, double noundef %90, double noundef %91, double noundef %92)
  br label %66, !llvm.loop !22

93:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

declare void @_ZN4voro14container_poly3putEidddd(ptr noundef nonnull align 8 dereferenceable(408), i32 noundef, double noundef, double noundef, double noundef, double noundef) #2

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

!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, !6, i64 64}
!10 = !{!"_ZTSN4voro18pre_container_baseE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !12, i64 49, !12, i64 50, !13, i64 52, !13, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!11 = !{!"double", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!10, !6, i64 104}
!15 = !{!10, !6, i64 72}
!16 = !{!13, !13, i64 0}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!10, !6, i64 88}
!22 = distinct !{!22, !19}


; 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 uwtable
define dso_local void @_ZN4voro18pre_container_poly5setupERNS_14container_polyE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(408) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 64
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 104
  %6 = load ptr, ptr %5, align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  %9 = icmp ult ptr %4, %8
  br i1 %9, label %.lr.ph, label %._crit_edge

.loopexit:                                        ; preds = %16
  %10 = getelementptr inbounds i8, ptr %.03237, i64 8
  %11 = getelementptr inbounds i8, ptr %.03138, i64 8
  %12 = load ptr, ptr %7, align 8, !tbaa !14
  %13 = icmp ult ptr %10, %12
  br i1 %13, label %.lr.ph, label %._crit_edge, !llvm.loop !15

.lr.ph:                                           ; preds = %2, %.loopexit
  %.03138 = phi ptr [ %11, %.loopexit ], [ %6, %2 ]
  %.03237 = phi ptr [ %10, %.loopexit ], [ %4, %2 ]
  %14 = load ptr, ptr %.03237, align 8, !tbaa !17
  %15 = load ptr, ptr %.03138, align 8, !tbaa !17
  br label %16

16:                                               ; preds = %.lr.ph, %16
  %.036 = phi ptr [ %15, %.lr.ph ], [ %24, %16 ]
  %.033.idx35 = phi i64 [ 0, %.lr.ph ], [ %.033.add, %16 ]
  %.033.ptr = getelementptr inbounds i8, ptr %14, i64 %.033.idx35
  %.033.add = add nuw nsw i64 %.033.idx35, 4
  %17 = load i32, ptr %.033.ptr, align 4, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %.036, i64 8
  %19 = load double, ptr %.036, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %.036, i64 16
  %21 = load double, ptr %18, align 8, !tbaa !19
  %22 = getelementptr inbounds i8, ptr %.036, i64 24
  %23 = load double, ptr %20, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %.036, i64 32
  %25 = load double, ptr %22, align 8, !tbaa !19
  tail call void @_ZN4voro14container_poly3putEidddd(ptr noundef nonnull align 8 dereferenceable(408) %1, i32 noundef %17, double noundef %19, double noundef %21, double noundef %23, double noundef %25)
  %26 = icmp ult i64 %.033.idx35, 4092
  br i1 %26, label %16, label %.loopexit, !llvm.loop !20

._crit_edge:                                      ; preds = %.loopexit, %2
  %.032.lcssa = phi ptr [ %4, %2 ], [ %10, %.loopexit ]
  %.031.lcssa = phi ptr [ %6, %2 ], [ %11, %.loopexit ]
  %27 = load ptr, ptr %.032.lcssa, align 8, !tbaa !17
  %28 = getelementptr inbounds i8, ptr %0, i64 88
  %29 = load ptr, ptr %28, align 8, !tbaa !21
  %30 = icmp ult ptr %27, %29
  br i1 %30, label %.lr.ph43.preheader, label %._crit_edge44

.lr.ph43.preheader:                               ; preds = %._crit_edge
  %31 = load ptr, ptr %.031.lcssa, align 8, !tbaa !17
  br label %.lr.ph43

.lr.ph43:                                         ; preds = %.lr.ph43.preheader, %.lr.ph43
  %.141 = phi ptr [ %40, %.lr.ph43 ], [ %31, %.lr.ph43.preheader ]
  %.13440 = phi ptr [ %32, %.lr.ph43 ], [ %27, %.lr.ph43.preheader ]
  %32 = getelementptr inbounds i8, ptr %.13440, i64 4
  %33 = load i32, ptr %.13440, align 4, !tbaa !18
  %34 = getelementptr inbounds i8, ptr %.141, i64 8
  %35 = load double, ptr %.141, align 8, !tbaa !19
  %36 = getelementptr inbounds i8, ptr %.141, i64 16
  %37 = load double, ptr %34, align 8, !tbaa !19
  %38 = getelementptr inbounds i8, ptr %.141, i64 24
  %39 = load double, ptr %36, align 8, !tbaa !19
  %40 = getelementptr inbounds i8, ptr %.141, i64 32
  %41 = load double, ptr %38, align 8, !tbaa !19
  tail call void @_ZN4voro14container_poly3putEidddd(ptr noundef nonnull align 8 dereferenceable(408) %1, i32 noundef %33, double noundef %35, double noundef %37, double noundef %39, double noundef %41)
  %42 = load ptr, ptr %28, align 8, !tbaa !21
  %43 = icmp ult ptr %32, %42
  br i1 %43, label %.lr.ph43, label %._crit_edge44, !llvm.loop !22

._crit_edge44:                                    ; preds = %.lr.ph43, %._crit_edge
  ret void
}

declare void @_ZN4voro14container_poly3putEidddd(ptr noundef nonnull align 8 dereferenceable(408), i32 noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1

attributes #0 = { 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 #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" }

!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, !12, i64 64}
!6 = !{!"_ZTSN4voro18pre_container_baseE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !10, i64 49, !10, i64 50, !11, i64 52, !11, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !12, i64 104}
!14 = !{!6, !12, i64 72}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !12, i64 0}
!18 = !{!11, !11, i64 0}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !16}
!21 = !{!6, !12, i64 88}
!22 = distinct !{!22, !16}


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