; LLVM IR from theolundqvist/parallax-voxel-ray-marcher :: src/external/Dear ImGui/imgui_draw.ll (ZN18ImDrawListSplitter5MergeEP10ImDrawList)

; 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, %struct.ImVector.0, %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 = type { i32, i32, ptr }
%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.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, %struct.ImVector.0 }

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI9ImDrawCmdE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList17_PopUnusedDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196)) #3 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
define dso_local void @_ZN18ImDrawListSplitter5MergeEP10ImDrawList(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) #3 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 %337

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, 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 = %187, %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 %190

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, 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 %83

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 %83

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

83:                                               ; preds = %80, %73, %64
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ImDrawChannel, ptr %84, i32 0, i32 0
  %86 = getelementptr inbounds %struct.ImVector, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !28
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %89, label %131

89:                                               ; preds = %83
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %131

92:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ImDrawChannel, ptr %93, i32 0, i32 0
  %95 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %94, i32 noundef 0)
  store ptr %95, ptr %12, align 8, !tbaa !5
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = call i32 @memcmp(ptr noundef %96, ptr noundef %97, i64 noundef 28) #7
  %99 = icmp eq i32 %98, 0
  br i1 %99, label %100, label %130

100:                                              ; preds = %92
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.ImDrawCmd, ptr %101, i32 0, i32 5
  %103 = load ptr, ptr %102, align 8, !tbaa !30
  %104 = icmp eq ptr %103, null
  br i1 %104, label %105, label %130

105:                                              ; preds = %100
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ImDrawCmd, ptr %106, i32 0, i32 5
  %108 = load ptr, ptr %107, align 8, !tbaa !30
  %109 = icmp eq ptr %108, null
  br i1 %109, label %110, label %130

110:                                              ; preds = %105
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ImDrawCmd, ptr %111, i32 0, i32 4
  %113 = load i32, ptr %112, align 8, !tbaa !27
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ImDrawCmd, ptr %114, i32 0, i32 4
  %116 = load i32, ptr %115, align 8, !tbaa !27
  %117 = add i32 %116, %113
  store i32 %117, ptr %115, align 8, !tbaa !27
  %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 i32, ptr %8, align 4, !tbaa !13
  %122 = add i32 %121, %120
  store i32 %122, ptr %8, align 4, !tbaa !13
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.ImDrawChannel, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ImDrawChannel, ptr %125, i32 0, i32 0
  %127 = getelementptr inbounds %struct.ImVector, ptr %126, i32 0, i32 2
  %128 = load ptr, ptr %127, align 8, !tbaa !31
  %129 = call noundef ptr @_ZN8ImVectorI9ImDrawCmdE5eraseEPKS0_(ptr noundef nonnull align 8 dereferenceable(16) %124, ptr noundef %128)
  br label %130

130:                                              ; preds = %110, %105, %100, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %131

131:                                              ; preds = %130, %89, %83
  %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, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !28
  %136 = icmp sgt i32 %135, 0
  br i1 %136, label %137, label %141

137:                                              ; preds = %131
  %138 = load ptr, ptr %11, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ImDrawChannel, ptr %138, i32 0, i32 0
  %140 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %139)
  store ptr %140, ptr %7, align 8, !tbaa !5
  br label %141

141:                                              ; preds = %137, %131
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ImDrawChannel, ptr %142, i32 0, i32 0
  %144 = getelementptr inbounds %struct.ImVector, ptr %143, i32 0, i32 0
  %145 = load i32, ptr %144, align 8, !tbaa !28
  %146 = load i32, ptr %5, align 4, !tbaa !13
  %147 = add nsw i32 %146, %145
  store i32 %147, ptr %5, align 4, !tbaa !13
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ImDrawChannel, ptr %148, i32 0, i32 1
  %150 = getelementptr inbounds %struct.ImVector.0, ptr %149, i32 0, i32 0
  %151 = load i32, ptr %150, align 8, !tbaa !32
  %152 = load i32, ptr %6, align 4, !tbaa !13
  %153 = add nsw i32 %152, %151
  store i32 %153, 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 %154

154:                                              ; preds = %183, %141
  %155 = load i32, ptr %13, align 4, !tbaa !13
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.ImDrawChannel, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %struct.ImVector, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 8, !tbaa !28
  %160 = icmp slt i32 %155, %159
  br i1 %160, label %162, label %161

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

162:                                              ; preds = %154
  %163 = load i32, ptr %8, align 4, !tbaa !13
  %164 = load ptr, ptr %11, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.ImDrawChannel, ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds %struct.ImVector, ptr %165, i32 0, i32 2
  %167 = load ptr, ptr %166, align 8, !tbaa !31
  %168 = load i32, ptr %13, align 4, !tbaa !13
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %struct.ImDrawCmd, ptr %167, i64 %169
  %171 = getelementptr inbounds %struct.ImDrawCmd, ptr %170, i32 0, i32 3
  store i32 %163, ptr %171, align 4, !tbaa !25
  %172 = load ptr, ptr %11, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.ImDrawChannel, ptr %172, i32 0, i32 0
  %174 = getelementptr inbounds %struct.ImVector, ptr %173, i32 0, i32 2
  %175 = load ptr, ptr %174, align 8, !tbaa !31
  %176 = load i32, ptr %13, align 4, !tbaa !13
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds %struct.ImDrawCmd, ptr %175, i64 %177
  %179 = getelementptr inbounds %struct.ImDrawCmd, ptr %178, i32 0, i32 4
  %180 = load i32, ptr %179, align 8, !tbaa !27
  %181 = load i32, ptr %8, align 4, !tbaa !13
  %182 = add i32 %181, %180
  store i32 %182, ptr %8, align 4, !tbaa !13
  br label %183

183:                                              ; preds = %162
  %184 = load i32, ptr %13, align 4, !tbaa !13
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %13, align 4, !tbaa !13
  br label %154, !llvm.loop !33

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

187:                                              ; preds = %186
  %188 = load i32, ptr %9, align 4, !tbaa !13
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %9, align 4, !tbaa !13
  br label %58, !llvm.loop !35

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

235:                                              ; preds = %285, %190
  %236 = load i32, ptr %16, align 4, !tbaa !13
  %237 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 1
  %238 = load i32, ptr %237, align 4, !tbaa !9
  %239 = icmp slt i32 %236, %238
  br i1 %239, label %241, label %240

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

241:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %242 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 2
  %243 = load i32, ptr %16, align 4, !tbaa !13
  %244 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %242, i32 noundef %243)
  store ptr %244, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %245 = load ptr, ptr %17, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.ImDrawChannel, ptr %245, i32 0, i32 0
  %247 = getelementptr inbounds %struct.ImVector, ptr %246, i32 0, i32 0
  %248 = load i32, ptr %247, align 8, !tbaa !28
  store i32 %248, ptr %18, align 4, !tbaa !13
  %249 = load i32, ptr %18, align 4, !tbaa !13
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %264

251:                                              ; preds = %241
  %252 = load ptr, ptr %14, align 8, !tbaa !5
  %253 = load ptr, ptr %17, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.ImDrawChannel, ptr %253, i32 0, i32 0
  %255 = getelementptr inbounds %struct.ImVector, ptr %254, i32 0, i32 2
  %256 = load ptr, ptr %255, align 8, !tbaa !31
  %257 = load i32, ptr %18, align 4, !tbaa !13
  %258 = sext i32 %257 to i64
  %259 = mul i64 %258, 56
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %252, ptr align 8 %256, i64 %259, i1 false)
  %260 = load i32, ptr %18, align 4, !tbaa !13
  %261 = load ptr, ptr %14, align 8, !tbaa !5
  %262 = sext i32 %260 to i64
  %263 = getelementptr inbounds %struct.ImDrawCmd, ptr %261, i64 %262
  store ptr %263, ptr %14, align 8, !tbaa !5
  br label %264

264:                                              ; preds = %251, %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %265 = load ptr, ptr %17, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.ImDrawChannel, ptr %265, i32 0, i32 1
  %267 = getelementptr inbounds %struct.ImVector.0, ptr %266, i32 0, i32 0
  %268 = load i32, ptr %267, align 8, !tbaa !32
  store i32 %268, ptr %19, align 4, !tbaa !13
  %269 = load i32, ptr %19, align 4, !tbaa !13
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %271, label %284

271:                                              ; preds = %264
  %272 = load ptr, ptr %15, align 8, !tbaa !5
  %273 = load ptr, ptr %17, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.ImDrawChannel, ptr %273, i32 0, i32 1
  %275 = getelementptr inbounds %struct.ImVector.0, ptr %274, i32 0, i32 2
  %276 = load ptr, ptr %275, align 8, !tbaa !39
  %277 = load i32, ptr %19, align 4, !tbaa !13
  %278 = sext i32 %277 to i64
  %279 = mul i64 %278, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %272, ptr align 2 %276, i64 %279, i1 false)
  %280 = load i32, ptr %19, align 4, !tbaa !13
  %281 = load ptr, ptr %15, align 8, !tbaa !5
  %282 = sext i32 %280 to i64
  %283 = getelementptr inbounds i16, ptr %281, i64 %282
  store ptr %283, ptr %15, align 8, !tbaa !5
  br label %284

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

285:                                              ; preds = %284
  %286 = load i32, ptr %16, align 4, !tbaa !13
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %16, align 4, !tbaa !13
  br label %235, !llvm.loop !40

288:                                              ; preds = %240
  %289 = load ptr, ptr %15, align 8, !tbaa !5
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.ImDrawList, ptr %290, i32 0, i32 8
  store ptr %289, ptr %291, align 8, !tbaa !41
  %292 = load ptr, ptr %4, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.ImDrawList, ptr %292, i32 0, i32 0
  %294 = getelementptr inbounds %struct.ImVector, ptr %293, i32 0, i32 0
  %295 = load i32, ptr %294, align 8, !tbaa !14
  %296 = icmp eq i32 %295, 0
  br i1 %296, label %304, label %297

297:                                              ; preds = %288
  %298 = load ptr, ptr %4, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.ImDrawList, ptr %298, i32 0, i32 0
  %300 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %299)
  %301 = getelementptr inbounds %struct.ImDrawCmd, ptr %300, i32 0, i32 5
  %302 = load ptr, ptr %301, align 8, !tbaa !30
  %303 = icmp ne ptr %302, null
  br i1 %303, label %304, label %306

304:                                              ; preds = %297, %288
  %305 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN10ImDrawList10AddDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196) %305)
  br label %306

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

322:                                              ; preds = %306
  %323 = load ptr, ptr %20, align 8, !tbaa !5
  %324 = load ptr, ptr %4, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.ImDrawList, ptr %324, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %323, ptr align 8 %325, i64 28, i1 false)
  br label %335

326:                                              ; preds = %306
  %327 = load ptr, ptr %20, align 8, !tbaa !5
  %328 = load ptr, ptr %4, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.ImDrawList, ptr %328, i32 0, i32 12
  %330 = call i32 @memcmp(ptr noundef %327, ptr noundef %329, i64 noundef 28) #7
  %331 = icmp ne i32 %330, 0
  br i1 %331, label %332, label %334

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

334:                                              ; preds = %332, %326
  br label %335

335:                                              ; preds = %334, %322
  %336 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %21, i32 0, i32 1
  store i32 1, ptr %336, 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 %337

337:                                              ; preds = %335, %25
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18ImDrawListSplitter17SetCurrentChannelEP10ImDrawListi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef) #3 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 = { 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 = { 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI9ImDrawCmdE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList17_PopUnusedDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196)) local_unnamed_addr #2 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
define dso_local void @_ZN18ImDrawListSplitter5MergeEP10ImDrawList(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) local_unnamed_addr #2 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 %158, 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_edge116

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.ph115, label %._crit_edge116

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

._crit_edge116:                                   ; preds = %._crit_edge, %6, %.thread
  %.084.lcssa = phi i32 [ 0, %.thread ], [ 0, %6 ], [ %101, %._crit_edge ]
  %.0.lcssa = phi i32 [ 0, %.thread ], [ 0, %6 ], [ %100, %._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, %.084.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 %.084.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.ph123, label %._crit_edge124

.lr.ph123:                                        ; preds = %._crit_edge116
  %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 %117

48:                                               ; preds = %.lr.ph115, %._crit_edge
  %.0114 = phi i32 [ 0, %.lr.ph115 ], [ %100, %._crit_edge ]
  %.084113 = phi i32 [ 0, %.lr.ph115 ], [ %101, %._crit_edge ]
  %.085111 = phi ptr [ %20, %.lr.ph115 ], [ %.1132, %._crit_edge ]
  %.086110 = phi i32 [ %21, %.lr.ph115 ], [ %.3.lcssa, %._crit_edge ]
  %.094109 = phi i32 [ 1, %.lr.ph115 ], [ %102, %._crit_edge ]
  %49 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %23, i32 noundef %.094109)
  %50 = load i32, ptr %49, align 8, !tbaa !29
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %52, label %58

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 %58

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

58:                                               ; preds = %57, %52, %48
  %59 = load i32, ptr %49, align 8, !tbaa !29
  %60 = icmp sgt i32 %59, 0
  %61 = icmp ne ptr %.085111, null
  %or.cond = select i1 %60, i1 %61, i1 false
  br i1 %or.cond, label %62, label %83

62:                                               ; preds = %58
  %63 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %49, i32 noundef 0)
  %bcmp102 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(28) %.085111, ptr noundef nonnull dereferenceable(28) %63, i64 28)
  %64 = icmp eq i32 %bcmp102, 0
  br i1 %64, label %65, label %thread-pre-split

65:                                               ; preds = %62
  %66 = getelementptr inbounds i8, ptr %.085111, i64 40
  %67 = load ptr, ptr %66, align 8, !tbaa !31
  %68 = icmp eq ptr %67, null
  %69 = getelementptr inbounds i8, ptr %63, i64 40
  %70 = load ptr, ptr %69, align 8
  %71 = icmp eq ptr %70, null
  %or.cond105 = select i1 %68, i1 %71, i1 false
  br i1 %or.cond105, label %72, label %thread-pre-split

72:                                               ; preds = %65
  %73 = getelementptr inbounds i8, ptr %63, i64 32
  %74 = load i32, ptr %73, align 8, !tbaa !25
  %75 = getelementptr inbounds i8, ptr %.085111, i64 32
  %76 = load i32, ptr %75, align 8, !tbaa !25
  %77 = add i32 %76, %74
  store i32 %77, ptr %75, align 8, !tbaa !25
  %78 = load i32, ptr %73, align 8, !tbaa !25
  %79 = add i32 %78, %.086110
  %80 = getelementptr inbounds i8, ptr %49, i64 8
  %81 = load ptr, ptr %80, align 8, !tbaa !32
  %82 = tail call noundef ptr @_ZN8ImVectorI9ImDrawCmdE5eraseEPKS0_(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef %81)
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %72, %65, %62
  %.2.ph = phi i32 [ %.086110, %62 ], [ %.086110, %65 ], [ %79, %72 ]
  %.pr = load i32, ptr %49, align 8, !tbaa !29
  br label %83

83:                                               ; preds = %thread-pre-split, %58
  %84 = phi i32 [ %.pr, %thread-pre-split ], [ %59, %58 ]
  %.2 = phi i32 [ %.2.ph, %thread-pre-split ], [ %.086110, %58 ]
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %88, label %.thread130

.thread130:                                       ; preds = %83
  %86 = getelementptr inbounds i8, ptr %49, i64 16
  %87 = load i32, ptr %86, align 8, !tbaa !33
  br label %._crit_edge

88:                                               ; preds = %83
  %89 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %49)
  %.pre129 = load i32, ptr %49, align 8, !tbaa !29
  %90 = getelementptr inbounds i8, ptr %49, i64 16
  %91 = load i32, ptr %90, align 8, !tbaa !33
  %92 = icmp sgt i32 %.pre129, 0
  br i1 %92, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %88
  %93 = getelementptr inbounds i8, ptr %49, i64 8
  %94 = load ptr, ptr %93, align 8, !tbaa !32
  %wide.trip.count = zext nneg i32 %.pre129 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %95 = icmp eq i32 %.pre129, 1
  br i1 %95, 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 %105

._crit_edge.loopexit.unr-lcssa:                   ; preds = %105, %.lr.ph
  %.lcssa.ph = phi i32 [ poison, %.lr.ph ], [ %113, %105 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %105 ]
  %.3108.unr = phi i32 [ %.2, %.lr.ph ], [ %113, %105 ]
  %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
  %96 = getelementptr inbounds %struct.ImDrawCmd, ptr %94, i64 %indvars.iv.unr, i32 3
  store i32 %.3108.unr, ptr %96, align 4, !tbaa !23
  %97 = getelementptr inbounds %struct.ImDrawCmd, ptr %94, i64 %indvars.iv.unr, i32 4
  %98 = load i32, ptr %97, align 8, !tbaa !25
  %99 = add i32 %98, %.3108.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %.thread130, %88
  %.pn = phi i32 [ %91, %88 ], [ %87, %.thread130 ], [ %91, %._crit_edge.loopexit.unr-lcssa ], [ %91, %._crit_edge.loopexit.epilog-lcssa ]
  %.pre129.pn = phi i32 [ %.pre129, %88 ], [ %84, %.thread130 ], [ %.pre129, %._crit_edge.loopexit.unr-lcssa ], [ %.pre129, %._crit_edge.loopexit.epilog-lcssa ]
  %.1132 = phi ptr [ %89, %88 ], [ %.085111, %.thread130 ], [ %89, %._crit_edge.loopexit.unr-lcssa ], [ %89, %._crit_edge.loopexit.epilog-lcssa ]
  %.3.lcssa = phi i32 [ %.2, %88 ], [ %.2, %.thread130 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %99, %._crit_edge.loopexit.epilog-lcssa ]
  %100 = add nsw i32 %.pre129.pn, %.0114
  %101 = add nsw i32 %.pn, %.084113
  %102 = add nuw nsw i32 %.094109, 1
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %48, label %._crit_edge116, !llvm.loop !34

