; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/181 Division 2/Problem C (C)

; 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<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_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 }
%"class.std::basic_ostream" = type { ptr, %"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 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@MOD = external dso_local global i32, align 4
@num = external dso_local global i32, align 4
@good = external dso_local global %"class.std::set", align 8
@fact = external dso_local global [1000001 x i64], align 16
@res = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3invx(i64 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @a, ptr noundef @b, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %59, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp sle i32 %13, 7
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %62

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %55, %16
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = shl i32 1, %19
  %21 = icmp slt i32 %18, %20
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %17
  store i32 0, ptr @num, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %46, %23
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %49

29:                                               ; preds = %24
  %30 = load i32, ptr @num, align 4, !tbaa !5
  %31 = mul nsw i32 %30, 10
  store i32 %31, ptr @num, align 4, !tbaa !5
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = shl i32 1, %33
  %35 = and i32 %32, %34
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %37, label %41

37:                                               ; preds = %29
  %38 = load i32, ptr @a, align 4, !tbaa !5
  %39 = load i32, ptr @num, align 4, !tbaa !5
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr @num, align 4, !tbaa !5
  br label %45

41:                                               ; preds = %29
  %42 = load i32, ptr @b, align 4, !tbaa !5
  %43 = load i32, ptr @num, align 4, !tbaa !5
  %44 = add nsw i32 %43, %42
  store i32 %44, ptr @num, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %41, %37
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %5, align 4, !tbaa !5
  br label %24, !llvm.loop !9

49:                                               ; preds = %28
  %50 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %51 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 0
  %52 = extractvalue { ptr, i8 } %50, 0
  store ptr %52, ptr %51, align 8
  %53 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 1
  %54 = extractvalue { ptr, i8 } %50, 1
  store i8 %54, ptr %53, align 8
  br label %55

55:                                               ; preds = %49
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %4, align 4, !tbaa !5
  br label %17, !llvm.loop !11

58:                                               ; preds = %22
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !12

62:                                               ; preds = %15
  store i64 1, ptr @fact, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %83, %62
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = icmp sle i32 %64, %65
  br i1 %66, label %68, label %67

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

68:                                               ; preds = %63
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !13
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = mul nsw i64 %73, %75
  %77 = load i32, ptr @MOD, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = srem i64 %76, %78
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %81
  store i64 %79, ptr %82, align 8, !tbaa !13
  br label %83

83:                                               ; preds = %68
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !5
  br label %63, !llvm.loop !15

86:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %138, %86
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = load i32, ptr @n, align 4, !tbaa !5
  %90 = icmp sle i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %141

92:                                               ; preds = %87
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = load i32, ptr @a, align 4, !tbaa !5
  %95 = mul nsw i32 %93, %94
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sub nsw i32 %96, %97
  %99 = load i32, ptr @b, align 4, !tbaa !5
  %100 = mul nsw i32 %98, %99
  %101 = add nsw i32 %95, %100
  store i32 %101, ptr @num, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %102 = call ptr @_ZNSt3setIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %103 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %9, i32 0, i32 0
  store ptr %102, ptr %103, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %104 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @good) #6
  %105 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %10, i32 0, i32 0
  store ptr %104, ptr %105, align 8
  %106 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br i1 %106, label %107, label %137

107:                                              ; preds = %92
  %108 = load i64, ptr @res, align 8, !tbaa !13
  %109 = load i32, ptr @n, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !13
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !13
  %117 = call noundef i64 @_Z3invx(i64 noundef %116)
  %118 = mul nsw i64 %112, %117
  %119 = load i32, ptr @MOD, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = srem i64 %118, %120
  %122 = load i32, ptr @n, align 4, !tbaa !5
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = sub nsw i32 %122, %123
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !13
  %128 = call noundef i64 @_Z3invx(i64 noundef %127)
  %129 = mul nsw i64 %121, %128
  %130 = load i32, ptr @MOD, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = srem i64 %129, %131
  %133 = add nsw i64 %108, %132
  %134 = load i32, ptr @MOD, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = srem i64 %133, %135
  store i64 %136, ptr @res, align 8, !tbaa !13
  br label %137

137:                                              ; preds = %107, %92
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %8, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %8, align 4, !tbaa !5
  br label %87, !llvm.loop !16

141:                                              ; preds = %91
  %142 = load i64, ptr @res, align 8, !tbaa !13
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %142)
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 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)) #5

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_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 }
%"class.std::basic_ostream" = type { ptr, %"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 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@MOD = external dso_local local_unnamed_addr global i32, align 4
@num = external dso_local global i32, align 4
@good = external dso_local global %"class.std::set", align 8
@fact = external dso_local local_unnamed_addr global [1000001 x i64], align 16
@res = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3invx(i64 noundef) local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
.preheader28:
  %0 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %1 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @a, ptr noundef nonnull @b, ptr noundef nonnull @n)
  %b.val = load i32, ptr @b, align 4
  store i32 %b.val, ptr @num, align 4, !tbaa !5
  %3 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %a.val.1 = load i32, ptr @a, align 4
  store i32 %a.val.1, ptr @num, align 4, !tbaa !5
  %4 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.1 = load i32, ptr @b, align 4
  %storemerge.1.1 = mul nsw i32 %b.val.1, 11
  store i32 %storemerge.1.1, ptr @num, align 4, !tbaa !5
  %5 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.1.1 = load i32, ptr @b, align 4
  %a.val.1.1 = load i32, ptr @a, align 4
  %6 = mul nsw i32 %a.val.1.1, 10
  %storemerge.1.1.1 = add nsw i32 %b.val.1.1, %6
  store i32 %storemerge.1.1.1, ptr @num, align 4, !tbaa !5
  %7 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.1.2 = load i32, ptr @b, align 4
  %a.val.1.2 = load i32, ptr @a, align 4
  %8 = mul nsw i32 %b.val.1.2, 10
  %storemerge.1.1.2 = add nsw i32 %a.val.1.2, %8
  store i32 %storemerge.1.1.2, ptr @num, align 4, !tbaa !5
  %9 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %a.val.1.3 = load i32, ptr @a, align 4
  %storemerge.1.1.3 = mul nsw i32 %a.val.1.3, 11
  store i32 %storemerge.1.1.3, ptr @num, align 4, !tbaa !5
  %10 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.2 = load i32, ptr @b, align 4
  %storemerge.2.2 = mul i32 %b.val.2, 111
  store i32 %storemerge.2.2, ptr @num, align 4, !tbaa !5
  %11 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.2.1 = load i32, ptr @b, align 4
  %a.val.2.1 = load i32, ptr @a, align 4
  %12 = mul nsw i32 %a.val.2.1, 10
  %storemerge.2.1.1 = add nsw i32 %b.val.2.1, %12
  %13 = mul nsw i32 %storemerge.2.1.1, 10
  %storemerge.2.2.1 = add nsw i32 %b.val.2.1, %13
  store i32 %storemerge.2.2.1, ptr @num, align 4, !tbaa !5
  %14 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.2.2 = load i32, ptr @b, align 4
  %a.val.2.2 = load i32, ptr @a, align 4
  %15 = mul nsw i32 %b.val.2.2, 10
  %storemerge.2.1.2 = add nsw i32 %a.val.2.2, %15
  %16 = mul nsw i32 %storemerge.2.1.2, 10
  %storemerge.2.2.2 = add nsw i32 %b.val.2.2, %16
  store i32 %storemerge.2.2.2, ptr @num, align 4, !tbaa !5
  %17 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.2.3 = load i32, ptr @b, align 4
  %a.val.2.3 = load i32, ptr @a, align 4
  %18 = mul i32 %a.val.2.3, 110
  %storemerge.2.2.3 = add nsw i32 %b.val.2.3, %18
  store i32 %storemerge.2.2.3, ptr @num, align 4, !tbaa !5
  %19 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.2.4 = load i32, ptr @b, align 4
  %a.val.2.4 = load i32, ptr @a, align 4
  %20 = mul i32 %b.val.2.4, 110
  %storemerge.2.2.4 = add nsw i32 %a.val.2.4, %20
  store i32 %storemerge.2.2.4, ptr @num, align 4, !tbaa !5
  %21 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.2.5 = load i32, ptr @b, align 4
  %a.val.2.5 = load i32, ptr @a, align 4
  %22 = mul nsw i32 %a.val.2.5, 10
  %storemerge.2.1.5 = add nsw i32 %b.val.2.5, %22
  %23 = mul nsw i32 %storemerge.2.1.5, 10
  %storemerge.2.2.5 = add nsw i32 %a.val.2.5, %23
  store i32 %storemerge.2.2.5, ptr @num, align 4, !tbaa !5
  %24 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %b.val.2.6 = load i32, ptr @b, align 4
  %a.val.2.6 = load i32, ptr @a, align 4
  %25 = mul nsw i32 %b.val.2.6, 10
  %storemerge.2.1.6 = add nsw i32 %a.val.2.6, %25
  %26 = mul nsw i32 %storemerge.2.1.6, 10
  %storemerge.2.2.6 = add nsw i32 %a.val.2.6, %26
  store i32 %storemerge.2.2.6, ptr @num, align 4, !tbaa !5
  %27 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %a.val.2.7 = load i32, ptr @a, align 4
  %storemerge.2.2.7 = mul i32 %a.val.2.7, 111
  store i32 %storemerge.2.2.7, ptr @num, align 4, !tbaa !5
  %28 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  br label %33

.lr.ph:                                           ; preds = %83
  %29 = load i32, ptr @MOD, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = zext nneg i32 %84 to i64
  %xtraiter = and i64 %31, 1
  %32 = icmp eq i32 %84, 1
  br i1 %32, label %.preheader.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %31, 2147483646
  br label %88

33:                                               ; preds = %33, %.preheader28
  %.02432.3 = phi i32 [ 0, %.preheader28 ], [ %42, %33 ]
  %b.val.3 = load i32, ptr @b, align 4
  %a.val.3 = load i32, ptr @a, align 4
  %34 = and i32 %.02432.3, 1
  %.not27.3 = icmp eq i32 %34, 0
  %.pn.3 = select i1 %.not27.3, i32 %b.val.3, i32 %a.val.3
  %35 = mul nsw i32 %.pn.3, 10
  %36 = and i32 %.02432.3, 2
  %.not27.3.1 = icmp eq i32 %36, 0
  %.pn.3.1 = select i1 %.not27.3.1, i32 %b.val.3, i32 %a.val.3
  %storemerge.3.1 = add nsw i32 %.pn.3.1, %35
  %37 = mul nsw i32 %storemerge.3.1, 10
  %38 = and i32 %.02432.3, 4
  %.not27.3.2 = icmp eq i32 %38, 0
  %.pn.3.2 = select i1 %.not27.3.2, i32 %b.val.3, i32 %a.val.3
  %storemerge.3.2 = add nsw i32 %.pn.3.2, %37
  %39 = mul nsw i32 %storemerge.3.2, 10
  %40 = and i32 %.02432.3, 8
  %.not27.3.3 = icmp eq i32 %40, 0
  %.pn.3.3 = select i1 %.not27.3.3, i32 %b.val.3, i32 %a.val.3
  %storemerge.3.3 = add nsw i32 %.pn.3.3, %39
  store i32 %storemerge.3.3, ptr @num, align 4, !tbaa !5
  %41 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %42 = add nuw nsw i32 %.02432.3, 1
  %exitcond42.not = icmp eq i32 %42, 16
  br i1 %exitcond42.not, label %.preheader28.4, label %33, !llvm.loop !9

.preheader28.4:                                   ; preds = %33, %.preheader28.4
  %.02432.4 = phi i32 [ %53, %.preheader28.4 ], [ 0, %33 ]
  %b.val.4 = load i32, ptr @b, align 4
  %a.val.4 = load i32, ptr @a, align 4
  %43 = and i32 %.02432.4, 1
  %.not27.4 = icmp eq i32 %43, 0
  %.pn.4 = select i1 %.not27.4, i32 %b.val.4, i32 %a.val.4
  %44 = mul nsw i32 %.pn.4, 10
  %45 = and i32 %.02432.4, 2
  %.not27.4.1 = icmp eq i32 %45, 0
  %.pn.4.1 = select i1 %.not27.4.1, i32 %b.val.4, i32 %a.val.4
  %storemerge.4.1 = add nsw i32 %.pn.4.1, %44
  %46 = mul nsw i32 %storemerge.4.1, 10
  %47 = and i32 %.02432.4, 4
  %.not27.4.2 = icmp eq i32 %47, 0
  %.pn.4.2 = select i1 %.not27.4.2, i32 %b.val.4, i32 %a.val.4
  %storemerge.4.2 = add nsw i32 %.pn.4.2, %46
  %48 = mul nsw i32 %storemerge.4.2, 10
  %49 = and i32 %.02432.4, 8
  %.not27.4.3 = icmp eq i32 %49, 0
  %.pn.4.3 = select i1 %.not27.4.3, i32 %b.val.4, i32 %a.val.4
  %storemerge.4.3 = add nsw i32 %.pn.4.3, %48
  %50 = mul nsw i32 %storemerge.4.3, 10
  %51 = and i32 %.02432.4, 16
  %.not27.4.4 = icmp eq i32 %51, 0
  %.pn.4.4 = select i1 %.not27.4.4, i32 %b.val.4, i32 %a.val.4
  %storemerge.4.4 = add nsw i32 %.pn.4.4, %50
  store i32 %storemerge.4.4, ptr @num, align 4, !tbaa !5
  %52 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %53 = add nuw nsw i32 %.02432.4, 1
  %exitcond41.not = icmp eq i32 %53, 32
  br i1 %exitcond41.not, label %.preheader28.5, label %.preheader28.4, !llvm.loop !9

.preheader28.5:                                   ; preds = %.preheader28.4, %.preheader28.5
  %.02432.5 = phi i32 [ %66, %.preheader28.5 ], [ 0, %.preheader28.4 ]
  %b.val.5 = load i32, ptr @b, align 4
  %a.val.5 = load i32, ptr @a, align 4
  %54 = and i32 %.02432.5, 1
  %.not27.5 = icmp eq i32 %54, 0
  %.pn.5 = select i1 %.not27.5, i32 %b.val.5, i32 %a.val.5
  %55 = mul nsw i32 %.pn.5, 10
  %56 = and i32 %.02432.5, 2
  %.not27.5.1 = icmp eq i32 %56, 0
  %.pn.5.1 = select i1 %.not27.5.1, i32 %b.val.5, i32 %a.val.5
  %storemerge.5.1 = add nsw i32 %.pn.5.1, %55
  %57 = mul nsw i32 %storemerge.5.1, 10
  %58 = and i32 %.02432.5, 4
  %.not27.5.2 = icmp eq i32 %58, 0
  %.pn.5.2 = select i1 %.not27.5.2, i32 %b.val.5, i32 %a.val.5
  %storemerge.5.2 = add nsw i32 %.pn.5.2, %57
  %59 = mul nsw i32 %storemerge.5.2, 10
  %60 = and i32 %.02432.5, 8
  %.not27.5.3 = icmp eq i32 %60, 0
  %.pn.5.3 = select i1 %.not27.5.3, i32 %b.val.5, i32 %a.val.5
  %storemerge.5.3 = add nsw i32 %.pn.5.3, %59
  %61 = mul nsw i32 %storemerge.5.3, 10
  %62 = and i32 %.02432.5, 16
  %.not27.5.4 = icmp eq i32 %62, 0
  %.pn.5.4 = select i1 %.not27.5.4, i32 %b.val.5, i32 %a.val.5
  %storemerge.5.4 = add nsw i32 %.pn.5.4, %61
  %63 = mul nsw i32 %storemerge.5.4, 10
  %64 = and i32 %.02432.5, 32
  %.not27.5.5 = icmp eq i32 %64, 0
  %.pn.5.5 = select i1 %.not27.5.5, i32 %b.val.5, i32 %a.val.5
  %storemerge.5.5 = add nsw i32 %.pn.5.5, %63
  store i32 %storemerge.5.5, ptr @num, align 4, !tbaa !5
  %65 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %66 = add nuw nsw i32 %.02432.5, 1
  %exitcond40.not = icmp eq i32 %66, 64
  br i1 %exitcond40.not, label %.preheader28.6, label %.preheader28.5, !llvm.loop !9

.preheader28.6:                                   ; preds = %.preheader28.5, %.preheader28.6
  %.02432.6 = phi i32 [ %81, %.preheader28.6 ], [ 0, %.preheader28.5 ]
  %b.val.6 = load i32, ptr @b, align 4
  %a.val.6 = load i32, ptr @a, align 4
  %67 = and i32 %.02432.6, 1
  %.not27.6 = icmp eq i32 %67, 0
  %.pn.6 = select i1 %.not27.6, i32 %b.val.6, i32 %a.val.6
  %68 = mul nsw i32 %.pn.6, 10
  %69 = and i32 %.02432.6, 2
  %.not27.6.1 = icmp eq i32 %69, 0
  %.pn.6.1 = select i1 %.not27.6.1, i32 %b.val.6, i32 %a.val.6
  %storemerge.6.1 = add nsw i32 %.pn.6.1, %68
  %70 = mul nsw i32 %storemerge.6.1, 10
  %71 = and i32 %.02432.6, 4
  %.not27.6.2 = icmp eq i32 %71, 0
  %.pn.6.2 = select i1 %.not27.6.2, i32 %b.val.6, i32 %a.val.6
  %storemerge.6.2 = add nsw i32 %.pn.6.2, %70
  %72 = mul nsw i32 %storemerge.6.2, 10
  %73 = and i32 %.02432.6, 8
  %.not27.6.3 = icmp eq i32 %73, 0
  %.pn.6.3 = select i1 %.not27.6.3, i32 %b.val.6, i32 %a.val.6
  %storemerge.6.3 = add nsw i32 %.pn.6.3, %72
  %74 = mul nsw i32 %storemerge.6.3, 10
  %75 = and i32 %.02432.6, 16
  %.not27.6.4 = icmp eq i32 %75, 0
  %.pn.6.4 = select i1 %.not27.6.4, i32 %b.val.6, i32 %a.val.6
  %storemerge.6.4 = add nsw i32 %.pn.6.4, %74
  %76 = mul nsw i32 %storemerge.6.4, 10
  %77 = and i32 %.02432.6, 32
  %.not27.6.5 = icmp eq i32 %77, 0
  %.pn.6.5 = select i1 %.not27.6.5, i32 %b.val.6, i32 %a.val.6
  %storemerge.6.5 = add nsw i32 %.pn.6.5, %76
  %78 = mul nsw i32 %storemerge.6.5, 10
  %79 = and i32 %.02432.6, 64
  %.not27.6.6 = icmp eq i32 %79, 0
  %.pn.6.6 = select i1 %.not27.6.6, i32 %b.val.6, i32 %a.val.6
  %storemerge.6.6 = add nsw i32 %.pn.6.6, %78
  store i32 %storemerge.6.6, ptr @num, align 4, !tbaa !5
  %80 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %81 = add nuw nsw i32 %.02432.6, 1
  %82 = icmp ult i32 %.02432.6, 127
  br i1 %82, label %.preheader28.6, label %83, !llvm.loop !9

83:                                               ; preds = %.preheader28.6
  store i64 1, ptr @fact, align 16, !tbaa !11
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %.not34 = icmp slt i32 %84, 1
  br i1 %.not34, label %.preheader, label %.lr.ph

.preheader.loopexit.unr-lcssa:                    ; preds = %88, %.lr.ph
  %.unr = phi i64 [ 1, %.lr.ph ], [ %94, %88 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next.1, %88 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.preheader.loopexit.epilog-lcssa

.preheader.loopexit.epilog-lcssa:                 ; preds = %.preheader.loopexit.unr-lcssa
  %85 = mul nsw i64 %.unr, %indvars.iv.unr
  %86 = srem i64 %85, %30
  %87 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %indvars.iv.unr
  store i64 %86, ptr %87, align 8, !tbaa !11
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit.epilog-lcssa, %.preheader.loopexit.unr-lcssa, %83
  %.not2636 = icmp slt i32 %84, 0
  br i1 %.not2636, label %._crit_edge, label %.lr.ph38

88:                                               ; preds = %88, %.lr.ph.new
  %89 = phi i64 [ 1, %.lr.ph.new ], [ %94, %88 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.new ], [ %indvars.iv.next.1, %88 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %88 ]
  %90 = mul nsw i64 %89, %indvars.iv
  %91 = srem i64 %90, %30
  %92 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %indvars.iv
  store i64 %91, ptr %92, align 8, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %93 = mul nsw i64 %91, %indvars.iv.next
  %94 = srem i64 %93, %30
  %95 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %indvars.iv.next
  store i64 %94, ptr %95, align 8, !tbaa !11
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 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 %.preheader.loopexit.unr-lcssa, label %88, !llvm.loop !13

._crit_edge:                                      ; preds = %135, %.preheader
  %96 = load i64, ptr @res, align 8, !tbaa !11
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %96)
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph38:                                         ; preds = %.preheader, %135
  %indvars.iv53 = phi i64 [ %indvars.iv.next54, %135 ], [ 0, %.preheader ]
  %99 = phi i32 [ %136, %135 ], [ %84, %.preheader ]
  %100 = load i32, ptr @a, align 4, !tbaa !5
  %101 = trunc nuw nsw i64 %indvars.iv53 to i32
  %102 = mul nsw i32 %100, %101
  %103 = sub nsw i32 %99, %101
  %104 = load i32, ptr @b, align 4, !tbaa !5
  %105 = mul nsw i32 %104, %103
  %106 = add nsw i32 %105, %102
  store i32 %106, ptr @num, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #6
  %107 = call ptr @_ZNSt3setIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) @good, ptr noundef nonnull align 4 dereferenceable(4) @num)
  store ptr %107, ptr %0, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %108 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @good) #6
  store ptr %108, ptr %1, align 8
  %109 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #6
  br i1 %109, label %110, label %135

110:                                              ; preds = %.lr.ph38
  %111 = load i64, ptr @res, align 8, !tbaa !11
  %112 = load i32, ptr @n, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !11
  %116 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %indvars.iv53
  %117 = load i64, ptr %116, align 8, !tbaa !11
  %118 = call noundef i64 @_Z3invx(i64 noundef %117)
  %119 = mul nsw i64 %118, %115
  %120 = load i32, ptr @MOD, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = srem i64 %119, %121
  %123 = load i32, ptr @n, align 4, !tbaa !5
  %124 = sub nsw i32 %123, %101
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1000001 x i64], ptr @fact, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !11
  %128 = call noundef i64 @_Z3invx(i64 noundef %127)
  %129 = mul nsw i64 %128, %122
  %130 = load i32, ptr @MOD, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = srem i64 %129, %131
  %133 = add nsw i64 %132, %111
  %134 = srem i64 %133, %131
  store i64 %134, ptr @res, align 8, !tbaa !11
  br label %135

135:                                              ; preds = %.lr.ph38, %110
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %136 = load i32, ptr @n, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %.not26.not = icmp slt i64 %indvars.iv53, %137
  br i1 %.not26.not, label %.lr.ph38, label %._crit_edge, !llvm.loop !14
}

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

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

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

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

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

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

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

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


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