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

; 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.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh12VertexNormalEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #1 align 2

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

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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6R3Mesh10CreateCopyERKS_(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(272) %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.RNArray, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %37 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #5
  call void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %113, %2
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %40)
          to label %42 unwind label %45

42:                                               ; preds = %38
  %43 = icmp slt i32 %39, %41
  br i1 %43, label %49, label %44

44:                                               ; preds = %42
  store i32 2, ptr %9, align 4
  br label %121

45:                                               ; preds = %38
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %7, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %8, align 4
  br label %123

49:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = invoke noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %50, i32 noundef %51)
          to label %53 unwind label %82

53:                                               ; preds = %49
  store ptr %52, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %54, ptr noundef %55)
          to label %57 unwind label %86

57:                                               ; preds = %53
  store ptr %56, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh12VertexNormalEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %58, ptr noundef %59)
          to label %61 unwind label %90

61:                                               ; preds = %57
  store ptr %60, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh11VertexColorEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %62, ptr noundef %63)
          to label %65 unwind label %94

65:                                               ; preds = %61
  store ptr %64, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %66, ptr noundef %67)
          to label %69 unwind label %98

69:                                               ; preds = %65
  store ptr %68, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = load ptr, ptr %37, align 8, !tbaa !11
  %75 = getelementptr inbounds ptr, ptr %74, i64 7
  %76 = load ptr, ptr %75, align 8
  %77 = invoke noundef ptr %76(ptr noundef nonnull align 8 dereferenceable(272) %37, ptr noundef nonnull align 8 dereferenceable(24) %70, ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef null)
          to label %78 unwind label %102

78:                                               ; preds = %69
  store ptr %77, ptr %15, align 8, !tbaa !5
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %106, label %81

81:                                               ; preds = %78
  store i32 1, ptr %9, align 4
  br label %110

82:                                               ; preds = %49
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %7, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %8, align 4
  br label %120

86:                                               ; preds = %53
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %7, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %8, align 4
  br label %119

90:                                               ; preds = %57
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %7, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %8, align 4
  br label %118

94:                                               ; preds = %61
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  br label %117

98:                                               ; preds = %65
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %7, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %8, align 4
  br label %116

102:                                              ; preds = %106, %69
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %7, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %116

106:                                              ; preds = %78
  %107 = load ptr, ptr %15, align 8, !tbaa !5
  %108 = invoke noundef ptr @_ZN7RNArrayIP12R3MeshVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %107)
          to label %109 unwind label %102

109:                                              ; preds = %106
  store i32 0, ptr %9, align 4
  br label %110

110:                                              ; preds = %109, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %111 = load i32, ptr %9, align 4
  switch i32 %111, label %121 [
    i32 0, label %112
  ]

112:                                              ; preds = %110
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %6, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %6, align 4, !tbaa !9
  br label %38, !llvm.loop !13

116:                                              ; preds = %102, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %117

117:                                              ; preds = %116, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %118

118:                                              ; preds = %117, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %119

119:                                              ; preds = %118, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %120

120:                                              ; preds = %119, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %123

121:                                              ; preds = %110, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %122 = load i32, ptr %9, align 4
  switch i32 %122, label %366 [
    i32 2, label %124
  ]

123:                                              ; preds = %120, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %369

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %209, %124
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = invoke noundef i32 @_ZNK6R3Mesh6NEdgesEv(ptr noundef nonnull align 8 dereferenceable(272) %127)
          to label %129 unwind label %132

129:                                              ; preds = %125
  %130 = icmp slt i32 %126, %128
  br i1 %130, label %136, label %131

131:                                              ; preds = %129
  store i32 5, ptr %9, align 4
  br label %219

132:                                              ; preds = %125
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %7, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %8, align 4
  br label %221

136:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = load i32, ptr %16, align 4, !tbaa !9
  %139 = invoke noundef ptr @_ZNK6R3Mesh4EdgeEi(ptr noundef nonnull align 8 dereferenceable(272) %137, i32 noundef %138)
          to label %140 unwind label %173

140:                                              ; preds = %136
  store ptr %139, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = load ptr, ptr %17, align 8, !tbaa !5
  %143 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnEdgeEPK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %141, ptr noundef %142, i32 noundef 0)
          to label %144 unwind label %177

144:                                              ; preds = %140
  store ptr %143, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = load ptr, ptr %17, align 8, !tbaa !5
  %147 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnEdgeEPK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %145, ptr noundef %146, i32 noundef 1)
          to label %148 unwind label %181

148:                                              ; preds = %144
  store ptr %147, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = load ptr, ptr %18, align 8, !tbaa !5
  %151 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %149, ptr noundef %150)
          to label %152 unwind label %185

152:                                              ; preds = %148
  store i32 %151, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = load ptr, ptr %19, align 8, !tbaa !5
  %155 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %153, ptr noundef %154)
          to label %156 unwind label %189

156:                                              ; preds = %152
  store i32 %155, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %157 = load i32, ptr %20, align 4, !tbaa !9
  %158 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %157)
          to label %159 unwind label %193

159:                                              ; preds = %156
  store ptr %158, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %160 = load i32, ptr %21, align 4, !tbaa !9
  %161 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %160)
          to label %162 unwind label %197

162:                                              ; preds = %159
  store ptr %161, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %163 = load ptr, ptr %22, align 8, !tbaa !5
  %164 = load ptr, ptr %23, align 8, !tbaa !5
  %165 = load ptr, ptr %37, align 8, !tbaa !11
  %166 = getelementptr inbounds ptr, ptr %165, i64 8
  %167 = load ptr, ptr %166, align 8
  %168 = invoke noundef ptr %167(ptr noundef nonnull align 8 dereferenceable(272) %37, ptr noundef %163, ptr noundef %164, ptr noundef null)
          to label %169 unwind label %201

169:                                              ; preds = %162
  store ptr %168, ptr %24, align 8, !tbaa !5
  %170 = load ptr, ptr %24, align 8, !tbaa !5
  %171 = icmp ne ptr %170, null
  br i1 %171, label %205, label %172

172:                                              ; preds = %169
  store i32 1, ptr %9, align 4
  br label %206

173:                                              ; preds = %136
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %7, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %8, align 4
  br label %218

177:                                              ; preds = %140
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %7, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %8, align 4
  br label %217

181:                                              ; preds = %144
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %7, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %8, align 4
  br label %216

185:                                              ; preds = %148
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %7, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %8, align 4
  br label %215

189:                                              ; preds = %152
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %7, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %8, align 4
  br label %214

193:                                              ; preds = %156
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %7, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %8, align 4
  br label %213

197:                                              ; preds = %159
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %7, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %8, align 4
  br label %212

201:                                              ; preds = %162
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %7, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %212

205:                                              ; preds = %169
  store i32 0, ptr %9, align 4
  br label %206

206:                                              ; preds = %205, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %207 = load i32, ptr %9, align 4
  switch i32 %207, label %219 [
    i32 0, label %208
  ]

208:                                              ; preds = %206
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %16, align 4, !tbaa !9
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %16, align 4, !tbaa !9
  br label %125, !llvm.loop !15

212:                                              ; preds = %201, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %213

213:                                              ; preds = %212, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %214

214:                                              ; preds = %213, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %215

215:                                              ; preds = %214, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %216

216:                                              ; preds = %215, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %217

217:                                              ; preds = %216, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %218

218:                                              ; preds = %217, %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %221

219:                                              ; preds = %206, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %220 = load i32, ptr %9, align 4
  switch i32 %220, label %366 [
    i32 5, label %222
  ]

221:                                              ; preds = %218, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %369

222:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %223

223:                                              ; preds = %349, %222
  %224 = load i32, ptr %25, align 4, !tbaa !9
  %225 = load ptr, ptr %4, align 8, !tbaa !5
  %226 = invoke noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %225)
          to label %227 unwind label %230

227:                                              ; preds = %223
  %228 = icmp slt i32 %224, %226
  br i1 %228, label %234, label %229

229:                                              ; preds = %227
  store i32 8, ptr %9, align 4
  br label %362

230:                                              ; preds = %223
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %7, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %8, align 4
  br label %364

234:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = load i32, ptr %25, align 4, !tbaa !9
  %237 = invoke noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %235, i32 noundef %236)
          to label %238 unwind label %283

238:                                              ; preds = %234
  store ptr %237, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = load ptr, ptr %26, align 8, !tbaa !5
  %241 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %239, ptr noundef %240, i32 noundef 0)
          to label %242 unwind label %287

242:                                              ; preds = %238
  store ptr %241, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = load ptr, ptr %26, align 8, !tbaa !5
  %245 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %243, ptr noundef %244, i32 noundef 1)
          to label %246 unwind label %291

246:                                              ; preds = %242
  store ptr %245, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = load ptr, ptr %26, align 8, !tbaa !5
  %249 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %247, ptr noundef %248, i32 noundef 2)
          to label %250 unwind label %295

250:                                              ; preds = %246
  store ptr %249, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %251 = load ptr, ptr %4, align 8, !tbaa !5
  %252 = load ptr, ptr %27, align 8, !tbaa !5
  %253 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %251, ptr noundef %252)
          to label %254 unwind label %299

254:                                              ; preds = %250
  store i32 %253, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = load ptr, ptr %28, align 8, !tbaa !5
  %257 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %255, ptr noundef %256)
          to label %258 unwind label %303

258:                                              ; preds = %254
  store i32 %257, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %259 = load ptr, ptr %4, align 8, !tbaa !5
  %260 = load ptr, ptr %29, align 8, !tbaa !5
  %261 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %259, ptr noundef %260)
          to label %262 unwind label %307

262:                                              ; preds = %258
  store i32 %261, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %263 = load i32, ptr %30, align 4, !tbaa !9
  %264 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %263)
          to label %265 unwind label %311

265:                                              ; preds = %262
  store ptr %264, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %266 = load i32, ptr %31, align 4, !tbaa !9
  %267 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %266)
          to label %268 unwind label %315

268:                                              ; preds = %265
  store ptr %267, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %269 = load i32, ptr %32, align 4, !tbaa !9
  %270 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %269)
          to label %271 unwind label %319

271:                                              ; preds = %268
  store ptr %270, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %272 = load ptr, ptr %33, align 8, !tbaa !5
  %273 = load ptr, ptr %34, align 8, !tbaa !5
  %274 = load ptr, ptr %35, align 8, !tbaa !5
  %275 = load ptr, ptr %37, align 8, !tbaa !11
  %276 = getelementptr inbounds ptr, ptr %275, i64 9
  %277 = load ptr, ptr %276, align 8
  %278 = invoke noundef ptr %277(ptr noundef nonnull align 8 dereferenceable(272) %37, ptr noundef %272, ptr noundef %273, ptr noundef %274, ptr noundef null)
          to label %279 unwind label %323

279:                                              ; preds = %271
  store ptr %278, ptr %36, align 8, !tbaa !5
  %280 = load ptr, ptr %36, align 8, !tbaa !5
  %281 = icmp ne ptr %280, null
  br i1 %281, label %327, label %282

282:                                              ; preds = %279
  store i32 1, ptr %9, align 4
  br label %346

283:                                              ; preds = %234
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %7, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %8, align 4
  br label %361

287:                                              ; preds = %238
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %7, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %8, align 4
  br label %360

291:                                              ; preds = %242
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %7, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %8, align 4
  br label %359

295:                                              ; preds = %246
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %7, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %8, align 4
  br label %358

299:                                              ; preds = %250
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %7, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %8, align 4
  br label %357

303:                                              ; preds = %254
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %7, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %8, align 4
  br label %356

307:                                              ; preds = %258
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %7, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %8, align 4
  br label %355

311:                                              ; preds = %262
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %7, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %8, align 4
  br label %354

315:                                              ; preds = %265
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %7, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %8, align 4
  br label %353

319:                                              ; preds = %268
  %320 = landingpad { ptr, i32 }
          cleanup
  %321 = extractvalue { ptr, i32 } %320, 0
  store ptr %321, ptr %7, align 8
  %322 = extractvalue { ptr, i32 } %320, 1
  store i32 %322, ptr %8, align 4
  br label %352

323:                                              ; preds = %344, %339, %338, %333, %332, %327, %271
  %324 = landingpad { ptr, i32 }
          cleanup
  %325 = extractvalue { ptr, i32 } %324, 0
  store ptr %325, ptr %7, align 8
  %326 = extractvalue { ptr, i32 } %324, 1
  store i32 %326, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  br label %352

327:                                              ; preds = %279
  %328 = load ptr, ptr %36, align 8, !tbaa !5
  %329 = load ptr, ptr %4, align 8, !tbaa !5
  %330 = load ptr, ptr %26, align 8, !tbaa !5
  %331 = invoke noundef i32 @_ZNK6R3Mesh12FaceMaterialEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %329, ptr noundef %330)
          to label %332 unwind label %323

332:                                              ; preds = %327
  invoke void @_ZN6R3Mesh15SetFaceMaterialEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %37, ptr noundef %328, i32 noundef %331)
          to label %333 unwind label %323

333:                                              ; preds = %332
  %334 = load ptr, ptr %36, align 8, !tbaa !5
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  %336 = load ptr, ptr %26, align 8, !tbaa !5
  %337 = invoke noundef i32 @_ZNK6R3Mesh11FaceSegmentEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %335, ptr noundef %336)
          to label %338 unwind label %323

338:                                              ; preds = %333
  invoke void @_ZN6R3Mesh14SetFaceSegmentEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %37, ptr noundef %334, i32 noundef %337)
          to label %339 unwind label %323

339:                                              ; preds = %338
  %340 = load ptr, ptr %36, align 8, !tbaa !5
  %341 = load ptr, ptr %4, align 8, !tbaa !5
  %342 = load ptr, ptr %26, align 8, !tbaa !5
  %343 = invoke noundef i32 @_ZNK6R3Mesh12FaceCategoryEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %341, ptr noundef %342)
          to label %344 unwind label %323

344:                                              ; preds = %339
  invoke void @_ZN6R3Mesh15SetFaceCategoryEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %37, ptr noundef %340, i32 noundef %343)
          to label %345 unwind label %323

345:                                              ; preds = %344
  store i32 0, ptr %9, align 4
  br label %346

346:                                              ; preds = %345, %282
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  %347 = load i32, ptr %9, align 4
  switch i32 %347, label %362 [
    i32 0, label %348
  ]

348:                                              ; preds = %346
  br label %349

349:                                              ; preds = %348
  %350 = load i32, ptr %25, align 4, !tbaa !9
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %25, align 4, !tbaa !9
  br label %223, !llvm.loop !16

352:                                              ; preds = %323, %319
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  br label %353

353:                                              ; preds = %352, %315
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  br label %354

354:                                              ; preds = %353, %311
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  br label %355

355:                                              ; preds = %354, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %356

356:                                              ; preds = %355, %303
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %357

357:                                              ; preds = %356, %299
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %358

358:                                              ; preds = %357, %295
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %359

359:                                              ; preds = %358, %291
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  br label %360

360:                                              ; preds = %359, %287
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %361

361:                                              ; preds = %360, %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %364

362:                                              ; preds = %346, %229
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  %363 = load i32, ptr %9, align 4
  switch i32 %363, label %366 [
    i32 8, label %365
  ]

364:                                              ; preds = %361, %230
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %369

365:                                              ; preds = %362
  store i32 0, ptr %9, align 4
  br label %366

366:                                              ; preds = %365, %362, %219, %121
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #5
  %367 = load i32, ptr %9, align 4
  switch i32 %367, label %375 [
    i32 0, label %368
    i32 1, label %368
  ]

368:                                              ; preds = %366, %366
  ret void

369:                                              ; preds = %364, %221, %123
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #5
  br label %370

370:                                              ; preds = %369
  %371 = load ptr, ptr %7, align 8
  %372 = load i32, ptr %8, align 4
  %373 = insertvalue { ptr, i32 } poison, ptr %371, 0
  %374 = insertvalue { ptr, i32 } %373, i32 %372, 1
  resume { ptr, i32 } %374

375:                                              ; preds = %366
  unreachable
}

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

attributes #0 = { 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh12VertexNormalEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #1 align 2

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

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

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6R3Mesh10CreateCopyERKS_(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(272) %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.RNArray, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br label %4

4:                                                ; preds = %30, %2
  %.0 = phi i32 [ 0, %2 ], [ %31, %30 ]
  %5 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
          to label %6 unwind label %7

6:                                                ; preds = %4
  %.not = icmp slt i32 %.0, %5
  br i1 %.not, label %9, label %.critedge129

7:                                                ; preds = %4
  %8 = landingpad { ptr, i32 }
          cleanup
  br label %107

9:                                                ; preds = %6
  %10 = invoke noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %1, i32 noundef %.0)
          to label %11 unwind label %22

11:                                               ; preds = %9
  %12 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %10)
  %13 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh12VertexNormalEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %10)
          to label %14 unwind label %24

14:                                               ; preds = %11
  %15 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh11VertexColorEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %10)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %10)
  %17 = load ptr, ptr %0, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 56
  %19 = load ptr, ptr %18, align 8
  %20 = invoke noundef ptr %19(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef null)
          to label %21 unwind label %26

21:                                               ; preds = %14
  %.not.not = icmp eq ptr %20, null
  br i1 %.not.not, label %.critedge133, label %28

22:                                               ; preds = %9
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %107

24:                                               ; preds = %11
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %107

26:                                               ; preds = %28, %14
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %107

28:                                               ; preds = %21
  %29 = invoke noundef ptr @_ZN7RNArrayIP12R3MeshVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %20)
          to label %30 unwind label %26

30:                                               ; preds = %28
  %31 = add nuw nsw i32 %.0, 1
  br label %4, !llvm.loop !8

.critedge129:                                     ; preds = %6, %53
  %.0105 = phi i32 [ %54, %53 ], [ 0, %6 ]
  %32 = invoke noundef i32 @_ZNK6R3Mesh6NEdgesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
          to label %33 unwind label %34

33:                                               ; preds = %.critedge129
  %.not120 = icmp slt i32 %.0105, %32
  br i1 %.not120, label %36, label %.critedge131

34:                                               ; preds = %.critedge129
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %107

36:                                               ; preds = %33
  %37 = invoke noundef ptr @_ZNK6R3Mesh4EdgeEi(ptr noundef nonnull align 8 dereferenceable(272) %1, i32 noundef %.0105)
          to label %38 unwind label %55

38:                                               ; preds = %36
  %39 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnEdgeEPK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %37, i32 noundef 0)
          to label %40 unwind label %57

40:                                               ; preds = %38
  %41 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnEdgeEPK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %37, i32 noundef 1)
          to label %42 unwind label %59

42:                                               ; preds = %40
  %43 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %39)
  %44 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %41)
  %45 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %43)
          to label %46 unwind label %61

46:                                               ; preds = %42
  %47 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %44)
          to label %48 unwind label %63

48:                                               ; preds = %46
  %49 = load ptr, ptr %0, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 64
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef ptr %51(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %45, ptr noundef %47, ptr noundef null)
          to label %53 unwind label %65

53:                                               ; preds = %48
  %.not119.not = icmp eq ptr %52, null
  %54 = add nuw nsw i32 %.0105, 1
  br i1 %.not119.not, label %.critedge133, label %.critedge129, !llvm.loop !10

55:                                               ; preds = %36
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %107

57:                                               ; preds = %38
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %107

59:                                               ; preds = %40
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %107

61:                                               ; preds = %42
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %107

63:                                               ; preds = %46
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %107

65:                                               ; preds = %48
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %107

.critedge131:                                     ; preds = %33, %102
  %.0106 = phi i32 [ %106, %102 ], [ 0, %33 ]
  %67 = invoke noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
          to label %68 unwind label %70

68:                                               ; preds = %.critedge131
  %69 = icmp slt i32 %.0106, %67
  br i1 %69, label %72, label %.critedge133

70:                                               ; preds = %.critedge131
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %107

72:                                               ; preds = %68
  %73 = invoke noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %1, i32 noundef %.0106)
          to label %74 unwind label %92

74:                                               ; preds = %72
  %75 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %73, i32 noundef 0)
  %76 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %73, i32 noundef 1)
  %77 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %73, i32 noundef 2)
  %78 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %75)
  %79 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %76)
  %80 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %77)
  %81 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %78)
          to label %82 unwind label %94

82:                                               ; preds = %74
  %83 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %79)
          to label %84 unwind label %96

84:                                               ; preds = %82
  %85 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %80)
          to label %86 unwind label %98

86:                                               ; preds = %84
  %87 = load ptr, ptr %0, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i64 72
  %89 = load ptr, ptr %88, align 8
  %90 = invoke noundef ptr %89(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %81, ptr noundef %83, ptr noundef %85, ptr noundef null)
          to label %91 unwind label %100

91:                                               ; preds = %86
  %.not128.not = icmp eq ptr %90, null
  br i1 %.not128.not, label %.critedge133, label %102

92:                                               ; preds = %72
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %107

94:                                               ; preds = %74
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %107

96:                                               ; preds = %82
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %107

98:                                               ; preds = %84
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %107

100:                                              ; preds = %86
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %107

102:                                              ; preds = %91
  %103 = call noundef i32 @_ZNK6R3Mesh12FaceMaterialEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %73)
  call void @_ZN6R3Mesh15SetFaceMaterialEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %90, i32 noundef %103)
  %104 = call noundef i32 @_ZNK6R3Mesh11FaceSegmentEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %73)
  call void @_ZN6R3Mesh14SetFaceSegmentEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %90, i32 noundef %104)
  %105 = call noundef i32 @_ZNK6R3Mesh12FaceCategoryEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %73)
  call void @_ZN6R3Mesh15SetFaceCategoryEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %90, i32 noundef %105)
  %106 = add nuw nsw i32 %.0106, 1
  br label %.critedge131, !llvm.loop !11

.critedge133:                                     ; preds = %21, %53, %68, %91
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  ret void

107:                                              ; preds = %70, %94, %98, %100, %96, %92, %34, %57, %61, %65, %63, %59, %55, %7, %24, %26, %22
  %.pn121.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %8, %7 ], [ %23, %22 ], [ %27, %26 ], [ %25, %24 ], [ %35, %34 ], [ %56, %55 ], [ %58, %57 ], [ %60, %59 ], [ %62, %61 ], [ %66, %65 ], [ %64, %63 ], [ %71, %70 ], [ %93, %92 ], [ %95, %94 ], [ %97, %96 ], [ %101, %100 ], [ %99, %98 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn121.pn.pn.pn.pn.pn
}

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

attributes #0 = { 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}


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