105:                                              ; preds = %105, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %105 ]
  %.3108 = phi i32 [ %.2, %.lr.ph.new ], [ %113, %105 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %105 ]
  %106 = getelementptr inbounds %struct.ImDrawCmd, ptr %94, i64 %indvars.iv, i32 3
  store i32 %.3108, ptr %106, align 4, !tbaa !23
  %107 = getelementptr inbounds %struct.ImDrawCmd, ptr %94, i64 %indvars.iv, i32 4
  %108 = load i32, ptr %107, align 8, !tbaa !25
  %109 = add i32 %108, %.3108
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %110 = getelementptr inbounds %struct.ImDrawCmd, ptr %94, i64 %indvars.iv.next, i32 3
  store i32 %109, ptr %110, align 4, !tbaa !23
  %111 = getelementptr inbounds %struct.ImDrawCmd, ptr %94, i64 %indvars.iv.next, i32 4
  %112 = load i32, ptr %111, align 8, !tbaa !25
  %113 = add i32 %112, %109
  %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 %105, !llvm.loop !36

._crit_edge124:                                   ; preds = %135, %._crit_edge116
  %.089.lcssa = phi ptr [ %37, %._crit_edge116 ], [ %.190, %135 ]
  %114 = getelementptr inbounds i8, ptr %1, i64 80
  store ptr %.089.lcssa, ptr %114, align 8, !tbaa !37
  %115 = load i32, ptr %1, align 8, !tbaa !12
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %143, label %139

117:                                              ; preds = %.lr.ph123, %135
  %.088121 = phi i32 [ 1, %.lr.ph123 ], [ %136, %135 ]
  %.089120 = phi ptr [ %37, %.lr.ph123 ], [ %.190, %135 ]
  %.091119 = phi ptr [ %46, %.lr.ph123 ], [ %.192, %135 ]
  %118 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %47, i32 noundef %.088121)
  %119 = load i32, ptr %118, align 8, !tbaa !29
  %.not100 = icmp eq i32 %119, 0
  br i1 %.not100, label %126, label %120

120:                                              ; preds = %117
  %121 = getelementptr inbounds i8, ptr %118, i64 8
  %122 = load ptr, ptr %121, align 8, !tbaa !32
  %123 = sext i32 %119 to i64
  %124 = mul nsw i64 %123, 56
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %.091119, ptr align 8 %122, i64 %124, i1 false)
  %125 = getelementptr inbounds %struct.ImDrawCmd, ptr %.091119, i64 %123
  br label %126

126:                                              ; preds = %120, %117
  %.192 = phi ptr [ %125, %120 ], [ %.091119, %117 ]
  %127 = getelementptr inbounds i8, ptr %118, i64 16
  %128 = load i32, ptr %127, align 8, !tbaa !33
  %.not101 = icmp eq i32 %128, 0
  br i1 %.not101, label %135, label %129

129:                                              ; preds = %126
  %130 = getelementptr inbounds i8, ptr %118, i64 24
  %131 = load ptr, ptr %130, align 8, !tbaa !38
  %132 = sext i32 %128 to i64
  %133 = shl nsw i64 %132, 1
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 2 %.089120, ptr align 2 %131, i64 %133, i1 false)
  %134 = getelementptr inbounds i16, ptr %.089120, i64 %132
  br label %135

135:                                              ; preds = %129, %126
  %.190 = phi ptr [ %134, %129 ], [ %.089120, %126 ]
  %136 = add nuw nsw i32 %.088121, 1
  %137 = load i32, ptr %3, align 4, !tbaa !5
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %117, label %._crit_edge124, !llvm.loop !39

139:                                              ; preds = %._crit_edge124
  %140 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZN8ImVectorI9ImDrawCmdE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %141 = getelementptr inbounds i8, ptr %140, i64 40
  %142 = load ptr, ptr %141, align 8, !tbaa !31
  %.not98 = icmp eq ptr %142, null
  br i1 %.not98, label %144, label %143

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

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

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

155:                                              ; preds = %144
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(28) %149, ptr noundef nonnull dereferenceable(28) %153, i64 28)
  %.not99 = icmp eq i32 %bcmp, 0
  br i1 %.not99, label %157, label %156

156:                                              ; preds = %155
  tail call void @_ZN10ImDrawList10AddDrawCmdEv(ptr noundef nonnull align 8 dereferenceable(196) %1)
  br label %157

157:                                              ; preds = %155, %156, %154
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %2, %157
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18ImDrawListSplitter17SetCurrentChannelEP10ImDrawListi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef) local_unnamed_addr #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)) 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 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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