; LLVM IR from xhub/reshop :: gui/external/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.12, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, ptr }
%struct.ImVector.12 = type { i32, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [79 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
@.str.17 = external hidden unnamed_addr constant [116 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 %193

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

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 2237, 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 i16, 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 2238, 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 2240, 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 4
  %112 = load i32, ptr %111, align 4, !tbaa !35
  %113 = icmp ult i32 %112, 65536
  br i1 %113, label %114, label %115

114:                                              ; preds = %109
  br label %115

115:                                              ; preds = %114, %109
  %116 = phi i1 [ false, %109 ], [ true, %114 ]
  br i1 %116, label %117, label %118

117:                                              ; preds = %115
  br label %120

118:                                              ; preds = %115
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 2258, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_) #5
  unreachable

119:                                              ; No predecessors!
  br label %120

120:                                              ; preds = %119, %117
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ImDrawList, ptr %121, i32 0, i32 13
  %123 = getelementptr inbounds %struct.ImVector.6, ptr %122, i32 0, i32 0
  %124 = load i32, ptr %123, align 8, !tbaa !36
  %125 = icmp sgt i32 %124, 0
  br i1 %125, label %126, label %171

126:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.ImDrawList, ptr %127, i32 0, i32 0
  store ptr %128, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = call noundef ptr @_ZN8ImVectorI9ImDrawCmdE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %129)
  store ptr %130, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = call noundef ptr @_ZN8ImVectorI9ImDrawCmdE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %131)
  store ptr %132, ptr %9, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %167, %126
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = icmp ne ptr %134, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  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 %170

138:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %139, ptr %10, align 8, !tbaa !5
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ImDrawCmd, ptr %140, i32 0, i32 5
  %142 = load ptr, ptr %141, align 8, !tbaa !27
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %166

144:                                              ; preds = %138
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.ImDrawCmd, ptr %145, i32 0, i32 8
  %147 = load i32, ptr %146, align 4, !tbaa !37
  %148 = icmp ne i32 %147, -1
  br i1 %148, label %149, label %166

149:                                              ; preds = %144
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.ImDrawCmd, ptr %150, i32 0, i32 7
  %152 = load i32, ptr %151, align 8, !tbaa !38
  %153 = icmp sgt i32 %152, 0
  br i1 %153, label %154, label %166

154:                                              ; preds = %149
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.ImDrawList, ptr %155, i32 0, i32 13
  %157 = getelementptr inbounds %struct.ImVector.6, ptr %156, i32 0, i32 2
  %158 = load ptr, ptr %157, align 8, !tbaa !39
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.ImDrawCmd, ptr %159, i32 0, i32 8
  %161 = load i32, ptr %160, align 4, !tbaa !37
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %158, i64 %162
  %164 = load ptr, ptr %10, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.ImDrawCmd, ptr %164, i32 0, i32 6
  store ptr %163, ptr %165, align 8, !tbaa !40
  br label %166

166:                                              ; preds = %154, %149, %144, %138
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.ImDrawCmd, ptr %168, i32 1
  store ptr %169, ptr %8, align 8, !tbaa !5
  br label %133

170:                                              ; preds = %137
  br label %171

171:                                              ; preds = %170, %120
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN8ImVectorIP10ImDrawListE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %172, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.ImDrawData, ptr %173, i32 0, i32 1
  %175 = load i32, ptr %174, align 4, !tbaa !41
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %174, align 4, !tbaa !41
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.ImDrawList, ptr %177, i32 0, i32 2
  %179 = getelementptr inbounds %struct.ImVector.2, ptr %178, i32 0, i32 0
  %180 = load i32, ptr %179, align 8, !tbaa !28
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.ImDrawData, ptr %181, i32 0, i32 3
  %183 = load i32, ptr %182, align 4, !tbaa !46
  %184 = add nsw i32 %183, %180
  store i32 %184, ptr %182, align 4, !tbaa !46
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.ImDrawList, ptr %185, i32 0, i32 1
  %187 = getelementptr inbounds %struct.ImVector.1, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 8, !tbaa !31
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.ImDrawData, ptr %189, i32 0, i32 2
  %191 = load i32, ptr %190, align 8, !tbaa !47
  %192 = add nsw i32 %191, %188
  store i32 %192, ptr %190, align 8, !tbaa !47
  br label %193

193:                                              ; preds = %171, %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 = !{!"_ZTS8ImVectorItE", !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 [79 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
@.str.17 = external hidden unnamed_addr constant [116 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 %89
    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 %89, 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 2237, 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 i16, 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 2238, 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
  %44 = getelementptr inbounds i8, ptr %2, i64 52
  %45 = load i32, ptr %44, align 4, !tbaa !35
  br i1 %.not, label %46, label %.critedge2._crit_edge

46:                                               ; preds = %.critedge2
  %47 = icmp eq i32 %45, %18
  br i1 %47, label %.critedge2._crit_edge, label %48

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

.critedge2._crit_edge:                            ; preds = %.critedge2, %46
  %49 = phi i32 [ %18, %46 ], [ %45, %.critedge2 ]
  %50 = icmp ult i32 %49, 65536
  br i1 %50, label %52, label %51

51:                                               ; preds = %.critedge2._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 2258, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui23AddDrawListToDrawDataExEP10ImDrawDataP8ImVectorIP10ImDrawListES4_) #4
  unreachable

52:                                               ; preds = %.critedge2._crit_edge
  %53 = getelementptr inbounds i8, ptr %2, i64 184
  %54 = load i32, ptr %53, align 8, !tbaa !36
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %56, label %.loopexit

56:                                               ; preds = %52
  %57 = tail call noundef ptr @_ZN8ImVectorI9ImDrawCmdE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %58 = tail call noundef ptr @_ZN8ImVectorI9ImDrawCmdE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %.not2124 = icmp eq ptr %57, %58
  br i1 %.not2124, label %.loopexit, label %.lr.ph

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

60:                                               ; preds = %.lr.ph, %75
  %.025 = phi ptr [ %57, %.lr.ph ], [ %76, %75 ]
  %61 = getelementptr inbounds i8, ptr %.025, i64 40
  %62 = load ptr, ptr %61, align 8, !tbaa !27
  %.not22 = icmp eq ptr %62, null
  br i1 %.not22, label %75, label %63

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %.025, i64 60
  %65 = load i32, ptr %64, align 4, !tbaa !37
  %.not23 = icmp eq i32 %65, -1
  br i1 %.not23, label %75, label %66

66:                                               ; preds = %63
  %67 = getelementptr inbounds i8, ptr %.025, i64 56
  %68 = load i32, ptr %67, align 8, !tbaa !38
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %70, label %75

70:                                               ; preds = %66
  %71 = load ptr, ptr %59, align 8, !tbaa !39
  %72 = sext i32 %65 to i64
  %73 = getelementptr inbounds i8, ptr %71, i64 %72
  %74 = getelementptr inbounds i8, ptr %.025, i64 48
  store ptr %73, ptr %74, align 8, !tbaa !40
  br label %75

75:                                               ; preds = %70, %66, %63, %60
  %76 = getelementptr inbounds i8, ptr %.025, i64 64
  %.not21 = icmp eq ptr %76, %58
  br i1 %.not21, label %.loopexit, label %60

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

89:                                               ; 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 = !{!"_ZTS8ImVectorItE", !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: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass