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

; 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::voronoicell_neighbor" = type { %"class.voro::voronoicell_base", ptr, ptr, ptr, ptr }
%"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 }

; 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 nounwind uwtable
declare dso_local void @_ZN4voro16voronoicell_base20init_octahedron_baseEd(ptr noundef nonnull align 8 dereferenceable(160), double noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4voro20voronoicell_neighbor15init_octahedronEd(ptr noundef nonnull align 8 dereferenceable(192) %0, double noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %6 = load ptr, ptr %3, align 8
  %7 = load double, ptr %4, align 8, !tbaa !9
  call void @_ZN4voro16voronoicell_base20init_octahedron_baseEd(ptr noundef nonnull align 8 dereferenceable(160) %6, double noundef %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  %8 = getelementptr inbounds %"class.voro::voronoicell_neighbor", ptr %6, i32 0, i32 1
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = getelementptr inbounds ptr, ptr %9, i64 4
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %11, ptr %5, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 -5, ptr %12, align 4, !tbaa !15
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds i32, ptr %13, i64 1
  store i32 -6, ptr %14, align 4, !tbaa !15
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds i32, ptr %15, i64 2
  store i32 -7, ptr %16, align 4, !tbaa !15
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds i32, ptr %17, i64 3
  store i32 -8, ptr %18, align 4, !tbaa !15
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds i32, ptr %19, i64 4
  store i32 -1, ptr %20, align 4, !tbaa !15
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds i32, ptr %21, i64 5
  store i32 -2, ptr %22, align 4, !tbaa !15
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds i32, ptr %23, i64 6
  store i32 -3, ptr %24, align 4, !tbaa !15
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds i32, ptr %25, i64 7
  store i32 -4, ptr %26, align 4, !tbaa !15
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds i32, ptr %27, i64 8
  store i32 -6, ptr %28, align 4, !tbaa !15
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds i32, ptr %29, i64 9
  store i32 -5, ptr %30, align 4, !tbaa !15
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds i32, ptr %31, i64 10
  store i32 -2, ptr %32, align 4, !tbaa !15
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds i32, ptr %33, i64 11
  store i32 -1, ptr %34, align 4, !tbaa !15
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds i32, ptr %35, i64 12
  store i32 -8, ptr %36, align 4, !tbaa !15
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds i32, ptr %37, i64 13
  store i32 -7, ptr %38, align 4, !tbaa !15
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds i32, ptr %39, i64 14
  store i32 -4, ptr %40, align 4, !tbaa !15
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds i32, ptr %41, i64 15
  store i32 -3, ptr %42, align 4, !tbaa !15
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds i32, ptr %43, i64 16
  store i32 -5, ptr %44, align 4, !tbaa !15
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds i32, ptr %45, i64 17
  store i32 -8, ptr %46, align 4, !tbaa !15
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds i32, ptr %47, i64 18
  store i32 -3, ptr %48, align 4, !tbaa !15
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds i32, ptr %49, i64 19
  store i32 -2, ptr %50, align 4, !tbaa !15
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds i32, ptr %51, i64 20
  store i32 -7, ptr %52, align 4, !tbaa !15
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds i32, ptr %53, i64 21
  store i32 -6, ptr %54, align 4, !tbaa !15
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds i32, ptr %55, i64 22
  store i32 -1, ptr %56, align 4, !tbaa !15
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds i32, ptr %57, i64 23
  store i32 -4, ptr %58, align 4, !tbaa !15
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.voro::voronoicell_neighbor", ptr %6, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !16
  store ptr %59, ptr %61, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds i32, ptr %62, i64 4
  %64 = getelementptr inbounds %"class.voro::voronoicell_neighbor", ptr %6, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !16
  %66 = getelementptr inbounds ptr, ptr %65, i64 1
  store ptr %63, ptr %66, align 8, !tbaa !5
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds i32, ptr %67, i64 8
  %69 = getelementptr inbounds %"class.voro::voronoicell_neighbor", ptr %6, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = getelementptr inbounds ptr, ptr %70, i64 2
  store ptr %68, ptr %71, align 8, !tbaa !5
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds i32, ptr %72, i64 12
  %74 = getelementptr inbounds %"class.voro::voronoicell_neighbor", ptr %6, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !16
  %76 = getelementptr inbounds ptr, ptr %75, i64 3
  store ptr %73, ptr %76, align 8, !tbaa !5
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds i32, ptr %77, i64 16
  %79 = getelementptr inbounds %"class.voro::voronoicell_neighbor", ptr %6, i32 0, i32 2
  %80 = load ptr, ptr %79, align 8, !tbaa !16
  %81 = getelementptr inbounds ptr, ptr %80, i64 4
  store ptr %78, ptr %81, align 8, !tbaa !5
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds i32, ptr %82, i64 20
  %84 = getelementptr inbounds %"class.voro::voronoicell_neighbor", ptr %6, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = getelementptr inbounds ptr, ptr %85, i64 5
  store ptr %83, ptr %86, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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, !6, i64 160}
!12 = !{!"_ZTSN4voro20voronoicell_neighborE", !13, i64 0, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184}
!13 = !{!"_ZTSN4voro16voronoicell_baseE", !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, 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, !14, i64 112, !14, i64 116, !6, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!12, !6, i64 168}


; 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 nounwind uwtable
declare dso_local void @_ZN4voro16voronoicell_base20init_octahedron_baseEd(ptr noundef nonnull align 8 dereferenceable(160), double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4voro20voronoicell_neighbor15init_octahedronEd(ptr noundef nonnull align 8 dereferenceable(192) %0, double noundef %1) local_unnamed_addr #0 align 2 {
  tail call void @_ZN4voro16voronoicell_base20init_octahedron_baseEd(ptr noundef nonnull align 8 dereferenceable(160) %0, double noundef %1)
  %3 = getelementptr inbounds i8, ptr %0, i64 160
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 32
  %6 = load ptr, ptr %5, align 8, !tbaa !13
  store <4 x i32> <i32 -5, i32 -6, i32 -7, i32 -8>, ptr %6, align 4, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  store <4 x i32> <i32 -1, i32 -2, i32 -3, i32 -4>, ptr %7, align 4, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %6, i64 32
  store <4 x i32> <i32 -6, i32 -5, i32 -2, i32 -1>, ptr %8, align 4, !tbaa !14
  %9 = getelementptr inbounds i8, ptr %6, i64 48
  store <4 x i32> <i32 -8, i32 -7, i32 -4, i32 -3>, ptr %9, align 4, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %6, i64 64
  store <4 x i32> <i32 -5, i32 -8, i32 -3, i32 -2>, ptr %10, align 4, !tbaa !14
  %11 = getelementptr inbounds i8, ptr %6, i64 80
  store <4 x i32> <i32 -7, i32 -6, i32 -1, i32 -4>, ptr %11, align 4, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %0, i64 168
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  store ptr %6, ptr %13, align 8, !tbaa !13
  %14 = load ptr, ptr %12, align 8, !tbaa !15
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  store ptr %7, ptr %15, align 8, !tbaa !13
  %16 = load ptr, ptr %12, align 8, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  store ptr %8, ptr %17, align 8, !tbaa !13
  %18 = load ptr, ptr %12, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %18, i64 24
  store ptr %9, ptr %19, align 8, !tbaa !13
  %20 = load ptr, ptr %12, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %20, i64 32
  store ptr %10, ptr %21, align 8, !tbaa !13
  %22 = load ptr, ptr %12, align 8, !tbaa !15
  %23 = getelementptr inbounds i8, ptr %22, i64 40
  store ptr %11, ptr %23, align 8, !tbaa !13
  ret void
}

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

!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 160}
!6 = !{!"_ZTSN4voro20voronoicell_neighborE", !7, i64 0, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184}
!7 = !{!"_ZTSN4voro16voronoicell_baseE", !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !8, i64 112, !8, i64 116, !11, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"double", !9, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!8, !8, i64 0}
!15 = !{!6, !11, i64 168}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass