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

; 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.0 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.RNFlags = type { i64 }
%class.R2Point = type { [2 x double] }
%class.R3TriangleArray = type { %class.R3Surface, %class.RNArray, %class.RNArray.0, %class.R3Box }
%class.R3Surface = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.RNArray = type { %class.RNVArray }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3TriangleVertex = type <{ %class.R3Point, %class.R3Vector, %class.RNRgb, %class.R2Point, %class.RNFlags, i32, [4 x i8] }>
%class.RNRgb = type { [3 x double] }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK10R3Triangle2V0Ev(ptr noundef nonnull align 8 dereferenceable(132)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK10R3Triangle2V1Ev(ptr noundef nonnull align 8 dereferenceable(132)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK10R3Triangle2V2Ev(ptr noundef nonnull align 8 dereferenceable(132)) #5 align 2

declare void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex8PositionEv(ptr noundef nonnull align 8 dereferenceable(100)) #5 align 2

declare noundef double @_Z17R3SquaredDistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15R3TriangleArray9SubdivideEd(ptr noundef nonnull align 8 dereferenceable(96) %0, double noundef %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca %class.RNArray.0, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %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 double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca %class.R3Point, align 8
  %20 = alloca %class.R3Point, align 8
  %21 = alloca %class.R3Vector, align 8
  %22 = alloca %class.R3Vector, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %class.RNFlags, align 8
  %25 = alloca %class.RNFlags, align 8
  %26 = alloca %class.R2Point, align 8
  %27 = alloca %class.R2Point, align 8
  %28 = alloca ptr, align 8
  %29 = alloca %class.R3Point, align 8
  %30 = alloca %class.R3Point, align 8
  %31 = alloca %class.R3Vector, align 8
  %32 = alloca %class.R3Vector, align 8
  %33 = alloca ptr, align 8
  %34 = alloca %class.RNFlags, align 8
  %35 = alloca %class.RNFlags, align 8
  %36 = alloca %class.R2Point, align 8
  %37 = alloca %class.R2Point, align 8
  %38 = alloca ptr, align 8
  %39 = alloca %class.R3Point, align 8
  %40 = alloca %class.R3Point, align 8
  %41 = alloca %class.R3Vector, align 8
  %42 = alloca %class.R3Vector, align 8
  %43 = alloca ptr, align 8
  %44 = alloca %class.RNFlags, align 8
  %45 = alloca %class.RNFlags, align 8
  %46 = alloca %class.R2Point, align 8
  %47 = alloca %class.R2Point, align 8
  %48 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %49 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %50 = load double, ptr %4, align 8, !tbaa !9
  %51 = load double, ptr %4, align 8, !tbaa !9
  %52 = fmul double %50, %51
  store double %52, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #8
  %53 = getelementptr inbounds %class.R3TriangleArray, ptr %49, i32 0, i32 2
  call void @_ZN7RNArrayIP10R3TriangleEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %53)
  br label %54

54:                                               ; preds = %504, %2
  %55 = invoke noundef i32 @_ZNK8RNVArray7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %56 unwind label %149

56:                                               ; preds = %54
  %57 = icmp ne i32 %55, 0
  %58 = xor i1 %57, true
  br i1 %58, label %59, label %515

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %60 = invoke noundef ptr @_ZNK7RNArrayIP10R3TriangleE4TailEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %61 unwind label %153

61:                                               ; preds = %59
  store ptr %60, ptr %9, align 8, !tbaa !5
  invoke void @_ZN8RNVArray10RemoveTailEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %62 unwind label %153

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = invoke noundef ptr @_ZNK10R3Triangle2V0Ev(ptr noundef nonnull align 8 dereferenceable(132) %63)
          to label %65 unwind label %157

65:                                               ; preds = %62
  store ptr %64, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = invoke noundef ptr @_ZNK10R3Triangle2V1Ev(ptr noundef nonnull align 8 dereferenceable(132) %66)
          to label %68 unwind label %161

68:                                               ; preds = %65
  store ptr %67, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = invoke noundef ptr @_ZNK10R3Triangle2V2Ev(ptr noundef nonnull align 8 dereferenceable(132) %69)
          to label %71 unwind label %165

71:                                               ; preds = %68
  store ptr %70, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex8PositionEv(ptr noundef nonnull align 8 dereferenceable(100) %72)
          to label %74 unwind label %169

74:                                               ; preds = %71
  store ptr %73, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex8PositionEv(ptr noundef nonnull align 8 dereferenceable(100) %75)
          to label %77 unwind label %173

77:                                               ; preds = %74
  store ptr %76, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex8PositionEv(ptr noundef nonnull align 8 dereferenceable(100) %78)
          to label %80 unwind label %177

80:                                               ; preds = %77
  store ptr %79, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = invoke noundef double @_Z17R3SquaredDistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull align 8 dereferenceable(24) %82)
          to label %84 unwind label %181

84:                                               ; preds = %80
  store double %83, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = invoke noundef double @_Z17R3SquaredDistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %85, ptr noundef nonnull align 8 dereferenceable(24) %86)
          to label %88 unwind label %185

88:                                               ; preds = %84
  store double %87, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = invoke noundef double @_Z17R3SquaredDistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %89, ptr noundef nonnull align 8 dereferenceable(24) %90)
          to label %92 unwind label %189

92:                                               ; preds = %88
  store double %91, ptr %18, align 8, !tbaa !9
  %93 = load double, ptr %16, align 8, !tbaa !9
  %94 = load double, ptr %5, align 8, !tbaa !9
  %95 = fcmp ogt double %93, %94
  br i1 %95, label %96, label %258

96:                                               ; preds = %92
  %97 = load double, ptr %16, align 8, !tbaa !9
  %98 = load double, ptr %17, align 8, !tbaa !9
  %99 = fcmp oge double %97, %98
  br i1 %99, label %100, label %258

100:                                              ; preds = %96
  %101 = load double, ptr %16, align 8, !tbaa !9
  %102 = load double, ptr %18, align 8, !tbaa !9
  %103 = fcmp oge double %101, %102
  br i1 %103, label %104, label %258

104:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #8
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZplRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %105, ptr noundef nonnull align 8 dereferenceable(24) %106)
          to label %107 unwind label %193

107:                                              ; preds = %104
  invoke void @_ZmldRK7R3Point(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %19, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %108 unwind label %193

108:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #8
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %109)
          to label %111 unwind label %197

111:                                              ; preds = %108
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %112)
          to label %114 unwind label %197

114:                                              ; preds = %111
  invoke void @_ZplRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %110, ptr noundef nonnull align 8 dereferenceable(24) %113)
          to label %115 unwind label %197

115:                                              ; preds = %114
  invoke void @_ZmldRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %21, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %116 unwind label %197

116:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #8
  invoke void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %117 unwind label %201

117:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %118 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #9
          to label %119 unwind label %205

119:                                              ; preds = %117
  invoke void @_ZN16R3TriangleVertexC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(100) %118, ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %120 unwind label %209

120:                                              ; preds = %119
  store ptr %118, ptr %23, align 8, !tbaa !5
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = getelementptr inbounds %class.R3TriangleVertex, ptr %121, i32 0, i32 4
  invoke void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef 512)
          to label %123 unwind label %205

123:                                              ; preds = %120
  %124 = getelementptr inbounds %class.RNFlags, ptr %24, i32 0, i32 0
  %125 = load i64, ptr %124, align 8
  %126 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %122, i64 %125)
          to label %127 unwind label %205

127:                                              ; preds = %123
  %128 = icmp ne i32 %126, 0
  br i1 %128, label %129, label %217

129:                                              ; preds = %127
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  %131 = getelementptr inbounds %class.R3TriangleVertex, ptr %130, i32 0, i32 4
  invoke void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %25, i64 noundef 512)
          to label %132 unwind label %205

132:                                              ; preds = %129
  %133 = getelementptr inbounds %class.RNFlags, ptr %25, i32 0, i32 0
  %134 = load i64, ptr %133, align 8
  %135 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %131, i64 %134)
          to label %136 unwind label %205

136:                                              ; preds = %132
  %137 = icmp ne i32 %135, 0
  br i1 %137, label %138, label %217

138:                                              ; preds = %136
  %139 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %140)
          to label %142 unwind label %213

142:                                              ; preds = %138
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %143)
          to label %145 unwind label %213

145:                                              ; preds = %142
  invoke void @_ZplRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %27, ptr noundef nonnull align 8 dereferenceable(16) %141, ptr noundef nonnull align 8 dereferenceable(16) %144)
          to label %146 unwind label %213

146:                                              ; preds = %145
  invoke void @_ZmldRK7R2Point(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %26, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %147 unwind label %213

147:                                              ; preds = %146
  invoke void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100) %139, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %148 unwind label %213

148:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  br label %217

149:                                              ; preds = %515, %54
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %7, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %8, align 4
  br label %520

153:                                              ; preds = %61, %59
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %7, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %8, align 4
  br label %514

157:                                              ; preds = %62
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %7, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %8, align 4
  br label %513

161:                                              ; preds = %65
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %7, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %8, align 4
  br label %512

165:                                              ; preds = %68
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %7, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %8, align 4
  br label %511

169:                                              ; preds = %71
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %7, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %8, align 4
  br label %510

173:                                              ; preds = %74
  %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 %509

177:                                              ; preds = %77
  %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 %508

181:                                              ; preds = %80
  %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 %507

185:                                              ; preds = %84
  %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 %506

189:                                              ; preds = %88
  %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 %505

193:                                              ; preds = %107, %104
  %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
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  br label %257

197:                                              ; preds = %115, %114, %111, %108
  %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
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #8
  br label %256

201:                                              ; preds = %116
  %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
  br label %256

205:                                              ; preds = %229, %221, %217, %132, %129, %123, %120, %117
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %7, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %8, align 4
  br label %255

209:                                              ; preds = %119
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %7, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %118, i64 noundef 104) #10
  br label %255

213:                                              ; preds = %147, %146, %145, %142, %138
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %7, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  br label %255

217:                                              ; preds = %148, %136, %127
  %218 = getelementptr inbounds %class.R3TriangleArray, ptr %49, i32 0, i32 1
  %219 = load ptr, ptr %23, align 8, !tbaa !5
  %220 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %218, ptr noundef %219)
          to label %221 unwind label %205

221:                                              ; preds = %217
  %222 = load ptr, ptr %9, align 8, !tbaa !5
  %223 = load ptr, ptr %10, align 8, !tbaa !5
  %224 = load ptr, ptr %23, align 8, !tbaa !5
  %225 = load ptr, ptr %12, align 8, !tbaa !5
  %226 = load ptr, ptr %222, align 8, !tbaa !11
  %227 = getelementptr inbounds ptr, ptr %226, i64 70
  %228 = load ptr, ptr %227, align 8
  invoke void %228(ptr noundef nonnull align 8 dereferenceable(132) %222, ptr noundef %223, ptr noundef %224, ptr noundef %225)
          to label %229 unwind label %205

229:                                              ; preds = %221
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %230)
          to label %232 unwind label %205

232:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %233 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #9
          to label %234 unwind label %246

234:                                              ; preds = %232
  %235 = load ptr, ptr %11, align 8, !tbaa !5
  %236 = load ptr, ptr %12, align 8, !tbaa !5
  %237 = load ptr, ptr %23, align 8, !tbaa !5
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %233, ptr noundef %235, ptr noundef %236, ptr noundef %237)
          to label %238 unwind label %250

238:                                              ; preds = %234
  store ptr %233, ptr %28, align 8, !tbaa !5
  %239 = getelementptr inbounds %class.R3TriangleArray, ptr %49, i32 0, i32 2
  %240 = load ptr, ptr %28, align 8, !tbaa !5
  %241 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %239, ptr noundef %240)
          to label %242 unwind label %246

242:                                              ; preds = %238
  %243 = load ptr, ptr %28, align 8, !tbaa !5
  %244 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %243)
          to label %245 unwind label %246

245:                                              ; preds = %242
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  br label %504

246:                                              ; preds = %242, %238, %232
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %7, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %8, align 4
  br label %254

250:                                              ; preds = %234
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %7, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %233, i64 noundef 136) #10
  br label %254

254:                                              ; preds = %250, %246
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %255

255:                                              ; preds = %254, %213, %209, %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %256

256:                                              ; preds = %255, %201, %197
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  br label %257

257:                                              ; preds = %256, %193
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  br label %505

258:                                              ; preds = %100, %96, %92
  %259 = load double, ptr %17, align 8, !tbaa !9
  %260 = load double, ptr %5, align 8, !tbaa !9
  %261 = fcmp ogt double %259, %260
  br i1 %261, label %262, label %380

262:                                              ; preds = %258
  %263 = load double, ptr %17, align 8, !tbaa !9
  %264 = load double, ptr %16, align 8, !tbaa !9
  %265 = fcmp oge double %263, %264
  br i1 %265, label %266, label %380

266:                                              ; preds = %262
  %267 = load double, ptr %17, align 8, !tbaa !9
  %268 = load double, ptr %18, align 8, !tbaa !9
  %269 = fcmp oge double %267, %268
  br i1 %269, label %270, label %380

270:                                              ; preds = %266
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #8
  %271 = load ptr, ptr %14, align 8, !tbaa !5
  %272 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZplRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %30, ptr noundef nonnull align 8 dereferenceable(24) %271, ptr noundef nonnull align 8 dereferenceable(24) %272)
          to label %273 unwind label %315

273:                                              ; preds = %270
  invoke void @_ZmldRK7R3Point(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %29, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %274 unwind label %315

274:                                              ; preds = %273
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #8
  %275 = load ptr, ptr %11, align 8, !tbaa !5
  %276 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %275)
          to label %277 unwind label %319

277:                                              ; preds = %274
  %278 = load ptr, ptr %12, align 8, !tbaa !5
  %279 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %278)
          to label %280 unwind label %319

280:                                              ; preds = %277
  invoke void @_ZplRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %32, ptr noundef nonnull align 8 dereferenceable(24) %276, ptr noundef nonnull align 8 dereferenceable(24) %279)
          to label %281 unwind label %319

281:                                              ; preds = %280
  invoke void @_ZmldRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %31, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %32)
          to label %282 unwind label %319

282:                                              ; preds = %281
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  invoke void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %283 unwind label %323

283:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %284 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #9
          to label %285 unwind label %327

285:                                              ; preds = %283
  invoke void @_ZN16R3TriangleVertexC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(100) %284, ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %286 unwind label %331

286:                                              ; preds = %285
  store ptr %284, ptr %33, align 8, !tbaa !5
  %287 = load ptr, ptr %11, align 8, !tbaa !5
  %288 = getelementptr inbounds %class.R3TriangleVertex, ptr %287, i32 0, i32 4
  invoke void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %34, i64 noundef 512)
          to label %289 unwind label %327

289:                                              ; preds = %286
  %290 = getelementptr inbounds %class.RNFlags, ptr %34, i32 0, i32 0
  %291 = load i64, ptr %290, align 8
  %292 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %288, i64 %291)
          to label %293 unwind label %327

293:                                              ; preds = %289
  %294 = icmp ne i32 %292, 0
  br i1 %294, label %295, label %339

295:                                              ; preds = %293
  %296 = load ptr, ptr %12, align 8, !tbaa !5
  %297 = getelementptr inbounds %class.R3TriangleVertex, ptr %296, i32 0, i32 4
  invoke void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %35, i64 noundef 512)
          to label %298 unwind label %327

298:                                              ; preds = %295
  %299 = getelementptr inbounds %class.RNFlags, ptr %35, i32 0, i32 0
  %300 = load i64, ptr %299, align 8
  %301 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %297, i64 %300)
          to label %302 unwind label %327

302:                                              ; preds = %298
  %303 = icmp ne i32 %301, 0
  br i1 %303, label %304, label %339

304:                                              ; preds = %302
  %305 = load ptr, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #8
  %306 = load ptr, ptr %11, align 8, !tbaa !5
  %307 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %306)
          to label %308 unwind label %335

308:                                              ; preds = %304
  %309 = load ptr, ptr %12, align 8, !tbaa !5
  %310 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %309)
          to label %311 unwind label %335

311:                                              ; preds = %308
  invoke void @_ZplRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %37, ptr noundef nonnull align 8 dereferenceable(16) %307, ptr noundef nonnull align 8 dereferenceable(16) %310)
          to label %312 unwind label %335

312:                                              ; preds = %311
  invoke void @_ZmldRK7R2Point(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %36, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(16) %37)
          to label %313 unwind label %335

313:                                              ; preds = %312
  invoke void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100) %305, ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %314 unwind label %335

314:                                              ; preds = %313
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %339

315:                                              ; preds = %273, %270
  %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
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  br label %379

319:                                              ; preds = %281, %280, %277, %274
  %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
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  br label %378

323:                                              ; preds = %282
  %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
  br label %378

327:                                              ; preds = %351, %343, %339, %298, %295, %289, %286, %283
  %328 = landingpad { ptr, i32 }
          cleanup
  %329 = extractvalue { ptr, i32 } %328, 0
  store ptr %329, ptr %7, align 8
  %330 = extractvalue { ptr, i32 } %328, 1
  store i32 %330, ptr %8, align 4
  br label %377

331:                                              ; preds = %285
  %332 = landingpad { ptr, i32 }
          cleanup
  %333 = extractvalue { ptr, i32 } %332, 0
  store ptr %333, ptr %7, align 8
  %334 = extractvalue { ptr, i32 } %332, 1
  store i32 %334, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %284, i64 noundef 104) #10
  br label %377

335:                                              ; preds = %313, %312, %311, %308, %304
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %7, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %377

339:                                              ; preds = %314, %302, %293
  %340 = getelementptr inbounds %class.R3TriangleArray, ptr %49, i32 0, i32 1
  %341 = load ptr, ptr %33, align 8, !tbaa !5
  %342 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %340, ptr noundef %341)
          to label %343 unwind label %327

343:                                              ; preds = %339
  %344 = load ptr, ptr %9, align 8, !tbaa !5
  %345 = load ptr, ptr %11, align 8, !tbaa !5
  %346 = load ptr, ptr %33, align 8, !tbaa !5
  %347 = load ptr, ptr %10, align 8, !tbaa !5
  %348 = load ptr, ptr %344, align 8, !tbaa !11
  %349 = getelementptr inbounds ptr, ptr %348, i64 70
  %350 = load ptr, ptr %349, align 8
  invoke void %350(ptr noundef nonnull align 8 dereferenceable(132) %344, ptr noundef %345, ptr noundef %346, ptr noundef %347)
          to label %351 unwind label %327

351:                                              ; preds = %343
  %352 = load ptr, ptr %9, align 8, !tbaa !5
  %353 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %352)
          to label %354 unwind label %327

354:                                              ; preds = %351
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %355 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #9
          to label %356 unwind label %368

356:                                              ; preds = %354
  %357 = load ptr, ptr %12, align 8, !tbaa !5
  %358 = load ptr, ptr %10, align 8, !tbaa !5
  %359 = load ptr, ptr %33, align 8, !tbaa !5
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %355, ptr noundef %357, ptr noundef %358, ptr noundef %359)
          to label %360 unwind label %372

360:                                              ; preds = %356
  store ptr %355, ptr %38, align 8, !tbaa !5
  %361 = getelementptr inbounds %class.R3TriangleArray, ptr %49, i32 0, i32 2
  %362 = load ptr, ptr %38, align 8, !tbaa !5
  %363 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %361, ptr noundef %362)
          to label %364 unwind label %368

364:                                              ; preds = %360
  %365 = load ptr, ptr %38, align 8, !tbaa !5
  %366 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %365)
          to label %367 unwind label %368

367:                                              ; preds = %364
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #8
  br label %503

368:                                              ; preds = %364, %360, %354
  %369 = landingpad { ptr, i32 }
          cleanup
  %370 = extractvalue { ptr, i32 } %369, 0
  store ptr %370, ptr %7, align 8
  %371 = extractvalue { ptr, i32 } %369, 1
  store i32 %371, ptr %8, align 4
  br label %376

372:                                              ; preds = %356
  %373 = landingpad { ptr, i32 }
          cleanup
  %374 = extractvalue { ptr, i32 } %373, 0
  store ptr %374, ptr %7, align 8
  %375 = extractvalue { ptr, i32 } %373, 1
  store i32 %375, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %355, i64 noundef 136) #10
  br label %376

376:                                              ; preds = %372, %368
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %377

377:                                              ; preds = %376, %335, %331, %327
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  br label %378

378:                                              ; preds = %377, %323, %319
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #8
  br label %379

379:                                              ; preds = %378, %315
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #8
  br label %505

380:                                              ; preds = %266, %262, %258
  %381 = load double, ptr %18, align 8, !tbaa !9
  %382 = load double, ptr %5, align 8, !tbaa !9
  %383 = fcmp ogt double %381, %382
  br i1 %383, label %384, label %502

384:                                              ; preds = %380
  %385 = load double, ptr %18, align 8, !tbaa !9
  %386 = load double, ptr %16, align 8, !tbaa !9
  %387 = fcmp oge double %385, %386
  br i1 %387, label %388, label %502

388:                                              ; preds = %384
  %389 = load double, ptr %18, align 8, !tbaa !9
  %390 = load double, ptr %17, align 8, !tbaa !9
  %391 = fcmp oge double %389, %390
  br i1 %391, label %392, label %502

392:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 24, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %40) #8
  %393 = load ptr, ptr %15, align 8, !tbaa !5
  %394 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZplRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %40, ptr noundef nonnull align 8 dereferenceable(24) %393, ptr noundef nonnull align 8 dereferenceable(24) %394)
          to label %395 unwind label %437

395:                                              ; preds = %392
  invoke void @_ZmldRK7R3Point(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %39, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %396 unwind label %437

396:                                              ; preds = %395
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %42) #8
  %397 = load ptr, ptr %12, align 8, !tbaa !5
  %398 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %397)
          to label %399 unwind label %441

399:                                              ; preds = %396
  %400 = load ptr, ptr %10, align 8, !tbaa !5
  %401 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %400)
          to label %402 unwind label %441

402:                                              ; preds = %399
  invoke void @_ZplRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %42, ptr noundef nonnull align 8 dereferenceable(24) %398, ptr noundef nonnull align 8 dereferenceable(24) %401)
          to label %403 unwind label %441

403:                                              ; preds = %402
  invoke void @_ZmldRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %41, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %42)
          to label %404 unwind label %441

404:                                              ; preds = %403
  call void @llvm.lifetime.end.p0(i64 24, ptr %42) #8
  invoke void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %41)
          to label %405 unwind label %445

405:                                              ; preds = %404
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %406 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #9
          to label %407 unwind label %449

407:                                              ; preds = %405
  invoke void @_ZN16R3TriangleVertexC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(100) %406, ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(24) %41)
          to label %408 unwind label %453

408:                                              ; preds = %407
  store ptr %406, ptr %43, align 8, !tbaa !5
  %409 = load ptr, ptr %12, align 8, !tbaa !5
  %410 = getelementptr inbounds %class.R3TriangleVertex, ptr %409, i32 0, i32 4
  invoke void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %44, i64 noundef 512)
          to label %411 unwind label %449

411:                                              ; preds = %408
  %412 = getelementptr inbounds %class.RNFlags, ptr %44, i32 0, i32 0
  %413 = load i64, ptr %412, align 8
  %414 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %410, i64 %413)
          to label %415 unwind label %449

415:                                              ; preds = %411
  %416 = icmp ne i32 %414, 0
  br i1 %416, label %417, label %461

417:                                              ; preds = %415
  %418 = load ptr, ptr %10, align 8, !tbaa !5
  %419 = getelementptr inbounds %class.R3TriangleVertex, ptr %418, i32 0, i32 4
  invoke void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %45, i64 noundef 512)
          to label %420 unwind label %449

420:                                              ; preds = %417
  %421 = getelementptr inbounds %class.RNFlags, ptr %45, i32 0, i32 0
  %422 = load i64, ptr %421, align 8
  %423 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %419, i64 %422)
          to label %424 unwind label %449

424:                                              ; preds = %420
  %425 = icmp ne i32 %423, 0
  br i1 %425, label %426, label %461

426:                                              ; preds = %424
  %427 = load ptr, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %47) #8
  %428 = load ptr, ptr %12, align 8, !tbaa !5
  %429 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %428)
          to label %430 unwind label %457

430:                                              ; preds = %426
  %431 = load ptr, ptr %10, align 8, !tbaa !5
  %432 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %431)
          to label %433 unwind label %457

433:                                              ; preds = %430
  invoke void @_ZplRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %47, ptr noundef nonnull align 8 dereferenceable(16) %429, ptr noundef nonnull align 8 dereferenceable(16) %432)
          to label %434 unwind label %457

434:                                              ; preds = %433
  invoke void @_ZmldRK7R2Point(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %46, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(16) %47)
          to label %435 unwind label %457

435:                                              ; preds = %434
  invoke void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100) %427, ptr noundef nonnull align 8 dereferenceable(16) %46)
          to label %436 unwind label %457

436:                                              ; preds = %435
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #8
  br label %461

437:                                              ; preds = %395, %392
  %438 = landingpad { ptr, i32 }
          cleanup
  %439 = extractvalue { ptr, i32 } %438, 0
  store ptr %439, ptr %7, align 8
  %440 = extractvalue { ptr, i32 } %438, 1
  store i32 %440, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #8
  br label %501

441:                                              ; preds = %403, %402, %399, %396
  %442 = landingpad { ptr, i32 }
          cleanup
  %443 = extractvalue { ptr, i32 } %442, 0
  store ptr %443, ptr %7, align 8
  %444 = extractvalue { ptr, i32 } %442, 1
  store i32 %444, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %42) #8
  br label %500

445:                                              ; preds = %404
  %446 = landingpad { ptr, i32 }
          cleanup
  %447 = extractvalue { ptr, i32 } %446, 0
  store ptr %447, ptr %7, align 8
  %448 = extractvalue { ptr, i32 } %446, 1
  store i32 %448, ptr %8, align 4
  br label %500

449:                                              ; preds = %473, %465, %461, %420, %417, %411, %408, %405
  %450 = landingpad { ptr, i32 }
          cleanup
  %451 = extractvalue { ptr, i32 } %450, 0
  store ptr %451, ptr %7, align 8
  %452 = extractvalue { ptr, i32 } %450, 1
  store i32 %452, ptr %8, align 4
  br label %499

453:                                              ; preds = %407
  %454 = landingpad { ptr, i32 }
          cleanup
  %455 = extractvalue { ptr, i32 } %454, 0
  store ptr %455, ptr %7, align 8
  %456 = extractvalue { ptr, i32 } %454, 1
  store i32 %456, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %406, i64 noundef 104) #10
  br label %499

457:                                              ; preds = %435, %434, %433, %430, %426
  %458 = landingpad { ptr, i32 }
          cleanup
  %459 = extractvalue { ptr, i32 } %458, 0
  store ptr %459, ptr %7, align 8
  %460 = extractvalue { ptr, i32 } %458, 1
  store i32 %460, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #8
  br label %499

461:                                              ; preds = %436, %424, %415
  %462 = getelementptr inbounds %class.R3TriangleArray, ptr %49, i32 0, i32 1
  %463 = load ptr, ptr %43, align 8, !tbaa !5
  %464 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %462, ptr noundef %463)
          to label %465 unwind label %449

465:                                              ; preds = %461
  %466 = load ptr, ptr %9, align 8, !tbaa !5
  %467 = load ptr, ptr %12, align 8, !tbaa !5
  %468 = load ptr, ptr %43, align 8, !tbaa !5
  %469 = load ptr, ptr %11, align 8, !tbaa !5
  %470 = load ptr, ptr %466, align 8, !tbaa !11
  %471 = getelementptr inbounds ptr, ptr %470, i64 70
  %472 = load ptr, ptr %471, align 8
  invoke void %472(ptr noundef nonnull align 8 dereferenceable(132) %466, ptr noundef %467, ptr noundef %468, ptr noundef %469)
          to label %473 unwind label %449

473:                                              ; preds = %465
  %474 = load ptr, ptr %9, align 8, !tbaa !5
  %475 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %474)
          to label %476 unwind label %449

476:                                              ; preds = %473
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %477 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #9
          to label %478 unwind label %490

478:                                              ; preds = %476
  %479 = load ptr, ptr %10, align 8, !tbaa !5
  %480 = load ptr, ptr %11, align 8, !tbaa !5
  %481 = load ptr, ptr %43, align 8, !tbaa !5
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %477, ptr noundef %479, ptr noundef %480, ptr noundef %481)
          to label %482 unwind label %494

482:                                              ; preds = %478
  store ptr %477, ptr %48, align 8, !tbaa !5
  %483 = getelementptr inbounds %class.R3TriangleArray, ptr %49, i32 0, i32 2
  %484 = load ptr, ptr %48, align 8, !tbaa !5
  %485 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %483, ptr noundef %484)
          to label %486 unwind label %490

486:                                              ; preds = %482
  %487 = load ptr, ptr %48, align 8, !tbaa !5
  %488 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %487)
          to label %489 unwind label %490

489:                                              ; preds = %486
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #8
  br label %502

490:                                              ; preds = %486, %482, %476
  %491 = landingpad { ptr, i32 }
          cleanup
  %492 = extractvalue { ptr, i32 } %491, 0
  store ptr %492, ptr %7, align 8
  %493 = extractvalue { ptr, i32 } %491, 1
  store i32 %493, ptr %8, align 4
  br label %498

494:                                              ; preds = %478
  %495 = landingpad { ptr, i32 }
          cleanup
  %496 = extractvalue { ptr, i32 } %495, 0
  store ptr %496, ptr %7, align 8
  %497 = extractvalue { ptr, i32 } %495, 1
  store i32 %497, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %477, i64 noundef 136) #10
  br label %498

498:                                              ; preds = %494, %490
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  br label %499

499:                                              ; preds = %498, %457, %453, %449
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %500

500:                                              ; preds = %499, %445, %441
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #8
  br label %501

501:                                              ; preds = %500, %437
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #8
  br label %505

502:                                              ; preds = %489, %388, %384, %380
  br label %503

503:                                              ; preds = %502, %367
  br label %504

504:                                              ; preds = %503, %245
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %54, !llvm.loop !13

505:                                              ; preds = %501, %379, %257, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %506

506:                                              ; preds = %505, %185
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %507

507:                                              ; preds = %506, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %508

508:                                              ; preds = %507, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %509

509:                                              ; preds = %508, %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %510

510:                                              ; preds = %509, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %511

511:                                              ; preds = %510, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %512

512:                                              ; preds = %511, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %513

513:                                              ; preds = %512, %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %514

514:                                              ; preds = %513, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %520

515:                                              ; preds = %56
  %516 = load ptr, ptr %49, align 8, !tbaa !11
  %517 = getelementptr inbounds ptr, ptr %516, i64 71
  %518 = load ptr, ptr %517, align 8
  invoke void %518(ptr noundef nonnull align 8 dereferenceable(96) %49)
          to label %519 unwind label %149

519:                                              ; preds = %515
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void

520:                                              ; preds = %514, %149
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %521

521:                                              ; preds = %520
  %522 = load ptr, ptr %7, align 8
  %523 = load i32, ptr %8, align 4
  %524 = insertvalue { ptr, i32 } poison, ptr %522, 0
  %525 = insertvalue { ptr, i32 } %524, i32 %523, 1
  resume { ptr, i32 } %525
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8RNVArray10RemoveTailEv(ptr noundef nonnull align 8 dereferenceable(16)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK7R3Point(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) #7

declare void @_ZplRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK8R3Vector(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) #7

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100)) #5 align 2

declare void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #6

declare void @_ZN16R3TriangleVertexC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8), i64) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(16)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK7R2Point(ptr dead_on_unwind noalias writable sret(%class.R2Point) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(16)) #7

declare void @_ZplRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Point) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100)) #5 align 2

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


; 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.0 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.RNFlags = type { i64 }
%class.R2Point = type { [2 x double] }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK10R3Triangle2V0Ev(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK10R3Triangle2V1Ev(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK10R3Triangle2V2Ev(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #5 align 2

declare void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex8PositionEv(ptr noundef nonnull align 8 dereferenceable(100)) local_unnamed_addr #5 align 2

declare noundef double @_Z17R3SquaredDistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15R3TriangleArray9SubdivideEd(ptr noundef nonnull align 8 dereferenceable(96) %0, double noundef %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.RNArray.0, align 8
  %4 = alloca %class.R3Point, align 8
  %5 = alloca %class.R3Point, align 8
  %6 = alloca %class.R3Vector, align 8
  %7 = alloca %class.R3Vector, align 8
  %8 = alloca %class.RNFlags, align 8
  %9 = alloca %class.RNFlags, align 8
  %10 = alloca %class.R2Point, align 8
  %11 = alloca %class.R2Point, align 8
  %12 = alloca %class.R3Point, align 8
  %13 = alloca %class.R3Point, align 8
  %14 = alloca %class.R3Vector, align 8
  %15 = alloca %class.R3Vector, align 8
  %16 = alloca %class.RNFlags, align 8
  %17 = alloca %class.RNFlags, align 8
  %18 = alloca %class.R2Point, align 8
  %19 = alloca %class.R2Point, align 8
  %20 = alloca %class.R3Point, align 8
  %21 = alloca %class.R3Point, align 8
  %22 = alloca %class.R3Vector, align 8
  %23 = alloca %class.R3Vector, align 8
  %24 = alloca %class.RNFlags, align 8
  %25 = alloca %class.RNFlags, align 8
  %26 = alloca %class.R2Point, align 8
  %27 = alloca %class.R2Point, align 8
  %28 = fmul double %1, %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZN7RNArrayIP10R3TriangleEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %29)
  %30 = call noundef i32 @_ZNK8RNVArray7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not158 = icmp eq i32 %30, 0
  br i1 %.not158, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %31 = getelementptr inbounds i8, ptr %0, i64 8
  br label %32

32:                                               ; preds = %.lr.ph, %249
  %33 = invoke noundef ptr @_ZNK7RNArrayIP10R3TriangleE4TailEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %34 unwind label %79

34:                                               ; preds = %32
  invoke void @_ZN8RNVArray10RemoveTailEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %35 unwind label %79

35:                                               ; preds = %34
  %36 = call noundef ptr @_ZNK10R3Triangle2V0Ev(ptr noundef nonnull align 8 dereferenceable(132) %33)
  %37 = call noundef ptr @_ZNK10R3Triangle2V1Ev(ptr noundef nonnull align 8 dereferenceable(132) %33)
  %38 = call noundef ptr @_ZNK10R3Triangle2V2Ev(ptr noundef nonnull align 8 dereferenceable(132) %33)
  %39 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex8PositionEv(ptr noundef nonnull align 8 dereferenceable(100) %36)
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex8PositionEv(ptr noundef nonnull align 8 dereferenceable(100) %37)
  %41 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex8PositionEv(ptr noundef nonnull align 8 dereferenceable(100) %38)
  %42 = invoke noundef double @_Z17R3SquaredDistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %43 unwind label %81

43:                                               ; preds = %35
  %44 = invoke noundef double @_Z17R3SquaredDistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(24) %41)
          to label %45 unwind label %83

45:                                               ; preds = %43
  %46 = invoke noundef double @_Z17R3SquaredDistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(24) %39)
          to label %47 unwind label %85

47:                                               ; preds = %45
  %48 = fcmp ule double %42, %28
  %49 = fcmp ult double %42, %44
  %or.cond = or i1 %48, %49
  %50 = fcmp ult double %42, %46
  %or.cond139 = or i1 %or.cond, %50
  br i1 %or.cond139, label %121, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  invoke void @_ZplRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %52 unwind label %87

52:                                               ; preds = %51
  invoke void @_ZmldRK7R3Point(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %4, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %53 unwind label %87

53:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  %54 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %36)
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %37)
  invoke void @_ZplRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 8 dereferenceable(24) %55)
          to label %56 unwind label %89

56:                                               ; preds = %53
  invoke void @_ZmldRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %6, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %57 unwind label %89

57:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  invoke void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %58 unwind label %91

58:                                               ; preds = %57
  %59 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #9
          to label %60 unwind label %93

60:                                               ; preds = %58
  invoke void @_ZN16R3TriangleVertexC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(100) %59, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %61 unwind label %95

61:                                               ; preds = %60
  %62 = getelementptr inbounds i8, ptr %36, i64 88
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef 512)
  %63 = load i64, ptr %8, align 8
  %64 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %62, i64 %63)
          to label %65 unwind label %93

65:                                               ; preds = %61
  %.not127 = icmp eq i32 %64, 0
  br i1 %.not127, label %99, label %66

66:                                               ; preds = %65
  %67 = getelementptr inbounds i8, ptr %37, i64 88
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef 512)
  %68 = load i64, ptr %9, align 8
  %69 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %67, i64 %68)
          to label %70 unwind label %93

70:                                               ; preds = %66
  %.not128 = icmp eq i32 %69, 0
  br i1 %.not128, label %99, label %71

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %36)
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %37)
  invoke void @_ZplRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %74 unwind label %97

74:                                               ; preds = %71
  invoke void @_ZmldRK7R2Point(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %10, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %75 unwind label %97

75:                                               ; preds = %74
  invoke void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100) %59, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %76 unwind label %97

76:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %99

77:                                               ; preds = %._crit_edge
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %255

79:                                               ; preds = %34, %32
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %255

81:                                               ; preds = %35
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %255

83:                                               ; preds = %43
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %255

85:                                               ; preds = %45
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %255

87:                                               ; preds = %52, %51
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %120

89:                                               ; preds = %56, %53
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %119

91:                                               ; preds = %57
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %119

93:                                               ; preds = %105, %101, %99, %66, %61, %58
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %119

95:                                               ; preds = %60
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %59, i64 noundef 104) #10
  br label %119

97:                                               ; preds = %75, %74, %71
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %119

99:                                               ; preds = %76, %70, %65
  %100 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull %59)
          to label %101 unwind label %93

101:                                              ; preds = %99
  %102 = load ptr, ptr %33, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i64 560
  %104 = load ptr, ptr %103, align 8
  invoke void %104(ptr noundef nonnull align 8 dereferenceable(132) %33, ptr noundef nonnull %36, ptr noundef nonnull %59, ptr noundef nonnull %38)
          to label %105 unwind label %93

105:                                              ; preds = %101
  %106 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %33)
          to label %107 unwind label %93

107:                                              ; preds = %105
  %108 = invoke noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #9
          to label %109 unwind label %115

109:                                              ; preds = %107
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %108, ptr noundef nonnull %37, ptr noundef nonnull %38, ptr noundef nonnull %59)
          to label %110 unwind label %117

110:                                              ; preds = %109
  %111 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull %108)
          to label %112 unwind label %115

112:                                              ; preds = %110
  %113 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %108)
          to label %114 unwind label %115

114:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %249

115:                                              ; preds = %112, %110, %107
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %119

117:                                              ; preds = %109
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %108, i64 noundef 136) #10
  br label %119

119:                                              ; preds = %93, %95, %97, %117, %115, %91, %89
  %.pn129.pn.pn = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ], [ %94, %93 ], [ %98, %97 ], [ %96, %95 ], [ %116, %115 ], [ %118, %117 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %120

120:                                              ; preds = %119, %87
  %.pn129.pn.pn.pn = phi { ptr, i32 } [ %.pn129.pn.pn, %119 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %255

121:                                              ; preds = %47
  %122 = fcmp ule double %44, %28
  %123 = fcmp ult double %44, %42
  %or.cond140 = or i1 %122, %123
  %124 = fcmp ult double %44, %46
  %or.cond141 = or i1 %or.cond140, %124
  br i1 %or.cond141, label %185, label %125

125:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  invoke void @_ZplRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(24) %41)
          to label %126 unwind label %151

126:                                              ; preds = %125
  invoke void @_ZmldRK7R3Point(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %12, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %127 unwind label %151

127:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #8
  %128 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %37)
  %129 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %38)
  invoke void @_ZplRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %128, ptr noundef nonnull align 8 dereferenceable(24) %129)
          to label %130 unwind label %153

130:                                              ; preds = %127
  invoke void @_ZmldRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %14, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %131 unwind label %153

131:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  invoke void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %132 unwind label %155

132:                                              ; preds = %131
  %133 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #9
          to label %134 unwind label %157

134:                                              ; preds = %132
  invoke void @_ZN16R3TriangleVertexC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(100) %133, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %135 unwind label %159

135:                                              ; preds = %134
  %136 = getelementptr inbounds i8, ptr %37, i64 88
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %16, i64 noundef 512)
  %137 = load i64, ptr %16, align 8
  %138 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %136, i64 %137)
          to label %139 unwind label %157

139:                                              ; preds = %135
  %.not120 = icmp eq i32 %138, 0
  br i1 %.not120, label %163, label %140

140:                                              ; preds = %139
  %141 = getelementptr inbounds i8, ptr %38, i64 88
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %17, i64 noundef 512)
  %142 = load i64, ptr %17, align 8
  %143 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %141, i64 %142)
          to label %144 unwind label %157

144:                                              ; preds = %140
  %.not121 = icmp eq i32 %143, 0
  br i1 %.not121, label %163, label %145

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  %146 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %37)
  %147 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %38)
  invoke void @_ZplRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %19, ptr noundef nonnull align 8 dereferenceable(16) %146, ptr noundef nonnull align 8 dereferenceable(16) %147)
          to label %148 unwind label %161

148:                                              ; preds = %145
  invoke void @_ZmldRK7R2Point(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %18, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %149 unwind label %161

149:                                              ; preds = %148
  invoke void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100) %133, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %150 unwind label %161

150:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  br label %163

151:                                              ; preds = %126, %125
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %184

153:                                              ; preds = %130, %127
  %154 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  br label %183

155:                                              ; preds = %131
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %183

157:                                              ; preds = %169, %165, %163, %140, %135, %132
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %183

159:                                              ; preds = %134
  %160 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %133, i64 noundef 104) #10
  br label %183

161:                                              ; preds = %149, %148, %145
  %162 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  br label %183

163:                                              ; preds = %150, %144, %139
  %164 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull %133)
          to label %165 unwind label %157

165:                                              ; preds = %163
  %166 = load ptr, ptr %33, align 8, !tbaa !5
  %167 = getelementptr inbounds i8, ptr %166, i64 560
  %168 = load ptr, ptr %167, align 8
  invoke void %168(ptr noundef nonnull align 8 dereferenceable(132) %33, ptr noundef nonnull %37, ptr noundef nonnull %133, ptr noundef nonnull %36)
          to label %169 unwind label %157

169:                                              ; preds = %165
  %170 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %33)
          to label %171 unwind label %157

171:                                              ; preds = %169
  %172 = invoke noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #9
          to label %173 unwind label %179

173:                                              ; preds = %171
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %172, ptr noundef nonnull %38, ptr noundef nonnull %36, ptr noundef nonnull %133)
          to label %174 unwind label %181

174:                                              ; preds = %173
  %175 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull %172)
          to label %176 unwind label %179

176:                                              ; preds = %174
  %177 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %172)
          to label %178 unwind label %179

178:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  br label %249

179:                                              ; preds = %176, %174, %171
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %183

181:                                              ; preds = %173
  %182 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %172, i64 noundef 136) #10
  br label %183

183:                                              ; preds = %157, %159, %161, %181, %179, %155, %153
  %.pn122.pn.pn = phi { ptr, i32 } [ %156, %155 ], [ %154, %153 ], [ %158, %157 ], [ %162, %161 ], [ %160, %159 ], [ %180, %179 ], [ %182, %181 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  br label %184

184:                                              ; preds = %183, %151
  %.pn122.pn.pn.pn = phi { ptr, i32 } [ %.pn122.pn.pn, %183 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  br label %255

185:                                              ; preds = %121
  %186 = fcmp ule double %46, %28
  %187 = fcmp ult double %46, %42
  %or.cond142 = or i1 %186, %187
  %188 = fcmp ult double %46, %44
  %or.cond143 = or i1 %188, %or.cond142
  br i1 %or.cond143, label %249, label %189

189:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #8
  invoke void @_ZplRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(24) %39)
          to label %190 unwind label %215

190:                                              ; preds = %189
  invoke void @_ZmldRK7R3Point(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %20, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %191 unwind label %215

191:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #8
  %192 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %38)
  %193 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100) %36)
  invoke void @_ZplRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %192, ptr noundef nonnull align 8 dereferenceable(24) %193)
          to label %194 unwind label %217

194:                                              ; preds = %191
  invoke void @_ZmldRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %22, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %195 unwind label %217

195:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #8
  invoke void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %196 unwind label %219

196:                                              ; preds = %195
  %197 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #9
          to label %198 unwind label %221

198:                                              ; preds = %196
  invoke void @_ZN16R3TriangleVertexC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(100) %197, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %199 unwind label %223

199:                                              ; preds = %198
  %200 = getelementptr inbounds i8, ptr %38, i64 88
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef 512)
  %201 = load i64, ptr %24, align 8
  %202 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %200, i64 %201)
          to label %203 unwind label %221

203:                                              ; preds = %199
  %.not114 = icmp eq i32 %202, 0
  br i1 %.not114, label %227, label %204

204:                                              ; preds = %203
  %205 = getelementptr inbounds i8, ptr %36, i64 88
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %25, i64 noundef 512)
  %206 = load i64, ptr %25, align 8
  %207 = invoke noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %205, i64 %206)
          to label %208 unwind label %221

208:                                              ; preds = %204
  %.not115 = icmp eq i32 %207, 0
  br i1 %.not115, label %227, label %209

209:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #8
  %210 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %38)
  %211 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100) %36)
  invoke void @_ZplRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %27, ptr noundef nonnull align 8 dereferenceable(16) %210, ptr noundef nonnull align 8 dereferenceable(16) %211)
          to label %212 unwind label %225

212:                                              ; preds = %209
  invoke void @_ZmldRK7R2Point(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %26, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %213 unwind label %225

213:                                              ; preds = %212
  invoke void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100) %197, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %214 unwind label %225

214:                                              ; preds = %213
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #8
  br label %227

215:                                              ; preds = %190, %189
  %216 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #8
  br label %248

217:                                              ; preds = %194, %191
  %218 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #8
  br label %247

219:                                              ; preds = %195
  %220 = landingpad { ptr, i32 }
          cleanup
  br label %247

221:                                              ; preds = %233, %229, %227, %204, %199, %196
  %222 = landingpad { ptr, i32 }
          cleanup
  br label %247

223:                                              ; preds = %198
  %224 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %197, i64 noundef 104) #10
  br label %247

225:                                              ; preds = %213, %212, %209
  %226 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #8
  br label %247

227:                                              ; preds = %214, %208, %203
  %228 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull %197)
          to label %229 unwind label %221

229:                                              ; preds = %227
  %230 = load ptr, ptr %33, align 8, !tbaa !5
  %231 = getelementptr inbounds i8, ptr %230, i64 560
  %232 = load ptr, ptr %231, align 8
  invoke void %232(ptr noundef nonnull align 8 dereferenceable(132) %33, ptr noundef nonnull %38, ptr noundef nonnull %197, ptr noundef nonnull %37)
          to label %233 unwind label %221

233:                                              ; preds = %229
  %234 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %33)
          to label %235 unwind label %221

235:                                              ; preds = %233
  %236 = invoke noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #9
          to label %237 unwind label %243

237:                                              ; preds = %235
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %236, ptr noundef nonnull %36, ptr noundef nonnull %37, ptr noundef nonnull %197)
          to label %238 unwind label %245

238:                                              ; preds = %237
  %239 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull %236)
          to label %240 unwind label %243

240:                                              ; preds = %238
  %241 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %236)
          to label %242 unwind label %243

242:                                              ; preds = %240
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #8
  br label %249

243:                                              ; preds = %240, %238, %235
  %244 = landingpad { ptr, i32 }
          cleanup
  br label %247

245:                                              ; preds = %237
  %246 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %236, i64 noundef 136) #10
  br label %247

247:                                              ; preds = %221, %223, %225, %245, %243, %219, %217
  %.pn.pn.pn = phi { ptr, i32 } [ %220, %219 ], [ %218, %217 ], [ %222, %221 ], [ %226, %225 ], [ %224, %223 ], [ %244, %243 ], [ %246, %245 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  br label %248

248:                                              ; preds = %247, %215
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %247 ], [ %216, %215 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #8
  br label %255

249:                                              ; preds = %178, %242, %185, %114
  %250 = call noundef i32 @_ZNK8RNVArray7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not = icmp eq i32 %250, 0
  br i1 %.not, label %32, label %._crit_edge, !llvm.loop !8

._crit_edge:                                      ; preds = %249, %2
  %251 = load ptr, ptr %0, align 8, !tbaa !5
  %252 = getelementptr inbounds i8, ptr %251, i64 568
  %253 = load ptr, ptr %252, align 8
  invoke void %253(ptr noundef nonnull align 8 dereferenceable(96) %0)
          to label %254 unwind label %77

254:                                              ; preds = %._crit_edge
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  ret void

255:                                              ; preds = %79, %83, %248, %184, %120, %85, %81, %77
  %.pn129.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %78, %77 ], [ %80, %79 ], [ %82, %81 ], [ %84, %83 ], [ %.pn129.pn.pn.pn, %120 ], [ %.pn122.pn.pn.pn, %184 ], [ %.pn.pn.pn.pn, %248 ], [ %86, %85 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn129.pn.pn.pn.pn.pn.pn.pn.pn
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8RNVArray10RemoveTailEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK7R3Point(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #7

declare void @_ZplRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK8R3Vector(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #7

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK16R3TriangleVertex6NormalEv(ptr noundef nonnull align 8 dereferenceable(100)) local_unnamed_addr #5 align 2

declare void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

declare void @_ZN16R3TriangleVertexC1ERK7R3PointRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8), i64) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK7R2Point(ptr dead_on_unwind noalias writable sret(%class.R2Point) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #7

declare void @_ZplRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Point) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK16R3TriangleVertex13TextureCoordsEv(ptr noundef nonnull align 8 dereferenceable(100)) local_unnamed_addr #5 align 2

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass