; 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]] }
%"struct.rmg::ColorRGBA" = type { float, float, float, float }
%"struct.rmg::GlyphMetrics" = type { i16, i16, %"struct.rmg::Vec2i", i16 }
%"struct.rmg::Vec2i" = type { i16, i16 }
%"class.rmg::internal::Shader" = type <{ ptr, i32, [4 x i8] }>
%"class.rmg::internal::Text2DShader" = type { %"class.rmg::internal::Shader.base", i32, i32, i32, i32, i32, i32, i32 }
%"class.rmg::internal::Shader.base" = type <{ ptr, i32 }>

@_ZN3rmg8internal17glBindVertexArrayE = external global ptr, align 8
@_ZN3rmg8internalL10prevShaderE = external hidden global i32, align 4
@_ZN3rmg8internal12glUseProgramE = external global ptr, align 8
@_ZN3rmg8internal11glUniform1iE = external global ptr, align 8
@_ZN3rmg8internal18glUniformMatrix3fvE = external global ptr, align 8
@_ZN3rmg8internal12glUniform4fvE = external global ptr, align 8
@_ZN3rmg8internal11glUniform2fE = external global ptr, align 8

; 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

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

declare noundef nonnull align 4 dereferenceable(36) ptr @_ZNK3rmg8Object2D14getModelMatrixEv(ptr noundef nonnull align 8 dereferenceable(108)) #2

declare { <2 x float>, <2 x float> } @_ZNK3rmg6Object8getColorEv(ptr noundef nonnull align 8 dereferenceable(48)) #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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg8internal12Text2DShader6renderEPNS_6Text2DERKNS_4Mat3E(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(36) %2) #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.rmg::ColorRGBA", align 4
  %10 = alloca %"struct.rmg::Mat3", align 4
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca i16, align 2
  %14 = alloca i16, align 2
  %15 = alloca %"struct.rmg::GlyphMetrics", align 2
  %16 = alloca { i64, i16 }, align 8
  %17 = alloca %"struct.rmg::GlyphMetrics", align 2
  %18 = alloca { i64, i16 }, align 8
  %19 = alloca %"struct.rmg::Mat3", align 4
  %20 = alloca %"struct.rmg::Mat3", align 4
  %21 = alloca i8, align 1
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8
  %25 = getelementptr inbounds %"class.rmg::internal::Shader", ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 8, !tbaa !9
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %3
  br label %241

29:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call noundef ptr @_ZNK3rmg6Text2D7getFontEv(ptr noundef nonnull align 8 dereferenceable(140) %30)
  store ptr %31, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = icmp eq ptr %32, null
  br i1 %33, label %38, label %34

34:                                               ; preds = %29
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call noundef ptr @_ZNK3rmg4Font10getTextureEv(ptr noundef nonnull align 8 dereferenceable(2618) %35)
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %34, %29
  store i32 1, ptr %8, align 4
  br label %239

39:                                               ; preds = %34
  %40 = load i32, ptr @_ZN3rmg8internalL10prevShaderE, align 4, !tbaa !12
  %41 = getelementptr inbounds %"class.rmg::internal::Shader", ptr %24, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !9
  %43 = icmp ne i32 %40, %42
  br i1 %43, label %44, label %54

44:                                               ; preds = %39
  %45 = load ptr, ptr @_ZN3rmg8internal12glUseProgramE, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.rmg::internal::Shader", ptr %24, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !9
  call void %45(i32 noundef %47)
  %48 = load ptr, ptr @_ZN3rmg8internal17glBindVertexArrayE, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.rmg::internal::Text2DShader", ptr %24, i32 0, i32 6
  %50 = load i32, ptr %49, align 8, !tbaa !13
  call void %48(i32 noundef %50)
  %51 = load ptr, ptr @_ZN3rmg8internal11glUniform1iE, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.rmg::internal::Text2DShader", ptr %24, i32 0, i32 3
  %53 = load i32, ptr %52, align 4, !tbaa !15
  call void %51(i32 noundef %53, i32 noundef 0)
  br label %54

54:                                               ; preds = %44, %39
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = call { <2 x float>, <2 x float> } @_ZNK3rmg6Object8getColorEv(ptr noundef nonnull align 8 dereferenceable(48) %55)
  %57 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %58 = extractvalue { <2 x float>, <2 x float> } %56, 0
  store <2 x float> %58, ptr %57, align 4
  %59 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %60 = extractvalue { <2 x float>, <2 x float> } %56, 1
  store <2 x float> %60, ptr %59, align 4
  call void @llvm.lifetime.start.p0(i64 36, ptr %10) #6
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(36) ptr @_ZNK3rmg8Object2D14getModelMatrixEv(ptr noundef nonnull align 8 dereferenceable(108) %62)
  call void @_ZNK3rmg4Mat3mlERKS0_(ptr dead_on_unwind writable sret(%"struct.rmg::Mat3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(36) %61, ptr noundef nonnull align 4 dereferenceable(36) %63)
  %64 = load ptr, ptr @_ZN3rmg8internal12glUniform4fvE, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.rmg::internal::Text2DShader", ptr %24, i32 0, i32 2
  %66 = load i32, ptr %65, align 8, !tbaa !16
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg9ColorRGBAixEh(ptr noundef nonnull align 4 dereferenceable(16) %9, i8 noundef zeroext 0)
  call void %64(i32 noundef %66, i32 noundef 1, ptr noundef %67)
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = call noundef ptr @_ZNK3rmg4Font10getTextureEv(ptr noundef nonnull align 8 dereferenceable(2618) %68)
  call void @_ZNK3rmg8internal13SpriteTexture4bindEv(ptr noundef nonnull align 8 dereferenceable(12) %69)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #6
  store i16 0, ptr %13, align 2, !tbaa !17
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = call noundef i32 @_ZNK3rmg6Text2D16getTextAlignmentEv(ptr noundef nonnull align 8 dereferenceable(140) %70)
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %112

73:                                               ; preds = %54
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = call noundef ptr @_ZNK3rmg6Text2D7getTextEv(ptr noundef nonnull align 8 dereferenceable(140) %74)
  store ptr %75, ptr %11, align 8, !tbaa !5
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = load i8, ptr %76, align 1, !tbaa !19
  store i8 %77, ptr %12, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #6
  store i16 0, ptr %14, align 2, !tbaa !17
  br label %78

78:                                               ; preds = %82, %73
  %79 = load i8, ptr %12, align 1, !tbaa !19
  %80 = sext i8 %79 to i32
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %96

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 10, ptr %15) #6
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load i8, ptr %12, align 1, !tbaa !19
  %85 = call { i64, i16 } @_ZNK3rmg4Font15getGlyphMetricsEc(ptr noundef nonnull align 8 dereferenceable(2618) %83, i8 noundef signext %84)
  store { i64, i16 } %85, ptr %16, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %15, ptr align 8 %16, i64 10, i1 false)
  %86 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %15, i32 0, i32 3
  %87 = load i16, ptr %86, align 2, !tbaa !20
  %88 = zext i16 %87 to i32
  %89 = load i16, ptr %14, align 2, !tbaa !17
  %90 = zext i16 %89 to i32
  %91 = add nsw i32 %90, %88
  %92 = trunc i32 %91 to i16
  store i16 %92, ptr %14, align 2, !tbaa !17
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i32 1
  store ptr %94, ptr %11, align 8, !tbaa !5
  %95 = load i8, ptr %94, align 1, !tbaa !19
  store i8 %95, ptr %12, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 10, ptr %15) #6
  br label %78, !llvm.loop !23

96:                                               ; preds = %78
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = call noundef i32 @_ZNK3rmg6Text2D16getTextAlignmentEv(ptr noundef nonnull align 8 dereferenceable(140) %97)
  %99 = icmp eq i32 %98, 2
  br i1 %99, label %100, label %105

100:                                              ; preds = %96
  %101 = load i16, ptr %14, align 2, !tbaa !17
  %102 = zext i16 %101 to i32
  %103 = sub nsw i32 0, %102
  %104 = trunc i32 %103 to i16
  store i16 %104, ptr %13, align 2, !tbaa !17
  br label %111

105:                                              ; preds = %96
  %106 = load i16, ptr %14, align 2, !tbaa !17
  %107 = zext i16 %106 to i32
  %108 = sub nsw i32 0, %107
  %109 = sdiv i32 %108, 2
  %110 = trunc i32 %109 to i16
  store i16 %110, ptr %13, align 2, !tbaa !17
  br label %111

111:                                              ; preds = %105, %100
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #6
  br label %112

112:                                              ; preds = %111, %54
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = call noundef ptr @_ZNK3rmg6Text2D7getTextEv(ptr noundef nonnull align 8 dereferenceable(140) %113)
  store ptr %114, ptr %11, align 8, !tbaa !5
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = load i8, ptr %115, align 1, !tbaa !19
  store i8 %116, ptr %12, align 1, !tbaa !19
  br label %117

117:                                              ; preds = %237, %235, %112
  %118 = load i8, ptr %12, align 1, !tbaa !19
  %119 = sext i8 %118 to i32
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %238

121:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 10, ptr %17) #6
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = load i8, ptr %12, align 1, !tbaa !19
  %124 = call { i64, i16 } @_ZNK3rmg4Font15getGlyphMetricsEc(ptr noundef nonnull align 8 dereferenceable(2618) %122, i8 noundef signext %123)
  store { i64, i16 } %124, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %17, ptr align 8 %18, i64 10, i1 false)
  %125 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 0
  %126 = load i16, ptr %125, align 2, !tbaa !25
  %127 = zext i16 %126 to i32
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %134, label %129

129:                                              ; preds = %121
  %130 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 1
  %131 = load i16, ptr %130, align 2, !tbaa !26
  %132 = zext i16 %131 to i32
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %145

134:                                              ; preds = %129, %121
  %135 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 3
  %136 = load i16, ptr %135, align 2, !tbaa !20
  %137 = zext i16 %136 to i32
  %138 = load i16, ptr %13, align 2, !tbaa !17
  %139 = sext i16 %138 to i32
  %140 = add nsw i32 %139, %137
  %141 = trunc i32 %140 to i16
  store i16 %141, ptr %13, align 2, !tbaa !17
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = getelementptr inbounds i8, ptr %142, i32 1
  store ptr %143, ptr %11, align 8, !tbaa !5
  %144 = load i8, ptr %143, align 1, !tbaa !19
  store i8 %144, ptr %12, align 1, !tbaa !19
  store i32 4, ptr %8, align 4
  br label %235, !llvm.loop !27

145:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 36, ptr %19) #6
  call void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36) %19)
  %146 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 0
  %147 = load i16, ptr %146, align 2, !tbaa !25
  %148 = uitofp i16 %147 to float
  %149 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 0)
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %149, i8 noundef zeroext 0)
  store float %148, ptr %150, align 4, !tbaa !28
  %151 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 1
  %152 = load i16, ptr %151, align 2, !tbaa !26
  %153 = uitofp i16 %152 to float
  %154 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 1)
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %154, i8 noundef zeroext 1)
  store float %153, ptr %155, align 4, !tbaa !28
  %156 = load i16, ptr %13, align 2, !tbaa !17
  %157 = sext i16 %156 to i32
  %158 = sitofp i32 %157 to float
  %159 = fdiv float %158, 6.400000e+01
  %160 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 2
  %161 = getelementptr inbounds %"struct.rmg::Vec2i", ptr %160, i32 0, i32 0
  %162 = load i16, ptr %161, align 2, !tbaa !30
  %163 = sext i16 %162 to i32
  %164 = sitofp i32 %163 to float
  %165 = fadd float %159, %164
  %166 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 0)
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %166, i8 noundef zeroext 2)
  store float %165, ptr %167, align 4, !tbaa !28
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = call noundef zeroext i16 @_ZNK3rmg4Font7getSizeEv(ptr noundef nonnull align 8 dereferenceable(2618) %168)
  %170 = zext i16 %169 to i32
  %171 = sitofp i32 %170 to float
  %172 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 2
  %173 = getelementptr inbounds %"struct.rmg::Vec2i", ptr %172, i32 0, i32 1
  %174 = load i16, ptr %173, align 2, !tbaa !31
  %175 = sext i16 %174 to i32
  %176 = sitofp i32 %175 to float
  %177 = fneg float %176
  %178 = call float @llvm.fmuladd.f32(float %171, float 2.500000e-01, float %177)
  %179 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %19, i8 noundef zeroext 1)
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %179, i8 noundef zeroext 2)
  store float %178, ptr %180, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 36, ptr %20) #6
  call void @_ZNK3rmg4Mat3mlERKS0_(ptr dead_on_unwind writable sret(%"struct.rmg::Mat3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(36) %10, ptr noundef nonnull align 4 dereferenceable(36) %19)
  %181 = load ptr, ptr @_ZN3rmg8internal18glUniformMatrix3fvE, align 8, !tbaa !5
  %182 = getelementptr inbounds %"class.rmg::internal::Text2DShader", ptr %24, i32 0, i32 1
  %183 = load i32, ptr %182, align 4, !tbaa !32
  %184 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %20, i8 noundef zeroext 0)
  %185 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %184, i8 noundef zeroext 0)
  call void %181(i32 noundef %183, i32 noundef 1, i8 noundef zeroext 1, ptr noundef %185)
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  %186 = load i8, ptr %12, align 1, !tbaa !19
  store i8 %186, ptr %21, align 1, !tbaa !19
  %187 = load ptr, ptr @_ZN3rmg8internal11glUniform2fE, align 8, !tbaa !5
  %188 = getelementptr inbounds %"class.rmg::internal::Text2DShader", ptr %24, i32 0, i32 4
  %189 = load i32, ptr %188, align 8, !tbaa !33
  %190 = load i8, ptr %21, align 1, !tbaa !19
  %191 = zext i8 %190 to i32
  %192 = srem i32 %191, 16
  %193 = sitofp i32 %192 to float
  %194 = fmul float 6.250000e-02, %193
  %195 = load i8, ptr %21, align 1, !tbaa !19
  %196 = zext i8 %195 to i32
  %197 = sdiv i32 %196, 16
  %198 = sitofp i32 %197 to float
  %199 = fmul float 6.250000e-02, %198
  call void %187(i32 noundef %189, float noundef %194, float noundef %199)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %200 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 0
  %201 = load i16, ptr %200, align 2, !tbaa !25
  %202 = zext i16 %201 to i32
  %203 = sitofp i32 %202 to float
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = call noundef zeroext i16 @_ZNK3rmg4Font7getSizeEv(ptr noundef nonnull align 8 dereferenceable(2618) %204)
  %206 = zext i16 %205 to i32
  %207 = sitofp i32 %206 to float
  %208 = fmul float 1.600000e+01, %207
  %209 = fdiv float %203, %208
  store float %209, ptr %22, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %210 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 1
  %211 = load i16, ptr %210, align 2, !tbaa !26
  %212 = zext i16 %211 to i32
  %213 = sitofp i32 %212 to float
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  %215 = call noundef zeroext i16 @_ZNK3rmg4Font7getSizeEv(ptr noundef nonnull align 8 dereferenceable(2618) %214)
  %216 = zext i16 %215 to i32
  %217 = sitofp i32 %216 to float
  %218 = fmul float 1.600000e+01, %217
  %219 = fdiv float %213, %218
  store float %219, ptr %23, align 4, !tbaa !28
  %220 = load ptr, ptr @_ZN3rmg8internal11glUniform2fE, align 8, !tbaa !5
  %221 = getelementptr inbounds %"class.rmg::internal::Text2DShader", ptr %24, i32 0, i32 5
  %222 = load i32, ptr %221, align 4, !tbaa !34
  %223 = load float, ptr %22, align 4, !tbaa !28
  %224 = load float, ptr %23, align 4, !tbaa !28
  call void %220(i32 noundef %222, float noundef %223, float noundef %224)
  call void @glDrawArrays(i32 noundef 4, i32 noundef 0, i32 noundef 6)
  %225 = getelementptr inbounds %"struct.rmg::GlyphMetrics", ptr %17, i32 0, i32 3
  %226 = load i16, ptr %225, align 2, !tbaa !20
  %227 = zext i16 %226 to i32
  %228 = load i16, ptr %13, align 2, !tbaa !17
  %229 = sext i16 %228 to i32
  %230 = add nsw i32 %229, %227
  %231 = trunc i32 %230 to i16
  store i16 %231, ptr %13, align 2, !tbaa !17
  %232 = load ptr, ptr %11, align 8, !tbaa !5
  %233 = getelementptr inbounds i8, ptr %232, i32 1
  store ptr %233, ptr %11, align 8, !tbaa !5
  %234 = load i8, ptr %233, align 1, !tbaa !19
  store i8 %234, ptr %12, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr %19) #6
  store i32 0, ptr %8, align 4
  br label %235

235:                                              ; preds = %145, %134
  call void @llvm.lifetime.end.p0(i64 10, ptr %17) #6
  %236 = load i32, ptr %8, align 4
  switch i32 %236, label %242 [
    i32 0, label %237
    i32 4, label %117
  ]

237:                                              ; preds = %235
  br label %117, !llvm.loop !27

238:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  store i32 0, ptr %8, align 4
  br label %239

239:                                              ; preds = %238, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %240 = load i32, ptr %8, align 4
  switch i32 %240, label %242 [
    i32 0, label %241
    i32 1, label %241
  ]

241:                                              ; preds = %239, %239, %28
  ret void

242:                                              ; preds = %239, %235
  unreachable
}

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

declare noundef ptr @_ZNK3rmg4Font10getTextureEv(ptr noundef nonnull align 8 dereferenceable(2618)) #2

declare noundef i32 @_ZNK3rmg6Text2D16getTextAlignmentEv(ptr noundef nonnull align 8 dereferenceable(140)) #2

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

declare { i64, i16 } @_ZNK3rmg4Font15getGlyphMetricsEc(ptr noundef nonnull align 8 dereferenceable(2618), i8 noundef signext) #2

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

declare noundef zeroext i16 @_ZNK3rmg4Font7getSizeEv(ptr noundef nonnull align 8 dereferenceable(2618)) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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"="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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 8}
!10 = !{!"_ZTSN3rmg8internal6ShaderE", !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 32}
!14 = !{!"_ZTSN3rmg8internal12Text2DShaderE", !10, i64 0, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36}
!15 = !{!14, !11, i64 20}
!16 = !{!14, !11, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !18, i64 8}
!21 = !{!"_ZTSN3rmg12GlyphMetricsE", !18, i64 0, !18, i64 2, !22, i64 4, !18, i64 8}
!22 = !{!"_ZTSN3rmg5Vec2iE", !18, i64 0, !18, i64 2}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!21, !18, i64 0}
!26 = !{!21, !18, i64 2}
!27 = distinct !{!27, !24}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = !{!21, !18, i64 4}
!31 = !{!21, !18, i64 6}
!32 = !{!14, !11, i64 12}
!33 = !{!14, !11, i64 24}
!34 = !{!14, !11, i64 28}


; 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]] }
%"struct.rmg::ColorRGBA" = type { float, float, float, float }

@_ZN3rmg8internal17glBindVertexArrayE = external local_unnamed_addr global ptr, align 8
@_ZN3rmg8internalL10prevShaderE = external hidden local_unnamed_addr global i32, align 4
@_ZN3rmg8internal12glUseProgramE = external local_unnamed_addr global ptr, align 8
@_ZN3rmg8internal11glUniform1iE = 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
@_ZN3rmg8internal11glUniform2fE = external local_unnamed_addr global ptr, align 8

; 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

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

declare noundef nonnull align 4 dereferenceable(36) ptr @_ZNK3rmg8Object2D14getModelMatrixEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #1

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

; 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 #2 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 #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3rmg8internal12Text2DShader6renderEPNS_6Text2DERKNS_4Mat3E(ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(36) %2) local_unnamed_addr #3 align 2 {
  %4 = alloca %"struct.rmg::ColorRGBA", align 8
  %5 = alloca %"struct.rmg::Mat3", align 4
  %6 = alloca %"struct.rmg::Mat3", align 4
  %7 = alloca %"struct.rmg::Mat3", align 4
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %115, label %11

11:                                               ; preds = %3
  %12 = tail call noundef ptr @_ZNK3rmg6Text2D7getFontEv(ptr noundef nonnull align 8 dereferenceable(140) %1)
  %13 = icmp eq ptr %12, null
  br i1 %13, label %115, label %14

14:                                               ; preds = %11
  %15 = tail call noundef ptr @_ZNK3rmg4Font10getTextureEv(ptr noundef nonnull align 8 dereferenceable(2618) %12)
  %16 = icmp eq ptr %15, null
  br i1 %16, label %115, label %17

17:                                               ; preds = %14
  %18 = load i32, ptr @_ZN3rmg8internalL10prevShaderE, align 4, !tbaa !10
  %19 = load i32, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i32 %18, %19
  br i1 %.not, label %28, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr @_ZN3rmg8internal12glUseProgramE, align 8, !tbaa !11
  tail call void %21(i32 noundef %19)
  %22 = load ptr, ptr @_ZN3rmg8internal17glBindVertexArrayE, align 8, !tbaa !11
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %24 = load i32, ptr %23, align 8, !tbaa !13
  tail call void %22(i32 noundef %24)
  %25 = load ptr, ptr @_ZN3rmg8internal11glUniform1iE, align 8, !tbaa !11
  %26 = getelementptr inbounds i8, ptr %0, i64 20
  %27 = load i32, ptr %26, align 4, !tbaa !15
  tail call void %25(i32 noundef %27, i32 noundef 0)
  br label %28

28:                                               ; preds = %20, %17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %29 = tail call { <2 x float>, <2 x float> } @_ZNK3rmg6Object8getColorEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %30 = extractvalue { <2 x float>, <2 x float> } %29, 0
  store <2 x float> %30, ptr %4, align 8
  %31 = getelementptr inbounds i8, ptr %4, i64 8
  %32 = extractvalue { <2 x float>, <2 x float> } %29, 1
  store <2 x float> %32, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %5) #5
  %33 = tail call noundef nonnull align 4 dereferenceable(36) ptr @_ZNK3rmg8Object2D14getModelMatrixEv(ptr noundef nonnull align 8 dereferenceable(108) %1)
  call void @_ZNK3rmg4Mat3mlERKS0_(ptr dead_on_unwind nonnull writable sret(%"struct.rmg::Mat3") align 4 %5, ptr noundef nonnull align 4 dereferenceable(36) %2, ptr noundef nonnull align 4 dereferenceable(36) %33)
  %34 = load ptr, ptr @_ZN3rmg8internal12glUniform4fvE, align 8, !tbaa !11
  %35 = getelementptr inbounds i8, ptr %0, i64 16
  %36 = load i32, ptr %35, align 8, !tbaa !16
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg9ColorRGBAixEh(ptr noundef nonnull align 4 dereferenceable(16) %4, i8 noundef zeroext 0)
  call void %34(i32 noundef %36, i32 noundef 1, ptr noundef nonnull %37)
  %38 = call noundef ptr @_ZNK3rmg4Font10getTextureEv(ptr noundef nonnull align 8 dereferenceable(2618) %12)
  call void @_ZNK3rmg8internal13SpriteTexture4bindEv(ptr noundef nonnull align 8 dereferenceable(12) %38)
  %39 = call noundef i32 @_ZNK3rmg6Text2D16getTextAlignmentEv(ptr noundef nonnull align 8 dereferenceable(140) %1)
  %.not67 = icmp eq i32 %39, 0
  br i1 %.not67, label %48, label %40

40:                                               ; preds = %28
  %41 = call noundef ptr @_ZNK3rmg6Text2D7getTextEv(ptr noundef nonnull align 8 dereferenceable(140) %1)
  %.05672 = load i8, ptr %41, align 1, !tbaa !17
  %.not6873 = icmp eq i8 %.05672, 0
  br i1 %.not6873, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %40, %.lr.ph
  %.05676 = phi i8 [ %.056, %.lr.ph ], [ %.05672, %40 ]
  %.075 = phi ptr [ %44, %.lr.ph ], [ %41, %40 ]
  %.06274 = phi i16 [ %43, %.lr.ph ], [ 0, %40 ]
  %42 = call { i64, i16 } @_ZNK3rmg4Font15getGlyphMetricsEc(ptr noundef nonnull align 8 dereferenceable(2618) %12, i8 noundef signext %.05676)
  %.fca.1.extract19 = extractvalue { i64, i16 } %42, 1
  %43 = add i16 %.fca.1.extract19, %.06274
  %44 = getelementptr inbounds i8, ptr %.075, i64 1
  %.056 = load i8, ptr %44, align 1, !tbaa !17
  %.not68 = icmp eq i8 %.056, 0
  br i1 %.not68, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %40
  %.062.lcssa = phi i16 [ 0, %40 ], [ %43, %.lr.ph ]
  %45 = call noundef i32 @_ZNK3rmg6Text2D16getTextAlignmentEv(ptr noundef nonnull align 8 dereferenceable(140) %1)
  %46 = icmp ne i32 %45, 2
  %47 = zext i1 %46 to i16
  %.062.pn = lshr i16 %.062.lcssa, %47
  %.059 = sub i16 0, %.062.pn
  br label %48

48:                                               ; preds = %._crit_edge, %28
  %.160 = phi i16 [ %.059, %._crit_edge ], [ 0, %28 ]
  %49 = call noundef ptr @_ZNK3rmg6Text2D7getTextEv(ptr noundef nonnull align 8 dereferenceable(140) %1)
  %50 = load i8, ptr %49, align 1, !tbaa !17
  %.not6977 = icmp eq i8 %50, 0
  br i1 %.not6977, label %._crit_edge83, label %.lr.ph82

.lr.ph82:                                         ; preds = %48
  %51 = getelementptr inbounds i8, ptr %0, i64 12
  %52 = getelementptr inbounds i8, ptr %0, i64 24
  %53 = getelementptr inbounds i8, ptr %0, i64 28
  br label %54

54:                                               ; preds = %.lr.ph82, %114
  %.180 = phi ptr [ %49, %.lr.ph82 ], [ %.2, %114 ]
  %.15779 = phi i8 [ %50, %.lr.ph82 ], [ %.258, %114 ]
  %.26178 = phi i16 [ %.160, %.lr.ph82 ], [ %.3, %114 ]
  %55 = call { i64, i16 } @_ZNK3rmg4Font15getGlyphMetricsEc(ptr noundef nonnull align 8 dereferenceable(2618) %12, i8 noundef signext %.15779)
  %.fca.0.extract = extractvalue { i64, i16 } %55, 0
  %.fca.1.extract = extractvalue { i64, i16 } %55, 1
  %56 = trunc i64 %.fca.0.extract to i32
  %57 = and i32 %56, 65535
  %58 = icmp eq i32 %57, 0
  %.sroa.06.2.extract.shift15 = lshr i64 %.fca.0.extract, 16
  %59 = trunc i64 %.sroa.06.2.extract.shift15 to i32
  %60 = and i32 %59, 65535
  %61 = icmp eq i32 %60, 0
  %or.cond = or i1 %58, %61
  br i1 %or.cond, label %62, label %65

62:                                               ; preds = %54
  %63 = getelementptr inbounds i8, ptr %.180, i64 1
  %64 = load i8, ptr %63, align 1, !tbaa !17
  br label %114, !llvm.loop !20

65:                                               ; preds = %54
  %.sroa.06.2.extract.trunc16 = trunc i64 %.sroa.06.2.extract.shift15 to i16
  %.sroa.06.0.extract.trunc = trunc i64 %.fca.0.extract to i16
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %6) #5
  call void @_ZN3rmg4Mat3C1Ev(ptr noundef nonnull align 4 dereferenceable(36) %6)
  %66 = uitofp i16 %.sroa.06.0.extract.trunc to float
  %67 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %6, i8 noundef zeroext 0)
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %67, i8 noundef zeroext 0)
  store float %66, ptr %68, align 4, !tbaa !21
  %69 = uitofp i16 %.sroa.06.2.extract.trunc16 to float
  %70 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %6, i8 noundef zeroext 1)
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %70, i8 noundef zeroext 1)
  store float %69, ptr %71, align 4, !tbaa !21
  %72 = sitofp i16 %.26178 to float
  %73 = fmul float %72, 1.562500e-02
  %74 = ashr i32 %59, 16
  %75 = sitofp i32 %74 to float
  %76 = fadd float %73, %75
  %77 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %6, i8 noundef zeroext 0)
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %77, i8 noundef zeroext 2)
  store float %76, ptr %78, align 4, !tbaa !21
  %79 = call noundef zeroext i16 @_ZNK3rmg4Font7getSizeEv(ptr noundef nonnull align 8 dereferenceable(2618) %12)
  %80 = uitofp i16 %79 to float
  %sh.diff70 = lshr i64 %.fca.0.extract, 32
  %tr.sh.diff71 = trunc nuw i64 %sh.diff70 to i32
  %81 = ashr i32 %tr.sh.diff71, 16
  %82 = sitofp i32 %81 to float
  %83 = fneg float %82
  %84 = call float @llvm.fmuladd.f32(float %80, float 2.500000e-01, float %83)
  %85 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %6, i8 noundef zeroext 1)
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %85, i8 noundef zeroext 2)
  store float %84, ptr %86, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %7) #5
  call void @_ZNK3rmg4Mat3mlERKS0_(ptr dead_on_unwind nonnull writable sret(%"struct.rmg::Mat3") align 4 %7, ptr noundef nonnull align 4 dereferenceable(36) %5, ptr noundef nonnull align 4 dereferenceable(36) %6)
  %87 = load ptr, ptr @_ZN3rmg8internal18glUniformMatrix3fvE, align 8, !tbaa !11
  %88 = load i32, ptr %51, align 4, !tbaa !23
  %89 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3rmg4Mat3ixEh(ptr noundef nonnull align 4 dereferenceable(36) %7, i8 noundef zeroext 0)
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3rmg7Mat3RowixEh(ptr noundef nonnull align 4 dereferenceable(12) %89, i8 noundef zeroext 0)
  call void %87(i32 noundef %88, i32 noundef 1, i8 noundef zeroext 1, ptr noundef nonnull %90)
  %91 = load ptr, ptr @_ZN3rmg8internal11glUniform2fE, align 8, !tbaa !11
  %92 = load i32, ptr %52, align 8, !tbaa !24
  %93 = zext i8 %.15779 to i32
  %94 = and i32 %93, 15
  %95 = uitofp nneg i32 %94 to float
  %96 = fmul float %95, 6.250000e-02
  %97 = lshr i32 %93, 4
  %98 = uitofp nneg i32 %97 to float
  %99 = fmul float %98, 6.250000e-02
  call void %91(i32 noundef %92, float noundef %96, float noundef %99)
  %100 = uitofp nneg i32 %57 to float
  %101 = call noundef zeroext i16 @_ZNK3rmg4Font7getSizeEv(ptr noundef nonnull align 8 dereferenceable(2618) %12)
  %102 = uitofp i16 %101 to float
  %103 = fmul float %102, 1.600000e+01
  %104 = fdiv float %100, %103
  %105 = uitofp nneg i32 %60 to float
  %106 = call noundef zeroext i16 @_ZNK3rmg4Font7getSizeEv(ptr noundef nonnull align 8 dereferenceable(2618) %12)
  %107 = uitofp i16 %106 to float
  %108 = fmul float %107, 1.600000e+01
  %109 = fdiv float %105, %108
  %110 = load ptr, ptr @_ZN3rmg8internal11glUniform2fE, align 8, !tbaa !11
  %111 = load i32, ptr %53, align 4, !tbaa !25
  call void %110(i32 noundef %111, float noundef %104, float noundef %109)
  call void @glDrawArrays(i32 noundef 4, i32 noundef 0, i32 noundef 6)
  %112 = getelementptr inbounds i8, ptr %.180, i64 1
  %113 = load i8, ptr %112, align 1, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6) #5
  br label %114

114:                                              ; preds = %65, %62
  %.258 = phi i8 [ %64, %62 ], [ %113, %65 ]
  %.2 = phi ptr [ %63, %62 ], [ %112, %65 ]
  %.3 = add i16 %.fca.1.extract, %.26178
  %.not69 = icmp eq i8 %.258, 0
  br i1 %.not69, label %._crit_edge83, label %54

._crit_edge83:                                    ; preds = %114, %48
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %115

115:                                              ; preds = %._crit_edge83, %14, %11, %3
  ret void
}

declare noundef ptr @_ZNK3rmg6Text2D7getFontEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #1

declare noundef ptr @_ZNK3rmg4Font10getTextureEv(ptr noundef nonnull align 8 dereferenceable(2618)) local_unnamed_addr #1

declare noundef i32 @_ZNK3rmg6Text2D16getTextAlignmentEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #1

declare noundef ptr @_ZNK3rmg6Text2D7getTextEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #1

declare { i64, i16 } @_ZNK3rmg4Font15getGlyphMetricsEc(ptr noundef nonnull align 8 dereferenceable(2618), i8 noundef signext) local_unnamed_addr #1

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

declare noundef zeroext i16 @_ZNK3rmg4Font7getSizeEv(ptr noundef nonnull align 8 dereferenceable(2618)) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

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


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