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

; 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::wall_cylinder" = type { %"class.voro::wall", i32, double, double, double, double, double, double, double, double }
%"class.voro::wall" = type { 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN4voro13wall_cylinder12point_insideEddd(ptr noundef nonnull align 8 dereferenceable(80) %0, double noundef %1, double noundef %2, double noundef %3) unnamed_addr #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  store double %3, ptr %8, align 8, !tbaa !9
  %13 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %14 = load double, ptr %6, align 8, !tbaa !9
  %15 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 2
  %16 = load double, ptr %15, align 8, !tbaa !11
  %17 = fsub double %14, %16
  store double %17, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %18 = load double, ptr %7, align 8, !tbaa !9
  %19 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 3
  %20 = load double, ptr %19, align 8, !tbaa !15
  %21 = fsub double %18, %20
  store double %21, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %22 = load double, ptr %8, align 8, !tbaa !9
  %23 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 4
  %24 = load double, ptr %23, align 8, !tbaa !16
  %25 = fsub double %22, %24
  store double %25, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %26 = load double, ptr %9, align 8, !tbaa !9
  %27 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 5
  %28 = load double, ptr %27, align 8, !tbaa !17
  %29 = load double, ptr %10, align 8, !tbaa !9
  %30 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 6
  %31 = load double, ptr %30, align 8, !tbaa !18
  %32 = fmul double %29, %31
  %33 = call double @llvm.fmuladd.f64(double %26, double %28, double %32)
  %34 = load double, ptr %11, align 8, !tbaa !9
  %35 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 7
  %36 = load double, ptr %35, align 8, !tbaa !19
  %37 = call double @llvm.fmuladd.f64(double %34, double %36, double %33)
  %38 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 8
  %39 = load double, ptr %38, align 8, !tbaa !20
  %40 = fmul double %37, %39
  store double %40, ptr %12, align 8, !tbaa !9
  %41 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 5
  %42 = load double, ptr %41, align 8, !tbaa !17
  %43 = load double, ptr %12, align 8, !tbaa !9
  %44 = load double, ptr %9, align 8, !tbaa !9
  %45 = fneg double %42
  %46 = call double @llvm.fmuladd.f64(double %45, double %43, double %44)
  store double %46, ptr %9, align 8, !tbaa !9
  %47 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 6
  %48 = load double, ptr %47, align 8, !tbaa !18
  %49 = load double, ptr %12, align 8, !tbaa !9
  %50 = load double, ptr %10, align 8, !tbaa !9
  %51 = fneg double %48
  %52 = call double @llvm.fmuladd.f64(double %51, double %49, double %50)
  store double %52, ptr %10, align 8, !tbaa !9
  %53 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 7
  %54 = load double, ptr %53, align 8, !tbaa !19
  %55 = load double, ptr %12, align 8, !tbaa !9
  %56 = load double, ptr %11, align 8, !tbaa !9
  %57 = fneg double %54
  %58 = call double @llvm.fmuladd.f64(double %57, double %55, double %56)
  store double %58, ptr %11, align 8, !tbaa !9
  %59 = load double, ptr %9, align 8, !tbaa !9
  %60 = load double, ptr %9, align 8, !tbaa !9
  %61 = load double, ptr %10, align 8, !tbaa !9
  %62 = load double, ptr %10, align 8, !tbaa !9
  %63 = fmul double %61, %62
  %64 = call double @llvm.fmuladd.f64(double %59, double %60, double %63)
  %65 = load double, ptr %11, align 8, !tbaa !9
  %66 = load double, ptr %11, align 8, !tbaa !9
  %67 = call double @llvm.fmuladd.f64(double %65, double %66, double %64)
  %68 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 9
  %69 = load double, ptr %68, align 8, !tbaa !21
  %70 = getelementptr inbounds %"struct.voro::wall_cylinder", ptr %13, i32 0, i32 9
  %71 = load double, ptr %70, align 8, !tbaa !21
  %72 = fmul double %69, %71
  %73 = fcmp olt double %67, %72
  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
  ret i1 %73
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 = { 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, !10, i64 16}
!12 = !{!"_ZTSN4voro13wall_cylinderE", !13, i64 0, !14, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72}
!13 = !{!"_ZTSN4voro4wallE"}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !10, i64 24}
!16 = !{!12, !10, i64 32}
!17 = !{!12, !10, i64 40}
!18 = !{!12, !10, i64 48}
!19 = !{!12, !10, i64 56}
!20 = !{!12, !10, i64 64}
!21 = !{!12, !10, i64 72}


; 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.fmuladd.f64(double, double, double) #0

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local noundef zeroext i1 @_ZN4voro13wall_cylinder12point_insideEddd(ptr nocapture noundef nonnull readonly align 8 dereferenceable(80) %0, double noundef %1, double noundef %2, double noundef %3) unnamed_addr #1 align 2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load double, ptr %5, align 8, !tbaa !5
  %7 = fsub double %1, %6
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = load double, ptr %8, align 8, !tbaa !12
  %10 = fsub double %2, %9
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  %12 = load double, ptr %11, align 8, !tbaa !13
  %13 = fsub double %3, %12
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = load double, ptr %14, align 8, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = load double, ptr %16, align 8, !tbaa !15
  %18 = fmul double %10, %17
  %19 = tail call double @llvm.fmuladd.f64(double %7, double %15, double %18)
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = load double, ptr %20, align 8, !tbaa !16
  %22 = tail call double @llvm.fmuladd.f64(double %13, double %21, double %19)
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  %24 = load double, ptr %23, align 8, !tbaa !17
  %25 = fmul double %24, %22
  %26 = fneg double %15
  %27 = tail call double @llvm.fmuladd.f64(double %26, double %25, double %7)
  %28 = fneg double %17
  %29 = tail call double @llvm.fmuladd.f64(double %28, double %25, double %10)
  %30 = fneg double %21
  %31 = tail call double @llvm.fmuladd.f64(double %30, double %25, double %13)
  %32 = fmul double %29, %29
  %33 = tail call double @llvm.fmuladd.f64(double %27, double %27, double %32)
  %34 = tail call double @llvm.fmuladd.f64(double %31, double %31, double %33)
  %35 = getelementptr inbounds i8, ptr %0, i64 72
  %36 = load double, ptr %35, align 8, !tbaa !18
  %37 = fmul double %36, %36
  %38 = fcmp olt double %34, %37
  ret i1 %38
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) 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 16}
!6 = !{!"_ZTSN4voro13wall_cylinderE", !7, i64 0, !8, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72}
!7 = !{!"_ZTSN4voro4wallE"}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!6, !11, i64 24}
!13 = !{!6, !11, i64 32}
!14 = !{!6, !11, i64 40}
!15 = !{!6, !11, i64 48}
!16 = !{!6, !11, i64 56}
!17 = !{!6, !11, i64 64}
!18 = !{!6, !11, i64 72}


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