; LLVM IR from christoskaramou/PhasmaEngine :: PhasmaEditor/Include/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.ImDrawList = type { %struct.ImVector.0, %struct.ImVector.1, %struct.ImVector.2, i32, i32, ptr, ptr, ptr, %struct.ImVector, %struct.ImDrawCmdHeader, %struct.ImDrawListSplitter, %struct.ImVector.4, %struct.ImVector.5, %struct.ImVector.6, float, ptr }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImDrawCmdHeader = type <{ %struct.ImVec4, i64, i32, [4 x i8] }>
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.3 }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImDrawCmd = type { %struct.ImVec4, i64, i32, i32, i32, ptr, ptr, i32, i32 }
%struct.ImDrawVert = type { %struct.ImVec2, %struct.ImVec2, i32 }
%struct.ImVec2 = type { float, float }
%struct.ImDrawData = type { i8, i32, i32, i32, %struct.ImVector.13, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, ptr }
%struct.ImVector.13 = type { i32, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [115 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_ = external hidden unnamed_addr constant [90 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [60 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.ImDrawList, ptr %11, i32 0, i32 0
  %13 = getelementptr inbounds %struct.ImVector.0, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %3
  br label %182

17:                                               ; preds = %3
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ImDrawList, ptr %18, i32 0, i32 0
  %20 = getelementptr inbounds %struct.ImVector.0, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %38

23:                                               ; preds = %17
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ImDrawList, ptr %24, i32 0, i32 0
  %26 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %25, i32 noundef 0)
  %27 = getelementptr inbounds %struct.ImDrawCmd, ptr %26, i32 0, i32 4
  %28 = load i32, ptr %27, align 8, !tbaa !25
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %38

30:                                               ; preds = %23
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ImDrawList, ptr %31, i32 0, i32 0
  %33 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %32, i32 noundef 0)
  %34 = getelementptr inbounds %struct.ImDrawCmd, ptr %33, i32 0, i32 5
  %35 = load ptr, ptr %34, align 8, !tbaa !27
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %38

37:                                               ; preds = %30
  br label %182

38:                                               ; preds = %30, %23, %17
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ImDrawList, ptr %39, i32 0, i32 2
  %41 = getelementptr inbounds %struct.ImVector.2, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !28
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %59, label %44

44:                                               ; preds = %38
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ImDrawList, ptr %45, i32 0, i32 6
  %47 = load ptr, ptr %46, align 8, !tbaa !29
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ImDrawList, ptr %48, i32 0, i32 2
  %50 = getelementptr inbounds %struct.ImVector.2, ptr %49, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !30
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ImDrawList, ptr %52, i32 0, i32 2
  %54 = getelementptr inbounds %struct.ImVector.2, ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 8, !tbaa !28
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct.ImDrawVert, ptr %51, i64 %56
  %58 = icmp eq ptr %47, %57
  br label %59

59:                                               ; preds = %44, %38
  %60 = phi i1 [ true, %38 ], [ %58, %44 ]
  br i1 %60, label %61, label %62

61:                                               ; preds = %59
  br label %64

62:                                               ; preds = %59
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 2242, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_) #5
  unreachable

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63, %61
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ImDrawList, ptr %65, i32 0, i32 1
  %67 = getelementptr inbounds %struct.ImVector.1, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !31
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %85, label %70

70:                                               ; preds = %64
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ImDrawList, ptr %71, i32 0, i32 7
  %73 = load ptr, ptr %72, align 8, !tbaa !32
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ImDrawList, ptr %74, i32 0, i32 1
  %76 = getelementptr inbounds %struct.ImVector.1, ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !33
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ImDrawList, ptr %78, i32 0, i32 1
  %80 = getelementptr inbounds %struct.ImVector.1, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !31
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %77, i64 %82
  %84 = icmp eq ptr %73, %83
  br label %85

85:                                               ; preds = %70, %64
  %86 = phi i1 [ true, %64 ], [ %84, %70 ]
  br i1 %86, label %87, label %88

87:                                               ; preds = %85
  br label %90

88:                                               ; preds = %85
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 2243, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_) #5
  unreachable

89:                                               ; No predecessors!
  br label %90

90:                                               ; preds = %89, %87
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ImDrawList, ptr %91, i32 0, i32 3
  %93 = load i32, ptr %92, align 8, !tbaa !34
  %94 = and i32 %93, 8
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %109, label %96

96:                                               ; preds = %90
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ImDrawList, ptr %97, i32 0, i32 4
  %99 = load i32, ptr %98, align 4, !tbaa !35
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ImDrawList, ptr %100, i32 0, i32 2
  %102 = getelementptr inbounds %struct.ImVector.2, ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 8, !tbaa !28
  %104 = icmp eq i32 %99, %103
  br i1 %104, label %105, label %106

105:                                              ; preds = %96
  br label %108

106:                                              ; preds = %96
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 2245, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_) #5
  unreachable

107:                                              ; No predecessors!
  br label %108

108:                                              ; preds = %107, %105
  br label %109

109:                                              ; preds = %108, %90
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ImDrawList, ptr %110, i32 0, i32 13
  %112 = getelementptr inbounds %struct.ImVector.6, ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 8, !tbaa !36
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %115, label %160

115:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ImDrawList, ptr %116, i32 0, i32 0
  store ptr %117, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = call noundef ptr @_ZN8ImVectorI9ImDrawCmdE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %118)
  store ptr %119, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = call noundef ptr @_ZN8ImVectorI9ImDrawCmdE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %120)
  store ptr %121, ptr %9, align 8, !tbaa !5
  br label %122

122:                                              ; preds = %156, %115
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = icmp ne ptr %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %159

127:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %128, ptr %10, align 8, !tbaa !5
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.ImDrawCmd, ptr %129, i32 0, i32 5
  %131 = load ptr, ptr %130, align 8, !tbaa !27
  %132 = icmp ne ptr %131, null
  br i1 %132, label %133, label %155

133:                                              ; preds = %127
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ImDrawCmd, ptr %134, i32 0, i32 8
  %136 = load i32, ptr %135, align 4, !tbaa !37
  %137 = icmp ne i32 %136, -1
  br i1 %137, label %138, label %155

138:                                              ; preds = %133
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.ImDrawCmd, ptr %139, i32 0, i32 7
  %141 = load i32, ptr %140, align 8, !tbaa !38
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %143, label %155

143:                                              ; preds = %138
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.ImDrawList, ptr %144, i32 0, i32 13
  %146 = getelementptr inbounds %struct.ImVector.6, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !39
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ImDrawCmd, ptr %148, i32 0, i32 8
  %150 = load i32, ptr %149, align 4, !tbaa !37
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds i8, ptr %147, i64 %151
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ImDrawCmd, ptr %153, i32 0, i32 6
  store ptr %152, ptr %154, align 8, !tbaa !40
  br label %155

155:                                              ; preds = %143, %138, %133, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.ImDrawCmd, ptr %157, i32 1
  store ptr %158, ptr %8, align 8, !tbaa !5
  br label %122

159:                                              ; preds = %126
  br label %160

160:                                              ; preds = %159, %109
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN8ImVectorIP10ImDrawListE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %161, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.ImDrawData, ptr %162, i32 0, i32 1
  %164 = load i32, ptr %163, align 4, !tbaa !41
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %163, align 4, !tbaa !41
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.ImDrawList, ptr %166, i32 0, i32 2
  %168 = getelementptr inbounds %struct.ImVector.2, ptr %167, i32 0, i32 0
  %169 = load i32, ptr %168, align 8, !tbaa !28
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.ImDrawData, ptr %170, i32 0, i32 3
  %172 = load i32, ptr %171, align 4, !tbaa !46
  %173 = add nsw i32 %172, %169
  store i32 %173, ptr %171, align 4, !tbaa !46
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.ImDrawList, ptr %174, i32 0, i32 1
  %176 = getelementptr inbounds %struct.ImVector.1, ptr %175, i32 0, i32 0
  %177 = load i32, ptr %176, align 8, !tbaa !31
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.ImDrawData, ptr %178, i32 0, i32 2
  %180 = load i32, ptr %179, align 8, !tbaa !47
  %181 = add nsw i32 %180, %177
  store i32 %181, ptr %179, align 8, !tbaa !47
  br label %182

182:                                              ; preds = %160, %37, %16
  ret void
}

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 0}
!10 = !{!"_ZTS10ImDrawList", !11, i64 0, !13, i64 16, !14, i64 32, !12, i64 48, !12, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !15, i64 80, !16, i64 96, !20, i64 128, !22, i64 152, !23, i64 168, !24, i64 184, !18, i64 200, !6, i64 208}
!11 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !12, i64 0, !12, i64 4, !6, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS8ImVectorIjE", !12, i64 0, !12, i64 4, !6, i64 8}
!14 = !{!"_ZTS8ImVectorI10ImDrawVertE", !12, i64 0, !12, i64 4, !6, i64 8}
!15 = !{!"_ZTS8ImVectorI6ImVec2E", !12, i64 0, !12, i64 4, !6, i64 8}
!16 = !{!"_ZTS15ImDrawCmdHeader", !17, i64 0, !19, i64 16, !12, i64 24}
!17 = !{!"_ZTS6ImVec4", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!18 = !{!"float", !7, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = !{!"_ZTS18ImDrawListSplitter", !12, i64 0, !12, i64 4, !21, i64 8}
!21 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !12, i64 0, !12, i64 4, !6, i64 8}
!22 = !{!"_ZTS8ImVectorI6ImVec4E", !12, i64 0, !12, i64 4, !6, i64 8}
!23 = !{!"_ZTS8ImVectorIyE", !12, i64 0, !12, i64 4, !6, i64 8}
!24 = !{!"_ZTS8ImVectorIhE", !12, i64 0, !12, i64 4, !6, i64 8}
!25 = !{!26, !12, i64 32}
!26 = !{!"_ZTS9ImDrawCmd", !17, i64 0, !19, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 60}
!27 = !{!26, !6, i64 40}
!28 = !{!10, !12, i64 32}
!29 = !{!10, !6, i64 64}
!30 = !{!10, !6, i64 40}
!31 = !{!10, !12, i64 16}
!32 = !{!10, !6, i64 72}
!33 = !{!10, !6, i64 24}
!34 = !{!10, !12, i64 48}
!35 = !{!10, !12, i64 52}
!36 = !{!10, !12, i64 184}
!37 = !{!26, !12, i64 60}
!38 = !{!26, !12, i64 56}
!39 = !{!10, !6, i64 192}
!40 = !{!26, !6, i64 48}
!41 = !{!42, !12, i64 4}
!42 = !{!"_ZTS10ImDrawData", !43, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !44, i64 16, !45, i64 32, !45, i64 40, !45, i64 48, !6, i64 56}
!43 = !{!"bool", !7, i64 0}
!44 = !{!"_ZTS8ImVectorIP10ImDrawListE", !12, i64 0, !12, i64 4, !6, i64 8}
!45 = !{!"_ZTS6ImVec2", !18, i64 0, !18, i64 4}
!46 = !{!42, !12, i64 12}
!47 = !{!42, !12, i64 8}


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

@.str.1 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [115 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_ = external hidden unnamed_addr constant [90 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [60 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_(ptr nocapture noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca ptr, align 8
  store ptr %2, ptr %4, align 8, !tbaa !5
  %5 = load i32, ptr %2, align 8, !tbaa !9
  switch i32 %5, label %16 [
    i32 0, label %86
    i32 1, label %6
  ]

6:                                                ; preds = %3
  %7 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZN8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef 0)
  %8 = getelementptr inbounds i8, ptr %7, i64 32
  %9 = load i32, ptr %8, align 8, !tbaa !25
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %16

11:                                               ; preds = %6
  %12 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZN8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef 0)
  %13 = getelementptr inbounds i8, ptr %12, i64 40
  %14 = load ptr, ptr %13, align 8, !tbaa !27
  %15 = icmp eq ptr %14, null
  br i1 %15, label %86, label %16

16:                                               ; preds = %3, %11, %6
  %17 = getelementptr inbounds i8, ptr %2, i64 32
  %18 = load i32, ptr %17, align 8, !tbaa !28
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %.critedge, label %20

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %2, i64 64
  %22 = load ptr, ptr %21, align 8, !tbaa !29
  %23 = getelementptr inbounds i8, ptr %2, i64 40
  %24 = load ptr, ptr %23, align 8, !tbaa !30
  %25 = sext i32 %18 to i64
  %26 = getelementptr inbounds %struct.ImDrawVert, ptr %24, i64 %25
  %27 = icmp eq ptr %22, %26
  br i1 %27, label %.critedge, label %28

28:                                               ; preds = %20
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 2242, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_) #4
  unreachable

.critedge:                                        ; preds = %16, %20
  %29 = getelementptr inbounds i8, ptr %2, i64 16
  %30 = load i32, ptr %29, align 8, !tbaa !31
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %.critedge2, label %32

32:                                               ; preds = %.critedge
  %33 = getelementptr inbounds i8, ptr %2, i64 72
  %34 = load ptr, ptr %33, align 8, !tbaa !32
  %35 = getelementptr inbounds i8, ptr %2, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !33
  %37 = sext i32 %30 to i64
  %38 = getelementptr inbounds i32, ptr %36, i64 %37
  %39 = icmp eq ptr %34, %38
  br i1 %39, label %.critedge2, label %40

40:                                               ; preds = %32
  tail call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 2243, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_) #4
  unreachable

.critedge2:                                       ; preds = %.critedge, %32
  %41 = getelementptr inbounds i8, ptr %2, i64 48
  %42 = load i32, ptr %41, align 8, !tbaa !34
  %43 = and i32 %42, 8
  %.not = icmp eq i32 %43, 0
  br i1 %.not, label %44, label %49

44:                                               ; preds = %.critedge2
  %45 = getelementptr inbounds i8, ptr %2, i64 52
  %46 = load i32, ptr %45, align 4, !tbaa !35
  %47 = icmp eq i32 %46, %18
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  tail call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 2245, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_) #4
  unreachable

49:                                               ; preds = %44, %.critedge2
  %50 = getelementptr inbounds i8, ptr %2, i64 184
  %51 = load i32, ptr %50, align 8, !tbaa !36
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %53, label %.loopexit

53:                                               ; preds = %49
  %54 = tail call noundef ptr @_ZN8ImVectorI9ImDrawCmdE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %55 = tail call noundef ptr @_ZN8ImVectorI9ImDrawCmdE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %.not2124 = icmp eq ptr %54, %55
  br i1 %.not2124, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %53
  %56 = getelementptr inbounds i8, ptr %2, i64 192
  br label %57

57:                                               ; preds = %.lr.ph, %72
  %.025 = phi ptr [ %54, %.lr.ph ], [ %73, %72 ]
  %58 = getelementptr inbounds i8, ptr %.025, i64 40
  %59 = load ptr, ptr %58, align 8, !tbaa !27
  %.not22 = icmp eq ptr %59, null
  br i1 %.not22, label %72, label %60

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %.025, i64 60
  %62 = load i32, ptr %61, align 4, !tbaa !37
  %.not23 = icmp eq i32 %62, -1
  br i1 %.not23, label %72, label %63

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %.025, i64 56
  %65 = load i32, ptr %64, align 8, !tbaa !38
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %67, label %72

67:                                               ; preds = %63
  %68 = load ptr, ptr %56, align 8, !tbaa !39
  %69 = sext i32 %62 to i64
  %70 = getelementptr inbounds i8, ptr %68, i64 %69
  %71 = getelementptr inbounds i8, ptr %.025, i64 48
  store ptr %70, ptr %71, align 8, !tbaa !40
  br label %72

72:                                               ; preds = %67, %63, %60, %57
  %73 = getelementptr inbounds i8, ptr %.025, i64 64
  %.not21 = icmp eq ptr %73, %55
  br i1 %.not21, label %.loopexit, label %57

.loopexit:                                        ; preds = %72, %53, %49
  call void @_ZN8ImVectorIP10ImDrawListE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %74 = getelementptr inbounds i8, ptr %0, i64 4
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %75, i64 32
  %77 = load i32, ptr %76, align 8, !tbaa !28
  %78 = getelementptr inbounds i8, ptr %0, i64 12
  %79 = load i32, ptr %78, align 4, !tbaa !41
  %80 = add nsw i32 %79, %77
  store i32 %80, ptr %78, align 4, !tbaa !41
  %81 = getelementptr inbounds i8, ptr %75, i64 16
  %82 = load i32, ptr %81, align 8, !tbaa !31
  %83 = load <2 x i32>, ptr %74, align 4, !tbaa !46
  %84 = insertelement <2 x i32> <i32 1, i32 poison>, i32 %82, i64 1
  %85 = add nsw <2 x i32> %83, %84
  store <2 x i32> %85, ptr %74, align 4, !tbaa !46
  br label %86

86:                                               ; preds = %3, %11, %.loopexit
  ret void
}

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn 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 0}
!10 = !{!"_ZTS10ImDrawList", !11, i64 0, !13, i64 16, !14, i64 32, !12, i64 48, !12, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !15, i64 80, !16, i64 96, !20, i64 128, !22, i64 152, !23, i64 168, !24, i64 184, !18, i64 200, !6, i64 208}
!11 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !12, i64 0, !12, i64 4, !6, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS8ImVectorIjE", !12, i64 0, !12, i64 4, !6, i64 8}
!14 = !{!"_ZTS8ImVectorI10ImDrawVertE", !12, i64 0, !12, i64 4, !6, i64 8}
!15 = !{!"_ZTS8ImVectorI6ImVec2E", !12, i64 0, !12, i64 4, !6, i64 8}
!16 = !{!"_ZTS15ImDrawCmdHeader", !17, i64 0, !19, i64 16, !12, i64 24}
!17 = !{!"_ZTS6ImVec4", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!18 = !{!"float", !7, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = !{!"_ZTS18ImDrawListSplitter", !12, i64 0, !12, i64 4, !21, i64 8}
!21 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !12, i64 0, !12, i64 4, !6, i64 8}
!22 = !{!"_ZTS8ImVectorI6ImVec4E", !12, i64 0, !12, i64 4, !6, i64 8}
!23 = !{!"_ZTS8ImVectorIyE", !12, i64 0, !12, i64 4, !6, i64 8}
!24 = !{!"_ZTS8ImVectorIhE", !12, i64 0, !12, i64 4, !6, i64 8}
!25 = !{!26, !12, i64 32}
!26 = !{!"_ZTS9ImDrawCmd", !17, i64 0, !19, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 60}
!27 = !{!26, !6, i64 40}
!28 = !{!10, !12, i64 32}
!29 = !{!10, !6, i64 64}
!30 = !{!10, !6, i64 40}
!31 = !{!10, !12, i64 16}
!32 = !{!10, !6, i64 72}
!33 = !{!10, !6, i64 24}
!34 = !{!10, !12, i64 48}
!35 = !{!10, !12, i64 52}
!36 = !{!10, !12, i64 184}
!37 = !{!26, !12, i64 60}
!38 = !{!26, !12, i64 56}
!39 = !{!10, !6, i64 192}
!40 = !{!26, !6, i64 48}
!41 = !{!42, !12, i64 12}
!42 = !{!"_ZTS10ImDrawData", !43, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !44, i64 16, !45, i64 32, !45, i64 40, !45, i64 48, !6, i64 56}
!43 = !{!"bool", !7, i64 0}
!44 = !{!"_ZTS8ImVectorIP10ImDrawListE", !12, i64 0, !12, i64 4, !6, i64 8}
!45 = !{!"_ZTS6ImVec2", !18, i64 0, !18, i64 4}
!46 = !{!12, !12, i64 0}


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