; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2019-20/Jan/Plat/falling.ll (Z5queryii)

; 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"

%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<std::pair<int, int>, frac>, std::allocator<std::pair<std::pair<int, int>, frac>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<std::pair<int, int>, frac>, std::allocator<std::pair<std::pair<int, int>, frac>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<std::pair<int, int>, frac>, std::allocator<std::pair<std::pair<int, int>, frac>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<std::pair<int, int>, frac>, std::allocator<std::pair<std::pair<int, int>, frac>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.frac = type { i64, i64 }
%"struct.std::pair.3" = type { i32, i32 }
%"struct.std::pair.5" = type { %"struct.std::pair.3", %struct.frac }

@d = external dso_local global %"class.std::deque", align 8

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: 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: mustprogress uwtable
declare dso_local { i64, i64 } @_Z7lastBetSt4pairIiiES0_(i64, i64) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4fracC2Ex(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt5dequeISt4pairIS0_IiiE4fracESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZltRK4fracS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_Z5queryii(i32 noundef %0, i32 noundef %1) #2 {
  %3 = alloca %struct.frac, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.frac, align 8
  %10 = alloca %"struct.std::pair.3", align 4
  %11 = alloca %"struct.std::pair.3", align 4
  %12 = alloca %"struct.std::pair.3", align 4
  %13 = alloca %"struct.std::pair.3", align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) @d) #4
  %16 = getelementptr inbounds %"struct.std::pair.5", ptr %15, i32 0, i32 0
  %17 = getelementptr inbounds %"struct.std::pair.3", ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !9
  %19 = icmp sle i32 %14, %18
  br i1 %19, label %20, label %21

20:                                               ; preds = %2
  call void @_ZN4fracC2Ex(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef -1)
  br label %69

21:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %22 = call noundef i64 @_ZNKSt5dequeISt4pairIS0_IiiE4fracESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) @d) #4
  %23 = trunc i64 %22 to i32
  %24 = sub nsw i32 %23, 1
  store i32 %24, ptr %7, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %56, %21
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = load i32, ptr %7, align 4, !tbaa !5
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %29, label %57

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = add nsw i32 %30, %31
  %33 = sdiv i32 %32, 2
  store i32 %33, ptr %8, align 4, !tbaa !5
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) @d, i64 noundef %35) #4
  %37 = getelementptr inbounds %"struct.std::pair.5", ptr %36, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %38 = load i32, ptr %8, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) @d, i64 noundef %39) #4
  %41 = getelementptr inbounds %"struct.std::pair.5", ptr %40, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %41, i64 8, i1 false)
  %42 = load i64, ptr %10, align 4
  %43 = load i64, ptr %11, align 4
  %44 = call { i64, i64 } @_Z7lastBetSt4pairIiiES0_(i64 %42, i64 %43)
  %45 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %46 = extractvalue { i64, i64 } %44, 0
  store i64 %46, ptr %45, align 8
  %47 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %48 = extractvalue { i64, i64 } %44, 1
  store i64 %48, ptr %47, align 8
  %49 = call noundef zeroext i1 @_ZltRK4fracS1_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %50 = xor i1 %49, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  br i1 %50, label %51, label %53

51:                                               ; preds = %29
  %52 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %52, ptr %7, align 4, !tbaa !5
  br label %56

53:                                               ; preds = %29
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %6, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %53, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %25, !llvm.loop !14

57:                                               ; preds = %25
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) @d, i64 noundef %59) #4
  %61 = getelementptr inbounds %"struct.std::pair.5", ptr %60, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 8 %61, i64 8, i1 false)
  %62 = load i64, ptr %12, align 4
  %63 = load i64, ptr %13, align 4
  %64 = call { i64, i64 } @_Z7lastBetSt4pairIiiES0_(i64 %62, i64 %63)
  %65 = getelementptr inbounds { i64, i64 }, ptr %3, i32 0, i32 0
  %66 = extractvalue { i64, i64 } %64, 0
  store i64 %66, ptr %65, align 8
  %67 = getelementptr inbounds { i64, i64 }, ptr %3, i32 0, i32 1
  %68 = extractvalue { i64, i64 } %64, 1
  store i64 %68, ptr %67, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %69

69:                                               ; preds = %57, %20
  %70 = load { i64, i64 }, ptr %3, align 8
  ret { i64, i64 } %70
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) #3 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSSt4pairIS_IiiE4fracE", !11, i64 0, !12, i64 8}
!11 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!12 = !{!"_ZTS4frac", !13, i64 0, !13, i64 8}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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"

%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<std::pair<int, int>, frac>, std::allocator<std::pair<std::pair<int, int>, frac>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<std::pair<int, int>, frac>, std::allocator<std::pair<std::pair<int, int>, frac>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<std::pair<int, int>, frac>, std::allocator<std::pair<std::pair<int, int>, frac>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<std::pair<int, int>, frac>, std::allocator<std::pair<std::pair<int, int>, frac>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.frac = type { i64, i64 }
%"struct.std::pair.3" = type { i32, i32 }

@d = external dso_local global %"class.std::deque", align 8

; 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 uwtable
declare dso_local { i64, i64 } @_Z7lastBetSt4pairIiiES0_(i64, i64) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4fracC2Ex(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt5dequeISt4pairIS0_IiiE4fracESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZltRK4fracS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_Z5queryii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = alloca %struct.frac, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %struct.frac, align 8
  %7 = alloca %"struct.std::pair.3", align 8
  %8 = alloca %"struct.std::pair.3", align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  %9 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) @d) #3
  %10 = load i32, ptr %9, align 8, !tbaa !9
  %.not = icmp slt i32 %10, %0
  br i1 %.not, label %12, label %11

11:                                               ; preds = %2
  call void @_ZN4fracC2Ex(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef -1)
  %.fca.0.load.pre = load i64, ptr %3, align 8
  %.fca.1.gep.phi.trans.insert = getelementptr inbounds i8, ptr %3, i64 8
  %.fca.1.load.pre = load i64, ptr %.fca.1.gep.phi.trans.insert, align 8
  br label %38

12:                                               ; preds = %2
  %13 = tail call noundef i64 @_ZNKSt5dequeISt4pairIS0_IiiE4fracESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) @d) #3
  %14 = trunc i64 %13 to i32
  %15 = icmp sgt i32 %14, 1
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %12
  %16 = add nsw i32 %14, -1
  %17 = getelementptr inbounds i8, ptr %6, i64 8
  br label %18

18:                                               ; preds = %.lr.ph, %18
  %.013 = phi i32 [ 0, %.lr.ph ], [ %.1, %18 ]
  %.01012 = phi i32 [ %16, %.lr.ph ], [ %.111, %18 ]
  %19 = add nuw nsw i32 %.013, %.01012
  %20 = lshr i32 %19, 1
  %21 = zext nneg i32 %20 to i64
  %22 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) @d, i64 noundef %21) #3
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) @d, i64 noundef %21) #3
  %.sroa.01.0.copyload = load i64, ptr %24, align 8
  %25 = load i64, ptr %7, align 8
  %26 = call { i64, i64 } @_Z7lastBetSt4pairIiiES0_(i64 %25, i64 %.sroa.01.0.copyload)
  %27 = extractvalue { i64, i64 } %26, 0
  store i64 %27, ptr %6, align 8
  %28 = extractvalue { i64, i64 } %26, 1
  store i64 %28, ptr %17, align 8
  %29 = call noundef zeroext i1 @_ZltRK4fracS1_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  %30 = add nuw nsw i32 %20, 1
  %.111 = select i1 %29, i32 %.01012, i32 %20
  %.1 = select i1 %29, i32 %30, i32 %.013
  %31 = icmp slt i32 %.1, %.111
  br i1 %31, label %18, label %._crit_edge.loopexit, !llvm.loop !14

._crit_edge.loopexit:                             ; preds = %18
  %32 = zext nneg i32 %.1 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %12
  %.0.lcssa = phi i64 [ 0, %12 ], [ %32, %._crit_edge.loopexit ]
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) @d, i64 noundef %.0.lcssa) #3
  %.sroa.0.0.copyload = load i64, ptr %33, align 8
  %34 = load i64, ptr %8, align 8
  %35 = call { i64, i64 } @_Z7lastBetSt4pairIiiES0_(i64 %34, i64 %.sroa.0.0.copyload)
  %36 = extractvalue { i64, i64 } %35, 0
  %37 = extractvalue { i64, i64 } %35, 1
  br label %38

38:                                               ; preds = %._crit_edge, %11
  %.fca.1.load = phi i64 [ %37, %._crit_edge ], [ %.fca.1.load.pre, %11 ]
  %.fca.0.load = phi i64 [ %36, %._crit_edge ], [ %.fca.0.load.pre, %11 ]
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.fca.0.load, 0
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.fca.1.load, 1
  ret { i64, i64 } %.fca.1.insert
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5dequeISt4pairIS0_IiiE4fracESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) local_unnamed_addr #2 align 2

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

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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSSt4pairIS_IiiE4fracE", !11, i64 0, !12, i64 8}
!11 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!12 = !{!"_ZTS4frac", !13, i64 0, !13, i64 8}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass