; LLVM IR from achilles288/robot-monitor-graphics :: src/base/internal (object2d_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"

%"struct.rmg::Mat3" = type { %union.anon }
%union.anon = type { [3 x [3 x float]] }
%"class.std::multimap" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<short, std::pair<const short, rmg::Object2D *>, std::_Select1st<std::pair<const short, rmg::Object2D *>>, std::less<short>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<short, std::pair<const short, rmg::Object2D *>, std::_Select1st<std::pair<const short, rmg::Object2D *>>, std::less<short>>::_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.std::pair" = type { i16, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.1" = type { i16, ptr }
%"class.rmg::internal::Object2DShader" = type { %"class.rmg::internal::SpriteShader", %"class.rmg::internal::Text2DShader", %"struct.rmg::Mat3", i16, i16 }
%"class.rmg::internal::SpriteShader" = type { %"class.rmg::internal::Shader.base", i32, i32, i32, i32, i32 }
%"class.rmg::internal::Shader.base" = type <{ ptr, i32 }>
%"class.rmg::internal::Text2DShader" = type { %"class.rmg::internal::Shader.base", i32, i32, i32, i32, i32, i32, i32 }

@_ZN3rmg8internalL10prevShaderE = external hidden global i32, align 4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3rmg8internal12SpriteShader6renderEPNS_8Sprite2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 4 dereferenceable(36)) #1 align 2

declare void @_ZNK3rmg4Mat3mlERKS0_(ptr dead_on_unwind writable sret(%"struct.rmg::Mat3") align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(36)) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3rmg8internal12Text2DShader6renderEPNS_6Text2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef nonnull align 4 dereferenceable(36)) #1 align 2

declare void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg8internal14Object2DShader6renderERKNS_10ObjectListE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(20) %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::multimap", align 8
  %6 = alloca %"class.rmg::ObjectList::iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.rmg::ObjectList::iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i16, align 2
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"class.rmg::ObjectList::iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.rmg::Mat3", align 4
  %20 = alloca %"struct.rmg::Mat3", align 4
  %21 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8
  call void @glDisable(i32 noundef 2929)
  call void @glEnable(i32 noundef 3042)
  call void @glBlendFunc(i32 noundef 770, i32 noundef 771)
  store i32 0, ptr @_ZN3rmg8internalL10prevShaderE, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #6
  call void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = invoke { ptr, ptr } @_ZNK3rmg10ObjectList5beginEv(ptr noundef nonnull align 8 dereferenceable(20) %23)
          to label %25 unwind label %41

25:                                               ; preds = %2
  %26 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 0
  %27 = extractvalue { ptr, ptr } %24, 0
  store ptr %27, ptr %26, align 8
  %28 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 1
  %29 = extractvalue { ptr, ptr } %24, 1
  store ptr %29, ptr %28, align 8
  br label %30

30:                                               ; preds = %90, %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = invoke { ptr, ptr } @_ZNK3rmg10ObjectList3endEv(ptr noundef nonnull align 8 dereferenceable(20) %31)
          to label %33 unwind label %45

33:                                               ; preds = %30
  %34 = getelementptr inbounds { ptr, ptr }, ptr %9, i32 0, i32 0
  %35 = extractvalue { ptr, ptr } %32, 0
  store ptr %35, ptr %34, align 8
  %36 = getelementptr inbounds { ptr, ptr }, ptr %9, i32 0, i32 1
  %37 = extractvalue { ptr, ptr } %32, 1
  store ptr %37, ptr %36, align 8
  %38 = invoke noundef zeroext i1 @_ZN3rmg10ObjectList8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %39 unwind label %45

39:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br i1 %38, label %49, label %40

40:                                               ; preds = %39
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %102

41:                                               ; preds = %88, %2
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %7, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %8, align 4
  br label %101

45:                                               ; preds = %33, %30
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %7, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %101

49:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %50 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3rmg10ObjectList8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %51 unwind label %56

51:                                               ; preds = %49
  store ptr %50, ptr %11, align 8, !tbaa !5
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = invoke noundef zeroext i1 @_ZNK3rmg6Object8isHiddenEv(ptr noundef nonnull align 8 dereferenceable(48) %52)
          to label %54 unwind label %56

54:                                               ; preds = %51
  br i1 %53, label %55, label %60

55:                                               ; preds = %54
  store i32 4, ptr %10, align 4
  br label %85

56:                                               ; preds = %51, %49
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %7, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %8, align 4
  br label %100

60:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 2, ptr %12) #6
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = invoke noundef signext i8 @_ZNK3rmg8Object2D9getZOrderEv(ptr noundef nonnull align 8 dereferenceable(108) %61)
          to label %63 unwind label %76

63:                                               ; preds = %60
  %64 = sext i8 %62 to i32
  %65 = mul nsw i32 2, %64
  %66 = trunc i32 %65 to i16
  store i16 %66, ptr %12, align 2, !tbaa !11
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = invoke noundef i32 @_ZNK3rmg8Object2D15getObject2DTypeEv(ptr noundef nonnull align 8 dereferenceable(108) %67)
          to label %69 unwind label %76

69:                                               ; preds = %63
  %70 = icmp eq i32 %68, 2
  br i1 %70, label %71, label %80

71:                                               ; preds = %69
  %72 = load i16, ptr %12, align 2, !tbaa !11
  %73 = sext i16 %72 to i32
  %74 = add nsw i32 %73, 1
  %75 = trunc i32 %74 to i16
  store i16 %75, ptr %12, align 2, !tbaa !11
  br label %80

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

80:                                               ; preds = %71, %69
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  invoke void @_ZNSt4pairIsPN3rmg8Object2DEEC2IRsRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 2 dereferenceable(2) %12, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %81 unwind label %95

81:                                               ; preds = %80
  %82 = invoke ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE6insertIRS5_IsS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueESt17_Rb_tree_iteratorIS7_EE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %83 unwind label %95

83:                                               ; preds = %81
  %84 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %14, i32 0, i32 0
  store ptr %82, ptr %84, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #6
  store i32 0, ptr %10, align 4
  br label %85

85:                                               ; preds = %83, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %86 = load i32, ptr %10, align 4
  switch i32 %86, label %274 [
    i32 0, label %87
    i32 4, label %88
  ]

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %87, %85
  %89 = invoke { ptr, ptr } @_ZN3rmg10ObjectList8iteratorppEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef 0)
          to label %90 unwind label %41

90:                                               ; preds = %88
  %91 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 0
  %92 = extractvalue { ptr, ptr } %89, 0
  store ptr %92, ptr %91, align 8
  %93 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 1
  %94 = extractvalue { ptr, ptr } %89, 1
  store ptr %94, ptr %93, align 8
  br label %30, !llvm.loop !13

95:                                               ; preds = %81, %80
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %7, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %99

99:                                               ; preds = %95, %76
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #6
  br label %100

100:                                              ; preds = %99, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %101

101:                                              ; preds = %100, %45, %41
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %268

102:                                              ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %103 = call ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %104 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %16, i32 0, i32 0
  store ptr %103, ptr %104, align 8
  br label %105

105:                                              ; preds = %263, %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %106 = call ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %107 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %17, i32 0, i32 0
  store ptr %106, ptr %107, align 8
  %108 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKsPN3rmg8Object2DEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %267

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %111 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKsPN3rmg8Object2DEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %112 = getelementptr inbounds %"struct.std::pair.1", ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !15
  store ptr %113, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr %19) #6
  invoke void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36) %19)
          to label %114 unwind label %118

114:                                              ; preds = %110
  %115 = load ptr, ptr %18, align 8, !tbaa !5
  %116 = invoke noundef i32 @_ZNK3rmg8Object2D12getAlignmentEv(ptr noundef nonnull align 8 dereferenceable(108) %115)
          to label %117 unwind label %118

117:                                              ; preds = %114
  switch i32 %116, label %244 [
    i32 0, label %122
    i32 1, label %143
    i32 2, label %154
    i32 3, label %174
    i32 4, label %244
    i32 5, label %185
    i32 6, label %195
    i32 7, label %215
    i32 8, label %225
  ]

118:                                              ; preds = %241, %234, %232, %225, %222, %215, %212, %205, %203, %195, %192, %185, %182, %174, %171, %163, %161, %154, %151, %143, %140, %132, %130, %122, %114, %110
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %7, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %8, align 4
  br label %266

122:                                              ; preds = %117
  %123 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 3
  %124 = load i16, ptr %123, align 4, !tbaa !17
  %125 = zext i16 %124 to i32
  %126 = sub nsw i32 0, %125
  %127 = sdiv i32 %126, 2
  %128 = sitofp i32 %127 to float
  %129 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 0)
          to label %130 unwind label %118

130:                                              ; preds = %122
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %129, i8 noundef zeroext 2)
          to label %132 unwind label %118

132:                                              ; preds = %130
  store float %128, ptr %131, align 4, !tbaa !23
  %133 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 4
  %134 = load i16, ptr %133, align 2, !tbaa !25
  %135 = zext i16 %134 to i32
  %136 = sub nsw i32 0, %135
  %137 = sdiv i32 %136, 2
  %138 = sitofp i32 %137 to float
  %139 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 1)
          to label %140 unwind label %118

140:                                              ; preds = %132
  %141 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %139, i8 noundef zeroext 2)
          to label %142 unwind label %118

142:                                              ; preds = %140
  store float %138, ptr %141, align 4, !tbaa !23
  br label %244

143:                                              ; preds = %117
  %144 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 4
  %145 = load i16, ptr %144, align 2, !tbaa !25
  %146 = zext i16 %145 to i32
  %147 = sub nsw i32 0, %146
  %148 = sdiv i32 %147, 2
  %149 = sitofp i32 %148 to float
  %150 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 1)
          to label %151 unwind label %118

151:                                              ; preds = %143
  %152 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %150, i8 noundef zeroext 2)
          to label %153 unwind label %118

153:                                              ; preds = %151
  store float %149, ptr %152, align 4, !tbaa !23
  br label %244

154:                                              ; preds = %117
  %155 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 3
  %156 = load i16, ptr %155, align 4, !tbaa !17
  %157 = zext i16 %156 to i32
  %158 = sdiv i32 %157, 2
  %159 = sitofp i32 %158 to float
  %160 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 0)
          to label %161 unwind label %118

161:                                              ; preds = %154
  %162 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %160, i8 noundef zeroext 2)
          to label %163 unwind label %118

163:                                              ; preds = %161
  store float %159, ptr %162, align 4, !tbaa !23
  %164 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 4
  %165 = load i16, ptr %164, align 2, !tbaa !25
  %166 = zext i16 %165 to i32
  %167 = sub nsw i32 0, %166
  %168 = sdiv i32 %167, 2
  %169 = sitofp i32 %168 to float
  %170 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 1)
          to label %171 unwind label %118

171:                                              ; preds = %163
  %172 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %170, i8 noundef zeroext 2)
          to label %173 unwind label %118

173:                                              ; preds = %171
  store float %169, ptr %172, align 4, !tbaa !23
  br label %244

174:                                              ; preds = %117
  %175 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 3
  %176 = load i16, ptr %175, align 4, !tbaa !17
  %177 = zext i16 %176 to i32
  %178 = sub nsw i32 0, %177
  %179 = sdiv i32 %178, 2
  %180 = sitofp i32 %179 to float
  %181 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 0)
          to label %182 unwind label %118

182:                                              ; preds = %174
  %183 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %181, i8 noundef zeroext 2)
          to label %184 unwind label %118

184:                                              ; preds = %182
  store float %180, ptr %183, align 4, !tbaa !23
  br label %244

185:                                              ; preds = %117
  %186 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 3
  %187 = load i16, ptr %186, align 4, !tbaa !17
  %188 = zext i16 %187 to i32
  %189 = sdiv i32 %188, 2
  %190 = sitofp i32 %189 to float
  %191 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 0)
          to label %192 unwind label %118

192:                                              ; preds = %185
  %193 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %191, i8 noundef zeroext 2)
          to label %194 unwind label %118

194:                                              ; preds = %192
  store float %190, ptr %193, align 4, !tbaa !23
  br label %244

195:                                              ; preds = %117
  %196 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 3
  %197 = load i16, ptr %196, align 4, !tbaa !17
  %198 = zext i16 %197 to i32
  %199 = sub nsw i32 0, %198
  %200 = sdiv i32 %199, 2
  %201 = sitofp i32 %200 to float
  %202 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 0)
          to label %203 unwind label %118

203:                                              ; preds = %195
  %204 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %202, i8 noundef zeroext 2)
          to label %205 unwind label %118

205:                                              ; preds = %203
  store float %201, ptr %204, align 4, !tbaa !23
  %206 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 4
  %207 = load i16, ptr %206, align 2, !tbaa !25
  %208 = zext i16 %207 to i32
  %209 = sdiv i32 %208, 2
  %210 = sitofp i32 %209 to float
  %211 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 1)
          to label %212 unwind label %118

212:                                              ; preds = %205
  %213 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %211, i8 noundef zeroext 2)
          to label %214 unwind label %118

214:                                              ; preds = %212
  store float %210, ptr %213, align 4, !tbaa !23
  br label %244

215:                                              ; preds = %117
  %216 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 4
  %217 = load i16, ptr %216, align 2, !tbaa !25
  %218 = zext i16 %217 to i32
  %219 = sdiv i32 %218, 2
  %220 = sitofp i32 %219 to float
  %221 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 1)
          to label %222 unwind label %118

222:                                              ; preds = %215
  %223 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %221, i8 noundef zeroext 2)
          to label %224 unwind label %118

224:                                              ; preds = %222
  store float %220, ptr %223, align 4, !tbaa !23
  br label %244

225:                                              ; preds = %117
  %226 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 3
  %227 = load i16, ptr %226, align 4, !tbaa !17
  %228 = zext i16 %227 to i32
  %229 = sdiv i32 %228, 2
  %230 = sitofp i32 %229 to float
  %231 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 0)
          to label %232 unwind label %118

232:                                              ; preds = %225
  %233 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %231, i8 noundef zeroext 2)
          to label %234 unwind label %118

234:                                              ; preds = %232
  store float %230, ptr %233, align 4, !tbaa !23
  %235 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 4
  %236 = load i16, ptr %235, align 2, !tbaa !25
  %237 = zext i16 %236 to i32
  %238 = sdiv i32 %237, 2
  %239 = sitofp i32 %238 to float
  %240 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 1)
          to label %241 unwind label %118

241:                                              ; preds = %234
  %242 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %240, i8 noundef zeroext 2)
          to label %243 unwind label %118

243:                                              ; preds = %241
  store float %239, ptr %242, align 4, !tbaa !23
  br label %244

244:                                              ; preds = %243, %224, %214, %194, %184, %173, %153, %142, %117, %117
  call void @llvm.lifetime.start.p0(i64 36, ptr %20) #6
  %245 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 2
  invoke void @_ZNK3rmg4Mat3mlERKS0_(ptr dead_on_unwind writable sret(%"struct.rmg::Mat3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(36) %245, ptr noundef nonnull align 4 dereferenceable(36) %19)
          to label %246 unwind label %250

246:                                              ; preds = %244
  %247 = load ptr, ptr %18, align 8, !tbaa !5
  %248 = invoke noundef i32 @_ZNK3rmg8Object2D15getObject2DTypeEv(ptr noundef nonnull align 8 dereferenceable(108) %247)
          to label %249 unwind label %250

249:                                              ; preds = %246
  switch i32 %248, label %262 [
    i32 1, label %254
    i32 2, label %258
    i32 0, label %262
  ]

250:                                              ; preds = %258, %254, %246, %244
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %7, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 36, ptr %20) #6
  br label %266

254:                                              ; preds = %249
  %255 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 0
  %256 = load ptr, ptr %18, align 8, !tbaa !5
  invoke void @_ZN3rmg8internal12SpriteShader6renderEPNS_8Sprite2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(32) %255, ptr noundef %256, ptr noundef nonnull align 4 dereferenceable(36) %20)
          to label %257 unwind label %250

257:                                              ; preds = %254
  br label %262

258:                                              ; preds = %249
  %259 = getelementptr inbounds %"class.rmg::internal::Object2DShader", ptr %22, i32 0, i32 1
  %260 = load ptr, ptr %18, align 8, !tbaa !5
  invoke void @_ZN3rmg8internal12Text2DShader6renderEPNS_6Text2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(40) %259, ptr noundef %260, ptr noundef nonnull align 4 dereferenceable(36) %20)
          to label %261 unwind label %250

261:                                              ; preds = %258
  br label %262

262:                                              ; preds = %261, %257, %249, %249
  call void @llvm.lifetime.end.p0(i64 36, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %263

263:                                              ; preds = %262
  %264 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKsPN3rmg8Object2DEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef 0) #6
  %265 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %21, i32 0, i32 0
  store ptr %264, ptr %265, align 8
  br label %105, !llvm.loop !26

266:                                              ; preds = %250, %118
  call void @llvm.lifetime.end.p0(i64 36, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %268

267:                                              ; preds = %109
  store i32 0, ptr @_ZN3rmg8internalL10prevShaderE, align 4, !tbaa !9
  call void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #6
  ret void

268:                                              ; preds = %266, %101
  call void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #6
  br label %269

269:                                              ; preds = %268
  %270 = load ptr, ptr %7, align 8
  %271 = load i32, ptr %8, align 4
  %272 = insertvalue { ptr, i32 } poison, ptr %270, 0
  %273 = insertvalue { ptr, i32 } %272, i32 %271, 1
  resume { ptr, i32 } %273

274:                                              ; preds = %85
  unreachable
}

declare void @glDisable(i32 noundef) #2

declare void @glEnable(i32 noundef) #2

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

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

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

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

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

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

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

declare noundef signext i8 @_ZNK3rmg8Object2D9getZOrderEv(ptr noundef nonnull align 8 dereferenceable(108)) #2

declare noundef i32 @_ZNK3rmg8Object2D15getObject2DTypeEv(ptr noundef nonnull align 8 dereferenceable(108)) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_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_iteratorISt4pairIKsPN3rmg8Object2DEEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

declare noundef i32 @_ZNK3rmg8Object2D12getAlignmentEv(ptr noundef nonnull align 8 dereferenceable(108)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_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 = { 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 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 = { nounwind }

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

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


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

%"struct.rmg::Mat3" = type { %union.anon }
%union.anon = type { [3 x [3 x float]] }
%"class.std::multimap" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<short, std::pair<const short, rmg::Object2D *>, std::_Select1st<std::pair<const short, rmg::Object2D *>>, std::less<short>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<short, std::pair<const short, rmg::Object2D *>, std::_Select1st<std::pair<const short, rmg::Object2D *>>, std::less<short>>::_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.std::pair" = type { i16, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@_ZN3rmg8internalL10prevShaderE = external hidden local_unnamed_addr global i32, align 4

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
declare dso_local void @_ZN3rmg8internal12SpriteShader6renderEPNS_8Sprite2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #1 align 2

declare void @_ZNK3rmg4Mat3mlERKS0_(ptr dead_on_unwind writable sret(%"struct.rmg::Mat3") align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(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 @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12), i8 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3rmg8internal12Text2DShader6renderEPNS_6Text2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #1 align 2

declare void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg8internal14Object2DShader6renderERKNS_10ObjectListE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(20) %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::multimap", align 8
  %4 = alloca %"class.rmg::ObjectList::iterator", align 8
  %5 = alloca %"class.rmg::ObjectList::iterator", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i16, align 2
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca %"struct.rmg::Mat3", align 4
  %12 = alloca %"struct.rmg::Mat3", align 4
  tail call void @glDisable(i32 noundef 2929)
  tail call void @glEnable(i32 noundef 3042)
  tail call void @glBlendFunc(i32 noundef 770, i32 noundef 771)
  store i32 0, ptr @_ZN3rmg8internalL10prevShaderE, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  call void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %13 = invoke { ptr, ptr } @_ZNK3rmg10ObjectList5beginEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
          to label %14 unwind label %.loopexit.split-lp

14:                                               ; preds = %2
  %15 = extractvalue { ptr, ptr } %13, 0
  store ptr %15, ptr %4, align 8
  %16 = getelementptr inbounds i8, ptr %4, i64 8
  %17 = extractvalue { ptr, ptr } %13, 1
  store ptr %17, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr %5, i64 8
  br label %19

19:                                               ; preds = %61, %14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %20 = invoke { ptr, ptr } @_ZNK3rmg10ObjectList3endEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
          to label %21 unwind label %34

21:                                               ; preds = %19
  %22 = extractvalue { ptr, ptr } %20, 0
  store ptr %22, ptr %5, align 8
  %23 = extractvalue { ptr, ptr } %20, 1
  store ptr %23, ptr %18, align 8
  %24 = invoke noundef zeroext i1 @_ZN3rmg10ObjectList8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %25 unwind label %34

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br i1 %24, label %36, label %26

26:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %27 = call ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %27, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %28 = call ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %28, ptr %10, align 8
  %29 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKsPN3rmg8Object2DEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %29, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %26
  %30 = getelementptr inbounds i8, ptr %0, i64 110
  %31 = getelementptr inbounds i8, ptr %0, i64 108
  %32 = getelementptr inbounds i8, ptr %0, i64 72
  %33 = getelementptr inbounds i8, ptr %0, i64 32
  br label %68

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

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

34:                                               ; preds = %21, %19
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %67

36:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %37 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3rmg10ObjectList8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %38 unwind label %41

38:                                               ; preds = %36
  store ptr %37, ptr %6, align 8, !tbaa !9
  %39 = invoke noundef zeroext i1 @_ZNK3rmg6Object8isHiddenEv(ptr noundef nonnull align 8 dereferenceable(48) %37)
          to label %40 unwind label %41

40:                                               ; preds = %38
  br i1 %39, label %61, label %43

41:                                               ; preds = %38, %36
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %66

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %7) #6
  %44 = load ptr, ptr %6, align 8, !tbaa !9
  %45 = invoke noundef signext i8 @_ZNK3rmg8Object2D9getZOrderEv(ptr noundef nonnull align 8 dereferenceable(108) %44)
          to label %46 unwind label %56

46:                                               ; preds = %43
  %47 = sext i8 %45 to i16
  %48 = shl nsw i16 %47, 1
  store i16 %48, ptr %7, align 2, !tbaa !11
  %49 = load ptr, ptr %6, align 8, !tbaa !9
  %50 = invoke noundef i32 @_ZNK3rmg8Object2D15getObject2DTypeEv(ptr noundef nonnull align 8 dereferenceable(108) %49)
          to label %51 unwind label %56

51:                                               ; preds = %46
  %52 = icmp eq i32 %50, 2
  br i1 %52, label %53, label %58

53:                                               ; preds = %51
  %54 = load i16, ptr %7, align 2, !tbaa !11
  %55 = add i16 %54, 1
  store i16 %55, ptr %7, align 2, !tbaa !11
  br label %58

56:                                               ; preds = %46, %43
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %65

58:                                               ; preds = %53, %51
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @_ZNSt4pairIsPN3rmg8Object2DEEC2IRsRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 2 dereferenceable(2) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %59 = invoke ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE6insertIRS5_IsS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueESt17_Rb_tree_iteratorIS7_EE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %60 unwind label %63

60:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #6
  br label %61

61:                                               ; preds = %40, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %62 = invoke { ptr, ptr } @_ZN3rmg10ObjectList8iteratorppEi(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef 0)
          to label %19 unwind label %.loopexit, !llvm.loop !13

63:                                               ; preds = %58
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br label %65

65:                                               ; preds = %63, %56
  %.pn16 = phi { ptr, i32 } [ %64, %63 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #6
  br label %66

66:                                               ; preds = %65, %41
  %.pn16.pn = phi { ptr, i32 } [ %.pn16, %65 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %67

67:                                               ; preds = %.loopexit, %.loopexit.split-lp, %66, %34
  %.pn19 = phi { ptr, i32 } [ %.pn16.pn, %66 ], [ %35, %34 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %194

._crit_edge:                                      ; preds = %189, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  store i32 0, ptr @_ZN3rmg8internalL10prevShaderE, align 4, !tbaa !5
  call void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  ret void

68:                                               ; preds = %.lr.ph, %189
  %69 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKsPN3rmg8Object2DEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load ptr, ptr %70, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %11) #6
  invoke void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36) %11)
          to label %72 unwind label %75

72:                                               ; preds = %68
  %73 = invoke noundef i32 @_ZNK3rmg8Object2D12getAlignmentEv(ptr noundef nonnull align 8 dereferenceable(108) %71)
          to label %74 unwind label %75

74:                                               ; preds = %72
  switch i32 %73, label %181 [
    i32 0, label %77
    i32 1, label %96
    i32 2, label %106
    i32 3, label %123
    i32 8, label %166
    i32 5, label %133
    i32 6, label %141
    i32 7, label %158
  ]

75:                                               ; preds = %178, %173, %171, %166, %163, %158, %155, %150, %148, %141, %138, %133, %130, %123, %120, %113, %111, %106, %103, %96, %93, %86, %84, %77, %72, %68
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %193

77:                                               ; preds = %74
  %78 = load i16, ptr %31, align 4, !tbaa !17
  %79 = lshr i16 %78, 1
  %80 = zext nneg i16 %79 to i32
  %81 = sub nsw i32 0, %80
  %82 = sitofp i32 %81 to float
  %83 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 0)
          to label %84 unwind label %75

84:                                               ; preds = %77
  %85 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %83, i8 noundef zeroext 2)
          to label %86 unwind label %75

86:                                               ; preds = %84
  store float %82, ptr %85, align 4, !tbaa !23
  %87 = load i16, ptr %30, align 2, !tbaa !25
  %88 = lshr i16 %87, 1
  %89 = zext nneg i16 %88 to i32
  %90 = sub nsw i32 0, %89
  %91 = sitofp i32 %90 to float
  %92 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 1)
          to label %93 unwind label %75

93:                                               ; preds = %86
  %94 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %92, i8 noundef zeroext 2)
          to label %95 unwind label %75

95:                                               ; preds = %93
  store float %91, ptr %94, align 4, !tbaa !23
  br label %181

96:                                               ; preds = %74
  %97 = load i16, ptr %30, align 2, !tbaa !25
  %98 = lshr i16 %97, 1
  %99 = zext nneg i16 %98 to i32
  %100 = sub nsw i32 0, %99
  %101 = sitofp i32 %100 to float
  %102 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 1)
          to label %103 unwind label %75

103:                                              ; preds = %96
  %104 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %102, i8 noundef zeroext 2)
          to label %105 unwind label %75

105:                                              ; preds = %103
  store float %101, ptr %104, align 4, !tbaa !23
  br label %181

106:                                              ; preds = %74
  %107 = load i16, ptr %31, align 4, !tbaa !17
  %108 = lshr i16 %107, 1
  %109 = uitofp nneg i16 %108 to float
  %110 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 0)
          to label %111 unwind label %75

111:                                              ; preds = %106
  %112 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %110, i8 noundef zeroext 2)
          to label %113 unwind label %75

113:                                              ; preds = %111
  store float %109, ptr %112, align 4, !tbaa !23
  %114 = load i16, ptr %30, align 2, !tbaa !25
  %115 = lshr i16 %114, 1
  %116 = zext nneg i16 %115 to i32
  %117 = sub nsw i32 0, %116
  %118 = sitofp i32 %117 to float
  %119 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 1)
          to label %120 unwind label %75

120:                                              ; preds = %113
  %121 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %119, i8 noundef zeroext 2)
          to label %122 unwind label %75

122:                                              ; preds = %120
  store float %118, ptr %121, align 4, !tbaa !23
  br label %181

123:                                              ; preds = %74
  %124 = load i16, ptr %31, align 4, !tbaa !17
  %125 = lshr i16 %124, 1
  %126 = zext nneg i16 %125 to i32
  %127 = sub nsw i32 0, %126
  %128 = sitofp i32 %127 to float
  %129 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 0)
          to label %130 unwind label %75

130:                                              ; preds = %123
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %129, i8 noundef zeroext 2)
          to label %132 unwind label %75

132:                                              ; preds = %130
  store float %128, ptr %131, align 4, !tbaa !23
  br label %181

133:                                              ; preds = %74
  %134 = load i16, ptr %31, align 4, !tbaa !17
  %135 = lshr i16 %134, 1
  %136 = uitofp nneg i16 %135 to float
  %137 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 0)
          to label %138 unwind label %75

138:                                              ; preds = %133
  %139 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %137, i8 noundef zeroext 2)
          to label %140 unwind label %75

140:                                              ; preds = %138
  store float %136, ptr %139, align 4, !tbaa !23
  br label %181

141:                                              ; preds = %74
  %142 = load i16, ptr %31, align 4, !tbaa !17
  %143 = lshr i16 %142, 1
  %144 = zext nneg i16 %143 to i32
  %145 = sub nsw i32 0, %144
  %146 = sitofp i32 %145 to float
  %147 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 0)
          to label %148 unwind label %75

148:                                              ; preds = %141
  %149 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %147, i8 noundef zeroext 2)
          to label %150 unwind label %75

150:                                              ; preds = %148
  store float %146, ptr %149, align 4, !tbaa !23
  %151 = load i16, ptr %30, align 2, !tbaa !25
  %152 = lshr i16 %151, 1
  %153 = uitofp nneg i16 %152 to float
  %154 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 1)
          to label %155 unwind label %75

155:                                              ; preds = %150
  %156 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %154, i8 noundef zeroext 2)
          to label %157 unwind label %75

157:                                              ; preds = %155
  store float %153, ptr %156, align 4, !tbaa !23
  br label %181

158:                                              ; preds = %74
  %159 = load i16, ptr %30, align 2, !tbaa !25
  %160 = lshr i16 %159, 1
  %161 = uitofp nneg i16 %160 to float
  %162 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 1)
          to label %163 unwind label %75

163:                                              ; preds = %158
  %164 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %162, i8 noundef zeroext 2)
          to label %165 unwind label %75

165:                                              ; preds = %163
  store float %161, ptr %164, align 4, !tbaa !23
  br label %181

166:                                              ; preds = %74
  %167 = load i16, ptr %31, align 4, !tbaa !17
  %168 = lshr i16 %167, 1
  %169 = uitofp nneg i16 %168 to float
  %170 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 0)
          to label %171 unwind label %75

171:                                              ; preds = %166
  %172 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %170, i8 noundef zeroext 2)
          to label %173 unwind label %75

173:                                              ; preds = %171
  store float %169, ptr %172, align 4, !tbaa !23
  %174 = load i16, ptr %30, align 2, !tbaa !25
  %175 = lshr i16 %174, 1
  %176 = uitofp nneg i16 %175 to float
  %177 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %11, i8 noundef zeroext 1)
          to label %178 unwind label %75

178:                                              ; preds = %173
  %179 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %177, i8 noundef zeroext 2)
          to label %180 unwind label %75

180:                                              ; preds = %178
  store float %176, ptr %179, align 4, !tbaa !23
  br label %181

181:                                              ; preds = %180, %165, %157, %140, %132, %122, %105, %95, %74
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %12) #6
  invoke void @_ZNK3rmg4Mat3mlERKS0_(ptr dead_on_unwind nonnull writable sret(%"struct.rmg::Mat3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(36) %32, ptr noundef nonnull align 4 dereferenceable(36) %11)
          to label %182 unwind label %185

182:                                              ; preds = %181
  %183 = invoke noundef i32 @_ZNK3rmg8Object2D15getObject2DTypeEv(ptr noundef nonnull align 8 dereferenceable(108) %71)
          to label %184 unwind label %185

184:                                              ; preds = %182
  switch i32 %183, label %189 [
    i32 1, label %187
    i32 2, label %188
  ]

185:                                              ; preds = %188, %187, %182, %181
  %186 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %12) #6
  br label %193

187:                                              ; preds = %184
  invoke void @_ZN3rmg8internal12SpriteShader6renderEPNS_8Sprite2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %71, ptr noundef nonnull align 4 dereferenceable(36) %12)
          to label %189 unwind label %185

188:                                              ; preds = %184
  invoke void @_ZN3rmg8internal12Text2DShader6renderEPNS_6Text2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef nonnull %71, ptr noundef nonnull align 4 dereferenceable(36) %12)
          to label %189 unwind label %185

189:                                              ; preds = %188, %187, %184
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %11) #6
  %190 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKsPN3rmg8Object2DEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %191 = call ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %191, ptr %10, align 8
  %192 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKsPN3rmg8Object2DEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %192, label %68, label %._crit_edge, !llvm.loop !26

193:                                              ; preds = %185, %75
  %.pn = phi { ptr, i32 } [ %186, %185 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %194

194:                                              ; preds = %193, %67
  %.pn19.pn = phi { ptr, i32 } [ %.pn19, %67 ], [ %.pn, %193 ]
  call void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn19.pn
}

declare void @glDisable(i32 noundef) local_unnamed_addr #2

declare void @glEnable(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 noundef signext i8 @_ZNK3rmg8Object2D9getZOrderEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #2

declare noundef i32 @_ZNK3rmg8Object2D15getObject2DTypeEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE6insertIRS5_IsS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueESt17_Rb_tree_iteratorIS7_EE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 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 @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

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

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

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

declare noundef i32 @_ZNK3rmg8Object2D12getAlignmentEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multimapIsPN3rmg8Object2DESt4lessIsESaISt4pairIKsS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTSSt4pairIKsPN3rmg8Object2DEE", !12, i64 0, !10, i64 8}
!17 = !{!18, !12, i64 108}
!18 = !{!"_ZTSN3rmg8internal14Object2DShaderE", !19, i64 0, !21, i64 32, !22, i64 72, !12, i64 108, !12, i64 110}
!19 = !{!"_ZTSN3rmg8internal12SpriteShaderE", !20, i64 0, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28}
!20 = !{!"_ZTSN3rmg8internal6ShaderE", !6, i64 8}
!21 = !{!"_ZTSN3rmg8internal12Text2DShaderE", !20, i64 0, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36}
!22 = !{!"_ZTSN3rmg4Mat3E", !7, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = !{!18, !12, i64 110}
!26 = distinct !{!26, !14}


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