; LLVM IR from DionysiosB/CodeForces :: 0001-0099 (48C-TheRace)

; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::set", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i64, align 8
  %15 = alloca double, align 8
  %16 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store i64 1000007, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %41, %0
  %19 = load i64, ptr %6, align 8, !tbaa !5
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = icmp slt i64 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %48

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %24 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %7)
          to label %25 unwind label %44

25:                                               ; preds = %23
  %26 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %27 unwind label %44

27:                                               ; preds = %25
  %28 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %29 = extractvalue { ptr, i8 } %26, 0
  store ptr %29, ptr %28, align 8
  %30 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %31 = extractvalue { ptr, i8 } %26, 1
  store i8 %31, ptr %30, align 8
  %32 = load i64, ptr %5, align 8, !tbaa !5
  %33 = load i64, ptr %7, align 8, !tbaa !5
  %34 = icmp sgt i64 %32, %33
  br i1 %34, label %35, label %37

35:                                               ; preds = %27
  %36 = load i64, ptr %5, align 8, !tbaa !5
  br label %39

37:                                               ; preds = %27
  %38 = load i64, ptr %7, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %37, %35
  %40 = phi i64 [ %36, %35 ], [ %38, %37 ]
  store i64 %40, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %41

41:                                               ; preds = %39
  %42 = load i64, ptr %6, align 8, !tbaa !5
  %43 = add nsw i64 %42, 1
  store i64 %43, ptr %6, align 8, !tbaa !5
  br label %18, !llvm.loop !9

44:                                               ; preds = %25, %23
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %8, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %128

48:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store double 1.000000e+00, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store double 0x412E848E00000000, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store double 0.000000e+00, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 1, ptr %14, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %91, %48
  %50 = load i64, ptr %14, align 8, !tbaa !5
  %51 = load i64, ptr %5, align 8, !tbaa !5
  %52 = icmp sle i64 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %94

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %55 = load i64, ptr %14, align 8, !tbaa !5
  %56 = sitofp i64 %55 to double
  %57 = fadd double %56, 1.000000e+00
  %58 = load double, ptr %13, align 8, !tbaa !11
  %59 = fadd double %58, 1.000000e+00
  %60 = fdiv double %57, %59
  store double %60, ptr %15, align 8, !tbaa !11
  %61 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %62 unwind label %76

62:                                               ; preds = %54
  %63 = icmp ne i64 %61, 0
  br i1 %63, label %64, label %80

64:                                               ; preds = %62
  %65 = load double, ptr %12, align 8, !tbaa !11
  %66 = load double, ptr %15, align 8, !tbaa !11
  %67 = fcmp olt double %65, %66
  br i1 %67, label %68, label %70

68:                                               ; preds = %64
  %69 = load double, ptr %12, align 8, !tbaa !11
  br label %72

70:                                               ; preds = %64
  %71 = load double, ptr %15, align 8, !tbaa !11
  br label %72

72:                                               ; preds = %70, %68
  %73 = phi double [ %69, %68 ], [ %71, %70 ]
  store double %73, ptr %12, align 8, !tbaa !11
  %74 = load double, ptr %13, align 8, !tbaa !11
  %75 = fadd double %74, 1.000000e+00
  store double %75, ptr %13, align 8, !tbaa !11
  br label %90

76:                                               ; preds = %54
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %8, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %127

80:                                               ; preds = %62
  %81 = load double, ptr %11, align 8, !tbaa !11
  %82 = load double, ptr %15, align 8, !tbaa !11
  %83 = fcmp ogt double %81, %82
  br i1 %83, label %84, label %86

84:                                               ; preds = %80
  %85 = load double, ptr %11, align 8, !tbaa !11
  br label %88

86:                                               ; preds = %80
  %87 = load double, ptr %15, align 8, !tbaa !11
  br label %88

88:                                               ; preds = %86, %84
  %89 = phi double [ %85, %84 ], [ %87, %86 ]
  store double %89, ptr %11, align 8, !tbaa !11
  br label %90

90:                                               ; preds = %88, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %91

91:                                               ; preds = %90
  %92 = load i64, ptr %14, align 8, !tbaa !5
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %14, align 8, !tbaa !5
  br label %49, !llvm.loop !13

94:                                               ; preds = %53
  %95 = load i64, ptr %3, align 8, !tbaa !5
  %96 = add nsw i64 1, %95
  %97 = sitofp i64 %96 to double
  %98 = load double, ptr %12, align 8, !tbaa !11
  %99 = load double, ptr %11, align 8, !tbaa !11
  %100 = fsub double %98, %99
  %101 = fmul double %97, %100
  %102 = fcmp oge double %101, 1.000000e+00
  br i1 %102, label %103, label %110

103:                                              ; preds = %94
  %104 = invoke i32 @puts(ptr noundef @.str.1)
          to label %105 unwind label %106

105:                                              ; preds = %103
  br label %125

106:                                              ; preds = %110, %103
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %8, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %9, align 4
  br label %127

110:                                              ; preds = %94
  %111 = invoke i32 @puts(ptr noundef @.str.2)
          to label %112 unwind label %106

112:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %113 = load double, ptr %13, align 8, !tbaa !11
  %114 = fadd double 1.000000e+00, %113
  %115 = load double, ptr %11, align 8, !tbaa !11
  %116 = fmul double %114, %115
  %117 = fptosi double %116 to i64
  store i64 %117, ptr %16, align 8, !tbaa !5
  %118 = load i64, ptr %16, align 8, !tbaa !5
  %119 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %118)
          to label %120 unwind label %121

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

121:                                              ; preds = %112
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %8, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %127

125:                                              ; preds = %120, %105
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %126 = load i32, ptr %1, align 4
  ret i32 %126

127:                                              ; preds = %121, %106, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %128

128:                                              ; preds = %127, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr %8, align 8
  %131 = load i32, ptr %9, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

declare i32 @puts(ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !10}


; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::set", align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #6
  call void @_ZNSt3setIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = icmp sgt i64 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  br label %._crit_edge46

._crit_edge:                                      ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 1, ptr %4, align 8, !tbaa !5
  %.not39 = icmp slt i64 %12, 1
  br i1 %.not39, label %._crit_edge46, label %.lr.ph45

.lr.ph:                                           ; preds = %0, %10
  %.038 = phi i64 [ %12, %10 ], [ 0, %0 ]
  %.02737 = phi i64 [ %13, %10 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %9 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %10 unwind label %16

10:                                               ; preds = %.lr.ph
  %11 = load i64, ptr %3, align 8
  %12 = call i64 @llvm.smax.i64(i64 %.038, i64 %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %13 = add nuw nsw i64 %.02737, 1
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %15 = icmp slt i64 %13, %14
  br i1 %15, label %.lr.ph, label %._crit_edge, !llvm.loop !9

16:                                               ; preds = %.lr.ph
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %50

._crit_edge46.loopexit:                           ; preds = %39
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  %18 = fadd double %.1, 1.000000e+00
  br label %._crit_edge46

._crit_edge46:                                    ; preds = %._crit_edge.thread, %._crit_edge46.loopexit, %._crit_edge
  %19 = phi i64 [ %14, %._crit_edge ], [ %.pre, %._crit_edge46.loopexit ], [ %6, %._crit_edge.thread ]
  %.025.lcssa = phi double [ 1.000000e+00, %._crit_edge ], [ %.126, %._crit_edge46.loopexit ], [ 1.000000e+00, %._crit_edge.thread ]
  %.023.lcssa = phi double [ 0x412E848E00000000, %._crit_edge ], [ %.124, %._crit_edge46.loopexit ], [ 0x412E848E00000000, %._crit_edge.thread ]
  %.022.lcssa = phi double [ 1.000000e+00, %._crit_edge ], [ %18, %._crit_edge46.loopexit ], [ 1.000000e+00, %._crit_edge.thread ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %20 = add nsw i64 %19, 1
  %21 = sitofp i64 %20 to double
  %22 = fsub double %.023.lcssa, %.025.lcssa
  %23 = fmul double %22, %21
  %24 = fcmp ult double %23, 1.000000e+00
  br i1 %24, label %44, label %42

.lr.ph45:                                         ; preds = %._crit_edge, %39
  %.02243 = phi double [ %.1, %39 ], [ 0.000000e+00, %._crit_edge ]
  %.02342 = phi double [ %.124, %39 ], [ 0x412E848E00000000, %._crit_edge ]
  %.02541 = phi double [ %.126, %39 ], [ 1.000000e+00, %._crit_edge ]
  %storemerge40 = phi i64 [ %41, %39 ], [ 1, %._crit_edge ]
  %25 = sitofp i64 %storemerge40 to double
  %26 = fadd double %25, 1.000000e+00
  %27 = fadd double %.02243, 1.000000e+00
  %28 = fdiv double %26, %27
  %29 = invoke noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %30 unwind label %34

30:                                               ; preds = %.lr.ph45
  %.not31 = icmp eq i64 %29, 0
  br i1 %.not31, label %36, label %31

31:                                               ; preds = %30
  %32 = fcmp olt double %.02342, %28
  %33 = select i1 %32, double %.02342, double %28
  br label %39

34:                                               ; preds = %.lr.ph45
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %50

36:                                               ; preds = %30
  %37 = fcmp ogt double %.02541, %28
  %38 = select i1 %37, double %.02541, double %28
  br label %39

39:                                               ; preds = %36, %31
  %.126 = phi double [ %.02541, %31 ], [ %38, %36 ]
  %.124 = phi double [ %33, %31 ], [ %.02342, %36 ]
  %.1 = phi double [ %27, %31 ], [ %.02243, %36 ]
  %40 = load i64, ptr %4, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %4, align 8, !tbaa !5
  %.not.not = icmp slt i64 %40, %12
  br i1 %.not.not, label %.lr.ph45, label %._crit_edge46.loopexit, !llvm.loop !11

42:                                               ; preds = %._crit_edge46
  %43 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %49

44:                                               ; preds = %._crit_edge46
  %45 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  %46 = fmul double %.025.lcssa, %.022.lcssa
  %47 = fptosi double %46 to i64
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %47)
  br label %49

49:                                               ; preds = %44, %42
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

50:                                               ; preds = %34, %16
  %.pn = phi { ptr, i32 } [ %17, %16 ], [ %35, %34 ]
  call void @_ZNSt3setIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setIlSt4lessIlESaIlEE5countERKl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree 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 = { 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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass