; LLVM IR from hbatagelo/abcg :: abcg/external/imgui/imgui.ll (ZN7ImGuiIO16AddMousePosEventEff)

; 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.ImGuiInputEvent = type <{ i32, i32, %union.anon, i8, [3 x i8] }>
%union.anon = type { %struct.ImGuiInputEventKey }
%struct.ImGuiInputEventKey = type { i32, i8, float }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, float, float, float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, float, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, i32, %struct.ImVec2, [652 x i32], [652 x i8], [16 x float], ptr, %struct.ImVec2, [5 x i8], float, float, i8, i8, i8, i8, i32, [652 x %struct.ImGuiKeyData], i8, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i16], [5 x i16], [5 x i8], [5 x i8], [5 x i8], [5 x float], [5 x float], [5 x float], float, i8, i8, i8, i8, i16, %struct.ImVector }
%struct.ImGuiKeyData = type { i8, float, float, float }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImGuiInputEventMousePos = type { float, float }
%struct.ImGuiContext = type { i8, i8, %struct.ImGuiIO, %struct.ImVector.0, %struct.ImVector.0, %struct.ImGuiStyle, ptr, float, float, %struct.ImDrawListSharedData, double, i32, i32, i32, i8, i8, i8, i8, i8, ptr, %struct.ImVector.2, %struct.ImVector.2, %struct.ImVector.2, %struct.ImVector.3, %struct.ImGuiStorage, i32, %struct.ImVec2, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, i32, float, %struct.ImVec2, %struct.ImVec2, i32, i32, i32, i8, i8, float, float, i32, i32, float, i8, i8, i8, i8, i8, i8, %struct.ImVec2, ptr, i32, i32, i32, i8, i8, ptr, i32, float, [140 x %struct.ImGuiKeyOwnerData], %struct.ImGuiKeyRoutingTable, i32, i8, i32, i32, i32, i32, %struct.ImGuiNextItemData, %struct.ImGuiLastItemData, %struct.ImGuiNextWindowData, %struct.ImVector.6, %struct.ImVector.7, %struct.ImVector.8, %struct.ImVector.9, %struct.ImVector.10, %struct.ImVector.11, %struct.ImVector.12, %struct.ImVector.12, i32, %struct.ImVector.13, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i32, %struct.ImRect, i8, i8, i8, i32, i32, i32, i32, i32, i32, %struct.ImRect, %struct.ImRect, i32, i32, i32, %struct.ImGuiNavItemData, %struct.ImGuiNavItemData, %struct.ImGuiNavItemData, %struct.ImGuiNavItemData, i32, i32, ptr, ptr, ptr, float, float, i8, %struct.ImVec2, %struct.ImVec2, float, i32, i8, i8, i8, i32, i32, i32, [4 x i8], %struct.ImGuiPayload, %struct.ImRect, i32, i32, float, i32, i32, i32, i32, %struct.ImVector.14, [16 x i8], i32, %struct.ImVector.15, ptr, i32, %struct.ImVector.16, %struct.ImPool, %struct.ImVector.18, %struct.ImVector.19, ptr, %struct.ImPool.20, %struct.ImVector.22, %struct.ImVector.23, i32, i32, float, float, %struct.ImVec2, %struct.ImGuiInputTextState, %struct.ImFont, i32, i32, i32, i32, float, float, i32, %struct.ImVec4, %struct.ImGuiComboPreviewData, float, float, i8, i8, float, float, float, float, i16, i16, %struct.ImVector.24, %struct.ImVector.9, %struct.ImGuiPlatformImeData, %struct.ImGuiPlatformImeData, i8, i8, float, %struct.ImGuiTextBuffer, %struct.ImVector.26, %struct.ImChunkStream, %struct.ImChunkStream.27, %struct.ImVector.28, i32, [7 x ptr], i8, i32, ptr, %struct.ImGuiTextBuffer, ptr, ptr, float, i8, i32, i32, i32, i32, %struct.ImGuiTextBuffer, %struct.ImGuiTextIndex, i8, i8, i8, i8, i8, i32, %struct.ImGuiMetricsConfig, %struct.ImGuiStackTool, [60 x float], i32, i32, float, i32, i32, i32, %struct.ImVector.24 }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImGuiStyle = type { float, float, %struct.ImVec2, float, float, %struct.ImVec2, %struct.ImVec2, i32, float, float, float, float, %struct.ImVec2, float, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, float, float, float, float, float, float, float, float, i32, %struct.ImVec2, %struct.ImVec2, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, i8, i8, i8, float, float, [53 x %struct.ImVec4] }
%struct.ImDrawListSharedData = type { %struct.ImVec2, ptr, float, float, float, %struct.ImVec4, i32, %struct.ImVector.1, [48 x %struct.ImVec2], float, [64 x i8], ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImGuiStorage = type { %struct.ImVector.4 }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImGuiKeyOwnerData = type <{ i32, i32, i8, i8, [2 x i8] }>
%struct.ImGuiKeyRoutingTable = type { [140 x i16], %struct.ImVector.5, %struct.ImVector.5 }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImGuiNextItemData = type <{ i32, float, i32, i32, i8, [3 x i8] }>
%struct.ImGuiLastItemData = type { i32, i32, i32, %struct.ImRect, %struct.ImRect, %struct.ImRect }
%struct.ImGuiNextWindowData = type <{ i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, [3 x i8], %struct.ImRect, [4 x i8], ptr, ptr, float, %struct.ImVec2, [4 x i8] }>
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.7 = type { i32, i32, ptr }
%struct.ImVector.8 = type { i32, i32, ptr }
%struct.ImVector.10 = type { i32, i32, ptr }
%struct.ImVector.11 = type { i32, i32, ptr }
%struct.ImVector.12 = type { i32, i32, ptr }
%struct.ImVector.13 = type { i32, i32, ptr }
%struct.ImGuiNavItemData = type { ptr, i32, i32, %struct.ImRect, i32, float, float, float }
%struct.ImGuiPayload = type <{ ptr, i32, i32, i32, i32, [33 x i8], i8, i8, [5 x i8] }>
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVector.14 = type { i32, i32, ptr }
%struct.ImVector.15 = type { i32, i32, ptr }
%struct.ImVector.16 = type { i32, i32, ptr }
%struct.ImPool = type { %struct.ImVector.17, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.17 = type { i32, i32, ptr }
%struct.ImVector.18 = type { i32, i32, ptr }
%struct.ImVector.19 = type { i32, i32, ptr }
%struct.ImPool.20 = type { %struct.ImVector.21, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.21 = type { i32, i32, ptr }
%struct.ImVector.22 = type { i32, i32, ptr }
%struct.ImVector.23 = type { i32, i32, ptr }
%struct.ImGuiInputTextState = type <{ ptr, i32, i32, i32, [4 x i8], %struct.ImVector, %struct.ImVector.24, %struct.ImVector.24, i8, [3 x i8], i32, float, %"struct.ImStb::STB_TexteditState", float, i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ImStb::STB_TexteditState" = type { i32, i32, i32, i8, i32, i8, i8, i8, i8, i8, i8, i8, float, %"struct.ImStb::StbUndoState" }
%"struct.ImStb::StbUndoState" = type { [99 x %"struct.ImStb::StbUndoRecord"], [999 x i16], i16, i16, i32, i32 }
%"struct.ImStb::StbUndoRecord" = type { i32, i32, i32, i32 }
%struct.ImFont = type <{ %struct.ImVector.18, float, float, %struct.ImVector, %struct.ImVector.25, ptr, ptr, ptr, i16, i16, i16, i16, float, float, i8, [3 x i8], float, float, float, i32, [2 x i8], [2 x i8] }>
%struct.ImVector.25 = type { i32, i32, ptr }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImGuiComboPreviewData = type { %struct.ImRect, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, i32 }
%struct.ImVector.9 = type { i32, i32, ptr }
%struct.ImGuiPlatformImeData = type { i8, %struct.ImVec2, float }
%struct.ImVector.26 = type { i32, i32, ptr }
%struct.ImChunkStream = type { %struct.ImVector.24 }
%struct.ImChunkStream.27 = type { %struct.ImVector.24 }
%struct.ImVector.28 = type { i32, i32, ptr }
%struct.ImGuiTextBuffer = type { %struct.ImVector.24 }
%struct.ImGuiTextIndex = type <{ %struct.ImVector.10, i32, [4 x i8] }>
%struct.ImGuiMetricsConfig = type { i8, i8, i8, i8, i8, i8, i8, i8, i32, i32 }
%struct.ImGuiStackTool = type { i32, i32, i32, %struct.ImVector.29, i8, float }
%struct.ImVector.29 = type { i32, i32, ptr }
%struct.ImVector.24 = type { i32, i32, ptr }

@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN7ImGuiIO16AddMousePosEventEff = external hidden unnamed_addr constant [45 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: 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: 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) #2

; 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) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15ImGuiInputEventC2Ev(ptr noundef nonnull align 4 dereferenceable(21)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL20FindLatestInputEvent19ImGuiInputEventTypei(i32 noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7ImGuiIO16AddMousePosEventEff(ptr noundef nonnull align 8 dereferenceable(14280) %0, float noundef %1, float noundef %2) #5 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %struct.ImVec2, align 4
  %12 = alloca %struct.ImGuiInputEvent, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store float %1, ptr %5, align 4, !tbaa !9
  store float %2, ptr %6, align 4, !tbaa !9
  %13 = load ptr, ptr %4, align 8
  %14 = getelementptr inbounds %struct.ImGuiIO, ptr %13, i32 0, i32 58
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %3
  br label %20

18:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 1454, ptr noundef @__PRETTY_FUNCTION__._ZN7ImGuiIO16AddMousePosEventEff) #7
  unreachable

19:                                               ; No predecessors!
  br label %20

20:                                               ; preds = %19, %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %21 = getelementptr inbounds %struct.ImGuiIO, ptr %13, i32 0, i32 58
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  store ptr %22, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.ImGuiIO, ptr %13, i32 0, i32 85
  %24 = load i8, ptr %23, align 1, !tbaa !18, !range !19, !noundef !20
  %25 = trunc i8 %24 to i1
  br i1 %25, label %27, label %26

26:                                               ; preds = %20
  store i32 1, ptr %8, align 4
  br label %89

27:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %28 = load float, ptr %5, align 4, !tbaa !9
  %29 = fcmp ogt float %28, 0xC7EFFFFFE0000000
  br i1 %29, label %30, label %33

30:                                               ; preds = %27
  %31 = load float, ptr %5, align 4, !tbaa !9
  %32 = call noundef float @_ZL13ImFloorSignedf(float noundef %31)
  br label %35

33:                                               ; preds = %27
  %34 = load float, ptr %5, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %33, %30
  %36 = phi float [ %32, %30 ], [ %34, %33 ]
  %37 = load float, ptr %6, align 4, !tbaa !9
  %38 = fcmp ogt float %37, 0xC7EFFFFFE0000000
  br i1 %38, label %39, label %42

39:                                               ; preds = %35
  %40 = load float, ptr %6, align 4, !tbaa !9
  %41 = call noundef float @_ZL13ImFloorSignedf(float noundef %40)
  br label %44

42:                                               ; preds = %35
  %43 = load float, ptr %6, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %42, %39
  %45 = phi float [ %41, %39 ], [ %43, %42 ]
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef %36, float noundef %45)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %46 = call noundef ptr @_ZL20FindLatestInputEvent19ImGuiInputEventTypei(i32 noundef 1, i32 noundef -1)
  store ptr %46, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %58

49:                                               ; preds = %44
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ImGuiInputEvent, ptr %50, i32 0, i32 2
  %52 = getelementptr inbounds %struct.ImGuiInputEventMousePos, ptr %51, i32 0, i32 0
  %53 = load float, ptr %52, align 4, !tbaa !21
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.ImGuiInputEvent, ptr %54, i32 0, i32 2
  %56 = getelementptr inbounds %struct.ImGuiInputEventMousePos, ptr %55, i32 0, i32 1
  %57 = load float, ptr %56, align 4, !tbaa !21
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef %53, float noundef %57)
  br label %62

58:                                               ; preds = %44
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ImGuiContext, ptr %59, i32 0, i32 2
  %61 = getelementptr inbounds %struct.ImGuiIO, ptr %60, i32 0, i32 59
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %61, i64 8, i1 false), !tbaa.struct !22
  br label %62

62:                                               ; preds = %58, %49
  %63 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 0
  %64 = load float, ptr %63, align 4, !tbaa !23
  %65 = getelementptr inbounds %struct.ImVec2, ptr %9, i32 0, i32 0
  %66 = load float, ptr %65, align 4, !tbaa !23
  %67 = fcmp oeq float %64, %66
  br i1 %67, label %68, label %75

68:                                               ; preds = %62
  %69 = getelementptr inbounds %struct.ImVec2, ptr %11, i32 0, i32 1
  %70 = load float, ptr %69, align 4, !tbaa !24
  %71 = getelementptr inbounds %struct.ImVec2, ptr %9, i32 0, i32 1
  %72 = load float, ptr %71, align 4, !tbaa !24
  %73 = fcmp oeq float %70, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %68
  store i32 1, ptr %8, align 4
  br label %88

75:                                               ; preds = %68, %62
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  call void @_ZN15ImGuiInputEventC2Ev(ptr noundef nonnull align 4 dereferenceable(21) %12)
  %76 = getelementptr inbounds %struct.ImGuiInputEvent, ptr %12, i32 0, i32 0
  store i32 1, ptr %76, align 4, !tbaa !25
  %77 = getelementptr inbounds %struct.ImGuiInputEvent, ptr %12, i32 0, i32 1
  store i32 1, ptr %77, align 4, !tbaa !29
  %78 = getelementptr inbounds %struct.ImVec2, ptr %9, i32 0, i32 0
  %79 = load float, ptr %78, align 4, !tbaa !23
  %80 = getelementptr inbounds %struct.ImGuiInputEvent, ptr %12, i32 0, i32 2
  %81 = getelementptr inbounds %struct.ImGuiInputEventMousePos, ptr %80, i32 0, i32 0
  store float %79, ptr %81, align 4, !tbaa !21
  %82 = getelementptr inbounds %struct.ImVec2, ptr %9, i32 0, i32 1
  %83 = load float, ptr %82, align 4, !tbaa !24
  %84 = getelementptr inbounds %struct.ImGuiInputEvent, ptr %12, i32 0, i32 2
  %85 = getelementptr inbounds %struct.ImGuiInputEventMousePos, ptr %84, i32 0, i32 1
  store float %83, ptr %85, align 4, !tbaa !21
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ImGuiContext, ptr %86, i32 0, i32 3
  call void @_ZN8ImVectorI15ImGuiInputEventE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 4 dereferenceable(21) %12)
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  store i32 0, ptr %8, align 4
  br label %88

88:                                               ; preds = %75, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %89

89:                                               ; preds = %88, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  %90 = load i32, ptr %8, align 4
  switch i32 %90, label %92 [
    i32 0, label %91
    i32 1, label %91
  ]

91:                                               ; preds = %89, %89
  ret void

92:                                               ; preds = %89
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL13ImFloorSignedf(float noundef) #6

attributes #0 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #6 = { 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 #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 3576}
!12 = !{!"_ZTS7ImGuiIO", !13, i64 0, !13, i64 4, !14, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !15, i64 92, !6, i64 96, !14, i64 104, !15, i64 112, !15, i64 113, !15, i64 114, !15, i64 115, !15, i64 116, !15, i64 117, !15, i64 118, !15, i64 119, !10, i64 120, !15, i64 124, !15, i64 125, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !15, i64 208, !15, i64 209, !15, i64 210, !15, i64 211, !15, i64 212, !15, i64 213, !15, i64 214, !10, i64 216, !13, i64 220, !13, i64 224, !13, i64 228, !13, i64 232, !13, i64 236, !14, i64 240, !7, i64 248, !7, i64 2856, !7, i64 3508, !6, i64 3576, !14, i64 3584, !7, i64 3592, !10, i64 3600, !10, i64 3604, !15, i64 3608, !15, i64 3609, !15, i64 3610, !15, i64 3611, !13, i64 3612, !7, i64 3616, !15, i64 14048, !14, i64 14052, !7, i64 14060, !7, i64 14104, !7, i64 14144, !7, i64 14149, !7, i64 14154, !7, i64 14164, !7, i64 14174, !7, i64 14179, !7, i64 14184, !7, i64 14192, !7, i64 14212, !7, i64 14232, !10, i64 14252, !15, i64 14256, !15, i64 14257, !7, i64 14258, !15, i64 14259, !16, i64 14260, !17, i64 14264}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!"_ZTS8ImVectorItE", !13, i64 0, !13, i64 4, !6, i64 8}
!18 = !{!12, !15, i64 14257}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!7, !7, i64 0}
!22 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!23 = !{!14, !10, i64 0}
!24 = !{!14, !10, i64 4}
!25 = !{!26, !27, i64 0}
!26 = !{!"_ZTS15ImGuiInputEvent", !27, i64 0, !28, i64 4, !7, i64 8, !15, i64 20}
!27 = !{!"_ZTS19ImGuiInputEventType", !7, i64 0}
!28 = !{!"_ZTS16ImGuiInputSource", !7, i64 0}
!29 = !{!26, !28, i64 4}


; 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.ImGuiInputEvent = type <{ i32, i32, %union.anon, i8, [3 x i8] }>
%union.anon = type { %struct.ImGuiInputEventKey }
%struct.ImGuiInputEventKey = type { i32, i8, float }

@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN7ImGuiIO16AddMousePosEventEff = external hidden unnamed_addr constant [45 x i8], align 1

; 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 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: mustprogress 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) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15ImGuiInputEventC2Ev(ptr noundef nonnull align 4 dereferenceable(21)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL20FindLatestInputEvent19ImGuiInputEventTypei(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7ImGuiIO16AddMousePosEventEff(ptr nocapture noundef nonnull readonly align 8 dereferenceable(14280) %0, float noundef %1, float noundef %2) local_unnamed_addr #4 align 2 {
  %4 = alloca %struct.ImVec2, align 8
  %5 = alloca %struct.ImVec2, align 8
  %6 = alloca %struct.ImGuiInputEvent, align 4
  %7 = getelementptr inbounds i8, ptr %0, i64 3576
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %.not = icmp eq ptr %8, null
  br i1 %.not, label %9, label %10

9:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 1454, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7ImGuiIO16AddMousePosEventEff) #6
  unreachable

10:                                               ; preds = %3
  %11 = getelementptr inbounds i8, ptr %0, i64 14257
  %12 = load i8, ptr %11, align 1, !tbaa !16, !range !17, !noundef !18
  %13 = trunc nuw i8 %12 to i1
  br i1 %13, label %14, label %52

14:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %15 = fcmp ogt float %1, 0xC7EFFFFFE0000000
  br i1 %15, label %16, label %18

16:                                               ; preds = %14
  %17 = tail call noundef float @_ZL13ImFloorSignedf(float noundef %1)
  br label %18

18:                                               ; preds = %14, %16
  %19 = phi float [ %17, %16 ], [ %1, %14 ]
  %20 = fcmp ogt float %2, 0xC7EFFFFFE0000000
  br i1 %20, label %21, label %23

21:                                               ; preds = %18
  %22 = tail call noundef float @_ZL13ImFloorSignedf(float noundef %2)
  br label %23

23:                                               ; preds = %18, %21
  %24 = phi float [ %22, %21 ], [ %2, %18 ]
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef %19, float noundef %24)
  %25 = call noundef ptr @_ZL20FindLatestInputEvent19ImGuiInputEventTypei(i32 noundef 1, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %.not16 = icmp eq ptr %25, null
  br i1 %.not16, label %31, label %26

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %25, i64 8
  %28 = load float, ptr %27, align 4, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %25, i64 12
  %30 = load float, ptr %29, align 4, !tbaa !19
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef %28, float noundef %30)
  %.pre = load float, ptr %5, align 8, !tbaa !20
  br label %36

31:                                               ; preds = %23
  %32 = getelementptr inbounds i8, ptr %8, i64 3592
  %33 = load i64, ptr %32, align 8
  store i64 %33, ptr %5, align 8
  %34 = trunc i64 %33 to i32
  %35 = bitcast i32 %34 to float
  br label %36

36:                                               ; preds = %31, %26
  %37 = phi float [ %35, %31 ], [ %.pre, %26 ]
  %38 = load float, ptr %4, align 8, !tbaa !20
  %39 = fcmp oeq float %37, %38
  br i1 %39, label %40, label %46

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %5, i64 4
  %42 = load float, ptr %41, align 4, !tbaa !21
  %43 = getelementptr inbounds i8, ptr %4, i64 4
  %44 = load float, ptr %43, align 4, !tbaa !21
  %45 = fcmp oeq float %42, %44
  br i1 %45, label %51, label %46

46:                                               ; preds = %40, %36
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @_ZN15ImGuiInputEventC2Ev(ptr noundef nonnull align 4 dereferenceable(21) %6)
  store i32 1, ptr %6, align 4, !tbaa !22
  %47 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 1, ptr %47, align 4, !tbaa !26
  %48 = getelementptr inbounds i8, ptr %6, i64 8
  %49 = load <2 x float>, ptr %4, align 8, !tbaa !27
  store <2 x float> %49, ptr %48, align 4, !tbaa !19
  %50 = getelementptr inbounds i8, ptr %8, i64 14288
  call void @_ZN8ImVectorI15ImGuiInputEventE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 4 dereferenceable(21) %6)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  br label %51

51:                                               ; preds = %40, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %52

52:                                               ; preds = %10, %51
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL13ImFloorSignedf(float noundef) local_unnamed_addr #5

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 = { 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 #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 = { 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 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !12, i64 3576}
!6 = !{!"_ZTS7ImGuiIO", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16, !11, i64 20, !12, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !12, i64 72, !12, i64 80, !11, i64 88, !13, i64 92, !12, i64 96, !10, i64 104, !13, i64 112, !13, i64 113, !13, i64 114, !13, i64 115, !13, i64 116, !13, i64 117, !13, i64 118, !13, i64 119, !11, i64 120, !13, i64 124, !13, i64 125, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !13, i64 208, !13, i64 209, !13, i64 210, !13, i64 211, !13, i64 212, !13, i64 213, !13, i64 214, !11, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !10, i64 240, !8, i64 248, !8, i64 2856, !8, i64 3508, !12, i64 3576, !10, i64 3584, !8, i64 3592, !11, i64 3600, !11, i64 3604, !13, i64 3608, !13, i64 3609, !13, i64 3610, !13, i64 3611, !7, i64 3612, !8, i64 3616, !13, i64 14048, !10, i64 14052, !8, i64 14060, !8, i64 14104, !8, i64 14144, !8, i64 14149, !8, i64 14154, !8, i64 14164, !8, i64 14174, !8, i64 14179, !8, i64 14184, !8, i64 14192, !8, i64 14212, !8, i64 14232, !11, i64 14252, !13, i64 14256, !13, i64 14257, !8, i64 14258, !13, i64 14259, !14, i64 14260, !15, i64 14264}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS6ImVec2", !11, i64 0, !11, i64 4}
!11 = !{!"float", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!"_ZTS8ImVectorItE", !7, i64 0, !7, i64 4, !12, i64 8}
!16 = !{!6, !13, i64 14257}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!8, !8, i64 0}
!20 = !{!10, !11, i64 0}
!21 = !{!10, !11, i64 4}
!22 = !{!23, !24, i64 0}
!23 = !{!"_ZTS15ImGuiInputEvent", !24, i64 0, !25, i64 4, !8, i64 8, !13, i64 20}
!24 = !{!"_ZTS19ImGuiInputEventType", !8, i64 0}
!25 = !{!"_ZTS16ImGuiInputSource", !8, i64 0}
!26 = !{!23, !25, i64 4}
!27 = !{!11, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass