; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2019-20/Open/Plat (ex_plat)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.ModFast = type { i64, i64 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::vector.3" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.7" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@MF = external dso_local global %struct.ModFast, align 8
@M = external dso_local global i32, align 4
@MOD = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@choose = external dso_local global [7501 x [7501 x i32]], align 16
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 nounwind uwtable
declare dso_local void @_ZN7ModFastC2Ey(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3mulii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4withi(i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z4mpowxx(i64 noundef, i64 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.ModFast, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca %"class.std::allocator.7", align 1
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %18 unwind label %31

18:                                               ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %19 unwind label %35

19:                                               ; preds = %18
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) @MOD)
  %22 = load i32, ptr @MOD, align 4, !tbaa !5
  %23 = sub nsw i32 %22, 1
  store i32 %23, ptr @M, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #7
  %24 = load i32, ptr @M, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  call void @_ZN7ModFastC2Ey(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %25)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @MF, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %73, %19
  %27 = load i32, ptr %7, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %40, label %30

30:                                               ; preds = %26
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %76

31:                                               ; preds = %0
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %4, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %5, align 4
  br label %39

35:                                               ; preds = %18
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %4, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %39

39:                                               ; preds = %35, %31
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  br label %179

40:                                               ; preds = %26
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [7501 x [7501 x i32]], ptr @choose, i64 0, i64 %42
  %44 = getelementptr inbounds [7501 x i32], ptr %43, i64 0, i64 0
  store i32 1, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %69, %40
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %72

50:                                               ; preds = %45
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [7501 x [7501 x i32]], ptr @choose, i64 0, i64 %52
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [7501 x i32], ptr %53, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = sub nsw i32 %58, %59
  %61 = call noundef i32 @_Z3mulii(i32 noundef %57, i32 noundef %60)
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [7501 x [7501 x i32]], ptr @choose, i64 0, i64 %63
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [7501 x i32], ptr %64, i64 0, i64 %67
  store i32 %61, ptr %68, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %50
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %9, align 4, !tbaa !5
  br label %45, !llvm.loop !12

72:                                               ; preds = %49
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %7, align 4, !tbaa !5
  br label %26, !llvm.loop !14

76:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #7
  %77 = load i32, ptr @n, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %79, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %80 unwind label %86

80:                                               ; preds = %76
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 1, ptr %12, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 2, ptr %13, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %162, %80
  %82 = load i32, ptr %13, align 4, !tbaa !5
  %83 = load i32, ptr @n, align 4, !tbaa !5
  %84 = icmp sle i32 %82, %83
  br i1 %84, label %90, label %85

85:                                               ; preds = %81
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %166

86:                                               ; preds = %76
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %4, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %5, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  br label %178

90:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %91 = load i32, ptr %13, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %92)
          to label %94 unwind label %109

94:                                               ; preds = %90
  %95 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %96 = extractvalue { ptr, i64 } %93, 0
  store ptr %96, ptr %95, align 8
  %97 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %98 = extractvalue { ptr, i64 } %93, 1
  store i64 %98, ptr %97, align 8
  %99 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  %100 = xor i1 %99, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  br i1 %100, label %101, label %161

101:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %102 = load i32, ptr %13, align 4, !tbaa !5
  %103 = mul nsw i32 2, %102
  store i32 %103, ptr %15, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %123, %101
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = load i32, ptr @n, align 4, !tbaa !5
  %107 = icmp sle i32 %105, %106
  br i1 %107, label %113, label %108

108:                                              ; preds = %104
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %131

109:                                              ; preds = %90
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %4, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  br label %165

113:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  %114 = load i32, ptr %15, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %115)
          to label %117 unwind label %127

117:                                              ; preds = %113
  %118 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %119 = extractvalue { ptr, i64 } %116, 0
  store ptr %119, ptr %118, align 8
  %120 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %121 = extractvalue { ptr, i64 } %116, 1
  store i64 %121, ptr %120, align 8
  %122 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %16, i1 noundef zeroext true) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  br label %123

123:                                              ; preds = %117
  %124 = load i32, ptr %13, align 4, !tbaa !5
  %125 = load i32, ptr %15, align 4, !tbaa !5
  %126 = add nsw i32 %125, %124
  store i32 %126, ptr %15, align 4, !tbaa !5
  br label %104, !llvm.loop !15

127:                                              ; preds = %113
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %4, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %165

131:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %132 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %132, ptr %17, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %152, %131
  %134 = load i32, ptr %17, align 4, !tbaa !5
  %135 = load i32, ptr @n, align 4, !tbaa !5
  %136 = icmp sle i32 %134, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %160

138:                                              ; preds = %133
  %139 = load i64, ptr %12, align 8, !tbaa !10
  %140 = load i32, ptr %13, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = load i32, ptr %17, align 4, !tbaa !5
  %143 = invoke noundef i32 @_Z4withi(i32 noundef %142)
          to label %144 unwind label %156

144:                                              ; preds = %138
  %145 = sext i32 %143 to i64
  %146 = invoke noundef i64 @_Z4mpowxx(i64 noundef %141, i64 noundef %145)
          to label %147 unwind label %156

147:                                              ; preds = %144
  %148 = mul nsw i64 %139, %146
  %149 = load i32, ptr @MOD, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = srem i64 %148, %150
  store i64 %151, ptr %12, align 8, !tbaa !10
  br label %152

152:                                              ; preds = %147
  %153 = load i32, ptr %13, align 4, !tbaa !5
  %154 = load i32, ptr %17, align 4, !tbaa !5
  %155 = mul nsw i32 %154, %153
  store i32 %155, ptr %17, align 4, !tbaa !5
  br label %133, !llvm.loop !16

156:                                              ; preds = %144, %138
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %4, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %165

160:                                              ; preds = %137
  br label %161

161:                                              ; preds = %160, %94
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %13, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %13, align 4, !tbaa !5
  br label %81, !llvm.loop !17

165:                                              ; preds = %156, %127, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %177

166:                                              ; preds = %85
  %167 = load i64, ptr %12, align 8, !tbaa !10
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %167)
          to label %169 unwind label %173

169:                                              ; preds = %166
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %168, ptr noundef @.str.6)
          to label %171 unwind label %173

171:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #7
  %172 = load i32, ptr %1, align 4
  ret i32 %172

173:                                              ; preds = %169, %166
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %4, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %5, align 4
  br label %177

177:                                              ; preds = %173, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #7
  br label %178

178:                                              ; preds = %177, %86
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #7
  br label %179

179:                                              ; preds = %178, %39
  %180 = load ptr, ptr %4, align 8
  %181 = load i32, ptr %5, align 4
  %182 = insertvalue { ptr, i32 } poison, ptr %180, 0
  %183 = insertvalue { ptr, i32 } %182, i32 %181, 1
  resume { ptr, i32 } %183
}

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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


; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.ModFast = type { i64, i64 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::vector.3" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.7" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@MF = external dso_local local_unnamed_addr global %struct.ModFast, align 8
@M = external dso_local local_unnamed_addr global i32, align 4
@MOD = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@choose = external dso_local local_unnamed_addr global [7501 x [7501 x i32]], align 16
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 nounwind uwtable
declare dso_local void @_ZN7ModFastC2Ey(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3mulii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4withi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z4mpowxx(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca %struct.ModFast, align 8
  %4 = alloca %"class.std::vector.3", align 8
  %5 = alloca %"class.std::allocator.7", align 1
  %6 = alloca %"struct.std::_Bit_reference", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %8 unwind label %18

8:                                                ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %9 unwind label %20

9:                                                ; preds = %8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) @MOD)
  %12 = load i32, ptr @MOD, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr @M, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %14 = sext i32 %13 to i64
  call void @_ZN7ModFastC2Ey(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %14)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) @MF, ptr noundef nonnull align 8 dereferenceable(16) %3, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %.not57 = icmp slt i32 %15, 0
  br i1 %.not57, label %._crit_edge61, label %.lr.ph60

._crit_edge61:                                    ; preds = %._crit_edge, %9
  %.lcssa = phi i32 [ %15, %9 ], [ %25, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #7
  %16 = add nsw i32 %.lcssa, 1
  %17 = sext i32 %16 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %17, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %32 unwind label %37

18:                                               ; preds = %0
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %22

20:                                               ; preds = %8
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  br label %22

22:                                               ; preds = %20, %18
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %19, %18 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  br label %83

.lr.ph60:                                         ; preds = %9, %._crit_edge
  %23 = phi i32 [ %25, %._crit_edge ], [ %15, %9 ]
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %._crit_edge ], [ 0, %9 ]
  %24 = getelementptr inbounds [7501 x [7501 x i32]], ptr @choose, i64 0, i64 %indvars.iv83
  store i32 1, ptr %24, align 4, !tbaa !5
  %.not79 = icmp eq i64 %indvars.iv83, 0
  br i1 %.not79, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre94 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph60
  %25 = phi i32 [ %.pre94, %._crit_edge.loopexit ], [ %23, %.lr.ph60 ]
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %26 = sext i32 %25 to i64
  %.not.not = icmp slt i64 %indvars.iv83, %26
  br i1 %.not.not, label %.lr.ph60, label %._crit_edge61, !llvm.loop !12

.lr.ph:                                           ; preds = %.lr.ph60, %.lr.ph
  %27 = phi i32 [ %30, %.lr.ph ], [ 1, %.lr.ph60 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph60 ]
  %28 = sub nsw i64 %indvars.iv83, %indvars.iv
  %29 = trunc nsw i64 %28 to i32
  %30 = call noundef i32 @_Z3mulii(i32 noundef %27, i32 noundef %29)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = getelementptr inbounds [7501 x [7501 x i32]], ptr @choose, i64 0, i64 %indvars.iv83, i64 %indvars.iv.next
  store i32 %30, ptr %31, align 4, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv83
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !14

32:                                               ; preds = %._crit_edge61
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %.not4471 = icmp slt i32 %33, 2
  br i1 %.not4471, label %._crit_edge77, label %.lr.ph76

.lr.ph76:                                         ; preds = %32
  %34 = getelementptr inbounds i8, ptr %6, i64 8
  %35 = getelementptr inbounds i8, ptr %7, i64 8
  br label %39

._crit_edge77:                                    ; preds = %.loopexit, %32
  %.032.lcssa = phi i64 [ 1, %32 ], [ %.2, %.loopexit ]
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.032.lcssa)
          to label %76 unwind label %79

37:                                               ; preds = %._crit_edge61
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  br label %82

39:                                               ; preds = %.lr.ph76, %.loopexit
  %indvars.iv88 = phi i64 [ 2, %.lr.ph76 ], [ %indvars.iv.next89, %.loopexit ]
  %indvars.iv86 = phi i64 [ 4, %.lr.ph76 ], [ %indvars.iv.next87, %.loopexit ]
  %.03272 = phi i64 [ 1, %.lr.ph76 ], [ %.2, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %40 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %indvars.iv88)
          to label %41 unwind label %50

41:                                               ; preds = %39
  %42 = extractvalue { ptr, i64 } %40, 0
  store ptr %42, ptr %6, align 8
  %43 = extractvalue { ptr, i64 } %40, 1
  store i64 %43, ptr %34, align 8
  %44 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %.pre95 = load i32, ptr @n, align 4, !tbaa !5
  br i1 %44, label %.loopexit, label %45

45:                                               ; preds = %41
  %indvars.iv88.tr = trunc i64 %indvars.iv88 to i32
  %46 = shl i32 %indvars.iv88.tr, 1
  %.not4562 = icmp sgt i32 %46, %.pre95
  br i1 %.not4562, label %.preheader, label %.lr.ph65

.preheader:                                       ; preds = %53, %45
  %47 = phi i32 [ %.pre95, %45 ], [ %57, %53 ]
  %48 = sext i32 %47 to i64
  %.not4666 = icmp sgt i64 %indvars.iv88, %48
  br i1 %.not4666, label %.loopexit, label %.lr.ph69.preheader

.lr.ph69.preheader:                               ; preds = %.preheader
  %49 = trunc nuw nsw i64 %indvars.iv88 to i32
  br label %.lr.ph69

50:                                               ; preds = %39
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %81

.lr.ph65:                                         ; preds = %45, %53
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %53 ], [ %indvars.iv86, %45 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %52 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %indvars.iv90)
          to label %53 unwind label %59

53:                                               ; preds = %.lr.ph65
  %54 = extractvalue { ptr, i64 } %52, 0
  store ptr %54, ptr %7, align 8
  %55 = extractvalue { ptr, i64 } %52, 1
  store i64 %55, ptr %35, align 8
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, %indvars.iv88
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = trunc nuw i64 %indvars.iv.next91 to i32
  %.not45 = icmp slt i32 %57, %58
  br i1 %.not45, label %.preheader, label %.lr.ph65, !llvm.loop !15

59:                                               ; preds = %.lr.ph65
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %81

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %65
  %.068 = phi i32 [ %70, %65 ], [ %49, %.lr.ph69.preheader ]
  %.167 = phi i64 [ %69, %65 ], [ %.03272, %.lr.ph69.preheader ]
  %61 = invoke noundef i32 @_Z4withi(i32 noundef %.068)
          to label %62 unwind label %72

62:                                               ; preds = %.lr.ph69
  %63 = sext i32 %61 to i64
  %64 = invoke noundef i64 @_Z4mpowxx(i64 noundef %indvars.iv88, i64 noundef %63)
          to label %65 unwind label %72

65:                                               ; preds = %62
  %66 = mul nsw i64 %64, %.167
  %67 = load i32, ptr @MOD, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = srem i64 %66, %68
  %70 = mul nuw nsw i32 %.068, %49
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %.not46 = icmp sgt i32 %70, %71
  br i1 %.not46, label %.loopexit, label %.lr.ph69, !llvm.loop !16

72:                                               ; preds = %62, %.lr.ph69
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %81

.loopexit:                                        ; preds = %65, %.preheader, %41
  %74 = phi i32 [ %.pre95, %41 ], [ %47, %.preheader ], [ %71, %65 ]
  %.2 = phi i64 [ %.03272, %41 ], [ %.03272, %.preheader ], [ %69, %65 ]
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %75 = sext i32 %74 to i64
  %.not44.not = icmp slt i64 %indvars.iv88, %75
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 2
  br i1 %.not44.not, label %39, label %._crit_edge77, !llvm.loop !17

76:                                               ; preds = %._crit_edge77
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.6)
          to label %78 unwind label %79

78:                                               ; preds = %76
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #7
  ret i32 0

79:                                               ; preds = %76, %._crit_edge77
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %81

81:                                               ; preds = %50, %59, %72, %79
  %.pn47.pn = phi { ptr, i32 } [ %80, %79 ], [ %60, %59 ], [ %73, %72 ], [ %51, %50 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #7
  br label %82

82:                                               ; preds = %81, %37
  %.pn47.pn.pn = phi { ptr, i32 } [ %.pn47.pn, %81 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #7
  br label %83

83:                                               ; preds = %82, %22
  %.pn47.pn.pn.pn = phi { ptr, i32 } [ %.pn47.pn.pn, %82 ], [ %.pn, %22 ]
  resume { ptr, i32 } %.pn47.pn.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

; 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 #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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


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