; LLVM IR from DionysiosB/CodeForces :: 1909B-MakeAlmostEqualWithMod (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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long 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 [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 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::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::set", align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %17

17:                                               ; preds = %103, %0
  %18 = load i64, ptr %2, align 8, !tbaa !5
  %19 = add nsw i64 %18, -1
  store i64 %19, ptr %2, align 8, !tbaa !5
  %20 = icmp ne i64 %18, 0
  br i1 %20, label %21, label %111

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %23 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %23, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %30

24:                                               ; preds = %21
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %39, %24
  %26 = load i64, ptr %8, align 8, !tbaa !5
  %27 = load i64, ptr %3, align 8, !tbaa !5
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %34, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %46

30:                                               ; preds = %21
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %6, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %110

34:                                               ; preds = %25
  %35 = load i64, ptr %8, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %35) #5
  %37 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36)
          to label %38 unwind label %42

38:                                               ; preds = %34
  br label %39

39:                                               ; preds = %38
  %40 = load i64, ptr %8, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %8, align 8, !tbaa !5
  br label %25, !llvm.loop !9

42:                                               ; preds = %34
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %6, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %109

46:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 2, ptr %10, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %96, %46
  %48 = load i64, ptr %9, align 8, !tbaa !5
  %49 = icmp ne i64 %48, 0
  br i1 %49, label %54, label %50

50:                                               ; preds = %47
  %51 = load i64, ptr %10, align 8, !tbaa !5
  %52 = sitofp i64 %51 to double
  %53 = fcmp olt double %52, 3.000000e+18
  br label %54

54:                                               ; preds = %50, %47
  %55 = phi i1 [ false, %47 ], [ %53, %50 ]
  br i1 %55, label %57, label %56

56:                                               ; preds = %54
  store i32 7, ptr %11, align 4
  br label %99

57:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #5
  call void @_ZNSt3setIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %80, %57
  %59 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  %60 = icmp ult i64 %59, 3
  br i1 %60, label %61, label %65

61:                                               ; preds = %58
  %62 = load i64, ptr %13, align 8, !tbaa !5
  %63 = load i64, ptr %3, align 8, !tbaa !5
  %64 = icmp slt i64 %62, %63
  br label %65

65:                                               ; preds = %61, %58
  %66 = phi i1 [ false, %58 ], [ %64, %61 ]
  br i1 %66, label %68, label %67

67:                                               ; preds = %65
  store i32 10, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %87

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %69 = load i64, ptr %13, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %69) #5
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = load i64, ptr %10, align 8, !tbaa !5
  %73 = srem i64 %71, %72
  store i64 %73, ptr %14, align 8, !tbaa !5
  %74 = invoke { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %75 unwind label %83

75:                                               ; preds = %68
  %76 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %77 = extractvalue { ptr, i8 } %74, 0
  store ptr %77, ptr %76, align 8
  %78 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %79 = extractvalue { ptr, i8 } %74, 1
  store i8 %79, ptr %78, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %80

80:                                               ; preds = %75
  %81 = load i64, ptr %13, align 8, !tbaa !5
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %13, align 8, !tbaa !5
  br label %58, !llvm.loop !11

83:                                               ; preds = %68
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %6, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %108

87:                                               ; preds = %67
  %88 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  %89 = icmp eq i64 %88, 2
  br i1 %89, label %90, label %92

90:                                               ; preds = %87
  %91 = load i64, ptr %10, align 8, !tbaa !5
  store i64 %91, ptr %9, align 8, !tbaa !5
  store i32 7, ptr %11, align 4
  br label %93

92:                                               ; preds = %87
  store i32 0, ptr %11, align 4
  br label %93

93:                                               ; preds = %92, %90
  call void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #5
  %94 = load i32, ptr %11, align 4
  switch i32 %94, label %99 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95
  %97 = load i64, ptr %10, align 8, !tbaa !5
  %98 = mul nsw i64 %97, 2
  store i64 %98, ptr %10, align 8, !tbaa !5
  br label %47, !llvm.loop !12

99:                                               ; preds = %93, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %100

100:                                              ; preds = %99
  %101 = load i64, ptr %9, align 8, !tbaa !5
  %102 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %101)
          to label %103 unwind label %104

103:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %17, !llvm.loop !13

104:                                              ; preds = %100
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %6, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %7, align 4
  br label %108

108:                                              ; preds = %104, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %109

109:                                              ; preds = %108, %42
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %110

110:                                              ; preds = %109, %30
  call void @llvm.lifetime.end.p0(i64 24, 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 %113

111:                                              ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %112 = load i32, ptr %1, align 4
  ret i32 %112

113:                                              ; preds = %110
  %114 = load ptr, ptr %6, align 8
  %115 = load i32, ptr %7, align 4
  %116 = insertvalue { ptr, i32 } poison, ptr %114, 0
  %117 = insertvalue { ptr, i32 } %116, i32 %115, 1
  resume { ptr, i32 } %117
}

; 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 @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 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}
!12 = distinct !{!12, !10}
!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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long 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 [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 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 i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::set", align 8
  %6 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %8 = load i64, ptr %1, align 8, !tbaa !5
  %9 = add nsw i64 %8, -1
  store i64 %9, ptr %1, align 8, !tbaa !5
  %.not28 = icmp eq i64 %8, 0
  br i1 %.not28, label %._crit_edge31, label %.lr.ph30

.lr.ph30:                                         ; preds = %0, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %11 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %11, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %12 unwind label %15

12:                                               ; preds = %.lr.ph30
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %13 = load i64, ptr %2, align 8, !tbaa !5
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %.lr.ph, label %.preheader.preheader

15:                                               ; preds = %.lr.ph30
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %49

.lr.ph:                                           ; preds = %12, %.lr.ph
  %.02024 = phi i64 [ %19, %.lr.ph ], [ 0, %12 ]
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02024) #5
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %17)
  %19 = add nuw nsw i64 %.02024, 1
  %20 = load i64, ptr %2, align 8, !tbaa !5
  %21 = icmp slt i64 %19, %20
  br i1 %21, label %.lr.ph, label %.preheader.preheader, !llvm.loop !9

.preheader.preheader:                             ; preds = %.lr.ph, %12
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %41
  %.01827 = phi i64 [ %42, %41 ], [ 2, %.preheader.preheader ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #5
  call void @_ZNSt3setIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  %22 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  %23 = icmp ult i64 %22, 3
  %24 = load i64, ptr %2, align 8
  %25 = icmp sgt i64 %24, 0
  %26 = select i1 %23, i1 %25, i1 false
  br i1 %26, label %.lr.ph26, label %._crit_edge

._crit_edge:                                      ; preds = %32, %.preheader
  %27 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  %.not22 = icmp eq i64 %27, 2
  call void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  br i1 %.not22, label %45, label %41

.lr.ph26:                                         ; preds = %.preheader, %32
  %.01625 = phi i64 [ %33, %32 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.01625) #5
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = srem i64 %29, %.01827
  store i64 %30, ptr %6, align 8, !tbaa !5
  %31 = invoke { ptr, i8 } @_ZNSt3setIxSt4lessIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %32 unwind label %39

32:                                               ; preds = %.lr.ph26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %33 = add nuw nsw i64 %.01625, 1
  %34 = call noundef i64 @_ZNKSt3setIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  %35 = icmp ult i64 %34, 3
  %36 = load i64, ptr %2, align 8
  %37 = icmp slt i64 %33, %36
  %38 = select i1 %35, i1 %37, i1 false
  br i1 %38, label %.lr.ph26, label %._crit_edge, !llvm.loop !11

39:                                               ; preds = %.lr.ph26
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %49

41:                                               ; preds = %._crit_edge
  %42 = shl nsw i64 %.01827, 1
  %43 = uitofp nneg i64 %42 to double
  %44 = fcmp olt double %43, 3.000000e+18
  br i1 %44, label %.preheader, label %45, !llvm.loop !12

45:                                               ; preds = %41, %._crit_edge
  %.2 = phi i64 [ %.01827, %._crit_edge ], [ 0, %41 ]
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %.2)
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %47 = load i64, ptr %1, align 8, !tbaa !5
  %48 = add nsw i64 %47, -1
  store i64 %48, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %47, 0
  br i1 %.not, label %._crit_edge31, label %.lr.ph30, !llvm.loop !13

49:                                               ; preds = %39, %15
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn

._crit_edge31:                                    ; preds = %45, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0
}

; 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 @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 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 @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { 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 = { 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 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}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass