; LLVM IR from Dragons-Lake/REI :: sources/REI_Integration/3rdParty/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.ImNewDummy = type { i8 }
%struct.ImDrawCmd = type { i32, %struct.ImVec4, ptr, i32, i32, ptr, ptr }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.5 }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImDrawChannel = type { %struct.ImVector, %struct.ImVector.0 }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImDrawList = type { %struct.ImVector, %struct.ImVector.0, %struct.ImVector.1, i32, ptr, ptr, i32, i32, ptr, ptr, %struct.ImVector.2, %struct.ImVector.3, %struct.ImVector.4, %struct.ImDrawListSplitter }
%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 }

@.str.1 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN18ImDrawListSplitter5SplitEP10ImDrawListi = external hidden unnamed_addr constant [50 x i8], align 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: 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_Znwm10ImNewDummyPv(i64 noundef, ptr noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZdlPv10ImNewDummyS_(ptr noundef, ptr noundef) #3

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN18ImDrawListSplitter5SplitEP10ImDrawListi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, i32 noundef %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.ImNewDummy, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.ImDrawCmd, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %13 = load ptr, ptr %4, align 8
  %14 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %21

17:                                               ; preds = %3
  %18 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 1
  %19 = load i32, ptr %18, align 4, !tbaa !14
  %20 = icmp sle i32 %19, 1
  br label %21

21:                                               ; preds = %17, %3
  %22 = phi i1 [ false, %3 ], [ %20, %17 ]
  br i1 %22, label %23, label %24

23:                                               ; preds = %21
  br label %26

24:                                               ; preds = %21
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 1217, ptr noundef @__PRETTY_FUNCTION__._ZN18ImDrawListSplitter5SplitEP10ImDrawListi) #7
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %27 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 2
  %28 = getelementptr inbounds %struct.ImVector.5, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !15
  store i32 %29, ptr %7, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %33, label %36

33:                                               ; preds = %26
  %34 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 2
  %35 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN8ImVectorI13ImDrawChannelE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %34, i32 noundef %35)
  br label %36

36:                                               ; preds = %33, %26
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 1
  store i32 %37, ptr %38, align 4, !tbaa !14
  %39 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 2
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %39, i32 noundef 0)
  call void @llvm.memset.p0.i64(ptr align 8 %40, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %92, %36
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %95

46:                                               ; preds = %41
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = icmp sge i32 %47, %48
  br i1 %49, label %50, label %60

50:                                               ; preds = %46
  %51 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 2
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %51, i32 noundef %52)
  %54 = call noundef ptr @_Znwm10ImNewDummyPv(i64 noundef 32, ptr noundef %53)
  call void @llvm.memset.p0.i64(ptr align 8 %54, i8 0, i64 32, i1 false)
  invoke void @_ZN13ImDrawChannelC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54)
          to label %55 unwind label %56

55:                                               ; preds = %50
  br label %69

56:                                               ; preds = %50
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %10, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %11, align 4
  call void @_ZdlPv10ImNewDummyS_(ptr noundef %54, ptr noundef %53) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %96

60:                                               ; preds = %46
  %61 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 2
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %61, i32 noundef %62)
  %64 = getelementptr inbounds %struct.ImDrawChannel, ptr %63, i32 0, i32 0
  call void @_ZN8ImVectorI9ImDrawCmdE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %64, i32 noundef 0)
  %65 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 2
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %65, i32 noundef %66)
  %68 = getelementptr inbounds %struct.ImDrawChannel, ptr %67, i32 0, i32 1
  call void @_ZN8ImVectorItE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %68, i32 noundef 0)
  br label %69

69:                                               ; preds = %60, %55
  %70 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 2
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %70, i32 noundef %71)
  %73 = getelementptr inbounds %struct.ImDrawChannel, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds %struct.ImVector, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !16
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %91

77:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 56, ptr %12) #8
  call void @_ZN9ImDrawCmdC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12)
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ImDrawList, ptr %78, i32 0, i32 10
  %80 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN8ImVectorI6ImVec4E4backEv(ptr noundef nonnull align 8 dereferenceable(16) %79)
  %81 = getelementptr inbounds %struct.ImDrawCmd, ptr %12, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %81, ptr align 4 %80, i64 16, i1 false), !tbaa.struct !20
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ImDrawList, ptr %82, i32 0, i32 11
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIPvE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %83)
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ImDrawCmd, ptr %12, i32 0, i32 2
  store ptr %85, ptr %86, align 8, !tbaa !23
  %87 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %13, i32 0, i32 2
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %87, i32 noundef %88)
  %90 = getelementptr inbounds %struct.ImDrawChannel, ptr %89, i32 0, i32 0
  call void @_ZN8ImVectorI9ImDrawCmdE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %90, ptr noundef nonnull align 8 dereferenceable(56) %12)
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #8
  br label %91

91:                                               ; preds = %77, %69
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %8, align 4, !tbaa !9
  br label %41, !llvm.loop !26

95:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  ret void

