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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui18ShadeVertsLinearUVEP10ImDrawListiiRK6ImVec2S4_S4_S4_b(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6, i1 noundef zeroext %7) #4 {
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i8, align 1
  %17 = alloca %struct.ImVec2, align 4
  %18 = alloca %struct.ImVec2, align 4
  %19 = alloca %struct.ImVec2, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %struct.ImVec2, align 4
  %23 = alloca %struct.ImVec2, align 4
  %24 = alloca ptr, align 8
  %25 = alloca %struct.ImVec2, align 4
  %26 = alloca %struct.ImVec2, align 4
  %27 = alloca %struct.ImVec2, align 4
  %28 = alloca %struct.ImVec2, align 4
  %29 = alloca %struct.ImVec2, align 4
  %30 = alloca ptr, align 8
  %31 = alloca %struct.ImVec2, align 4
  %32 = alloca %struct.ImVec2, align 4
  %33 = alloca %struct.ImVec2, align 4
  %34 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store i32 %2, ptr %11, align 4, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %35 = zext i1 %7 to i8
  store i8 %35, ptr %16, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %37)
  store <2 x float> %38, ptr %17, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %39, ptr noundef nonnull align 4 dereferenceable(8) %40)
  store <2 x float> %41, ptr %18, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %42 = getelementptr inbounds %struct.ImVec2, ptr %17, i32 0, i32 0
  %43 = load float, ptr %42, align 4, !tbaa !13
  %44 = fcmp une float %43, 0.000000e+00
  br i1 %44, label %45, label %51

45:                                               ; preds = %8
  %46 = getelementptr inbounds %struct.ImVec2, ptr %18, i32 0, i32 0
  %47 = load float, ptr %46, align 4, !tbaa !13
  %48 = getelementptr inbounds %struct.ImVec2, ptr %17, i32 0, i32 0
  %49 = load float, ptr %48, align 4, !tbaa !13
  %50 = fdiv float %47, %49
  br label %52

51:                                               ; preds = %8
  br label %52

52:                                               ; preds = %51, %45
  %53 = phi float [ %50, %45 ], [ 0.000000e+00, %51 ]
  %54 = getelementptr inbounds %struct.ImVec2, ptr %17, i32 0, i32 1
  %55 = load float, ptr %54, align 4, !tbaa !16
  %56 = fcmp une float %55, 0.000000e+00
  br i1 %56, label %57, label %63

57:                                               ; preds = %52
  %58 = getelementptr inbounds %struct.ImVec2, ptr %18, i32 0, i32 1
  %59 = load float, ptr %58, align 4, !tbaa !16
  %60 = getelementptr inbounds %struct.ImVec2, ptr %17, i32 0, i32 1
  %61 = load float, ptr %60, align 4, !tbaa !16
  %62 = fdiv float %59, %61
  br label %64

63:                                               ; preds = %52
  br label %64

64:                                               ; preds = %63, %57
  %65 = phi float [ %62, %57 ], [ 0.000000e+00, %63 ]
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %19, float noundef %53, float noundef %65)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ImDrawList, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.ImVector.2, ptr %67, i32 0, i32 2
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %struct.ImDrawVert, ptr %69, i64 %71
  store ptr %72, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ImDrawList, ptr %73, i32 0, i32 2
  %75 = getelementptr inbounds %struct.ImVector.2, ptr %74, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %struct.ImDrawVert, ptr %76, i64 %78
  store ptr %79, ptr %21, align 8, !tbaa !5
  %80 = load i8, ptr %16, align 1, !tbaa !11, !range !31, !noundef !32
  %81 = trunc i8 %80 to i1
  br i1 %81, label %82, label %116

82:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = load ptr, ptr %15, align 8, !tbaa !5
  %85 = call <2 x float> @_ZL5ImMinRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %83, ptr noundef nonnull align 4 dereferenceable(8) %84)
  store <2 x float> %85, ptr %22, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = call <2 x float> @_ZL5ImMaxRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %86, ptr noundef nonnull align 4 dereferenceable(8) %87)
  store <2 x float> %88, ptr %23, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %89 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %89, ptr %24, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %112, %82
  %91 = load ptr, ptr %24, align 8, !tbaa !5
  %92 = load ptr, ptr %21, align 8, !tbaa !5
  %93 = icmp ult ptr %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %115

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %97 = load ptr, ptr %24, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ImDrawVert, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds %struct.ImVec2, ptr %98, i32 0, i32 0
  %100 = load float, ptr %99, align 4, !tbaa !33
  %101 = load ptr, ptr %24, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.ImDrawVert, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds %struct.ImVec2, ptr %102, i32 0, i32 1
  %104 = load float, ptr %103, align 4, !tbaa !35
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %29, float noundef %100, float noundef %104)
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(8) %105)
  store <2 x float> %106, ptr %28, align 4
  %107 = call <2 x float> @_ZL5ImMulRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(8) %19)
  store <2 x float> %107, ptr %27, align 4
  %108 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %96, ptr noundef nonnull align 4 dereferenceable(8) %27)
  store <2 x float> %108, ptr %26, align 4
  %109 = call <2 x float> @_ZL7ImClampRK6ImVec2S1_S1_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %109, ptr %25, align 4
  %110 = load ptr, ptr %24, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ImDrawVert, ptr %110, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %111, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %112

112:                                              ; preds = %95
  %113 = load ptr, ptr %24, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ImDrawVert, ptr %113, i32 1
  store ptr %114, ptr %24, align 8, !tbaa !5
  br label %90, !llvm.loop !38

115:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %143

116:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %117 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %117, ptr %30, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %139, %116
  %119 = load ptr, ptr %30, align 8, !tbaa !5
  %120 = load ptr, ptr %21, align 8, !tbaa !5
  %121 = icmp ult ptr %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %142

123:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %125 = load ptr, ptr %30, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ImDrawVert, ptr %125, i32 0, i32 0
  %127 = getelementptr inbounds %struct.ImVec2, ptr %126, i32 0, i32 0
  %128 = load float, ptr %127, align 4, !tbaa !33
  %129 = load ptr, ptr %30, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.ImDrawVert, ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds %struct.ImVec2, ptr %130, i32 0, i32 1
  %132 = load float, ptr %131, align 4, !tbaa !35
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %34, float noundef %128, float noundef %132)
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %133)
  store <2 x float> %134, ptr %33, align 4
  %135 = call <2 x float> @_ZL5ImMulRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %33, ptr noundef nonnull align 4 dereferenceable(8) %19)
  store <2 x float> %135, ptr %32, align 4
  %136 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %124, ptr noundef nonnull align 4 dereferenceable(8) %32)
  store <2 x float> %136, ptr %31, align 4
  %137 = load ptr, ptr %30, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.ImDrawVert, ptr %137, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %138, ptr align 4 %31, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %139

139:                                              ; preds = %123
  %140 = load ptr, ptr %30, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ImDrawVert, ptr %140, i32 1
  store ptr %141, ptr %30, align 8, !tbaa !5
  br label %118, !llvm.loop !40

142:                                              ; preds = %122
  br label %143

143:                                              ; preds = %142, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL5ImMinRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL5ImMaxRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL7ImClampRK6ImVec2S1_S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL5ImMulRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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"="64" "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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!14, !15, i64 4}
!17 = !{!18, !6, i64 40}
!18 = !{!"_ZTS10ImDrawList", !19, i64 0, !20, i64 16, !21, i64 32, !10, i64 48, !10, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !22, i64 80, !23, i64 96, !26, i64 128, !28, i64 152, !29, i64 168, !30, i64 184, !15, i64 200, !6, i64 208}
!19 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !10, i64 0, !10, i64 4, !6, i64 8}
!20 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !6, i64 8}
!21 = !{!"_ZTS8ImVectorI10ImDrawVertE", !10, i64 0, !10, i64 4, !6, i64 8}
!22 = !{!"_ZTS8ImVectorI6ImVec2E", !10, i64 0, !10, i64 4, !6, i64 8}
!23 = !{!"_ZTS15ImDrawCmdHeader", !24, i64 0, !25, i64 16, !10, i64 24}
!24 = !{!"_ZTS6ImVec4", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!25 = !{!"long long", !7, i64 0}
!26 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !27, i64 8}
!27 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !6, i64 8}
!28 = !{!"_ZTS8ImVectorI6ImVec4E", !10, i64 0, !10, i64 4, !6, i64 8}
!29 = !{!"_ZTS8ImVectorIyE", !10, i64 0, !10, i64 4, !6, i64 8}
!30 = !{!"_ZTS8ImVectorIhE", !10, i64 0, !10, i64 4, !6, i64 8}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!34, !15, i64 0}
!34 = !{!"_ZTS10ImDrawVert", !14, i64 0, !14, i64 8, !10, i64 16}
!35 = !{!34, !15, i64 4}
!36 = !{i64 0, i64 4, !37, i64 4, i64 4, !37}
!37 = !{!15, !15, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}


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

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui18ShadeVertsLinearUVEP10ImDrawListiiRK6ImVec2S4_S4_S4_b(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6, i1 noundef zeroext %7) local_unnamed_addr #3 {
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImVec2, align 8
  %11 = alloca %struct.ImVec2, align 8
  %12 = alloca %struct.ImVec2, align 8
  %13 = alloca %struct.ImVec2, align 8
  %14 = alloca %struct.ImVec2, align 8
  %15 = alloca %struct.ImVec2, align 4
  %16 = alloca %struct.ImVec2, align 8
  %17 = alloca %struct.ImVec2, align 8
  %18 = alloca %struct.ImVec2, align 4
  %19 = tail call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %20 = tail call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %.sroa.016.0.vec.extract = extractelement <2 x float> %19, i64 0
  %21 = fcmp une float %.sroa.016.0.vec.extract, 0.000000e+00
  %.sroa.015.0.vec.extract = extractelement <2 x float> %20, i64 0
  %22 = fdiv float %.sroa.015.0.vec.extract, %.sroa.016.0.vec.extract
  %23 = select i1 %21, float %22, float 0.000000e+00
  %.sroa.016.4.vec.extract = extractelement <2 x float> %19, i64 1
  %24 = fcmp une float %.sroa.016.4.vec.extract, 0.000000e+00
  %.sroa.015.4.vec.extract = extractelement <2 x float> %20, i64 1
  %25 = fdiv float %.sroa.015.4.vec.extract, %.sroa.016.4.vec.extract
  %26 = select i1 %24, float %25, float 0.000000e+00
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef %23, float noundef %26)
  %27 = getelementptr inbounds i8, ptr %0, i64 40
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = sext i32 %1 to i64
  %30 = getelementptr inbounds %struct.ImDrawVert, ptr %28, i64 %29
  %31 = sext i32 %2 to i64
  %32 = getelementptr inbounds %struct.ImDrawVert, ptr %28, i64 %31
  br i1 %7, label %34, label %.preheader

.preheader:                                       ; preds = %8
  %33 = icmp slt i32 %1, %2
  br i1 %33, label %.lr.ph, label %.loopexit

34:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %35 = call <2 x float> @_ZL5ImMinRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %35, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %36 = call <2 x float> @_ZL5ImMaxRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %36, ptr %11, align 8
  %37 = icmp slt i32 %1, %2
  br i1 %37, label %.lr.ph40, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph40, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %.loopexit

