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

; 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.RNHeap = type <{ ptr, i32, i32, i32, i32, ptr, ptr, ptr, i32, [4 x i8] }>
%struct.R3MeshProperty = type { ptr, [1024 x i8], i32, ptr, double, double, double, double, double, double }

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272)) #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14R3MeshProperty15ResetStatisticsEv(ptr noundef nonnull align 8 dereferenceable(1096)) #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z27VertexPropertyValueCallbackP12R3MeshVertexPv(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14R3MeshProperty12PercentilizeEv(ptr noundef nonnull align 8 dereferenceable(1096) %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.RNHeap, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #5
  call void @_ZN6RNHeapIP12R3MeshVertexEC2EPFdS1_PvEPFPPS1_S1_S3_ES3_i(ptr noundef nonnull align 8 dereferenceable(52) %3, ptr noundef @_Z27VertexPropertyValueCallbackP12R3MeshVertexPv, ptr noundef null, ptr noundef %11, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %40, %1
  %13 = load i32, ptr %4, align 4, !tbaa !9
  %14 = getelementptr inbounds %struct.R3MeshProperty, ptr %11, i32 0, i32 0
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %15)
          to label %17 unwind label %20

17:                                               ; preds = %12
  %18 = icmp slt i32 %13, %16
  br i1 %18, label %24, label %19

19:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %43

20:                                               ; preds = %38, %33, %12
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %5, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %103

24:                                               ; preds = %17
  %25 = getelementptr inbounds %struct.R3MeshProperty, ptr %11, i32 0, i32 3
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  %27 = load i32, ptr %4, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds double, ptr %26, i64 %28
  %30 = load double, ptr %29, align 8, !tbaa !15
  %31 = fcmp oeq double %30, -1.000000e+00
  br i1 %31, label %32, label %33

32:                                               ; preds = %24
  br label %40

33:                                               ; preds = %24
  %34 = getelementptr inbounds %struct.R3MeshProperty, ptr %11, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = load i32, ptr %4, align 4, !tbaa !9
  %37 = invoke noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %35, i32 noundef %36)
          to label %38 unwind label %20

38:                                               ; preds = %33
  invoke void @_ZN6RNHeapIP12R3MeshVertexE4PushES1_(ptr noundef nonnull align 8 dereferenceable(52) %3, ptr noundef %37)
          to label %39 unwind label %20

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39, %32
  %41 = load i32, ptr %4, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %4, align 4, !tbaa !9
  br label %12, !llvm.loop !16

43:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %83, %43
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = getelementptr inbounds %struct.R3MeshProperty, ptr %11, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %47)
          to label %49 unwind label %52

49:                                               ; preds = %44
  %50 = icmp slt i32 %45, %48
  br i1 %50, label %56, label %51

51:                                               ; preds = %49
  store i32 5, ptr %8, align 4
  br label %95

52:                                               ; preds = %56, %44
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %5, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %6, align 4
  br label %96

56:                                               ; preds = %49
  %57 = invoke noundef i32 @_ZNK6RNHeapIP12R3MeshVertexE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(52) %3)
          to label %58 unwind label %52

58:                                               ; preds = %56
  %59 = icmp ne i32 %57, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %58
  store i32 5, ptr %8, align 4
  br label %95

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %62 = invoke noundef ptr @_ZN6RNHeapIP12R3MeshVertexE3PopEv(ptr noundef nonnull align 8 dereferenceable(52) %3)
          to label %63 unwind label %86

63:                                               ; preds = %61
  store ptr %62, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %64 = getelementptr inbounds %struct.R3MeshProperty, ptr %11, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %65, ptr noundef %66)
          to label %68 unwind label %90

68:                                               ; preds = %63
  store i32 %67, ptr %10, align 4, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = sitofp i32 %69 to double
  %71 = fmul double 1.000000e+02, %70
  %72 = getelementptr inbounds %struct.R3MeshProperty, ptr %11, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %73)
          to label %75 unwind label %90

75:                                               ; preds = %68
  %76 = sitofp i32 %74 to double
  %77 = fdiv double %71, %76
  %78 = getelementptr inbounds %struct.R3MeshProperty, ptr %11, i32 0, i32 3
  %79 = load ptr, ptr %78, align 8, !tbaa !14
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  store double %77, ptr %82, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %83

83:                                               ; preds = %75
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !9
  br label %44, !llvm.loop !18

86:                                               ; preds = %61
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %5, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %6, align 4
  br label %94

90:                                               ; preds = %68, %63
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %5, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %94

94:                                               ; preds = %90, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %96

95:                                               ; preds = %60, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %97

96:                                               ; preds = %94, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %103

97:                                               ; preds = %95
  invoke void @_ZN14R3MeshProperty15ResetStatisticsEv(ptr noundef nonnull align 8 dereferenceable(1096) %11)
          to label %98 unwind label %99

98:                                               ; preds = %97
  call void @_ZN6RNHeapIP12R3MeshVertexED2Ev(ptr noundef nonnull align 8 dereferenceable(52) %3) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #5
  ret void

99:                                               ; preds = %97
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %5, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %6, align 4
  br label %103

103:                                              ; preds = %99, %96, %20
  call void @_ZN6RNHeapIP12R3MeshVertexED2Ev(ptr noundef nonnull align 8 dereferenceable(52) %3) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #5
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %5, align 8
  %106 = load i32, ptr %6, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6RNHeapIP12R3MeshVertexEC2EPFdS1_PvEPFPPS1_S1_S3_ES3_i(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef, ptr noundef, ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6RNHeapIP12R3MeshVertexE4PushES1_(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6RNHeapIP12R3MeshVertexE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(52)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6RNHeapIP12R3MeshVertexE3PopEv(ptr noundef nonnull align 8 dereferenceable(52)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6RNHeapIP12R3MeshVertexED2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 #5 = { 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, !6, i64 0}
!12 = !{!"_ZTS14R3MeshProperty", !6, i64 0, !7, i64 8, !10, i64 1032, !6, i64 1040, !13, i64 1048, !13, i64 1056, !13, i64 1064, !13, i64 1072, !13, i64 1080, !13, i64 1088}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !6, i64 1040}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


; 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.RNHeap = type <{ ptr, i32, i32, i32, i32, ptr, ptr, ptr, i32, [4 x i8] }>

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14R3MeshProperty15ResetStatisticsEv(ptr noundef nonnull align 8 dereferenceable(1096)) local_unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z27VertexPropertyValueCallbackP12R3MeshVertexPv(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14R3MeshProperty12PercentilizeEv(ptr noundef nonnull align 8 dereferenceable(1096) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.RNHeap, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #5
  call void @_ZN6RNHeapIP12R3MeshVertexEC2EPFdS1_PvEPFPPS1_S1_S3_ES3_i(ptr noundef nonnull align 8 dereferenceable(52) %2, ptr noundef nonnull @_Z27VertexPropertyValueCallbackP12R3MeshVertexPv, ptr noundef null, ptr noundef nonnull %0, i32 noundef 1)
  %3 = getelementptr inbounds i8, ptr %0, i64 1040
  br label %4

4:                                                ; preds = %22, %1
  %indvars.iv = phi i64 [ %indvars.iv.next, %22 ], [ 0, %1 ]
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %5)
          to label %7 unwind label %10

7:                                                ; preds = %4
  %8 = sext i32 %6 to i64
  %9 = icmp slt i64 %indvars.iv, %8
  br i1 %9, label %12, label %.preheader

10:                                               ; preds = %21, %17, %4
  %11 = landingpad { ptr, i32 }
          cleanup
  br label %52

12:                                               ; preds = %7
  %13 = load ptr, ptr %3, align 8, !tbaa !12
  %14 = getelementptr inbounds double, ptr %13, i64 %indvars.iv
  %15 = load double, ptr %14, align 8, !tbaa !13
  %16 = fcmp oeq double %15, -1.000000e+00
  br i1 %16, label %22, label %17

17:                                               ; preds = %12
  %18 = load ptr, ptr %0, align 8, !tbaa !5
  %19 = trunc nuw nsw i64 %indvars.iv to i32
  %20 = invoke noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %18, i32 noundef %19)
          to label %21 unwind label %10

21:                                               ; preds = %17
  invoke void @_ZN6RNHeapIP12R3MeshVertexE4PushES1_(ptr noundef nonnull align 8 dereferenceable(52) %2, ptr noundef %20)
          to label %22 unwind label %10

22:                                               ; preds = %21, %12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br label %4, !llvm.loop !14

.preheader:                                       ; preds = %7, %38
  %.012 = phi i32 [ %46, %38 ], [ 0, %7 ]
  %23 = load ptr, ptr %0, align 8, !tbaa !5
  %24 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %23)
          to label %25 unwind label %27

25:                                               ; preds = %.preheader
  %26 = icmp slt i32 %.012, %24
  br i1 %26, label %29, label %51

27:                                               ; preds = %.preheader
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %52

29:                                               ; preds = %25
  %30 = call noundef i32 @_ZNK6RNHeapIP12R3MeshVertexE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(52) %2)
  %.not = icmp eq i32 %30, 0
  br i1 %.not, label %31, label %51

31:                                               ; preds = %29
  %32 = invoke noundef ptr @_ZN6RNHeapIP12R3MeshVertexE3PopEv(ptr noundef nonnull align 8 dereferenceable(52) %2)
          to label %33 unwind label %47

33:                                               ; preds = %31
  %34 = load ptr, ptr %0, align 8, !tbaa !5
  %35 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %34, ptr noundef %32)
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %36)
          to label %38 unwind label %49

38:                                               ; preds = %33
  %39 = uitofp nneg i32 %.012 to double
  %40 = fmul double %39, 1.000000e+02
  %41 = sitofp i32 %37 to double
  %42 = fdiv double %40, %41
  %43 = load ptr, ptr %3, align 8, !tbaa !12
  %44 = sext i32 %35 to i64
  %45 = getelementptr inbounds double, ptr %43, i64 %44
  store double %42, ptr %45, align 8, !tbaa !13
  %46 = add nuw nsw i32 %.012, 1
  br label %.preheader, !llvm.loop !16

47:                                               ; preds = %31
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %52

49:                                               ; preds = %33
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %52

51:                                               ; preds = %29, %25
  call void @_ZN14R3MeshProperty15ResetStatisticsEv(ptr noundef nonnull align 8 dereferenceable(1096) %0)
  call void @_ZN6RNHeapIP12R3MeshVertexED2Ev(ptr noundef nonnull align 8 dereferenceable(52) %2) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  ret void

52:                                               ; preds = %27, %49, %47, %10
  %.pn18 = phi { ptr, i32 } [ %11, %10 ], [ %28, %27 ], [ %50, %49 ], [ %48, %47 ]
  call void @_ZN6RNHeapIP12R3MeshVertexED2Ev(ptr noundef nonnull align 8 dereferenceable(52) %2) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn18
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6RNHeapIP12R3MeshVertexEC2EPFdS1_PvEPFPPS1_S1_S3_ES3_i(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef, ptr noundef, ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6RNHeapIP12R3MeshVertexE4PushES1_(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6RNHeapIP12R3MeshVertexE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6RNHeapIP12R3MeshVertexE3PopEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6RNHeapIP12R3MeshVertexED2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 #5 = { 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, !7, i64 0}
!6 = !{!"_ZTS14R3MeshProperty", !7, i64 0, !8, i64 8, !10, i64 1032, !7, i64 1040, !11, i64 1048, !11, i64 1056, !11, i64 1064, !11, i64 1072, !11, i64 1080, !11, i64 1088}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !7, i64 1040}
!13 = !{!11, !11, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass