; LLVM IR from jan-van-bergen/GPU-Raytracer :: include/Imgui (imgui_impl_sdlrenderer)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z36ImGui_ImplSDLRenderer_RenderDrawDataP10ImDrawData(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.BackupSDLRendererState, align 4
  %11 = alloca %struct.ImVec2, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %struct.ImVec2, align 4
  %20 = alloca %struct.ImVec2, align 4
  %21 = alloca %struct.SDL_Rect, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %26 = call noundef ptr @_ZL36ImGui_ImplSDLRenderer_GetBackendDatav()
  store ptr %26, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store float 1.000000e+00, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store float 1.000000e+00, ptr %5, align 4, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ImGui_ImplSDLRenderer_Data, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  call void @SDL_RenderGetScale(ptr noundef %29, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6)
  %30 = load float, ptr %4, align 4, !tbaa !9
  %31 = fcmp oeq float %30, 1.000000e+00
  br i1 %31, label %32, label %37

32:                                               ; preds = %1
  %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 8, !tbaa !13
  br label %38

37:                                               ; preds = %1
  br label %38

38:                                               ; preds = %37, %32
  %39 = phi float [ %36, %32 ], [ 1.000000e+00, %37 ]
  %40 = getelementptr inbounds %struct.ImVec2, ptr %6, i32 0, i32 0
  store float %39, ptr %40, align 4, !tbaa !18
  %41 = load float, ptr %5, align 4, !tbaa !9
  %42 = fcmp oeq float %41, 1.000000e+00
  br i1 %42, label %43, label %48

43:                                               ; preds = %38
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ImDrawData, ptr %44, i32 0, i32 7
  %46 = getelementptr inbounds %struct.ImVec2, ptr %45, i32 0, i32 1
  %47 = load float, ptr %46, align 4, !tbaa !19
  br label %49

48:                                               ; preds = %38
  br label %49

49:                                               ; preds = %48, %43
  %50 = phi float [ %47, %43 ], [ 1.000000e+00, %48 ]
  %51 = getelementptr inbounds %struct.ImVec2, ptr %6, i32 0, i32 1
  store float %50, ptr %51, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ImDrawData, ptr %52, i32 0, i32 6
  %54 = getelementptr inbounds %struct.ImVec2, ptr %53, i32 0, i32 0
  %55 = load float, ptr %54, align 8, !tbaa !21
  %56 = getelementptr inbounds %struct.ImVec2, ptr %6, i32 0, i32 0
  %57 = load float, ptr %56, align 4, !tbaa !18
  %58 = fmul float %55, %57
  %59 = fptosi float %58 to i32
  store i32 %59, ptr %7, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ImDrawData, ptr %60, i32 0, i32 6
  %62 = getelementptr inbounds %struct.ImVec2, ptr %61, i32 0, i32 1
  %63 = load float, ptr %62, align 4, !tbaa !23
  %64 = getelementptr inbounds %struct.ImVec2, ptr %6, i32 0, i32 1
  %65 = load float, ptr %64, align 4, !tbaa !20
  %66 = fmul float %63, %65
  %67 = fptosi float %66 to i32
  store i32 %67, ptr %8, align 4, !tbaa !22
  %68 = load i32, ptr %7, align 4, !tbaa !22
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %73, label %70

70:                                               ; preds = %49
  %71 = load i32, ptr %8, align 4, !tbaa !22
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %70, %49
  store i32 1, ptr %9, align 4
  br label %337

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 36, ptr %10) #7
  call void @llvm.memset.p0.i64(ptr align 4 %10, i8 0, i64 36, i1 false)
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ImGui_ImplSDLRenderer_Data, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = call i32 @SDL_RenderIsClipEnabled(ptr noundef %77)
  %79 = icmp eq i32 %78, 1
  %80 = getelementptr inbounds %struct.BackupSDLRendererState, ptr %10, i32 0, i32 1
  %81 = zext i1 %79 to i8
  store i8 %81, ptr %80, align 4, !tbaa !24
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ImGui_ImplSDLRenderer_Data, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct.BackupSDLRendererState, ptr %10, i32 0, i32 0
  call void @SDL_RenderGetViewport(ptr noundef %84, ptr noundef %85)
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ImGui_ImplSDLRenderer_Data, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  %89 = getelementptr inbounds %struct.BackupSDLRendererState, ptr %10, i32 0, i32 2
  call void @SDL_RenderGetClipRect(ptr noundef %88, ptr noundef %89)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ImDrawData, ptr %90, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %91, i64 8, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !27
  call void @_ZL38ImGui_ImplSDLRenderer_SetupRenderStatev()
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !22
  br label %92

92:                                               ; preds = %316, %74
  %93 = load i32, ptr %13, align 4, !tbaa !22
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.ImDrawData, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !28
  %97 = icmp slt i32 %93, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %92
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %319

99:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ImDrawData, ptr %100, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !29
  %103 = load i32, ptr %13, align 4, !tbaa !22
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds ptr, ptr %102, i64 %104
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  store ptr %106, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %107 = load ptr, ptr %14, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ImDrawList, ptr %107, i32 0, i32 2
  %109 = getelementptr inbounds %struct.ImVector.1, ptr %108, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !30
  store ptr %110, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ImDrawList, ptr %111, i32 0, i32 1
  %113 = getelementptr inbounds %struct.ImVector, ptr %112, i32 0, i32 2
  %114 = load ptr, ptr %113, align 8, !tbaa !42
  store ptr %114, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !22
  br label %115

115:                                              ; preds = %312, %99
  %116 = load i32, ptr %17, align 4, !tbaa !22
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.ImDrawList, ptr %117, i32 0, i32 0
  %119 = getelementptr inbounds %struct.ImVector.0, ptr %118, i32 0, i32 0
  %120 = load i32, ptr %119, align 8, !tbaa !43
  %121 = icmp slt i32 %116, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %115
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %315

123:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ImDrawList, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %17, align 4, !tbaa !22
  %127 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %125, i32 noundef %126)
  store ptr %127, ptr %18, align 8, !tbaa !5
  %128 = load ptr, ptr %18, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ImDrawCmd, ptr %128, i32 0, i32 5
  %130 = load ptr, ptr %129, align 8, !tbaa !44
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %145

132:                                              ; preds = %123
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ImDrawCmd, ptr %133, i32 0, i32 5
  %135 = load ptr, ptr %134, align 8, !tbaa !44
  %136 = icmp eq ptr %135, inttoptr (i64 -1 to ptr)
  br i1 %136, label %137, label %138

137:                                              ; preds = %132
  call void @_ZL38ImGui_ImplSDLRenderer_SetupRenderStatev()
  br label %144

138:                                              ; preds = %132
  %139 = load ptr, ptr %18, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.ImDrawCmd, ptr %139, i32 0, i32 5
  %141 = load ptr, ptr %140, align 8, !tbaa !44
  %142 = load ptr, ptr %14, align 8, !tbaa !5
  %143 = load ptr, ptr %18, align 8, !tbaa !5
  call void %141(ptr noundef %142, ptr noundef %143)
  br label %144

144:                                              ; preds = %138, %137
  br label %308

145:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %146 = load ptr, ptr %18, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.ImDrawCmd, ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %struct.ImVec4, ptr %147, i32 0, i32 0
  %149 = load float, ptr %148, align 8, !tbaa !46
  %150 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 0
  %151 = load float, ptr %150, align 4, !tbaa !18
  %152 = fsub float %149, %151
  %153 = getelementptr inbounds %struct.ImVec2, ptr %12, i32 0, i32 0
  %154 = load float, ptr %153, align 4, !tbaa !18
  %155 = fmul float %152, %154
  %156 = load ptr, ptr %18, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.ImDrawCmd, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %struct.ImVec4, ptr %157, i32 0, i32 1
  %159 = load float, ptr %158, align 4, !tbaa !47
  %160 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 1
  %161 = load float, ptr %160, align 4, !tbaa !20
  %162 = fsub float %159, %161
  %163 = getelementptr inbounds %struct.ImVec2, ptr %12, i32 0, i32 1
  %164 = load float, ptr %163, align 4, !tbaa !20
  %165 = fmul float %162, %164
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %19, float noundef %155, float noundef %165)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %166 = load ptr, ptr %18, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.ImDrawCmd, ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds %struct.ImVec4, ptr %167, i32 0, i32 2
  %169 = load float, ptr %168, align 8, !tbaa !48
  %170 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 0
  %171 = load float, ptr %170, align 4, !tbaa !18
  %172 = fsub float %169, %171
  %173 = getelementptr inbounds %struct.ImVec2, ptr %12, i32 0, i32 0
  %174 = load float, ptr %173, align 4, !tbaa !18
  %175 = fmul float %172, %174
  %176 = load ptr, ptr %18, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.ImDrawCmd, ptr %176, i32 0, i32 0
  %178 = getelementptr inbounds %struct.ImVec4, ptr %177, i32 0, i32 3
  %179 = load float, ptr %178, align 4, !tbaa !49
  %180 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 1
  %181 = load float, ptr %180, align 4, !tbaa !20
  %182 = fsub float %179, %181
  %183 = getelementptr inbounds %struct.ImVec2, ptr %12, i32 0, i32 1
  %184 = load float, ptr %183, align 4, !tbaa !20
  %185 = fmul float %182, %184
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %20, float noundef %175, float noundef %185)
  %186 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 0
  %187 = load float, ptr %186, align 4, !tbaa !18
  %188 = fcmp olt float %187, 0.000000e+00
  br i1 %188, label %189, label %191

189:                                              ; preds = %145
  %190 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 0
  store float 0.000000e+00, ptr %190, align 4, !tbaa !18
  br label %191

191:                                              ; preds = %189, %145
  %192 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 1
  %193 = load float, ptr %192, align 4, !tbaa !20
  %194 = fcmp olt float %193, 0.000000e+00
  br i1 %194, label %195, label %197

195:                                              ; preds = %191
  %196 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 1
  store float 0.000000e+00, ptr %196, align 4, !tbaa !20
  br label %197

197:                                              ; preds = %195, %191
  %198 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 0
  %199 = load float, ptr %198, align 4, !tbaa !18
  %200 = load i32, ptr %7, align 4, !tbaa !22
  %201 = sitofp i32 %200 to float
  %202 = fcmp ogt float %199, %201
  br i1 %202, label %203, label %207

203:                                              ; preds = %197
  %204 = load i32, ptr %7, align 4, !tbaa !22
  %205 = sitofp i32 %204 to float
  %206 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 0
  store float %205, ptr %206, align 4, !tbaa !18
  br label %207

207:                                              ; preds = %203, %197
  %208 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 1
  %209 = load float, ptr %208, align 4, !tbaa !20
  %210 = load i32, ptr %8, align 4, !tbaa !22
  %211 = sitofp i32 %210 to float
  %212 = fcmp ogt float %209, %211
  br i1 %212, label %213, label %217

213:                                              ; preds = %207
  %214 = load i32, ptr %8, align 4, !tbaa !22
  %215 = sitofp i32 %214 to float
  %216 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 1
  store float %215, ptr %216, align 4, !tbaa !20
  br label %217

217:                                              ; preds = %213, %207
  %218 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 0
  %219 = load float, ptr %218, align 4, !tbaa !18
  %220 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 0
  %221 = load float, ptr %220, align 4, !tbaa !18
  %222 = fcmp ole float %219, %221
  br i1 %222, label %229, label %223

223:                                              ; preds = %217
  %224 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 1
  %225 = load float, ptr %224, align 4, !tbaa !20
  %226 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 1
  %227 = load float, ptr %226, align 4, !tbaa !20
  %228 = fcmp ole float %225, %227
  br i1 %228, label %229, label %230

229:                                              ; preds = %223, %217
  store i32 7, ptr %9, align 4
  br label %305

230:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  %231 = getelementptr inbounds %struct.SDL_Rect, ptr %21, i32 0, i32 0
  %232 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 0
  %233 = load float, ptr %232, align 4, !tbaa !18
  %234 = fptosi float %233 to i32
  store i32 %234, ptr %231, align 4, !tbaa !50
  %235 = getelementptr inbounds %struct.SDL_Rect, ptr %21, i32 0, i32 1
  %236 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 1
  %237 = load float, ptr %236, align 4, !tbaa !20
  %238 = fptosi float %237 to i32
  store i32 %238, ptr %235, align 4, !tbaa !51
  %239 = getelementptr inbounds %struct.SDL_Rect, ptr %21, i32 0, i32 2
  %240 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 0
  %241 = load float, ptr %240, align 4, !tbaa !18
  %242 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 0
  %243 = load float, ptr %242, align 4, !tbaa !18
  %244 = fsub float %241, %243
  %245 = fptosi float %244 to i32
  store i32 %245, ptr %239, align 4, !tbaa !52
  %246 = getelementptr inbounds %struct.SDL_Rect, ptr %21, i32 0, i32 3
  %247 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 1
  %248 = load float, ptr %247, align 4, !tbaa !20
  %249 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 1
  %250 = load float, ptr %249, align 4, !tbaa !20
  %251 = fsub float %248, %250
  %252 = fptosi float %251 to i32
  store i32 %252, ptr %246, align 4, !tbaa !53
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.ImGui_ImplSDLRenderer_Data, ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8, !tbaa !11
  %256 = call i32 @SDL_RenderSetClipRect(ptr noundef %255, ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %257 = load ptr, ptr %15, align 8, !tbaa !5
  %258 = load ptr, ptr %18, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.ImDrawCmd, ptr %258, i32 0, i32 2
  %260 = load i32, ptr %259, align 8, !tbaa !54
  %261 = zext i32 %260 to i64
  %262 = getelementptr inbounds %struct.ImDrawVert, ptr %257, i64 %261
  %263 = getelementptr inbounds i8, ptr %262, i64 0
  store ptr %263, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %264 = load ptr, ptr %15, align 8, !tbaa !5
  %265 = load ptr, ptr %18, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.ImDrawCmd, ptr %265, i32 0, i32 2
  %267 = load i32, ptr %266, align 8, !tbaa !54
  %268 = zext i32 %267 to i64
  %269 = getelementptr inbounds %struct.ImDrawVert, ptr %264, i64 %268
  %270 = getelementptr inbounds i8, ptr %269, i64 8
  store ptr %270, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %271 = load ptr, ptr %15, align 8, !tbaa !5
  %272 = load ptr, ptr %18, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.ImDrawCmd, ptr %272, i32 0, i32 2
  %274 = load i32, ptr %273, align 8, !tbaa !54
  %275 = zext i32 %274 to i64
  %276 = getelementptr inbounds %struct.ImDrawVert, ptr %271, i64 %275
  %277 = getelementptr inbounds i8, ptr %276, i64 16
  store ptr %277, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %278 = load ptr, ptr %18, align 8, !tbaa !5
  %279 = call noundef ptr @_ZNK9ImDrawCmd8GetTexIDEv(ptr noundef nonnull align 8 dereferenceable(56) %278)
  store ptr %279, ptr %25, align 8, !tbaa !5
  %280 = load ptr, ptr %3, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.ImGui_ImplSDLRenderer_Data, ptr %280, i32 0, i32 0
  %282 = load ptr, ptr %281, align 8, !tbaa !11
  %283 = load ptr, ptr %25, align 8, !tbaa !5
  %284 = load ptr, ptr %22, align 8, !tbaa !5
  %285 = load ptr, ptr %24, align 8, !tbaa !5
  %286 = load ptr, ptr %23, align 8, !tbaa !5
  %287 = load ptr, ptr %14, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.ImDrawList, ptr %287, i32 0, i32 2
  %289 = getelementptr inbounds %struct.ImVector.1, ptr %288, i32 0, i32 0
  %290 = load i32, ptr %289, align 8, !tbaa !55
  %291 = load ptr, ptr %18, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.ImDrawCmd, ptr %291, i32 0, i32 2
  %293 = load i32, ptr %292, align 8, !tbaa !54
  %294 = sub i32 %290, %293
  %295 = load ptr, ptr %16, align 8, !tbaa !5
  %296 = load ptr, ptr %18, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.ImDrawCmd, ptr %296, i32 0, i32 3
  %298 = load i32, ptr %297, align 4, !tbaa !56
  %299 = zext i32 %298 to i64
  %300 = getelementptr inbounds i16, ptr %295, i64 %299
  %301 = load ptr, ptr %18, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.ImDrawCmd, ptr %301, i32 0, i32 4
  %303 = load i32, ptr %302, align 8, !tbaa !57
  %304 = call i32 @SDL_RenderGeometryRaw(ptr noundef %282, ptr noundef %283, ptr noundef %284, i32 noundef 20, ptr noundef %285, i32 noundef 20, ptr noundef %286, i32 noundef 20, i32 noundef %294, ptr noundef %300, i32 noundef %303, i32 noundef 2)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  store i32 0, ptr %9, align 4
  br label %305

305:                                              ; preds = %230, %229
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %306 = load i32, ptr %9, align 4
  switch i32 %306, label %309 [
    i32 0, label %307
  ]

307:                                              ; preds = %305
  br label %308

308:                                              ; preds = %307, %144
  store i32 0, ptr %9, align 4
  br label %309

309:                                              ; preds = %308, %305
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %310 = load i32, ptr %9, align 4
  switch i32 %310, label %340 [
    i32 0, label %311
    i32 7, label %312
  ]

311:                                              ; preds = %309
  br label %312

312:                                              ; preds = %311, %309
  %313 = load i32, ptr %17, align 4, !tbaa !22
  %314 = add nsw i32 %313, 1
  store i32 %314, ptr %17, align 4, !tbaa !22
  br label %115, !llvm.loop !58

315:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %316

316:                                              ; preds = %315
  %317 = load i32, ptr %13, align 4, !tbaa !22
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %13, align 4, !tbaa !22
  br label %92, !llvm.loop !60

319:                                              ; preds = %98
  %320 = load ptr, ptr %3, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.ImGui_ImplSDLRenderer_Data, ptr %320, i32 0, i32 0
  %322 = load ptr, ptr %321, align 8, !tbaa !11
  %323 = getelementptr inbounds %struct.BackupSDLRendererState, ptr %10, i32 0, i32 0
  %324 = call i32 @SDL_RenderSetViewport(ptr noundef %322, ptr noundef %323)
  %325 = load ptr, ptr %3, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.ImGui_ImplSDLRenderer_Data, ptr %325, i32 0, i32 0
  %327 = load ptr, ptr %326, align 8, !tbaa !11
  %328 = getelementptr inbounds %struct.BackupSDLRendererState, ptr %10, i32 0, i32 1
  %329 = load i8, ptr %328, align 4, !tbaa !24, !range !61, !noundef !62
  %330 = trunc i8 %329 to i1
  br i1 %330, label %331, label %333

331:                                              ; preds = %319
  %332 = getelementptr inbounds %struct.BackupSDLRendererState, ptr %10, i32 0, i32 2
  br label %334

333:                                              ; preds = %319
  br label %334

334:                                              ; preds = %333, %331
  %335 = phi ptr [ %332, %331 ], [ null, %333 ]
  %336 = call i32 @SDL_RenderSetClipRect(ptr noundef %327, ptr noundef %335)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %10) #7
  store i32 0, ptr %9, align 4
  br label %337

337:                                              ; preds = %334, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  %338 = load i32, ptr %9, align 4
  switch i32 %338, label %340 [
    i32 0, label %339
    i32 1, label %339
  ]

339:                                              ; preds = %337, %337
  ret void

340:                                              ; preds = %337, %309
  unreachable
}

declare void @SDL_RenderGetScale(ptr noundef, ptr noundef, ptr noundef) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare i32 @SDL_RenderIsClipEnabled(ptr noundef) #2

declare void @SDL_RenderGetViewport(ptr noundef, ptr noundef) #2

declare void @SDL_RenderGetClipRect(ptr noundef, ptr 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) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL38ImGui_ImplSDLRenderer_SetupRenderStatev() #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9ImDrawCmd8GetTexIDEv(ptr noundef nonnull align 8 dereferenceable(56)) #6 align 2

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

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

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

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

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


; 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.ImVec2 = type { float, float }
%struct.BackupSDLRendererState = type { %struct.SDL_Rect, i8, %struct.SDL_Rect }
%struct.SDL_Rect = type { i32, i32, i32, i32 }
%struct.ImDrawVert = type { %struct.ImVec2, %struct.ImVec2, i32 }

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL36ImGui_ImplSDLRenderer_GetBackendDatav() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z36ImGui_ImplSDLRenderer_RenderDrawDataP10ImDrawData(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = alloca float, align 4
  %3 = alloca float, align 4
  %4 = alloca %struct.ImVec2, align 4
  %5 = alloca %struct.BackupSDLRendererState, align 4
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %struct.SDL_Rect, align 16
  %9 = tail call noundef ptr @_ZL36ImGui_ImplSDLRenderer_GetBackendDatav()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store float 1.000000e+00, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store float 1.000000e+00, ptr %3, align 4, !tbaa !5
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  call void @SDL_RenderGetScale(ptr noundef %10, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %4)
  %11 = load float, ptr %2, align 4, !tbaa !5
  %12 = fcmp oeq float %11, 1.000000e+00
  br i1 %12, label %13, label %16

13:                                               ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = load float, ptr %14, align 8, !tbaa !12
  br label %16

16:                                               ; preds = %1, %13
  %17 = phi float [ %15, %13 ], [ 1.000000e+00, %1 ]
  store float %17, ptr %4, align 4, !tbaa !17
  %18 = load float, ptr %3, align 4, !tbaa !5
  %19 = fcmp oeq float %18, 1.000000e+00
  br i1 %19, label %20, label %23

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %0, i64 44
  %22 = load float, ptr %21, align 4, !tbaa !18
  br label %23

23:                                               ; preds = %16, %20
  %24 = phi float [ %22, %20 ], [ 1.000000e+00, %16 ]
  %25 = getelementptr inbounds i8, ptr %4, i64 4
  store float %24, ptr %25, align 4, !tbaa !19
  %26 = getelementptr inbounds i8, ptr %0, i64 32
  %27 = load <2 x float>, ptr %26, align 8, !tbaa !5
  %28 = insertelement <2 x float> poison, float %17, i64 0
  %29 = insertelement <2 x float> %28, float %24, i64 1
  %30 = fmul <2 x float> %29, %27
  %31 = fptosi <2 x float> %30 to <2 x i32>
  %32 = icmp eq <2 x i32> %31, zeroinitializer
  %33 = extractelement <2 x i1> %32, i64 0
  %34 = extractelement <2 x i1> %32, i64 1
  %or.cond = select i1 %33, i1 true, i1 %34
  br i1 %or.cond, label %155, label %35

35:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %5, i8 0, i64 36, i1 false)
  %36 = load ptr, ptr %9, align 8, !tbaa !9
  %37 = call i32 @SDL_RenderIsClipEnabled(ptr noundef %36)
  %38 = icmp eq i32 %37, 1
  %39 = getelementptr inbounds i8, ptr %5, i64 16
  %40 = zext i1 %38 to i8
  store i8 %40, ptr %39, align 4, !tbaa !20
  %41 = load ptr, ptr %9, align 8, !tbaa !9
  call void @SDL_RenderGetViewport(ptr noundef %41, ptr noundef nonnull %5)
  %42 = load ptr, ptr %9, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %5, i64 20
  call void @SDL_RenderGetClipRect(ptr noundef %42, ptr noundef nonnull %43)
  %44 = getelementptr inbounds i8, ptr %0, i64 24
  %.sroa.037.0.copyload = load float, ptr %44, align 8, !tbaa !5
  %.sroa.539.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 28
  %.sroa.539.0.copyload = load float, ptr %.sroa.539.0..sroa_idx, align 4, !tbaa !5
  %.sroa.0.0.copyload = load float, ptr %4, align 4, !tbaa !5
  %.sroa.5.0.copyload = load float, ptr %25, align 4, !tbaa !5
  call void @_ZL38ImGui_ImplSDLRenderer_SetupRenderStatev()
  %45 = getelementptr inbounds i8, ptr %0, i64 4
  %46 = load i32, ptr %45, align 4, !tbaa !23
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %.lr.ph73, label %._crit_edge74

.lr.ph73:                                         ; preds = %35
  %48 = getelementptr inbounds i8, ptr %0, i64 16
  %49 = getelementptr inbounds i8, ptr %6, i64 4
  %50 = extractelement <2 x i32> %31, i64 0
  %51 = sitofp i32 %50 to float
  %52 = getelementptr inbounds i8, ptr %7, i64 4
  %53 = extractelement <2 x i32> %31, i64 1
  %54 = sitofp i32 %53 to float
  br label %62

._crit_edge74:                                    ; preds = %._crit_edge, %35
  %55 = load ptr, ptr %9, align 8, !tbaa !9
  %56 = call i32 @SDL_RenderSetViewport(ptr noundef %55, ptr noundef nonnull %5)
  %57 = load ptr, ptr %9, align 8, !tbaa !9
  %58 = load i8, ptr %39, align 4, !tbaa !20, !range !24, !noundef !25
  %59 = trunc nuw i8 %58 to i1
  %60 = select i1 %59, ptr %43, ptr null
  %61 = call i32 @SDL_RenderSetClipRect(ptr noundef %57, ptr noundef %60)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %5) #6
  br label %155

62:                                               ; preds = %.lr.ph73, %._crit_edge
  %63 = phi i32 [ %46, %.lr.ph73 ], [ %74, %._crit_edge ]
  %indvars.iv = phi i64 [ 0, %.lr.ph73 ], [ %indvars.iv.next, %._crit_edge ]
  %64 = load ptr, ptr %48, align 8, !tbaa !26
  %65 = getelementptr inbounds ptr, ptr %64, i64 %indvars.iv
  %66 = load ptr, ptr %65, align 8, !tbaa !27
  %67 = getelementptr inbounds i8, ptr %66, i64 32
  %68 = getelementptr inbounds i8, ptr %66, i64 40
  %69 = load ptr, ptr %68, align 8, !tbaa !28
  %70 = getelementptr inbounds i8, ptr %66, i64 24
  %71 = load ptr, ptr %70, align 8, !tbaa !40
  %72 = load i32, ptr %66, align 8, !tbaa !41
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %151
  %.pre = load i32, ptr %45, align 4, !tbaa !23
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %62
  %74 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %63, %62 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next, %75
  br i1 %76, label %62, label %._crit_edge74, !llvm.loop !42

.lr.ph:                                           ; preds = %62, %151
  %.06470 = phi i32 [ %152, %151 ], [ 0, %62 ]
  %77 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %66, i32 noundef %.06470)
  %78 = getelementptr inbounds i8, ptr %77, i64 40
  %79 = load ptr, ptr %78, align 8, !tbaa !44
  %magicptr = ptrtoint ptr %79 to i64
  switch i64 %magicptr, label %81 [
    i64 0, label %82
    i64 -1, label %80
  ]

80:                                               ; preds = %.lr.ph
  call void @_ZL38ImGui_ImplSDLRenderer_SetupRenderStatev()
  br label %151

81:                                               ; preds = %.lr.ph
  call void %79(ptr noundef nonnull %66, ptr noundef nonnull %77)
  br label %151

82:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %83 = load float, ptr %77, align 8, !tbaa !46
  %84 = fsub float %83, %.sroa.037.0.copyload
  %85 = fmul float %.sroa.0.0.copyload, %84
  %86 = getelementptr inbounds i8, ptr %77, i64 4
  %87 = load float, ptr %86, align 4, !tbaa !47
  %88 = fsub float %87, %.sroa.539.0.copyload
  %89 = fmul float %.sroa.5.0.copyload, %88
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef %85, float noundef %89)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %90 = getelementptr inbounds i8, ptr %77, i64 8
  %91 = load float, ptr %90, align 8, !tbaa !48
  %92 = fsub float %91, %.sroa.037.0.copyload
  %93 = fmul float %.sroa.0.0.copyload, %92
  %94 = getelementptr inbounds i8, ptr %77, i64 12
  %95 = load float, ptr %94, align 4, !tbaa !49
  %96 = fsub float %95, %.sroa.539.0.copyload
  %97 = fmul float %.sroa.5.0.copyload, %96
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %93, float noundef %97)
  %98 = load float, ptr %6, align 4, !tbaa !17
  %99 = fcmp olt float %98, 0.000000e+00
  br i1 %99, label %100, label %101

100:                                              ; preds = %82
  store float 0.000000e+00, ptr %6, align 4, !tbaa !17
  br label %101

101:                                              ; preds = %100, %82
  %102 = phi float [ 0.000000e+00, %100 ], [ %98, %82 ]
  %103 = load float, ptr %49, align 4, !tbaa !19
  %104 = fcmp olt float %103, 0.000000e+00
  br i1 %104, label %105, label %106

105:                                              ; preds = %101
  store float 0.000000e+00, ptr %49, align 4, !tbaa !19
  br label %106

106:                                              ; preds = %105, %101
  %107 = phi float [ 0.000000e+00, %105 ], [ %103, %101 ]
  %108 = load float, ptr %7, align 4, !tbaa !17
  %109 = fcmp ogt float %108, %51
  br i1 %109, label %110, label %111

110:                                              ; preds = %106
  store float %51, ptr %7, align 4, !tbaa !17
  br label %111

111:                                              ; preds = %110, %106
  %112 = phi float [ %51, %110 ], [ %108, %106 ]
  %113 = load float, ptr %52, align 4, !tbaa !19
  %114 = fcmp ogt float %113, %54
  br i1 %114, label %115, label %116

115:                                              ; preds = %111
  store float %54, ptr %52, align 4, !tbaa !19
  br label %116

116:                                              ; preds = %115, %111
  %117 = phi float [ %54, %115 ], [ %113, %111 ]
  %118 = fcmp ugt float %112, %102
  %119 = fcmp ugt float %117, %107
  %or.cond76 = select i1 %118, i1 %119, i1 false
  br i1 %or.cond76, label %.critedge, label %150

.critedge:                                        ; preds = %116
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %120 = insertelement <2 x float> poison, float %112, i64 0
  %121 = insertelement <2 x float> %120, float %117, i64 1
  %122 = insertelement <2 x float> poison, float %102, i64 0
  %123 = insertelement <2 x float> %122, float %107, i64 1
  %124 = fsub <2 x float> %121, %123
  %125 = insertelement <4 x float> poison, float %102, i64 0
  %126 = insertelement <4 x float> %125, float %107, i64 1
  %127 = shufflevector <2 x float> %124, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %128 = shufflevector <4 x float> %126, <4 x float> %127, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
  %129 = fptosi <4 x float> %128 to <4 x i32>
  store <4 x i32> %129, ptr %8, align 16, !tbaa !50
  %130 = load ptr, ptr %9, align 8, !tbaa !9
  %131 = call i32 @SDL_RenderSetClipRect(ptr noundef %130, ptr noundef nonnull %8)
  %132 = getelementptr inbounds i8, ptr %77, i64 24
  %133 = load i32, ptr %132, align 8, !tbaa !51
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds %struct.ImDrawVert, ptr %69, i64 %134
  %136 = getelementptr inbounds i8, ptr %135, i64 8
  %137 = getelementptr inbounds i8, ptr %135, i64 16
  %138 = call noundef ptr @_ZNK9ImDrawCmd8GetTexIDEv(ptr noundef nonnull align 8 dereferenceable(56) %77)
  %139 = load ptr, ptr %9, align 8, !tbaa !9
  %140 = load i32, ptr %67, align 8, !tbaa !52
  %141 = load i32, ptr %132, align 8, !tbaa !51
  %142 = sub i32 %140, %141
  %143 = getelementptr inbounds i8, ptr %77, i64 28
  %144 = load i32, ptr %143, align 4, !tbaa !53
  %145 = zext i32 %144 to i64
  %146 = getelementptr inbounds i16, ptr %71, i64 %145
  %147 = getelementptr inbounds i8, ptr %77, i64 32
  %148 = load i32, ptr %147, align 8, !tbaa !54
  %149 = call i32 @SDL_RenderGeometryRaw(ptr noundef %139, ptr noundef %138, ptr noundef %135, i32 noundef 20, ptr noundef nonnull %137, i32 noundef 20, ptr noundef nonnull %136, i32 noundef 20, i32 noundef %142, ptr noundef %146, i32 noundef %148, i32 noundef 2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %151

150:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %151

151:                                              ; preds = %81, %80, %.critedge, %150
  %152 = add nuw nsw i32 %.06470, 1
  %153 = load i32, ptr %66, align 8, !tbaa !41
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !55

155:                                              ; preds = %23, %._crit_edge74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  ret void
}

declare void @SDL_RenderGetScale(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare i32 @SDL_RenderIsClipEnabled(ptr noundef) local_unnamed_addr #2

declare void @SDL_RenderGetViewport(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @SDL_RenderGetClipRect(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL38ImGui_ImplSDLRenderer_SetupRenderStatev() local_unnamed_addr #1

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

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

declare i32 @SDL_RenderSetClipRect(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9ImDrawCmd8GetTexIDEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5 align 2

declare i32 @SDL_RenderGeometryRaw(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @SDL_RenderSetViewport(ptr noundef, ptr noundef) local_unnamed_addr #2

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


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