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

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

; 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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK14R3MeshProperty11VertexValueEP12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(1096), ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

declare noundef ptr @_ZNK6R3Mesh17DijkstraDistancesEPK12R3MeshVertexdR7RNArrayIPS0_EPP10R3MeshEdge(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #4 align 2

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14R3MeshProperty5ClearEd(ptr noundef nonnull align 8 dereferenceable(1096), double noundef) #4 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 void @_ZN14R3MeshProperty14SetVertexValueEP12R3MeshVertexd(ptr noundef nonnull align 8 dereferenceable(1096), ptr noundef, double noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14R3MeshProperty6DilateEd(ptr noundef nonnull align 8 dereferenceable(1096) %0, double noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca %struct.R3MeshProperty, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %class.RNArray, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1096, ptr %5) #8
  call void @_ZN14R3MeshPropertyC1ERKS_(ptr noundef nonnull align 8 dereferenceable(1096) %5, ptr noundef nonnull align 8 dereferenceable(1096) %15)
  invoke void @_ZN14R3MeshProperty5ClearEd(ptr noundef nonnull align 8 dereferenceable(1096) %15, double noundef 0.000000e+00)
          to label %16 unwind label %25

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %108, %16
  %18 = load i32, ptr %8, align 4, !tbaa !11
  %19 = getelementptr inbounds %struct.R3MeshProperty, ptr %15, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %20)
          to label %22 unwind label %29

22:                                               ; preds = %17
  %23 = icmp slt i32 %18, %21
  br i1 %23, label %33, label %24

24:                                               ; preds = %22
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %115

25:                                               ; preds = %115, %2
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %6, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %7, align 4
  br label %117

29:                                               ; preds = %39, %33, %17
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %6, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %7, align 4
  br label %114

33:                                               ; preds = %22
  %34 = load i32, ptr %8, align 4, !tbaa !11
  %35 = invoke noundef double @_ZNK14R3MeshProperty11VertexValueEi(ptr noundef nonnull align 8 dereferenceable(1096) %5, i32 noundef %34)
          to label %36 unwind label %29

36:                                               ; preds = %33
  %37 = fcmp oeq double %35, 0.000000e+00
  br i1 %37, label %38, label %39

38:                                               ; preds = %36
  br label %108

39:                                               ; preds = %36
  %40 = load i32, ptr %8, align 4, !tbaa !11
  %41 = invoke noundef double @_ZNK14R3MeshProperty11VertexValueEi(ptr noundef nonnull align 8 dereferenceable(1096) %5, i32 noundef %40)
          to label %42 unwind label %29

42:                                               ; preds = %39
  %43 = fcmp oeq double %41, -1.000000e+00
  br i1 %43, label %44, label %45

44:                                               ; preds = %42
  br label %108

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %46 = getelementptr inbounds %struct.R3MeshProperty, ptr %15, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  %48 = load i32, ptr %8, align 4, !tbaa !11
  %49 = invoke noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %47, i32 noundef %48)
          to label %50 unwind label %68

50:                                               ; preds = %45
  store ptr %49, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  invoke void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %51 unwind label %72

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %52 = getelementptr inbounds %struct.R3MeshProperty, ptr %15, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = load double, ptr %4, align 8, !tbaa !9
  %56 = invoke noundef ptr @_ZNK6R3Mesh17DijkstraDistancesEPK12R3MeshVertexdR7RNArrayIPS0_EPP10R3MeshEdge(ptr noundef nonnull align 8 dereferenceable(272) %53, ptr noundef %54, double noundef %55, ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef null)
          to label %57 unwind label %76

57:                                               ; preds = %51
  store ptr %56, ptr %12, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = icmp eq ptr %58, null
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  call void @_ZdaPv(ptr noundef %58) #9
  br label %61

61:                                               ; preds = %60, %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %62

62:                                               ; preds = %103, %61
  %63 = load i32, ptr %13, align 4, !tbaa !11
  %64 = invoke noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %65 unwind label %80

65:                                               ; preds = %62
  %66 = icmp slt i32 %63, %64
  br i1 %66, label %84, label %67

67:                                               ; preds = %65
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %107

68:                                               ; preds = %45
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %6, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %7, align 4
  br label %113

72:                                               ; preds = %50
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %6, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %7, align 4
  br label %112

76:                                               ; preds = %51
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %6, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %7, align 4
  br label %111

80:                                               ; preds = %62
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %6, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %7, align 4
  br label %106

84:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %85 = load i32, ptr %13, align 4, !tbaa !11
  %86 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef %85)
          to label %87 unwind label %93

87:                                               ; preds = %84
  store ptr %86, ptr %14, align 8, !tbaa !5
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = invoke noundef double @_ZNK14R3MeshProperty11VertexValueEP12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(1096) %15, ptr noundef %88)
          to label %90 unwind label %93

90:                                               ; preds = %87
  %91 = fcmp oeq double %89, -1.000000e+00
  br i1 %91, label %92, label %97

92:                                               ; preds = %90
  store i32 7, ptr %9, align 4
  br label %100

93:                                               ; preds = %97, %87, %84
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %6, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %106

97:                                               ; preds = %90
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN14R3MeshProperty14SetVertexValueEP12R3MeshVertexd(ptr noundef nonnull align 8 dereferenceable(1096) %15, ptr noundef %98, double noundef 1.000000e+00)
          to label %99 unwind label %93

99:                                               ; preds = %97
  store i32 0, ptr %9, align 4
  br label %100

100:                                              ; preds = %99, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  %101 = load i32, ptr %9, align 4
  switch i32 %101, label %123 [
    i32 0, label %102
    i32 7, label %103
  ]

102:                                              ; preds = %100
  br label %103

103:                                              ; preds = %102, %100
  %104 = load i32, ptr %13, align 4, !tbaa !11
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %13, align 4, !tbaa !11
  br label %62, !llvm.loop !15

106:                                              ; preds = %93, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %111

107:                                              ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %108

108:                                              ; preds = %107, %44, %38
  %109 = load i32, ptr %8, align 4, !tbaa !11
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %8, align 4, !tbaa !11
  br label %17, !llvm.loop !17

111:                                              ; preds = %106, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  br label %112

112:                                              ; preds = %111, %72
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %113

113:                                              ; preds = %112, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %114

114:                                              ; preds = %113, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %117

115:                                              ; preds = %24
  invoke void @_ZN14R3MeshProperty15ResetStatisticsEv(ptr noundef nonnull align 8 dereferenceable(1096) %15)
          to label %116 unwind label %25

116:                                              ; preds = %115
  call void @_ZN14R3MeshPropertyD1Ev(ptr noundef nonnull align 8 dereferenceable(1096) %5) #8
  call void @llvm.lifetime.end.p0(i64 1096, ptr %5) #8
  ret void

117:                                              ; preds = %114, %25
  call void @_ZN14R3MeshPropertyD1Ev(ptr noundef nonnull align 8 dereferenceable(1096) %5) #8
  call void @llvm.lifetime.end.p0(i64 1096, ptr %5) #8
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %6, align 8
  %120 = load i32, ptr %7, align 4
  %121 = insertvalue { ptr, i32 } poison, ptr %119, 0
  %122 = insertvalue { ptr, i32 } %121, i32 %120, 1
  resume { ptr, i32 } %122

123:                                              ; preds = %100
  unreachable
}

declare void @_ZN14R3MeshPropertyC1ERKS_(ptr, ptr)

declare void @_ZN14R3MeshPropertyD1Ev(ptr)

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 = { nobuiltin nounwind "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 = { "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 #6 = { 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 #7 = { nounwind "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 #8 = { nounwind }
attributes #9 = { builtin 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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS14R3MeshProperty", !6, i64 0, !7, i64 8, !12, i64 1032, !6, i64 1040, !10, i64 1048, !10, i64 1056, !10, i64 1064, !10, i64 1072, !10, i64 1080, !10, i64 1088}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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

%struct.R3MeshProperty = type { ptr, [1024 x i8], i32, ptr, double, double, double, double, double, double }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }

; 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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK14R3MeshProperty11VertexValueEP12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(1096), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

declare noundef ptr @_ZNK6R3Mesh17DijkstraDistancesEPK12R3MeshVertexdR7RNArrayIPS0_EPP10R3MeshEdge(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK14R3MeshProperty11VertexValueEi(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14R3MeshProperty5ClearEd(ptr noundef nonnull align 8 dereferenceable(1096), double noundef) local_unnamed_addr #4 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 void @_ZN14R3MeshProperty14SetVertexValueEP12R3MeshVertexd(ptr noundef nonnull align 8 dereferenceable(1096), ptr noundef, double noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14R3MeshProperty6DilateEd(ptr noundef nonnull align 8 dereferenceable(1096) %0, double noundef %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.R3MeshProperty, align 8
  %4 = alloca %class.RNArray, align 8
  call void @llvm.lifetime.start.p0(i64 1096, ptr nonnull %3) #8
  call void @_ZN14R3MeshPropertyC1ERKS_(ptr noundef nonnull align 8 dereferenceable(1096) %3, ptr noundef nonnull align 8 dereferenceable(1096) %0)
  invoke void @_ZN14R3MeshProperty5ClearEd(ptr noundef nonnull align 8 dereferenceable(1096) %0, double noundef 0.000000e+00)
          to label %.preheader unwind label %10

.preheader:                                       ; preds = %2, %51
  %.021 = phi i32 [ %52, %51 ], [ 0, %2 ]
  %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 %12

7:                                                ; preds = %.preheader
  %8 = icmp slt i32 %.021, %6
  br i1 %8, label %14, label %9

9:                                                ; preds = %7
  call void @_ZN14R3MeshProperty15ResetStatisticsEv(ptr noundef nonnull align 8 dereferenceable(1096) %0)
  call void @_ZN14R3MeshPropertyD1Ev(ptr noundef nonnull align 8 dereferenceable(1096) %3) #8
  call void @llvm.lifetime.end.p0(i64 1096, ptr nonnull %3) #8
  ret void

10:                                               ; preds = %2
  %11 = landingpad { ptr, i32 }
          cleanup
  br label %55

12:                                               ; preds = %.preheader
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %55

14:                                               ; preds = %7
  %15 = call noundef double @_ZNK14R3MeshProperty11VertexValueEi(ptr noundef nonnull align 8 dereferenceable(1096) %3, i32 noundef %.021)
  %16 = fcmp oeq double %15, 0.000000e+00
  br i1 %16, label %51, label %17

17:                                               ; preds = %14
  %18 = call noundef double @_ZNK14R3MeshProperty11VertexValueEi(ptr noundef nonnull align 8 dereferenceable(1096) %3, i32 noundef %.021)
  %19 = fcmp oeq double %18, -1.000000e+00
  br i1 %19, label %51, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr %0, align 8, !tbaa !5
  %22 = invoke noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %21, i32 noundef %.021)
          to label %23 unwind label %33

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  invoke void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %24 unwind label %35

24:                                               ; preds = %23
  %25 = load ptr, ptr %0, align 8, !tbaa !5
  %26 = invoke noundef ptr @_ZNK6R3Mesh17DijkstraDistancesEPK12R3MeshVertexdR7RNArrayIPS0_EPP10R3MeshEdge(ptr noundef nonnull align 8 dereferenceable(272) %25, ptr noundef %22, double noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef null)
          to label %27 unwind label %37

27:                                               ; preds = %24
  %28 = icmp eq ptr %26, null
  br i1 %28, label %30, label %29

29:                                               ; preds = %27
  call void @_ZdaPv(ptr noundef nonnull %26) #9
  br label %30

30:                                               ; preds = %29, %27
  %31 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %47, %30
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %51

33:                                               ; preds = %20
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %55

35:                                               ; preds = %23
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %54

37:                                               ; preds = %24
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %53

.lr.ph:                                           ; preds = %30, %47
  %.01528 = phi i32 [ %48, %47 ], [ 0, %30 ]
  %39 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %.01528)
          to label %40 unwind label %44

40:                                               ; preds = %.lr.ph
  %41 = invoke noundef double @_ZNK14R3MeshProperty11VertexValueEP12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(1096) %0, ptr noundef %39)
          to label %42 unwind label %44

42:                                               ; preds = %40
  %43 = fcmp oeq double %41, -1.000000e+00
  br i1 %43, label %47, label %46

44:                                               ; preds = %46, %40, %.lr.ph
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %53

46:                                               ; preds = %42
  invoke void @_ZN14R3MeshProperty14SetVertexValueEP12R3MeshVertexd(ptr noundef nonnull align 8 dereferenceable(1096) %0, ptr noundef %39, double noundef 1.000000e+00)
          to label %47 unwind label %44

47:                                               ; preds = %46, %42
  %48 = add nuw nsw i32 %.01528, 1
  %49 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !12

51:                                               ; preds = %17, %14, %._crit_edge
  %52 = add nuw nsw i32 %.021, 1
  br label %.preheader, !llvm.loop !14

53:                                               ; preds = %44, %37
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %38, %37 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  br label %54

54:                                               ; preds = %53, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %53 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %55

55:                                               ; preds = %12, %54, %33, %10
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %11, %10 ], [ %13, %12 ], [ %.pn.pn, %54 ], [ %34, %33 ]
  call void @_ZN14R3MeshPropertyD1Ev(ptr noundef nonnull align 8 dereferenceable(1096) %3) #8
  call void @llvm.lifetime.end.p0(i64 1096, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

declare void @_ZN14R3MeshPropertyC1ERKS_(ptr, ptr) local_unnamed_addr

declare void @_ZN14R3MeshPropertyD1Ev(ptr) local_unnamed_addr

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 = { nobuiltin nounwind "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 = { "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 #6 = { 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 #7 = { nounwind "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 #8 = { nounwind }
attributes #9 = { builtin 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 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass