; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/ImGui (imgui_draw)

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 @_ZN18ImDrawListSplitter5MergeEP10ImDrawList(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %3, align 8
  %22 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = icmp sle i32 %23, 1
  br i1 %24, label %25, label %26

25:                                               ; preds = %2
  br label %344

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN18ImDrawListSplitter17SetCurrentChannelEP10ImDrawListi(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef %27, i32 noundef 0)
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN10ImDrawList17_PopUnusedDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196) %28)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %29 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %32, label %42

32:                                               ; preds = %26
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.ImDrawList, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %struct.ImVector.0, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !14
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %38, label %42

38:                                               ; preds = %32
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ImDrawList, ptr %39, i32 0, i32 0
  %41 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %40)
  br label %43

42:                                               ; preds = %32, %26
  br label %43

43:                                               ; preds = %42, %38
  %44 = phi ptr [ %41, %38 ], [ null, %42 ]
  store ptr %44, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %55

47:                                               ; preds = %43
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ImDrawCmd, ptr %48, i32 0, i32 3
  %50 = load i32, ptr %49, align 4, !tbaa !25
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ImDrawCmd, ptr %51, i32 0, i32 4
  %53 = load i32, ptr %52, align 8, !tbaa !27
  %54 = add i32 %50, %53
  br label %56

55:                                               ; preds = %43
  br label %56

56:                                               ; preds = %55, %47
  %57 = phi i32 [ %54, %47 ], [ 0, %55 ]
  store i32 %57, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !13
  br label %58

58:                                               ; preds = %194, %56
  %59 = load i32, ptr %9, align 4, !tbaa !13
  %60 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 1
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = icmp slt i32 %59, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %58
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %197

64:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %65 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 2
  %66 = load i32, ptr %9, align 4, !tbaa !13
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %65, i32 noundef %66)
  store ptr %67, ptr %11, align 8, !tbaa !5
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ImDrawChannel, ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds %struct.ImVector.0, ptr %69, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !28
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %73, label %90

73:                                               ; preds = %64
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ImDrawChannel, ptr %74, i32 0, i32 0
  %76 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %75)
  %77 = getelementptr inbounds %struct.ImDrawCmd, ptr %76, i32 0, i32 4
  %78 = load i32, ptr %77, align 8, !tbaa !27
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %90

80:                                               ; preds = %73
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ImDrawChannel, ptr %81, i32 0, i32 0
  %83 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %82)
  %84 = getelementptr inbounds %struct.ImDrawCmd, ptr %83, i32 0, i32 5
  %85 = load ptr, ptr %84, align 8, !tbaa !30
  %86 = icmp eq ptr %85, null
  br i1 %86, label %87, label %90

87:                                               ; preds = %80
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ImDrawChannel, ptr %88, i32 0, i32 0
  call void @_ZN8ImVectorI9ImDrawCmdE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(16) %89)
  br label %90

90:                                               ; preds = %87, %80, %73, %64
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ImDrawChannel, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.ImVector.0, ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !28
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %96, label %138

96:                                               ; preds = %90
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %138

99:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ImDrawChannel, ptr %100, i32 0, i32 0
  %102 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %101, i32 noundef 0)
  store ptr %102, ptr %12, align 8, !tbaa !5
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = call i32 @memcmp(ptr noundef %103, ptr noundef %104, i64 noundef 28) #7
  %106 = icmp eq i32 %105, 0
  br i1 %106, label %107, label %137

107:                                              ; preds = %99
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ImDrawCmd, ptr %108, i32 0, i32 5
  %110 = load ptr, ptr %109, align 8, !tbaa !30
  %111 = icmp eq ptr %110, null
  br i1 %111, label %112, label %137

112:                                              ; preds = %107
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ImDrawCmd, ptr %113, i32 0, i32 5
  %115 = load ptr, ptr %114, align 8, !tbaa !30
  %116 = icmp eq ptr %115, null
  br i1 %116, label %117, label %137

117:                                              ; preds = %112
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ImDrawCmd, ptr %118, i32 0, i32 4
  %120 = load i32, ptr %119, align 8, !tbaa !27
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ImDrawCmd, ptr %121, i32 0, i32 4
  %123 = load i32, ptr %122, align 8, !tbaa !27
  %124 = add i32 %123, %120
  store i32 %124, ptr %122, align 8, !tbaa !27
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ImDrawCmd, ptr %125, i32 0, i32 4
  %127 = load i32, ptr %126, align 8, !tbaa !27
  %128 = load i32, ptr %8, align 4, !tbaa !13
  %129 = add i32 %128, %127
  store i32 %129, ptr %8, align 4, !tbaa !13
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.ImDrawChannel, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.ImDrawChannel, ptr %132, i32 0, i32 0
  %134 = getelementptr inbounds %struct.ImVector.0, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !31
  %136 = call noundef ptr @_ZN8ImVectorI9ImDrawCmdE5eraseEPKS0_(ptr noundef nonnull align 8 dereferenceable(16) %131, ptr noundef %135)
  br label %137

137:                                              ; preds = %117, %112, %107, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %138

138:                                              ; preds = %137, %96, %90
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.ImDrawChannel, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %struct.ImVector.0, ptr %140, i32 0, i32 0
  %142 = load i32, ptr %141, align 8, !tbaa !28
  %143 = icmp sgt i32 %142, 0
  br i1 %143, label %144, label %148

144:                                              ; preds = %138
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.ImDrawChannel, ptr %145, i32 0, i32 0
  %147 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %146)
  store ptr %147, ptr %7, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %144, %138
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.ImDrawChannel, ptr %149, i32 0, i32 0
  %151 = getelementptr inbounds %struct.ImVector.0, ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 8, !tbaa !28
  %153 = load i32, ptr %5, align 4, !tbaa !13
  %154 = add nsw i32 %153, %152
  store i32 %154, ptr %5, align 4, !tbaa !13
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.ImDrawChannel, ptr %155, i32 0, i32 1
  %157 = getelementptr inbounds %struct.ImVector.1, ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !32
  %159 = load i32, ptr %6, align 4, !tbaa !13
  %160 = add nsw i32 %159, %158
  store i32 %160, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %161

161:                                              ; preds = %190, %148
  %162 = load i32, ptr %13, align 4, !tbaa !13
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.ImDrawChannel, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds %struct.ImVector.0, ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 8, !tbaa !28
  %167 = icmp slt i32 %162, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %161
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %193

169:                                              ; preds = %161
  %170 = load i32, ptr %8, align 4, !tbaa !13
  %171 = load ptr, ptr %11, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.ImDrawChannel, ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds %struct.ImVector.0, ptr %172, i32 0, i32 2
  %174 = load ptr, ptr %173, align 8, !tbaa !31
  %175 = load i32, ptr %13, align 4, !tbaa !13
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %struct.ImDrawCmd, ptr %174, i64 %176
  %178 = getelementptr inbounds %struct.ImDrawCmd, ptr %177, i32 0, i32 3
  store i32 %170, ptr %178, align 4, !tbaa !25
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.ImDrawChannel, ptr %179, i32 0, i32 0
  %181 = getelementptr inbounds %struct.ImVector.0, ptr %180, i32 0, i32 2
  %182 = load ptr, ptr %181, align 8, !tbaa !31
  %183 = load i32, ptr %13, align 4, !tbaa !13
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.ImDrawCmd, ptr %182, i64 %184
  %186 = getelementptr inbounds %struct.ImDrawCmd, ptr %185, i32 0, i32 4
  %187 = load i32, ptr %186, align 8, !tbaa !27
  %188 = load i32, ptr %8, align 4, !tbaa !13
  %189 = add i32 %188, %187
  store i32 %189, ptr %8, align 4, !tbaa !13
  br label %190

190:                                              ; preds = %169
  %191 = load i32, ptr %13, align 4, !tbaa !13
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %13, align 4, !tbaa !13
  br label %161, !llvm.loop !33

193:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %9, align 4, !tbaa !13
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %9, align 4, !tbaa !13
  br label %58, !llvm.loop !35

197:                                              ; preds = %63
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.ImDrawList, ptr %198, i32 0, i32 0
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.ImDrawList, ptr %200, i32 0, i32 0
  %202 = getelementptr inbounds %struct.ImVector.0, ptr %201, i32 0, i32 0
  %203 = load i32, ptr %202, align 8, !tbaa !14
  %204 = load i32, ptr %5, align 4, !tbaa !13
  %205 = add nsw i32 %203, %204
  call void @_ZN8ImVectorI9ImDrawCmdE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %199, i32 noundef %205)
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ImDrawList, ptr %206, i32 0, i32 1
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.ImDrawList, ptr %208, i32 0, i32 1
  %210 = getelementptr inbounds %struct.ImVector.1, ptr %209, i32 0, i32 0
  %211 = load i32, ptr %210, align 8, !tbaa !36
  %212 = load i32, ptr %6, align 4, !tbaa !13
  %213 = add nsw i32 %211, %212
  call void @_ZN8ImVectorItE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %207, i32 noundef %213)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.ImDrawList, ptr %214, i32 0, i32 0
  %216 = getelementptr inbounds %struct.ImVector.0, ptr %215, i32 0, i32 2
  %217 = load ptr, ptr %216, align 8, !tbaa !37
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.ImDrawList, ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds %struct.ImVector.0, ptr %219, i32 0, i32 0
  %221 = load i32, ptr %220, align 8, !tbaa !14
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds %struct.ImDrawCmd, ptr %217, i64 %222
  %224 = load i32, ptr %5, align 4, !tbaa !13
  %225 = sext i32 %224 to i64
  %226 = sub i64 0, %225
  %227 = getelementptr inbounds %struct.ImDrawCmd, ptr %223, i64 %226
  store ptr %227, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.ImDrawList, ptr %228, i32 0, i32 1
  %230 = getelementptr inbounds %struct.ImVector.1, ptr %229, i32 0, i32 2
  %231 = load ptr, ptr %230, align 8, !tbaa !38
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.ImDrawList, ptr %232, i32 0, i32 1
  %234 = getelementptr inbounds %struct.ImVector.1, ptr %233, i32 0, i32 0
  %235 = load i32, ptr %234, align 8, !tbaa !36
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds i16, ptr %231, i64 %236
  %238 = load i32, ptr %6, align 4, !tbaa !13
  %239 = sext i32 %238 to i64
  %240 = sub i64 0, %239
  %241 = getelementptr inbounds i16, ptr %237, i64 %240
  store ptr %241, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !13
  br label %242

242:                                              ; preds = %292, %197
  %243 = load i32, ptr %16, align 4, !tbaa !13
  %244 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 1
  %245 = load i32, ptr %244, align 4, !tbaa !9
  %246 = icmp slt i32 %243, %245
  br i1 %246, label %248, label %247

247:                                              ; preds = %242
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %295

248:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %249 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 2
  %250 = load i32, ptr %16, align 4, !tbaa !13
  %251 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %249, i32 noundef %250)
  store ptr %251, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %252 = load ptr, ptr %17, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.ImDrawChannel, ptr %252, i32 0, i32 0
  %254 = getelementptr inbounds %struct.ImVector.0, ptr %253, i32 0, i32 0
  %255 = load i32, ptr %254, align 8, !tbaa !28
  store i32 %255, ptr %18, align 4, !tbaa !13
  %256 = load i32, ptr %18, align 4, !tbaa !13
  %257 = icmp ne i32 %256, 0
  br i1 %257, label %258, label %271

258:                                              ; preds = %248
  %259 = load ptr, ptr %14, align 8, !tbaa !5
  %260 = load ptr, ptr %17, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.ImDrawChannel, ptr %260, i32 0, i32 0
  %262 = getelementptr inbounds %struct.ImVector.0, ptr %261, i32 0, i32 2
  %263 = load ptr, ptr %262, align 8, !tbaa !31
  %264 = load i32, ptr %18, align 4, !tbaa !13
  %265 = sext i32 %264 to i64
  %266 = mul i64 %265, 56
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %259, ptr align 8 %263, i64 %266, i1 false)
  %267 = load i32, ptr %18, align 4, !tbaa !13
  %268 = load ptr, ptr %14, align 8, !tbaa !5
  %269 = sext i32 %267 to i64
  %270 = getelementptr inbounds %struct.ImDrawCmd, ptr %268, i64 %269
  store ptr %270, ptr %14, align 8, !tbaa !5
  br label %271

271:                                              ; preds = %258, %248
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %272 = load ptr, ptr %17, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.ImDrawChannel, ptr %272, i32 0, i32 1
  %274 = getelementptr inbounds %struct.ImVector.1, ptr %273, i32 0, i32 0
  %275 = load i32, ptr %274, align 8, !tbaa !32
  store i32 %275, ptr %19, align 4, !tbaa !13
  %276 = load i32, ptr %19, align 4, !tbaa !13
  %277 = icmp ne i32 %276, 0
  br i1 %277, label %278, label %291

278:                                              ; preds = %271
  %279 = load ptr, ptr %15, align 8, !tbaa !5
  %280 = load ptr, ptr %17, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.ImDrawChannel, ptr %280, i32 0, i32 1
  %282 = getelementptr inbounds %struct.ImVector.1, ptr %281, i32 0, i32 2
  %283 = load ptr, ptr %282, align 8, !tbaa !39
  %284 = load i32, ptr %19, align 4, !tbaa !13
  %285 = sext i32 %284 to i64
  %286 = mul i64 %285, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %279, ptr align 2 %283, i64 %286, i1 false)
  %287 = load i32, ptr %19, align 4, !tbaa !13
  %288 = load ptr, ptr %15, align 8, !tbaa !5
  %289 = sext i32 %287 to i64
  %290 = getelementptr inbounds i16, ptr %288, i64 %289
  store ptr %290, ptr %15, align 8, !tbaa !5
  br label %291

291:                                              ; preds = %278, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %292

292:                                              ; preds = %291
  %293 = load i32, ptr %16, align 4, !tbaa !13
  %294 = add nsw i32 %293, 1
  store i32 %294, ptr %16, align 4, !tbaa !13
  br label %242, !llvm.loop !40

295:                                              ; preds = %247
  %296 = load ptr, ptr %15, align 8, !tbaa !5
  %297 = load ptr, ptr %4, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.ImDrawList, ptr %297, i32 0, i32 8
  store ptr %296, ptr %298, align 8, !tbaa !41
  %299 = load ptr, ptr %4, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.ImDrawList, ptr %299, i32 0, i32 0
  %301 = getelementptr inbounds %struct.ImVector.0, ptr %300, i32 0, i32 0
  %302 = load i32, ptr %301, align 8, !tbaa !14
  %303 = icmp eq i32 %302, 0
  br i1 %303, label %311, label %304

304:                                              ; preds = %295
  %305 = load ptr, ptr %4, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.ImDrawList, ptr %305, i32 0, i32 0
  %307 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %306)
  %308 = getelementptr inbounds %struct.ImDrawCmd, ptr %307, i32 0, i32 5
  %309 = load ptr, ptr %308, align 8, !tbaa !30
  %310 = icmp ne ptr %309, null
  br i1 %310, label %311, label %313

311:                                              ; preds = %304, %295
  %312 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN10ImDrawList10AddDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196) %312)
  br label %313

313:                                              ; preds = %311, %304
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %314 = load ptr, ptr %4, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.ImDrawList, ptr %314, i32 0, i32 0
  %316 = getelementptr inbounds %struct.ImVector.0, ptr %315, i32 0, i32 2
  %317 = load ptr, ptr %316, align 8, !tbaa !37
  %318 = load ptr, ptr %4, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.ImDrawList, ptr %318, i32 0, i32 0
  %320 = getelementptr inbounds %struct.ImVector.0, ptr %319, i32 0, i32 0
  %321 = load i32, ptr %320, align 8, !tbaa !14
  %322 = sub nsw i32 %321, 1
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds %struct.ImDrawCmd, ptr %317, i64 %323
  store ptr %324, ptr %20, align 8, !tbaa !5
  %325 = load ptr, ptr %20, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.ImDrawCmd, ptr %325, i32 0, i32 4
  %327 = load i32, ptr %326, align 8, !tbaa !27
  %328 = icmp eq i32 %327, 0
  br i1 %328, label %329, label %333

329:                                              ; preds = %313
  %330 = load ptr, ptr %20, align 8, !tbaa !5
  %331 = load ptr, ptr %4, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.ImDrawList, ptr %331, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %330, ptr align 8 %332, i64 28, i1 false)
  br label %342

333:                                              ; preds = %313
  %334 = load ptr, ptr %20, align 8, !tbaa !5
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.ImDrawList, ptr %335, i32 0, i32 12
  %337 = call i32 @memcmp(ptr noundef %334, ptr noundef %336, i64 noundef 28) #7
  %338 = icmp ne i32 %337, 0
  br i1 %338, label %339, label %341

339:                                              ; preds = %333
  %340 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN10ImDrawList10AddDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196) %340)
  br label %341

341:                                              ; preds = %339, %333
  br label %342

342:                                              ; preds = %341, %329
  %343 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 1
  store i32 1, ptr %343, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  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 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %344

344:                                              ; preds = %342, %25
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList10AddDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList17_PopUnusedDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196)) #2 align 2

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18ImDrawListSplitter17SetCurrentChannelEP10ImDrawListi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef) #2 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 = { nounwind willreturn memory(read) "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 }
attributes #7 = { nounwind willreturn memory(read) }

!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, !11, i64 4}
!10 = !{!"_ZTS18ImDrawListSplitter", !11, i64 0, !11, i64 4, !12, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !11, i64 0, !11, i64 4, !6, i64 8}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTS10ImDrawList", !16, i64 0, !17, i64 16, !18, i64 32, !11, i64 48, !11, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !19, i64 88, !20, i64 104, !21, i64 120, !22, i64 136, !10, i64 168, !24, i64 192}
!16 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !11, i64 0, !11, i64 4, !6, i64 8}
!17 = !{!"_ZTS8ImVectorItE", !11, i64 0, !11, i64 4, !6, i64 8}
!18 = !{!"_ZTS8ImVectorI10ImDrawVertE", !11, i64 0, !11, i64 4, !6, i64 8}
!19 = !{!"_ZTS8ImVectorI6ImVec4E", !11, i64 0, !11, i64 4, !6, i64 8}
!20 = !{!"_ZTS8ImVectorIPvE", !11, i64 0, !11, i64 4, !6, i64 8}
!21 = !{!"_ZTS8ImVectorI6ImVec2E", !11, i64 0, !11, i64 4, !6, i64 8}
!22 = !{!"_ZTS15ImDrawCmdHeader", !23, i64 0, !6, i64 16, !11, i64 24}
!23 = !{!"_ZTS6ImVec4", !24, i64 0, !24, i64 4, !24, i64 8, !24, i64 12}
!24 = !{!"float", !7, i64 0}
!25 = !{!26, !11, i64 28}
!26 = !{!"_ZTS9ImDrawCmd", !23, i64 0, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !6, i64 40, !6, i64 48}
!27 = !{!26, !11, i64 32}
!28 = !{!29, !11, i64 0}
!29 = !{!"_ZTS13ImDrawChannel", !16, i64 0, !17, i64 16}
!30 = !{!26, !6, i64 40}
!31 = !{!29, !6, i64 8}
!32 = !{!29, !11, i64 16}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = !{!15, !11, i64 16}
!37 = !{!15, !6, i64 8}
!38 = !{!15, !6, i64 24}
!39 = !{!29, !6, i64 24}
!40 = distinct !{!40, !34}
!41 = !{!15, !6, i64 80}


; 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.ImDrawCmd = type { %struct.ImVec4, ptr, i32, i32, i32, ptr, ptr }
%struct.ImVec4 = type { float, float, float, float }

; Function Attrs: mustprogress 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) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN18ImDrawListSplitter5MergeEP10ImDrawList(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp slt i32 %4, 2
  br i1 %5, label %163, label %6

6:                                                ; preds = %2
  tail call void @_ZN18ImDrawListSplitter17SetCurrentChannelEP10ImDrawListi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, i32 noundef 0)
  tail call void @_ZN10ImDrawList17_PopUnusedDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196) %1)
  %7 = load i32, ptr %3, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %9, label %._crit_edge117

9:                                                ; preds = %6
  %10 = load i32, ptr %1, align 8, !tbaa !12
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %12, label %.thread

12:                                               ; preds = %9
  %13 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %14 = getelementptr inbounds i8, ptr %13, i64 28
  %15 = load i32, ptr %14, align 4, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %13, i64 32
  %17 = load i32, ptr %16, align 8, !tbaa !25
  %18 = add i32 %17, %15
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %9, %12
  %19 = phi i32 [ %.pre, %12 ], [ %7, %9 ]
  %20 = phi ptr [ %13, %12 ], [ null, %9 ]
  %21 = phi i32 [ %18, %12 ], [ 0, %9 ]
  %22 = icmp sgt i32 %19, 1
  br i1 %22, label %.lr.ph116, label %._crit_edge117

.lr.ph116:                                        ; preds = %.thread
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  br label %48

._crit_edge117:                                   ; preds = %._crit_edge, %6, %.thread
  %.085.lcssa = phi i32 [ 0, %.thread ], [ 0, %6 ], [ %106, %._crit_edge ]
  %.0.lcssa = phi i32 [ 0, %.thread ], [ 0, %6 ], [ %105, %._crit_edge ]
  %24 = load i32, ptr %1, align 8, !tbaa !12
  %25 = add nsw i32 %24, %.0.lcssa
  tail call void @_ZN8ImVectorI9ImDrawCmdE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %25)
  %26 = getelementptr inbounds i8, ptr %1, i64 16
  %27 = load i32, ptr %26, align 8, !tbaa !26
  %28 = add nsw i32 %27, %.085.lcssa
  tail call void @_ZN8ImVectorItE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %26, i32 noundef %28)
  %29 = getelementptr inbounds i8, ptr %1, i64 8
  %30 = getelementptr inbounds i8, ptr %1, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !27
  %32 = load i32, ptr %26, align 8, !tbaa !26
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i16, ptr %31, i64 %33
  %35 = sext i32 %.085.lcssa to i64
  %36 = sub nsw i64 0, %35
  %37 = getelementptr inbounds i16, ptr %34, i64 %36
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = icmp sgt i32 %38, 1
  br i1 %39, label %.lr.ph124, label %._crit_edge125

.lr.ph124:                                        ; preds = %._crit_edge117
  %40 = load ptr, ptr %29, align 8, !tbaa !28
  %41 = load i32, ptr %1, align 8, !tbaa !12
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct.ImDrawCmd, ptr %40, i64 %42
  %44 = sext i32 %.0.lcssa to i64
  %45 = sub nsw i64 0, %44
  %46 = getelementptr inbounds %struct.ImDrawCmd, ptr %43, i64 %45
  %47 = getelementptr inbounds i8, ptr %0, i64 8
  br label %122

48:                                               ; preds = %.lr.ph116, %._crit_edge
  %.0115 = phi i32 [ 0, %.lr.ph116 ], [ %105, %._crit_edge ]
  %.085114 = phi i32 [ 0, %.lr.ph116 ], [ %106, %._crit_edge ]
  %.086112 = phi ptr [ %20, %.lr.ph116 ], [ %.1133, %._crit_edge ]
  %.087111 = phi i32 [ %21, %.lr.ph116 ], [ %.3.lcssa, %._crit_edge ]
  %.095110 = phi i32 [ 1, %.lr.ph116 ], [ %107, %._crit_edge ]
  %49 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %23, i32 noundef %.095110)
  %50 = load i32, ptr %49, align 8, !tbaa !29
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %52, label %63

52:                                               ; preds = %48
  %53 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %49)
  %54 = getelementptr inbounds i8, ptr %53, i64 32
  %55 = load i32, ptr %54, align 8, !tbaa !25
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %63

57:                                               ; preds = %52
  %58 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %49)
  %59 = getelementptr inbounds i8, ptr %58, i64 40
  %60 = load ptr, ptr %59, align 8, !tbaa !31
  %61 = icmp eq ptr %60, null
  br i1 %61, label %62, label %63

62:                                               ; preds = %57
  tail call void @_ZN8ImVectorI9ImDrawCmdE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(16) %49)
  br label %63

63:                                               ; preds = %62, %57, %52, %48
  %64 = load i32, ptr %49, align 8, !tbaa !29
  %65 = icmp sgt i32 %64, 0
  %66 = icmp ne ptr %.086112, null
  %or.cond = select i1 %65, i1 %66, i1 false
  br i1 %or.cond, label %67, label %88

67:                                               ; preds = %63
  %68 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %49, i32 noundef 0)
  %bcmp103 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(28) %.086112, ptr noundef nonnull dereferenceable(28) %68, i64 28)
  %69 = icmp eq i32 %bcmp103, 0
  br i1 %69, label %70, label %thread-pre-split

70:                                               ; preds = %67
  %71 = getelementptr inbounds i8, ptr %.086112, i64 40
  %72 = load ptr, ptr %71, align 8, !tbaa !31
  %73 = icmp eq ptr %72, null
  %74 = getelementptr inbounds i8, ptr %68, i64 40
  %75 = load ptr, ptr %74, align 8
  %76 = icmp eq ptr %75, null
  %or.cond106 = select i1 %73, i1 %76, i1 false
  br i1 %or.cond106, label %77, label %thread-pre-split

77:                                               ; preds = %70
  %78 = getelementptr inbounds i8, ptr %68, i64 32
  %79 = load i32, ptr %78, align 8, !tbaa !25
  %80 = getelementptr inbounds i8, ptr %.086112, i64 32
  %81 = load i32, ptr %80, align 8, !tbaa !25
  %82 = add i32 %81, %79
  store i32 %82, ptr %80, align 8, !tbaa !25
  %83 = load i32, ptr %78, align 8, !tbaa !25
  %84 = add i32 %83, %.087111
  %85 = getelementptr inbounds i8, ptr %49, i64 8
  %86 = load ptr, ptr %85, align 8, !tbaa !32
  %87 = tail call noundef ptr @_ZN8ImVectorI9ImDrawCmdE5eraseEPKS0_(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef %86)
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %77, %70, %67
  %.2.ph = phi i32 [ %.087111, %67 ], [ %.087111, %70 ], [ %84, %77 ]
  %.pr = load i32, ptr %49, align 8, !tbaa !29
  br label %88

88:                                               ; preds = %thread-pre-split, %63
  %89 = phi i32 [ %.pr, %thread-pre-split ], [ %64, %63 ]
  %.2 = phi i32 [ %.2.ph, %thread-pre-split ], [ %.087111, %63 ]
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %93, label %.thread131

.thread131:                                       ; preds = %88
  %91 = getelementptr inbounds i8, ptr %49, i64 16
  %92 = load i32, ptr %91, align 8, !tbaa !33
  br label %._crit_edge

93:                                               ; preds = %88
  %94 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %49)
  %.pre130 = load i32, ptr %49, align 8, !tbaa !29
  %95 = getelementptr inbounds i8, ptr %49, i64 16
  %96 = load i32, ptr %95, align 8, !tbaa !33
  %97 = icmp sgt i32 %.pre130, 0
  br i1 %97, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %93
  %98 = getelementptr inbounds i8, ptr %49, i64 8
  %99 = load ptr, ptr %98, align 8, !tbaa !32
  %wide.trip.count = zext nneg i32 %.pre130 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %100 = icmp eq i32 %.pre130, 1
  br i1 %100, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %110

._crit_edge.loopexit.unr-lcssa:                   ; preds = %110, %.lr.ph
  %.lcssa.ph = phi i32 [ poison, %.lr.ph ], [ %118, %110 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %110 ]
  %.3109.unr = phi i32 [ %.2, %.lr.ph ], [ %118, %110 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %101 = getelementptr inbounds %struct.ImDrawCmd, ptr %99, i64 %indvars.iv.unr, i32 3
  store i32 %.3109.unr, ptr %101, align 4, !tbaa !23
  %102 = getelementptr inbounds %struct.ImDrawCmd, ptr %99, i64 %indvars.iv.unr, i32 4
  %103 = load i32, ptr %102, align 8, !tbaa !25
  %104 = add i32 %103, %.3109.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %.thread131, %93
  %.pn = phi i32 [ %96, %93 ], [ %92, %.thread131 ], [ %96, %._crit_edge.loopexit.unr-lcssa ], [ %96, %._crit_edge.loopexit.epilog-lcssa ]
  %.pre130.pn = phi i32 [ %.pre130, %93 ], [ %89, %.thread131 ], [ %.pre130, %._crit_edge.loopexit.unr-lcssa ], [ %.pre130, %._crit_edge.loopexit.epilog-lcssa ]
  %.1133 = phi ptr [ %94, %93 ], [ %.086112, %.thread131 ], [ %94, %._crit_edge.loopexit.unr-lcssa ], [ %94, %._crit_edge.loopexit.epilog-lcssa ]
  %.3.lcssa = phi i32 [ %.2, %93 ], [ %.2, %.thread131 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %104, %._crit_edge.loopexit.epilog-lcssa ]
  %105 = add nsw i32 %.pre130.pn, %.0115
  %106 = add nsw i32 %.pn, %.085114
  %107 = add nuw nsw i32 %.095110, 1
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %48, label %._crit_edge117, !llvm.loop !34

110:                                              ; preds = %110, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %110 ]
  %.3109 = phi i32 [ %.2, %.lr.ph.new ], [ %118, %110 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %110 ]
  %111 = getelementptr inbounds %struct.ImDrawCmd, ptr %99, i64 %indvars.iv, i32 3
  store i32 %.3109, ptr %111, align 4, !tbaa !23
  %112 = getelementptr inbounds %struct.ImDrawCmd, ptr %99, i64 %indvars.iv, i32 4
  %113 = load i32, ptr %112, align 8, !tbaa !25
  %114 = add i32 %113, %.3109
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %115 = getelementptr inbounds %struct.ImDrawCmd, ptr %99, i64 %indvars.iv.next, i32 3
  store i32 %114, ptr %115, align 4, !tbaa !23
  %116 = getelementptr inbounds %struct.ImDrawCmd, ptr %99, i64 %indvars.iv.next, i32 4
  %117 = load i32, ptr %116, align 8, !tbaa !25
  %118 = add i32 %117, %114
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %110, !llvm.loop !36

._crit_edge125:                                   ; preds = %140, %._crit_edge117
  %.090.lcssa = phi ptr [ %37, %._crit_edge117 ], [ %.191, %140 ]
  %119 = getelementptr inbounds i8, ptr %1, i64 80
  store ptr %.090.lcssa, ptr %119, align 8, !tbaa !37
  %120 = load i32, ptr %1, align 8, !tbaa !12
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %148, label %144

122:                                              ; preds = %.lr.ph124, %140
  %.089122 = phi i32 [ 1, %.lr.ph124 ], [ %141, %140 ]
  %.090121 = phi ptr [ %37, %.lr.ph124 ], [ %.191, %140 ]
  %.092120 = phi ptr [ %46, %.lr.ph124 ], [ %.193, %140 ]
  %123 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %47, i32 noundef %.089122)
  %124 = load i32, ptr %123, align 8, !tbaa !29
  %.not101 = icmp eq i32 %124, 0
  br i1 %.not101, label %131, label %125

125:                                              ; preds = %122
  %126 = getelementptr inbounds i8, ptr %123, i64 8
  %127 = load ptr, ptr %126, align 8, !tbaa !32
  %128 = sext i32 %124 to i64
  %129 = mul nsw i64 %128, 56
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %.092120, ptr align 8 %127, i64 %129, i1 false)
  %130 = getelementptr inbounds %struct.ImDrawCmd, ptr %.092120, i64 %128
  br label %131

131:                                              ; preds = %125, %122
  %.193 = phi ptr [ %130, %125 ], [ %.092120, %122 ]
  %132 = getelementptr inbounds i8, ptr %123, i64 16
  %133 = load i32, ptr %132, align 8, !tbaa !33
  %.not102 = icmp eq i32 %133, 0
  br i1 %.not102, label %140, label %134

134:                                              ; preds = %131
  %135 = getelementptr inbounds i8, ptr %123, i64 24
  %136 = load ptr, ptr %135, align 8, !tbaa !38
  %137 = sext i32 %133 to i64
  %138 = shl nsw i64 %137, 1
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 2 %.090121, ptr align 2 %136, i64 %138, i1 false)
  %139 = getelementptr inbounds i16, ptr %.090121, i64 %137
  br label %140

140:                                              ; preds = %134, %131
  %.191 = phi ptr [ %139, %134 ], [ %.090121, %131 ]
  %141 = add nuw nsw i32 %.089122, 1
  %142 = load i32, ptr %3, align 4, !tbaa !5
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %122, label %._crit_edge125, !llvm.loop !39

144:                                              ; preds = %._crit_edge125
  %145 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %146 = getelementptr inbounds i8, ptr %145, i64 40
  %147 = load ptr, ptr %146, align 8, !tbaa !31
  %.not99 = icmp eq ptr %147, null
  br i1 %.not99, label %149, label %148

148:                                              ; preds = %144, %._crit_edge125
  tail call void @_ZN10ImDrawList10AddDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196) %1)
  br label %149

149:                                              ; preds = %148, %144
  %150 = load ptr, ptr %29, align 8, !tbaa !28
  %151 = load i32, ptr %1, align 8, !tbaa !12
  %152 = sext i32 %151 to i64
  %153 = getelementptr %struct.ImDrawCmd, ptr %150, i64 %152
  %154 = getelementptr i8, ptr %153, i64 -56
  %155 = getelementptr i8, ptr %153, i64 -24
  %156 = load i32, ptr %155, align 8, !tbaa !25
  %157 = icmp eq i32 %156, 0
  %158 = getelementptr inbounds i8, ptr %1, i64 136
  br i1 %157, label %159, label %160

159:                                              ; preds = %149
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %154, ptr noundef nonnull align 8 dereferenceable(28) %158, i64 28, i1 false)
  br label %162

160:                                              ; preds = %149
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(28) %154, ptr noundef nonnull dereferenceable(28) %158, i64 28)
  %.not100 = icmp eq i32 %bcmp, 0
  br i1 %.not100, label %162, label %161

161:                                              ; preds = %160
  tail call void @_ZN10ImDrawList10AddDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196) %1)
  br label %162

162:                                              ; preds = %160, %161, %159
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %2, %162
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList10AddDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList17_PopUnusedDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18ImDrawListSplitter17SetCurrentChannelEP10ImDrawListi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree 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 = { inlinehint 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 = { nofree nounwind willreturn memory(argmem: read) }

!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, !7, i64 4}
!6 = !{!"_ZTS18ImDrawListSplitter", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !7, i64 0, !7, i64 4, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"_ZTS10ImDrawList", !14, i64 0, !15, i64 16, !16, i64 32, !7, i64 48, !7, i64 52, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !17, i64 88, !18, i64 104, !19, i64 120, !20, i64 136, !6, i64 168, !22, i64 192}
!14 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !7, i64 0, !7, i64 4, !11, i64 8}
!15 = !{!"_ZTS8ImVectorItE", !7, i64 0, !7, i64 4, !11, i64 8}
!16 = !{!"_ZTS8ImVectorI10ImDrawVertE", !7, i64 0, !7, i64 4, !11, i64 8}
!17 = !{!"_ZTS8ImVectorI6ImVec4E", !7, i64 0, !7, i64 4, !11, i64 8}
!18 = !{!"_ZTS8ImVectorIPvE", !7, i64 0, !7, i64 4, !11, i64 8}
!19 = !{!"_ZTS8ImVectorI6ImVec2E", !7, i64 0, !7, i64 4, !11, i64 8}
!20 = !{!"_ZTS15ImDrawCmdHeader", !21, i64 0, !11, i64 16, !7, i64 24}
!21 = !{!"_ZTS6ImVec4", !22, i64 0, !22, i64 4, !22, i64 8, !22, i64 12}
!22 = !{!"float", !8, i64 0}
!23 = !{!24, !7, i64 28}
!24 = !{!"_ZTS9ImDrawCmd", !21, i64 0, !11, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !11, i64 40, !11, i64 48}
!25 = !{!24, !7, i64 32}
!26 = !{!13, !7, i64 16}
!27 = !{!13, !11, i64 24}
!28 = !{!13, !11, i64 8}
!29 = !{!30, !7, i64 0}
!30 = !{!"_ZTS13ImDrawChannel", !14, i64 0, !15, i64 16}
!31 = !{!24, !11, i64 40}
!32 = !{!30, !11, i64 8}
!33 = !{!30, !7, i64 16}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = !{!13, !11, i64 80}
!38 = !{!30, !11, i64 24}
!39 = distinct !{!39, !35}


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