; LLVM IR from lbowes/falcon-9-simulation :: 3rd_party/imgui/imgui_impl_opengl3.ll (Z32ImGui_ImplOpenGL3_RenderDrawDataP10ImDrawData)

; 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.ImVec2 = type { float, float }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawData = type <{ i8, [7 x i8], ptr, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, [4 x i8] }>
%struct.ImDrawList = type { %struct.ImVector.0, %struct.ImVector, %struct.ImVector.1, i32, ptr, ptr, i32, i32, ptr, ptr, %struct.ImVector.2, %struct.ImVector.3, %struct.ImVector.4, %struct.ImDrawListSplitter }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.5 }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImDrawCmd = type { i32, %struct.ImVec4, ptr, i32, i32, ptr, ptr }

@_ZL11g_GlVersion = external hidden global i32, align 4
@__glewActiveTexture = external global ptr, align 8
@__glewGenVertexArrays = external global ptr, align 8
@__glewBufferData = external global ptr, align 8
@__glewDrawElementsBaseVertex = external global ptr, align 8
@__glewDeleteVertexArrays = external global ptr, align 8
@__glewUseProgram = external global ptr, align 8
@__glewBindSampler = external global ptr, align 8
@__glewBindVertexArray = external global ptr, align 8
@__glewBindBuffer = external global ptr, align 8
@__glewBlendEquationSeparate = external global ptr, align 8
@__glewBlendFuncSeparate = external global ptr, align 8

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

declare void @glGetIntegerv(i32 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z32ImGui_ImplOpenGL3_RenderDrawDataP10ImDrawData(ptr noundef %0) #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
  %11 = alloca i32, align 4
  %12 = alloca [2 x i32], align 4
  %13 = alloca [4 x i32], align 16
  %14 = alloca [4 x i32], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca i8, align 1
  %24 = alloca i8, align 1
  %25 = alloca i32, align 4
  %26 = alloca %struct.ImVec2, align 4
  %27 = alloca %struct.ImVec2, align 4
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca %struct.ImVec4, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.ImDrawData, ptr %33, i32 0, i32 7
  %35 = getelementptr inbounds %struct.ImVec2, ptr %34, i32 0, i32 0
  %36 = load float, ptr %35, align 4, !tbaa !9
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ImDrawData, ptr %37, i32 0, i32 8
  %39 = getelementptr inbounds %struct.ImVec2, ptr %38, i32 0, i32 0
  %40 = load float, ptr %39, align 4, !tbaa !15
  %41 = fmul float %36, %40
  %42 = fptosi float %41 to i32
  store i32 %42, ptr %3, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ImDrawData, ptr %43, i32 0, i32 7
  %45 = getelementptr inbounds %struct.ImVec2, ptr %44, i32 0, i32 1
  %46 = load float, ptr %45, align 4, !tbaa !17
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ImDrawData, ptr %47, i32 0, i32 8
  %49 = getelementptr inbounds %struct.ImVec2, ptr %48, i32 0, i32 1
  %50 = load float, ptr %49, align 4, !tbaa !18
  %51 = fmul float %46, %50
  %52 = fptosi float %51 to i32
  store i32 %52, ptr %4, align 4, !tbaa !16
  %53 = load i32, ptr %3, align 4, !tbaa !16
  %54 = icmp sle i32 %53, 0
  br i1 %54, label %58, label %55

55:                                               ; preds = %1
  %56 = load i32, ptr %4, align 4, !tbaa !16
  %57 = icmp sle i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %55, %1
  store i32 1, ptr %5, align 4
  br label %334

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @glGetIntegerv(i32 noundef 34016, ptr noundef %6)
  %60 = load ptr, ptr @__glewActiveTexture, align 8, !tbaa !5
  call void %60(i32 noundef 33984)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @glGetIntegerv(i32 noundef 35725, ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @glGetIntegerv(i32 noundef 32873, ptr noundef %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @glGetIntegerv(i32 noundef 35097, ptr noundef %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @glGetIntegerv(i32 noundef 34964, ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @glGetIntegerv(i32 noundef 34229, ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %61 = getelementptr inbounds [2 x i32], ptr %12, i64 0, i64 0
  call void @glGetIntegerv(i32 noundef 2880, ptr noundef %61)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %62 = getelementptr inbounds [4 x i32], ptr %13, i64 0, i64 0
  call void @glGetIntegerv(i32 noundef 2978, ptr noundef %62)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %63 = getelementptr inbounds [4 x i32], ptr %14, i64 0, i64 0
  call void @glGetIntegerv(i32 noundef 3088, ptr noundef %63)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @glGetIntegerv(i32 noundef 32969, ptr noundef %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @glGetIntegerv(i32 noundef 32968, ptr noundef %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  call void @glGetIntegerv(i32 noundef 32971, ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @glGetIntegerv(i32 noundef 32970, ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @glGetIntegerv(i32 noundef 32777, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @glGetIntegerv(i32 noundef 34877, ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  %64 = call zeroext i8 @glIsEnabled(i32 noundef 3042)
  store i8 %64, ptr %21, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  %65 = call zeroext i8 @glIsEnabled(i32 noundef 2884)
  store i8 %65, ptr %22, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  %66 = call zeroext i8 @glIsEnabled(i32 noundef 2929)
  store i8 %66, ptr %23, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #6
  %67 = call zeroext i8 @glIsEnabled(i32 noundef 3089)
  store i8 %67, ptr %24, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !16
  %68 = load ptr, ptr @__glewGenVertexArrays, align 8, !tbaa !5
  call void %68(i32 noundef 1, ptr noundef %25)
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = load i32, ptr %3, align 4, !tbaa !16
  %71 = load i32, ptr %4, align 4, !tbaa !16
  %72 = load i32, ptr %25, align 4, !tbaa !16
  call void @_ZL34ImGui_ImplOpenGL3_SetupRenderStateP10ImDrawDataiij(ptr noundef %69, i32 noundef %70, i32 noundef %71, i32 noundef %72)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ImDrawData, ptr %73, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %74, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ImDrawData, ptr %75, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %76, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !16
  br label %77

77:                                               ; preds = %272, %59
  %78 = load i32, ptr %28, align 4, !tbaa !16
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ImDrawData, ptr %79, i32 0, i32 3
  %81 = load i32, ptr %80, align 8, !tbaa !22
  %82 = icmp slt i32 %78, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %77
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %275

84:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ImDrawData, ptr %85, i32 0, i32 2
  %87 = load ptr, ptr %86, align 8, !tbaa !23
  %88 = load i32, ptr %28, align 4, !tbaa !16
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds ptr, ptr %87, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  store ptr %91, ptr %29, align 8, !tbaa !5
  %92 = load ptr, ptr @__glewBufferData, align 8, !tbaa !5
  %93 = load ptr, ptr %29, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ImDrawList, ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds %struct.ImVector.1, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !24
  %97 = sext i32 %96 to i64
  %98 = mul nsw i64 %97, 20
  %99 = load ptr, ptr %29, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.ImDrawList, ptr %99, i32 0, i32 2
  %101 = getelementptr inbounds %struct.ImVector.1, ptr %100, i32 0, i32 2
  %102 = load ptr, ptr %101, align 8, !tbaa !34
  call void %92(i32 noundef 34962, i64 noundef %98, ptr noundef %102, i32 noundef 35040)
  %103 = load ptr, ptr @__glewBufferData, align 8, !tbaa !5
  %104 = load ptr, ptr %29, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ImDrawList, ptr %104, i32 0, i32 1
  %106 = getelementptr inbounds %struct.ImVector, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 8, !tbaa !35
  %108 = sext i32 %107 to i64
  %109 = mul nsw i64 %108, 2
  %110 = load ptr, ptr %29, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ImDrawList, ptr %110, i32 0, i32 1
  %112 = getelementptr inbounds %struct.ImVector, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !36
  call void %103(i32 noundef 34963, i64 noundef %109, ptr noundef %113, i32 noundef 35040)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !16
  br label %114

114:                                              ; preds = %268, %84
  %115 = load i32, ptr %30, align 4, !tbaa !16
  %116 = load ptr, ptr %29, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ImDrawList, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %struct.ImVector.0, ptr %117, i32 0, i32 0
  %119 = load i32, ptr %118, align 8, !tbaa !37
  %120 = icmp slt i32 %115, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %114
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %271

122:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %123 = load ptr, ptr %29, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.ImDrawList, ptr %123, i32 0, i32 0
  %125 = load i32, ptr %30, align 4, !tbaa !16
  %126 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %124, i32 noundef %125)
  store ptr %126, ptr %31, align 8, !tbaa !5
  %127 = load ptr, ptr %31, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.ImDrawCmd, ptr %127, i32 0, i32 5
  %129 = load ptr, ptr %128, align 8, !tbaa !38
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %148

131:                                              ; preds = %122
  %132 = load ptr, ptr %31, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.ImDrawCmd, ptr %132, i32 0, i32 5
  %134 = load ptr, ptr %133, align 8, !tbaa !38
  %135 = icmp eq ptr %134, inttoptr (i64 -1 to ptr)
  br i1 %135, label %136, label %141

136:                                              ; preds = %131
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = load i32, ptr %3, align 4, !tbaa !16
  %139 = load i32, ptr %4, align 4, !tbaa !16
  %140 = load i32, ptr %25, align 4, !tbaa !16
  call void @_ZL34ImGui_ImplOpenGL3_SetupRenderStateP10ImDrawDataiij(ptr noundef %137, i32 noundef %138, i32 noundef %139, i32 noundef %140)
  br label %147

141:                                              ; preds = %131
  %142 = load ptr, ptr %31, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ImDrawCmd, ptr %142, i32 0, i32 5
  %144 = load ptr, ptr %143, align 8, !tbaa !38
  %145 = load ptr, ptr %29, align 8, !tbaa !5
  %146 = load ptr, ptr %31, align 8, !tbaa !5
  call void %144(ptr noundef %145, ptr noundef %146)
  br label %147

147:                                              ; preds = %141, %136
  br label %267

148:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #6
  call void @_ZN6ImVec4C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %32)
  %149 = load ptr, ptr %31, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.ImDrawCmd, ptr %149, i32 0, i32 1
  %151 = getelementptr inbounds %struct.ImVec4, ptr %150, i32 0, i32 0
  %152 = load float, ptr %151, align 4, !tbaa !41
  %153 = getelementptr inbounds %struct.ImVec2, ptr %26, i32 0, i32 0
  %154 = load float, ptr %153, align 4, !tbaa !42
  %155 = fsub float %152, %154
  %156 = getelementptr inbounds %struct.ImVec2, ptr %27, i32 0, i32 0
  %157 = load float, ptr %156, align 4, !tbaa !42
  %158 = fmul float %155, %157
  %159 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 0
  store float %158, ptr %159, align 4, !tbaa !43
  %160 = load ptr, ptr %31, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.ImDrawCmd, ptr %160, i32 0, i32 1
  %162 = getelementptr inbounds %struct.ImVec4, ptr %161, i32 0, i32 1
  %163 = load float, ptr %162, align 4, !tbaa !44
  %164 = getelementptr inbounds %struct.ImVec2, ptr %26, i32 0, i32 1
  %165 = load float, ptr %164, align 4, !tbaa !45
  %166 = fsub float %163, %165
  %167 = getelementptr inbounds %struct.ImVec2, ptr %27, i32 0, i32 1
  %168 = load float, ptr %167, align 4, !tbaa !45
  %169 = fmul float %166, %168
  %170 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 1
  store float %169, ptr %170, align 4, !tbaa !46
  %171 = load ptr, ptr %31, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.ImDrawCmd, ptr %171, i32 0, i32 1
  %173 = getelementptr inbounds %struct.ImVec4, ptr %172, i32 0, i32 2
  %174 = load float, ptr %173, align 4, !tbaa !47
  %175 = getelementptr inbounds %struct.ImVec2, ptr %26, i32 0, i32 0
  %176 = load float, ptr %175, align 4, !tbaa !42
  %177 = fsub float %174, %176
  %178 = getelementptr inbounds %struct.ImVec2, ptr %27, i32 0, i32 0
  %179 = load float, ptr %178, align 4, !tbaa !42
  %180 = fmul float %177, %179
  %181 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 2
  store float %180, ptr %181, align 4, !tbaa !48
  %182 = load ptr, ptr %31, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.ImDrawCmd, ptr %182, i32 0, i32 1
  %184 = getelementptr inbounds %struct.ImVec4, ptr %183, i32 0, i32 3
  %185 = load float, ptr %184, align 4, !tbaa !49
  %186 = getelementptr inbounds %struct.ImVec2, ptr %26, i32 0, i32 1
  %187 = load float, ptr %186, align 4, !tbaa !45
  %188 = fsub float %185, %187
  %189 = getelementptr inbounds %struct.ImVec2, ptr %27, i32 0, i32 1
  %190 = load float, ptr %189, align 4, !tbaa !45
  %191 = fmul float %188, %190
  %192 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 3
  store float %191, ptr %192, align 4, !tbaa !50
  %193 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 0
  %194 = load float, ptr %193, align 4, !tbaa !43
  %195 = load i32, ptr %3, align 4, !tbaa !16
  %196 = sitofp i32 %195 to float
  %197 = fcmp olt float %194, %196
  br i1 %197, label %198, label %266

198:                                              ; preds = %148
  %199 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 1
  %200 = load float, ptr %199, align 4, !tbaa !46
  %201 = load i32, ptr %4, align 4, !tbaa !16
  %202 = sitofp i32 %201 to float
  %203 = fcmp olt float %200, %202
  br i1 %203, label %204, label %266

204:                                              ; preds = %198
  %205 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 2
  %206 = load float, ptr %205, align 4, !tbaa !48
  %207 = fcmp oge float %206, 0.000000e+00
  br i1 %207, label %208, label %266

208:                                              ; preds = %204
  %209 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 3
  %210 = load float, ptr %209, align 4, !tbaa !50
  %211 = fcmp oge float %210, 0.000000e+00
  br i1 %211, label %212, label %266

212:                                              ; preds = %208
  %213 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 0
  %214 = load float, ptr %213, align 4, !tbaa !43
  %215 = fptosi float %214 to i32
  %216 = load i32, ptr %4, align 4, !tbaa !16
  %217 = sitofp i32 %216 to float
  %218 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 3
  %219 = load float, ptr %218, align 4, !tbaa !50
  %220 = fsub float %217, %219
  %221 = fptosi float %220 to i32
  %222 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 2
  %223 = load float, ptr %222, align 4, !tbaa !48
  %224 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 0
  %225 = load float, ptr %224, align 4, !tbaa !43
  %226 = fsub float %223, %225
  %227 = fptosi float %226 to i32
  %228 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 3
  %229 = load float, ptr %228, align 4, !tbaa !50
  %230 = getelementptr inbounds %struct.ImVec4, ptr %32, i32 0, i32 1
  %231 = load float, ptr %230, align 4, !tbaa !46
  %232 = fsub float %229, %231
  %233 = fptosi float %232 to i32
  call void @glScissor(i32 noundef %215, i32 noundef %221, i32 noundef %227, i32 noundef %233)
  %234 = load ptr, ptr %31, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.ImDrawCmd, ptr %234, i32 0, i32 2
  %236 = load ptr, ptr %235, align 8, !tbaa !51
  %237 = ptrtoint ptr %236 to i64
  %238 = trunc i64 %237 to i32
  call void @glBindTexture(i32 noundef 3553, i32 noundef %238)
  %239 = load i32, ptr @_ZL11g_GlVersion, align 4, !tbaa !16
  %240 = icmp uge i32 %239, 320
  br i1 %240, label %241, label %255

241:                                              ; preds = %212
  %242 = load ptr, ptr @__glewDrawElementsBaseVertex, align 8, !tbaa !5
  %243 = load ptr, ptr %31, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.ImDrawCmd, ptr %243, i32 0, i32 0
  %245 = load i32, ptr %244, align 8, !tbaa !52
  %246 = load ptr, ptr %31, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.ImDrawCmd, ptr %246, i32 0, i32 4
  %248 = load i32, ptr %247, align 4, !tbaa !53
  %249 = zext i32 %248 to i64
  %250 = mul i64 %249, 2
  %251 = inttoptr i64 %250 to ptr
  %252 = load ptr, ptr %31, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.ImDrawCmd, ptr %252, i32 0, i32 3
  %254 = load i32, ptr %253, align 8, !tbaa !54
  call void %242(i32 noundef 4, i32 noundef %245, i32 noundef 5123, ptr noundef %251, i32 noundef %254)
  br label %265

255:                                              ; preds = %212
  %256 = load ptr, ptr %31, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.ImDrawCmd, ptr %256, i32 0, i32 0
  %258 = load i32, ptr %257, align 8, !tbaa !52
  %259 = load ptr, ptr %31, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.ImDrawCmd, ptr %259, i32 0, i32 4
  %261 = load i32, ptr %260, align 4, !tbaa !53
  %262 = zext i32 %261 to i64
  %263 = mul i64 %262, 2
  %264 = inttoptr i64 %263 to ptr
  call void @glDrawElements(i32 noundef 4, i32 noundef %258, i32 noundef 5123, ptr noundef %264)
  br label %265

265:                                              ; preds = %255, %241
  br label %266

266:                                              ; preds = %265, %208, %204, %198, %148
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  br label %267

267:                                              ; preds = %266, %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %268

268:                                              ; preds = %267
  %269 = load i32, ptr %30, align 4, !tbaa !16
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %30, align 4, !tbaa !16
  br label %114, !llvm.loop !55

271:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %272

272:                                              ; preds = %271
  %273 = load i32, ptr %28, align 4, !tbaa !16
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %28, align 4, !tbaa !16
  br label %77, !llvm.loop !57

275:                                              ; preds = %83
  %276 = load ptr, ptr @__glewDeleteVertexArrays, align 8, !tbaa !5
  call void %276(i32 noundef 1, ptr noundef %25)
  %277 = load ptr, ptr @__glewUseProgram, align 8, !tbaa !5
  %278 = load i32, ptr %7, align 4, !tbaa !16
  call void %277(i32 noundef %278)
  %279 = load i32, ptr %8, align 4, !tbaa !16
  call void @glBindTexture(i32 noundef 3553, i32 noundef %279)
  %280 = load ptr, ptr @__glewBindSampler, align 8, !tbaa !5
  %281 = load i32, ptr %9, align 4, !tbaa !16
  call void %280(i32 noundef 0, i32 noundef %281)
  %282 = load ptr, ptr @__glewActiveTexture, align 8, !tbaa !5
  %283 = load i32, ptr %6, align 4, !tbaa !16
  call void %282(i32 noundef %283)
  %284 = load ptr, ptr @__glewBindVertexArray, align 8, !tbaa !5
  %285 = load i32, ptr %11, align 4, !tbaa !16
  call void %284(i32 noundef %285)
  %286 = load ptr, ptr @__glewBindBuffer, align 8, !tbaa !5
  %287 = load i32, ptr %10, align 4, !tbaa !16
  call void %286(i32 noundef 34962, i32 noundef %287)
  %288 = load ptr, ptr @__glewBlendEquationSeparate, align 8, !tbaa !5
  %289 = load i32, ptr %19, align 4, !tbaa !16
  %290 = load i32, ptr %20, align 4, !tbaa !16
  call void %288(i32 noundef %289, i32 noundef %290)
  %291 = load ptr, ptr @__glewBlendFuncSeparate, align 8, !tbaa !5
  %292 = load i32, ptr %15, align 4, !tbaa !16
  %293 = load i32, ptr %16, align 4, !tbaa !16
  %294 = load i32, ptr %17, align 4, !tbaa !16
  %295 = load i32, ptr %18, align 4, !tbaa !16
  call void %291(i32 noundef %292, i32 noundef %293, i32 noundef %294, i32 noundef %295)
  %296 = load i8, ptr %21, align 1, !tbaa !19
  %297 = icmp ne i8 %296, 0
  br i1 %297, label %298, label %299

298:                                              ; preds = %275
  call void @glEnable(i32 noundef 3042)
  br label %300

299:                                              ; preds = %275
  call void @glDisable(i32 noundef 3042)
  br label %300

300:                                              ; preds = %299, %298
  %301 = load i8, ptr %22, align 1, !tbaa !19
  %302 = icmp ne i8 %301, 0
  br i1 %302, label %303, label %304

303:                                              ; preds = %300
  call void @glEnable(i32 noundef 2884)
  br label %305

304:                                              ; preds = %300
  call void @glDisable(i32 noundef 2884)
  br label %305

305:                                              ; preds = %304, %303
  %306 = load i8, ptr %23, align 1, !tbaa !19
  %307 = icmp ne i8 %306, 0
  br i1 %307, label %308, label %309

308:                                              ; preds = %305
  call void @glEnable(i32 noundef 2929)
  br label %310

309:                                              ; preds = %305
  call void @glDisable(i32 noundef 2929)
  br label %310

310:                                              ; preds = %309, %308
  %311 = load i8, ptr %24, align 1, !tbaa !19
  %312 = icmp ne i8 %311, 0
  br i1 %312, label %313, label %314

313:                                              ; preds = %310
  call void @glEnable(i32 noundef 3089)
  br label %315

314:                                              ; preds = %310
  call void @glDisable(i32 noundef 3089)
  br label %315

315:                                              ; preds = %314, %313
  %316 = getelementptr inbounds [2 x i32], ptr %12, i64 0, i64 0
  %317 = load i32, ptr %316, align 4, !tbaa !16
  call void @glPolygonMode(i32 noundef 1032, i32 noundef %317)
  %318 = getelementptr inbounds [4 x i32], ptr %13, i64 0, i64 0
  %319 = load i32, ptr %318, align 16, !tbaa !16
  %320 = getelementptr inbounds [4 x i32], ptr %13, i64 0, i64 1
  %321 = load i32, ptr %320, align 4, !tbaa !16
  %322 = getelementptr inbounds [4 x i32], ptr %13, i64 0, i64 2
  %323 = load i32, ptr %322, align 8, !tbaa !16
  %324 = getelementptr inbounds [4 x i32], ptr %13, i64 0, i64 3
  %325 = load i32, ptr %324, align 4, !tbaa !16
  call void @glViewport(i32 noundef %319, i32 noundef %321, i32 noundef %323, i32 noundef %325)
  %326 = getelementptr inbounds [4 x i32], ptr %14, i64 0, i64 0
  %327 = load i32, ptr %326, align 16, !tbaa !16
  %328 = getelementptr inbounds [4 x i32], ptr %14, i64 0, i64 1
  %329 = load i32, ptr %328, align 4, !tbaa !16
  %330 = getelementptr inbounds [4 x i32], ptr %14, i64 0, i64 2
  %331 = load i32, ptr %330, align 8, !tbaa !16
  %332 = getelementptr inbounds [4 x i32], ptr %14, i64 0, i64 3
  %333 = load i32, ptr %332, align 4, !tbaa !16
  call void @glScissor(i32 noundef %327, i32 noundef %329, i32 noundef %331, i32 noundef %333)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  store i32 0, ptr %5, align 4
  br label %334

334:                                              ; preds = %315, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  %335 = load i32, ptr %5, align 4
  switch i32 %335, label %337 [
    i32 0, label %336
    i32 1, label %336
  ]

336:                                              ; preds = %334, %334
  ret void

337:                                              ; preds = %334
  unreachable
}

declare zeroext i8 @glIsEnabled(i32 noundef) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #4 align 2

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

declare void @glScissor(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @glBindTexture(i32 noundef, i32 noundef) #1

declare void @glDrawElements(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #1

declare void @glEnable(i32 noundef) #1

declare void @glDisable(i32 noundef) #1

declare void @glPolygonMode(i32 noundef, i32 noundef) #1

declare void @glViewport(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !14, i64 36}
!10 = !{!"_ZTS10ImDrawData", !11, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !13, i64 28, !13, i64 36, !13, i64 44}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!10, !14, i64 44}
!16 = !{!12, !12, i64 0}
!17 = !{!10, !14, i64 40}
!18 = !{!10, !14, i64 48}
!19 = !{!7, !7, i64 0}
!20 = !{i64 0, i64 4, !21, i64 4, i64 4, !21}
!21 = !{!14, !14, i64 0}
!22 = !{!10, !12, i64 16}
!23 = !{!10, !6, i64 8}
!24 = !{!25, !12, i64 32}
!25 = !{!"_ZTS10ImDrawList", !26, i64 0, !27, i64 16, !28, i64 32, !12, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !12, i64 76, !6, i64 80, !6, i64 88, !29, i64 96, !30, i64 112, !31, i64 128, !32, i64 144}
!26 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !12, i64 0, !12, i64 4, !6, i64 8}
!27 = !{!"_ZTS8ImVectorItE", !12, i64 0, !12, i64 4, !6, i64 8}
!28 = !{!"_ZTS8ImVectorI10ImDrawVertE", !12, i64 0, !12, i64 4, !6, i64 8}
!29 = !{!"_ZTS8ImVectorI6ImVec4E", !12, i64 0, !12, i64 4, !6, i64 8}
!30 = !{!"_ZTS8ImVectorIPvE", !12, i64 0, !12, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorI6ImVec2E", !12, i64 0, !12, i64 4, !6, i64 8}
!32 = !{!"_ZTS18ImDrawListSplitter", !12, i64 0, !12, i64 4, !33, i64 8}
!33 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !12, i64 0, !12, i64 4, !6, i64 8}
!34 = !{!25, !6, i64 40}
!35 = !{!25, !12, i64 16}
!36 = !{!25, !6, i64 24}
!37 = !{!25, !12, i64 0}
!38 = !{!39, !6, i64 40}
!39 = !{!"_ZTS9ImDrawCmd", !12, i64 0, !40, i64 4, !6, i64 24, !12, i64 32, !12, i64 36, !6, i64 40, !6, i64 48}
!40 = !{!"_ZTS6ImVec4", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!41 = !{!39, !14, i64 4}
!42 = !{!13, !14, i64 0}
!43 = !{!40, !14, i64 0}
!44 = !{!39, !14, i64 8}
!45 = !{!13, !14, i64 4}
!46 = !{!40, !14, i64 4}
!47 = !{!39, !14, i64 12}
!48 = !{!40, !14, i64 8}
!49 = !{!39, !14, i64 16}
!50 = !{!40, !14, i64 12}
!51 = !{!39, !6, i64 24}
!52 = !{!39, !12, i64 0}
!53 = !{!39, !12, i64 36}
!54 = !{!39, !12, i64 32}
!55 = distinct !{!55, !56}
!56 = !{!"llvm.loop.mustprogress"}
!57 = distinct !{!57, !56}


; 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.ImVec4 = type { float, float, float, float }

@_ZL11g_GlVersion = external hidden local_unnamed_addr global i32, align 4
@__glewActiveTexture = external local_unnamed_addr global ptr, align 8
@__glewGenVertexArrays = external local_unnamed_addr global ptr, align 8
@__glewBufferData = external local_unnamed_addr global ptr, align 8
@__glewDrawElementsBaseVertex = external local_unnamed_addr global ptr, align 8
@__glewDeleteVertexArrays = external local_unnamed_addr global ptr, align 8
@__glewUseProgram = external local_unnamed_addr global ptr, align 8
@__glewBindSampler = external local_unnamed_addr global ptr, align 8
@__glewBindVertexArray = external local_unnamed_addr global ptr, align 8
@__glewBindBuffer = external local_unnamed_addr global ptr, align 8
@__glewBlendEquationSeparate = external local_unnamed_addr global ptr, align 8
@__glewBlendFuncSeparate = external local_unnamed_addr global ptr, align 8

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

declare void @glGetIntegerv(i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z32ImGui_ImplOpenGL3_RenderDrawDataP10ImDrawData(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca i32, align 4
  %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 [2 x i32], align 4
  %9 = alloca [4 x i32], align 16
  %10 = alloca [4 x i32], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.ImVec4, align 8
  %19 = getelementptr inbounds i8, ptr %0, i64 36
  %20 = getelementptr inbounds i8, ptr %0, i64 44
  %21 = load <2 x float>, ptr %19, align 4, !tbaa !5
  %22 = load <2 x float>, ptr %20, align 4, !tbaa !5
  %23 = fmul <2 x float> %21, %22
  %24 = fptosi <2 x float> %23 to <2 x i32>
  %25 = icmp slt <2 x i32> %24, <i32 1, i32 1>
  %26 = extractelement <2 x i1> %25, i64 0
  %27 = extractelement <2 x i1> %25, i64 1
  %or.cond = select i1 %26, i1 true, i1 %27
  br i1 %or.cond, label %179, label %28

28:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @glGetIntegerv(i32 noundef 34016, ptr noundef nonnull %2)
  %29 = load ptr, ptr @__glewActiveTexture, align 8, !tbaa !9
  call void %29(i32 noundef 33984)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @glGetIntegerv(i32 noundef 35725, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @glGetIntegerv(i32 noundef 32873, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @glGetIntegerv(i32 noundef 35097, ptr noundef nonnull %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @glGetIntegerv(i32 noundef 34964, ptr noundef nonnull %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @glGetIntegerv(i32 noundef 34229, ptr noundef nonnull %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @glGetIntegerv(i32 noundef 2880, ptr noundef nonnull %8)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @glGetIntegerv(i32 noundef 2978, ptr noundef nonnull %9)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  call void @glGetIntegerv(i32 noundef 3088, ptr noundef nonnull %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  call void @glGetIntegerv(i32 noundef 32969, ptr noundef nonnull %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  call void @glGetIntegerv(i32 noundef 32968, ptr noundef nonnull %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  call void @glGetIntegerv(i32 noundef 32971, ptr noundef nonnull %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  call void @glGetIntegerv(i32 noundef 32970, ptr noundef nonnull %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  call void @glGetIntegerv(i32 noundef 32777, ptr noundef nonnull %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  call void @glGetIntegerv(i32 noundef 34877, ptr noundef nonnull %16)
  %30 = call zeroext i8 @glIsEnabled(i32 noundef 3042)
  %31 = call zeroext i8 @glIsEnabled(i32 noundef 2884)
  %32 = call zeroext i8 @glIsEnabled(i32 noundef 2929)
  %33 = call zeroext i8 @glIsEnabled(i32 noundef 3089)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #5
  store i32 0, ptr %17, align 4, !tbaa !11
  %34 = load ptr, ptr @__glewGenVertexArrays, align 8, !tbaa !9
  call void %34(i32 noundef 1, ptr noundef nonnull %17)
  %35 = load i32, ptr %17, align 4, !tbaa !11
  %36 = extractelement <2 x i32> %24, i64 0
  %37 = extractelement <2 x i32> %24, i64 1
  call void @_ZL34ImGui_ImplOpenGL3_SetupRenderStateP10ImDrawDataiij(ptr noundef nonnull %0, i32 noundef %36, i32 noundef %37, i32 noundef %35)
  %38 = getelementptr inbounds i8, ptr %0, i64 28
  %39 = load <2 x float>, ptr %38, align 4, !tbaa !5
  %40 = load <2 x float>, ptr %20, align 4, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %0, i64 16
  %42 = load i32, ptr %41, align 8, !tbaa !13
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph78, label %._crit_edge79

.lr.ph78:                                         ; preds = %28
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  %45 = getelementptr inbounds i8, ptr %18, i64 8
  %46 = uitofp nneg i32 %36 to float
  %47 = uitofp nneg i32 %37 to float
  br label %68

._crit_edge79:                                    ; preds = %._crit_edge, %28
  %48 = load ptr, ptr @__glewDeleteVertexArrays, align 8, !tbaa !9
  call void %48(i32 noundef 1, ptr noundef nonnull %17)
  %49 = load ptr, ptr @__glewUseProgram, align 8, !tbaa !9
  %50 = load i32, ptr %3, align 4, !tbaa !11
  call void %49(i32 noundef %50)
  %51 = load i32, ptr %4, align 4, !tbaa !11
  call void @glBindTexture(i32 noundef 3553, i32 noundef %51)
  %52 = load ptr, ptr @__glewBindSampler, align 8, !tbaa !9
  %53 = load i32, ptr %5, align 4, !tbaa !11
  call void %52(i32 noundef 0, i32 noundef %53)
  %54 = load ptr, ptr @__glewActiveTexture, align 8, !tbaa !9
  %55 = load i32, ptr %2, align 4, !tbaa !11
  call void %54(i32 noundef %55)
  %56 = load ptr, ptr @__glewBindVertexArray, align 8, !tbaa !9
  %57 = load i32, ptr %7, align 4, !tbaa !11
  call void %56(i32 noundef %57)
  %58 = load ptr, ptr @__glewBindBuffer, align 8, !tbaa !9
  %59 = load i32, ptr %6, align 4, !tbaa !11
  call void %58(i32 noundef 34962, i32 noundef %59)
  %60 = load ptr, ptr @__glewBlendEquationSeparate, align 8, !tbaa !9
  %61 = load i32, ptr %15, align 4, !tbaa !11
  %62 = load i32, ptr %16, align 4, !tbaa !11
  call void %60(i32 noundef %61, i32 noundef %62)
  %63 = load ptr, ptr @__glewBlendFuncSeparate, align 8, !tbaa !9
  %64 = load i32, ptr %11, align 4, !tbaa !11
  %65 = load i32, ptr %12, align 4, !tbaa !11
  %66 = load i32, ptr %13, align 4, !tbaa !11
  %67 = load i32, ptr %14, align 4, !tbaa !11
  call void %63(i32 noundef %64, i32 noundef %65, i32 noundef %66, i32 noundef %67)
  %.not = icmp eq i8 %30, 0
  br i1 %.not, label %153, label %152

68:                                               ; preds = %.lr.ph78, %._crit_edge
  %indvars.iv = phi i64 [ 0, %.lr.ph78 ], [ %indvars.iv.next, %._crit_edge ]
  %69 = load ptr, ptr %44, align 8, !tbaa !17
  %70 = getelementptr inbounds ptr, ptr %69, i64 %indvars.iv
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = load ptr, ptr @__glewBufferData, align 8, !tbaa !9
  %73 = getelementptr inbounds i8, ptr %71, i64 32
  %74 = load i32, ptr %73, align 8, !tbaa !18
  %75 = sext i32 %74 to i64
  %76 = mul nsw i64 %75, 20
  %77 = getelementptr inbounds i8, ptr %71, i64 40
  %78 = load ptr, ptr %77, align 8, !tbaa !28
  call void %72(i32 noundef 34962, i64 noundef %76, ptr noundef %78, i32 noundef 35040)
  %79 = load ptr, ptr @__glewBufferData, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %71, i64 16
  %81 = load i32, ptr %80, align 8, !tbaa !29
  %82 = sext i32 %81 to i64
  %83 = shl nsw i64 %82, 1
  %84 = getelementptr inbounds i8, ptr %71, i64 24
  %85 = load ptr, ptr %84, align 8, !tbaa !30
  call void %79(i32 noundef 34963, i64 noundef %83, ptr noundef %85, i32 noundef 35040)
  %86 = load i32, ptr %71, align 8, !tbaa !31
  %87 = icmp sgt i32 %86, 0
  br i1 %87, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %148, %68
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %88 = load i32, ptr %41, align 8, !tbaa !13
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next, %89
  br i1 %90, label %68, label %._crit_edge79, !llvm.loop !32

.lr.ph:                                           ; preds = %68, %148
  %.075 = phi i32 [ %149, %148 ], [ 0, %68 ]
  %91 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %71, i32 noundef %.075)
  %92 = getelementptr inbounds i8, ptr %91, i64 40
  %93 = load ptr, ptr %92, align 8, !tbaa !34
  %magicptr = ptrtoint ptr %93 to i64
  switch i64 %magicptr, label %96 [
    i64 0, label %97
    i64 -1, label %94
  ]

94:                                               ; preds = %.lr.ph
  %95 = load i32, ptr %17, align 4, !tbaa !11
  call void @_ZL34ImGui_ImplOpenGL3_SetupRenderStateP10ImDrawDataiij(ptr noundef %0, i32 noundef %36, i32 noundef %37, i32 noundef %95)
  br label %148

96:                                               ; preds = %.lr.ph
  call void %93(ptr noundef nonnull %71, ptr noundef nonnull %91)
  br label %148

97:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #5
  call void @_ZN6ImVec4C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %18)
  %98 = getelementptr inbounds i8, ptr %91, i64 4
  %99 = load <2 x float>, ptr %98, align 4, !tbaa !5
  %100 = fsub <2 x float> %99, %39
  %101 = fmul <2 x float> %40, %100
  store <2 x float> %101, ptr %18, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %91, i64 12
  %103 = load <2 x float>, ptr %102, align 4, !tbaa !5
  %104 = fsub <2 x float> %103, %39
  %105 = fmul <2 x float> %40, %104
  store <2 x float> %105, ptr %45, align 8, !tbaa !5
  %106 = extractelement <2 x float> %101, i64 0
  %107 = fcmp olt float %106, %46
  br i1 %107, label %108, label %147

108:                                              ; preds = %97
  %109 = extractelement <2 x float> %101, i64 1
  %110 = fcmp olt float %109, %47
  %111 = fcmp oge <2 x float> %105, zeroinitializer
  %112 = extractelement <2 x i1> %111, i64 0
  %or.cond4 = select i1 %110, i1 %112, i1 false
  %113 = extractelement <2 x i1> %111, i64 1
  %or.cond7 = select i1 %or.cond4, i1 %113, i1 false
  br i1 %or.cond7, label %114, label %147

114:                                              ; preds = %108
  %115 = fptosi float %106 to i32
  %116 = extractelement <2 x float> %105, i64 1
  %117 = fsub float %47, %116
  %118 = fptosi float %117 to i32
  %119 = fsub <2 x float> %105, %101
  %120 = extractelement <2 x float> %119, i64 0
  %121 = fptosi float %120 to i32
  %122 = fsub float %116, %109
  %123 = fptosi float %122 to i32
  call void @glScissor(i32 noundef %115, i32 noundef %118, i32 noundef %121, i32 noundef %123)
  %124 = getelementptr inbounds i8, ptr %91, i64 24
  %125 = load ptr, ptr %124, align 8, !tbaa !37
  %126 = ptrtoint ptr %125 to i64
  %127 = trunc i64 %126 to i32
  call void @glBindTexture(i32 noundef 3553, i32 noundef %127)
  %128 = load i32, ptr @_ZL11g_GlVersion, align 4, !tbaa !11
  %129 = icmp ugt i32 %128, 319
  br i1 %129, label %130, label %140

130:                                              ; preds = %114
  %131 = load ptr, ptr @__glewDrawElementsBaseVertex, align 8, !tbaa !9
  %132 = load i32, ptr %91, align 8, !tbaa !38
  %133 = getelementptr inbounds i8, ptr %91, i64 36
  %134 = load i32, ptr %133, align 4, !tbaa !39
  %135 = zext i32 %134 to i64
  %136 = shl nuw nsw i64 %135, 1
  %137 = inttoptr i64 %136 to ptr
  %138 = getelementptr inbounds i8, ptr %91, i64 32
  %139 = load i32, ptr %138, align 8, !tbaa !40
  call void %131(i32 noundef 4, i32 noundef %132, i32 noundef 5123, ptr noundef %137, i32 noundef %139)
  br label %147

140:                                              ; preds = %114
  %141 = load i32, ptr %91, align 8, !tbaa !38
  %142 = getelementptr inbounds i8, ptr %91, i64 36
  %143 = load i32, ptr %142, align 4, !tbaa !39
  %144 = zext i32 %143 to i64
  %145 = shl nuw nsw i64 %144, 1
  %146 = inttoptr i64 %145 to ptr
  call void @glDrawElements(i32 noundef 4, i32 noundef %141, i32 noundef 5123, ptr noundef %146)
  br label %147

147:                                              ; preds = %130, %140, %108, %97
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  br label %148

148:                                              ; preds = %94, %96, %147
  %149 = add nuw nsw i32 %.075, 1
  %150 = load i32, ptr %71, align 8, !tbaa !31
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %.lr.ph, label %._crit_edge, !llvm.loop !41

152:                                              ; preds = %._crit_edge79
  call void @glEnable(i32 noundef 3042)
  br label %154

153:                                              ; preds = %._crit_edge79
  call void @glDisable(i32 noundef 3042)
  br label %154

154:                                              ; preds = %153, %152
  %.not71 = icmp eq i8 %31, 0
  br i1 %.not71, label %156, label %155

155:                                              ; preds = %154
  call void @glEnable(i32 noundef 2884)
  br label %157

156:                                              ; preds = %154
  call void @glDisable(i32 noundef 2884)
  br label %157

157:                                              ; preds = %156, %155
  %.not72 = icmp eq i8 %32, 0
  br i1 %.not72, label %159, label %158

158:                                              ; preds = %157
  call void @glEnable(i32 noundef 2929)
  br label %160

159:                                              ; preds = %157
  call void @glDisable(i32 noundef 2929)
  br label %160

160:                                              ; preds = %159, %158
  %.not73 = icmp eq i8 %33, 0
  br i1 %.not73, label %162, label %161

161:                                              ; preds = %160
  call void @glEnable(i32 noundef 3089)
  br label %163

162:                                              ; preds = %160
  call void @glDisable(i32 noundef 3089)
  br label %163

163:                                              ; preds = %162, %161
  %164 = load i32, ptr %8, align 4, !tbaa !11
  call void @glPolygonMode(i32 noundef 1032, i32 noundef %164)
  %165 = load i32, ptr %9, align 16, !tbaa !11
  %166 = getelementptr inbounds i8, ptr %9, i64 4
  %167 = load i32, ptr %166, align 4, !tbaa !11
  %168 = getelementptr inbounds i8, ptr %9, i64 8
  %169 = load i32, ptr %168, align 8, !tbaa !11
  %170 = getelementptr inbounds i8, ptr %9, i64 12
  %171 = load i32, ptr %170, align 4, !tbaa !11
  call void @glViewport(i32 noundef %165, i32 noundef %167, i32 noundef %169, i32 noundef %171)
  %172 = load i32, ptr %10, align 16, !tbaa !11
  %173 = getelementptr inbounds i8, ptr %10, i64 4
  %174 = load i32, ptr %173, align 4, !tbaa !11
  %175 = getelementptr inbounds i8, ptr %10, i64 8
  %176 = load i32, ptr %175, align 8, !tbaa !11
  %177 = getelementptr inbounds i8, ptr %10, i64 12
  %178 = load i32, ptr %177, align 4, !tbaa !11
  call void @glScissor(i32 noundef %172, i32 noundef %174, i32 noundef %176, i32 noundef %178)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %179

179:                                              ; preds = %1, %163
  ret void
}

declare zeroext i8 @glIsEnabled(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

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

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

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

declare void @glDrawElements(i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @glEnable(i32 noundef) local_unnamed_addr #1

declare void @glDisable(i32 noundef) local_unnamed_addr #1

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"_ZTS10ImDrawData", !15, i64 0, !10, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !16, i64 28, !16, i64 36, !16, i64 44}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTS6ImVec2", !6, i64 0, !6, i64 4}
!17 = !{!14, !10, i64 8}
!18 = !{!19, !12, i64 32}
!19 = !{!"_ZTS10ImDrawList", !20, i64 0, !21, i64 16, !22, i64 32, !12, i64 48, !10, i64 56, !10, i64 64, !12, i64 72, !12, i64 76, !10, i64 80, !10, i64 88, !23, i64 96, !24, i64 112, !25, i64 128, !26, i64 144}
!20 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !12, i64 0, !12, i64 4, !10, i64 8}
!21 = !{!"_ZTS8ImVectorItE", !12, i64 0, !12, i64 4, !10, i64 8}
!22 = !{!"_ZTS8ImVectorI10ImDrawVertE", !12, i64 0, !12, i64 4, !10, i64 8}
!23 = !{!"_ZTS8ImVectorI6ImVec4E", !12, i64 0, !12, i64 4, !10, i64 8}
!24 = !{!"_ZTS8ImVectorIPvE", !12, i64 0, !12, i64 4, !10, i64 8}
!25 = !{!"_ZTS8ImVectorI6ImVec2E", !12, i64 0, !12, i64 4, !10, i64 8}
!26 = !{!"_ZTS18ImDrawListSplitter", !12, i64 0, !12, i64 4, !27, i64 8}
!27 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !12, i64 0, !12, i64 4, !10, i64 8}
!28 = !{!19, !10, i64 40}
!29 = !{!19, !12, i64 16}
!30 = !{!19, !10, i64 24}
!31 = !{!19, !12, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!35, !10, i64 40}
!35 = !{!"_ZTS9ImDrawCmd", !12, i64 0, !36, i64 4, !10, i64 24, !12, i64 32, !12, i64 36, !10, i64 40, !10, i64 48}
!36 = !{!"_ZTS6ImVec4", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!37 = !{!35, !10, i64 24}
!38 = !{!35, !12, i64 0}
!39 = !{!35, !12, i64 36}
!40 = !{!35, !12, i64 32}
!41 = distinct !{!41, !33}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,VectorCombinePass