; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x07-贪心/112. 雷达设备 (main)

; 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.std::pair" = type { double, double }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@c = external dso_local global [1010 x %"struct.std::pair"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) @d)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %54, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  store i32 2, ptr %3, align 4
  br label %57

17:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = load i32, ptr @d, align 4, !tbaa !5
  %22 = icmp sgt i32 %20, %21
  br i1 %22, label %23, label %26

23:                                               ; preds = %17
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %51

26:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %27 = load i32, ptr @d, align 4, !tbaa !5
  %28 = load i32, ptr @d, align 4, !tbaa !5
  %29 = mul nsw i32 %27, %28
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = mul nsw i32 %30, %31
  %33 = sub nsw i32 %29, %32
  %34 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %33)
  store double %34, ptr %6, align 8, !tbaa !9
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sitofp i32 %35 to double
  %37 = load double, ptr %6, align 8, !tbaa !9
  %38 = fsub double %36, %37
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1010 x %"struct.std::pair"], ptr @c, i64 0, i64 %40
  %42 = getelementptr inbounds %"struct.std::pair", ptr %41, i32 0, i32 1
  store double %38, ptr %42, align 8, !tbaa !11
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sitofp i32 %43 to double
  %45 = load double, ptr %6, align 8, !tbaa !9
  %46 = fadd double %44, %45
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [1010 x %"struct.std::pair"], ptr @c, i64 0, i64 %48
  %50 = getelementptr inbounds %"struct.std::pair", ptr %49, i32 0, i32 0
  store double %46, ptr %50, align 16, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  store i32 0, ptr %3, align 4
  br label %51

51:                                               ; preds = %26, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %52 = load i32, ptr %3, align 4
  switch i32 %52, label %57 [
    i32 0, label %53
  ]

53:                                               ; preds = %51
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !14

57:                                               ; preds = %51, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %58 = load i32, ptr %3, align 4
  switch i32 %58, label %95 [
    i32 2, label %59
    i32 1, label %93
  ]

59:                                               ; preds = %57
  %60 = load i32, ptr @n, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %"struct.std::pair", ptr @c, i64 %61
  call void @_ZSt4sortIPSt4pairIddEEvT_S3_(ptr noundef @c, ptr noundef %62)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store double 0xC1E0000000000000, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %86, %59
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %89

68:                                               ; preds = %63
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [1010 x %"struct.std::pair"], ptr @c, i64 0, i64 %70
  %72 = getelementptr inbounds %"struct.std::pair", ptr %71, i32 0, i32 1
  %73 = load double, ptr %72, align 8, !tbaa !11
  %74 = load double, ptr %7, align 8, !tbaa !9
  %75 = fcmp ole double %73, %74
  br i1 %75, label %76, label %77

76:                                               ; preds = %68
  br label %86

77:                                               ; preds = %68
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1010 x %"struct.std::pair"], ptr @c, i64 0, i64 %79
  %81 = getelementptr inbounds %"struct.std::pair", ptr %80, i32 0, i32 0
  %82 = load double, ptr %81, align 16, !tbaa !13
  store double %82, ptr %7, align 8, !tbaa !9
  %83 = load double, ptr %8, align 8, !tbaa !9
  %84 = fadd double %83, 1.000000e+00
  store double %84, ptr %8, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %77
  br label %86

86:                                               ; preds = %85, %76
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %9, align 4, !tbaa !5
  br label %63, !llvm.loop !16

89:                                               ; preds = %67
  %90 = load double, ptr %8, align 8, !tbaa !9
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %93

93:                                               ; preds = %89, %57
  %94 = load i32, ptr %1, align 4
  ret i32 %94

95:                                               ; preds = %57
  unreachable
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIddEEvT_S3_(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #3 align 2

attributes #0 = { mustprogress norecurse 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 #1 = { "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = { 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 = { 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, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTSSt4pairIddE", !10, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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.std::pair" = type { double, double }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@c = external dso_local global [1010 x %"struct.std::pair"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) @d)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = sext i32 %5 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %0, %11
  %indvars.iv = phi i64 [ %indvars.iv.next, %11 ], [ 0, %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
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = load i32, ptr @d, align 4, !tbaa !5
  %.not = icmp sgt i32 %9, %10
  br i1 %.not, label %23, label %11

11:                                               ; preds = %.lr.ph
  %add = add nsw i32 %10, %9
  %sub = sub nsw i32 %10, %9
  %12 = mul nsw i32 %add, %sub
  %13 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %12)
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sitofp i32 %14 to double
  %16 = fsub double %15, %13
  %17 = getelementptr inbounds [1010 x %"struct.std::pair"], ptr @c, i64 0, i64 %indvars.iv
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  store double %16, ptr %18, align 8, !tbaa !9
  %19 = fadd double %13, %15
  store double %19, ptr %17, align 16, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = icmp slt i64 %indvars.iv.next, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !13

23:                                               ; preds = %.lr.ph
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  br label %51

._crit_edge:                                      ; preds = %11, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %21, %11 ]
  %26 = getelementptr inbounds %"struct.std::pair", ptr @c, i64 %.pre-phi
  call void @_ZSt4sortIPSt4pairIddEEvT_S3_(ptr noundef nonnull @c, ptr noundef nonnull %26)
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph34.preheader, label %._crit_edge35

.lr.ph34.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %27 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %29 = icmp eq i32 %27, 1
  br i1 %29, label %._crit_edge35.loopexit.unr-lcssa, label %.lr.ph34.preheader.new

.lr.ph34.preheader.new:                           ; preds = %.lr.ph34.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph34

._crit_edge35.loopexit.unr-lcssa:                 ; preds = %50, %.lr.ph34.preheader
  %.1.lcssa.ph = phi double [ poison, %.lr.ph34.preheader ], [ %.1.1, %50 ]
  %indvars.iv37.unr = phi i64 [ 0, %.lr.ph34.preheader ], [ %indvars.iv.next38.1, %50 ]
  %.01531.unr = phi double [ 0.000000e+00, %.lr.ph34.preheader ], [ %.1.1, %50 ]
  %.01630.unr = phi double [ 0xC1E0000000000000, %.lr.ph34.preheader ], [ %.117.1, %50 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge35, label %.lr.ph34.epil

.lr.ph34.epil:                                    ; preds = %._crit_edge35.loopexit.unr-lcssa
  %30 = getelementptr inbounds [1010 x %"struct.std::pair"], ptr @c, i64 0, i64 %indvars.iv37.unr, i32 1
  %31 = load double, ptr %30, align 8, !tbaa !9
  %32 = fcmp ugt double %31, %.01630.unr
  %33 = fadd double %.01531.unr, 1.000000e+00
  %.1.epil = select i1 %32, double %33, double %.01531.unr
  br label %._crit_edge35

._crit_edge35:                                    ; preds = %.lr.ph34.epil, %._crit_edge35.loopexit.unr-lcssa, %._crit_edge
  %.015.lcssa = phi double [ 0.000000e+00, %._crit_edge ], [ %.1.lcssa.ph, %._crit_edge35.loopexit.unr-lcssa ], [ %.1.epil, %.lr.ph34.epil ]
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %.015.lcssa)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %51

.lr.ph34:                                         ; preds = %50, %.lr.ph34.preheader.new
  %indvars.iv37 = phi i64 [ 0, %.lr.ph34.preheader.new ], [ %indvars.iv.next38.1, %50 ]
  %.01531 = phi double [ 0.000000e+00, %.lr.ph34.preheader.new ], [ %.1.1, %50 ]
  %.01630 = phi double [ 0xC1E0000000000000, %.lr.ph34.preheader.new ], [ %.117.1, %50 ]
  %niter = phi i64 [ 0, %.lr.ph34.preheader.new ], [ %niter.next.1, %50 ]
  %36 = getelementptr inbounds [1010 x %"struct.std::pair"], ptr @c, i64 0, i64 %indvars.iv37
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load double, ptr %37, align 8, !tbaa !9
  %39 = fcmp ugt double %38, %.01630
  br i1 %39, label %40, label %.lr.ph34.1

40:                                               ; preds = %.lr.ph34
  %41 = load double, ptr %36, align 16, !tbaa !12
  %42 = fadd double %.01531, 1.000000e+00
  br label %.lr.ph34.1

.lr.ph34.1:                                       ; preds = %.lr.ph34, %40
  %.117 = phi double [ %.01630, %.lr.ph34 ], [ %41, %40 ]
  %.1 = phi double [ %.01531, %.lr.ph34 ], [ %42, %40 ]
  %indvars.iv.next38 = or disjoint i64 %indvars.iv37, 1
  %43 = getelementptr inbounds [1010 x %"struct.std::pair"], ptr @c, i64 0, i64 %indvars.iv.next38
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load double, ptr %44, align 8, !tbaa !9
  %46 = fcmp ugt double %45, %.117
  br i1 %46, label %47, label %50

47:                                               ; preds = %.lr.ph34.1
  %48 = load double, ptr %43, align 16, !tbaa !12
  %49 = fadd double %.1, 1.000000e+00
  br label %50

50:                                               ; preds = %47, %.lr.ph34.1
  %.117.1 = phi double [ %.117, %.lr.ph34.1 ], [ %48, %47 ]
  %.1.1 = phi double [ %.1, %.lr.ph34.1 ], [ %49, %47 ]
  %indvars.iv.next38.1 = add nuw nsw i64 %indvars.iv37, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge35.loopexit.unr-lcssa, label %.lr.ph34, !llvm.loop !15

51:                                               ; preds = %23, %._crit_edge35
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIddEEvT_S3_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress norecurse 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 #1 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = { 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 = { 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, !11, i64 8}
!10 = !{!"_ZTSSt4pairIddE", !11, i64 0, !11, i64 8}
!11 = !{!"double", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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