96:                                               ; preds = %56
  %97 = load ptr, ptr %10, align 8
  %98 = load i32, ptr %11, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100
}

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !13, i64 8}
!13 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !6, i64 8}
!14 = !{!12, !10, i64 4}
!15 = !{!12, !10, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTS13ImDrawChannel", !18, i64 0, !19, i64 16}
!18 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !10, i64 0, !10, i64 4, !6, i64 8}
!19 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !6, i64 8}
!20 = !{i64 0, i64 4, !21, i64 4, i64 4, !21, i64 8, i64 4, !21, i64 12, i64 4, !21}
!21 = !{!22, !22, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!24, !6, i64 24}
!24 = !{!"_ZTS9ImDrawCmd", !10, i64 0, !25, i64 4, !6, i64 24, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48}
!25 = !{!"_ZTS6ImVec4", !22, i64 0, !22, i64 4, !22, i64 8, !22, i64 12}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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

@.str.1 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN18ImDrawListSplitter5SplitEP10ImDrawListi = external hidden unnamed_addr constant [50 x i8], align 1

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

; Function Attrs: mustprogress nocallback nofree 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: mustprogress 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) 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_Znwm10ImNewDummyPv(i64 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZdlPv10ImNewDummyS_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIPvE4backEv(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 4 dereferenceable(16) ptr @_ZN8ImVectorI6ImVec4E4backEv(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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN18ImDrawListSplitter5SplitEP10ImDrawListi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.ImDrawCmd, align 8
  %5 = load i32, ptr %0, align 8, !tbaa !5
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %7, label %.critedge

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 4
  %9 = load i32, ptr %8, align 4, !tbaa !12
  %10 = icmp slt i32 %9, 2
  br i1 %10, label %11, label %.critedge

.critedge:                                        ; preds = %3, %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 1217, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN18ImDrawListSplitter5SplitEP10ImDrawListi) #7
  unreachable

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i32, ptr %12, align 8, !tbaa !13
  %14 = icmp slt i32 %13, %2
  br i1 %14, label %15, label %16

15:                                               ; preds = %11
  tail call void @_ZN8ImVectorI13ImDrawChannelE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %2)
  br label %16

16:                                               ; preds = %15, %11
  store i32 %2, ptr %8, align 4, !tbaa !12
  %17 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 0)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %17, i8 0, i64 32, i1 false)
  %18 = icmp sgt i32 %2, 1
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %16
  %19 = getelementptr inbounds i8, ptr %1, i64 96
  %20 = getelementptr inbounds i8, ptr %4, i64 4
  %21 = getelementptr inbounds i8, ptr %1, i64 112
  %22 = getelementptr inbounds i8, ptr %4, i64 24
  br label %23

._crit_edge:                                      ; preds = %41, %16
  ret void

23:                                               ; preds = %.lr.ph, %41
  %.020 = phi i32 [ 1, %.lr.ph ], [ %42, %41 ]
  %.not = icmp slt i32 %.020, %13
  %24 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %.020)
  br i1 %.not, label %29, label %25

25:                                               ; preds = %23
  %26 = call noundef ptr @_Znwm10ImNewDummyPv(i64 noundef 32, ptr noundef nonnull %24)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %26, i8 0, i64 32, i1 false)
  invoke void @_ZN13ImDrawChannelC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %32 unwind label %27

27:                                               ; preds = %25
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPv10ImNewDummyS_(ptr noundef nonnull %26, ptr noundef nonnull %24) #8
  resume { ptr, i32 } %28

29:                                               ; preds = %23
  call void @_ZN8ImVectorI9ImDrawCmdE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %24, i32 noundef 0)
  %30 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %.020)
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  call void @_ZN8ImVectorItE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef 0)
  br label %32

32:                                               ; preds = %25, %29
  %33 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %.020)
  %34 = load i32, ptr %33, align 8, !tbaa !14
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %41

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #8
  call void @_ZN9ImDrawCmdC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4)
  %37 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN8ImVectorI6ImVec4E4backEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(16) %37, i64 16, i1 false), !tbaa.struct !18
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIPvE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %39 = load ptr, ptr %38, align 8, !tbaa !21
  store ptr %39, ptr %22, align 8, !tbaa !22
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI13ImDrawChannelEixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %.020)
  call void @_ZN8ImVectorI9ImDrawCmdE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(56) %4)
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #8
  br label %41

41:                                               ; preds = %32, %36
  %42 = add nuw nsw i32 %.020, 1
  %exitcond.not = icmp eq i32 %42, %2
  br i1 %exitcond.not, label %._crit_edge, label %23, !llvm.loop !25
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN13ImDrawChannelC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!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 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 8}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTS13ImDrawChannel", !16, i64 0, !17, i64 16}
!16 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !7, i64 0, !7, i64 4, !11, i64 8}
!17 = !{!"_ZTS8ImVectorItE", !7, i64 0, !7, i64 4, !11, i64 8}
!18 = !{i64 0, i64 4, !19, i64 4, i64 4, !19, i64 8, i64 4, !19, i64 12, i64 4, !19}
!19 = !{!20, !20, i64 0}
!20 = !{!"float", !8, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!23, !11, i64 24}
!23 = !{!"_ZTS9ImDrawCmd", !7, i64 0, !24, i64 4, !11, i64 24, !7, i64 32, !7, i64 36, !11, i64 40, !11, i64 48}
!24 = !{!"_ZTS6ImVec4", !20, i64 0, !20, i64 4, !20, i64 8, !20, i64 12}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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