.lr.ph40:                                         ; preds = %34, %.lr.ph40
  %.039 = phi ptr [ %46, %.lr.ph40 ], [ %30, %34 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %38 = load float, ptr %.039, align 4, !tbaa !24
  %39 = getelementptr inbounds i8, ptr %.039, i64 4
  %40 = load float, ptr %39, align 4, !tbaa !27
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef %38, float noundef %40)
  %41 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %41, ptr %14, align 8
  %42 = call <2 x float> @_ZL5ImMulRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %42, ptr %13, align 8
  %43 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store <2 x float> %43, ptr %12, align 8
  %44 = call <2 x float> @_ZL7ImClampRK6ImVec2S1_S1_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %11)
  %45 = getelementptr inbounds i8, ptr %.039, i64 8
  store <2 x float> %44, ptr %45, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %46 = getelementptr inbounds i8, ptr %.039, i64 20
  %47 = icmp ult ptr %46, %32
  br i1 %47, label %.lr.ph40, label %._crit_edge, !llvm.loop !28

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.03738 = phi ptr [ %55, %.lr.ph ], [ %30, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %48 = load float, ptr %.03738, align 4, !tbaa !24
  %49 = getelementptr inbounds i8, ptr %.03738, i64 4
  %50 = load float, ptr %49, align 4, !tbaa !27
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %18, float noundef %48, float noundef %50)
  %51 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %51, ptr %17, align 8
  %52 = call <2 x float> @_ZL5ImMulRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %52, ptr %16, align 8
  %53 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %54 = getelementptr inbounds i8, ptr %.03738, i64 8
  store <2 x float> %53, ptr %54, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  %55 = getelementptr inbounds i8, ptr %.03738, i64 20
  %56 = icmp ult ptr %55, %32
  br i1 %56, label %.lr.ph, label %.loopexit, !llvm.loop !30

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL5ImMinRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL5ImMaxRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL7ImClampRK6ImVec2S1_S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL5ImMulRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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"="64" "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 = { 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, !11, i64 40}
!6 = !{!"_ZTS10ImDrawList", !7, i64 0, !12, i64 16, !13, i64 32, !8, i64 48, !8, i64 52, !11, i64 56, !11, i64 64, !11, i64 72, !14, i64 80, !15, i64 96, !19, i64 128, !21, i64 152, !22, i64 168, !23, i64 184, !17, i64 200, !11, i64 208}
!7 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !8, i64 0, !8, i64 4, !11, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTS8ImVectorItE", !8, i64 0, !8, i64 4, !11, i64 8}
!13 = !{!"_ZTS8ImVectorI10ImDrawVertE", !8, i64 0, !8, i64 4, !11, i64 8}
!14 = !{!"_ZTS8ImVectorI6ImVec2E", !8, i64 0, !8, i64 4, !11, i64 8}
!15 = !{!"_ZTS15ImDrawCmdHeader", !16, i64 0, !18, i64 16, !8, i64 24}
!16 = !{!"_ZTS6ImVec4", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12}
!17 = !{!"float", !9, i64 0}
!18 = !{!"long long", !9, i64 0}
!19 = !{!"_ZTS18ImDrawListSplitter", !8, i64 0, !8, i64 4, !20, i64 8}
!20 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !8, i64 0, !8, i64 4, !11, i64 8}
!21 = !{!"_ZTS8ImVectorI6ImVec4E", !8, i64 0, !8, i64 4, !11, i64 8}
!22 = !{!"_ZTS8ImVectorIyE", !8, i64 0, !8, i64 4, !11, i64 8}
!23 = !{!"_ZTS8ImVectorIhE", !8, i64 0, !8, i64 4, !11, i64 8}
!24 = !{!25, !17, i64 0}
!25 = !{!"_ZTS10ImDrawVert", !26, i64 0, !26, i64 8, !8, i64 16}
!26 = !{!"_ZTS6ImVec2", !17, i64 0, !17, i64 4}
!27 = !{!25, !17, i64 4}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


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