; LLVM IR from erwincoumans/tiny-differentiable-simulator :: src/visualizer/opengl (tiny_gl_instancing_renderer)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.TinyGLInstancingRenderer = type <{ ptr, %"class.std::vector", ptr, i8, i8, [2 x i8], i32, i32, i32, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<b3GraphicsInstance *, std::allocator<b3GraphicsInstance *>>::_Vector_impl" }
%"struct.std::_Vector_base<b3GraphicsInstance *, std::allocator<b3GraphicsInstance *>>::_Vector_impl" = type { %"struct.std::_Vector_base<b3GraphicsInstance *, std::allocator<b3GraphicsInstance *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<b3GraphicsInstance *, std::allocator<b3GraphicsInstance *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.GLInstanceRendererInternalData = type <{ %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", i32, i32, i32, i32, i32, [4 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@lineWidthRange = external dso_local global [2 x i32], align 4
@lineVertexBufferObject = external dso_local global i32, align 4
@lineVertexArrayObject = external dso_local global i32, align 4
@lineIndexVbo = external dso_local global i32, align 4
@linesVertexBufferObject = external dso_local global i32, align 4
@linesVertexArrayObject = external dso_local global i32, align 4
@linesIndexVbo = external dso_local global i32, align 4
@glad_glBindBuffer = external global ptr, align 8
@glad_glGenBuffers = external global ptr, align 8
@glad_glBufferData = external global ptr, align 8
@glad_glGenVertexArrays = external global ptr, align 8
@glad_glBindVertexArray = external global ptr, align 8
@_ZL24triangleVertexShaderText = external hidden global ptr, align 8
@_ZL22triangleFragmentShader = external hidden global ptr, align 8
@_ZL21triangleShaderProgram = external hidden global i32, align 4
@glad_glGetUniformLocation = external global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL21triangle_mvp_location = external hidden global i32, align 4
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL22triangle_vcol_location = external hidden global i32, align 4
@glad_glLinkProgram = external global ptr, align 8
@glad_glUseProgram = external global ptr, align 8
@_ZL25triangleVertexArrayObject = external hidden global i32, align 4
@_ZL26triangleVertexBufferObject = external hidden global i32, align 4
@_ZL16triangleIndexVbo = external hidden global i32, align 4
@_ZL17linesVertexShader = external hidden global ptr, align 8
@_ZL19linesFragmentShader = external hidden global ptr, align 8
@_ZL11linesShader = external hidden global i32, align 4
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZL21lines_ModelViewMatrix = external hidden global i32, align 4
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZL22lines_ProjectionMatrix = external hidden global i32, align 4
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZL12lines_colour = external hidden global i32, align 4
@glad_glGetAttribLocation = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZL14lines_position = external hidden global i32, align 4
@glad_glGetIntegerv = external global ptr, align 8
@_ZL39projectiveTextureInstancingVertexShader = external hidden global ptr, align 8
@_ZL41projectiveTextureInstancingFragmentShader = external hidden global ptr, align 8
@_ZL33projectiveTextureInstancingShader = external hidden global i32, align 4
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@_ZL35projectiveTexture_ViewMatrixInverse = external hidden global i32, align 4
@_ZL33projectiveTexture_ModelViewMatrix = external hidden global i32, align 4
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@_ZL40projectiveTexture_lightSpecularIntensity = external hidden global i32, align 4
@.str.16 = external hidden unnamed_addr constant [24 x i8], align 1
@_ZL39projectiveTexture_materialSpecularColor = external hidden global i32, align 4
@_ZL21projectiveTexture_MVP = external hidden global i32, align 4
@_ZL34projectiveTexture_ProjectionMatrix = external hidden global i32, align 4
@.str.17 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZL28projectiveTexture_TextureMVP = external hidden global i32, align 4
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZL41projectiveTexture_uniform_texture_diffuse = external hidden global i32, align 4
@.str.19 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZL27projectiveTexture_shadowMap = external hidden global i32, align 4
@.str.20 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZL28projectiveTexture_lightPosIn = external hidden global i32, align 4
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZL34projectiveTexture_cameraPositionIn = external hidden global i32, align 4
@.str.22 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZL37projectiveTexture_materialShininessIn = external hidden global i32, align 4
@_ZL34useShadowMapInstancingVertexShader = external hidden global ptr, align 8
@_ZL36useShadowMapInstancingFragmentShader = external hidden global ptr, align 8
@_ZL28useShadowMapInstancingShader = external hidden global i32, align 4
@_ZL27useShadow_ViewMatrixInverse = external hidden global i32, align 4
@_ZL25useShadow_ModelViewMatrix = external hidden global i32, align 4
@_ZL32useShadow_lightSpecularIntensity = external hidden global i32, align 4
@_ZL31useShadow_materialSpecularColor = external hidden global i32, align 4
@_ZL13useShadow_MVP = external hidden global i32, align 4
@_ZL26useShadow_ProjectionMatrix = external hidden global i32, align 4
@.str.23 = external hidden unnamed_addr constant [35 x i8], align 1
@_ZL34useShadow_DepthBiasModelViewMatrix = external hidden global i32, align 4
@_ZL33useShadow_uniform_texture_diffuse = external hidden global i32, align 4
@_ZL19useShadow_shadowMap = external hidden global i32, align 4
@_ZL20useShadow_lightPosIn = external hidden global i32, align 4
@_ZL26useShadow_cameraPositionIn = external hidden global i32, align 4
@_ZL29useShadow_materialShininessIn = external hidden global i32, align 4
@_ZL37createShadowMapInstancingVertexShader = external hidden global ptr, align 8
@_ZL39createShadowMapInstancingFragmentShader = external hidden global ptr, align 8
@_ZL31createShadowMapInstancingShader = external hidden global i32, align 4
@.str.24 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZL21createShadow_depthMVP = external hidden global i32, align 4
@_ZL38segmentationMaskInstancingVertexShader = external hidden global ptr, align 8
@_ZL40segmentationMaskInstancingFragmentShader = external hidden global ptr, align 8
@_ZL32segmentationMaskInstancingShader = external hidden global i32, align 4
@_ZL31segmentationMaskModelViewMatrix = external hidden global i32, align 4
@_ZL32segmentationMaskProjectionMatrix = external hidden global i32, align 4
@_ZL22instancingVertexShader = external hidden global ptr, align 8
@_ZL24instancingFragmentShader = external hidden global ptr, align 8
@_ZL16instancingShader = external hidden global i32, align 4
@_ZL15ModelViewMatrix = external hidden global i32, align 4
@_ZL16ProjectionMatrix = external hidden global i32, align 4
@_ZL23uniform_texture_diffuse = external hidden global i32, align 4
@.str.25 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZL17regularLightDirIn = external hidden global i32, align 4
@_ZL23pointSpriteVertexShader = external hidden global ptr, align 8
@_ZL25pointSpriteFragmentShader = external hidden global ptr, align 8
@_ZL27instancingShaderPointSprite = external hidden global i32, align 4
@_ZL26ModelViewMatrixPointSprite = external hidden global i32, align 4
@_ZL27ProjectionMatrixPointSprite = external hidden global i32, align 4
@.str.26 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZL22screenWidthPointSprite = external hidden global i32, align 4
@.str.27 = external hidden unnamed_addr constant [13 x i8], align 1

; 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
define dso_local void @_ZN24TinyGLInstancingRenderer12init_shadersEv(ptr noundef nonnull align 8 dereferenceable(60) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %12 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %11, i32 0, i32 2
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %13, i32 0, i32 7
  %15 = load i32, ptr %14, align 4, !tbaa !17
  %16 = sext i32 %15 to i64
  %17 = mul i64 %16, 4
  %18 = mul i64 %17, 4
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %3, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %20 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %11, i32 0, i32 2
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %21, i32 0, i32 7
  %23 = load i32, ptr %22, align 4, !tbaa !17
  %24 = sext i32 %23 to i64
  %25 = mul i64 %24, 4
  %26 = mul i64 %25, 4
  %27 = trunc i64 %26 to i32
  store i32 %27, ptr %4, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %28 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %11, i32 0, i32 2
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %29, i32 0, i32 7
  %31 = load i32, ptr %30, align 4, !tbaa !17
  %32 = sext i32 %31 to i64
  %33 = mul i64 %32, 4
  %34 = mul i64 %33, 4
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %5, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %36 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %11, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %37, i32 0, i32 7
  %39 = load i32, ptr %38, align 4, !tbaa !17
  %40 = sext i32 %39 to i64
  %41 = mul i64 %40, 4
  %42 = mul i64 %41, 4
  %43 = trunc i64 %42 to i32
  store i32 %43, ptr %6, align 4, !tbaa !23
  %44 = load ptr, ptr @_ZL24triangleVertexShaderText, align 8, !tbaa !5
  %45 = load ptr, ptr @_ZL22triangleFragmentShader, align 8, !tbaa !5
  %46 = call i32 @gltLoadShaderPair(ptr noundef %44, ptr noundef %45)
  store i32 %46, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  %47 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %48 = load i32, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  %49 = call i32 %47(i32 noundef %48, ptr noundef @.str.8)
  store i32 %49, ptr @_ZL21triangle_mvp_location, align 4, !tbaa !23
  %50 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %51 = load i32, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  %52 = call i32 %50(i32 noundef %51, ptr noundef @.str.9)
  store i32 %52, ptr @_ZL22triangle_vcol_location, align 4, !tbaa !23
  %53 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %54 = load i32, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  call void %53(i32 noundef %54)
  %55 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %56 = load i32, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  call void %55(i32 noundef %56)
  %57 = load ptr, ptr @glad_glGenVertexArrays, align 8, !tbaa !5
  call void %57(i32 noundef 1, ptr noundef @_ZL25triangleVertexArrayObject)
  %58 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  %59 = load i32, ptr @_ZL25triangleVertexArrayObject, align 4, !tbaa !23
  call void %58(i32 noundef %59)
  %60 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  call void %60(i32 noundef 1, ptr noundef @_ZL26triangleVertexBufferObject)
  %61 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  call void %61(i32 noundef 1, ptr noundef @_ZL16triangleIndexVbo)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 327680, ptr %7, align 4, !tbaa !23
  %62 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  %63 = load i32, ptr @_ZL25triangleVertexArrayObject, align 4, !tbaa !23
  call void %62(i32 noundef %63)
  %64 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  %65 = load i32, ptr @_ZL26triangleVertexBufferObject, align 4, !tbaa !23
  call void %64(i32 noundef 34962, i32 noundef %65)
  %66 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !5
  %67 = load i32, ptr %7, align 4, !tbaa !23
  %68 = sext i32 %67 to i64
  call void %66(i32 noundef 34962, i64 noundef %68, ptr noundef null, i32 noundef 35048)
  %69 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  call void %69(i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  %70 = load ptr, ptr @_ZL17linesVertexShader, align 8, !tbaa !5
  %71 = load ptr, ptr @_ZL19linesFragmentShader, align 8, !tbaa !5
  %72 = call i32 @gltLoadShaderPair(ptr noundef %70, ptr noundef %71)
  store i32 %72, ptr @_ZL11linesShader, align 4, !tbaa !23
  %73 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %74 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  %75 = call i32 %73(i32 noundef %74, ptr noundef @.str.10)
  store i32 %75, ptr @_ZL21lines_ModelViewMatrix, align 4, !tbaa !23
  %76 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %77 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  %78 = call i32 %76(i32 noundef %77, ptr noundef @.str.11)
  store i32 %78, ptr @_ZL22lines_ProjectionMatrix, align 4, !tbaa !23
  %79 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %80 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  %81 = call i32 %79(i32 noundef %80, ptr noundef @.str.12)
  store i32 %81, ptr @_ZL12lines_colour, align 4, !tbaa !23
  %82 = load ptr, ptr @glad_glGetAttribLocation, align 8, !tbaa !5
  %83 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  %84 = call i32 %82(i32 noundef %83, ptr noundef @.str.13)
  store i32 %84, ptr @_ZL14lines_position, align 4, !tbaa !23
  %85 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %86 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  call void %85(i32 noundef %86)
  %87 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %88 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  call void %87(i32 noundef %88)
  %89 = load ptr, ptr @glad_glGenVertexArrays, align 8, !tbaa !5
  call void %89(i32 noundef 1, ptr noundef @linesVertexArrayObject)
  %90 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  %91 = load i32, ptr @linesVertexArrayObject, align 4, !tbaa !23
  call void %90(i32 noundef %91)
  %92 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  call void %92(i32 noundef 1, ptr noundef @linesVertexBufferObject)
  %93 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  call void %93(i32 noundef 1, ptr noundef @linesIndexVbo)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 16384, ptr %8, align 4, !tbaa !23
  %94 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  %95 = load i32, ptr @linesVertexArrayObject, align 4, !tbaa !23
  call void %94(i32 noundef %95)
  %96 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  %97 = load i32, ptr @linesVertexBufferObject, align 4, !tbaa !23
  call void %96(i32 noundef 34962, i32 noundef %97)
  %98 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !5
  %99 = load i32, ptr %8, align 4, !tbaa !23
  %100 = sext i32 %99 to i64
  call void %98(i32 noundef 34962, i64 noundef %100, ptr noundef null, i32 noundef 35048)
  %101 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  call void %101(i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %102 = load ptr, ptr @glad_glGenVertexArrays, align 8, !tbaa !5
  call void %102(i32 noundef 1, ptr noundef @lineVertexArrayObject)
  %103 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  %104 = load i32, ptr @lineVertexArrayObject, align 4, !tbaa !23
  call void %103(i32 noundef %104)
  %105 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  call void %105(i32 noundef 1, ptr noundef @lineVertexBufferObject)
  %106 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  call void %106(i32 noundef 1, ptr noundef @lineIndexVbo)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 16384, ptr %9, align 4, !tbaa !23
  %107 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  %108 = load i32, ptr @lineVertexArrayObject, align 4, !tbaa !23
  call void %107(i32 noundef %108)
  %109 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  %110 = load i32, ptr @lineVertexBufferObject, align 4, !tbaa !23
  call void %109(i32 noundef 34962, i32 noundef %110)
  %111 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !5
  %112 = load i32, ptr %9, align 4, !tbaa !23
  %113 = sext i32 %112 to i64
  call void %111(i32 noundef 34962, i64 noundef %113, ptr noundef null, i32 noundef 35048)
  %114 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  call void %114(i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  %115 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !5
  call void %115(i32 noundef 2850, ptr noundef @lineWidthRange)
  %116 = load ptr, ptr @_ZL39projectiveTextureInstancingVertexShader, align 8, !tbaa !5
  %117 = load ptr, ptr @_ZL41projectiveTextureInstancingFragmentShader, align 8, !tbaa !5
  %118 = call i32 @gltLoadShaderPair(ptr noundef %116, ptr noundef %117)
  store i32 %118, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %119 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %120 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  call void %119(i32 noundef %120)
  %121 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %122 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  call void %121(i32 noundef %122)
  %123 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %124 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %125 = call i32 %123(i32 noundef %124, ptr noundef @.str.14)
  store i32 %125, ptr @_ZL35projectiveTexture_ViewMatrixInverse, align 4, !tbaa !23
  %126 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %127 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %128 = call i32 %126(i32 noundef %127, ptr noundef @.str.10)
  store i32 %128, ptr @_ZL33projectiveTexture_ModelViewMatrix, align 4, !tbaa !23
  %129 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %130 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %131 = call i32 %129(i32 noundef %130, ptr noundef @.str.15)
  store i32 %131, ptr @_ZL40projectiveTexture_lightSpecularIntensity, align 4, !tbaa !23
  %132 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %133 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %134 = call i32 %132(i32 noundef %133, ptr noundef @.str.16)
  store i32 %134, ptr @_ZL39projectiveTexture_materialSpecularColor, align 4, !tbaa !23
  %135 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %136 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %137 = call i32 %135(i32 noundef %136, ptr noundef @.str.8)
  store i32 %137, ptr @_ZL21projectiveTexture_MVP, align 4, !tbaa !23
  %138 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %139 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %140 = call i32 %138(i32 noundef %139, ptr noundef @.str.11)
  store i32 %140, ptr @_ZL34projectiveTexture_ProjectionMatrix, align 4, !tbaa !23
  %141 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %142 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %143 = call i32 %141(i32 noundef %142, ptr noundef @.str.17)
  store i32 %143, ptr @_ZL28projectiveTexture_TextureMVP, align 4, !tbaa !23
  %144 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %145 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %146 = call i32 %144(i32 noundef %145, ptr noundef @.str.18)
  store i32 %146, ptr @_ZL41projectiveTexture_uniform_texture_diffuse, align 4, !tbaa !23
  %147 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %148 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %149 = call i32 %147(i32 noundef %148, ptr noundef @.str.19)
  store i32 %149, ptr @_ZL27projectiveTexture_shadowMap, align 4, !tbaa !23
  %150 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %151 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %152 = call i32 %150(i32 noundef %151, ptr noundef @.str.20)
  store i32 %152, ptr @_ZL28projectiveTexture_lightPosIn, align 4, !tbaa !23
  %153 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %154 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %155 = call i32 %153(i32 noundef %154, ptr noundef @.str.21)
  store i32 %155, ptr @_ZL34projectiveTexture_cameraPositionIn, align 4, !tbaa !23
  %156 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %157 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %158 = call i32 %156(i32 noundef %157, ptr noundef @.str.22)
  store i32 %158, ptr @_ZL37projectiveTexture_materialShininessIn, align 4, !tbaa !23
  %159 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  call void %159(i32 noundef 0)
  %160 = load ptr, ptr @_ZL34useShadowMapInstancingVertexShader, align 8, !tbaa !5
  %161 = load ptr, ptr @_ZL36useShadowMapInstancingFragmentShader, align 8, !tbaa !5
  %162 = call i32 @gltLoadShaderPair(ptr noundef %160, ptr noundef %161)
  store i32 %162, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %163 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %164 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  call void %163(i32 noundef %164)
  %165 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %166 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  call void %165(i32 noundef %166)
  %167 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %168 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %169 = call i32 %167(i32 noundef %168, ptr noundef @.str.14)
  store i32 %169, ptr @_ZL27useShadow_ViewMatrixInverse, align 4, !tbaa !23
  %170 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %171 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %172 = call i32 %170(i32 noundef %171, ptr noundef @.str.10)
  store i32 %172, ptr @_ZL25useShadow_ModelViewMatrix, align 4, !tbaa !23
  %173 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %174 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %175 = call i32 %173(i32 noundef %174, ptr noundef @.str.15)
  store i32 %175, ptr @_ZL32useShadow_lightSpecularIntensity, align 4, !tbaa !23
  %176 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %177 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %178 = call i32 %176(i32 noundef %177, ptr noundef @.str.16)
  store i32 %178, ptr @_ZL31useShadow_materialSpecularColor, align 4, !tbaa !23
  %179 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %180 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %181 = call i32 %179(i32 noundef %180, ptr noundef @.str.8)
  store i32 %181, ptr @_ZL13useShadow_MVP, align 4, !tbaa !23
  %182 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %183 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %184 = call i32 %182(i32 noundef %183, ptr noundef @.str.11)
  store i32 %184, ptr @_ZL26useShadow_ProjectionMatrix, align 4, !tbaa !23
  %185 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %186 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %187 = call i32 %185(i32 noundef %186, ptr noundef @.str.23)
  store i32 %187, ptr @_ZL34useShadow_DepthBiasModelViewMatrix, align 4, !tbaa !23
  %188 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %189 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %190 = call i32 %188(i32 noundef %189, ptr noundef @.str.18)
  store i32 %190, ptr @_ZL33useShadow_uniform_texture_diffuse, align 4, !tbaa !23
  %191 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %192 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %193 = call i32 %191(i32 noundef %192, ptr noundef @.str.19)
  store i32 %193, ptr @_ZL19useShadow_shadowMap, align 4, !tbaa !23
  %194 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %195 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %196 = call i32 %194(i32 noundef %195, ptr noundef @.str.20)
  store i32 %196, ptr @_ZL20useShadow_lightPosIn, align 4, !tbaa !23
  %197 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %198 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %199 = call i32 %197(i32 noundef %198, ptr noundef @.str.21)
  store i32 %199, ptr @_ZL26useShadow_cameraPositionIn, align 4, !tbaa !23
  %200 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %201 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %202 = call i32 %200(i32 noundef %201, ptr noundef @.str.22)
  store i32 %202, ptr @_ZL29useShadow_materialShininessIn, align 4, !tbaa !23
  %203 = load ptr, ptr @_ZL37createShadowMapInstancingVertexShader, align 8, !tbaa !5
  %204 = load ptr, ptr @_ZL39createShadowMapInstancingFragmentShader, align 8, !tbaa !5
  %205 = call i32 @gltLoadShaderPair(ptr noundef %203, ptr noundef %204)
  store i32 %205, ptr @_ZL31createShadowMapInstancingShader, align 4, !tbaa !23
  %206 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %207 = load i32, ptr @_ZL31createShadowMapInstancingShader, align 4, !tbaa !23
  call void %206(i32 noundef %207)
  %208 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %209 = load i32, ptr @_ZL31createShadowMapInstancingShader, align 4, !tbaa !23
  call void %208(i32 noundef %209)
  %210 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %211 = load i32, ptr @_ZL31createShadowMapInstancingShader, align 4, !tbaa !23
  %212 = call i32 %210(i32 noundef %211, ptr noundef @.str.24)
  store i32 %212, ptr @_ZL21createShadow_depthMVP, align 4, !tbaa !23
  %213 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  call void %213(i32 noundef 0)
  %214 = load ptr, ptr @_ZL38segmentationMaskInstancingVertexShader, align 8, !tbaa !5
  %215 = load ptr, ptr @_ZL40segmentationMaskInstancingFragmentShader, align 8, !tbaa !5
  %216 = call i32 @gltLoadShaderPair(ptr noundef %214, ptr noundef %215)
  store i32 %216, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  %217 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %218 = load i32, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  call void %217(i32 noundef %218)
  %219 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %220 = load i32, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  call void %219(i32 noundef %220)
  %221 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %222 = load i32, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  %223 = call i32 %221(i32 noundef %222, ptr noundef @.str.10)
  store i32 %223, ptr @_ZL31segmentationMaskModelViewMatrix, align 4, !tbaa !23
  %224 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %225 = load i32, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  %226 = call i32 %224(i32 noundef %225, ptr noundef @.str.11)
  store i32 %226, ptr @_ZL32segmentationMaskProjectionMatrix, align 4, !tbaa !23
  %227 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  call void %227(i32 noundef 0)
  %228 = load ptr, ptr @_ZL22instancingVertexShader, align 8, !tbaa !5
  %229 = load ptr, ptr @_ZL24instancingFragmentShader, align 8, !tbaa !5
  %230 = call i32 @gltLoadShaderPair(ptr noundef %228, ptr noundef %229)
  store i32 %230, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %231 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !5
  %232 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  call void %231(i32 noundef %232)
  %233 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %234 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  call void %233(i32 noundef %234)
  %235 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %236 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %237 = call i32 %235(i32 noundef %236, ptr noundef @.str.10)
  store i32 %237, ptr @_ZL15ModelViewMatrix, align 4, !tbaa !23
  %238 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %239 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %240 = call i32 %238(i32 noundef %239, ptr noundef @.str.11)
  store i32 %240, ptr @_ZL16ProjectionMatrix, align 4, !tbaa !23
  %241 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %242 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %243 = call i32 %241(i32 noundef %242, ptr noundef @.str.18)
  store i32 %243, ptr @_ZL23uniform_texture_diffuse, align 4, !tbaa !23
  %244 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %245 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %246 = call i32 %244(i32 noundef %245, ptr noundef @.str.25)
  store i32 %246, ptr @_ZL17regularLightDirIn, align 4, !tbaa !23
  %247 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  call void %247(i32 noundef 0)
  %248 = load ptr, ptr @_ZL23pointSpriteVertexShader, align 8, !tbaa !5
  %249 = load ptr, ptr @_ZL25pointSpriteFragmentShader, align 8, !tbaa !5
  %250 = call i32 @gltLoadShaderPair(ptr noundef %248, ptr noundef %249)
  store i32 %250, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  %251 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %252 = load i32, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  call void %251(i32 noundef %252)
  %253 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %254 = load i32, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  %255 = call i32 %253(i32 noundef %254, ptr noundef @.str.10)
  store i32 %255, ptr @_ZL26ModelViewMatrixPointSprite, align 4, !tbaa !23
  %256 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %257 = load i32, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  %258 = call i32 %256(i32 noundef %257, ptr noundef @.str.11)
  store i32 %258, ptr @_ZL27ProjectionMatrixPointSprite, align 4, !tbaa !23
  %259 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %260 = load i32, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  %261 = call i32 %259(i32 noundef %260, ptr noundef @.str.26)
  store i32 %261, ptr @_ZL22screenWidthPointSprite, align 4, !tbaa !23
  %262 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  call void %262(i32 noundef 0)
  %263 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !5
  %264 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %11, i32 0, i32 2
  %265 = load ptr, ptr %264, align 8, !tbaa !9
  %266 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %265, i32 0, i32 5
  call void %263(i32 noundef 1, ptr noundef %266)
  call void @_ZL10checkErrorPKc(ptr noundef @.str.27)
  %267 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  %268 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %11, i32 0, i32 2
  %269 = load ptr, ptr %268, align 8, !tbaa !9
  %270 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %269, i32 0, i32 5
  %271 = load i32, ptr %270, align 4, !tbaa !24
  call void %267(i32 noundef 34962, i32 noundef %271)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %272 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %11, i32 0, i32 2
  %273 = load ptr, ptr %272, align 8, !tbaa !9
  %274 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %273, i32 0, i32 8
  %275 = load i32, ptr %274, align 8, !tbaa !25
  %276 = load i32, ptr %3, align 4, !tbaa !23
  %277 = add nsw i32 %275, %276
  %278 = load i32, ptr %4, align 4, !tbaa !23
  %279 = add nsw i32 %277, %278
  %280 = load i32, ptr %5, align 4, !tbaa !23
  %281 = add nsw i32 %279, %280
  %282 = load i32, ptr %6, align 4, !tbaa !23
  %283 = add nsw i32 %281, %282
  store i32 %283, ptr %10, align 4, !tbaa !23
  %284 = load i32, ptr %10, align 4, !tbaa !23
  %285 = getelementptr inbounds %class.TinyGLInstancingRenderer, ptr %11, i32 0, i32 2
  %286 = load ptr, ptr %285, align 8, !tbaa !9
  %287 = getelementptr inbounds %struct.GLInstanceRendererInternalData, ptr %286, i32 0, i32 4
  store i32 %284, ptr %287, align 8, !tbaa !26
  %288 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !5
  %289 = load i32, ptr %10, align 4, !tbaa !23
  %290 = sext i32 %289 to i64
  call void %288(i32 noundef 34962, i64 noundef %290, ptr noundef null, i32 noundef 35048)
  %291 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  call void %291(i32 noundef 34962, i32 noundef 0)
  %292 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !5
  call void %292(i32 noundef 0)
  %293 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  call void %293(i32 noundef 34963, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

declare i32 @gltLoadShaderPair(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10checkErrorPKc(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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, !6, i64 32}
!10 = !{!"_ZTS24TinyGLInstancingRenderer", !11, i64 8, !6, i64 32, !15, i64 40, !15, i64 41, !16, i64 44, !16, i64 48, !16, i64 52, !16, i64 56}
!11 = !{!"_ZTSSt6vectorIP18b3GraphicsInstanceSaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !16, i64 108}
!18 = !{!"_ZTS30GLInstanceRendererInternalData", !19, i64 0, !19, i64 24, !19, i64 48, !19, i64 72, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108, !16, i64 112}
!19 = !{!"_ZTSSt6vectorIfSaIfEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!16, !16, i64 0}
!24 = !{!18, !16, i64 100}
!25 = !{!18, !16, i64 112}
!26 = !{!18, !16, i64 96}


; 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"

@lineWidthRange = external dso_local global [2 x i32], align 4
@lineVertexBufferObject = external dso_local global i32, align 4
@lineVertexArrayObject = external dso_local global i32, align 4
@lineIndexVbo = external dso_local global i32, align 4
@linesVertexBufferObject = external dso_local global i32, align 4
@linesVertexArrayObject = external dso_local global i32, align 4
@linesIndexVbo = external dso_local global i32, align 4
@glad_glBindBuffer = external local_unnamed_addr global ptr, align 8
@glad_glGenBuffers = external local_unnamed_addr global ptr, align 8
@glad_glBufferData = external local_unnamed_addr global ptr, align 8
@glad_glGenVertexArrays = external local_unnamed_addr global ptr, align 8
@glad_glBindVertexArray = external local_unnamed_addr global ptr, align 8
@_ZL24triangleVertexShaderText = external hidden local_unnamed_addr global ptr, align 8
@_ZL22triangleFragmentShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL21triangleShaderProgram = external hidden local_unnamed_addr global i32, align 4
@glad_glGetUniformLocation = external local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL21triangle_mvp_location = external hidden local_unnamed_addr global i32, align 4
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL22triangle_vcol_location = external hidden local_unnamed_addr global i32, align 4
@glad_glLinkProgram = external local_unnamed_addr global ptr, align 8
@glad_glUseProgram = external local_unnamed_addr global ptr, align 8
@_ZL25triangleVertexArrayObject = external hidden global i32, align 4
@_ZL26triangleVertexBufferObject = external hidden global i32, align 4
@_ZL16triangleIndexVbo = external hidden global i32, align 4
@_ZL17linesVertexShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL19linesFragmentShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL11linesShader = external hidden local_unnamed_addr global i32, align 4
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZL21lines_ModelViewMatrix = external hidden local_unnamed_addr global i32, align 4
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZL22lines_ProjectionMatrix = external hidden local_unnamed_addr global i32, align 4
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZL12lines_colour = external hidden local_unnamed_addr global i32, align 4
@glad_glGetAttribLocation = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZL14lines_position = external hidden local_unnamed_addr global i32, align 4
@glad_glGetIntegerv = external local_unnamed_addr global ptr, align 8
@_ZL39projectiveTextureInstancingVertexShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL41projectiveTextureInstancingFragmentShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL33projectiveTextureInstancingShader = external hidden local_unnamed_addr global i32, align 4
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@_ZL35projectiveTexture_ViewMatrixInverse = external hidden local_unnamed_addr global i32, align 4
@_ZL33projectiveTexture_ModelViewMatrix = external hidden local_unnamed_addr global i32, align 4
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@_ZL40projectiveTexture_lightSpecularIntensity = external hidden local_unnamed_addr global i32, align 4
@.str.16 = external hidden unnamed_addr constant [24 x i8], align 1
@_ZL39projectiveTexture_materialSpecularColor = external hidden local_unnamed_addr global i32, align 4
@_ZL21projectiveTexture_MVP = external hidden local_unnamed_addr global i32, align 4
@_ZL34projectiveTexture_ProjectionMatrix = external hidden local_unnamed_addr global i32, align 4
@.str.17 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZL28projectiveTexture_TextureMVP = external hidden local_unnamed_addr global i32, align 4
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZL41projectiveTexture_uniform_texture_diffuse = external hidden local_unnamed_addr global i32, align 4
@.str.19 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZL27projectiveTexture_shadowMap = external hidden local_unnamed_addr global i32, align 4
@.str.20 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZL28projectiveTexture_lightPosIn = external hidden local_unnamed_addr global i32, align 4
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZL34projectiveTexture_cameraPositionIn = external hidden local_unnamed_addr global i32, align 4
@.str.22 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZL37projectiveTexture_materialShininessIn = external hidden local_unnamed_addr global i32, align 4
@_ZL34useShadowMapInstancingVertexShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL36useShadowMapInstancingFragmentShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL28useShadowMapInstancingShader = external hidden local_unnamed_addr global i32, align 4
@_ZL27useShadow_ViewMatrixInverse = external hidden local_unnamed_addr global i32, align 4
@_ZL25useShadow_ModelViewMatrix = external hidden local_unnamed_addr global i32, align 4
@_ZL32useShadow_lightSpecularIntensity = external hidden local_unnamed_addr global i32, align 4
@_ZL31useShadow_materialSpecularColor = external hidden local_unnamed_addr global i32, align 4
@_ZL13useShadow_MVP = external hidden local_unnamed_addr global i32, align 4
@_ZL26useShadow_ProjectionMatrix = external hidden local_unnamed_addr global i32, align 4
@.str.23 = external hidden unnamed_addr constant [35 x i8], align 1
@_ZL34useShadow_DepthBiasModelViewMatrix = external hidden local_unnamed_addr global i32, align 4
@_ZL33useShadow_uniform_texture_diffuse = external hidden local_unnamed_addr global i32, align 4
@_ZL19useShadow_shadowMap = external hidden local_unnamed_addr global i32, align 4
@_ZL20useShadow_lightPosIn = external hidden local_unnamed_addr global i32, align 4
@_ZL26useShadow_cameraPositionIn = external hidden local_unnamed_addr global i32, align 4
@_ZL29useShadow_materialShininessIn = external hidden local_unnamed_addr global i32, align 4
@_ZL37createShadowMapInstancingVertexShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL39createShadowMapInstancingFragmentShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL31createShadowMapInstancingShader = external hidden local_unnamed_addr global i32, align 4
@.str.24 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZL21createShadow_depthMVP = external hidden local_unnamed_addr global i32, align 4
@_ZL38segmentationMaskInstancingVertexShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL40segmentationMaskInstancingFragmentShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL32segmentationMaskInstancingShader = external hidden local_unnamed_addr global i32, align 4
@_ZL31segmentationMaskModelViewMatrix = external hidden local_unnamed_addr global i32, align 4
@_ZL32segmentationMaskProjectionMatrix = external hidden local_unnamed_addr global i32, align 4
@_ZL22instancingVertexShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL24instancingFragmentShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL16instancingShader = external hidden local_unnamed_addr global i32, align 4
@_ZL15ModelViewMatrix = external hidden local_unnamed_addr global i32, align 4
@_ZL16ProjectionMatrix = external hidden local_unnamed_addr global i32, align 4
@_ZL23uniform_texture_diffuse = external hidden local_unnamed_addr global i32, align 4
@.str.25 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZL17regularLightDirIn = external hidden local_unnamed_addr global i32, align 4
@_ZL23pointSpriteVertexShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL25pointSpriteFragmentShader = external hidden local_unnamed_addr global ptr, align 8
@_ZL27instancingShaderPointSprite = external hidden local_unnamed_addr global i32, align 4
@_ZL26ModelViewMatrixPointSprite = external hidden local_unnamed_addr global i32, align 4
@_ZL27ProjectionMatrixPointSprite = external hidden local_unnamed_addr global i32, align 4
@.str.26 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZL22screenWidthPointSprite = external hidden local_unnamed_addr global i32, align 4
@.str.27 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24TinyGLInstancingRenderer12init_shadersEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(60) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 32
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 108
  %5 = load i32, ptr %4, align 4, !tbaa !16
  %6 = shl i32 %5, 6
  %7 = load ptr, ptr @_ZL24triangleVertexShaderText, align 8, !tbaa !22
  %8 = load ptr, ptr @_ZL22triangleFragmentShader, align 8, !tbaa !22
  %9 = tail call i32 @gltLoadShaderPair(ptr noundef %7, ptr noundef %8)
  store i32 %9, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  %10 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %11 = tail call i32 %10(i32 noundef %9, ptr noundef nonnull @.str.8)
  store i32 %11, ptr @_ZL21triangle_mvp_location, align 4, !tbaa !23
  %12 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %13 = load i32, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  %14 = tail call i32 %12(i32 noundef %13, ptr noundef nonnull @.str.9)
  store i32 %14, ptr @_ZL22triangle_vcol_location, align 4, !tbaa !23
  %15 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !22
  %16 = load i32, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  tail call void %15(i32 noundef %16)
  %17 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  %18 = load i32, ptr @_ZL21triangleShaderProgram, align 4, !tbaa !23
  tail call void %17(i32 noundef %18)
  %19 = load ptr, ptr @glad_glGenVertexArrays, align 8, !tbaa !22
  tail call void %19(i32 noundef 1, ptr noundef nonnull @_ZL25triangleVertexArrayObject)
  %20 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  %21 = load i32, ptr @_ZL25triangleVertexArrayObject, align 4, !tbaa !23
  tail call void %20(i32 noundef %21)
  %22 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !22
  tail call void %22(i32 noundef 1, ptr noundef nonnull @_ZL26triangleVertexBufferObject)
  %23 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !22
  tail call void %23(i32 noundef 1, ptr noundef nonnull @_ZL16triangleIndexVbo)
  %24 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  %25 = load i32, ptr @_ZL25triangleVertexArrayObject, align 4, !tbaa !23
  tail call void %24(i32 noundef %25)
  %26 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !22
  %27 = load i32, ptr @_ZL26triangleVertexBufferObject, align 4, !tbaa !23
  tail call void %26(i32 noundef 34962, i32 noundef %27)
  %28 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !22
  tail call void %28(i32 noundef 34962, i64 noundef 327680, ptr noundef null, i32 noundef 35048)
  %29 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  tail call void %29(i32 noundef 0)
  %30 = load ptr, ptr @_ZL17linesVertexShader, align 8, !tbaa !22
  %31 = load ptr, ptr @_ZL19linesFragmentShader, align 8, !tbaa !22
  %32 = tail call i32 @gltLoadShaderPair(ptr noundef %30, ptr noundef %31)
  store i32 %32, ptr @_ZL11linesShader, align 4, !tbaa !23
  %33 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %34 = tail call i32 %33(i32 noundef %32, ptr noundef nonnull @.str.10)
  store i32 %34, ptr @_ZL21lines_ModelViewMatrix, align 4, !tbaa !23
  %35 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %36 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  %37 = tail call i32 %35(i32 noundef %36, ptr noundef nonnull @.str.11)
  store i32 %37, ptr @_ZL22lines_ProjectionMatrix, align 4, !tbaa !23
  %38 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %39 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  %40 = tail call i32 %38(i32 noundef %39, ptr noundef nonnull @.str.12)
  store i32 %40, ptr @_ZL12lines_colour, align 4, !tbaa !23
  %41 = load ptr, ptr @glad_glGetAttribLocation, align 8, !tbaa !22
  %42 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  %43 = tail call i32 %41(i32 noundef %42, ptr noundef nonnull @.str.13)
  store i32 %43, ptr @_ZL14lines_position, align 4, !tbaa !23
  %44 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !22
  %45 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  tail call void %44(i32 noundef %45)
  %46 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  %47 = load i32, ptr @_ZL11linesShader, align 4, !tbaa !23
  tail call void %46(i32 noundef %47)
  %48 = load ptr, ptr @glad_glGenVertexArrays, align 8, !tbaa !22
  tail call void %48(i32 noundef 1, ptr noundef nonnull @linesVertexArrayObject)
  %49 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  %50 = load i32, ptr @linesVertexArrayObject, align 4, !tbaa !23
  tail call void %49(i32 noundef %50)
  %51 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !22
  tail call void %51(i32 noundef 1, ptr noundef nonnull @linesVertexBufferObject)
  %52 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !22
  tail call void %52(i32 noundef 1, ptr noundef nonnull @linesIndexVbo)
  %53 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  %54 = load i32, ptr @linesVertexArrayObject, align 4, !tbaa !23
  tail call void %53(i32 noundef %54)
  %55 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !22
  %56 = load i32, ptr @linesVertexBufferObject, align 4, !tbaa !23
  tail call void %55(i32 noundef 34962, i32 noundef %56)
  %57 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !22
  tail call void %57(i32 noundef 34962, i64 noundef 16384, ptr noundef null, i32 noundef 35048)
  %58 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  tail call void %58(i32 noundef 0)
  %59 = load ptr, ptr @glad_glGenVertexArrays, align 8, !tbaa !22
  tail call void %59(i32 noundef 1, ptr noundef nonnull @lineVertexArrayObject)
  %60 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  %61 = load i32, ptr @lineVertexArrayObject, align 4, !tbaa !23
  tail call void %60(i32 noundef %61)
  %62 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !22
  tail call void %62(i32 noundef 1, ptr noundef nonnull @lineVertexBufferObject)
  %63 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !22
  tail call void %63(i32 noundef 1, ptr noundef nonnull @lineIndexVbo)
  %64 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  %65 = load i32, ptr @lineVertexArrayObject, align 4, !tbaa !23
  tail call void %64(i32 noundef %65)
  %66 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !22
  %67 = load i32, ptr @lineVertexBufferObject, align 4, !tbaa !23
  tail call void %66(i32 noundef 34962, i32 noundef %67)
  %68 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !22
  tail call void %68(i32 noundef 34962, i64 noundef 16384, ptr noundef null, i32 noundef 35048)
  %69 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  tail call void %69(i32 noundef 0)
  %70 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !22
  tail call void %70(i32 noundef 2850, ptr noundef nonnull @lineWidthRange)
  %71 = load ptr, ptr @_ZL39projectiveTextureInstancingVertexShader, align 8, !tbaa !22
  %72 = load ptr, ptr @_ZL41projectiveTextureInstancingFragmentShader, align 8, !tbaa !22
  %73 = tail call i32 @gltLoadShaderPair(ptr noundef %71, ptr noundef %72)
  store i32 %73, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %74 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !22
  tail call void %74(i32 noundef %73)
  %75 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  %76 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  tail call void %75(i32 noundef %76)
  %77 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %78 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %79 = tail call i32 %77(i32 noundef %78, ptr noundef nonnull @.str.14)
  store i32 %79, ptr @_ZL35projectiveTexture_ViewMatrixInverse, align 4, !tbaa !23
  %80 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %81 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %82 = tail call i32 %80(i32 noundef %81, ptr noundef nonnull @.str.10)
  store i32 %82, ptr @_ZL33projectiveTexture_ModelViewMatrix, align 4, !tbaa !23
  %83 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %84 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %85 = tail call i32 %83(i32 noundef %84, ptr noundef nonnull @.str.15)
  store i32 %85, ptr @_ZL40projectiveTexture_lightSpecularIntensity, align 4, !tbaa !23
  %86 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %87 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %88 = tail call i32 %86(i32 noundef %87, ptr noundef nonnull @.str.16)
  store i32 %88, ptr @_ZL39projectiveTexture_materialSpecularColor, align 4, !tbaa !23
  %89 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %90 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %91 = tail call i32 %89(i32 noundef %90, ptr noundef nonnull @.str.8)
  store i32 %91, ptr @_ZL21projectiveTexture_MVP, align 4, !tbaa !23
  %92 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %93 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %94 = tail call i32 %92(i32 noundef %93, ptr noundef nonnull @.str.11)
  store i32 %94, ptr @_ZL34projectiveTexture_ProjectionMatrix, align 4, !tbaa !23
  %95 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %96 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %97 = tail call i32 %95(i32 noundef %96, ptr noundef nonnull @.str.17)
  store i32 %97, ptr @_ZL28projectiveTexture_TextureMVP, align 4, !tbaa !23
  %98 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %99 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %100 = tail call i32 %98(i32 noundef %99, ptr noundef nonnull @.str.18)
  store i32 %100, ptr @_ZL41projectiveTexture_uniform_texture_diffuse, align 4, !tbaa !23
  %101 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %102 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %103 = tail call i32 %101(i32 noundef %102, ptr noundef nonnull @.str.19)
  store i32 %103, ptr @_ZL27projectiveTexture_shadowMap, align 4, !tbaa !23
  %104 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %105 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %106 = tail call i32 %104(i32 noundef %105, ptr noundef nonnull @.str.20)
  store i32 %106, ptr @_ZL28projectiveTexture_lightPosIn, align 4, !tbaa !23
  %107 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %108 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %109 = tail call i32 %107(i32 noundef %108, ptr noundef nonnull @.str.21)
  store i32 %109, ptr @_ZL34projectiveTexture_cameraPositionIn, align 4, !tbaa !23
  %110 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %111 = load i32, ptr @_ZL33projectiveTextureInstancingShader, align 4, !tbaa !23
  %112 = tail call i32 %110(i32 noundef %111, ptr noundef nonnull @.str.22)
  store i32 %112, ptr @_ZL37projectiveTexture_materialShininessIn, align 4, !tbaa !23
  %113 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  tail call void %113(i32 noundef 0)
  %114 = load ptr, ptr @_ZL34useShadowMapInstancingVertexShader, align 8, !tbaa !22
  %115 = load ptr, ptr @_ZL36useShadowMapInstancingFragmentShader, align 8, !tbaa !22
  %116 = tail call i32 @gltLoadShaderPair(ptr noundef %114, ptr noundef %115)
  store i32 %116, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %117 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !22
  tail call void %117(i32 noundef %116)
  %118 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  %119 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  tail call void %118(i32 noundef %119)
  %120 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %121 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %122 = tail call i32 %120(i32 noundef %121, ptr noundef nonnull @.str.14)
  store i32 %122, ptr @_ZL27useShadow_ViewMatrixInverse, align 4, !tbaa !23
  %123 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %124 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %125 = tail call i32 %123(i32 noundef %124, ptr noundef nonnull @.str.10)
  store i32 %125, ptr @_ZL25useShadow_ModelViewMatrix, align 4, !tbaa !23
  %126 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %127 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %128 = tail call i32 %126(i32 noundef %127, ptr noundef nonnull @.str.15)
  store i32 %128, ptr @_ZL32useShadow_lightSpecularIntensity, align 4, !tbaa !23
  %129 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %130 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %131 = tail call i32 %129(i32 noundef %130, ptr noundef nonnull @.str.16)
  store i32 %131, ptr @_ZL31useShadow_materialSpecularColor, align 4, !tbaa !23
  %132 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %133 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %134 = tail call i32 %132(i32 noundef %133, ptr noundef nonnull @.str.8)
  store i32 %134, ptr @_ZL13useShadow_MVP, align 4, !tbaa !23
  %135 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %136 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %137 = tail call i32 %135(i32 noundef %136, ptr noundef nonnull @.str.11)
  store i32 %137, ptr @_ZL26useShadow_ProjectionMatrix, align 4, !tbaa !23
  %138 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %139 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %140 = tail call i32 %138(i32 noundef %139, ptr noundef nonnull @.str.23)
  store i32 %140, ptr @_ZL34useShadow_DepthBiasModelViewMatrix, align 4, !tbaa !23
  %141 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %142 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %143 = tail call i32 %141(i32 noundef %142, ptr noundef nonnull @.str.18)
  store i32 %143, ptr @_ZL33useShadow_uniform_texture_diffuse, align 4, !tbaa !23
  %144 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %145 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %146 = tail call i32 %144(i32 noundef %145, ptr noundef nonnull @.str.19)
  store i32 %146, ptr @_ZL19useShadow_shadowMap, align 4, !tbaa !23
  %147 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %148 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %149 = tail call i32 %147(i32 noundef %148, ptr noundef nonnull @.str.20)
  store i32 %149, ptr @_ZL20useShadow_lightPosIn, align 4, !tbaa !23
  %150 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %151 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %152 = tail call i32 %150(i32 noundef %151, ptr noundef nonnull @.str.21)
  store i32 %152, ptr @_ZL26useShadow_cameraPositionIn, align 4, !tbaa !23
  %153 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %154 = load i32, ptr @_ZL28useShadowMapInstancingShader, align 4, !tbaa !23
  %155 = tail call i32 %153(i32 noundef %154, ptr noundef nonnull @.str.22)
  store i32 %155, ptr @_ZL29useShadow_materialShininessIn, align 4, !tbaa !23
  %156 = load ptr, ptr @_ZL37createShadowMapInstancingVertexShader, align 8, !tbaa !22
  %157 = load ptr, ptr @_ZL39createShadowMapInstancingFragmentShader, align 8, !tbaa !22
  %158 = tail call i32 @gltLoadShaderPair(ptr noundef %156, ptr noundef %157)
  store i32 %158, ptr @_ZL31createShadowMapInstancingShader, align 4, !tbaa !23
  %159 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !22
  tail call void %159(i32 noundef %158)
  %160 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  %161 = load i32, ptr @_ZL31createShadowMapInstancingShader, align 4, !tbaa !23
  tail call void %160(i32 noundef %161)
  %162 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %163 = load i32, ptr @_ZL31createShadowMapInstancingShader, align 4, !tbaa !23
  %164 = tail call i32 %162(i32 noundef %163, ptr noundef nonnull @.str.24)
  store i32 %164, ptr @_ZL21createShadow_depthMVP, align 4, !tbaa !23
  %165 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  tail call void %165(i32 noundef 0)
  %166 = load ptr, ptr @_ZL38segmentationMaskInstancingVertexShader, align 8, !tbaa !22
  %167 = load ptr, ptr @_ZL40segmentationMaskInstancingFragmentShader, align 8, !tbaa !22
  %168 = tail call i32 @gltLoadShaderPair(ptr noundef %166, ptr noundef %167)
  store i32 %168, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  %169 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !22
  tail call void %169(i32 noundef %168)
  %170 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  %171 = load i32, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  tail call void %170(i32 noundef %171)
  %172 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %173 = load i32, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  %174 = tail call i32 %172(i32 noundef %173, ptr noundef nonnull @.str.10)
  store i32 %174, ptr @_ZL31segmentationMaskModelViewMatrix, align 4, !tbaa !23
  %175 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %176 = load i32, ptr @_ZL32segmentationMaskInstancingShader, align 4, !tbaa !23
  %177 = tail call i32 %175(i32 noundef %176, ptr noundef nonnull @.str.11)
  store i32 %177, ptr @_ZL32segmentationMaskProjectionMatrix, align 4, !tbaa !23
  %178 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  tail call void %178(i32 noundef 0)
  %179 = load ptr, ptr @_ZL22instancingVertexShader, align 8, !tbaa !22
  %180 = load ptr, ptr @_ZL24instancingFragmentShader, align 8, !tbaa !22
  %181 = tail call i32 @gltLoadShaderPair(ptr noundef %179, ptr noundef %180)
  store i32 %181, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %182 = load ptr, ptr @glad_glLinkProgram, align 8, !tbaa !22
  tail call void %182(i32 noundef %181)
  %183 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  %184 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  tail call void %183(i32 noundef %184)
  %185 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %186 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %187 = tail call i32 %185(i32 noundef %186, ptr noundef nonnull @.str.10)
  store i32 %187, ptr @_ZL15ModelViewMatrix, align 4, !tbaa !23
  %188 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %189 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %190 = tail call i32 %188(i32 noundef %189, ptr noundef nonnull @.str.11)
  store i32 %190, ptr @_ZL16ProjectionMatrix, align 4, !tbaa !23
  %191 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %192 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %193 = tail call i32 %191(i32 noundef %192, ptr noundef nonnull @.str.18)
  store i32 %193, ptr @_ZL23uniform_texture_diffuse, align 4, !tbaa !23
  %194 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %195 = load i32, ptr @_ZL16instancingShader, align 4, !tbaa !23
  %196 = tail call i32 %194(i32 noundef %195, ptr noundef nonnull @.str.25)
  store i32 %196, ptr @_ZL17regularLightDirIn, align 4, !tbaa !23
  %197 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  tail call void %197(i32 noundef 0)
  %198 = load ptr, ptr @_ZL23pointSpriteVertexShader, align 8, !tbaa !22
  %199 = load ptr, ptr @_ZL25pointSpriteFragmentShader, align 8, !tbaa !22
  %200 = tail call i32 @gltLoadShaderPair(ptr noundef %198, ptr noundef %199)
  store i32 %200, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  %201 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  tail call void %201(i32 noundef %200)
  %202 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %203 = load i32, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  %204 = tail call i32 %202(i32 noundef %203, ptr noundef nonnull @.str.10)
  store i32 %204, ptr @_ZL26ModelViewMatrixPointSprite, align 4, !tbaa !23
  %205 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %206 = load i32, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  %207 = tail call i32 %205(i32 noundef %206, ptr noundef nonnull @.str.11)
  store i32 %207, ptr @_ZL27ProjectionMatrixPointSprite, align 4, !tbaa !23
  %208 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !22
  %209 = load i32, ptr @_ZL27instancingShaderPointSprite, align 4, !tbaa !23
  %210 = tail call i32 %208(i32 noundef %209, ptr noundef nonnull @.str.26)
  store i32 %210, ptr @_ZL22screenWidthPointSprite, align 4, !tbaa !23
  %211 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !22
  tail call void %211(i32 noundef 0)
  %212 = load ptr, ptr @glad_glGenBuffers, align 8, !tbaa !22
  %213 = load ptr, ptr %2, align 8, !tbaa !5
  %214 = getelementptr inbounds i8, ptr %213, i64 100
  tail call void %212(i32 noundef 1, ptr noundef nonnull %214)
  tail call void @_ZL10checkErrorPKc(ptr noundef nonnull @.str.27)
  %215 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !22
  %216 = load ptr, ptr %2, align 8, !tbaa !5
  %217 = getelementptr inbounds i8, ptr %216, i64 100
  %218 = load i32, ptr %217, align 4, !tbaa !24
  tail call void %215(i32 noundef 34962, i32 noundef %218)
  %219 = load ptr, ptr %2, align 8, !tbaa !5
  %220 = getelementptr inbounds i8, ptr %219, i64 112
  %221 = load i32, ptr %220, align 8, !tbaa !25
  %222 = add i32 %221, %6
  %223 = getelementptr inbounds i8, ptr %219, i64 96
  store i32 %222, ptr %223, align 8, !tbaa !26
  %224 = load ptr, ptr @glad_glBufferData, align 8, !tbaa !22
  %225 = sext i32 %222 to i64
  tail call void %224(i32 noundef 34962, i64 noundef %225, ptr noundef null, i32 noundef 35048)
  %226 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !22
  tail call void %226(i32 noundef 34962, i32 noundef 0)
  %227 = load ptr, ptr @glad_glBindVertexArray, align 8, !tbaa !22
  tail call void %227(i32 noundef 0)
  %228 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !22
  tail call void %228(i32 noundef 34963, i32 noundef 0)
  ret void
}

declare i32 @gltLoadShaderPair(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10checkErrorPKc(ptr noundef) local_unnamed_addr #0

attributes #0 = { 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 #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" }

!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, !11, i64 32}
!6 = !{!"_ZTS24TinyGLInstancingRenderer", !7, i64 8, !11, i64 32, !14, i64 40, !14, i64 41, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56}
!7 = !{!"_ZTSSt6vectorIP18b3GraphicsInstanceSaIS1_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIP18b3GraphicsInstanceSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"bool", !12, i64 0}
!15 = !{!"int", !12, i64 0}
!16 = !{!17, !15, i64 108}
!17 = !{!"_ZTS30GLInstanceRendererInternalData", !18, i64 0, !18, i64 24, !18, i64 48, !18, i64 72, !15, i64 96, !15, i64 100, !15, i64 104, !15, i64 108, !15, i64 112}
!18 = !{!"_ZTSSt6vectorIfSaIfEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!22 = !{!11, !11, i64 0}
!23 = !{!15, !15, i64 0}
!24 = !{!17, !15, i64 100}
!25 = !{!17, !15, i64 112}
!26 = !{!17, !15, i64 96}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass