; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Polyline.ll (ZNK10R3Polyline16VertexDerivativeEi)

; 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.R3Vector = type { [3 x double] }
%class.R3Point = type { [3 x double] }
%class.R3Polyline = type { %class.R3Curve, ptr, ptr, ptr, i32, %class.R3Box }
%class.R3Curve = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }

@R3null_vector = external global %class.R3Vector, align 8
@RN_EPSILON = external global double, align 8
@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1

; 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 @_ZNK10R3Polyline16VertexDerivativeEi(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %2) unnamed_addr #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.R3Vector, align 8
  %10 = alloca %class.R3Point, align 8
  %11 = alloca %class.R3Point, align 8
  %12 = alloca double, align 8
  %13 = alloca %class.R3Vector, align 8
  %14 = alloca %class.R3Point, align 8
  %15 = alloca %class.R3Point, align 8
  %16 = alloca double, align 8
  %17 = alloca %class.R3Vector, align 8
  %18 = alloca %class.R3Point, align 8
  %19 = alloca %class.R3Point, align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %20 = load ptr, ptr %5, align 8
  %21 = getelementptr inbounds %class.R3Polyline, ptr %20, i32 0, i32 4
  %22 = load i32, ptr %21, align 8, !tbaa !11
  %23 = icmp slt i32 %22, 2
  br i1 %23, label %24, label %25

24:                                               ; preds = %3
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) @R3null_vector)
  br label %95

25:                                               ; preds = %3
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %40

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %29 = call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef 1)
  %30 = call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef 0)
  %31 = fsub double %29, %30
  store double %31, ptr %7, align 8, !tbaa !18
  %32 = load double, ptr %7, align 8, !tbaa !18
  %33 = load double, ptr @RN_EPSILON, align 8, !tbaa !18
  %34 = call noundef i32 @_Z8RNIsZerodd(double noundef %32, double noundef %33)
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %28
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) @R3null_vector)
  store i32 1, ptr %8, align 4
  br label %39

37:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #4
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %10, ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %11, ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef 0)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11)
  %38 = load double, ptr %7, align 8, !tbaa !18
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef %38)
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  store i32 1, ptr %8, align 4
  br label %39

39:                                               ; preds = %37, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %95

40:                                               ; preds = %25
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = getelementptr inbounds %class.R3Polyline, ptr %20, i32 0, i32 4
  %43 = load i32, ptr %42, align 8, !tbaa !11
  %44 = sub nsw i32 %43, 1
  %45 = icmp eq i32 %41, %44
  br i1 %45, label %46, label %70

46:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %47 = getelementptr inbounds %class.R3Polyline, ptr %20, i32 0, i32 4
  %48 = load i32, ptr %47, align 8, !tbaa !11
  %49 = sub nsw i32 %48, 1
  %50 = call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef %49)
  %51 = getelementptr inbounds %class.R3Polyline, ptr %20, i32 0, i32 4
  %52 = load i32, ptr %51, align 8, !tbaa !11
  %53 = sub nsw i32 %52, 2
  %54 = call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef %53)
  %55 = fsub double %50, %54
  store double %55, ptr %12, align 8, !tbaa !18
  %56 = load double, ptr %12, align 8, !tbaa !18
  %57 = load double, ptr @RN_EPSILON, align 8, !tbaa !18
  %58 = call noundef i32 @_Z8RNIsZerodd(double noundef %56, double noundef %57)
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %46
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) @R3null_vector)
  store i32 1, ptr %8, align 4
  br label %69

61:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  %62 = getelementptr inbounds %class.R3Polyline, ptr %20, i32 0, i32 4
  %63 = load i32, ptr %62, align 8, !tbaa !11
  %64 = sub nsw i32 %63, 1
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %14, ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef %64)
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  %65 = getelementptr inbounds %class.R3Polyline, ptr %20, i32 0, i32 4
  %66 = load i32, ptr %65, align 8, !tbaa !11
  %67 = sub nsw i32 %66, 2
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef %67)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15)
  %68 = load double, ptr %12, align 8, !tbaa !18
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %13, double noundef %68)
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  store i32 1, ptr %8, align 4
  br label %69

69:                                               ; preds = %61, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %95

70:                                               ; preds = %40
  %71 = getelementptr inbounds %class.R3Polyline, ptr %20, i32 0, i32 4
  %72 = load i32, ptr %71, align 8, !tbaa !11
  %73 = icmp sgt i32 %72, 3
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 170, ptr noundef @.str.2)
  br label %75

75:                                               ; preds = %74, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  %78 = call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef %77)
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = sub nsw i32 %79, 1
  %81 = call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef %80)
  %82 = fsub double %78, %81
  store double %82, ptr %16, align 8, !tbaa !18
  %83 = load double, ptr %16, align 8, !tbaa !18
  %84 = load double, ptr @RN_EPSILON, align 8, !tbaa !18
  %85 = call noundef i32 @_Z8RNIsZerodd(double noundef %83, double noundef %84)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %75
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) @R3null_vector)
  store i32 1, ptr %8, align 4
  br label %94

88:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #4
  %89 = load i32, ptr %6, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %18, ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef %90)
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #4
  %91 = load i32, ptr %6, align 4, !tbaa !9
  %92 = sub nsw i32 %91, 1
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %19, ptr noundef nonnull align 8 dereferenceable(96) %20, i32 noundef %92)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %19)
  %93 = load double, ptr %16, align 8, !tbaa !18
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %17, double noundef %93)
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  store i32 1, ptr %8, align 4
  br label %94

94:                                               ; preds = %88, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %95

95:                                               ; preds = %94, %69, %39, %24
  ret void
}

declare void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8RNIsZerodd(double noundef, double noundef) #3

declare void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #2

declare void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) #3 align 2

declare void @_Z7RNAbortPKcz(ptr 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 = { inlinehint 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"_ZTS10R3Polyline", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !15, i64 40}
!13 = !{!"_ZTS7R3Curve", !14, i64 0}
!14 = !{!"_ZTS7R3Shape"}
!15 = !{!"_ZTS5R3Box", !16, i64 0, !17, i64 8, !17, i64 32}
!16 = !{!"_ZTS7R3Solid", !14, i64 0}
!17 = !{!"_ZTS7R3Point", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}


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

%class.R3Vector = type { [3 x double] }
%class.R3Point = type { [3 x double] }

@R3null_vector = external global %class.R3Vector, align 8
@RN_EPSILON = external local_unnamed_addr global double, align 8
@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1

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

; Function Attrs: mustprogress 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 @_ZNK10R3Polyline16VertexDerivativeEi(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %2) unnamed_addr #1 align 2 {
  %4 = alloca %class.R3Vector, align 8
  %5 = alloca %class.R3Point, align 8
  %6 = alloca %class.R3Point, align 8
  %7 = alloca %class.R3Vector, align 8
  %8 = alloca %class.R3Point, align 8
  %9 = alloca %class.R3Point, align 8
  %10 = alloca %class.R3Vector, align 8
  %11 = alloca %class.R3Point, align 8
  %12 = alloca %class.R3Point, align 8
  %13 = getelementptr inbounds i8, ptr %1, i64 32
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %15 = icmp slt i32 %14, 2
  br i1 %15, label %16, label %17

16:                                               ; preds = %3
  tail call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) @R3null_vector)
  br label %57

17:                                               ; preds = %3
  %18 = icmp eq i32 %2, 0
  br i1 %18, label %19, label %27

19:                                               ; preds = %17
  %20 = tail call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef 1)
  %21 = tail call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef 0)
  %22 = fsub double %20, %21
  %23 = load double, ptr @RN_EPSILON, align 8, !tbaa !16
  %24 = tail call noundef i32 @_Z8RNIsZerodd(double noundef %22, double noundef %23)
  %.not15 = icmp eq i32 %24, 0
  br i1 %.not15, label %26, label %25

25:                                               ; preds = %19
  tail call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) @R3null_vector)
  br label %57

26:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %5, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %6, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef 0)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %4, double noundef %22)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br label %57

27:                                               ; preds = %17
  %28 = add nsw i32 %14, -1
  %29 = icmp eq i32 %28, %2
  br i1 %29, label %30, label %44

30:                                               ; preds = %27
  %31 = tail call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %2)
  %32 = load i32, ptr %13, align 8, !tbaa !5
  %33 = add nsw i32 %32, -2
  %34 = tail call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %33)
  %35 = fsub double %31, %34
  %36 = load double, ptr @RN_EPSILON, align 8, !tbaa !16
  %37 = tail call noundef i32 @_Z8RNIsZerodd(double noundef %35, double noundef %36)
  %.not14 = icmp eq i32 %37, 0
  br i1 %.not14, label %39, label %38

38:                                               ; preds = %30
  tail call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) @R3null_vector)
  br label %57

39:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  %40 = load i32, ptr %13, align 8, !tbaa !5
  %41 = add nsw i32 %40, -1
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %8, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %41)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  %42 = load i32, ptr %13, align 8, !tbaa !5
  %43 = add nsw i32 %42, -2
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %9, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %43)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %7, double noundef %35)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %57

44:                                               ; preds = %27
  %45 = icmp ugt i32 %14, 3
  br i1 %45, label %47, label %46

46:                                               ; preds = %44
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 170, ptr noundef nonnull @.str.2)
  br label %47

47:                                               ; preds = %46, %44
  %48 = add nsw i32 %2, 1
  %49 = tail call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %48)
  %50 = add nsw i32 %2, -1
  %51 = tail call noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %50)
  %52 = fsub double %49, %51
  %53 = load double, ptr @RN_EPSILON, align 8, !tbaa !16
  %54 = tail call noundef i32 @_Z8RNIsZerodd(double noundef %52, double noundef %53)
  %.not = icmp eq i32 %54, 0
  br i1 %.not, label %56, label %55

55:                                               ; preds = %47
  tail call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) @R3null_vector)
  br label %57

56:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %11, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %48)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  call void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %50)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef %52)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  br label %57

57:                                               ; preds = %55, %56, %38, %39, %25, %26, %16
  ret void
}

declare void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK10R3Polyline15VertexParameterEi(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8RNIsZerodd(double noundef, double noundef) local_unnamed_addr #3

declare void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #2

declare void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK10R3Polyline14VertexPositionEi(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) local_unnamed_addr #3 align 2

declare void @_Z7RNAbortPKcz(ptr noundef, ...) local_unnamed_addr #2

attributes #0 = { mustprogress 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 = { inlinehint 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 = { 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, !12, i64 32}
!6 = !{!"_ZTS10R3Polyline", !7, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !12, i64 32, !13, i64 40}
!7 = !{!"_ZTS7R3Curve", !8, i64 0}
!8 = !{!"_ZTS7R3Shape"}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"_ZTS5R3Box", !14, i64 0, !15, i64 8, !15, i64 32}
!14 = !{!"_ZTS7R3Solid", !8, i64 0}
!15 = !{!"_ZTS7R3Point", !10, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass