; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #799 (Div. 4)/H. Gambling.ll (Z5solvev)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::map", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %26 = load i64, ptr %1, align 8, !tbaa !5
  %27 = call ptr @llvm.stacksave.p0()
  store ptr %27, ptr %2, align 8
  %28 = alloca i64, i64 %26, align 16
  store i64 %26, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store ptr %28, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %29 = load ptr, ptr %4, align 8, !tbaa !9
  store ptr %29, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %30 = load ptr, ptr %4, align 8, !tbaa !9
  %31 = mul nuw i64 8, %26
  %32 = udiv i64 %31, 8
  %33 = getelementptr inbounds i64, ptr %30, i64 %32
  store ptr %33, ptr %6, align 8, !tbaa !9
  br label %34

34:                                               ; preds = %43, %0
  %35 = load ptr, ptr %5, align 8, !tbaa !9
  %36 = load ptr, ptr %6, align 8, !tbaa !9
  %37 = icmp ne ptr %35, %36
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %40 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %40, ptr %7, align 8, !tbaa !9
  %41 = load ptr, ptr %7, align 8, !tbaa !9
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %41)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %43

43:                                               ; preds = %39
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds i64, ptr %44, i32 1
  store ptr %45, ptr %5, align 8, !tbaa !9
  br label %34

46:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #5
  call void @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  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 -1, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 -1, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 -1, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %157, %46
  %48 = load i64, ptr %13, align 8, !tbaa !5
  %49 = load i64, ptr %1, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %161

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 1, ptr %14, align 8, !tbaa !5
  %53 = load i64, ptr %13, align 8, !tbaa !5
  %54 = getelementptr inbounds i64, ptr %28, i64 %53
  %55 = invoke noundef i64 @_ZNKSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %54)
          to label %56 unwind label %86

56:                                               ; preds = %52
  %57 = icmp ne i64 %55, 0
  br i1 %57, label %58, label %122

58:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %59 = load i64, ptr %13, align 8, !tbaa !5
  %60 = load i64, ptr %13, align 8, !tbaa !5
  %61 = getelementptr inbounds i64, ptr %28, i64 %60
  %62 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %61)
          to label %63 unwind label %90

63:                                               ; preds = %58
  %64 = getelementptr inbounds %"struct.std::pair", ptr %62, i32 0, i32 0
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = sub nsw i64 %59, %65
  store i64 %66, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %67 = load i64, ptr %13, align 8, !tbaa !5
  %68 = getelementptr inbounds i64, ptr %28, i64 %67
  %69 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %68)
          to label %70 unwind label %94

70:                                               ; preds = %63
  %71 = getelementptr inbounds %"struct.std::pair", ptr %69, i32 0, i32 1
  %72 = load i64, ptr %71, align 8, !tbaa !13
  store i64 %72, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %73 = load i64, ptr %17, align 8, !tbaa !5
  %74 = load i64, ptr %18, align 8, !tbaa !5
  %75 = sub nsw i64 %73, %74
  store i64 %75, ptr %19, align 8, !tbaa !5
  %76 = load i64, ptr %19, align 8, !tbaa !5
  %77 = load i64, ptr %18, align 8, !tbaa !5
  %78 = icmp sge i64 %76, %77
  br i1 %78, label %79, label %102

79:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 1, ptr %21, align 4, !tbaa !14
  invoke void @_ZNSt4pairIllEC2IRliTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %80 unwind label %98

80:                                               ; preds = %79
  %81 = load i64, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds i64, ptr %28, i64 %81
  %83 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %82)
          to label %84 unwind label %98

84:                                               ; preds = %80
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIllEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %118

86:                                               ; preds = %52
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %15, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %16, align 4
  br label %160

90:                                               ; preds = %58
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %15, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %16, align 4
  br label %121

94:                                               ; preds = %63
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %15, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %16, align 4
  br label %120

98:                                               ; preds = %80, %79
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %15, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %119

102:                                              ; preds = %70
  %103 = load i64, ptr %13, align 8, !tbaa !5
  %104 = getelementptr inbounds i64, ptr %28, i64 %103
  %105 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %104)
          to label %106 unwind label %114

106:                                              ; preds = %102
  %107 = getelementptr inbounds %"struct.std::pair", ptr %105, i32 0, i32 1
  %108 = load i64, ptr %107, align 8, !tbaa !13
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %107, align 8, !tbaa !13
  %110 = load i64, ptr %18, align 8, !tbaa !5
  %111 = load i64, ptr %19, align 8, !tbaa !5
  %112 = sub nsw i64 %110, %111
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %14, align 8, !tbaa !5
  br label %118

114:                                              ; preds = %102
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %15, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %16, align 4
  br label %119

118:                                              ; preds = %106, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %133

119:                                              ; preds = %114, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %120

120:                                              ; preds = %119, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %121

121:                                              ; preds = %120, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %160

122:                                              ; preds = %56
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 1, ptr %23, align 4, !tbaa !14
  invoke void @_ZNSt4pairIllEC2IRliTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %123 unwind label %129

123:                                              ; preds = %122
  %124 = load i64, ptr %13, align 8, !tbaa !5
  %125 = getelementptr inbounds i64, ptr %28, i64 %124
  %126 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %125)
          to label %127 unwind label %129

127:                                              ; preds = %123
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIllEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %126, ptr noundef nonnull align 8 dereferenceable(16) %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %133

129:                                              ; preds = %123, %122
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %15, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %160

133:                                              ; preds = %127, %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %134 = load i64, ptr %13, align 8, !tbaa !5
  %135 = getelementptr inbounds i64, ptr %28, i64 %134
  %136 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %135)
          to label %137 unwind label %152

137:                                              ; preds = %133
  %138 = getelementptr inbounds %"struct.std::pair", ptr %136, i32 0, i32 0
  %139 = load i64, ptr %138, align 8, !tbaa !11
  store i64 %139, ptr %24, align 8, !tbaa !5
  %140 = load i64, ptr %14, align 8, !tbaa !5
  %141 = load i64, ptr %12, align 8, !tbaa !5
  %142 = icmp sgt i64 %140, %141
  br i1 %142, label %143, label %156

143:                                              ; preds = %137
  %144 = load i64, ptr %13, align 8, !tbaa !5
  %145 = getelementptr inbounds i64, ptr %28, i64 %144
  %146 = load i64, ptr %145, align 8, !tbaa !5
  store i64 %146, ptr %11, align 8, !tbaa !5
  %147 = load i64, ptr %24, align 8, !tbaa !5
  %148 = add nsw i64 %147, 1
  store i64 %148, ptr %9, align 8, !tbaa !5
  %149 = load i64, ptr %13, align 8, !tbaa !5
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %10, align 8, !tbaa !5
  %151 = load i64, ptr %14, align 8, !tbaa !5
  store i64 %151, ptr %12, align 8, !tbaa !5
  br label %156

152:                                              ; preds = %133
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %15, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %160

156:                                              ; preds = %143, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %157

157:                                              ; preds = %156
  %158 = load i64, ptr %13, align 8, !tbaa !5
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %13, align 8, !tbaa !5
  br label %47, !llvm.loop !16

160:                                              ; preds = %152, %129, %121, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %182

161:                                              ; preds = %51
  %162 = load i64, ptr %11, align 8, !tbaa !5
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %162)
          to label %164 unwind label %178

164:                                              ; preds = %161
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef @.str)
          to label %166 unwind label %178

166:                                              ; preds = %164
  %167 = load i64, ptr %9, align 8, !tbaa !5
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %165, i64 noundef %167)
          to label %169 unwind label %178

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)
          to label %171 unwind label %178

171:                                              ; preds = %169
  %172 = load i64, ptr %10, align 8, !tbaa !5
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %170, i64 noundef %172)
          to label %174 unwind label %178

174:                                              ; preds = %171
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %173, ptr noundef @.str.1)
          to label %176 unwind label %178

176:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #5
  %177 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %177)
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void

178:                                              ; preds = %174, %171, %169, %166, %164, %161
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %15, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %16, align 4
  br label %182

182:                                              ; preds = %178, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  br label %183

183:                                              ; preds = %182
  %184 = load ptr, ptr %15, align 8
  %185 = load i32, ptr %16, align 4
  %186 = insertvalue { ptr, i32 } poison, ptr %184, 0
  %187 = insertvalue { ptr, i32 } %186, i32 %185, 1
  resume { ptr, i32 } %187
}

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIllEC2IRliTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIllEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3 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) #4

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 = { nocallback nofree nosync nounwind willreturn }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::map", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %9 = load i64, ptr %1, align 8, !tbaa !5
  %10 = call ptr @llvm.stacksave.p0()
  %11 = alloca i64, i64 %9, align 16
  %12 = getelementptr inbounds i64, ptr %11, i64 %9
  %.not73 = icmp eq i64 %9, 0
  br i1 %.not73, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #5
  call void @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  %13 = load i64, ptr %1, align 8, !tbaa !5
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %.lr.ph81, label %._crit_edge82

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.074 = phi ptr [ %16, %.lr.ph ], [ %11, %0 ]
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %.074)
  %16 = getelementptr inbounds i8, ptr %.074, i64 8
  %.not = icmp eq ptr %16, %12
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge82:                                    ; preds = %83, %._crit_edge
  %.025.lcssa = phi i64 [ -1, %._crit_edge ], [ %.126, %83 ]
  %.023.lcssa = phi i64 [ -1, %._crit_edge ], [ %.124, %83 ]
  %.022.lcssa = phi i64 [ 0, %._crit_edge ], [ %.1, %83 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %17 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.025.lcssa)
          to label %87 unwind label %98

.lr.ph81:                                         ; preds = %._crit_edge, %83
  %.02279 = phi i64 [ %.1, %83 ], [ 0, %._crit_edge ]
  %.02378 = phi i64 [ %.124, %83 ], [ -1, %._crit_edge ]
  %.02577 = phi i64 [ %.126, %83 ], [ -1, %._crit_edge ]
  %.03676 = phi i64 [ %.137, %83 ], [ -1, %._crit_edge ]
  %storemerge75 = phi i64 [ %.pre-phi, %83 ], [ 0, %._crit_edge ]
  %18 = getelementptr inbounds i64, ptr %11, i64 %storemerge75
  %19 = invoke noundef i64 @_ZNKSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %20 unwind label %41

20:                                               ; preds = %.lr.ph81
  %.not41 = icmp eq i64 %19, 0
  br i1 %.not41, label %61, label %21

21:                                               ; preds = %20
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds i64, ptr %11, i64 %22
  %24 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %25 unwind label %43

25:                                               ; preds = %21
  %26 = load i64, ptr %24, align 8, !tbaa !9
  %27 = load i64, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds i64, ptr %11, i64 %27
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %30 unwind label %45

30:                                               ; preds = %25
  %31 = getelementptr inbounds i8, ptr %29, i64 8
  %32 = load i64, ptr %31, align 8, !tbaa !11
  %33 = add i64 %26, %32
  %34 = sub i64 %22, %33
  %.not42 = icmp slt i64 %34, %32
  br i1 %.not42, label %49, label %35

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 1, ptr %5, align 4, !tbaa !12
  call void @_ZNSt4pairIllEC2IRliTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %36 = load i64, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds i64, ptr %11, i64 %36
  %38 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %39 unwind label %47

39:                                               ; preds = %35
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIllEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %69

41:                                               ; preds = %.lr.ph81
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %86

43:                                               ; preds = %21
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %86

45:                                               ; preds = %25
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %86

47:                                               ; preds = %35
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %86

49:                                               ; preds = %30
  %50 = load i64, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds i64, ptr %11, i64 %50
  %52 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %51)
          to label %53 unwind label %59

53:                                               ; preds = %49
  %54 = getelementptr inbounds i8, ptr %52, i64 8
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %54, align 8, !tbaa !11
  %57 = add i64 %32, 1
  %58 = sub i64 %57, %34
  br label %69

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %86

61:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 1, ptr %7, align 4, !tbaa !12
  call void @_ZNSt4pairIllEC2IRliTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %62 = load i64, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds i64, ptr %11, i64 %62
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %63)
          to label %65 unwind label %67

65:                                               ; preds = %61
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIllEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %64, ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %69

67:                                               ; preds = %61
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %86

69:                                               ; preds = %39, %53, %65
  %.135 = phi i64 [ 1, %65 ], [ 1, %39 ], [ %58, %53 ]
  %70 = load i64, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds i64, ptr %11, i64 %70
  %72 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %71)
          to label %73 unwind label %81

73:                                               ; preds = %69
  %74 = icmp sgt i64 %.135, %.03676
  %.pre = load i64, ptr %3, align 8, !tbaa !5
  br i1 %74, label %75, label %._crit_edge85

._crit_edge85:                                    ; preds = %73
  %.pre86 = add nsw i64 %.pre, 1
  br label %83

75:                                               ; preds = %73
  %76 = load i64, ptr %72, align 8, !tbaa !9
  %77 = getelementptr inbounds i64, ptr %11, i64 %.pre
  %78 = load i64, ptr %77, align 8, !tbaa !5
  %79 = add nsw i64 %76, 1
  %80 = add nsw i64 %.pre, 1
  br label %83

81:                                               ; preds = %69
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %86

83:                                               ; preds = %._crit_edge85, %75
  %.pre-phi = phi i64 [ %.pre86, %._crit_edge85 ], [ %80, %75 ]
  %.137 = phi i64 [ %.03676, %._crit_edge85 ], [ %.135, %75 ]
  %.126 = phi i64 [ %.02577, %._crit_edge85 ], [ %78, %75 ]
  %.124 = phi i64 [ %.02378, %._crit_edge85 ], [ %80, %75 ]
  %.1 = phi i64 [ %.02279, %._crit_edge85 ], [ %79, %75 ]
  store i64 %.pre-phi, ptr %3, align 8, !tbaa !5
  %84 = load i64, ptr %1, align 8, !tbaa !5
  %85 = icmp slt i64 %.pre-phi, %84
  br i1 %85, label %.lr.ph81, label %._crit_edge82, !llvm.loop !14

86:                                               ; preds = %43, %47, %59, %45, %81, %67, %41
  %.pn46 = phi { ptr, i32 } [ %82, %81 ], [ %68, %67 ], [ %42, %41 ], [ %44, %43 ], [ %46, %45 ], [ %48, %47 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %100

87:                                               ; preds = %._crit_edge82
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @.str)
          to label %89 unwind label %98

89:                                               ; preds = %87
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %88, i64 noundef %.022.lcssa)
          to label %91 unwind label %98

91:                                               ; preds = %89
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @.str)
          to label %93 unwind label %98

93:                                               ; preds = %91
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %92, i64 noundef %.023.lcssa)
          to label %95 unwind label %98

95:                                               ; preds = %93
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull @.str.1)
          to label %97 unwind label %98

97:                                               ; preds = %95
  call void @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #5
  call void @llvm.stackrestore.p0(ptr %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void

98:                                               ; preds = %95, %93, %91, %89, %87, %._crit_edge82
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %100

100:                                              ; preds = %98, %86
  %.pn46.pn = phi { ptr, i32 } [ %.pn46, %86 ], [ %99, %98 ]
  call void @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn46.pn
}

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 @_ZNSt3mapIlSt4pairIllESt4lessIlESaIS0_IKlS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIllEC2IRliTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIllEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 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 #4

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 nocallback nofree nosync nounwind willreturn }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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