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

; 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.ImVector.2 = type { i32, i32, ptr }
%struct.ImDrawData = type { i8, i32, i32, i32, ptr, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2 }
%struct.ImVec2 = type { float, float }
%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.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.ImDrawListSplitter = type { i32, i32, %struct.ImVector.5 }
%struct.ImVector.5 = type { i32, i32, ptr }

; 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ImDrawData17DeIndexAllBuffersEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.ImVector.2, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #5
  call void @_ZN8ImVectorI10ImDrawVertEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %11 = getelementptr inbounds %struct.ImDrawData, ptr %10, i32 0, i32 2
  store i32 0, ptr %11, align 8, !tbaa !9
  %12 = getelementptr inbounds %struct.ImDrawData, ptr %10, i32 0, i32 3
  store i32 0, ptr %12, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !16
  br label %13

13:                                               ; preds = %88, %1
  %14 = load i32, ptr %4, align 4, !tbaa !16
  %15 = getelementptr inbounds %struct.ImDrawData, ptr %10, i32 0, i32 1
  %16 = load i32, ptr %15, align 4, !tbaa !17
  %17 = icmp slt i32 %14, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %20 = getelementptr inbounds %struct.ImDrawData, ptr %10, i32 0, i32 4
  %21 = load ptr, ptr %20, align 8, !tbaa !18
  %22 = load i32, ptr %4, align 4, !tbaa !16
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds ptr, ptr %21, i64 %23
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %25, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ImDrawList, ptr %26, i32 0, i32 1
  %28 = invoke noundef zeroext i1 @_ZNK8ImVectorItE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %29 unwind label %31

29:                                               ; preds = %19
  br i1 %28, label %30, label %35

30:                                               ; preds = %29
  store i32 4, ptr %5, align 4
  br label %85

31:                                               ; preds = %74, %71, %35, %19
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %7, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %8, align 4
  br label %91

35:                                               ; preds = %29
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ImDrawList, ptr %36, i32 0, i32 1
  %38 = getelementptr inbounds %struct.ImVector.1, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !19
  invoke void @_ZN8ImVectorI10ImDrawVertE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %39)
          to label %40 unwind label %31

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !16
  br label %41

41:                                               ; preds = %64, %40
  %42 = load i32, ptr %9, align 4, !tbaa !16
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ImDrawList, ptr %43, i32 0, i32 1
  %45 = getelementptr inbounds %struct.ImVector.1, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !19
  %47 = icmp slt i32 %42, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %41
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %71

49:                                               ; preds = %41
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ImDrawList, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ImDrawList, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %9, align 4, !tbaa !16
  %55 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZN8ImVectorItEixEi(ptr noundef nonnull align 8 dereferenceable(16) %53, i32 noundef %54)
          to label %56 unwind label %67

56:                                               ; preds = %49
  %57 = load i16, ptr %55, align 2, !tbaa !31
  %58 = zext i16 %57 to i32
  %59 = invoke noundef nonnull align 4 dereferenceable(20) ptr @_ZN8ImVectorI10ImDrawVertEixEi(ptr noundef nonnull align 8 dereferenceable(16) %51, i32 noundef %58)
          to label %60 unwind label %67

60:                                               ; preds = %56
  %61 = load i32, ptr %9, align 4, !tbaa !16
  %62 = invoke noundef nonnull align 4 dereferenceable(20) ptr @_ZN8ImVectorI10ImDrawVertEixEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %61)
          to label %63 unwind label %67

63:                                               ; preds = %60
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 4 %59, i64 20, i1 false), !tbaa.struct !33
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %9, align 4, !tbaa !16
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %9, align 4, !tbaa !16
  br label %41, !llvm.loop !35

67:                                               ; preds = %60, %56, %49
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %91

71:                                               ; preds = %48
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ImDrawList, ptr %72, i32 0, i32 2
  invoke void @_ZN8ImVectorI10ImDrawVertE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %74 unwind label %31

74:                                               ; preds = %71
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ImDrawList, ptr %75, i32 0, i32 1
  invoke void @_ZN8ImVectorItE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %76, i32 noundef 0)
          to label %77 unwind label %31

77:                                               ; preds = %74
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ImDrawList, ptr %78, i32 0, i32 2
  %80 = getelementptr inbounds %struct.ImVector.2, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !37
  %82 = getelementptr inbounds %struct.ImDrawData, ptr %10, i32 0, i32 3
  %83 = load i32, ptr %82, align 4, !tbaa !15
  %84 = add nsw i32 %83, %81
  store i32 %84, ptr %82, align 4, !tbaa !15
  store i32 0, ptr %5, align 4
  br label %85

85:                                               ; preds = %77, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %86 = load i32, ptr %5, align 4
  switch i32 %86, label %98 [
    i32 0, label %87
    i32 4, label %88
  ]

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %87, %85
  %89 = load i32, ptr %4, align 4, !tbaa !16
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %4, align 4, !tbaa !16
  br label %13, !llvm.loop !38

91:                                               ; preds = %67, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @_ZN8ImVectorI10ImDrawVertED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #5
  br label %93

92:                                               ; preds = %18
  call void @_ZN8ImVectorI10ImDrawVertED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #5
  ret void

93:                                               ; preds = %91
  %94 = load ptr, ptr %7, align 8
  %95 = load i32, ptr %8, align 4
  %96 = insertvalue { ptr, i32 } poison, ptr %94, 0
  %97 = insertvalue { ptr, i32 } %96, i32 %95, 1
  resume { ptr, i32 } %97

98:                                               ; preds = %85
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8ImVectorI10ImDrawVertED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #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 }

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


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

; 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ImDrawData17DeIndexAllBuffersEv(ptr nocapture noundef nonnull align 8 dereferenceable(48) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.ImVector.2, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  call void @_ZN8ImVectorI10ImDrawVertEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 0, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 0, ptr %4, align 4, !tbaa !14
  %5 = getelementptr inbounds i8, ptr %0, i64 4
  %6 = load i32, ptr %5, align 4, !tbaa !15
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph21, label %._crit_edge22

.lr.ph21:                                         ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  br label %9

._crit_edge22:                                    ; preds = %36, %1
  call void @_ZN8ImVectorI10ImDrawVertED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  ret void

9:                                                ; preds = %.lr.ph21, %36
  %indvars.iv = phi i64 [ 0, %.lr.ph21 ], [ %indvars.iv.next, %36 ]
  %10 = load ptr, ptr %8, align 8, !tbaa !16
  %11 = getelementptr inbounds ptr, ptr %10, i64 %indvars.iv
  %12 = load ptr, ptr %11, align 8, !tbaa !17
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %14 = call noundef zeroext i1 @_ZNK8ImVectorItE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  br i1 %14, label %36, label %17

15:                                               ; preds = %._crit_edge, %17
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8ImVectorI10ImDrawVertED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  resume { ptr, i32 } %16

17:                                               ; preds = %9
  %18 = load i32, ptr %13, align 8, !tbaa !18
  invoke void @_ZN8ImVectorI10ImDrawVertE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %18)
          to label %.preheader unwind label %15

.preheader:                                       ; preds = %17
  %19 = load i32, ptr %13, align 8, !tbaa !18
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %21 = getelementptr inbounds i8, ptr %12, i64 32
  br label %23

._crit_edge:                                      ; preds = %23, %.preheader
  %22 = getelementptr inbounds i8, ptr %12, i64 32
  call void @_ZN8ImVectorI10ImDrawVertE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %2)
  invoke void @_ZN8ImVectorItE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 0)
          to label %32 unwind label %15

23:                                               ; preds = %.lr.ph, %23
  %.018 = phi i32 [ 0, %.lr.ph ], [ %29, %23 ]
  %24 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN8ImVectorItEixEi(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef %.018)
  %25 = load i16, ptr %24, align 2, !tbaa !30
  %26 = zext i16 %25 to i32
  %27 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZN8ImVectorI10ImDrawVertEixEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %26)
  %28 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZN8ImVectorI10ImDrawVertEixEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %.018)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %28, ptr noundef nonnull align 4 dereferenceable(20) %27, i64 20, i1 false), !tbaa.struct !32
  %29 = add nuw nsw i32 %.018, 1
  %30 = load i32, ptr %13, align 8, !tbaa !18
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %23, label %._crit_edge, !llvm.loop !35

32:                                               ; preds = %._crit_edge
  %33 = load i32, ptr %22, align 8, !tbaa !37
  %34 = load i32, ptr %4, align 4, !tbaa !14
  %35 = add nsw i32 %34, %33
  store i32 %35, ptr %4, align 4, !tbaa !14
  br label %36

36:                                               ; preds = %9, %32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = load i32, ptr %5, align 4, !tbaa !15
  %38 = sext i32 %37 to i64
  %39 = icmp slt i64 %indvars.iv.next, %38
  br i1 %39, label %9, label %._crit_edge22, !llvm.loop !38
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8ImVectorItE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8ImVectorI10ImDrawVertED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 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 = { 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 }

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass