; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/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, ptr, %struct.ImVector.3, %struct.ImVector.4, %struct.ImVector, %struct.ImDrawCmdHeader, %struct.ImDrawListSplitter, float, [4 x i8] }>
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImDrawCmdHeader = type <{ %struct.ImVec4, ptr, i32, [4 x i8] }>
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.5 }
%struct.ImVector.5 = type { i32, i32, ptr }
%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 %struct.ImVec2, align 4
  %31 = alloca ptr, align 8
  %32 = alloca %struct.ImVec2, align 4
  %33 = alloca %struct.ImVec2, align 4
  %34 = alloca %struct.ImVec2, align 4
  %35 = 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
  %36 = zext i1 %7 to i8
  store i8 %36, ptr %16, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %37, ptr noundef nonnull align 4 dereferenceable(8) %38)
  store <2 x float> %39, ptr %17, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %40 = load ptr, ptr %15, align 8, !tbaa !5
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  %42 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %40, ptr noundef nonnull align 4 dereferenceable(8) %41)
  store <2 x float> %42, ptr %18, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %43 = getelementptr inbounds %struct.ImVec2, ptr %17, i32 0, i32 0
  %44 = load float, ptr %43, align 4, !tbaa !13
  %45 = fcmp une float %44, 0.000000e+00
  br i1 %45, label %46, label %52

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

52:                                               ; preds = %8
  br label %53

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

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

64:                                               ; preds = %53
  br label %65

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

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

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

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

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %97 = 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
  %98 = load ptr, ptr %24, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.ImDrawVert, ptr %98, i32 0, i32 0
  %100 = getelementptr inbounds %struct.ImVec2, ptr %99, i32 0, i32 0
  %101 = load float, ptr %100, align 4, !tbaa !31
  %102 = load ptr, ptr %24, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ImDrawVert, ptr %102, i32 0, i32 0
  %104 = getelementptr inbounds %struct.ImVec2, ptr %103, i32 0, i32 1
  %105 = load float, ptr %104, align 4, !tbaa !33
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %29, float noundef %101, float noundef %105)
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(8) %106)
  store <2 x float> %107, ptr %28, align 4
  %108 = 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> %108, ptr %27, align 4
  %109 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %97, ptr noundef nonnull align 4 dereferenceable(8) %27)
  store <2 x float> %109, ptr %26, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !34
  %110 = load <2 x float>, ptr %30, align 4
  %111 = call <2 x float> @_ZL7ImClampRK6ImVec2S1_S_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(8) %22, <2 x float> %110)
  store <2 x float> %111, ptr %25, align 4
  %112 = load ptr, ptr %24, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ImDrawVert, ptr %112, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %113, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !34
  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 %114

114:                                              ; preds = %96
  %115 = load ptr, ptr %24, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ImDrawVert, ptr %115, i32 1
  store ptr %116, ptr %24, align 8, !tbaa !5
  br label %91, !llvm.loop !36

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

118:                                              ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %119 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %119, ptr %31, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %141, %118
  %121 = load ptr, ptr %31, align 8, !tbaa !5
  %122 = load ptr, ptr %21, align 8, !tbaa !5
  %123 = icmp ult ptr %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %144

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

141:                                              ; preds = %125
  %142 = load ptr, ptr %31, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ImDrawVert, ptr %142, i32 1
  store ptr %143, ptr %31, align 8, !tbaa !5
  br label %120, !llvm.loop !38

144:                                              ; preds = %124
  br label %145

145:                                              ; preds = %144, %117
  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_S_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), <2 x float>) #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, !6, i64 80, !22, i64 88, !23, i64 104, !24, i64 120, !25, i64 136, !27, i64 168, !15, i64 192}
!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 = !{!"_ZTS8ImVectorI6ImVec4E", !10, i64 0, !10, i64 4, !6, i64 8}
!23 = !{!"_ZTS8ImVectorIPvE", !10, i64 0, !10, i64 4, !6, i64 8}
!24 = !{!"_ZTS8ImVectorI6ImVec2E", !10, i64 0, !10, i64 4, !6, i64 8}
!25 = !{!"_ZTS15ImDrawCmdHeader", !26, i64 0, !6, i64 16, !10, i64 24}
!26 = !{!"_ZTS6ImVec4", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!27 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !28, i64 8}
!28 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !6, i64 8}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!32, !15, i64 0}
!32 = !{!"_ZTS10ImDrawVert", !14, i64 0, !14, i64 8, !10, i64 16}
!33 = !{!32, !15, i64 4}
!34 = !{i64 0, i64 4, !35, i64 4, i64 4, !35}
!35 = !{!15, !15, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}


; 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 4
  %15 = alloca %struct.ImVec2, align 8
  %16 = alloca %struct.ImVec2, align 8
  %17 = alloca %struct.ImVec2, align 4
  %18 = tail call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %19 = 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.018.0.vec.extract = extractelement <2 x float> %18, i64 0
  %20 = fcmp une float %.sroa.018.0.vec.extract, 0.000000e+00
  %.sroa.017.0.vec.extract = extractelement <2 x float> %19, i64 0
  %21 = fdiv float %.sroa.017.0.vec.extract, %.sroa.018.0.vec.extract
  %22 = select i1 %20, float %21, float 0.000000e+00
  %.sroa.018.4.vec.extract = extractelement <2 x float> %18, i64 1
  %23 = fcmp une float %.sroa.018.4.vec.extract, 0.000000e+00
  %.sroa.017.4.vec.extract = extractelement <2 x float> %19, i64 1
  %24 = fdiv float %.sroa.017.4.vec.extract, %.sroa.018.4.vec.extract
  %25 = select i1 %23, float %24, float 0.000000e+00
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef %22, float noundef %25)
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = sext i32 %1 to i64
  %29 = getelementptr inbounds %struct.ImDrawVert, ptr %27, i64 %28
  %30 = sext i32 %2 to i64
  %31 = getelementptr inbounds %struct.ImDrawVert, ptr %27, i64 %30
  br i1 %7, label %33, label %.preheader

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

33:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %34 = 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> %34, ptr %10, align 8
  %35 = call <2 x float> @_ZL5ImMaxRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  %36 = icmp slt i32 %1, %2
  br i1 %36, label %.lr.ph42, label %._crit_edge

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

.lr.ph42:                                         ; preds = %33, %.lr.ph42
  %.041 = phi ptr [ %45, %.lr.ph42 ], [ %29, %33 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  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
  %37 = load float, ptr %.041, align 4, !tbaa !22
  %38 = getelementptr inbounds i8, ptr %.041, i64 4
  %39 = load float, ptr %38, align 4, !tbaa !25
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef %37, float noundef %39)
  %40 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %40, ptr %13, align 8
  %41 = call <2 x float> @_ZL5ImMulRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %41, ptr %12, align 8
  %42 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %12)
  store <2 x float> %42, ptr %11, align 8
  %43 = call <2 x float> @_ZL7ImClampRK6ImVec2S1_S_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %10, <2 x float> %35)
  %44 = getelementptr inbounds i8, ptr %.041, i64 8
  store <2 x float> %43, ptr %44, align 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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  %45 = getelementptr inbounds i8, ptr %.041, i64 20
  %46 = icmp ult ptr %45, %31
  br i1 %46, label %.lr.ph42, label %._crit_edge, !llvm.loop !26

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.03940 = phi ptr [ %54, %.lr.ph ], [ %29, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  %47 = load float, ptr %.03940, align 4, !tbaa !22
  %48 = getelementptr inbounds i8, ptr %.03940, i64 4
  %49 = load float, ptr %48, align 4, !tbaa !25
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %17, float noundef %47, float noundef %49)
  %50 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %50, ptr %16, align 8
  %51 = call <2 x float> @_ZL5ImMulRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %51, ptr %15, align 8
  %52 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %53 = getelementptr inbounds i8, ptr %.03940, i64 8
  store <2 x float> %52, ptr %53, align 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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  %54 = getelementptr inbounds i8, ptr %.03940, i64 20
  %55 = icmp ult ptr %54, %31
  br i1 %55, label %.lr.ph, label %.loopexit, !llvm.loop !28

.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_S_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), <2 x float>) 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, !11, i64 80, !14, i64 88, !15, i64 104, !16, i64 120, !17, i64 136, !20, i64 168, !19, i64 192}
!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 = !{!"_ZTS8ImVectorI6ImVec4E", !8, i64 0, !8, i64 4, !11, i64 8}
!15 = !{!"_ZTS8ImVectorIPvE", !8, i64 0, !8, i64 4, !11, i64 8}
!16 = !{!"_ZTS8ImVectorI6ImVec2E", !8, i64 0, !8, i64 4, !11, i64 8}
!17 = !{!"_ZTS15ImDrawCmdHeader", !18, i64 0, !11, i64 16, !8, i64 24}
!18 = !{!"_ZTS6ImVec4", !19, i64 0, !19, i64 4, !19, i64 8, !19, i64 12}
!19 = !{!"float", !9, i64 0}
!20 = !{!"_ZTS18ImDrawListSplitter", !8, i64 0, !8, i64 4, !21, i64 8}
!21 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !8, i64 0, !8, i64 4, !11, i64 8}
!22 = !{!23, !19, i64 0}
!23 = !{!"_ZTS10ImDrawVert", !24, i64 0, !24, i64 8, !8, i64 16}
!24 = !{!"_ZTS6ImVec2", !19, i64 0, !19, i64 4}
!25 = !{!23, !19, i64 4}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}


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