; LLVM IR from achilles288/robot-monitor-graphics :: src/base/mesh_normals.ll (ZN3rmg4Mesh13buildNormals2Ev)

; 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.std::unordered_multimap" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.rmg::Vec3" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }
%"struct.std::pair" = type { %"struct.rmg::Vec3", i32 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair.2" = type { %"struct.std::__detail::_Node_iterator", %"struct.std::__detail::_Node_iterator" }
%"class.rmg::Mesh" = type <{ ptr, ptr, ptr, ptr, i32, [4 x i8], ptr, i32, [4 x i8] }>
%"struct.std::pair.4" = type { %"struct.rmg::Vec3", i32 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg4Mesh13buildNormals2Ev(ptr noundef nonnull align 8 dereferenceable(52) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::unordered_multimap", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.rmg::Vec3", align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca { <2 x float>, float }, align 8
  %12 = alloca %"struct.rmg::Vec3", align 4
  %13 = alloca { <2 x float>, float }, align 8
  %14 = alloca %"struct.rmg::Vec3", align 4
  %15 = alloca { <2 x float>, float }, align 8
  %16 = alloca %"struct.rmg::Vec3", align 4
  %17 = alloca %"struct.rmg::Vec3", align 4
  %18 = alloca { <2 x float>, float }, align 8
  %19 = alloca { <2 x float>, float }, align 8
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca %"struct.rmg::Vec3", align 4
  %24 = alloca { <2 x float>, float }, align 8
  %25 = alloca %"struct.rmg::Vec3", align 4
  %26 = alloca { <2 x float>, float }, align 8
  %27 = alloca %"struct.rmg::Vec3", align 4
  %28 = alloca { <2 x float>, float }, align 8
  %29 = alloca %"struct.std::pair", align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %32 = alloca %"struct.std::pair", align 4
  %33 = alloca i32, align 4
  %34 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %35 = alloca %"struct.std::pair", align 4
  %36 = alloca i32, align 4
  %37 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca %"struct.std::pair.2", align 8
  %41 = alloca i32, align 4
  %42 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %43 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %44 = alloca %"struct.rmg::Vec3", align 4
  %45 = alloca %"struct.rmg::Vec3", align 4
  %46 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %47 = alloca %"struct.rmg::Vec3", align 4
  %48 = alloca float, align 4
  %49 = alloca %"struct.rmg::Vec3", align 4
  %50 = alloca { <2 x float>, float }, align 8
  %51 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %52 = alloca %"struct.rmg::Vec3", align 4
  %53 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %54 = load ptr, ptr %2, align 8
  %55 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 4
  %56 = load i32, ptr %55, align 8, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = mul i64 12, %57
  %59 = call noalias ptr @malloc(i64 noundef %58) #11
  %60 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 2
  store ptr %59, ptr %60, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #12
  %61 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 4
  %62 = load i32, ptr %61, align 8, !tbaa !9
  %63 = udiv i32 %62, 3
  store i32 %63, ptr %3, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #12
  %64 = load i32, ptr %3, align 4, !tbaa !13
  %65 = zext i32 %64 to i64
  %66 = mul i64 12, %65
  %67 = call noalias ptr @malloc(i64 noundef %66) #11
  store ptr %67, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #12
  %68 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 4
  %69 = load i32, ptr %68, align 8, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = mul i64 4, %70
  %72 = call noalias ptr @malloc(i64 noundef %71) #11
  store ptr %72, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #12
  call void @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #12
  store i32 0, ptr %7, align 4, !tbaa !13
  br label %73

73:                                               ; preds = %268, %1
  %74 = load i32, ptr %7, align 4, !tbaa !13
  %75 = load i32, ptr %3, align 4, !tbaa !13
  %76 = icmp ult i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #12
  br label %320

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #12
  %79 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !14
  %81 = load i32, ptr %7, align 4, !tbaa !13
  %82 = mul i32 %81, 3
  %83 = add i32 %82, 1
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds %"struct.rmg::Vec3", ptr %80, i64 %84
  %86 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !14
  %88 = load i32, ptr %7, align 4, !tbaa !13
  %89 = mul i32 %88, 3
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds %"struct.rmg::Vec3", ptr %87, i64 %90
  %92 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3miERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %85, ptr noundef nonnull align 4 dereferenceable(12) %91)
          to label %93 unwind label %271

93:                                               ; preds = %78
  %94 = getelementptr inbounds %"struct.rmg::Vec3", ptr %8, i32 0, i32 0
  %95 = getelementptr inbounds %union.anon, ptr %94, i32 0, i32 0
  store { <2 x float>, float } %92, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 8 %11, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #12
  %96 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !14
  %98 = load i32, ptr %7, align 4, !tbaa !13
  %99 = mul i32 %98, 3
  %100 = add i32 %99, 2
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds %"struct.rmg::Vec3", ptr %97, i64 %101
  %103 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !14
  %105 = load i32, ptr %7, align 4, !tbaa !13
  %106 = mul i32 %105, 3
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds %"struct.rmg::Vec3", ptr %104, i64 %107
  %109 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3miERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %102, ptr noundef nonnull align 4 dereferenceable(12) %108)
          to label %110 unwind label %275

110:                                              ; preds = %93
  %111 = getelementptr inbounds %"struct.rmg::Vec3", ptr %12, i32 0, i32 0
  %112 = getelementptr inbounds %union.anon, ptr %111, i32 0, i32 0
  store { <2 x float>, float } %109, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %112, ptr align 8 %13, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #12
  %113 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !14
  %115 = load i32, ptr %7, align 4, !tbaa !13
  %116 = mul i32 %115, 3
  %117 = add i32 %116, 2
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds %"struct.rmg::Vec3", ptr %114, i64 %118
  %120 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !14
  %122 = load i32, ptr %7, align 4, !tbaa !13
  %123 = mul i32 %122, 3
  %124 = add i32 %123, 1
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds %"struct.rmg::Vec3", ptr %121, i64 %125
  %127 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3miERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %119, ptr noundef nonnull align 4 dereferenceable(12) %126)
          to label %128 unwind label %279

128:                                              ; preds = %110
  %129 = getelementptr inbounds %"struct.rmg::Vec3", ptr %14, i32 0, i32 0
  %130 = getelementptr inbounds %union.anon, ptr %129, i32 0, i32 0
  store { <2 x float>, float } %127, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %130, ptr align 8 %15, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #12
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #12
  %131 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3mlERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %132 unwind label %283

