; LLVM IR from achilles288/robot-monitor-graphics :: src/base/internal (particle_shader)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<float, std::pair<const float, rmg::Particle3D *>, std::_Select1st<std::pair<const float, rmg::Particle3D *>>, std::less<float>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<float, std::pair<const float, rmg::Particle3D *>, std::_Select1st<std::pair<const float, rmg::Particle3D *>>, std::less<float>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.rmg::ObjectList::iterator" = type { ptr, ptr }
%"struct.rmg::Vec3" = type { %union.anon.0 }
%union.anon.0 = type { %struct.anon }
%struct.anon = type { float, float, float }
%"struct.rmg::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { %struct.anon.5 }
%struct.anon.5 = type { float, float, float, float }
%"struct.std::pair" = type { float, ptr }
%"struct.std::pair.6" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.rmg::ColorRGBA" = type { float, float, float, float }
%"class.rmg::internal::Shader" = type <{ ptr, i32, [4 x i8] }>
%"class.rmg::internal::ParticleShader" = type { %"class.rmg::internal::Shader.base", i32, i32, i32, i32, i32, i32, i32 }
%"class.rmg::internal::Shader.base" = type <{ ptr, i32 }>
%"struct.std::pair.8" = type { float, ptr }

@_ZN3rmg8internal17glBindVertexArrayE = external global ptr, align 8
@_ZN3rmg8internal12glUseProgramE = external global ptr, align 8
@_ZN3rmg8internal18glUniformMatrix4fvE = external global ptr, align 8
@_ZN3rmg8internal11glUniform1iE = external global ptr, align 8
@_ZN3rmg8internal12glUniform3fvE = external global ptr, align 8
@_ZN3rmg8internal18glUniformMatrix3fvE = external global ptr, align 8
@_ZN3rmg8internal12glUniform4fvE = external global ptr, align 8

declare i32 @__gxx_personality_v0(...)

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

; 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) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg8internal14ParticleShader6renderERKNS_4Mat4ES4_RKNS_10ObjectListE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 4 dereferenceable(64) %1, ptr noundef nonnull align 4 dereferenceable(64) %2, ptr noundef nonnull align 8 dereferenceable(20) %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::map", align 8
  %10 = alloca %"class.rmg::ObjectList::iterator", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.rmg::ObjectList::iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.rmg::Vec3", align 4
  %17 = alloca %"struct.rmg::Vec4", align 4
  %18 = alloca %"struct.rmg::Vec4", align 4
  %19 = alloca %"struct.rmg::Vec3", align 4
  %20 = alloca { <2 x float>, float }, align 8
  %21 = alloca { <2 x float>, float }, align 8
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca %"struct.std::pair.6", align 8
  %24 = alloca %"class.rmg::ObjectList::iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %27 = alloca ptr, align 8
  %28 = alloca %"struct.rmg::Vec3", align 4
  %29 = alloca %"struct.rmg::Vec4", align 4
  %30 = alloca %"struct.rmg::Vec4", align 4
  %31 = alloca %"struct.rmg::Vec3", align 4
  %32 = alloca { <2 x float>, float }, align 8
  %33 = alloca { <2 x float>, float }, align 8
  %34 = alloca %"struct.rmg::ColorRGBA", align 4
  %35 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8
  %37 = getelementptr inbounds %"class.rmg::internal::Shader", ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 8, !tbaa !9
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %4
  br label %241

41:                                               ; preds = %4
  call void @glEnable(i32 noundef 2929)
  call void @glDepthFunc(i32 noundef 513)
  call void @glFrontFace(i32 noundef 2305)
  call void @glDisable(i32 noundef 2884)
  call void @glEnable(i32 noundef 3042)
  call void @glBlendFunc(i32 noundef 770, i32 noundef 771)
  %42 = load ptr, ptr @_ZN3rmg8internal12glUseProgramE, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.rmg::internal::Shader", ptr %36, i32 0, i32 1
  %44 = load i32, ptr %43, align 8, !tbaa !9
  call void %42(i32 noundef %44)
  %45 = load ptr, ptr @_ZN3rmg8internal17glBindVertexArrayE, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.rmg::internal::ParticleShader", ptr %36, i32 0, i32 6
  %47 = load i32, ptr %46, align 8, !tbaa !12
  call void %45(i32 noundef %47)
  %48 = load ptr, ptr @_ZN3rmg8internal18glUniformMatrix4fvE, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.rmg::internal::ParticleShader", ptr %36, i32 0, i32 3
  %50 = load i32, ptr %49, align 4, !tbaa !14
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3rmg4Mat4ixEh(ptr noundef nonnull align 4 dereferenceable(64) %51, i8 noundef zeroext 0)
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3rmg7Mat4RowixEh(ptr noundef nonnull align 4 dereferenceable(16) %52, i8 noundef zeroext 0)
  call void %48(i32 noundef %50, i32 noundef 1, i8 noundef zeroext 1, ptr noundef %53)
  %54 = load ptr, ptr @_ZN3rmg8internal11glUniform1iE, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.rmg::internal::ParticleShader", ptr %36, i32 0, i32 5
  %56 = load i32, ptr %55, align 4, !tbaa !15
  call void %54(i32 noundef %56, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #8
  call void @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = invoke { ptr, ptr } @_ZNK3rmg10ObjectList5beginEv(ptr noundef nonnull align 8 dereferenceable(20) %57)
          to label %59 unwind label %75

59:                                               ; preds = %41
  %60 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %61 = extractvalue { ptr, ptr } %58, 0
  store ptr %61, ptr %60, align 8
  %62 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %63 = extractvalue { ptr, ptr } %58, 1
  store ptr %63, ptr %62, align 8
  br label %64

64:                                               ; preds = %128, %59
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = invoke { ptr, ptr } @_ZNK3rmg10ObjectList3endEv(ptr noundef nonnull align 8 dereferenceable(20) %65)
          to label %67 unwind label %79

67:                                               ; preds = %64
  %68 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 0
  %69 = extractvalue { ptr, ptr } %66, 0
  store ptr %69, ptr %68, align 8
  %70 = getelementptr inbounds { ptr, ptr }, ptr %13, i32 0, i32 1
  %71 = extractvalue { ptr, ptr } %66, 1
  store ptr %71, ptr %70, align 8
  %72 = invoke noundef zeroext i1 @_ZN3rmg10ObjectList8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %73 unwind label %79

73:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  br i1 %72, label %83, label %74

74:                                               ; preds = %73
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  br label %144

75:                                               ; preds = %126, %41
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %11, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %12, align 4
  br label %143

79:                                               ; preds = %67, %64
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %11, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  br label %143

83:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %84 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3rmg10ObjectList8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %85 unwind label %90

85:                                               ; preds = %83
  store ptr %84, ptr %15, align 8, !tbaa !5
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = invoke noundef zeroext i1 @_ZNK3rmg6Object8isHiddenEv(ptr noundef nonnull align 8 dereferenceable(48) %86)
          to label %88 unwind label %90

88:                                               ; preds = %85
  br i1 %87, label %89, label %94

89:                                               ; preds = %88
  store i32 4, ptr %14, align 4
  br label %123

90:                                               ; preds = %85, %83
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %11, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %12, align 4
  br label %142

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #8
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = invoke { <2 x float>, float } @_ZNK3rmg10Particle3D14getTranslationEv(ptr noundef nonnull align 8 dereferenceable(140) %96)
          to label %98 unwind label %133

98:                                               ; preds = %94
  %99 = getelementptr inbounds %"struct.rmg::Vec3", ptr %19, i32 0, i32 0
  %100 = getelementptr inbounds %union.anon.0, ptr %99, i32 0, i32 0
  store { <2 x float>, float } %97, ptr %20, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %100, ptr align 8 %20, i64 12, i1 false)
  invoke void @_ZN3rmg4Vec4C2ERKNS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(12) %19, float noundef 1.000000e+00)
          to label %101 unwind label %133

101:                                              ; preds = %98
  %102 = invoke { <2 x float>, <2 x float> } @_ZNK3rmg4Mat4mlERKNS_4Vec4E(ptr noundef nonnull align 4 dereferenceable(64) %95, ptr noundef nonnull align 4 dereferenceable(16) %18)
          to label %103 unwind label %133

103:                                              ; preds = %101
  %104 = getelementptr inbounds %"struct.rmg::Vec4", ptr %17, i32 0, i32 0
  %105 = getelementptr inbounds %union.anon.4, ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %105, i32 0, i32 0
  %107 = extractvalue { <2 x float>, <2 x float> } %102, 0
  store <2 x float> %107, ptr %106, align 4
  %108 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %105, i32 0, i32 1
  %109 = extractvalue { <2 x float>, <2 x float> } %102, 1
  store <2 x float> %109, ptr %108, align 4
  %110 = invoke { <2 x float>, float } @_ZNK3rmg4Vec4cvNS_4Vec3EEv(ptr noundef nonnull align 4 dereferenceable(16) %17)
          to label %111 unwind label %133

111:                                              ; preds = %103
  %112 = getelementptr inbounds %"struct.rmg::Vec3", ptr %16, i32 0, i32 0
  %113 = getelementptr inbounds %union.anon.0, ptr %112, i32 0, i32 0
  store { <2 x float>, float } %110, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %113, ptr align 8 %21, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  %114 = getelementptr inbounds %"struct.rmg::Vec3", ptr %16, i32 0, i32 0
  %115 = getelementptr inbounds %struct.anon, ptr %114, i32 0, i32 2
  invoke void @_ZNSt4pairIfPN3rmg10Particle3DEEC2IRfRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %116 unwind label %137

116:                                              ; preds = %111
  %117 = invoke { ptr, i8 } @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE6insertIRS5_IfS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %118 unwind label %137

118:                                              ; preds = %116
  %119 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 0
  %120 = extractvalue { ptr, i8 } %117, 0
  store ptr %120, ptr %119, align 8
  %121 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 1
  %122 = extractvalue { ptr, i8 } %117, 1
  store i8 %122, ptr %121, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #8
  store i32 0, ptr %14, align 4
  br label %123

123:                                              ; preds = %118, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %124 = load i32, ptr %14, align 4
  switch i32 %124, label %248 [
    i32 0, label %125
    i32 4, label %126
  ]

125:                                              ; preds = %123
  br label %126

126:                                              ; preds = %125, %123
  %127 = invoke { ptr, ptr } @_ZN3rmg10ObjectList8iteratorppEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef 0)
          to label %128 unwind label %75

128:                                              ; preds = %126
  %129 = getelementptr inbounds { ptr, ptr }, ptr %24, i32 0, i32 0
  %130 = extractvalue { ptr, ptr } %127, 0
  store ptr %130, ptr %129, align 8
  %131 = getelementptr inbounds { ptr, ptr }, ptr %24, i32 0, i32 1
  %132 = extractvalue { ptr, ptr } %127, 1
  store ptr %132, ptr %131, align 8
  br label %64, !llvm.loop !16

133:                                              ; preds = %103, %101, %98, %94
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %11, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  br label %141

137:                                              ; preds = %116, %111
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %11, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %141

141:                                              ; preds = %137, %133
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #8
  br label %142

142:                                              ; preds = %141, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %143

143:                                              ; preds = %142, %79, %75
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  br label %242

144:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %145 = call ptr @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  %146 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %25, i32 0, i32 0
  store ptr %145, ptr %146, align 8
  br label %147

147:                                              ; preds = %223, %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %148 = call ptr @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  %149 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %26, i32 0, i32 0
  store ptr %148, ptr %149, align 8
  %150 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKfPN3rmg10Particle3DEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %240

152:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %153 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKfPN3rmg10Particle3DEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  %154 = getelementptr inbounds %"struct.std::pair.8", ptr %153, i32 0, i32 1
  %155 = load ptr, ptr %154, align 8, !tbaa !18
  store ptr %155, ptr %27, align 8, !tbaa !5
  %156 = load ptr, ptr %27, align 8, !tbaa !5
  %157 = invoke noundef ptr @_ZNK3rmg10Particle3D10getTextureEv(ptr noundef nonnull align 8 dereferenceable(140) %156)
          to label %158 unwind label %161

158:                                              ; preds = %152
  %159 = icmp eq ptr %157, null
  br i1 %159, label %160, label %165

160:                                              ; preds = %158
  store i32 7, ptr %14, align 4
  br label %220

161:                                              ; preds = %152
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %11, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %12, align 4
  br label %239

165:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #8
  %167 = load ptr, ptr %27, align 8, !tbaa !5
  %168 = invoke { <2 x float>, float } @_ZNK3rmg10Particle3D14getTranslationEv(ptr noundef nonnull align 8 dereferenceable(140) %167)
          to label %169 unwind label %226

169:                                              ; preds = %165
  %170 = getelementptr inbounds %"struct.rmg::Vec3", ptr %31, i32 0, i32 0
  %171 = getelementptr inbounds %union.anon.0, ptr %170, i32 0, i32 0
  store { <2 x float>, float } %168, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %171, ptr align 8 %32, i64 12, i1 false)
  invoke void @_ZN3rmg4Vec4C2ERKNS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(12) %31, float noundef 1.000000e+00)
          to label %172 unwind label %226

172:                                              ; preds = %169
  %173 = invoke { <2 x float>, <2 x float> } @_ZNK3rmg4Mat4mlERKNS_4Vec4E(ptr noundef nonnull align 4 dereferenceable(64) %166, ptr noundef nonnull align 4 dereferenceable(16) %30)
          to label %174 unwind label %226

174:                                              ; preds = %172
  %175 = getelementptr inbounds %"struct.rmg::Vec4", ptr %29, i32 0, i32 0
  %176 = getelementptr inbounds %union.anon.4, ptr %175, i32 0, i32 0
  %177 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %176, i32 0, i32 0
  %178 = extractvalue { <2 x float>, <2 x float> } %173, 0
  store <2 x float> %178, ptr %177, align 4
  %179 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %176, i32 0, i32 1
  %180 = extractvalue { <2 x float>, <2 x float> } %173, 1
  store <2 x float> %180, ptr %179, align 4
  %181 = invoke { <2 x float>, float } @_ZNK3rmg4Vec4cvNS_4Vec3EEv(ptr noundef nonnull align 4 dereferenceable(16) %29)
          to label %182 unwind label %226

182:                                              ; preds = %174
  %183 = getelementptr inbounds %"struct.rmg::Vec3", ptr %28, i32 0, i32 0
  %184 = getelementptr inbounds %union.anon.0, ptr %183, i32 0, i32 0
  store { <2 x float>, float } %181, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %184, ptr align 8 %33, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  %185 = load ptr, ptr @_ZN3rmg8internal12glUniform3fvE, align 8, !tbaa !5
  %186 = getelementptr inbounds %"class.rmg::internal::ParticleShader", ptr %36, i32 0, i32 1
  %187 = load i32, ptr %186, align 4, !tbaa !21
  %188 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg4Vec3ixEh(ptr noundef nonnull align 4 dereferenceable(12) %28, i8 noundef zeroext 0)
          to label %189 unwind label %230

189:                                              ; preds = %182
  invoke void %185(i32 noundef %187, i32 noundef 1, ptr noundef %188)
          to label %190 unwind label %230

190:                                              ; preds = %189
  %191 = load ptr, ptr @_ZN3rmg8internal18glUniformMatrix3fvE, align 8, !tbaa !5
  %192 = getelementptr inbounds %"class.rmg::internal::ParticleShader", ptr %36, i32 0, i32 2
  %193 = load i32, ptr %192, align 8, !tbaa !22
  %194 = load ptr, ptr %27, align 8, !tbaa !5
  %195 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZNK3rmg10Particle3D14getModelMatrixEv(ptr noundef nonnull align 8 dereferenceable(140) %194)
          to label %196 unwind label %230

196:                                              ; preds = %190
  %197 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %195, i8 noundef zeroext 0)
          to label %198 unwind label %230

198:                                              ; preds = %196
  %199 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %197, i8 noundef zeroext 0)
          to label %200 unwind label %230

200:                                              ; preds = %198
  invoke void %191(i32 noundef %193, i32 noundef 1, i8 noundef zeroext 1, ptr noundef %199)
          to label %201 unwind label %230

201:                                              ; preds = %200
  %202 = load ptr, ptr @_ZN3rmg8internal12glUniform4fvE, align 8, !tbaa !5
  %203 = getelementptr inbounds %"class.rmg::internal::ParticleShader", ptr %36, i32 0, i32 4
  %204 = load i32, ptr %203, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #8
  %205 = load ptr, ptr %27, align 8, !tbaa !5
  %206 = invoke { <2 x float>, <2 x float> } @_ZNK3rmg6Object8getColorEv(ptr noundef nonnull align 8 dereferenceable(48) %205)
          to label %207 unwind label %234

207:                                              ; preds = %201
  %208 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %34, i32 0, i32 0
  %209 = extractvalue { <2 x float>, <2 x float> } %206, 0
  store <2 x float> %209, ptr %208, align 4
  %210 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %34, i32 0, i32 1
  %211 = extractvalue { <2 x float>, <2 x float> } %206, 1
  store <2 x float> %211, ptr %210, align 4
  %212 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg9ColorRGBAixEh(ptr noundef nonnull align 4 dereferenceable(16) %34, i8 noundef zeroext 0)
          to label %213 unwind label %234

213:                                              ; preds = %207
  invoke void %202(i32 noundef %204, i32 noundef 1, ptr noundef %212)
          to label %214 unwind label %234

214:                                              ; preds = %213
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #8
  %215 = load ptr, ptr %27, align 8, !tbaa !5
  %216 = invoke noundef ptr @_ZNK3rmg10Particle3D10getTextureEv(ptr noundef nonnull align 8 dereferenceable(140) %215)
          to label %217 unwind label %230

217:                                              ; preds = %214
  invoke void @_ZNK3rmg8internal13SpriteTexture4bindEv(ptr noundef nonnull align 8 dereferenceable(12) %216)
          to label %218 unwind label %230

218:                                              ; preds = %217
  invoke void @glDrawArrays(i32 noundef 4, i32 noundef 0, i32 noundef 6)
          to label %219 unwind label %230

219:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #8
  store i32 0, ptr %14, align 4
  br label %220

220:                                              ; preds = %219, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  %221 = load i32, ptr %14, align 4
  switch i32 %221, label %248 [
    i32 0, label %222
    i32 7, label %223
  ]

222:                                              ; preds = %220
  br label %223

223:                                              ; preds = %222, %220
  %224 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKfPN3rmg10Particle3DEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %25, i32 noundef 0) #8
  %225 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %35, i32 0, i32 0
  store ptr %224, ptr %225, align 8
  br label %147, !llvm.loop !24

226:                                              ; preds = %174, %172, %169, %165
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %11, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  br label %238

230:                                              ; preds = %218, %217, %214, %200, %198, %196, %190, %189, %182
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %11, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %12, align 4
  br label %238

234:                                              ; preds = %213, %207, %201
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %11, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #8
  br label %238

238:                                              ; preds = %234, %230, %226
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #8
  br label %239

239:                                              ; preds = %238, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %242

240:                                              ; preds = %151
  call void @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #8
  br label %241

241:                                              ; preds = %240, %40
  ret void

242:                                              ; preds = %239, %143
  call void @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #8
  br label %243

243:                                              ; preds = %242
  %244 = load ptr, ptr %11, align 8
  %245 = load i32, ptr %12, align 4
  %246 = insertvalue { ptr, i32 } poison, ptr %244, 0
  %247 = insertvalue { ptr, i32 } %246, i32 %245, 1
  resume { ptr, i32 } %247

248:                                              ; preds = %220, %123
  unreachable
}

declare void @glEnable(i32 noundef) #3

declare void @glDepthFunc(i32 noundef) #3

declare void @glFrontFace(i32 noundef) #3

declare void @glDisable(i32 noundef) #3

declare void @glBlendFunc(i32 noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3rmg4Mat4ixEh(ptr noundef nonnull align 4 dereferenceable(64), i8 noundef zeroext) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3rmg7Mat4RowixEh(ptr noundef nonnull align 4 dereferenceable(16), i8 noundef zeroext) #4 align 2

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

declare { ptr, ptr } @_ZNK3rmg10ObjectList5beginEv(ptr noundef nonnull align 8 dereferenceable(20)) #3

declare noundef zeroext i1 @_ZN3rmg10ObjectList8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

declare { ptr, ptr } @_ZNK3rmg10ObjectList3endEv(ptr noundef nonnull align 8 dereferenceable(20)) #3

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3rmg10ObjectList8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16)) #3

declare noundef zeroext i1 @_ZNK3rmg6Object8isHiddenEv(ptr noundef nonnull align 8 dereferenceable(48)) #3

declare { <2 x float>, <2 x float> } @_ZNK3rmg4Mat4mlERKNS_4Vec4E(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(16)) #3

declare { <2 x float>, float } @_ZNK3rmg10Particle3D14getTranslationEv(ptr noundef nonnull align 8 dereferenceable(140)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3rmg4Vec4C2ERKNS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #6 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE6insertIRS5_IfS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) #7 align 2

declare { ptr, ptr } @_ZN3rmg10ObjectList8iteratorppEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #3

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

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

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

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

declare noundef ptr @_ZNK3rmg10Particle3D10getTextureEv(ptr noundef nonnull align 8 dereferenceable(140)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg4Vec3ixEh(ptr noundef nonnull align 4 dereferenceable(12), i8 noundef zeroext) #4 align 2

declare noundef nonnull align 4 dereferenceable(36) ptr @_ZNK3rmg10Particle3D14getModelMatrixEv(ptr noundef nonnull align 8 dereferenceable(140)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36), i8 noundef zeroext) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12), i8 noundef zeroext) #4 align 2

declare { <2 x float>, <2 x float> } @_ZNK3rmg6Object8getColorEv(ptr noundef nonnull align 8 dereferenceable(48)) #3

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg9ColorRGBAixEh(ptr noundef nonnull align 4 dereferenceable(16), i8 noundef zeroext) #3

declare void @_ZNK3rmg8internal13SpriteTexture4bindEv(ptr noundef nonnull align 8 dereferenceable(12)) #3

declare void @glDrawArrays(i32 noundef, i32 noundef, i32 noundef) #3

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #5 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 }

!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 8}
!10 = !{!"_ZTSN3rmg8internal6ShaderE", !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 32}
!13 = !{!"_ZTSN3rmg8internal14ParticleShaderE", !10, i64 0, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36}
!14 = !{!13, !11, i64 20}
!15 = !{!13, !11, i64 28}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !6, i64 8}
!19 = !{!"_ZTSSt4pairIKfPN3rmg10Particle3DEE", !20, i64 0, !6, i64 8}
!20 = !{!"float", !7, i64 0}
!21 = !{!13, !11, i64 12}
!22 = !{!13, !11, i64 16}
!23 = !{!13, !11, i64 24}
!24 = distinct !{!24, !17}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<float, std::pair<const float, rmg::Particle3D *>, std::_Select1st<std::pair<const float, rmg::Particle3D *>>, std::less<float>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<float, std::pair<const float, rmg::Particle3D *>, std::_Select1st<std::pair<const float, rmg::Particle3D *>>, std::less<float>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.rmg::ObjectList::iterator" = type { ptr, ptr }
%"struct.rmg::Vec3" = type { %union.anon.0 }
%union.anon.0 = type { %struct.anon }
%struct.anon = type { float, float, float }
%"struct.rmg::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { %struct.anon.5 }
%struct.anon.5 = type { float, float, float, float }
%"struct.std::pair" = type { float, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.rmg::ColorRGBA" = type { float, float, float, float }

@_ZN3rmg8internal17glBindVertexArrayE = external local_unnamed_addr global ptr, align 8
@_ZN3rmg8internal12glUseProgramE = external local_unnamed_addr global ptr, align 8
@_ZN3rmg8internal18glUniformMatrix4fvE = external local_unnamed_addr global ptr, align 8
@_ZN3rmg8internal11glUniform1iE = external local_unnamed_addr global ptr, align 8
@_ZN3rmg8internal12glUniform3fvE = external local_unnamed_addr global ptr, align 8
@_ZN3rmg8internal18glUniformMatrix3fvE = external local_unnamed_addr global ptr, align 8
@_ZN3rmg8internal12glUniform4fvE = external local_unnamed_addr global ptr, align 8

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg8internal14ParticleShader6renderERKNS_4Mat4ES4_RKNS_10ObjectListE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %0, ptr noundef nonnull align 4 dereferenceable(64) %1, ptr noundef nonnull align 4 dereferenceable(64) %2, ptr noundef nonnull align 8 dereferenceable(20) %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::map", align 8
  %6 = alloca %"class.rmg::ObjectList::iterator", align 8
  %7 = alloca %"class.rmg::ObjectList::iterator", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.rmg::Vec3", align 8
  %10 = alloca %"struct.rmg::Vec4", align 8
  %11 = alloca %"struct.rmg::Vec4", align 4
  %12 = alloca %"struct.rmg::Vec3", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.rmg::Vec3", align 8
  %17 = alloca %"struct.rmg::Vec4", align 8
  %18 = alloca %"struct.rmg::Vec4", align 4
  %19 = alloca %"struct.rmg::Vec3", align 8
  %20 = alloca %"struct.rmg::ColorRGBA", align 8
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = load i32, ptr %21, align 8, !tbaa !5
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %148, label %24

24:                                               ; preds = %4
  tail call void @glEnable(i32 noundef 2929)
  tail call void @glDepthFunc(i32 noundef 513)
  tail call void @glFrontFace(i32 noundef 2305)
  tail call void @glDisable(i32 noundef 2884)
  tail call void @glEnable(i32 noundef 3042)
  tail call void @glBlendFunc(i32 noundef 770, i32 noundef 771)
  %25 = load ptr, ptr @_ZN3rmg8internal12glUseProgramE, align 8, !tbaa !10
  %26 = load i32, ptr %21, align 8, !tbaa !5
  tail call void %25(i32 noundef %26)
  %27 = load ptr, ptr @_ZN3rmg8internal17glBindVertexArrayE, align 8, !tbaa !10
  %28 = getelementptr inbounds i8, ptr %0, i64 32
  %29 = load i32, ptr %28, align 8, !tbaa !12
  tail call void %27(i32 noundef %29)
  %30 = load ptr, ptr @_ZN3rmg8internal18glUniformMatrix4fvE, align 8, !tbaa !10
  %31 = getelementptr inbounds i8, ptr %0, i64 20
  %32 = load i32, ptr %31, align 4, !tbaa !14
  %33 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3rmg4Mat4ixEh(ptr noundef nonnull align 4 dereferenceable(64) %2, i8 noundef zeroext 0)
  %34 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3rmg7Mat4RowixEh(ptr noundef nonnull align 4 dereferenceable(16) %33, i8 noundef zeroext 0)
  tail call void %30(i32 noundef %32, i32 noundef 1, i8 noundef zeroext 1, ptr noundef nonnull %34)
  %35 = load ptr, ptr @_ZN3rmg8internal11glUniform1iE, align 8, !tbaa !10
  %36 = getelementptr inbounds i8, ptr %0, i64 28
  %37 = load i32, ptr %36, align 4, !tbaa !15
  tail call void %35(i32 noundef %37, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #7
  call void @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %38 = invoke { ptr, ptr } @_ZNK3rmg10ObjectList5beginEv(ptr noundef nonnull align 8 dereferenceable(20) %3)
          to label %39 unwind label %.loopexit.split-lp

39:                                               ; preds = %24
  %40 = extractvalue { ptr, ptr } %38, 0
  store ptr %40, ptr %6, align 8
  %41 = getelementptr inbounds i8, ptr %6, i64 8
  %42 = extractvalue { ptr, ptr } %38, 1
  store ptr %42, ptr %41, align 8
  %43 = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  %44 = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  br label %45

45:                                               ; preds = %82, %39
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %46 = invoke { ptr, ptr } @_ZNK3rmg10ObjectList3endEv(ptr noundef nonnull align 8 dereferenceable(20) %3)
          to label %47 unwind label %61

47:                                               ; preds = %45
  %48 = extractvalue { ptr, ptr } %46, 0
  store ptr %48, ptr %7, align 8
  %49 = extractvalue { ptr, ptr } %46, 1
  store ptr %49, ptr %43, align 8
  %50 = invoke noundef zeroext i1 @_ZN3rmg10ObjectList8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %51 unwind label %61

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br i1 %50, label %63, label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %53 = call ptr @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  store ptr %53, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %54 = call ptr @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  store ptr %54, ptr %15, align 8
  %55 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKfPN3rmg10Particle3DEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %55, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %52
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  %56 = getelementptr inbounds i8, ptr %17, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  %57 = getelementptr inbounds i8, ptr %0, i64 12
  %58 = getelementptr inbounds i8, ptr %0, i64 16
  %59 = getelementptr inbounds i8, ptr %0, i64 24
  %60 = getelementptr inbounds i8, ptr %20, i64 8
  br label %91

.loopexit:                                        ; preds = %82
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %90

.loopexit.split-lp:                               ; preds = %24
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %90

61:                                               ; preds = %47, %45
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %90

63:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %64 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3rmg10ObjectList8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %65 unwind label %68

65:                                               ; preds = %63
  store ptr %64, ptr %8, align 8, !tbaa !10
  %66 = invoke noundef zeroext i1 @_ZNK3rmg6Object8isHiddenEv(ptr noundef nonnull align 8 dereferenceable(48) %64)
          to label %67 unwind label %68

67:                                               ; preds = %65
  br i1 %66, label %82, label %70

68:                                               ; preds = %65, %63
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %89

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #7
  %71 = load ptr, ptr %8, align 8, !tbaa !10
  %72 = invoke { <2 x float>, float } @_ZNK3rmg10Particle3D14getTranslationEv(ptr noundef nonnull align 8 dereferenceable(140) %71)
          to label %73 unwind label %84

73:                                               ; preds = %70
  %.fca.0.extract17 = extractvalue { <2 x float>, float } %72, 0
  %.fca.1.extract18 = extractvalue { <2 x float>, float } %72, 1
  store <2 x float> %.fca.0.extract17, ptr %12, align 8
  store float %.fca.1.extract18, ptr %.sroa.220.0..sroa_idx, align 8
  call void @_ZN3rmg4Vec4C2ERKNS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef 1.000000e+00)
  %74 = invoke { <2 x float>, <2 x float> } @_ZNK3rmg4Mat4mlERKNS_4Vec4E(ptr noundef nonnull align 4 dereferenceable(64) %1, ptr noundef nonnull align 4 dereferenceable(16) %11)
          to label %75 unwind label %84

75:                                               ; preds = %73
  %76 = extractvalue { <2 x float>, <2 x float> } %74, 0
  store <2 x float> %76, ptr %10, align 8
  %77 = extractvalue { <2 x float>, <2 x float> } %74, 1
  store <2 x float> %77, ptr %44, align 8
  %78 = invoke { <2 x float>, float } @_ZNK3rmg4Vec4cvNS_4Vec3EEv(ptr noundef nonnull align 4 dereferenceable(16) %10)
          to label %79 unwind label %84

79:                                               ; preds = %75
  %.fca.0.extract13 = extractvalue { <2 x float>, float } %78, 0
  %.fca.1.extract14 = extractvalue { <2 x float>, float } %78, 1
  store <2 x float> %.fca.0.extract13, ptr %9, align 8
  store float %.fca.1.extract14, ptr %.sroa.216.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZNSt4pairIfPN3rmg10Particle3DEEC2IRfRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %.sroa.216.0..sroa_idx, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %80 = invoke { ptr, i8 } @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE6insertIRS5_IfS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %81 unwind label %86

81:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  br label %82

82:                                               ; preds = %67, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %83 = invoke { ptr, ptr } @_ZN3rmg10ObjectList8iteratorppEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef 0)
          to label %45 unwind label %.loopexit, !llvm.loop !16

84:                                               ; preds = %75, %73, %70
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %88

86:                                               ; preds = %79
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %88

88:                                               ; preds = %86, %84
  %.pn36 = phi { ptr, i32 } [ %87, %86 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  br label %89

89:                                               ; preds = %88, %68
  %.pn36.pn = phi { ptr, i32 } [ %.pn36, %88 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %90

90:                                               ; preds = %.loopexit, %.loopexit.split-lp, %89, %61
  %.pn39 = phi { ptr, i32 } [ %.pn36.pn, %89 ], [ %62, %61 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %149

._crit_edge:                                      ; preds = %136, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  br label %148

91:                                               ; preds = %.lr.ph, %136
  %92 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKfPN3rmg10Particle3DEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  %94 = load ptr, ptr %93, align 8, !tbaa !18
  %95 = invoke noundef ptr @_ZNK3rmg10Particle3D10getTextureEv(ptr noundef nonnull align 8 dereferenceable(140) %94)
          to label %96 unwind label %98

96:                                               ; preds = %91
  %97 = icmp eq ptr %95, null
  br i1 %97, label %136, label %100

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

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #7
  %101 = invoke { <2 x float>, float } @_ZNK3rmg10Particle3D14getTranslationEv(ptr noundef nonnull align 8 dereferenceable(140) %94)
          to label %102 unwind label %140

102:                                              ; preds = %100
  %.fca.0.extract2 = extractvalue { <2 x float>, float } %101, 0
  %.fca.1.extract3 = extractvalue { <2 x float>, float } %101, 1
  store <2 x float> %.fca.0.extract2, ptr %19, align 8
  store float %.fca.1.extract3, ptr %.sroa.25.0..sroa_idx, align 8
  call void @_ZN3rmg4Vec4C2ERKNS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(12) %19, float noundef 1.000000e+00)
  %103 = invoke { <2 x float>, <2 x float> } @_ZNK3rmg4Mat4mlERKNS_4Vec4E(ptr noundef nonnull align 4 dereferenceable(64) %1, ptr noundef nonnull align 4 dereferenceable(16) %18)
          to label %104 unwind label %140

104:                                              ; preds = %102
  %105 = extractvalue { <2 x float>, <2 x float> } %103, 0
  store <2 x float> %105, ptr %17, align 8
  %106 = extractvalue { <2 x float>, <2 x float> } %103, 1
  store <2 x float> %106, ptr %56, align 8
  %107 = invoke { <2 x float>, float } @_ZNK3rmg4Vec4cvNS_4Vec3EEv(ptr noundef nonnull align 4 dereferenceable(16) %17)
          to label %108 unwind label %140

108:                                              ; preds = %104
  %.fca.0.extract = extractvalue { <2 x float>, float } %107, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %107, 1
  store <2 x float> %.fca.0.extract, ptr %16, align 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  %109 = load ptr, ptr @_ZN3rmg8internal12glUniform3fvE, align 8, !tbaa !10
  %110 = load i32, ptr %57, align 4, !tbaa !21
  %111 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg4Vec3ixEh(ptr noundef nonnull align 4 dereferenceable(12) %16, i8 noundef zeroext 0)
          to label %112 unwind label %142

112:                                              ; preds = %108
  invoke void %109(i32 noundef %110, i32 noundef 1, ptr noundef nonnull %111)
          to label %113 unwind label %142

113:                                              ; preds = %112
  %114 = load ptr, ptr @_ZN3rmg8internal18glUniformMatrix3fvE, align 8, !tbaa !10
  %115 = load i32, ptr %58, align 8, !tbaa !22
  %116 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZNK3rmg10Particle3D14getModelMatrixEv(ptr noundef nonnull align 8 dereferenceable(140) %94)
          to label %117 unwind label %142

117:                                              ; preds = %113
  %118 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %116, i8 noundef zeroext 0)
          to label %119 unwind label %142

119:                                              ; preds = %117
  %120 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %118, i8 noundef zeroext 0)
          to label %121 unwind label %142

121:                                              ; preds = %119
  invoke void %114(i32 noundef %115, i32 noundef 1, i8 noundef zeroext 1, ptr noundef nonnull %120)
          to label %122 unwind label %142

122:                                              ; preds = %121
  %123 = load ptr, ptr @_ZN3rmg8internal12glUniform4fvE, align 8, !tbaa !10
  %124 = load i32, ptr %59, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #7
  %125 = invoke { <2 x float>, <2 x float> } @_ZNK3rmg6Object8getColorEv(ptr noundef nonnull align 8 dereferenceable(48) %94)
          to label %126 unwind label %144

126:                                              ; preds = %122
  %127 = extractvalue { <2 x float>, <2 x float> } %125, 0
  store <2 x float> %127, ptr %20, align 8
  %128 = extractvalue { <2 x float>, <2 x float> } %125, 1
  store <2 x float> %128, ptr %60, align 8
  %129 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg9ColorRGBAixEh(ptr noundef nonnull align 4 dereferenceable(16) %20, i8 noundef zeroext 0)
          to label %130 unwind label %144

130:                                              ; preds = %126
  invoke void %123(i32 noundef %124, i32 noundef 1, ptr noundef nonnull %129)
          to label %131 unwind label %144

131:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  %132 = invoke noundef ptr @_ZNK3rmg10Particle3D10getTextureEv(ptr noundef nonnull align 8 dereferenceable(140) %94)
          to label %133 unwind label %142

133:                                              ; preds = %131
  invoke void @_ZNK3rmg8internal13SpriteTexture4bindEv(ptr noundef nonnull align 8 dereferenceable(12) %132)
          to label %134 unwind label %142

134:                                              ; preds = %133
  invoke void @glDrawArrays(i32 noundef 4, i32 noundef 0, i32 noundef 6)
          to label %135 unwind label %142

135:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #7
  br label %136

136:                                              ; preds = %96, %135
  %137 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKfPN3rmg10Particle3DEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %138 = call ptr @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  store ptr %138, ptr %15, align 8
  %139 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKfPN3rmg10Particle3DEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %139, label %91, label %._crit_edge, !llvm.loop !24

140:                                              ; preds = %104, %102, %100
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  br label %146

142:                                              ; preds = %134, %133, %131, %121, %119, %117, %113, %112, %108
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %146

144:                                              ; preds = %130, %126, %122
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  br label %146

146:                                              ; preds = %144, %142, %140
  %.pn = phi { ptr, i32 } [ %143, %142 ], [ %145, %144 ], [ %141, %140 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #7
  br label %147

147:                                              ; preds = %146, %98
  %.pn.pn = phi { ptr, i32 } [ %.pn, %146 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %149

148:                                              ; preds = %4, %._crit_edge
  ret void

149:                                              ; preds = %147, %90
  %.pn39.pn = phi { ptr, i32 } [ %.pn39, %90 ], [ %.pn.pn, %147 ]
  call void @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn39.pn
}

declare void @glEnable(i32 noundef) local_unnamed_addr #2

declare void @glDepthFunc(i32 noundef) local_unnamed_addr #2

declare void @glFrontFace(i32 noundef) local_unnamed_addr #2

declare void @glDisable(i32 noundef) local_unnamed_addr #2

declare void @glBlendFunc(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3rmg4Mat4ixEh(ptr noundef nonnull align 4 dereferenceable(64), i8 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3rmg7Mat4RowixEh(ptr noundef nonnull align 4 dereferenceable(16), i8 noundef zeroext) local_unnamed_addr #3 align 2

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

declare { ptr, ptr } @_ZNK3rmg10ObjectList5beginEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN3rmg10ObjectList8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare { ptr, ptr } @_ZNK3rmg10ObjectList3endEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3rmg10ObjectList8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZNK3rmg6Object8isHiddenEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2

declare { <2 x float>, <2 x float> } @_ZNK3rmg4Mat4mlERKNS_4Vec4E(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2

declare { <2 x float>, float } @_ZNK3rmg10Particle3D14getTranslationEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3rmg4Vec4C2ERKNS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIfPN3rmg10Particle3DESt4lessIfESaISt4pairIKfS2_EEE6insertIRS5_IfS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6 align 2

declare { ptr, ptr } @_ZN3rmg10ObjectList8iteratorppEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #2

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

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

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

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

declare noundef ptr @_ZNK3rmg10Particle3D10getTextureEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg4Vec3ixEh(ptr noundef nonnull align 4 dereferenceable(12), i8 noundef zeroext) local_unnamed_addr #3 align 2

declare noundef nonnull align 4 dereferenceable(36) ptr @_ZNK3rmg10Particle3D14getModelMatrixEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36), i8 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12), i8 noundef zeroext) local_unnamed_addr #3 align 2

declare { <2 x float>, <2 x float> } @_ZNK3rmg6Object8getColorEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg9ColorRGBAixEh(ptr noundef nonnull align 4 dereferenceable(16), i8 noundef zeroext) local_unnamed_addr #2

declare void @_ZNK3rmg8internal13SpriteTexture4bindEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2

declare void @glDrawArrays(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 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 #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 = { 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 #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN3rmg8internal6ShaderE", !7, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !7, i64 32}
!13 = !{!"_ZTSN3rmg8internal14ParticleShaderE", !6, i64 0, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36}
!14 = !{!13, !7, i64 20}
!15 = !{!13, !7, i64 28}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !11, i64 8}
!19 = !{!"_ZTSSt4pairIKfPN3rmg10Particle3DEE", !20, i64 0, !11, i64 8}
!20 = !{!"float", !8, i64 0}
!21 = !{!13, !7, i64 12}
!22 = !{!13, !7, i64 16}
!23 = !{!13, !7, i64 24}
!24 = distinct !{!24, !17}


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