; LLVM IR from khushmmehta/Scorch-V :: src/vendor/imgui/backends/imgui_impl_glfw.ll (Z23ImGui_ImplGlfw_NewFramev)

; 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.ImGui_ImplGlfw_Data = type { ptr, i32, double, ptr, [9 x ptr], %struct.ImVec2, [348 x ptr], i8, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, i8, i8, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i16, i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, %struct.ImVec2, [666 x i32], [666 x i8], [16 x float], ptr, ptr, %struct.ImVec2, [5 x i8], float, float, i32, i32, i8, i8, i8, i8, i32, [666 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], i8, [5 x float], [5 x float], [5 x %struct.ImVec2], [5 x float], float, i8, i8, i8, i8, i16, %struct.ImVector }
%struct.ImGuiKeyData = type { i8, float, float, float }
%struct.ImVector = type { i32, i32, ptr }

@.str.2 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@__PRETTY_FUNCTION__._Z23ImGui_ImplGlfw_NewFramev = external hidden unnamed_addr constant [31 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 uwtable
declare hidden noundef ptr @_ZL29ImGui_ImplGlfw_GetBackendDatav() #1

declare noundef nonnull align 8 dereferenceable(14624) ptr @_ZN5ImGui5GetIOEv() #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23ImGui_ImplGlfw_NewFramev() #1 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %struct.ImVec2, align 4
  %9 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  %10 = call noundef nonnull align 8 dereferenceable(14624) ptr @_ZN5ImGui5GetIOEv()
  store ptr %10, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %11 = call noundef ptr @_ZL29ImGui_ImplGlfw_GetBackendDatav()
  store ptr %11, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %0
  br label %15

15:                                               ; preds = %14, %0
  %16 = phi i1 [ false, %0 ], [ true, %14 ]
  br i1 %16, label %17, label %18

17:                                               ; preds = %15
  br label %20

18:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.2, i32 noundef 898, ptr noundef @__PRETTY_FUNCTION__._Z23ImGui_ImplGlfw_NewFramev) #7
  unreachable

19:                                               ; No predecessors!
  br label %20

20:                                               ; preds = %19, %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.ImGui_ImplGlfw_Data, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  call void @glfwGetWindowSize(ptr noundef %23, ptr noundef %3, ptr noundef %4)
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ImGui_ImplGlfw_Data, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  call void @glfwGetFramebufferSize(ptr noundef %26, ptr noundef %5, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %27 = load i32, ptr %3, align 4, !tbaa !16
  %28 = sitofp i32 %27 to float
  %29 = load i32, ptr %4, align 4, !tbaa !16
  %30 = sitofp i32 %29 to float
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %28, float noundef %30)
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ImGuiIO, ptr %31, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %33 = load i32, ptr %3, align 4, !tbaa !16
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %35, label %51

35:                                               ; preds = %20
  %36 = load i32, ptr %4, align 4, !tbaa !16
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %38, label %51

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %39 = load i32, ptr %5, align 4, !tbaa !16
  %40 = sitofp i32 %39 to float
  %41 = load i32, ptr %3, align 4, !tbaa !16
  %42 = sitofp i32 %41 to float
  %43 = fdiv float %40, %42
  %44 = load i32, ptr %6, align 4, !tbaa !16
  %45 = sitofp i32 %44 to float
  %46 = load i32, ptr %4, align 4, !tbaa !16
  %47 = sitofp i32 %46 to float
  %48 = fdiv float %45, %47
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %43, float noundef %48)
  %49 = load ptr, ptr %1, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ImGuiIO, ptr %49, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %50, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %51

51:                                               ; preds = %38, %35, %20
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ImGui_ImplGlfw_Data, ptr %52, i32 0, i32 9
  %54 = load i8, ptr %53, align 2, !tbaa !20, !range !21, !noundef !22
  %55 = trunc i8 %54 to i1
  br i1 %55, label %56, label %57

56:                                               ; preds = %51
  call void @_ZL29ImGui_ImplGlfw_UpdateMonitorsv()
  br label %57

57:                                               ; preds = %56, %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %58 = call double @glfwGetTime()
  store double %58, ptr %9, align 8, !tbaa !23
  %59 = load double, ptr %9, align 8, !tbaa !23
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ImGui_ImplGlfw_Data, ptr %60, i32 0, i32 2
  %62 = load double, ptr %61, align 8, !tbaa !24
  %63 = fcmp ole double %59, %62
  br i1 %63, label %64, label %69

64:                                               ; preds = %57
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ImGui_ImplGlfw_Data, ptr %65, i32 0, i32 2
  %67 = load double, ptr %66, align 8, !tbaa !24
  %68 = fadd double %67, 0x3EE4F8B580000000
  store double %68, ptr %9, align 8, !tbaa !23
  br label %69

69:                                               ; preds = %64, %57
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ImGui_ImplGlfw_Data, ptr %70, i32 0, i32 2
  %72 = load double, ptr %71, align 8, !tbaa !24
  %73 = fcmp ogt double %72, 0.000000e+00
  br i1 %73, label %74, label %81

74:                                               ; preds = %69
  %75 = load double, ptr %9, align 8, !tbaa !23
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ImGui_ImplGlfw_Data, ptr %76, i32 0, i32 2
  %78 = load double, ptr %77, align 8, !tbaa !24
  %79 = fsub double %75, %78
  %80 = fptrunc double %79 to float
  br label %82

81:                                               ; preds = %69
  br label %82

82:                                               ; preds = %81, %74
  %83 = phi float [ %80, %74 ], [ 0x3F91111120000000, %81 ]
  %84 = load ptr, ptr %1, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ImGuiIO, ptr %84, i32 0, i32 3
  store float %83, ptr %85, align 8, !tbaa !25
  %86 = load double, ptr %9, align 8, !tbaa !23
  %87 = load ptr, ptr %2, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ImGui_ImplGlfw_Data, ptr %87, i32 0, i32 2
  store double %86, ptr %88, align 8, !tbaa !24
  call void @_ZL30ImGui_ImplGlfw_UpdateMouseDatav()
  call void @_ZL32ImGui_ImplGlfw_UpdateMouseCursorv()
  call void @_ZL29ImGui_ImplGlfw_UpdateGamepadsv()
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret void
}

declare void @glfwGetWindowSize(ptr noundef, ptr noundef, ptr noundef) #2

declare void @glfwGetFramebufferSize(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL29ImGui_ImplGlfw_UpdateMonitorsv() #1

declare double @glfwGetTime() #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL30ImGui_ImplGlfw_UpdateMouseDatav() #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL32ImGui_ImplGlfw_UpdateMouseCursorv() #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL29ImGui_ImplGlfw_UpdateGamepadsv() #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS19ImGui_ImplGlfw_Data", !6, i64 0, !11, i64 8, !12, i64 16, !6, i64 24, !7, i64 32, !13, i64 104, !7, i64 112, !15, i64 2896, !15, i64 2897, !15, i64 2898, !6, i64 2904, !6, i64 2912, !6, i64 2920, !6, i64 2928, !6, i64 2936, !6, i64 2944, !6, i64 2952, !6, i64 2960}
!11 = !{!"_ZTS13GlfwClientApi", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{i64 0, i64 4, !19, i64 4, i64 4, !19}
!19 = !{!14, !14, i64 0}
!20 = !{!10, !15, i64 2898}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!12, !12, i64 0}
!24 = !{!10, !12, i64 16}
!25 = !{!26, !14, i64 16}
!26 = !{!"_ZTS7ImGuiIO", !17, i64 0, !17, i64 4, !13, i64 8, !14, i64 16, !14, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !14, i64 56, !15, i64 60, !6, i64 64, !13, i64 72, !15, i64 80, !15, i64 81, !15, i64 82, !15, i64 83, !15, i64 84, !15, i64 85, !15, i64 86, !15, i64 87, !15, i64 88, !15, i64 89, !15, i64 90, !15, i64 91, !15, i64 92, !15, i64 93, !15, i64 94, !15, i64 95, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !15, i64 120, !15, i64 121, !15, i64 122, !15, i64 123, !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, !27, i64 200, !15, i64 202, !15, i64 203, !15, i64 204, !15, i64 205, !15, i64 206, !15, i64 207, !15, i64 208, !14, i64 212, !17, i64 216, !17, i64 220, !17, i64 224, !17, i64 228, !13, i64 232, !7, i64 240, !7, i64 2904, !7, i64 3572, !6, i64 3640, !6, i64 3648, !13, i64 3656, !7, i64 3664, !14, i64 3672, !14, i64 3676, !28, i64 3680, !17, i64 3684, !15, i64 3688, !15, i64 3689, !15, i64 3690, !15, i64 3691, !17, i64 3692, !7, i64 3696, !15, i64 14352, !13, i64 14356, !7, i64 14364, !7, i64 14408, !7, i64 14448, !7, i64 14453, !7, i64 14458, !7, i64 14468, !7, i64 14478, !7, i64 14483, !7, i64 14488, !15, i64 14493, !7, i64 14496, !7, i64 14516, !7, i64 14536, !7, i64 14576, !14, i64 14596, !15, i64 14600, !15, i64 14601, !7, i64 14602, !15, i64 14603, !27, i64 14604, !29, i64 14608}
!27 = !{!"short", !7, i64 0}
!28 = !{!"_ZTS16ImGuiMouseSource", !7, i64 0}
!29 = !{!"_ZTS8ImVectorItE", !17, i64 0, !17, i64 4, !6, i64 8}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ImVec2 = type { float, float }

@.str.2 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@__PRETTY_FUNCTION__._Z23ImGui_ImplGlfw_NewFramev = external hidden unnamed_addr constant [31 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 uwtable
declare hidden noundef ptr @_ZL29ImGui_ImplGlfw_GetBackendDatav() local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23ImGui_ImplGlfw_NewFramev() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.ImVec2, align 8
  %6 = alloca %struct.ImVec2, align 8
  %7 = tail call noundef nonnull align 8 dereferenceable(14624) ptr @_ZN5ImGui5GetIOEv()
  %8 = tail call noundef ptr @_ZL29ImGui_ImplGlfw_GetBackendDatav()
  %.not = icmp eq ptr %8, null
  br i1 %.not, label %9, label %10

9:                                                ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.2, i32 noundef 898, ptr noundef nonnull @__PRETTY_FUNCTION__._Z23ImGui_ImplGlfw_NewFramev) #5
  unreachable

10:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %11 = load ptr, ptr %8, align 8, !tbaa !5
  call void @glfwGetWindowSize(ptr noundef %11, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %12 = load ptr, ptr %8, align 8, !tbaa !5
  call void @glfwGetFramebufferSize(ptr noundef %12, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %13 = load i32, ptr %1, align 4, !tbaa !15
  %14 = sitofp i32 %13 to float
  %15 = load i32, ptr %2, align 4, !tbaa !15
  %16 = sitofp i32 %15 to float
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef %14, float noundef %16)
  %17 = getelementptr inbounds i8, ptr %7, i64 8
  %18 = load i64, ptr %5, align 8
  store i64 %18, ptr %17, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %19 = load i32, ptr %1, align 4, !tbaa !15
  %20 = icmp sgt i32 %19, 0
  %21 = load i32, ptr %2, align 4
  %22 = icmp sgt i32 %21, 0
  %or.cond = select i1 %20, i1 %22, i1 false
  br i1 %or.cond, label %23, label %34

23:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %24 = load i32, ptr %3, align 4, !tbaa !15
  %25 = sitofp i32 %24 to float
  %26 = uitofp nneg i32 %19 to float
  %27 = fdiv float %25, %26
  %28 = load i32, ptr %4, align 4, !tbaa !15
  %29 = sitofp i32 %28 to float
  %30 = uitofp nneg i32 %21 to float
  %31 = fdiv float %29, %30
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef %27, float noundef %31)
  %32 = getelementptr inbounds i8, ptr %7, i64 72
  %33 = load i64, ptr %6, align 8
  store i64 %33, ptr %32, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %34

34:                                               ; preds = %23, %10
  %35 = getelementptr inbounds i8, ptr %8, i64 2898
  %36 = load i8, ptr %35, align 2, !tbaa !17, !range !18, !noundef !19
  %37 = trunc nuw i8 %36 to i1
  br i1 %37, label %38, label %39

38:                                               ; preds = %34
  call void @_ZL29ImGui_ImplGlfw_UpdateMonitorsv()
  br label %39

39:                                               ; preds = %38, %34
  %40 = call double @glfwGetTime()
  %41 = getelementptr inbounds i8, ptr %8, i64 16
  %42 = load double, ptr %41, align 8, !tbaa !20
  %43 = fcmp ugt double %40, %42
  %44 = fadd double %42, 0x3EE4F8B580000000
  %.0 = select i1 %43, double %40, double %44
  %45 = fcmp ogt double %42, 0.000000e+00
  %46 = fsub double %.0, %42
  %47 = fptrunc double %46 to float
  %48 = select i1 %45, float %47, float 0x3F91111120000000
  %49 = getelementptr inbounds i8, ptr %7, i64 16
  store float %48, ptr %49, align 8, !tbaa !21
  store double %.0, ptr %41, align 8, !tbaa !20
  call void @_ZL30ImGui_ImplGlfw_UpdateMouseDatav()
  call void @_ZL32ImGui_ImplGlfw_UpdateMouseCursorv()
  call void @_ZL29ImGui_ImplGlfw_UpdateGamepadsv()
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void
}

declare void @glfwGetWindowSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @glfwGetFramebufferSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL29ImGui_ImplGlfw_UpdateMonitorsv() local_unnamed_addr #1

declare double @glfwGetTime() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL30ImGui_ImplGlfw_UpdateMouseDatav() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL32ImGui_ImplGlfw_UpdateMouseCursorv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL29ImGui_ImplGlfw_UpdateGamepadsv() local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS19ImGui_ImplGlfw_Data", !7, i64 0, !10, i64 8, !11, i64 16, !7, i64 24, !8, i64 32, !12, i64 104, !8, i64 112, !14, i64 2896, !14, i64 2897, !14, i64 2898, !7, i64 2904, !7, i64 2912, !7, i64 2920, !7, i64 2928, !7, i64 2936, !7, i64 2944, !7, i64 2952, !7, i64 2960}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS13GlfwClientApi", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = !{!6, !14, i64 2898}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!6, !11, i64 16}
!21 = !{!22, !13, i64 16}
!22 = !{!"_ZTS7ImGuiIO", !16, i64 0, !16, i64 4, !12, i64 8, !13, i64 16, !13, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !13, i64 56, !14, i64 60, !7, i64 64, !12, i64 72, !14, i64 80, !14, i64 81, !14, i64 82, !14, i64 83, !14, i64 84, !14, i64 85, !14, i64 86, !14, i64 87, !14, i64 88, !14, i64 89, !14, i64 90, !14, i64 91, !14, i64 92, !14, i64 93, !14, i64 94, !14, i64 95, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 116, !14, i64 120, !14, i64 121, !14, i64 122, !14, i64 123, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !23, i64 200, !14, i64 202, !14, i64 203, !14, i64 204, !14, i64 205, !14, i64 206, !14, i64 207, !14, i64 208, !13, i64 212, !16, i64 216, !16, i64 220, !16, i64 224, !16, i64 228, !12, i64 232, !8, i64 240, !8, i64 2904, !8, i64 3572, !7, i64 3640, !7, i64 3648, !12, i64 3656, !8, i64 3664, !13, i64 3672, !13, i64 3676, !24, i64 3680, !16, i64 3684, !14, i64 3688, !14, i64 3689, !14, i64 3690, !14, i64 3691, !16, i64 3692, !8, i64 3696, !14, i64 14352, !12, i64 14356, !8, i64 14364, !8, i64 14408, !8, i64 14448, !8, i64 14453, !8, i64 14458, !8, i64 14468, !8, i64 14478, !8, i64 14483, !8, i64 14488, !14, i64 14493, !8, i64 14496, !8, i64 14516, !8, i64 14536, !8, i64 14576, !13, i64 14596, !14, i64 14600, !14, i64 14601, !8, i64 14602, !14, i64 14603, !23, i64 14604, !25, i64 14608}
!23 = !{!"short", !8, i64 0}
!24 = !{!"_ZTS16ImGuiMouseSource", !8, i64 0}
!25 = !{!"_ZTS8ImVectorItE", !16, i64 0, !16, i64 4, !7, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass