; LLVM IR from erincatto/box2d-lite :: samples/imgui_impl_opengl2.ll (Z32ImGui_ImplOpenGL2_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, [4 x i8] }>
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, [21 x i32], float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, i8, i8, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, [5 x i8], float, float, i8, i8, i8, i8, [512 x i8], [21 x float], i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x float], [5 x float], [5 x %struct.ImVec2], [5 x float], [512 x float], [512 x float], [21 x float], [21 x float], %struct.ImVector }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImDrawList = type { %struct.ImVector.0, %struct.ImVector, %struct.ImVector.1, i32, ptr, ptr, i32, ptr, ptr, %struct.ImVector.2, %struct.ImVector.3, %struct.ImVector.4, i32, i32, %struct.ImVector.5 }
%struct.ImVector.0 = 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.ImVector.5 = type { i32, i32, ptr }
%struct.ImDrawVert = type { %struct.ImVec2, %struct.ImVec2, i32 }
%struct.ImDrawCmd = type { i32, %struct.ImVec4, ptr, ptr, ptr }

@glad_glGetIntegerv = external global ptr, align 8
@glad_glPushAttrib = external global ptr, align 8
@glad_glEnable = external global ptr, align 8
@glad_glBlendFunc = external global ptr, align 8
@glad_glDisable = external global ptr, align 8
@glad_glEnableClientState = external global ptr, align 8
@glad_glPolygonMode = external global ptr, align 8
@glad_glViewport = external global ptr, align 8
@glad_glMatrixMode = external global ptr, align 8
@glad_glPushMatrix = external global ptr, align 8
@glad_glLoadIdentity = external global ptr, align 8
@glad_glOrtho = external global ptr, align 8
@glad_glVertexPointer = external global ptr, align 8
@glad_glTexCoordPointer = external global ptr, align 8
@glad_glColorPointer = external global ptr, align 8
@glad_glScissor = external global ptr, align 8
@glad_glBindTexture = external global ptr, align 8
@glad_glDrawElements = external global ptr, align 8
@glad_glDisableClientState = external global ptr, align 8
@glad_glPopMatrix = external global ptr, align 8
@glad_glPopAttrib = 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 noundef nonnull align 8 dereferenceable(5448) ptr @_ZN5ImGui5GetIOEv() #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_ImplOpenGL2_RenderDrawDataP10ImDrawData(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %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 %struct.ImVec2, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %struct.ImVec4, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %19 = call noundef nonnull align 8 dereferenceable(5448) ptr @_ZN5ImGui5GetIOEv()
  store ptr %19, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.ImDrawData, ptr %20, i32 0, i32 7
  %22 = getelementptr inbounds %struct.ImVec2, ptr %21, i32 0, i32 0
  %23 = load float, ptr %22, align 4, !tbaa !9
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ImGuiIO, ptr %24, i32 0, i32 18
  %26 = getelementptr inbounds %struct.ImVec2, ptr %25, i32 0, i32 0
  %27 = load float, ptr %26, align 8, !tbaa !15
  %28 = fmul float %23, %27
  %29 = fptosi float %28 to i32
  store i32 %29, ptr %4, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.ImDrawData, ptr %30, i32 0, i32 7
  %32 = getelementptr inbounds %struct.ImVec2, ptr %31, i32 0, i32 1
  %33 = load float, ptr %32, align 4, !tbaa !19
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ImGuiIO, ptr %34, i32 0, i32 18
  %36 = getelementptr inbounds %struct.ImVec2, ptr %35, i32 0, i32 1
  %37 = load float, ptr %36, align 4, !tbaa !20
  %38 = fmul float %33, %37
  %39 = fptosi float %38 to i32
  store i32 %39, ptr %5, align 4, !tbaa !18
  %40 = load i32, ptr %4, align 4, !tbaa !18
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %45, label %42

42:                                               ; preds = %1
  %43 = load i32, ptr %5, align 4, !tbaa !18
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %42, %1
  store i32 1, ptr %6, align 4
  br label %299

46:                                               ; preds = %42
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ImGuiIO, ptr %48, i32 0, i32 18
  call void @_ZN10ImDrawData14ScaleClipRectsERK6ImVec2(ptr noundef nonnull align 8 dereferenceable(44) %47, ptr noundef nonnull align 4 dereferenceable(8) %49)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %50 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !5
  call void %50(i32 noundef 32873, ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %51 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !5
  %52 = getelementptr inbounds [2 x i32], ptr %8, i64 0, i64 0
  call void %51(i32 noundef 2880, ptr noundef %52)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %53 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !5
  %54 = getelementptr inbounds [4 x i32], ptr %9, i64 0, i64 0
  call void %53(i32 noundef 2978, ptr noundef %54)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %55 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !5
  %56 = getelementptr inbounds [4 x i32], ptr %10, i64 0, i64 0
  call void %55(i32 noundef 3088, ptr noundef %56)
  %57 = load ptr, ptr @glad_glPushAttrib, align 8, !tbaa !5
  call void %57(i32 noundef 28672)
  %58 = load ptr, ptr @glad_glEnable, align 8, !tbaa !5
  call void %58(i32 noundef 3042)
  %59 = load ptr, ptr @glad_glBlendFunc, align 8, !tbaa !5
  call void %59(i32 noundef 770, i32 noundef 771)
  %60 = load ptr, ptr @glad_glDisable, align 8, !tbaa !5
  call void %60(i32 noundef 2884)
  %61 = load ptr, ptr @glad_glDisable, align 8, !tbaa !5
  call void %61(i32 noundef 2929)
  %62 = load ptr, ptr @glad_glDisable, align 8, !tbaa !5
  call void %62(i32 noundef 2896)
  %63 = load ptr, ptr @glad_glDisable, align 8, !tbaa !5
  call void %63(i32 noundef 2903)
  %64 = load ptr, ptr @glad_glEnable, align 8, !tbaa !5
  call void %64(i32 noundef 3089)
  %65 = load ptr, ptr @glad_glEnableClientState, align 8, !tbaa !5
  call void %65(i32 noundef 32884)
  %66 = load ptr, ptr @glad_glEnableClientState, align 8, !tbaa !5
  call void %66(i32 noundef 32888)
  %67 = load ptr, ptr @glad_glEnableClientState, align 8, !tbaa !5
  call void %67(i32 noundef 32886)
  %68 = load ptr, ptr @glad_glEnable, align 8, !tbaa !5
  call void %68(i32 noundef 3553)
  %69 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !5
  call void %69(i32 noundef 1032, i32 noundef 6914)
  %70 = load ptr, ptr @glad_glViewport, align 8, !tbaa !5
  %71 = load i32, ptr %4, align 4, !tbaa !18
  %72 = load i32, ptr %5, align 4, !tbaa !18
  call void %70(i32 noundef 0, i32 noundef 0, i32 noundef %71, i32 noundef %72)
  %73 = load ptr, ptr @glad_glMatrixMode, align 8, !tbaa !5
  call void %73(i32 noundef 5889)
  %74 = load ptr, ptr @glad_glPushMatrix, align 8, !tbaa !5
  call void %74()
  %75 = load ptr, ptr @glad_glLoadIdentity, align 8, !tbaa !5
  call void %75()
  %76 = load ptr, ptr @glad_glOrtho, align 8, !tbaa !5
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ImDrawData, ptr %77, i32 0, i32 6
  %79 = getelementptr inbounds %struct.ImVec2, ptr %78, i32 0, i32 0
  %80 = load float, ptr %79, align 4, !tbaa !21
  %81 = fpext float %80 to double
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ImDrawData, ptr %82, i32 0, i32 6
  %84 = getelementptr inbounds %struct.ImVec2, ptr %83, i32 0, i32 0
  %85 = load float, ptr %84, align 4, !tbaa !21
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ImDrawData, ptr %86, i32 0, i32 7
  %88 = getelementptr inbounds %struct.ImVec2, ptr %87, i32 0, i32 0
  %89 = load float, ptr %88, align 4, !tbaa !9
  %90 = fadd float %85, %89
  %91 = fpext float %90 to double
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ImDrawData, ptr %92, i32 0, i32 6
  %94 = getelementptr inbounds %struct.ImVec2, ptr %93, i32 0, i32 1
  %95 = load float, ptr %94, align 4, !tbaa !22
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ImDrawData, ptr %96, i32 0, i32 7
  %98 = getelementptr inbounds %struct.ImVec2, ptr %97, i32 0, i32 1
  %99 = load float, ptr %98, align 4, !tbaa !19
  %100 = fadd float %95, %99
  %101 = fpext float %100 to double
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ImDrawData, ptr %102, i32 0, i32 6
  %104 = getelementptr inbounds %struct.ImVec2, ptr %103, i32 0, i32 1
  %105 = load float, ptr %104, align 4, !tbaa !22
  %106 = fpext float %105 to double
  call void %76(double noundef %81, double noundef %91, double noundef %101, double noundef %106, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %107 = load ptr, ptr @glad_glMatrixMode, align 8, !tbaa !5
  call void %107(i32 noundef 5888)
  %108 = load ptr, ptr @glad_glPushMatrix, align 8, !tbaa !5
  call void %108()
  %109 = load ptr, ptr @glad_glLoadIdentity, align 8, !tbaa !5
  call void %109()
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %110 = load ptr, ptr %2, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ImDrawData, ptr %110, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %111, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !18
  br label %112

112:                                              ; preds = %261, %46
  %113 = load i32, ptr %12, align 4, !tbaa !18
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ImDrawData, ptr %114, i32 0, i32 3
  %116 = load i32, ptr %115, align 8, !tbaa !25
  %117 = icmp slt i32 %113, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %112
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %264

119:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %120 = load ptr, ptr %2, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.ImDrawData, ptr %120, i32 0, i32 2
  %122 = load ptr, ptr %121, align 8, !tbaa !26
  %123 = load i32, ptr %12, align 4, !tbaa !18
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds ptr, ptr %122, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  store ptr %126, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.ImDrawList, ptr %127, i32 0, i32 2
  %129 = getelementptr inbounds %struct.ImVector.1, ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !27
  store ptr %130, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.ImDrawList, ptr %131, i32 0, i32 1
  %133 = getelementptr inbounds %struct.ImVector, ptr %132, i32 0, i32 2
  %134 = load ptr, ptr %133, align 8, !tbaa !35
  store ptr %134, ptr %15, align 8, !tbaa !5
  %135 = load ptr, ptr @glad_glVertexPointer, align 8, !tbaa !5
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i64 0
  call void %135(i32 noundef 2, i32 noundef 5126, i32 noundef 20, ptr noundef %137)
  %138 = load ptr, ptr @glad_glTexCoordPointer, align 8, !tbaa !5
  %139 = load ptr, ptr %14, align 8, !tbaa !5
  %140 = getelementptr inbounds i8, ptr %139, i64 ptrtoint (ptr getelementptr inbounds (%struct.ImDrawVert, ptr null, i32 0, i32 1) to i64)
  call void %138(i32 noundef 2, i32 noundef 5126, i32 noundef 20, ptr noundef %140)
  %141 = load ptr, ptr @glad_glColorPointer, align 8, !tbaa !5
  %142 = load ptr, ptr %14, align 8, !tbaa !5
  %143 = getelementptr inbounds i8, ptr %142, i64 ptrtoint (ptr getelementptr inbounds (%struct.ImDrawVert, ptr null, i32 0, i32 2) to i64)
  call void %141(i32 noundef 4, i32 noundef 5121, i32 noundef 20, ptr noundef %143)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !18
  br label %144

144:                                              ; preds = %257, %119
  %145 = load i32, ptr %16, align 4, !tbaa !18
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.ImDrawList, ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %struct.ImVector.0, ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 8, !tbaa !36
  %150 = icmp slt i32 %145, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %144
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %260

152:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %153 = load ptr, ptr %13, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ImDrawList, ptr %153, i32 0, i32 0
  %155 = load i32, ptr %16, align 4, !tbaa !18
  %156 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %154, i32 noundef %155)
  store ptr %156, ptr %17, align 8, !tbaa !5
  %157 = load ptr, ptr %17, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.ImDrawCmd, ptr %157, i32 0, i32 3
  %159 = load ptr, ptr %158, align 8, !tbaa !37
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %167

161:                                              ; preds = %152
  %162 = load ptr, ptr %17, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.ImDrawCmd, ptr %162, i32 0, i32 3
  %164 = load ptr, ptr %163, align 8, !tbaa !37
  %165 = load ptr, ptr %13, align 8, !tbaa !5
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  call void %164(ptr noundef %165, ptr noundef %166)
  br label %250

167:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %168 = load ptr, ptr %17, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.ImDrawCmd, ptr %168, i32 0, i32 1
  %170 = getelementptr inbounds %struct.ImVec4, ptr %169, i32 0, i32 0
  %171 = load float, ptr %170, align 4, !tbaa !40
  %172 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 0
  %173 = load float, ptr %172, align 4, !tbaa !41
  %174 = fsub float %171, %173
  %175 = load ptr, ptr %17, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.ImDrawCmd, ptr %175, i32 0, i32 1
  %177 = getelementptr inbounds %struct.ImVec4, ptr %176, i32 0, i32 1
  %178 = load float, ptr %177, align 4, !tbaa !42
  %179 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 1
  %180 = load float, ptr %179, align 4, !tbaa !43
  %181 = fsub float %178, %180
  %182 = load ptr, ptr %17, 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 2
  %185 = load float, ptr %184, align 4, !tbaa !44
  %186 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 0
  %187 = load float, ptr %186, align 4, !tbaa !41
  %188 = fsub float %185, %187
  %189 = load ptr, ptr %17, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.ImDrawCmd, ptr %189, i32 0, i32 1
  %191 = getelementptr inbounds %struct.ImVec4, ptr %190, i32 0, i32 3
  %192 = load float, ptr %191, align 4, !tbaa !45
  %193 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 1
  %194 = load float, ptr %193, align 4, !tbaa !43
  %195 = fsub float %192, %194
  call void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16) %18, float noundef %174, float noundef %181, float noundef %188, float noundef %195)
  %196 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 0
  %197 = load float, ptr %196, align 4, !tbaa !46
  %198 = load i32, ptr %4, align 4, !tbaa !18
  %199 = sitofp i32 %198 to float
  %200 = fcmp olt float %197, %199
  br i1 %200, label %201, label %249

201:                                              ; preds = %167
  %202 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 1
  %203 = load float, ptr %202, align 4, !tbaa !47
  %204 = load i32, ptr %5, align 4, !tbaa !18
  %205 = sitofp i32 %204 to float
  %206 = fcmp olt float %203, %205
  br i1 %206, label %207, label %249

207:                                              ; preds = %201
  %208 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 2
  %209 = load float, ptr %208, align 4, !tbaa !48
  %210 = fcmp oge float %209, 0.000000e+00
  br i1 %210, label %211, label %249

211:                                              ; preds = %207
  %212 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 3
  %213 = load float, ptr %212, align 4, !tbaa !49
  %214 = fcmp oge float %213, 0.000000e+00
  br i1 %214, label %215, label %249

215:                                              ; preds = %211
  %216 = load ptr, ptr @glad_glScissor, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 0
  %218 = load float, ptr %217, align 4, !tbaa !46
  %219 = fptosi float %218 to i32
  %220 = load i32, ptr %5, align 4, !tbaa !18
  %221 = sitofp i32 %220 to float
  %222 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 3
  %223 = load float, ptr %222, align 4, !tbaa !49
  %224 = fsub float %221, %223
  %225 = fptosi float %224 to i32
  %226 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 2
  %227 = load float, ptr %226, align 4, !tbaa !48
  %228 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 0
  %229 = load float, ptr %228, align 4, !tbaa !46
  %230 = fsub float %227, %229
  %231 = fptosi float %230 to i32
  %232 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 3
  %233 = load float, ptr %232, align 4, !tbaa !49
  %234 = getelementptr inbounds %struct.ImVec4, ptr %18, i32 0, i32 1
  %235 = load float, ptr %234, align 4, !tbaa !47
  %236 = fsub float %233, %235
  %237 = fptosi float %236 to i32
  call void %216(i32 noundef %219, i32 noundef %225, i32 noundef %231, i32 noundef %237)
  %238 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  %239 = load ptr, ptr %17, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.ImDrawCmd, ptr %239, i32 0, i32 2
  %241 = load ptr, ptr %240, align 8, !tbaa !50
  %242 = ptrtoint ptr %241 to i64
  %243 = trunc i64 %242 to i32
  call void %238(i32 noundef 3553, i32 noundef %243)
  %244 = load ptr, ptr @glad_glDrawElements, align 8, !tbaa !5
  %245 = load ptr, ptr %17, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.ImDrawCmd, ptr %245, i32 0, i32 0
  %247 = load i32, ptr %246, align 8, !tbaa !51
  %248 = load ptr, ptr %15, align 8, !tbaa !5
  call void %244(i32 noundef 4, i32 noundef %247, i32 noundef 5123, ptr noundef %248)
  br label %249

249:                                              ; preds = %215, %211, %207, %201, %167
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  br label %250

250:                                              ; preds = %249, %161
  %251 = load ptr, ptr %17, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.ImDrawCmd, ptr %251, i32 0, i32 0
  %253 = load i32, ptr %252, align 8, !tbaa !51
  %254 = load ptr, ptr %15, align 8, !tbaa !5
  %255 = zext i32 %253 to i64
  %256 = getelementptr inbounds i16, ptr %254, i64 %255
  store ptr %256, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %257

257:                                              ; preds = %250
  %258 = load i32, ptr %16, align 4, !tbaa !18
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %16, align 4, !tbaa !18
  br label %144, !llvm.loop !52

260:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %12, align 4, !tbaa !18
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %12, align 4, !tbaa !18
  br label %112, !llvm.loop !54

264:                                              ; preds = %118
  %265 = load ptr, ptr @glad_glDisableClientState, align 8, !tbaa !5
  call void %265(i32 noundef 32886)
  %266 = load ptr, ptr @glad_glDisableClientState, align 8, !tbaa !5
  call void %266(i32 noundef 32888)
  %267 = load ptr, ptr @glad_glDisableClientState, align 8, !tbaa !5
  call void %267(i32 noundef 32884)
  %268 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  %269 = load i32, ptr %7, align 4, !tbaa !18
  call void %268(i32 noundef 3553, i32 noundef %269)
  %270 = load ptr, ptr @glad_glMatrixMode, align 8, !tbaa !5
  call void %270(i32 noundef 5888)
  %271 = load ptr, ptr @glad_glPopMatrix, align 8, !tbaa !5
  call void %271()
  %272 = load ptr, ptr @glad_glMatrixMode, align 8, !tbaa !5
  call void %272(i32 noundef 5889)
  %273 = load ptr, ptr @glad_glPopMatrix, align 8, !tbaa !5
  call void %273()
  %274 = load ptr, ptr @glad_glPopAttrib, align 8, !tbaa !5
  call void %274()
  %275 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !5
  %276 = getelementptr inbounds [2 x i32], ptr %8, i64 0, i64 0
  %277 = load i32, ptr %276, align 4, !tbaa !18
  call void %275(i32 noundef 1028, i32 noundef %277)
  %278 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !5
  %279 = getelementptr inbounds [2 x i32], ptr %8, i64 0, i64 1
  %280 = load i32, ptr %279, align 4, !tbaa !18
  call void %278(i32 noundef 1029, i32 noundef %280)
  %281 = load ptr, ptr @glad_glViewport, align 8, !tbaa !5
  %282 = getelementptr inbounds [4 x i32], ptr %9, i64 0, i64 0
  %283 = load i32, ptr %282, align 16, !tbaa !18
  %284 = getelementptr inbounds [4 x i32], ptr %9, i64 0, i64 1
  %285 = load i32, ptr %284, align 4, !tbaa !18
  %286 = getelementptr inbounds [4 x i32], ptr %9, i64 0, i64 2
  %287 = load i32, ptr %286, align 8, !tbaa !18
  %288 = getelementptr inbounds [4 x i32], ptr %9, i64 0, i64 3
  %289 = load i32, ptr %288, align 4, !tbaa !18
  call void %281(i32 noundef %283, i32 noundef %285, i32 noundef %287, i32 noundef %289)
  %290 = load ptr, ptr @glad_glScissor, align 8, !tbaa !5
  %291 = getelementptr inbounds [4 x i32], ptr %10, i64 0, i64 0
  %292 = load i32, ptr %291, align 16, !tbaa !18
  %293 = getelementptr inbounds [4 x i32], ptr %10, i64 0, i64 1
  %294 = load i32, ptr %293, align 4, !tbaa !18
  %295 = getelementptr inbounds [4 x i32], ptr %10, i64 0, i64 2
  %296 = load i32, ptr %295, align 8, !tbaa !18
  %297 = getelementptr inbounds [4 x i32], ptr %10, i64 0, i64 3
  %298 = load i32, ptr %297, align 4, !tbaa !18
  call void %290(i32 noundef %292, i32 noundef %294, i32 noundef %296, i32 noundef %298)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  store i32 0, ptr %6, align 4
  br label %299

299:                                              ; preds = %264, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  %300 = load i32, ptr %6, align 4
  switch i32 %300, label %302 [
    i32 0, label %301
    i32 1, label %301
  ]

301:                                              ; preds = %299, %299
  ret void

302:                                              ; preds = %299
  unreachable
}

declare void @_ZN10ImDrawData14ScaleClipRectsERK6ImVec2(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef nonnull align 4 dereferenceable(8)) #1

; 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(48) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #4 align 2

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

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}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !14, i64 176}
!16 = !{!"_ZTS7ImGuiIO", !12, i64 0, !12, i64 4, !13, i64 8, !14, i64 16, !14, i64 20, !6, i64 24, !6, i64 32, !14, i64 40, !14, i64 44, !14, i64 48, !7, i64 52, !14, i64 136, !14, i64 140, !6, i64 144, !6, i64 152, !14, i64 160, !11, i64 164, !6, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !11, i64 200, !11, i64 201, !11, i64 202, !11, i64 203, !11, i64 204, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !13, i64 296, !7, i64 304, !14, i64 312, !14, i64 316, !11, i64 320, !11, i64 321, !11, i64 322, !11, i64 323, !7, i64 324, !7, i64 836, !11, i64 920, !11, i64 921, !11, i64 922, !11, i64 923, !11, i64 924, !11, i64 925, !11, i64 926, !14, i64 928, !12, i64 932, !12, i64 936, !12, i64 940, !12, i64 944, !12, i64 948, !13, i64 952, !13, i64 960, !7, i64 968, !7, i64 1008, !7, i64 1048, !7, i64 1053, !7, i64 1058, !7, i64 1063, !7, i64 1068, !7, i64 1088, !7, i64 1108, !7, i64 1148, !7, i64 1168, !7, i64 3216, !7, i64 5264, !7, i64 5348, !17, i64 5432}
!17 = !{!"_ZTS8ImVectorItE", !12, i64 0, !12, i64 4, !6, i64 8}
!18 = !{!12, !12, i64 0}
!19 = !{!10, !14, i64 40}
!20 = !{!16, !14, i64 180}
!21 = !{!10, !14, i64 28}
!22 = !{!10, !14, i64 32}
!23 = !{i64 0, i64 4, !24, i64 4, i64 4, !24}
!24 = !{!14, !14, i64 0}
!25 = !{!10, !12, i64 16}
!26 = !{!10, !6, i64 8}
!27 = !{!28, !6, i64 40}
!28 = !{!"_ZTS10ImDrawList", !29, i64 0, !17, i64 16, !30, i64 32, !12, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !6, i64 80, !6, i64 88, !31, i64 96, !32, i64 112, !33, i64 128, !12, i64 144, !12, i64 148, !34, i64 152}
!29 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !12, i64 0, !12, i64 4, !6, i64 8}
!30 = !{!"_ZTS8ImVectorI10ImDrawVertE", !12, i64 0, !12, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorI6ImVec4E", !12, i64 0, !12, i64 4, !6, i64 8}
!32 = !{!"_ZTS8ImVectorIPvE", !12, i64 0, !12, i64 4, !6, i64 8}
!33 = !{!"_ZTS8ImVectorI6ImVec2E", !12, i64 0, !12, i64 4, !6, i64 8}
!34 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !12, i64 0, !12, i64 4, !6, i64 8}
!35 = !{!28, !6, i64 24}
!36 = !{!28, !12, i64 0}
!37 = !{!38, !6, i64 32}
!38 = !{!"_ZTS9ImDrawCmd", !12, i64 0, !39, i64 4, !6, i64 24, !6, i64 32, !6, i64 40}
!39 = !{!"_ZTS6ImVec4", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!40 = !{!38, !14, i64 4}
!41 = !{!13, !14, i64 0}
!42 = !{!38, !14, i64 8}
!43 = !{!13, !14, i64 4}
!44 = !{!38, !14, i64 12}
!45 = !{!38, !14, i64 16}
!46 = !{!39, !14, i64 0}
!47 = !{!39, !14, i64 4}
!48 = !{!39, !14, i64 8}
!49 = !{!39, !14, i64 12}
!50 = !{!38, !6, i64 24}
!51 = !{!38, !12, i64 0}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = distinct !{!54, !53}


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

@glad_glGetIntegerv = external local_unnamed_addr global ptr, align 8
@glad_glPushAttrib = external local_unnamed_addr global ptr, align 8
@glad_glEnable = external local_unnamed_addr global ptr, align 8
@glad_glBlendFunc = external local_unnamed_addr global ptr, align 8
@glad_glDisable = external local_unnamed_addr global ptr, align 8
@glad_glEnableClientState = external local_unnamed_addr global ptr, align 8
@glad_glPolygonMode = external local_unnamed_addr global ptr, align 8
@glad_glViewport = external local_unnamed_addr global ptr, align 8
@glad_glMatrixMode = external local_unnamed_addr global ptr, align 8
@glad_glPushMatrix = external local_unnamed_addr global ptr, align 8
@glad_glLoadIdentity = external local_unnamed_addr global ptr, align 8
@glad_glOrtho = external local_unnamed_addr global ptr, align 8
@glad_glVertexPointer = external local_unnamed_addr global ptr, align 8
@glad_glTexCoordPointer = external local_unnamed_addr global ptr, align 8
@glad_glColorPointer = external local_unnamed_addr global ptr, align 8
@glad_glScissor = external local_unnamed_addr global ptr, align 8
@glad_glBindTexture = external local_unnamed_addr global ptr, align 8
@glad_glDrawElements = external local_unnamed_addr global ptr, align 8
@glad_glDisableClientState = external local_unnamed_addr global ptr, align 8
@glad_glPopMatrix = external local_unnamed_addr global ptr, align 8
@glad_glPopAttrib = 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 noundef nonnull align 8 dereferenceable(5448) ptr @_ZN5ImGui5GetIOEv() 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_ImplOpenGL2_RenderDrawDataP10ImDrawData(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca i32, align 4
  %3 = alloca [2 x i32], align 4
  %4 = alloca [4 x i32], align 16
  %5 = alloca [4 x i32], align 16
  %6 = alloca %struct.ImVec4, align 4
  %7 = tail call noundef nonnull align 8 dereferenceable(5448) ptr @_ZN5ImGui5GetIOEv()
  %8 = getelementptr inbounds i8, ptr %0, i64 36
  %9 = getelementptr inbounds i8, ptr %7, i64 176
  %10 = load <2 x float>, ptr %8, align 4, !tbaa !5
  %11 = load <2 x float>, ptr %9, align 8, !tbaa !5
  %12 = fmul <2 x float> %10, %11
  %13 = fptosi <2 x float> %12 to <2 x i32>
  %14 = icmp eq <2 x i32> %13, zeroinitializer
  %15 = extractelement <2 x i1> %14, i64 0
  %16 = extractelement <2 x i1> %14, i64 1
  %or.cond = select i1 %15, i1 true, i1 %16
  br i1 %or.cond, label %166, label %17

17:                                               ; preds = %1
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN10ImDrawData14ScaleClipRectsERK6ImVec2(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %19 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !9
  call void %19(i32 noundef 32873, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %20 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !9
  call void %20(i32 noundef 2880, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %21 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !9
  call void %21(i32 noundef 2978, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %22 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !9
  call void %22(i32 noundef 3088, ptr noundef nonnull %5)
  %23 = load ptr, ptr @glad_glPushAttrib, align 8, !tbaa !9
  call void %23(i32 noundef 28672)
  %24 = load ptr, ptr @glad_glEnable, align 8, !tbaa !9
  call void %24(i32 noundef 3042)
  %25 = load ptr, ptr @glad_glBlendFunc, align 8, !tbaa !9
  call void %25(i32 noundef 770, i32 noundef 771)
  %26 = load ptr, ptr @glad_glDisable, align 8, !tbaa !9
  call void %26(i32 noundef 2884)
  %27 = load ptr, ptr @glad_glDisable, align 8, !tbaa !9
  call void %27(i32 noundef 2929)
  %28 = load ptr, ptr @glad_glDisable, align 8, !tbaa !9
  call void %28(i32 noundef 2896)
  %29 = load ptr, ptr @glad_glDisable, align 8, !tbaa !9
  call void %29(i32 noundef 2903)
  %30 = load ptr, ptr @glad_glEnable, align 8, !tbaa !9
  call void %30(i32 noundef 3089)
  %31 = load ptr, ptr @glad_glEnableClientState, align 8, !tbaa !9
  call void %31(i32 noundef 32884)
  %32 = load ptr, ptr @glad_glEnableClientState, align 8, !tbaa !9
  call void %32(i32 noundef 32888)
  %33 = load ptr, ptr @glad_glEnableClientState, align 8, !tbaa !9
  call void %33(i32 noundef 32886)
  %34 = load ptr, ptr @glad_glEnable, align 8, !tbaa !9
  call void %34(i32 noundef 3553)
  %35 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !9
  call void %35(i32 noundef 1032, i32 noundef 6914)
  %36 = load ptr, ptr @glad_glViewport, align 8, !tbaa !9
  %37 = extractelement <2 x i32> %13, i64 0
  %38 = extractelement <2 x i32> %13, i64 1
  call void %36(i32 noundef 0, i32 noundef 0, i32 noundef %37, i32 noundef %38)
  %39 = load ptr, ptr @glad_glMatrixMode, align 8, !tbaa !9
  call void %39(i32 noundef 5889)
  %40 = load ptr, ptr @glad_glPushMatrix, align 8, !tbaa !9
  call void %40()
  %41 = load ptr, ptr @glad_glLoadIdentity, align 8, !tbaa !9
  call void %41()
  %42 = load ptr, ptr @glad_glOrtho, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %0, i64 28
  %44 = load float, ptr %43, align 4, !tbaa !11
  %45 = fpext float %44 to double
  %46 = load float, ptr %8, align 4, !tbaa !16
  %47 = fadd float %44, %46
  %48 = fpext float %47 to double
  %49 = getelementptr inbounds i8, ptr %0, i64 32
  %50 = load float, ptr %49, align 4, !tbaa !17
  %51 = load float, ptr %18, align 4, !tbaa !18
  %52 = fadd float %50, %51
  %53 = fpext float %52 to double
  %54 = fpext float %50 to double
  call void %42(double noundef %45, double noundef %48, double noundef %53, double noundef %54, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %55 = load ptr, ptr @glad_glMatrixMode, align 8, !tbaa !9
  call void %55(i32 noundef 5888)
  %56 = load ptr, ptr @glad_glPushMatrix, align 8, !tbaa !9
  call void %56()
  %57 = load ptr, ptr @glad_glLoadIdentity, align 8, !tbaa !9
  call void %57()
  %.sroa.0.0.copyload = load float, ptr %43, align 4, !tbaa !5
  %.sroa.5.0.copyload = load float, ptr %49, align 4, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %0, i64 16
  %59 = load i32, ptr %58, align 8, !tbaa !19
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %.lr.ph71, label %._crit_edge72

.lr.ph71:                                         ; preds = %17
  %61 = getelementptr inbounds i8, ptr %0, i64 8
  %62 = sitofp i32 %37 to float
  %63 = getelementptr inbounds i8, ptr %6, i64 4
  %64 = sitofp i32 %38 to float
  %65 = getelementptr inbounds i8, ptr %6, i64 8
  %66 = getelementptr inbounds i8, ptr %6, i64 12
  br label %98

._crit_edge72:                                    ; preds = %._crit_edge, %17
  %67 = load ptr, ptr @glad_glDisableClientState, align 8, !tbaa !9
  call void %67(i32 noundef 32886)
  %68 = load ptr, ptr @glad_glDisableClientState, align 8, !tbaa !9
  call void %68(i32 noundef 32888)
  %69 = load ptr, ptr @glad_glDisableClientState, align 8, !tbaa !9
  call void %69(i32 noundef 32884)
  %70 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !9
  %71 = load i32, ptr %2, align 4, !tbaa !20
  call void %70(i32 noundef 3553, i32 noundef %71)
  %72 = load ptr, ptr @glad_glMatrixMode, align 8, !tbaa !9
  call void %72(i32 noundef 5888)
  %73 = load ptr, ptr @glad_glPopMatrix, align 8, !tbaa !9
  call void %73()
  %74 = load ptr, ptr @glad_glMatrixMode, align 8, !tbaa !9
  call void %74(i32 noundef 5889)
  %75 = load ptr, ptr @glad_glPopMatrix, align 8, !tbaa !9
  call void %75()
  %76 = load ptr, ptr @glad_glPopAttrib, align 8, !tbaa !9
  call void %76()
  %77 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !9
  %78 = load i32, ptr %3, align 4, !tbaa !20
  call void %77(i32 noundef 1028, i32 noundef %78)
  %79 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %3, i64 4
  %81 = load i32, ptr %80, align 4, !tbaa !20
  call void %79(i32 noundef 1029, i32 noundef %81)
  %82 = load ptr, ptr @glad_glViewport, align 8, !tbaa !9
  %83 = load i32, ptr %4, align 16, !tbaa !20
  %84 = getelementptr inbounds i8, ptr %4, i64 4
  %85 = load i32, ptr %84, align 4, !tbaa !20
  %86 = getelementptr inbounds i8, ptr %4, i64 8
  %87 = load i32, ptr %86, align 8, !tbaa !20
  %88 = getelementptr inbounds i8, ptr %4, i64 12
  %89 = load i32, ptr %88, align 4, !tbaa !20
  call void %82(i32 noundef %83, i32 noundef %85, i32 noundef %87, i32 noundef %89)
  %90 = load ptr, ptr @glad_glScissor, align 8, !tbaa !9
  %91 = load i32, ptr %5, align 16, !tbaa !20
  %92 = getelementptr inbounds i8, ptr %5, i64 4
  %93 = load i32, ptr %92, align 4, !tbaa !20
  %94 = getelementptr inbounds i8, ptr %5, i64 8
  %95 = load i32, ptr %94, align 8, !tbaa !20
  %96 = getelementptr inbounds i8, ptr %5, i64 12
  %97 = load i32, ptr %96, align 4, !tbaa !20
  call void %90(i32 noundef %91, i32 noundef %93, i32 noundef %95, i32 noundef %97)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %166

98:                                               ; preds = %.lr.ph71, %._crit_edge
  %indvars.iv = phi i64 [ 0, %.lr.ph71 ], [ %indvars.iv.next, %._crit_edge ]
  %99 = load ptr, ptr %61, align 8, !tbaa !21
  %100 = getelementptr inbounds ptr, ptr %99, i64 %indvars.iv
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = getelementptr inbounds i8, ptr %101, i64 40
  %103 = load ptr, ptr %102, align 8, !tbaa !22
  %104 = getelementptr inbounds i8, ptr %101, i64 24
  %105 = load ptr, ptr %104, align 8, !tbaa !31
  %106 = load ptr, ptr @glad_glVertexPointer, align 8, !tbaa !9
  call void %106(i32 noundef 2, i32 noundef 5126, i32 noundef 20, ptr noundef %103)
  %107 = load ptr, ptr @glad_glTexCoordPointer, align 8, !tbaa !9
  %108 = getelementptr inbounds i8, ptr %103, i64 8
  call void %107(i32 noundef 2, i32 noundef 5126, i32 noundef 20, ptr noundef nonnull %108)
  %109 = load ptr, ptr @glad_glColorPointer, align 8, !tbaa !9
  %110 = getelementptr inbounds i8, ptr %103, i64 16
  call void %109(i32 noundef 4, i32 noundef 5121, i32 noundef 20, ptr noundef nonnull %110)
  %111 = load i32, ptr %101, align 8, !tbaa !32
  %112 = icmp sgt i32 %111, 0
  br i1 %112, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %159, %98
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %113 = load i32, ptr %58, align 8, !tbaa !19
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next, %114
  br i1 %115, label %98, label %._crit_edge72, !llvm.loop !33

.lr.ph:                                           ; preds = %98, %159
  %.068 = phi i32 [ %163, %159 ], [ 0, %98 ]
  %.05666 = phi ptr [ %162, %159 ], [ %105, %98 ]
  %116 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %101, i32 noundef %.068)
  %117 = getelementptr inbounds i8, ptr %116, i64 32
  %118 = load ptr, ptr %117, align 8, !tbaa !35
  %.not = icmp eq ptr %118, null
  br i1 %.not, label %120, label %119

119:                                              ; preds = %.lr.ph
  call void %118(ptr noundef nonnull %101, ptr noundef nonnull %116)
  br label %159

120:                                              ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %121 = getelementptr inbounds i8, ptr %116, i64 4
  %122 = load float, ptr %121, align 4, !tbaa !38
  %123 = fsub float %122, %.sroa.0.0.copyload
  %124 = getelementptr inbounds i8, ptr %116, i64 8
  %125 = load float, ptr %124, align 8, !tbaa !39
  %126 = fsub float %125, %.sroa.5.0.copyload
  %127 = getelementptr inbounds i8, ptr %116, i64 12
  %128 = load float, ptr %127, align 4, !tbaa !40
  %129 = fsub float %128, %.sroa.0.0.copyload
  %130 = getelementptr inbounds i8, ptr %116, i64 16
  %131 = load float, ptr %130, align 8, !tbaa !41
  %132 = fsub float %131, %.sroa.5.0.copyload
  call void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16) %6, float noundef %123, float noundef %126, float noundef %129, float noundef %132)
  %133 = load float, ptr %6, align 4, !tbaa !42
  %134 = fcmp olt float %133, %62
  br i1 %134, label %135, label %158

135:                                              ; preds = %120
  %136 = load float, ptr %63, align 4, !tbaa !43
  %137 = fcmp olt float %136, %64
  %138 = load float, ptr %65, align 4
  %139 = fcmp oge float %138, 0.000000e+00
  %or.cond4 = select i1 %137, i1 %139, i1 false
  %140 = load float, ptr %66, align 4
  %141 = fcmp oge float %140, 0.000000e+00
  %or.cond7 = select i1 %or.cond4, i1 %141, i1 false
  br i1 %or.cond7, label %142, label %158

142:                                              ; preds = %135
  %143 = load ptr, ptr @glad_glScissor, align 8, !tbaa !9
  %144 = fptosi float %133 to i32
  %145 = fsub float %64, %140
  %146 = fptosi float %145 to i32
  %147 = fsub float %138, %133
  %148 = fptosi float %147 to i32
  %149 = fsub float %140, %136
  %150 = fptosi float %149 to i32
  call void %143(i32 noundef %144, i32 noundef %146, i32 noundef %148, i32 noundef %150)
  %151 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !9
  %152 = getelementptr inbounds i8, ptr %116, i64 24
  %153 = load ptr, ptr %152, align 8, !tbaa !44
  %154 = ptrtoint ptr %153 to i64
  %155 = trunc i64 %154 to i32
  call void %151(i32 noundef 3553, i32 noundef %155)
  %156 = load ptr, ptr @glad_glDrawElements, align 8, !tbaa !9
  %157 = load i32, ptr %116, align 8, !tbaa !45
  call void %156(i32 noundef 4, i32 noundef %157, i32 noundef 5123, ptr noundef %.05666)
  br label %158

158:                                              ; preds = %142, %135, %120
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %159

159:                                              ; preds = %158, %119
  %160 = load i32, ptr %116, align 8, !tbaa !45
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds i16, ptr %.05666, i64 %161
  %163 = add nuw nsw i32 %.068, 1
  %164 = load i32, ptr %101, align 8, !tbaa !32
  %165 = icmp slt i32 %163, %164
  br i1 %165, label %.lr.ph, label %._crit_edge, !llvm.loop !46

166:                                              ; preds = %1, %._crit_edge72
  ret void
}

declare void @_ZN10ImDrawData14ScaleClipRectsERK6ImVec2(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) 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 @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #4 align 2

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, !6, i64 28}
!12 = !{!"_ZTS10ImDrawData", !13, i64 0, !10, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !15, i64 28, !15, i64 36}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTS6ImVec2", !6, i64 0, !6, i64 4}
!16 = !{!12, !6, i64 36}
!17 = !{!12, !6, i64 32}
!18 = !{!12, !6, i64 40}
!19 = !{!12, !14, i64 16}
!20 = !{!14, !14, i64 0}
!21 = !{!12, !10, i64 8}
!22 = !{!23, !10, i64 40}
!23 = !{!"_ZTS10ImDrawList", !24, i64 0, !25, i64 16, !26, i64 32, !14, i64 48, !10, i64 56, !10, i64 64, !14, i64 72, !10, i64 80, !10, i64 88, !27, i64 96, !28, i64 112, !29, i64 128, !14, i64 144, !14, i64 148, !30, i64 152}
!24 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !14, i64 0, !14, i64 4, !10, i64 8}
!25 = !{!"_ZTS8ImVectorItE", !14, i64 0, !14, i64 4, !10, i64 8}
!26 = !{!"_ZTS8ImVectorI10ImDrawVertE", !14, i64 0, !14, i64 4, !10, i64 8}
!27 = !{!"_ZTS8ImVectorI6ImVec4E", !14, i64 0, !14, i64 4, !10, i64 8}
!28 = !{!"_ZTS8ImVectorIPvE", !14, i64 0, !14, i64 4, !10, i64 8}
!29 = !{!"_ZTS8ImVectorI6ImVec2E", !14, i64 0, !14, i64 4, !10, i64 8}
!30 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !14, i64 0, !14, i64 4, !10, i64 8}
!31 = !{!23, !10, i64 24}
!32 = !{!23, !14, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!36, !10, i64 32}
!36 = !{!"_ZTS9ImDrawCmd", !14, i64 0, !37, i64 4, !10, i64 24, !10, i64 32, !10, i64 40}
!37 = !{!"_ZTS6ImVec4", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!38 = !{!36, !6, i64 4}
!39 = !{!36, !6, i64 8}
!40 = !{!36, !6, i64 12}
!41 = !{!36, !6, i64 16}
!42 = !{!37, !6, i64 0}
!43 = !{!37, !6, i64 4}
!44 = !{!36, !10, i64 24}
!45 = !{!36, !14, i64 0}
!46 = distinct !{!46, !34}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass