; LLVM IR from erwincoumans/tiny-differentiable-simulator :: src/visualizer/opengl/tiny_opengl3_app.ll (ZN14TinyOpenGL3AppC2EPKciibiiii)

; 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.TinyWindowConstructionInfo = type { i32, i32, i8, i32, ptr, ptr, i32, i32 }
%struct.TinyOpenGL3App = type { %struct.TinyCommonGraphicsApp.base, ptr, ptr, ptr }
%struct.TinyCommonGraphicsApp.base = type <{ ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, float, float, float, float, i8, [3 x i8], [3 x float] }>
%struct.TinyCommonGraphicsApp = type <{ ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, float, float, float, float, i8, [3 x i8], [3 x float], [4 x i8] }>
%struct.TinyOpenGL3AppInternalData = type { i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32 }

@_ZL4gApp = external hidden global ptr, align 8
@_ZTV14TinyOpenGL3App = external dso_local unnamed_addr constant { [29 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [50 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [59 x i8], align 1
@glad_glGetError = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii = external hidden unnamed_addr constant [81 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@glad_glClearColor = external global ptr, align 8
@g_DefaultNormalFont = external global ptr, align 8
@g_DefaultLargeFont = external global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@OpenSansData = external global [0 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z25SimpleMouseButtonCallbackiiff(i32 noundef, i32 noundef, float noundef, float noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23SimpleMouseMoveCallbackff(float noundef, float noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z19SimpleWheelCallbackff(float noundef, float noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14TinyOpenGL3AppC2EPKciibiiii(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %struct.TinyWindowConstructionInfo, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i32 %2, ptr %12, align 4, !tbaa !9
  store i32 %3, ptr %13, align 4, !tbaa !9
  %24 = zext i1 %4 to i8
  store i8 %24, ptr %14, align 1, !tbaa !11
  store i32 %5, ptr %15, align 4, !tbaa !9
  store i32 %6, ptr %16, align 4, !tbaa !9
  store i32 %7, ptr %17, align 4, !tbaa !9
  store i32 %8, ptr %18, align 4, !tbaa !9
  %25 = load ptr, ptr %10, align 8
  call void @_ZN21TinyCommonGraphicsAppC2Ev(ptr noundef nonnull align 8 dereferenceable(76) %25)
  store ptr getelementptr inbounds inrange(-16, 216) ({ [29 x ptr] }, ptr @_ZTV14TinyOpenGL3App, i32 0, i32 0, i32 2), ptr %25, align 8, !tbaa !13
  store ptr %25, ptr @_ZL4gApp, align 8, !tbaa !5
  %26 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #7
          to label %27 unwind label %37

27:                                               ; preds = %9
  invoke void @_ZN26TinyOpenGL3AppInternalDataC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %26)
          to label %28 unwind label %41

28:                                               ; preds = %27
  %29 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  store ptr %26, ptr %29, align 8, !tbaa !15
  %30 = load i32, ptr %15, align 4, !tbaa !9
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %49

32:                                               ; preds = %28
  %33 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #7
          to label %34 unwind label %37

34:                                               ; preds = %32
  invoke void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18) %33)
          to label %35 unwind label %45

35:                                               ; preds = %34
  %36 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  store ptr %33, ptr %36, align 8, !tbaa !19
  br label %93

37:                                               ; preds = %93, %82, %80, %77, %68, %66, %64, %52, %32, %9
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %19, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %20, align 4
  br label %406

41:                                               ; preds = %27
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %19, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %26, i64 noundef 104) #8
  br label %406

45:                                               ; preds = %34
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %19, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %33, i64 noundef 24) #8
  br label %406

49:                                               ; preds = %28
  %50 = load i32, ptr %15, align 4, !tbaa !9
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %61

52:                                               ; preds = %49
  %53 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #7
          to label %54 unwind label %37

54:                                               ; preds = %52
  invoke void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18) %53)
          to label %55 unwind label %57

55:                                               ; preds = %54
  %56 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  store ptr %53, ptr %56, align 8, !tbaa !19
  br label %92

57:                                               ; preds = %54
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %19, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %53, i64 noundef 24) #8
  br label %406

61:                                               ; preds = %49
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = icmp eq i32 %62, 2
  br i1 %63, label %64, label %77

64:                                               ; preds = %61
  %65 = invoke i32 (ptr, ...) @printf(ptr noundef @.str)
          to label %66 unwind label %37

66:                                               ; preds = %64
  %67 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1)
          to label %68 unwind label %37

68:                                               ; preds = %66
  %69 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #7
          to label %70 unwind label %37

70:                                               ; preds = %68
  invoke void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18) %69)
          to label %71 unwind label %73

71:                                               ; preds = %70
  %72 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  store ptr %69, ptr %72, align 8, !tbaa !19
  br label %91

73:                                               ; preds = %70
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %19, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %69, i64 noundef 24) #8
  br label %406

77:                                               ; preds = %61
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %78)
          to label %80 unwind label %37

80:                                               ; preds = %77
  %81 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1)
          to label %82 unwind label %37

82:                                               ; preds = %80
  %83 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #7
          to label %84 unwind label %37

84:                                               ; preds = %82
  invoke void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18) %83)
          to label %85 unwind label %87

85:                                               ; preds = %84
  %86 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  store ptr %83, ptr %86, align 8, !tbaa !19
  br label %91

87:                                               ; preds = %84
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %19, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %83, i64 noundef 24) #8
  br label %406

91:                                               ; preds = %85, %71
  br label %92

92:                                               ; preds = %91, %55
  br label %93

93:                                               ; preds = %92, %35
  %94 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !19
  %96 = load i8, ptr %14, align 1, !tbaa !11, !range !20, !noundef !21
  %97 = trunc i8 %96 to i1
  %98 = load ptr, ptr %95, align 8, !tbaa !13
  %99 = getelementptr inbounds ptr, ptr %98, i64 25
  %100 = load ptr, ptr %99, align 8
  invoke void %100(ptr noundef nonnull align 8 dereferenceable(8) %95, i1 noundef zeroext %97)
          to label %101 unwind label %37

101:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #9
  invoke void @_ZN26TinyWindowConstructionInfoC2Eii(ptr noundef nonnull align 8 dereferenceable(40) %21, i32 noundef 1024, i32 noundef 768)
          to label %102 unwind label %130

102:                                              ; preds = %101
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.TinyWindowConstructionInfo, ptr %21, i32 0, i32 5
  store ptr %103, ptr %104, align 8, !tbaa !22
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = getelementptr inbounds %struct.TinyWindowConstructionInfo, ptr %21, i32 0, i32 0
  store i32 %105, ptr %106, align 8, !tbaa !24
  %107 = load i32, ptr %13, align 4, !tbaa !9
  %108 = getelementptr inbounds %struct.TinyWindowConstructionInfo, ptr %21, i32 0, i32 1
  store i32 %107, ptr %108, align 4, !tbaa !25
  %109 = load i32, ptr %16, align 4, !tbaa !9
  %110 = getelementptr inbounds %struct.TinyWindowConstructionInfo, ptr %21, i32 0, i32 7
  store i32 %109, ptr %110, align 4, !tbaa !26
  %111 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !19
  %113 = load ptr, ptr %112, align 8, !tbaa !13
  %114 = getelementptr inbounds ptr, ptr %113, i64 3
  %115 = load ptr, ptr %114, align 8
  invoke void %115(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull align 8 dereferenceable(40) %21)
          to label %116 unwind label %130

116:                                              ; preds = %102
  %117 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %118 = load ptr, ptr %117, align 8, !tbaa !19
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = load ptr, ptr %118, align 8, !tbaa !13
  %121 = getelementptr inbounds ptr, ptr %120, i64 23
  %122 = load ptr, ptr %121, align 8
  invoke void %122(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef %119)
          to label %123 unwind label %130

123:                                              ; preds = %116
  %124 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %125 = invoke i32 %124()
          to label %126 unwind label %130

126:                                              ; preds = %123
  %127 = icmp eq i32 %125, 0
  br i1 %127, label %128, label %129

128:                                              ; preds = %126
  br label %135

129:                                              ; preds = %126
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 342, ptr noundef @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #10
  unreachable

130:                                              ; preds = %358, %349, %324, %315, %306, %298, %290, %284, %281, %280, %274, %268, %262, %256, %253, %237, %232, %224, %218, %208, %202, %197, %188, %180, %177, %169, %162, %155, %149, %138, %137, %136, %135, %123, %116, %102, %101
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %19, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %20, align 4
  br label %405

134:                                              ; No predecessors!
  br label %135

135:                                              ; preds = %134, %128
  invoke void @_ZL13printGLStringPKcj(ptr noundef @.str.5, i32 noundef 7938)
          to label %136 unwind label %130

136:                                              ; preds = %135
  invoke void @_ZL13printGLStringPKcj(ptr noundef @.str.6, i32 noundef 7936)
          to label %137 unwind label %130

137:                                              ; preds = %136
  invoke void @_ZL13printGLStringPKcj(ptr noundef @.str.7, i32 noundef 7937)
          to label %138 unwind label %130

138:                                              ; preds = %137
  %139 = load ptr, ptr @glad_glClearColor, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 15
  %141 = getelementptr inbounds [3 x float], ptr %140, i64 0, i64 0
  %142 = load float, ptr %141, align 8, !tbaa !27
  %143 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 15
  %144 = getelementptr inbounds [3 x float], ptr %143, i64 0, i64 1
  %145 = load float, ptr %144, align 4, !tbaa !27
  %146 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 15
  %147 = getelementptr inbounds [3 x float], ptr %146, i64 0, i64 2
  %148 = load float, ptr %147, align 8, !tbaa !27
  invoke void %139(float noundef %142, float noundef %145, float noundef %148, float noundef 1.000000e+00)
          to label %149 unwind label %130

149:                                              ; preds = %138
  %150 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %151 = load ptr, ptr %150, align 8, !tbaa !19
  %152 = load ptr, ptr %151, align 8, !tbaa !13
  %153 = getelementptr inbounds ptr, ptr %152, i64 9
  %154 = load ptr, ptr %153, align 8
  invoke void %154(ptr noundef nonnull align 8 dereferenceable(8) %151)
          to label %155 unwind label %130

155:                                              ; preds = %149
  %156 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %157 = load ptr, ptr %156, align 8, !tbaa !19
  %158 = load ptr, ptr %157, align 8, !tbaa !13
  %159 = getelementptr inbounds ptr, ptr %158, i64 26
  %160 = load ptr, ptr %159, align 8
  %161 = invoke noundef i32 %160(ptr noundef nonnull align 8 dereferenceable(8) %157)
          to label %162 unwind label %130

162:                                              ; preds = %155
  store i32 %161, ptr %12, align 4, !tbaa !9
  %163 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %164 = load ptr, ptr %163, align 8, !tbaa !19
  %165 = load ptr, ptr %164, align 8, !tbaa !13
  %166 = getelementptr inbounds ptr, ptr %165, i64 27
  %167 = load ptr, ptr %166, align 8
  %168 = invoke noundef i32 %167(ptr noundef nonnull align 8 dereferenceable(8) %164)
          to label %169 unwind label %130

169:                                              ; preds = %162
  store i32 %168, ptr %13, align 4, !tbaa !9
  %170 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %171 = invoke i32 %170()
          to label %172 unwind label %130

172:                                              ; preds = %169
  %173 = icmp eq i32 %171, 0
  br i1 %173, label %174, label %175

174:                                              ; preds = %172
  br label %177

175:                                              ; preds = %172
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 357, ptr noundef @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #10
  unreachable

176:                                              ; No predecessors!
  br label %177

177:                                              ; preds = %176, %174
  %178 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %179 = invoke i32 %178()
          to label %180 unwind label %130

180:                                              ; preds = %177
  %181 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %182 = invoke i32 %181()
          to label %183 unwind label %130

183:                                              ; preds = %180
  %184 = icmp eq i32 %182, 0
  br i1 %184, label %185, label %186

185:                                              ; preds = %183
  br label %188

186:                                              ; preds = %183
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 380, ptr noundef @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #10
  unreachable

187:                                              ; No predecessors!
  br label %188

188:                                              ; preds = %187, %185
  %189 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 3
  store ptr null, ptr %189, align 8, !tbaa !28
  %190 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %191 = invoke i32 %190()
          to label %192 unwind label %130

192:                                              ; preds = %188
  %193 = icmp eq i32 %191, 0
  br i1 %193, label %194, label %195

194:                                              ; preds = %192
  br label %197

195:                                              ; preds = %192
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 384, ptr noundef @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #10
  unreachable

196:                                              ; No predecessors!
  br label %197

197:                                              ; preds = %196, %194
  %198 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #7
          to label %199 unwind label %130

199:                                              ; preds = %197
  %200 = load i32, ptr %17, align 4, !tbaa !9
  %201 = load i32, ptr %18, align 4, !tbaa !9
  invoke void @_ZN24TinyGLInstancingRendererC1Eii(ptr noundef nonnull align 8 dereferenceable(60) %198, i32 noundef %200, i32 noundef %201)
          to label %202 unwind label %244

202:                                              ; preds = %199
  %203 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 3
  store ptr %198, ptr %203, align 8, !tbaa !29
  %204 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #7
          to label %205 unwind label %130

205:                                              ; preds = %202
  %206 = load i32, ptr %12, align 4, !tbaa !9
  %207 = load i32, ptr %13, align 4, !tbaa !9
  invoke void @_ZN23TinyGLPrimitiveRendererC1Eii(ptr noundef nonnull align 8 dereferenceable(32) %204, i32 noundef %206, i32 noundef %207)
          to label %208 unwind label %248

208:                                              ; preds = %205
  %209 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 2
  store ptr %204, ptr %209, align 8, !tbaa !30
  %210 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 3
  %211 = load ptr, ptr %210, align 8, !tbaa !29
  %212 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 2
  store ptr %211, ptr %212, align 8, !tbaa !31
  %213 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %214 = load ptr, ptr %213, align 8, !tbaa !19
  %215 = load ptr, ptr %214, align 8, !tbaa !13
  %216 = getelementptr inbounds ptr, ptr %215, i64 16
  %217 = load ptr, ptr %216, align 8
  invoke void %217(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef @_ZL20SimpleResizeCallbackff)
          to label %218 unwind label %130

218:                                              ; preds = %208
  %219 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 3
  %220 = load ptr, ptr %219, align 8, !tbaa !29
  %221 = load ptr, ptr %220, align 8, !tbaa !13
  %222 = getelementptr inbounds ptr, ptr %221, i64 2
  %223 = load ptr, ptr %222, align 8
  invoke void %223(ptr noundef nonnull align 8 dereferenceable(60) %220)
          to label %224 unwind label %130

224:                                              ; preds = %218
  %225 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 3
  %226 = load ptr, ptr %225, align 8, !tbaa !29
  %227 = load i32, ptr %12, align 4, !tbaa !9
  %228 = load i32, ptr %13, align 4, !tbaa !9
  %229 = load ptr, ptr %226, align 8, !tbaa !13
  %230 = getelementptr inbounds ptr, ptr %229, i64 46
  %231 = load ptr, ptr %230, align 8
  invoke void %231(ptr noundef nonnull align 8 dereferenceable(60) %226, i32 noundef %227, i32 noundef %228)
          to label %232 unwind label %130

232:                                              ; preds = %224
  %233 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 2
  %234 = load ptr, ptr %233, align 8, !tbaa !30
  %235 = load i32, ptr %12, align 4, !tbaa !9
  %236 = load i32, ptr %13, align 4, !tbaa !9
  invoke void @_ZN23TinyGLPrimitiveRenderer15set_screen_sizeEii(ptr noundef nonnull align 8 dereferenceable(32) %234, i32 noundef %235, i32 noundef %236)
          to label %237 unwind label %130

237:                                              ; preds = %232
  %238 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %239 = invoke i32 %238()
          to label %240 unwind label %130

240:                                              ; preds = %237
  %241 = icmp eq i32 %239, 0
  br i1 %241, label %242, label %243

242:                                              ; preds = %240
  br label %253

243:                                              ; preds = %240
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 397, ptr noundef @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #10
  unreachable

244:                                              ; preds = %199
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %19, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %198, i64 noundef 64) #8
  br label %405

248:                                              ; preds = %205
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %19, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %204, i64 noundef 32) #8
  br label %405

252:                                              ; No predecessors!
  br label %253

253:                                              ; preds = %252, %242
  %254 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 3
  %255 = load ptr, ptr %254, align 8, !tbaa !29
  invoke void @_ZN24TinyGLInstancingRenderer12init_shadersEv(ptr noundef nonnull align 8 dereferenceable(60) %255)
          to label %256 unwind label %130

256:                                              ; preds = %253
  %257 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %258 = load ptr, ptr %257, align 8, !tbaa !19
  %259 = load ptr, ptr %258, align 8, !tbaa !13
  %260 = getelementptr inbounds ptr, ptr %259, i64 12
  %261 = load ptr, ptr %260, align 8
  invoke void %261(ptr noundef nonnull align 8 dereferenceable(8) %258, ptr noundef @_Z23SimpleMouseMoveCallbackff)
          to label %262 unwind label %130

262:                                              ; preds = %256
  %263 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %264 = load ptr, ptr %263, align 8, !tbaa !19
  %265 = load ptr, ptr %264, align 8, !tbaa !13
  %266 = getelementptr inbounds ptr, ptr %265, i64 14
  %267 = load ptr, ptr %266, align 8
  invoke void %267(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @_Z25SimpleMouseButtonCallbackiiff)
          to label %268 unwind label %130

268:                                              ; preds = %262
  %269 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %270 = load ptr, ptr %269, align 8, !tbaa !19
  %271 = load ptr, ptr %270, align 8, !tbaa !13
  %272 = getelementptr inbounds ptr, ptr %271, i64 20
  %273 = load ptr, ptr %272, align 8
  invoke void %273(ptr noundef nonnull align 8 dereferenceable(8) %270, ptr noundef @_ZL22SimpleKeyboardCallbackii)
          to label %274 unwind label %130

274:                                              ; preds = %268
  %275 = getelementptr inbounds %struct.TinyCommonGraphicsApp, ptr %25, i32 0, i32 1
  %276 = load ptr, ptr %275, align 8, !tbaa !19
  %277 = load ptr, ptr %276, align 8, !tbaa !13
  %278 = getelementptr inbounds ptr, ptr %277, i64 18
  %279 = load ptr, ptr %278, align 8
  invoke void %279(ptr noundef nonnull align 8 dereferenceable(8) %276, ptr noundef @_Z19SimpleWheelCallbackff)
          to label %280 unwind label %130

280:                                              ; preds = %274
  invoke void @_Z22TwGenerateDefaultFontsv()
          to label %281 unwind label %130

281:                                              ; preds = %280
  %282 = load ptr, ptr @g_DefaultNormalFont, align 8, !tbaa !5
  %283 = invoke noundef i32 @_ZL8BindFontPK8CTexFont(ptr noundef %282)
          to label %284 unwind label %130

284:                                              ; preds = %281
  %285 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %286 = load ptr, ptr %285, align 8, !tbaa !15
  %287 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %286, i32 0, i32 0
  store i32 %283, ptr %287, align 8, !tbaa !32
  %288 = load ptr, ptr @g_DefaultLargeFont, align 8, !tbaa !5
  %289 = invoke noundef i32 @_ZL8BindFontPK8CTexFont(ptr noundef %288)
          to label %290 unwind label %130

290:                                              ; preds = %284
  %291 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %292 = load ptr, ptr %291, align 8, !tbaa !15
  %293 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %292, i32 0, i32 1
  store i32 %289, ptr %293, align 4, !tbaa !34
  %294 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #7
          to label %295 unwind label %130

295:                                              ; preds = %290
  %296 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 2
  %297 = load ptr, ptr %296, align 8, !tbaa !30
  invoke void @_ZN22OpenGL2RenderCallbacksC1EP23TinyGLPrimitiveRenderer(ptr noundef nonnull align 8 dereferenceable(16) %294, ptr noundef %297)
          to label %298 unwind label %334

298:                                              ; preds = %295
  %299 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %300 = load ptr, ptr %299, align 8, !tbaa !15
  %301 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %300, i32 0, i32 4
  store ptr %294, ptr %301, align 8, !tbaa !35
  %302 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 88) #7
          to label %303 unwind label %130

303:                                              ; preds = %298
  %304 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 3
  %305 = load ptr, ptr %304, align 8, !tbaa !29
  invoke void @_ZN17MyRenderCallbacksC2EP24TinyGLInstancingRenderer(ptr noundef nonnull align 8 dereferenceable(88) %302, ptr noundef %305)
          to label %306 unwind label %338

306:                                              ; preds = %303
  %307 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %308 = load ptr, ptr %307, align 8, !tbaa !15
  %309 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %308, i32 0, i32 5
  store ptr %302, ptr %309, align 8, !tbaa !36
  %310 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %311 = load ptr, ptr %310, align 8, !tbaa !15
  %312 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %311, i32 0, i32 5
  %313 = load ptr, ptr %312, align 8, !tbaa !36
  %314 = invoke noundef ptr @_Z10sth_createiiP15RenderCallbacks(i32 noundef 512, i32 noundef 512, ptr noundef %313)
          to label %315 unwind label %130

315:                                              ; preds = %306
  %316 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %317 = load ptr, ptr %316, align 8, !tbaa !15
  %318 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %317, i32 0, i32 3
  store ptr %314, ptr %318, align 8, !tbaa !37
  %319 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %320 = load ptr, ptr %319, align 8, !tbaa !15
  %321 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %320, i32 0, i32 4
  %322 = load ptr, ptr %321, align 8, !tbaa !35
  %323 = invoke noundef ptr @_Z10sth_createiiP15RenderCallbacks(i32 noundef 512, i32 noundef 512, ptr noundef %322)
          to label %324 unwind label %130

324:                                              ; preds = %315
  %325 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %326 = load ptr, ptr %325, align 8, !tbaa !15
  %327 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %326, i32 0, i32 2
  store ptr %323, ptr %327, align 8, !tbaa !38
  %328 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %329 = invoke i32 %328()
          to label %330 unwind label %130

330:                                              ; preds = %324
  %331 = icmp eq i32 %329, 0
  br i1 %331, label %332, label %333

332:                                              ; preds = %330
  br label %343

333:                                              ; preds = %330
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 417, ptr noundef @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #10
  unreachable

334:                                              ; preds = %295
  %335 = landingpad { ptr, i32 }
          cleanup
  %336 = extractvalue { ptr, i32 } %335, 0
  store ptr %336, ptr %19, align 8
  %337 = extractvalue { ptr, i32 } %335, 1
  store i32 %337, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %294, i64 noundef 16) #8
  br label %405

338:                                              ; preds = %303
  %339 = landingpad { ptr, i32 }
          cleanup
  %340 = extractvalue { ptr, i32 } %339, 0
  store ptr %340, ptr %19, align 8
  %341 = extractvalue { ptr, i32 } %339, 1
  store i32 %341, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %302, i64 noundef 88) #8
  br label %405

342:                                              ; No predecessors!
  br label %343

343:                                              ; preds = %342, %332
  %344 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %345 = load ptr, ptr %344, align 8, !tbaa !15
  %346 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %345, i32 0, i32 2
  %347 = load ptr, ptr %346, align 8, !tbaa !38
  %348 = icmp ne ptr %347, null
  br i1 %348, label %352, label %349

349:                                              ; preds = %343
  %350 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.8)
          to label %351 unwind label %130

351:                                              ; preds = %349
  br label %352

352:                                              ; preds = %351, %343
  %353 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %354 = load ptr, ptr %353, align 8, !tbaa !15
  %355 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %354, i32 0, i32 3
  %356 = load ptr, ptr %355, align 8, !tbaa !37
  %357 = icmp ne ptr %356, null
  br i1 %357, label %361, label %358

358:                                              ; preds = %352
  %359 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.9)
          to label %360 unwind label %130

360:                                              ; preds = %358
  br label %361

361:                                              ; preds = %360, %352
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  store ptr @OpenSansData, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %362 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %362, ptr %23, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %364 = load ptr, ptr %363, align 8, !tbaa !15
  %365 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %364, i32 0, i32 2
  %366 = load ptr, ptr %365, align 8, !tbaa !38
  %367 = load ptr, ptr %23, align 8, !tbaa !5
  %368 = invoke noundef i32 @_Z24sth_add_font_from_memoryP9sth_stashPh(ptr noundef %366, ptr noundef %367)
          to label %369 unwind label %377

369:                                              ; preds = %361
  %370 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %371 = load ptr, ptr %370, align 8, !tbaa !15
  %372 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %371, i32 0, i32 6
  store i32 %368, ptr %372, align 8, !tbaa !39
  %373 = icmp ne i32 %368, 0
  br i1 %373, label %381, label %374

374:                                              ; preds = %369
  %375 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.10)
          to label %376 unwind label %377

376:                                              ; preds = %374
  br label %381

377:                                              ; preds = %396, %393, %381, %374, %361
  %378 = landingpad { ptr, i32 }
          cleanup
  %379 = extractvalue { ptr, i32 } %378, 0
  store ptr %379, ptr %19, align 8
  %380 = extractvalue { ptr, i32 } %378, 1
  store i32 %380, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %405

381:                                              ; preds = %376, %369
  %382 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %383 = load ptr, ptr %382, align 8, !tbaa !15
  %384 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %383, i32 0, i32 3
  %385 = load ptr, ptr %384, align 8, !tbaa !37
  %386 = load ptr, ptr %23, align 8, !tbaa !5
  %387 = invoke noundef i32 @_Z24sth_add_font_from_memoryP9sth_stashPh(ptr noundef %385, ptr noundef %386)
          to label %388 unwind label %377

388:                                              ; preds = %381
  %389 = getelementptr inbounds %struct.TinyOpenGL3App, ptr %25, i32 0, i32 1
  %390 = load ptr, ptr %389, align 8, !tbaa !15
  %391 = getelementptr inbounds %struct.TinyOpenGL3AppInternalData, ptr %390, i32 0, i32 7
  store i32 %387, ptr %391, align 4, !tbaa !40
  %392 = icmp ne i32 %387, 0
  br i1 %392, label %396, label %393

393:                                              ; preds = %388
  %394 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.10)
          to label %395 unwind label %377

395:                                              ; preds = %393
  br label %396

396:                                              ; preds = %395, %388
  %397 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %398 = invoke i32 %397()
          to label %399 unwind label %377

399:                                              ; preds = %396
  %400 = icmp eq i32 %398, 0
  br i1 %400, label %401, label %402

401:                                              ; preds = %399
  br label %404

402:                                              ; preds = %399
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 439, ptr noundef @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #10
  unreachable

403:                                              ; No predecessors!
  br label %404

404:                                              ; preds = %403, %401
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #9
  ret void

405:                                              ; preds = %377, %338, %334, %248, %244, %130
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #9
  br label %406

406:                                              ; preds = %405, %87, %73, %57, %45, %41, %37
  call void @_ZN21TinyCommonGraphicsAppD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %25) #9
  br label %407

407:                                              ; preds = %406
  %408 = load ptr, ptr %19, align 8
  %409 = load i32, ptr %20, align 4
  %410 = insertvalue { ptr, i32 } poison, ptr %408, 0
  %411 = insertvalue { ptr, i32 } %410, i32 %409, 1
  resume { ptr, i32 } %411
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21TinyCommonGraphicsAppC2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #1 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN26TinyOpenGL3AppInternalDataC2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #1 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

declare void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18)) unnamed_addr #4

declare i32 @printf(ptr noundef, ...) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN26TinyWindowConstructionInfoC2Eii(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13printGLStringPKcj(ptr noundef, i32 noundef) #0

declare void @_ZN24TinyGLInstancingRendererC1Eii(ptr noundef nonnull align 8 dereferenceable(60), i32 noundef, i32 noundef) unnamed_addr #4

declare void @_ZN23TinyGLPrimitiveRendererC1Eii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20SimpleResizeCallbackff(float noundef, float noundef) #0

declare void @_ZN23TinyGLPrimitiveRenderer15set_screen_sizeEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #4

declare void @_ZN24TinyGLInstancingRenderer12init_shadersEv(ptr noundef nonnull align 8 dereferenceable(60)) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22SimpleKeyboardCallbackii(i32 noundef, i32 noundef) #0

declare void @_Z22TwGenerateDefaultFontsv() #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL8BindFontPK8CTexFont(ptr noundef) #0

declare void @_ZN22OpenGL2RenderCallbacksC1EP23TinyGLPrimitiveRenderer(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN17MyRenderCallbacksC2EP24TinyGLInstancingRenderer(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) unnamed_addr #1 align 2

declare noundef ptr @_Z10sth_createiiP15RenderCallbacks(i32 noundef, i32 noundef, ptr noundef) #4

declare noundef i32 @_Z24sth_add_font_from_memoryP9sth_stashPh(ptr noundef, ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21TinyCommonGraphicsAppD2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #1 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !6, i64 80}
!16 = !{!"_ZTS14TinyOpenGL3App", !17, i64 0, !6, i64 80, !6, i64 88, !6, i64 96}
!17 = !{!"_ZTS21TinyCommonGraphicsApp", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 41, !12, i64 42, !18, i64 44, !18, i64 48, !18, i64 52, !18, i64 56, !12, i64 60, !7, i64 64}
!18 = !{!"float", !7, i64 0}
!19 = !{!17, !6, i64 8}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!23, !6, i64 24}
!23 = !{!"_ZTS26TinyWindowConstructionInfo", !10, i64 0, !10, i64 4, !12, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36}
!24 = !{!23, !10, i64 0}
!25 = !{!23, !10, i64 4}
!26 = !{!23, !10, i64 36}
!27 = !{!18, !18, i64 0}
!28 = !{!17, !6, i64 24}
!29 = !{!16, !6, i64 96}
!30 = !{!16, !6, i64 88}
!31 = !{!17, !6, i64 16}
!32 = !{!33, !10, i64 0}
!33 = !{!"_ZTS26TinyOpenGL3AppInternalData", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100}
!34 = !{!33, !10, i64 4}
!35 = !{!33, !6, i64 24}
!36 = !{!33, !6, i64 32}
!37 = !{!33, !6, i64 16}
!38 = !{!33, !6, i64 8}
!39 = !{!33, !10, i64 40}
!40 = !{!33, !10, i64 44}


; 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.TinyWindowConstructionInfo = type { i32, i32, i8, i32, ptr, ptr, i32, i32 }

@_ZL4gApp = external hidden local_unnamed_addr global ptr, align 8
@_ZTV14TinyOpenGL3App = external dso_local unnamed_addr constant { [29 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [50 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [59 x i8], align 1
@glad_glGetError = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii = external hidden unnamed_addr constant [81 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@glad_glClearColor = external local_unnamed_addr global ptr, align 8
@g_DefaultNormalFont = external local_unnamed_addr global ptr, align 8
@g_DefaultLargeFont = external local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@OpenSansData = external global [0 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z25SimpleMouseButtonCallbackiiff(i32 noundef, i32 noundef, float noundef, float noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23SimpleMouseMoveCallbackff(float noundef, float noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z19SimpleWheelCallbackff(float noundef, float noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14TinyOpenGL3AppC2EPKciibiiii(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca %struct.TinyWindowConstructionInfo, align 8
  tail call void @_ZN21TinyCommonGraphicsAppC2Ev(ptr noundef nonnull align 8 dereferenceable(76) %0)
  store ptr getelementptr inbounds inrange(-16, 216) (i8, ptr @_ZTV14TinyOpenGL3App, i64 16), ptr %0, align 8, !tbaa !5
  store ptr %0, ptr @_ZL4gApp, align 8, !tbaa !8
  %11 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #8
          to label %12 unwind label %17

12:                                               ; preds = %9
  tail call void @_ZN26TinyOpenGL3AppInternalDataC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %11)
  %13 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %11, ptr %13, align 8, !tbaa !11
  switch i32 %5, label %33 [
    i32 0, label %14
    i32 1, label %21
    i32 2, label %26
  ]

14:                                               ; preds = %12
  %15 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #8
          to label %16 unwind label %17

16:                                               ; preds = %14
  invoke void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18) %15)
          to label %40 unwind label %19

17:                                               ; preds = %40, %33, %26, %21, %14, %9
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %257

19:                                               ; preds = %16
  %20 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %15, i64 noundef 24) #9
  br label %257

21:                                               ; preds = %12
  %22 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #8
          to label %23 unwind label %17

23:                                               ; preds = %21
  invoke void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18) %22)
          to label %40 unwind label %24

24:                                               ; preds = %23
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %22, i64 noundef 24) #9
  br label %257

26:                                               ; preds = %12
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %29 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #8
          to label %30 unwind label %17

30:                                               ; preds = %26
  invoke void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18) %29)
          to label %40 unwind label %31

31:                                               ; preds = %30
  %32 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %29, i64 noundef 24) #9
  br label %257

33:                                               ; preds = %12
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %5)
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %36 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #8
          to label %37 unwind label %17

37:                                               ; preds = %33
  invoke void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18) %36)
          to label %40 unwind label %38

38:                                               ; preds = %37
  %39 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %36, i64 noundef 24) #9
  br label %257

40:                                               ; preds = %37, %30, %23, %16
  %.sink = phi ptr [ %15, %16 ], [ %22, %23 ], [ %29, %30 ], [ %36, %37 ]
  %41 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %.sink, ptr %41, align 8, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  %43 = load ptr, ptr %.sink, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 200
  %45 = load ptr, ptr %44, align 8
  invoke void %45(ptr noundef nonnull align 8 dereferenceable(8) %.sink, i1 noundef zeroext %4)
          to label %46 unwind label %17

46:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #10
  call void @_ZN26TinyWindowConstructionInfoC2Eii(ptr noundef nonnull align 8 dereferenceable(40) %10, i32 noundef 1024, i32 noundef 768)
  %47 = getelementptr inbounds i8, ptr %10, i64 24
  store ptr %1, ptr %47, align 8, !tbaa !17
  store i32 %2, ptr %10, align 8, !tbaa !20
  %48 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 %3, ptr %48, align 4, !tbaa !21
  %49 = getelementptr inbounds i8, ptr %10, i64 36
  store i32 %6, ptr %49, align 4, !tbaa !22
  %50 = load ptr, ptr %42, align 8, !tbaa !16
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %51, i64 24
  %53 = load ptr, ptr %52, align 8
  invoke void %53(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(40) %10)
          to label %54 unwind label %65

54:                                               ; preds = %46
  %55 = load ptr, ptr %42, align 8, !tbaa !16
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 184
  %58 = load ptr, ptr %57, align 8
  invoke void %58(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef %1)
          to label %59 unwind label %65

59:                                               ; preds = %54
  %60 = load ptr, ptr @glad_glGetError, align 8, !tbaa !8
  %61 = invoke i32 %60()
          to label %62 unwind label %65

62:                                               ; preds = %59
  %63 = icmp eq i32 %61, 0
  br i1 %63, label %67, label %64

64:                                               ; preds = %62
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 342, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #11
  unreachable

65:                                               ; preds = %205, %199, %194, %190, %184, %180, %177, %176, %171, %166, %161, %156, %154, %144, %142, %137, %132, %124, %120, %117, %110, %104, %101, %95, %89, %83, %78, %70, %69, %68, %67, %59, %54, %46
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %256

67:                                               ; preds = %62
  invoke void @_ZL13printGLStringPKcj(ptr noundef nonnull @.str.5, i32 noundef 7938)
          to label %68 unwind label %65

68:                                               ; preds = %67
  invoke void @_ZL13printGLStringPKcj(ptr noundef nonnull @.str.6, i32 noundef 7936)
          to label %69 unwind label %65

69:                                               ; preds = %68
  invoke void @_ZL13printGLStringPKcj(ptr noundef nonnull @.str.7, i32 noundef 7937)
          to label %70 unwind label %65

70:                                               ; preds = %69
  %71 = load ptr, ptr @glad_glClearColor, align 8, !tbaa !8
  %72 = getelementptr inbounds i8, ptr %0, i64 64
  %73 = load float, ptr %72, align 8, !tbaa !23
  %74 = getelementptr inbounds i8, ptr %0, i64 68
  %75 = load float, ptr %74, align 4, !tbaa !23
  %76 = getelementptr inbounds i8, ptr %0, i64 72
  %77 = load float, ptr %76, align 8, !tbaa !23
  invoke void %71(float noundef %73, float noundef %75, float noundef %77, float noundef 1.000000e+00)
          to label %78 unwind label %65

78:                                               ; preds = %70
  %79 = load ptr, ptr %42, align 8, !tbaa !16
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i64 72
  %82 = load ptr, ptr %81, align 8
  invoke void %82(ptr noundef nonnull align 8 dereferenceable(8) %79)
          to label %83 unwind label %65

83:                                               ; preds = %78
  %84 = load ptr, ptr %42, align 8, !tbaa !16
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 208
  %87 = load ptr, ptr %86, align 8
  %88 = invoke noundef i32 %87(ptr noundef nonnull align 8 dereferenceable(8) %84)
          to label %89 unwind label %65

89:                                               ; preds = %83
  %90 = load ptr, ptr %42, align 8, !tbaa !16
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i64 216
  %93 = load ptr, ptr %92, align 8
  %94 = invoke noundef i32 %93(ptr noundef nonnull align 8 dereferenceable(8) %90)
          to label %95 unwind label %65

95:                                               ; preds = %89
  %96 = load ptr, ptr @glad_glGetError, align 8, !tbaa !8
  %97 = invoke i32 %96()
          to label %98 unwind label %65

98:                                               ; preds = %95
  %99 = icmp eq i32 %97, 0
  br i1 %99, label %101, label %100

100:                                              ; preds = %98
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 357, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #11
  unreachable

101:                                              ; preds = %98
  %102 = load ptr, ptr @glad_glGetError, align 8, !tbaa !8
  %103 = invoke i32 %102()
          to label %104 unwind label %65

104:                                              ; preds = %101
  %105 = load ptr, ptr @glad_glGetError, align 8, !tbaa !8
  %106 = invoke i32 %105()
          to label %107 unwind label %65

107:                                              ; preds = %104
  %108 = icmp eq i32 %106, 0
  br i1 %108, label %110, label %109

109:                                              ; preds = %107
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 380, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #11
  unreachable

110:                                              ; preds = %107
  %111 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr null, ptr %111, align 8, !tbaa !24
  %112 = load ptr, ptr @glad_glGetError, align 8, !tbaa !8
  %113 = invoke i32 %112()
          to label %114 unwind label %65

114:                                              ; preds = %110
  %115 = icmp eq i32 %113, 0
  br i1 %115, label %117, label %116

116:                                              ; preds = %114
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 384, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #11
  unreachable

117:                                              ; preds = %114
  %118 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #8
          to label %119 unwind label %65

119:                                              ; preds = %117
  invoke void @_ZN24TinyGLInstancingRendererC1Eii(ptr noundef nonnull align 8 dereferenceable(60) %118, i32 noundef %7, i32 noundef %8)
          to label %120 unwind label %150

120:                                              ; preds = %119
  %121 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %118, ptr %121, align 8, !tbaa !25
  %122 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #8
          to label %123 unwind label %65

123:                                              ; preds = %120
  invoke void @_ZN23TinyGLPrimitiveRendererC1Eii(ptr noundef nonnull align 8 dereferenceable(32) %122, i32 noundef %88, i32 noundef %94)
          to label %124 unwind label %152

124:                                              ; preds = %123
  %125 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %122, ptr %125, align 8, !tbaa !26
  %126 = load ptr, ptr %121, align 8, !tbaa !25
  %127 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %126, ptr %127, align 8, !tbaa !27
  %128 = load ptr, ptr %42, align 8, !tbaa !16
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds i8, ptr %129, i64 128
  %131 = load ptr, ptr %130, align 8
  invoke void %131(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef nonnull @_ZL20SimpleResizeCallbackff)
          to label %132 unwind label %65

132:                                              ; preds = %124
  %133 = load ptr, ptr %121, align 8, !tbaa !25
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i64 16
  %136 = load ptr, ptr %135, align 8
  invoke void %136(ptr noundef nonnull align 8 dereferenceable(60) %133)
          to label %137 unwind label %65

137:                                              ; preds = %132
  %138 = load ptr, ptr %121, align 8, !tbaa !25
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = getelementptr inbounds i8, ptr %139, i64 368
  %141 = load ptr, ptr %140, align 8
  invoke void %141(ptr noundef nonnull align 8 dereferenceable(60) %138, i32 noundef %88, i32 noundef %94)
          to label %142 unwind label %65

142:                                              ; preds = %137
  %143 = load ptr, ptr %125, align 8, !tbaa !26
  invoke void @_ZN23TinyGLPrimitiveRenderer15set_screen_sizeEii(ptr noundef nonnull align 8 dereferenceable(32) %143, i32 noundef %88, i32 noundef %94)
          to label %144 unwind label %65

144:                                              ; preds = %142
  %145 = load ptr, ptr @glad_glGetError, align 8, !tbaa !8
  %146 = invoke i32 %145()
          to label %147 unwind label %65

147:                                              ; preds = %144
  %148 = icmp eq i32 %146, 0
  br i1 %148, label %154, label %149

149:                                              ; preds = %147
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 397, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #11
  unreachable

150:                                              ; preds = %119
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %118, i64 noundef 64) #9
  br label %256

152:                                              ; preds = %123
  %153 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %122, i64 noundef 32) #9
  br label %256

154:                                              ; preds = %147
  %155 = load ptr, ptr %121, align 8, !tbaa !25
  invoke void @_ZN24TinyGLInstancingRenderer12init_shadersEv(ptr noundef nonnull align 8 dereferenceable(60) %155)
          to label %156 unwind label %65

156:                                              ; preds = %154
  %157 = load ptr, ptr %42, align 8, !tbaa !16
  %158 = load ptr, ptr %157, align 8, !tbaa !5
  %159 = getelementptr inbounds i8, ptr %158, i64 96
  %160 = load ptr, ptr %159, align 8
  invoke void %160(ptr noundef nonnull align 8 dereferenceable(8) %157, ptr noundef nonnull @_Z23SimpleMouseMoveCallbackff)
          to label %161 unwind label %65

161:                                              ; preds = %156
  %162 = load ptr, ptr %42, align 8, !tbaa !16
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  %164 = getelementptr inbounds i8, ptr %163, i64 112
  %165 = load ptr, ptr %164, align 8
  invoke void %165(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull @_Z25SimpleMouseButtonCallbackiiff)
          to label %166 unwind label %65

166:                                              ; preds = %161
  %167 = load ptr, ptr %42, align 8, !tbaa !16
  %168 = load ptr, ptr %167, align 8, !tbaa !5
  %169 = getelementptr inbounds i8, ptr %168, i64 160
  %170 = load ptr, ptr %169, align 8
  invoke void %170(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef nonnull @_ZL22SimpleKeyboardCallbackii)
          to label %171 unwind label %65

171:                                              ; preds = %166
  %172 = load ptr, ptr %42, align 8, !tbaa !16
  %173 = load ptr, ptr %172, align 8, !tbaa !5
  %174 = getelementptr inbounds i8, ptr %173, i64 144
  %175 = load ptr, ptr %174, align 8
  invoke void %175(ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef nonnull @_Z19SimpleWheelCallbackff)
          to label %176 unwind label %65

176:                                              ; preds = %171
  invoke void @_Z22TwGenerateDefaultFontsv()
          to label %177 unwind label %65

177:                                              ; preds = %176
  %178 = load ptr, ptr @g_DefaultNormalFont, align 8, !tbaa !8
  %179 = invoke noundef i32 @_ZL8BindFontPK8CTexFont(ptr noundef %178)
          to label %180 unwind label %65

180:                                              ; preds = %177
  %181 = load ptr, ptr %13, align 8, !tbaa !11
  store i32 %179, ptr %181, align 8, !tbaa !28
  %182 = load ptr, ptr @g_DefaultLargeFont, align 8, !tbaa !8
  %183 = invoke noundef i32 @_ZL8BindFontPK8CTexFont(ptr noundef %182)
          to label %184 unwind label %65

184:                                              ; preds = %180
  %185 = load ptr, ptr %13, align 8, !tbaa !11
  %186 = getelementptr inbounds i8, ptr %185, i64 4
  store i32 %183, ptr %186, align 4, !tbaa !30
  %187 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #8
          to label %188 unwind label %65

188:                                              ; preds = %184
  %189 = load ptr, ptr %125, align 8, !tbaa !26
  invoke void @_ZN22OpenGL2RenderCallbacksC1EP23TinyGLPrimitiveRenderer(ptr noundef nonnull align 8 dereferenceable(16) %187, ptr noundef %189)
          to label %190 unwind label %213

190:                                              ; preds = %188
  %191 = load ptr, ptr %13, align 8, !tbaa !11
  %192 = getelementptr inbounds i8, ptr %191, i64 24
  store ptr %187, ptr %192, align 8, !tbaa !31
  %193 = invoke noalias noundef nonnull dereferenceable(88) ptr @_Znwm(i64 noundef 88) #8
          to label %194 unwind label %65

194:                                              ; preds = %190
  %195 = load ptr, ptr %121, align 8, !tbaa !25
  call void @_ZN17MyRenderCallbacksC2EP24TinyGLInstancingRenderer(ptr noundef nonnull align 8 dereferenceable(88) %193, ptr noundef %195)
  %196 = load ptr, ptr %13, align 8, !tbaa !11
  %197 = getelementptr inbounds i8, ptr %196, i64 32
  store ptr %193, ptr %197, align 8, !tbaa !32
  %198 = invoke noundef ptr @_Z10sth_createiiP15RenderCallbacks(i32 noundef 512, i32 noundef 512, ptr noundef nonnull %193)
          to label %199 unwind label %65

199:                                              ; preds = %194
  %200 = load ptr, ptr %13, align 8, !tbaa !11
  %201 = getelementptr inbounds i8, ptr %200, i64 16
  store ptr %198, ptr %201, align 8, !tbaa !33
  %202 = getelementptr inbounds i8, ptr %200, i64 24
  %203 = load ptr, ptr %202, align 8, !tbaa !31
  %204 = invoke noundef ptr @_Z10sth_createiiP15RenderCallbacks(i32 noundef 512, i32 noundef 512, ptr noundef %203)
          to label %205 unwind label %65

205:                                              ; preds = %199
  %206 = load ptr, ptr %13, align 8, !tbaa !11
  %207 = getelementptr inbounds i8, ptr %206, i64 8
  store ptr %204, ptr %207, align 8, !tbaa !34
  %208 = load ptr, ptr @glad_glGetError, align 8, !tbaa !8
  %209 = invoke i32 %208()
          to label %210 unwind label %65

210:                                              ; preds = %205
  %211 = icmp eq i32 %209, 0
  br i1 %211, label %215, label %212

212:                                              ; preds = %210
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 417, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #11
  unreachable

213:                                              ; preds = %188
  %214 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %187, i64 noundef 16) #9
  br label %256

215:                                              ; preds = %210
  %216 = load ptr, ptr %13, align 8, !tbaa !11
  %217 = getelementptr inbounds i8, ptr %216, i64 8
  %218 = load ptr, ptr %217, align 8, !tbaa !34
  %.not = icmp eq ptr %218, null
  br i1 %.not, label %219, label %221

219:                                              ; preds = %215
  %220 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %.pre = load ptr, ptr %13, align 8, !tbaa !11
  br label %221

221:                                              ; preds = %219, %215
  %222 = phi ptr [ %.pre, %219 ], [ %216, %215 ]
  %223 = getelementptr inbounds i8, ptr %222, i64 16
  %224 = load ptr, ptr %223, align 8, !tbaa !33
  %.not26 = icmp eq ptr %224, null
  br i1 %.not26, label %225, label %227

225:                                              ; preds = %221
  %226 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.pre31 = load ptr, ptr %13, align 8, !tbaa !11
  br label %227

227:                                              ; preds = %225, %221
  %228 = phi ptr [ %.pre31, %225 ], [ %222, %221 ]
  %229 = getelementptr inbounds i8, ptr %228, i64 8
  %230 = load ptr, ptr %229, align 8, !tbaa !34
  %231 = invoke noundef i32 @_Z24sth_add_font_from_memoryP9sth_stashPh(ptr noundef %230, ptr noundef nonnull @OpenSansData)
          to label %232 unwind label %237

232:                                              ; preds = %227
  %233 = load ptr, ptr %13, align 8, !tbaa !11
  %234 = getelementptr inbounds i8, ptr %233, i64 40
  store i32 %231, ptr %234, align 8, !tbaa !35
  %.not27 = icmp eq i32 %231, 0
  br i1 %.not27, label %235, label %239

235:                                              ; preds = %232
  %236 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %.pre32 = load ptr, ptr %13, align 8, !tbaa !11
  br label %239

237:                                              ; preds = %249, %239, %227
  %238 = landingpad { ptr, i32 }
          cleanup
  br label %256

239:                                              ; preds = %235, %232
  %240 = phi ptr [ %.pre32, %235 ], [ %233, %232 ]
  %241 = getelementptr inbounds i8, ptr %240, i64 16
  %242 = load ptr, ptr %241, align 8, !tbaa !33
  %243 = invoke noundef i32 @_Z24sth_add_font_from_memoryP9sth_stashPh(ptr noundef %242, ptr noundef nonnull @OpenSansData)
          to label %244 unwind label %237

244:                                              ; preds = %239
  %245 = load ptr, ptr %13, align 8, !tbaa !11
  %246 = getelementptr inbounds i8, ptr %245, i64 44
  store i32 %243, ptr %246, align 4, !tbaa !36
  %.not28 = icmp eq i32 %243, 0
  br i1 %.not28, label %247, label %249

247:                                              ; preds = %244
  %248 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  br label %249

249:                                              ; preds = %247, %244
  %250 = load ptr, ptr @glad_glGetError, align 8, !tbaa !8
  %251 = invoke i32 %250()
          to label %252 unwind label %237

252:                                              ; preds = %249
  %253 = icmp eq i32 %251, 0
  br i1 %253, label %255, label %254

254:                                              ; preds = %252
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 439, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14TinyOpenGL3AppC2EPKciibiiii) #11
  unreachable

255:                                              ; preds = %252
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #10
  ret void

256:                                              ; preds = %237, %213, %152, %150, %65
  %.pn = phi { ptr, i32 } [ %238, %237 ], [ %66, %65 ], [ %214, %213 ], [ %153, %152 ], [ %151, %150 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #10
  br label %257

257:                                              ; preds = %256, %38, %31, %24, %19, %17
  %.pn.pn = phi { ptr, i32 } [ %.pn, %256 ], [ %18, %17 ], [ %20, %19 ], [ %25, %24 ], [ %32, %31 ], [ %39, %38 ]
  call void @_ZN21TinyCommonGraphicsAppD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %0) #10
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21TinyCommonGraphicsAppC2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #1 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN26TinyOpenGL3AppInternalDataC2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #1 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

declare void @_ZN19TinyX11OpenGLWindowC1Ev(ptr noundef nonnull align 8 dereferenceable(18)) unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN26TinyWindowConstructionInfoC2Eii(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

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

declare void @_ZN24TinyGLInstancingRendererC1Eii(ptr noundef nonnull align 8 dereferenceable(60), i32 noundef, i32 noundef) unnamed_addr #4

declare void @_ZN23TinyGLPrimitiveRendererC1Eii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20SimpleResizeCallbackff(float noundef, float noundef) #0

declare void @_ZN23TinyGLPrimitiveRenderer15set_screen_sizeEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #4

declare void @_ZN24TinyGLInstancingRenderer12init_shadersEv(ptr noundef nonnull align 8 dereferenceable(60)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22SimpleKeyboardCallbackii(i32 noundef, i32 noundef) #0

declare void @_Z22TwGenerateDefaultFontsv() local_unnamed_addr #4

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

declare void @_ZN22OpenGL2RenderCallbacksC1EP23TinyGLPrimitiveRenderer(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN17MyRenderCallbacksC2EP24TinyGLInstancingRenderer(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) unnamed_addr #1 align 2

declare noundef ptr @_Z10sth_createiiP15RenderCallbacks(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare noundef i32 @_Z24sth_add_font_from_memoryP9sth_stashPh(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21TinyCommonGraphicsAppD2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #1 align 2

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { nounwind }
attributes #11 = { noreturn 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !9, i64 80}
!12 = !{!"_ZTS14TinyOpenGL3App", !13, i64 0, !9, i64 80, !9, i64 88, !9, i64 96}
!13 = !{!"_ZTS21TinyCommonGraphicsApp", !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !14, i64 40, !14, i64 41, !14, i64 42, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56, !14, i64 60, !10, i64 64}
!14 = !{!"bool", !10, i64 0}
!15 = !{!"float", !10, i64 0}
!16 = !{!13, !9, i64 8}
!17 = !{!18, !9, i64 24}
!18 = !{!"_ZTS26TinyWindowConstructionInfo", !19, i64 0, !19, i64 4, !14, i64 8, !19, i64 12, !9, i64 16, !9, i64 24, !19, i64 32, !19, i64 36}
!19 = !{!"int", !10, i64 0}
!20 = !{!18, !19, i64 0}
!21 = !{!18, !19, i64 4}
!22 = !{!18, !19, i64 36}
!23 = !{!15, !15, i64 0}
!24 = !{!13, !9, i64 24}
!25 = !{!12, !9, i64 96}
!26 = !{!12, !9, i64 88}
!27 = !{!13, !9, i64 16}
!28 = !{!29, !19, i64 0}
!29 = !{!"_ZTS26TinyOpenGL3AppInternalData", !19, i64 0, !19, i64 4, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !19, i64 40, !19, i64 44, !19, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !19, i64 88, !19, i64 92, !19, i64 96, !19, i64 100}
!30 = !{!29, !19, i64 4}
!31 = !{!29, !9, i64 24}
!32 = !{!29, !9, i64 32}
!33 = !{!29, !9, i64 16}
!34 = !{!29, !9, i64 8}
!35 = !{!29, !19, i64 40}
!36 = !{!29, !19, i64 44}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass