; LLVM IR from robotics-upo/Heuristic_path_planners :: include/voro++-0.4.6/src/c_loops.ll (ZN4voro13c_loop_subset9setup_boxEddddddb)

; 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::c_loop_subset" = type { %"class.voro::c_loop_base.base", i32, double, double, double, double, double, double, double, double, double, i8, i8, i8, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.voro::c_loop_base.base" = type <{ i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32 }>

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304), double noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4voro13c_loop_subset12setup_commonEv(ptr noundef nonnull align 8 dereferenceable(304)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4voro13c_loop_subset9setup_boxEddddddb(ptr noundef nonnull align 8 dereferenceable(304) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6, i1 noundef zeroext %7) #1 align 2 {
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i8, align 1
  store ptr %0, ptr %9, align 8, !tbaa !5
  store double %1, ptr %10, align 8, !tbaa !9
  store double %2, ptr %11, align 8, !tbaa !9
  store double %3, ptr %12, align 8, !tbaa !9
  store double %4, ptr %13, align 8, !tbaa !9
  store double %5, ptr %14, align 8, !tbaa !9
  store double %6, ptr %15, align 8, !tbaa !9
  %17 = zext i1 %7 to i8
  store i8 %17, ptr %16, align 1, !tbaa !11
  %18 = load ptr, ptr %9, align 8
  %19 = load i8, ptr %16, align 1, !tbaa !11, !range !13, !noundef !14
  %20 = trunc i8 %19 to i1
  br i1 %20, label %21, label %35

21:                                               ; preds = %8
  %22 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 1
  store i32 1, ptr %22, align 4, !tbaa !15
  %23 = load double, ptr %10, align 8, !tbaa !9
  %24 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 20
  store double %23, ptr %24, align 8, !tbaa !20
  %25 = load double, ptr %11, align 8, !tbaa !9
  %26 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 21
  store double %25, ptr %26, align 8, !tbaa !21
  %27 = load double, ptr %12, align 8, !tbaa !9
  %28 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 22
  store double %27, ptr %28, align 8, !tbaa !22
  %29 = load double, ptr %13, align 8, !tbaa !9
  %30 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 23
  store double %29, ptr %30, align 8, !tbaa !23
  %31 = load double, ptr %14, align 8, !tbaa !9
  %32 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 24
  store double %31, ptr %32, align 8, !tbaa !24
  %33 = load double, ptr %15, align 8, !tbaa !9
  %34 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 25
  store double %33, ptr %34, align 8, !tbaa !25
  br label %37

35:                                               ; preds = %8
  %36 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 1
  store i32 2, ptr %36, align 4, !tbaa !15
  br label %37

37:                                               ; preds = %35, %21
  %38 = load double, ptr %10, align 8, !tbaa !9
  %39 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 2
  %40 = load double, ptr %39, align 8, !tbaa !26
  %41 = fsub double %38, %40
  %42 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 8
  %43 = load double, ptr %42, align 8, !tbaa !27
  %44 = fmul double %41, %43
  %45 = call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %18, double noundef %44)
  %46 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 26
  store i32 %45, ptr %46, align 8, !tbaa !28
  %47 = load double, ptr %11, align 8, !tbaa !9
  %48 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 2
  %49 = load double, ptr %48, align 8, !tbaa !26
  %50 = fsub double %47, %49
  %51 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 8
  %52 = load double, ptr %51, align 8, !tbaa !27
  %53 = fmul double %50, %52
  %54 = call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %18, double noundef %53)
  %55 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 27
  store i32 %54, ptr %55, align 4, !tbaa !29
  %56 = load double, ptr %12, align 8, !tbaa !9
  %57 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 3
  %58 = load double, ptr %57, align 8, !tbaa !30
  %59 = fsub double %56, %58
  %60 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 9
  %61 = load double, ptr %60, align 8, !tbaa !31
  %62 = fmul double %59, %61
  %63 = call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %18, double noundef %62)
  %64 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 28
  store i32 %63, ptr %64, align 8, !tbaa !32
  %65 = load double, ptr %13, align 8, !tbaa !9
  %66 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 3
  %67 = load double, ptr %66, align 8, !tbaa !30
  %68 = fsub double %65, %67
  %69 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 9
  %70 = load double, ptr %69, align 8, !tbaa !31
  %71 = fmul double %68, %70
  %72 = call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %18, double noundef %71)
  %73 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 29
  store i32 %72, ptr %73, align 4, !tbaa !33
  %74 = load double, ptr %14, align 8, !tbaa !9
  %75 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 4
  %76 = load double, ptr %75, align 8, !tbaa !34
  %77 = fsub double %74, %76
  %78 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 10
  %79 = load double, ptr %78, align 8, !tbaa !35
  %80 = fmul double %77, %79
  %81 = call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %18, double noundef %80)
  %82 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 30
  store i32 %81, ptr %82, align 8, !tbaa !36
  %83 = load double, ptr %15, align 8, !tbaa !9
  %84 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 4
  %85 = load double, ptr %84, align 8, !tbaa !34
  %86 = fsub double %83, %85
  %87 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 10
  %88 = load double, ptr %87, align 8, !tbaa !35
  %89 = fmul double %86, %88
  %90 = call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %18, double noundef %89)
  %91 = getelementptr inbounds %"class.voro::c_loop_subset", ptr %18, i32 0, i32 31
  store i32 %90, ptr %91, align 4, !tbaa !37
  call void @_ZN4voro13c_loop_subset12setup_commonEv(ptr noundef nonnull align 8 dereferenceable(304) %18)
  ret void
}

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

!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 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !19, i64 68}
!16 = !{!"_ZTSN4voro13c_loop_subsetE", !17, i64 0, !19, i64 68, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !12, i64 144, !12, i64 145, !12, i64 146, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !18, i64 248, !18, i64 252, !18, i64 256, !18, i64 260, !18, i64 264, !18, i64 268, !18, i64 272, !18, i64 276, !18, i64 280, !18, i64 284, !18, i64 288, !18, i64 292, !18, i64 296, !18, i64 300}
!17 = !{!"_ZTSN4voro11c_loop_baseE", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !18, i64 48, !18, i64 52, !18, i64 56, !18, i64 60, !18, i64 64}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN4voro18c_loop_subset_modeE", !7, i64 0}
!20 = !{!16, !10, i64 200}
!21 = !{!16, !10, i64 208}
!22 = !{!16, !10, i64 216}
!23 = !{!16, !10, i64 224}
!24 = !{!16, !10, i64 232}
!25 = !{!16, !10, i64 240}
!26 = !{!16, !10, i64 72}
!27 = !{!16, !10, i64 120}
!28 = !{!16, !18, i64 248}
!29 = !{!16, !18, i64 252}
!30 = !{!16, !10, i64 80}
!31 = !{!16, !10, i64 128}
!32 = !{!16, !18, i64 256}
!33 = !{!16, !18, i64 260}
!34 = !{!16, !10, i64 88}
!35 = !{!16, !10, i64 136}
!36 = !{!16, !18, i64 264}
!37 = !{!16, !18, i64 268}


; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304), double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4voro13c_loop_subset12setup_commonEv(ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4voro13c_loop_subset9setup_boxEddddddb(ptr noundef nonnull align 8 dereferenceable(304) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6, i1 noundef zeroext %7) local_unnamed_addr #1 align 2 {
  br i1 %7, label %9, label %16

9:                                                ; preds = %8
  %10 = getelementptr inbounds i8, ptr %0, i64 200
  store double %1, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 208
  store double %2, ptr %11, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %0, i64 216
  store double %3, ptr %12, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %0, i64 224
  store double %4, ptr %13, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %0, i64 232
  store double %5, ptr %14, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %0, i64 240
  store double %6, ptr %15, align 8, !tbaa !19
  br label %16

16:                                               ; preds = %8, %9
  %.sink = phi i32 [ 1, %9 ], [ 2, %8 ]
  %17 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %.sink, ptr %17, align 4
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  %19 = load double, ptr %18, align 8, !tbaa !20
  %20 = fsub double %1, %19
  %21 = getelementptr inbounds i8, ptr %0, i64 120
  %22 = load double, ptr %21, align 8, !tbaa !21
  %23 = fmul double %20, %22
  %24 = tail call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %0, double noundef %23)
  %25 = getelementptr inbounds i8, ptr %0, i64 248
  store i32 %24, ptr %25, align 8, !tbaa !22
  %26 = load double, ptr %18, align 8, !tbaa !20
  %27 = fsub double %2, %26
  %28 = load double, ptr %21, align 8, !tbaa !21
  %29 = fmul double %27, %28
  %30 = tail call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %0, double noundef %29)
  %31 = getelementptr inbounds i8, ptr %0, i64 252
  store i32 %30, ptr %31, align 4, !tbaa !23
  %32 = getelementptr inbounds i8, ptr %0, i64 80
  %33 = load double, ptr %32, align 8, !tbaa !24
  %34 = fsub double %3, %33
  %35 = getelementptr inbounds i8, ptr %0, i64 128
  %36 = load double, ptr %35, align 8, !tbaa !25
  %37 = fmul double %34, %36
  %38 = tail call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %0, double noundef %37)
  %39 = getelementptr inbounds i8, ptr %0, i64 256
  store i32 %38, ptr %39, align 8, !tbaa !26
  %40 = load double, ptr %32, align 8, !tbaa !24
  %41 = fsub double %4, %40
  %42 = load double, ptr %35, align 8, !tbaa !25
  %43 = fmul double %41, %42
  %44 = tail call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %0, double noundef %43)
  %45 = getelementptr inbounds i8, ptr %0, i64 260
  store i32 %44, ptr %45, align 4, !tbaa !27
  %46 = getelementptr inbounds i8, ptr %0, i64 88
  %47 = load double, ptr %46, align 8, !tbaa !28
  %48 = fsub double %5, %47
  %49 = getelementptr inbounds i8, ptr %0, i64 136
  %50 = load double, ptr %49, align 8, !tbaa !29
  %51 = fmul double %48, %50
  %52 = tail call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %0, double noundef %51)
  %53 = getelementptr inbounds i8, ptr %0, i64 264
  store i32 %52, ptr %53, align 8, !tbaa !30
  %54 = load double, ptr %46, align 8, !tbaa !28
  %55 = fsub double %6, %54
  %56 = load double, ptr %49, align 8, !tbaa !29
  %57 = fmul double %55, %56
  %58 = tail call noundef i32 @_ZN4voro13c_loop_subset8step_intEd(ptr noundef nonnull align 8 dereferenceable(304) %0, double noundef %57)
  %59 = getelementptr inbounds i8, ptr %0, i64 268
  store i32 %58, ptr %59, align 4, !tbaa !31
  tail call void @_ZN4voro13c_loop_subset12setup_commonEv(ptr noundef nonnull align 8 dereferenceable(304) %0)
  ret void
}

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

!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, !13, i64 200}
!6 = !{!"_ZTSN4voro13c_loop_subsetE", !7, i64 0, !12, i64 68, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !14, i64 144, !14, i64 145, !14, i64 146, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224, !13, i64 232, !13, i64 240, !8, i64 248, !8, i64 252, !8, i64 256, !8, i64 260, !8, i64 264, !8, i64 268, !8, i64 272, !8, i64 276, !8, i64 280, !8, i64 284, !8, i64 288, !8, i64 292, !8, i64 296, !8, i64 300}
!7 = !{!"_ZTSN4voro11c_loop_baseE", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !11, i64 24, !11, i64 32, !11, i64 40, !8, i64 48, !8, i64 52, !8, i64 56, !8, i64 60, !8, i64 64}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN4voro18c_loop_subset_modeE", !9, i64 0}
!13 = !{!"double", !9, i64 0}
!14 = !{!"bool", !9, i64 0}
!15 = !{!6, !13, i64 208}
!16 = !{!6, !13, i64 216}
!17 = !{!6, !13, i64 224}
!18 = !{!6, !13, i64 232}
!19 = !{!6, !13, i64 240}
!20 = !{!6, !13, i64 72}
!21 = !{!6, !13, i64 120}
!22 = !{!6, !8, i64 248}
!23 = !{!6, !8, i64 252}
!24 = !{!6, !13, i64 80}
!25 = !{!6, !13, i64 128}
!26 = !{!6, !8, i64 256}
!27 = !{!6, !8, i64 260}
!28 = !{!6, !13, i64 88}
!29 = !{!6, !13, i64 136}
!30 = !{!6, !8, i64 264}
!31 = !{!6, !8, i64 268}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,SROAPass,TailCallElimPass