132:                                              ; preds = %128
  %133 = getelementptr inbounds %"struct.rmg::Vec3", ptr %17, i32 0, i32 0
  %134 = getelementptr inbounds %union.anon, ptr %133, i32 0, i32 0
  store { <2 x float>, float } %131, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %134, ptr align 8 %18, i64 12, i1 false)
  %135 = invoke { <2 x float>, float } @_ZNK3rmg4Vec39normalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %136 unwind label %283

136:                                              ; preds = %132
  %137 = getelementptr inbounds %"struct.rmg::Vec3", ptr %16, i32 0, i32 0
  %138 = getelementptr inbounds %union.anon, ptr %137, i32 0, i32 0
  store { <2 x float>, float } %135, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %138, ptr align 8 %19, i64 12, i1 false)
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = load i32, ptr %7, align 4, !tbaa !13
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds %"struct.rmg::Vec3", ptr %139, i64 %141
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %142, ptr align 4 %16, i64 12, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #12
  %143 = invoke noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %144 unwind label %287

144:                                              ; preds = %136
  %145 = invoke noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %146 unwind label %287

146:                                              ; preds = %144
  %147 = invoke noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %148 unwind label %287

148:                                              ; preds = %146
  %149 = fmul float %145, %147
  %150 = fdiv float %143, %149
  store float %150, ptr %20, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #12
  %151 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3ngEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %152 unwind label %291

152:                                              ; preds = %148
  %153 = getelementptr inbounds %"struct.rmg::Vec3", ptr %23, i32 0, i32 0
  %154 = getelementptr inbounds %union.anon, ptr %153, i32 0, i32 0
  store { <2 x float>, float } %151, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %154, ptr align 8 %24, i64 12, i1 false)
  %155 = invoke noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %23)
          to label %156 unwind label %291

156:                                              ; preds = %152
  %157 = invoke noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %14)
          to label %158 unwind label %291

158:                                              ; preds = %156
  %159 = invoke noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %160 unwind label %291

160:                                              ; preds = %158
  %161 = fmul float %157, %159
  %162 = fdiv float %155, %161
  store float %162, ptr %21, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #12
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #12
  %163 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3ngEv(ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %164 unwind label %295

164:                                              ; preds = %160
  %165 = getelementptr inbounds %"struct.rmg::Vec3", ptr %25, i32 0, i32 0
  %166 = getelementptr inbounds %union.anon, ptr %165, i32 0, i32 0
  store { <2 x float>, float } %163, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %166, ptr align 8 %26, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #12
  %167 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3ngEv(ptr noundef nonnull align 4 dereferenceable(12) %14)
          to label %168 unwind label %299

168:                                              ; preds = %164
  %169 = getelementptr inbounds %"struct.rmg::Vec3", ptr %27, i32 0, i32 0
  %170 = getelementptr inbounds %union.anon, ptr %169, i32 0, i32 0
  store { <2 x float>, float } %167, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %170, ptr align 8 %28, i64 12, i1 false)
  %171 = invoke noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %27)
          to label %172 unwind label %299

172:                                              ; preds = %168
  %173 = invoke noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %174 unwind label %299

174:                                              ; preds = %172
  %175 = invoke noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %14)
          to label %176 unwind label %299

176:                                              ; preds = %174
  %177 = fmul float %173, %175
  %178 = fdiv float %171, %177
  store float %178, ptr %22, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #12
  %179 = load float, ptr %20, align 4, !tbaa !17
  %180 = fpext float %179 to double
  %181 = call double @acos(double noundef %180) #12
  %182 = fptrunc double %181 to float
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = load i32, ptr %7, align 4, !tbaa !13
  %185 = mul i32 %184, 3
  %186 = add i32 %185, 0
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds float, ptr %183, i64 %187
  store float %182, ptr %188, align 4, !tbaa !17
  %189 = load float, ptr %21, align 4, !tbaa !17
  %190 = fpext float %189 to double
  %191 = call double @acos(double noundef %190) #12
  %192 = fptrunc double %191 to float
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = load i32, ptr %7, align 4, !tbaa !13
  %195 = mul i32 %194, 3
  %196 = add i32 %195, 1
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds float, ptr %193, i64 %197
  store float %192, ptr %198, align 4, !tbaa !17
  %199 = load float, ptr %22, align 4, !tbaa !17
  %200 = fpext float %199 to double
  %201 = call double @acos(double noundef %200) #12
  %202 = fptrunc double %201 to float
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = load i32, ptr %7, align 4, !tbaa !13
  %205 = mul i32 %204, 3
  %206 = add i32 %205, 2
  %207 = zext i32 %206 to i64
  %208 = getelementptr inbounds float, ptr %203, i64 %207
  store float %202, ptr %208, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #12
  %209 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %210 = load ptr, ptr %209, align 8, !tbaa !14
  %211 = load i32, ptr %7, align 4, !tbaa !13
  %212 = mul i32 %211, 3
  %213 = add i32 %212, 0
  %214 = zext i32 %213 to i64
  %215 = getelementptr inbounds %"struct.rmg::Vec3", ptr %210, i64 %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #12
  %216 = load i32, ptr %7, align 4, !tbaa !13
  %217 = mul i32 %216, 3
  store i32 %217, ptr %30, align 4, !tbaa !13
  %218 = invoke { <2 x float>, i64 } @_ZSt9make_pairIRN3rmg4Vec3EjESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(12) %215, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %219 unwind label %304

219:                                              ; preds = %176
  %220 = getelementptr inbounds { <2 x float>, i64 }, ptr %29, i32 0, i32 0
  %221 = extractvalue { <2 x float>, i64 } %218, 0
  store <2 x float> %221, ptr %220, align 4
  %222 = getelementptr inbounds { <2 x float>, i64 }, ptr %29, i32 0, i32 1
  %223 = extractvalue { <2 x float>, i64 } %218, 1
  store i64 %223, ptr %222, align 4
  %224 = invoke ptr @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE6insertIS6_IS1_jEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueENSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(16) %29)
          to label %225 unwind label %304

225:                                              ; preds = %219
  %226 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %31, i32 0, i32 0
  %227 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %226, i32 0, i32 0
  store ptr %224, ptr %227, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #12
  %228 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %229 = load ptr, ptr %228, align 8, !tbaa !14
  %230 = load i32, ptr %7, align 4, !tbaa !13
  %231 = mul i32 %230, 3
  %232 = add i32 %231, 1
  %233 = zext i32 %232 to i64
  %234 = getelementptr inbounds %"struct.rmg::Vec3", ptr %229, i64 %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #12
  %235 = load i32, ptr %7, align 4, !tbaa !13
  %236 = mul i32 %235, 3
  %237 = add i32 %236, 1
  store i32 %237, ptr %33, align 4, !tbaa !13
  %238 = invoke { <2 x float>, i64 } @_ZSt9make_pairIRN3rmg4Vec3EjESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(12) %234, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %239 unwind label %308

239:                                              ; preds = %225
  %240 = getelementptr inbounds { <2 x float>, i64 }, ptr %32, i32 0, i32 0
  %241 = extractvalue { <2 x float>, i64 } %238, 0
  store <2 x float> %241, ptr %240, align 4
  %242 = getelementptr inbounds { <2 x float>, i64 }, ptr %32, i32 0, i32 1
  %243 = extractvalue { <2 x float>, i64 } %238, 1
  store i64 %243, ptr %242, align 4
  %244 = invoke ptr @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE6insertIS6_IS1_jEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueENSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(16) %32)
          to label %245 unwind label %308

245:                                              ; preds = %239
  %246 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %34, i32 0, i32 0
  %247 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %246, i32 0, i32 0
  store ptr %244, ptr %247, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #12
  %248 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %249 = load ptr, ptr %248, align 8, !tbaa !14
  %250 = load i32, ptr %7, align 4, !tbaa !13
  %251 = mul i32 %250, 3
  %252 = add i32 %251, 2
  %253 = zext i32 %252 to i64
  %254 = getelementptr inbounds %"struct.rmg::Vec3", ptr %249, i64 %253
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #12
  %255 = load i32, ptr %7, align 4, !tbaa !13
  %256 = mul i32 %255, 3
  %257 = add i32 %256, 2
  store i32 %257, ptr %36, align 4, !tbaa !13
  %258 = invoke { <2 x float>, i64 } @_ZSt9make_pairIRN3rmg4Vec3EjESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(12) %254, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %259 unwind label %312

259:                                              ; preds = %245
  %260 = getelementptr inbounds { <2 x float>, i64 }, ptr %35, i32 0, i32 0
  %261 = extractvalue { <2 x float>, i64 } %258, 0
  store <2 x float> %261, ptr %260, align 4
  %262 = getelementptr inbounds { <2 x float>, i64 }, ptr %35, i32 0, i32 1
  %263 = extractvalue { <2 x float>, i64 } %258, 1
  store i64 %263, ptr %262, align 4
  %264 = invoke ptr @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE6insertIS6_IS1_jEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueENSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(16) %35)
          to label %265 unwind label %312

265:                                              ; preds = %259
  %266 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %37, i32 0, i32 0
  %267 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %266, i32 0, i32 0
  store ptr %264, ptr %267, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #12
  br label %268

268:                                              ; preds = %265
  %269 = load i32, ptr %7, align 4, !tbaa !13
  %270 = add i32 %269, 1
  store i32 %270, ptr %7, align 4, !tbaa !13
  br label %73, !llvm.loop !19

271:                                              ; preds = %78
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %9, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %10, align 4
  br label %319

275:                                              ; preds = %93
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %9, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %10, align 4
  br label %318

279:                                              ; preds = %110
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %9, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %10, align 4
  br label %317

283:                                              ; preds = %132, %128
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %9, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #12
  br label %317

287:                                              ; preds = %146, %144, %136
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %9, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %10, align 4
  br label %316

291:                                              ; preds = %158, %156, %152, %148
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %9, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #12
  br label %316

295:                                              ; preds = %160
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %9, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %10, align 4
  br label %303

299:                                              ; preds = %174, %172, %168, %164
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %9, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #12
  br label %303

303:                                              ; preds = %299, %295
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #12
  br label %316

304:                                              ; preds = %219, %176
  %305 = landingpad { ptr, i32 }
          cleanup
  %306 = extractvalue { ptr, i32 } %305, 0
  store ptr %306, ptr %9, align 8
  %307 = extractvalue { ptr, i32 } %305, 1
  store i32 %307, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #12
  br label %316

308:                                              ; preds = %239, %225
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %9, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #12
  br label %316

312:                                              ; preds = %259, %245
  %313 = landingpad { ptr, i32 }
          cleanup
  %314 = extractvalue { ptr, i32 } %313, 0
  store ptr %314, ptr %9, align 8
  %315 = extractvalue { ptr, i32 } %313, 1
  store i32 %315, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #12
  br label %316

316:                                              ; preds = %312, %308, %304, %303, %291, %287
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #12
  br label %317

317:                                              ; preds = %316, %283, %279
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #12
  br label %318

318:                                              ; preds = %317, %275
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #12
  br label %319

319:                                              ; preds = %318, %271
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #12
  br label %450

320:                                              ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #12
  store i32 0, ptr %38, align 4, !tbaa !13
  br label %321

321:                                              ; preds = %444, %320
  %322 = load i32, ptr %38, align 4, !tbaa !13
  %323 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 4
  %324 = load i32, ptr %323, align 8, !tbaa !9
  %325 = icmp ult i32 %322, %324
  br i1 %325, label %327, label %326

326:                                              ; preds = %321
  store i32 5, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #12
  br label %449

327:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #12
  %328 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 1
  %329 = load ptr, ptr %328, align 8, !tbaa !14
  %330 = load i32, ptr %38, align 4, !tbaa !13
  %331 = zext i32 %330 to i64
  %332 = getelementptr inbounds %"struct.rmg::Vec3", ptr %329, i64 %331
  %333 = invoke { ptr, ptr } @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE11equal_rangeERS7_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(12) %332)
          to label %334 unwind label %364

334:                                              ; preds = %327
  %335 = getelementptr inbounds { ptr, ptr }, ptr %40, i32 0, i32 0
  %336 = extractvalue { ptr, ptr } %333, 0
  store ptr %336, ptr %335, align 8
  %337 = getelementptr inbounds { ptr, ptr }, ptr %40, i32 0, i32 1
  %338 = extractvalue { ptr, ptr } %333, 1
  store ptr %338, ptr %337, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #12
  %339 = getelementptr inbounds %"struct.std::pair.2", ptr %40, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 8 %339, i64 8, i1 false)
  %340 = getelementptr inbounds %"struct.std::pair.2", ptr %40, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %340, i64 8, i1 false)
  %341 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %42, i32 0, i32 0
  %342 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %341, i32 0, i32 0
  %343 = load ptr, ptr %342, align 8
  %344 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %43, i32 0, i32 0
  %345 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %344, i32 0, i32 0
  %346 = load ptr, ptr %345, align 8
  %347 = invoke noundef i64 @_ZSt8distanceINSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEEENSt15iterator_traitsIT_E15difference_typeES9_S9_(ptr %343, ptr %346)
          to label %348 unwind label %368

348:                                              ; preds = %334
  %349 = trunc i64 %347 to i32
  store i32 %349, ptr %41, align 4, !tbaa !13
  %350 = load i32, ptr %41, align 4, !tbaa !13
  %351 = icmp sgt i32 %350, 1
  br i1 %351, label %352, label %432

352:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 12, ptr %44) #12
  invoke void @_ZN3rmg4Vec3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %44)
          to label %353 unwind label %372

353:                                              ; preds = %352
  call void @llvm.lifetime.start.p0(i64 12, ptr %45) #12
  %354 = load ptr, ptr %4, align 8, !tbaa !5
  %355 = load i32, ptr %38, align 4, !tbaa !13
  %356 = udiv i32 %355, 3
  %357 = zext i32 %356 to i64
  %358 = getelementptr inbounds %"struct.rmg::Vec3", ptr %354, i64 %357
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %358, i64 12, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #12
  %359 = getelementptr inbounds %"struct.std::pair.2", ptr %40, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %46, ptr align 8 %359, i64 8, i1 false)
  br label %360

360:                                              ; preds = %411, %353
  %361 = getelementptr inbounds %"struct.std::pair.2", ptr %40, i32 0, i32 1
  %362 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3rmg4Vec3EjELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %361) #12
  br i1 %362, label %376, label %363

363:                                              ; preds = %360
  store i32 8, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #12
  br label %416

364:                                              ; preds = %327
  %365 = landingpad { ptr, i32 }
          cleanup
  %366 = extractvalue { ptr, i32 } %365, 0
  store ptr %366, ptr %9, align 8
  %367 = extractvalue { ptr, i32 } %365, 1
  store i32 %367, ptr %10, align 4
  br label %448

368:                                              ; preds = %334
  %369 = landingpad { ptr, i32 }
          cleanup
  %370 = extractvalue { ptr, i32 } %369, 0
  store ptr %370, ptr %9, align 8
  %371 = extractvalue { ptr, i32 } %369, 1
  store i32 %371, ptr %10, align 4
  br label %447

372:                                              ; preds = %352
  %373 = landingpad { ptr, i32 }
          cleanup
  %374 = extractvalue { ptr, i32 } %373, 0
  store ptr %374, ptr %9, align 8
  %375 = extractvalue { ptr, i32 } %373, 1
  store i32 %375, ptr %10, align 4
  br label %431

376:                                              ; preds = %360
  call void @llvm.lifetime.start.p0(i64 12, ptr %47) #12
  %377 = load ptr, ptr %4, align 8, !tbaa !5
  %378 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #12
  %379 = getelementptr inbounds %"struct.std::pair.4", ptr %378, i32 0, i32 1
  %380 = load i32, ptr %379, align 4, !tbaa !21
  %381 = udiv i32 %380, 3
  %382 = zext i32 %381 to i64
  %383 = getelementptr inbounds %"struct.rmg::Vec3", ptr %377, i64 %382
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %383, i64 12, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #12
  %384 = invoke noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12) %45, ptr noundef nonnull align 4 dereferenceable(12) %47)
          to label %385 unwind label %402

385:                                              ; preds = %376
  store float %384, ptr %48, align 4, !tbaa !17
  %386 = load float, ptr %48, align 4, !tbaa !17
  %387 = fcmp ogt float %386, 0x3FEBB67A00000000
  br i1 %387, label %388, label %410

388:                                              ; preds = %385
  call void @llvm.lifetime.start.p0(i64 12, ptr %49) #12
  %389 = load ptr, ptr %5, align 8, !tbaa !5
  %390 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #12
  %391 = getelementptr inbounds %"struct.std::pair.4", ptr %390, i32 0, i32 1
  %392 = load i32, ptr %391, align 4, !tbaa !21
  %393 = zext i32 %392 to i64
  %394 = getelementptr inbounds float, ptr %389, i64 %393
  %395 = load float, ptr %394, align 4, !tbaa !17
  %396 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3mlEf(ptr noundef nonnull align 4 dereferenceable(12) %47, float noundef %395)
          to label %397 unwind label %406

397:                                              ; preds = %388
  %398 = getelementptr inbounds %"struct.rmg::Vec3", ptr %49, i32 0, i32 0
  %399 = getelementptr inbounds %union.anon, ptr %398, i32 0, i32 0
  store { <2 x float>, float } %396, ptr %50, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %399, ptr align 8 %50, i64 12, i1 false)
  %400 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Vec3pLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %44, ptr noundef nonnull align 4 dereferenceable(12) %49)
          to label %401 unwind label %406

401:                                              ; preds = %397
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #12
  br label %410

402:                                              ; preds = %376
  %403 = landingpad { ptr, i32 }
          cleanup
  %404 = extractvalue { ptr, i32 } %403, 0
  store ptr %404, ptr %9, align 8
  %405 = extractvalue { ptr, i32 } %403, 1
  store i32 %405, ptr %10, align 4
  br label %415

406:                                              ; preds = %397, %388
  %407 = landingpad { ptr, i32 }
          cleanup
  %408 = extractvalue { ptr, i32 } %407, 0
  store ptr %408, ptr %9, align 8
  %409 = extractvalue { ptr, i32 } %407, 1
  store i32 %409, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #12
  br label %415

410:                                              ; preds = %401, %385
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %47) #12
  br label %411

411:                                              ; preds = %410
  %412 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %46, i32 noundef 0) #12
  %413 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %51, i32 0, i32 0
  %414 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %413, i32 0, i32 0
  store ptr %412, ptr %414, align 8
  br label %360, !llvm.loop !24

415:                                              ; preds = %406, %402
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %47) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #12
  br label %430

416:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 12, ptr %52) #12
  %417 = invoke { <2 x float>, float } @_ZNK3rmg4Vec39normalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %44)
          to label %418 unwind label %426

418:                                              ; preds = %416
  %419 = getelementptr inbounds %"struct.rmg::Vec3", ptr %52, i32 0, i32 0
  %420 = getelementptr inbounds %union.anon, ptr %419, i32 0, i32 0
  store { <2 x float>, float } %417, ptr %53, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %420, ptr align 8 %53, i64 12, i1 false)
  %421 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 2
  %422 = load ptr, ptr %421, align 8, !tbaa !12
  %423 = load i32, ptr %38, align 4, !tbaa !13
  %424 = zext i32 %423 to i64
  %425 = getelementptr inbounds %"struct.rmg::Vec3", ptr %422, i64 %424
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %425, ptr align 4 %52, i64 12, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 12, ptr %52) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr %44) #12
  br label %443

426:                                              ; preds = %416
  %427 = landingpad { ptr, i32 }
          cleanup
  %428 = extractvalue { ptr, i32 } %427, 0
  store ptr %428, ptr %9, align 8
  %429 = extractvalue { ptr, i32 } %427, 1
  store i32 %429, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %52) #12
  br label %430

430:                                              ; preds = %426, %415
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #12
  br label %431

431:                                              ; preds = %430, %372
  call void @llvm.lifetime.end.p0(i64 12, ptr %44) #12
  br label %447

432:                                              ; preds = %348
  %433 = load ptr, ptr %4, align 8, !tbaa !5
  %434 = load i32, ptr %38, align 4, !tbaa !13
  %435 = udiv i32 %434, 3
  %436 = zext i32 %435 to i64
  %437 = getelementptr inbounds %"struct.rmg::Vec3", ptr %433, i64 %436
  %438 = getelementptr inbounds %"class.rmg::Mesh", ptr %54, i32 0, i32 2
  %439 = load ptr, ptr %438, align 8, !tbaa !12
  %440 = load i32, ptr %38, align 4, !tbaa !13
  %441 = zext i32 %440 to i64
  %442 = getelementptr inbounds %"struct.rmg::Vec3", ptr %439, i64 %441
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %442, ptr align 4 %437, i64 12, i1 false), !tbaa.struct !15
  br label %443

443:                                              ; preds = %432, %418
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #12
  br label %444

444:                                              ; preds = %443
  %445 = load i32, ptr %38, align 4, !tbaa !13
  %446 = add i32 %445, 1
  store i32 %446, ptr %38, align 4, !tbaa !13
  br label %321, !llvm.loop !25

447:                                              ; preds = %431, %368
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #12
  br label %448

448:                                              ; preds = %447, %364
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #12
  br label %450

449:                                              ; preds = %326
  call void @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #12
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #12
  ret void

450:                                              ; preds = %448, %319
  call void @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #12
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #12
  br label %451

451:                                              ; preds = %450
  %452 = load ptr, ptr %9, align 8
  %453 = load i32, ptr %10, align 4
  %454 = insertvalue { ptr, i32 } poison, ptr %452, 0
  %455 = insertvalue { ptr, i32 } %454, i32 %453, 1
  resume { ptr, i32 } %455
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3rmg4Vec3miERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3rmg4Vec3mlERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5 align 2

declare { <2 x float>, float } @_ZNK3rmg4Vec39normalizeEv(ptr noundef nonnull align 4 dereferenceable(12)) #6

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12)) #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3rmg4Vec3ngEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: nounwind
declare double @acos(double noundef) #9

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

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, i64 } @_ZSt9make_pairIRN3rmg4Vec3EjESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #10

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE11equal_rangeERS7_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(12)) #10 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceINSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEEENSt15iterator_traitsIT_E15difference_typeES9_S9_(ptr, ptr) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3rmg4Vec3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3rmg4Vec3EjELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3rmg4Vec3mlEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Vec3pLERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #8 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { nounwind 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #8 = { 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 #9 = { 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 #10 = { 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 #11 = { nounwind allocsize(0) }
attributes #12 = { 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, !11, i64 32}
!10 = !{!"_ZTSN3rmg4MeshE", !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !11, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 16}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !6, i64 8}
!15 = !{i64 0, i64 12, !16}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !11, i64 12}
!22 = !{!"_ZTSSt4pairIKN3rmg4Vec3EjE", !23, i64 0, !11, i64 12}
!23 = !{!"_ZTSN3rmg4Vec3E", !7, i64 0}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}


; 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.std::unordered_multimap" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.rmg::Vec3" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }
%"struct.std::pair" = type { %"struct.rmg::Vec3", i32 }
%"struct.std::pair.2" = type { %"struct.std::__detail::_Node_iterator", %"struct.std::__detail::_Node_iterator" }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg4Mesh13buildNormals2Ev(ptr nocapture noundef nonnull align 8 dereferenceable(52) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::unordered_multimap", align 8
  %3 = alloca %"struct.rmg::Vec3", align 8
  %4 = alloca %"struct.rmg::Vec3", align 8
  %5 = alloca %"struct.rmg::Vec3", align 8
  %6 = alloca %"struct.rmg::Vec3", align 8
  %7 = alloca %"struct.rmg::Vec3", align 8
  %8 = alloca %"struct.rmg::Vec3", align 8
  %9 = alloca %"struct.rmg::Vec3", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair.2", align 8
  %17 = alloca %"struct.rmg::Vec3", align 4
  %18 = alloca %"struct.rmg::Vec3", align 4
  %19 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %20 = alloca %"struct.rmg::Vec3", align 4
  %21 = alloca %"struct.rmg::Vec3", align 8
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  %23 = load i32, ptr %22, align 8, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = mul nuw nsw i64 %24, 12
  %26 = tail call noalias ptr @malloc(i64 noundef %25) #11
  %27 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %26, ptr %27, align 8, !tbaa !11
  %28 = udiv i32 %23, 3
  %29 = zext nneg i32 %28 to i64
  %30 = mul nuw nsw i64 %29, 12
  %31 = tail call noalias ptr @malloc(i64 noundef %30) #11
  %32 = shl nuw nsw i64 %24, 2
  %33 = tail call noalias ptr @malloc(i64 noundef %32) #11
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #12
  call void @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #12
  %.not = icmp ult i32 %23, 3
  br i1 %.not, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %.sroa.255.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.251.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  %.sroa.247.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %.sroa.241.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.230.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.226.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.222.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %35 = getelementptr inbounds i8, ptr %10, i64 8
  %36 = getelementptr inbounds i8, ptr %12, i64 8
  %37 = getelementptr inbounds i8, ptr %14, i64 8
  br label %41

.preheader:                                       ; preds = %124, %1
  %38 = load i32, ptr %22, align 8, !tbaa !5
  %.not114 = icmp eq i32 %38, 0
  br i1 %.not114, label %._crit_edge113, label %.lr.ph112

.lr.ph112:                                        ; preds = %.preheader
  %39 = getelementptr inbounds i8, ptr %0, i64 8
  %40 = getelementptr inbounds i8, ptr %16, i64 8
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %21, i64 8
  br label %149

41:                                               ; preds = %.lr.ph, %124
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %124 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #12
  %42 = load ptr, ptr %34, align 8, !tbaa !12
  %43 = mul nuw nsw i64 %indvars.iv, 3
  %44 = add nuw nsw i64 %43, 1
  %45 = getelementptr inbounds %"struct.rmg::Vec3", ptr %42, i64 %44
  %46 = getelementptr inbounds %"struct.rmg::Vec3", ptr %42, i64 %43
  %47 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3miERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %45, ptr noundef nonnull align 4 dereferenceable(12) %46)
          to label %48 unwind label %125

48:                                               ; preds = %41
  %.fca.0.extract52 = extractvalue { <2 x float>, float } %47, 0
  %.fca.1.extract53 = extractvalue { <2 x float>, float } %47, 1
  store <2 x float> %.fca.0.extract52, ptr %3, align 8
  store float %.fca.1.extract53, ptr %.sroa.255.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #12
  %49 = load ptr, ptr %34, align 8, !tbaa !12
  %50 = add nuw nsw i64 %43, 2
  %51 = getelementptr inbounds %"struct.rmg::Vec3", ptr %49, i64 %50
  %52 = getelementptr inbounds %"struct.rmg::Vec3", ptr %49, i64 %43
  %53 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3miERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef nonnull align 4 dereferenceable(12) %52)
          to label %54 unwind label %127

54:                                               ; preds = %48
  %.fca.0.extract48 = extractvalue { <2 x float>, float } %53, 0
  %.fca.1.extract49 = extractvalue { <2 x float>, float } %53, 1
  store <2 x float> %.fca.0.extract48, ptr %4, align 8
  store float %.fca.1.extract49, ptr %.sroa.251.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #12
  %55 = load ptr, ptr %34, align 8, !tbaa !12
  %56 = getelementptr inbounds %"struct.rmg::Vec3", ptr %55, i64 %50
  %57 = getelementptr inbounds %"struct.rmg::Vec3", ptr %55, i64 %44
  %58 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3miERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %56, ptr noundef nonnull align 4 dereferenceable(12) %57)
          to label %59 unwind label %129

59:                                               ; preds = %54
  %.fca.0.extract44 = extractvalue { <2 x float>, float } %58, 0
  %.fca.1.extract45 = extractvalue { <2 x float>, float } %58, 1
  store <2 x float> %.fca.0.extract44, ptr %5, align 8
  store float %.fca.1.extract45, ptr %.sroa.247.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #12
  %60 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3mlERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
          to label %61 unwind label %131

61:                                               ; preds = %59
  %.fca.0.extract38 = extractvalue { <2 x float>, float } %60, 0
  %.fca.1.extract39 = extractvalue { <2 x float>, float } %60, 1
  store <2 x float> %.fca.0.extract38, ptr %6, align 8
  store float %.fca.1.extract39, ptr %.sroa.241.0..sroa_idx, align 8
  %62 = invoke { <2 x float>, float } @_ZNK3rmg4Vec39normalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %63 unwind label %131

63:                                               ; preds = %61
  %.fca.0.extract34 = extractvalue { <2 x float>, float } %62, 0
  %.fca.1.extract35 = extractvalue { <2 x float>, float } %62, 1
  %64 = getelementptr inbounds %"struct.rmg::Vec3", ptr %31, i64 %indvars.iv
  store <2 x float> %.fca.0.extract34, ptr %64, align 4
  %.sroa.543.0..sroa_idx = getelementptr inbounds i8, ptr %64, i64 8
  store float %.fca.1.extract35, ptr %.sroa.543.0..sroa_idx, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #12
  %65 = call noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %66 = call noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %3)
  %67 = call noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %68 = fmul float %66, %67
  %69 = fdiv float %65, %68
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #12
  %70 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3ngEv(ptr noundef nonnull align 4 dereferenceable(12) %3)
          to label %71 unwind label %133

71:                                               ; preds = %63
  %.fca.0.extract27 = extractvalue { <2 x float>, float } %70, 0
  %.fca.1.extract28 = extractvalue { <2 x float>, float } %70, 1
  store <2 x float> %.fca.0.extract27, ptr %7, align 8
  store float %.fca.1.extract28, ptr %.sroa.230.0..sroa_idx, align 8
  %72 = call noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %7)
  %73 = call noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %5)
  %74 = call noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %3)
  %75 = fmul float %73, %74
  %76 = fdiv float %72, %75
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #12
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #12
  %77 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3ngEv(ptr noundef nonnull align 4 dereferenceable(12) %4)
          to label %78 unwind label %135

78:                                               ; preds = %71
  %.fca.0.extract23 = extractvalue { <2 x float>, float } %77, 0
  %.fca.1.extract24 = extractvalue { <2 x float>, float } %77, 1
  store <2 x float> %.fca.0.extract23, ptr %8, align 8
  store float %.fca.1.extract24, ptr %.sroa.226.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #12
  %79 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3ngEv(ptr noundef nonnull align 4 dereferenceable(12) %5)
          to label %80 unwind label %137

80:                                               ; preds = %78
  %.fca.0.extract19 = extractvalue { <2 x float>, float } %79, 0
  %.fca.1.extract20 = extractvalue { <2 x float>, float } %79, 1
  store <2 x float> %.fca.0.extract19, ptr %9, align 8
  store float %.fca.1.extract20, ptr %.sroa.222.0..sroa_idx, align 8
  %81 = call noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %82 = call noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %83 = call noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %5)
  %84 = fmul float %82, %83
  %85 = fdiv float %81, %84
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #12
  %86 = fpext float %69 to double
  %87 = call double @acos(double noundef %86) #12
  %88 = getelementptr inbounds float, ptr %33, i64 %43
  %89 = fpext float %76 to double
  %90 = call double @acos(double noundef %89) #12
  %91 = insertelement <2 x double> poison, double %87, i64 0
  %92 = insertelement <2 x double> %91, double %90, i64 1
  %93 = fptrunc <2 x double> %92 to <2 x float>
  store <2 x float> %93, ptr %88, align 4, !tbaa !14
  %94 = fpext float %85 to double
  %95 = call double @acos(double noundef %94) #12
  %96 = fptrunc double %95 to float
  %97 = getelementptr inbounds float, ptr %33, i64 %50
  store float %96, ptr %97, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #12
  %98 = load ptr, ptr %34, align 8, !tbaa !12
  %99 = getelementptr inbounds %"struct.rmg::Vec3", ptr %98, i64 %43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #12
  %100 = trunc nuw i64 %43 to i32
  store i32 %100, ptr %11, align 4, !tbaa !16
  %101 = invoke { <2 x float>, i64 } @_ZSt9make_pairIRN3rmg4Vec3EjESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(12) %99, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %102 unwind label %140

102:                                              ; preds = %80
  %103 = extractvalue { <2 x float>, i64 } %101, 0
  store <2 x float> %103, ptr %10, align 8
  %104 = extractvalue { <2 x float>, i64 } %101, 1
  store i64 %104, ptr %35, align 8
  %105 = invoke ptr @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE6insertIS6_IS1_jEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueENSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(16) %10)
          to label %106 unwind label %140

106:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #12
  %107 = load ptr, ptr %34, align 8, !tbaa !12
  %108 = getelementptr inbounds %"struct.rmg::Vec3", ptr %107, i64 %44
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #12
  %109 = trunc nuw i64 %44 to i32
  store i32 %109, ptr %13, align 4, !tbaa !16
  %110 = invoke { <2 x float>, i64 } @_ZSt9make_pairIRN3rmg4Vec3EjESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(12) %108, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %111 unwind label %142

111:                                              ; preds = %106
  %112 = extractvalue { <2 x float>, i64 } %110, 0
  store <2 x float> %112, ptr %12, align 8
  %113 = extractvalue { <2 x float>, i64 } %110, 1
  store i64 %113, ptr %36, align 8
  %114 = invoke ptr @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE6insertIS6_IS1_jEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueENSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(16) %12)
          to label %115 unwind label %142

115:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #12
  %116 = load ptr, ptr %34, align 8, !tbaa !12
  %117 = getelementptr inbounds %"struct.rmg::Vec3", ptr %116, i64 %50
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #12
  %118 = trunc nuw i64 %50 to i32
  store i32 %118, ptr %15, align 4, !tbaa !16
  %119 = invoke { <2 x float>, i64 } @_ZSt9make_pairIRN3rmg4Vec3EjESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(12) %117, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %120 unwind label %144

120:                                              ; preds = %115
  %121 = extractvalue { <2 x float>, i64 } %119, 0
  store <2 x float> %121, ptr %14, align 8
  %122 = extractvalue { <2 x float>, i64 } %119, 1
  store i64 %122, ptr %37, align 8
  %123 = invoke ptr @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE6insertIS6_IS1_jEEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueENSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(16) %14)
          to label %124 unwind label %144

124:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %29
  br i1 %exitcond.not, label %.preheader, label %41, !llvm.loop !17

125:                                              ; preds = %41
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %148

127:                                              ; preds = %48
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %147

129:                                              ; preds = %54
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %146

131:                                              ; preds = %61, %59
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #12
  br label %146

133:                                              ; preds = %63
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #12
  br label %146

135:                                              ; preds = %71
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %139

137:                                              ; preds = %78
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #12
  br label %139

139:                                              ; preds = %137, %135
  %.pn101 = phi { ptr, i32 } [ %138, %137 ], [ %136, %135 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #12
  br label %146

140:                                              ; preds = %102, %80
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #12
  br label %146

142:                                              ; preds = %111, %106
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #12
  br label %146

144:                                              ; preds = %120, %115
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #12
  br label %146

146:                                              ; preds = %133, %139, %140, %142, %144, %131, %129
  %.pn103.pn = phi { ptr, i32 } [ %132, %131 ], [ %130, %129 ], [ %145, %144 ], [ %143, %142 ], [ %141, %140 ], [ %.pn101, %139 ], [ %134, %133 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #12
  br label %147

147:                                              ; preds = %146, %127
  %.pn103.pn.pn = phi { ptr, i32 } [ %.pn103.pn, %146 ], [ %128, %127 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #12
  br label %148

148:                                              ; preds = %147, %125
  %.pn103.pn.pn.pn = phi { ptr, i32 } [ %.pn103.pn.pn, %147 ], [ %126, %125 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #12
  br label %213

._crit_edge113:                                   ; preds = %208, %.preheader
  call void @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #12
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #12
  ret void

149:                                              ; preds = %.lr.ph112, %208
  %indvars.iv116 = phi i64 [ 0, %.lr.ph112 ], [ %indvars.iv.next117, %208 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #12
  %150 = load ptr, ptr %39, align 8, !tbaa !12
  %151 = getelementptr inbounds %"struct.rmg::Vec3", ptr %150, i64 %indvars.iv116
  %152 = invoke { ptr, ptr } @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE11equal_rangeERS7_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(12) %151)
          to label %153 unwind label %168

153:                                              ; preds = %149
  %154 = extractvalue { ptr, ptr } %152, 0
  store ptr %154, ptr %16, align 8
  %155 = extractvalue { ptr, ptr } %152, 1
  store ptr %155, ptr %40, align 8
  %156 = invoke noundef i64 @_ZSt8distanceINSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEEENSt15iterator_traitsIT_E15difference_typeES9_S9_(ptr %154, ptr %155)
          to label %157 unwind label %170

157:                                              ; preds = %153
  %158 = trunc i64 %156 to i32
  %159 = icmp sgt i32 %158, 1
  br i1 %159, label %160, label %201

160:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #12
  call void @_ZN3rmg4Vec3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #12
  %161 = trunc nuw i64 %indvars.iv116 to i32
  %162 = udiv i32 %161, 3
  %163 = zext nneg i32 %162 to i64
  %164 = getelementptr inbounds %"struct.rmg::Vec3", ptr %31, i64 %163
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %164, i64 12, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #12
  %165 = load i64, ptr %16, align 8
  store i64 %165, ptr %19, align 8
  %166 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3rmg4Vec3EjELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %40) #12
  br i1 %166, label %.lr.ph110, label %._crit_edge

._crit_edge:                                      ; preds = %192, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #12
  %167 = invoke { <2 x float>, float } @_ZNK3rmg4Vec39normalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %195 unwind label %198

168:                                              ; preds = %149
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %212

170:                                              ; preds = %153
  %171 = landingpad { ptr, i32 }
          cleanup
  br label %212

.lr.ph110:                                        ; preds = %160, %192
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #12
  %172 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #12
  %173 = getelementptr inbounds i8, ptr %172, i64 12
  %174 = load i32, ptr %173, align 4, !tbaa !20
  %175 = udiv i32 %174, 3
  %176 = zext nneg i32 %175 to i64
  %177 = getelementptr inbounds %"struct.rmg::Vec3", ptr %31, i64 %176
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %177, i64 12, i1 false), !tbaa.struct !19
  %178 = call noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %20)
  %179 = fcmp ogt float %178, 0x3FEBB67A00000000
  br i1 %179, label %180, label %192

180:                                              ; preds = %.lr.ph110
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #12
  %181 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #12
  %182 = getelementptr inbounds i8, ptr %181, i64 12
  %183 = load i32, ptr %182, align 4, !tbaa !20
  %184 = zext i32 %183 to i64
  %185 = getelementptr inbounds float, ptr %33, i64 %184
  %186 = load float, ptr %185, align 4, !tbaa !14
  %187 = invoke { <2 x float>, float } @_ZNK3rmg4Vec3mlEf(ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef %186)
          to label %188 unwind label %190

188:                                              ; preds = %180
  %.fca.0.extract3 = extractvalue { <2 x float>, float } %187, 0
  %.fca.1.extract4 = extractvalue { <2 x float>, float } %187, 1
  store <2 x float> %.fca.0.extract3, ptr %21, align 8
  store float %.fca.1.extract4, ptr %.sroa.26.0..sroa_idx, align 8
  %189 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Vec3pLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %21)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #12
  br label %192

190:                                              ; preds = %180
  %191 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #12
  br label %200

192:                                              ; preds = %188, %.lr.ph110
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #12
  %193 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %19, i32 noundef 0) #12
  %194 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3rmg4Vec3EjELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %40) #12
  br i1 %194, label %.lr.ph110, label %._crit_edge, !llvm.loop !23

195:                                              ; preds = %._crit_edge
  %.fca.0.extract = extractvalue { <2 x float>, float } %167, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %167, 1
  %196 = load ptr, ptr %27, align 8, !tbaa !11
  %197 = getelementptr inbounds %"struct.rmg::Vec3", ptr %196, i64 %indvars.iv116
  store <2 x float> %.fca.0.extract, ptr %197, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %197, i64 8
  store float %.fca.1.extract, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #12
  br label %208

198:                                              ; preds = %._crit_edge
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %200

200:                                              ; preds = %198, %190
  %.pn = phi { ptr, i32 } [ %191, %190 ], [ %199, %198 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #12
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #12
  br label %212

201:                                              ; preds = %157
  %202 = trunc nuw i64 %indvars.iv116 to i32
  %203 = udiv i32 %202, 3
  %204 = zext nneg i32 %203 to i64
  %205 = getelementptr inbounds %"struct.rmg::Vec3", ptr %31, i64 %204
  %206 = load ptr, ptr %27, align 8, !tbaa !11
  %207 = getelementptr inbounds %"struct.rmg::Vec3", ptr %206, i64 %indvars.iv116
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %207, ptr noundef nonnull align 4 dereferenceable(12) %205, i64 12, i1 false), !tbaa.struct !19
  br label %208

208:                                              ; preds = %201, %195
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #12
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %209 = load i32, ptr %22, align 8, !tbaa !5
  %210 = zext i32 %209 to i64
  %211 = icmp ult i64 %indvars.iv.next117, %210
  br i1 %211, label %149, label %._crit_edge113, !llvm.loop !24

212:                                              ; preds = %170, %200, %168
  %.pn.pn.pn = phi { ptr, i32 } [ %169, %168 ], [ %.pn, %200 ], [ %171, %170 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #12
  br label %213

213:                                              ; preds = %212, %148
  %.pn103.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn103.pn.pn.pn, %148 ], [ %.pn.pn.pn, %212 ]
  call void @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #12
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #12
  resume { ptr, i32 } %.pn103.pn.pn.pn.pn
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3rmg4Vec3miERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3rmg4Vec3mlERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5 align 2

declare { <2 x float>, float } @_ZNK3rmg4Vec39normalizeEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #6

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3rmg4Vec33dotERKS0_S2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3rmg4Vec39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3rmg4Vec3ngEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @acos(double noundef) local_unnamed_addr #9

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

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, i64 } @_ZSt9make_pairIRN3rmg4Vec3EjESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #10

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNSt18unordered_multimapIN3rmg4Vec3EjSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_jEEE11equal_rangeERS7_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #10 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceINSt8__detail14_Node_iteratorISt4pairIKN3rmg4Vec3EjELb0ELb0EEEENSt15iterator_traitsIT_E15difference_typeES9_S9_(ptr, ptr) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3rmg4Vec3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3rmg4Vec3EjELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3rmg4Vec3mlEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Vec3pLERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #8 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #8 = { 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 #9 = { mustprogress nofree nounwind willreturn memory(write) "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 #10 = { 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 #11 = { nounwind allocsize(0) }
attributes #12 = { 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, !10, i64 32}
!6 = !{!"_ZTSN3rmg4MeshE", !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 16}
!12 = !{!6, !7, i64 8}
!13 = !{!8, !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = !{!10, !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{i64 0, i64 12, !13}
!20 = !{!21, !10, i64 12}
!21 = !{!"_ZTSSt4pairIKN3rmg4Vec3EjE", !22, i64 0, !10, i64 12}
!22 = !{!"_ZTSN3rmg4Vec3E", !8, i64 0}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass