; LLVM IR from tangjz/acm-icpc :: projecteuler (598)

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

@tot = external dso_local global i32, align 4
@pr = external dso_local global [101 x i32], align 16
@d = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::map", align 8
  %8 = alloca %"class.std::map", align 8
  %9 = alloca %"class.std::map", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::map", align 8
  %20 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %21 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i32, align 4
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca %"struct.std::pair", align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca %"class.std::map", align 8
  %33 = alloca %"struct.std::pair", align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca %"class.std::map", align 8
  %41 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %42 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i64, align 8
  %46 = alloca i32, align 4
  %47 = alloca i64, align 8
  %48 = alloca i64, align 8
  %49 = alloca i64, align 8
  %50 = alloca %"struct.std::pair", align 8
  %51 = alloca i64, align 8
  %52 = alloca i64, align 8
  %53 = alloca i64, align 8
  %54 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %55 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %56 = alloca i64, align 8
  %57 = alloca i64, align 8
  %58 = alloca i64, align 8
  %59 = alloca %"struct.std::pair", align 8
  %60 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %114, %0
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = icmp slt i32 %62, 101
  br i1 %63, label %65, label %64

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

65:                                               ; preds = %61
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %80, label %71

71:                                               ; preds = %65
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %74
  store i32 %72, ptr %75, align 4, !tbaa !5
  %76 = load i32, ptr @tot, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr @tot, align 4, !tbaa !5
  %78 = sext i32 %76 to i64
  %79 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %78
  store i32 %72, ptr %79, align 4, !tbaa !5
  br label %80

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

81:                                               ; preds = %109, %80
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = mul nsw i32 %82, %86
  store i32 %87, ptr %5, align 4, !tbaa !5
  %88 = icmp slt i32 %87, 101
  br i1 %88, label %90, label %89

89:                                               ; preds = %81
  store i32 5, ptr %3, align 4
  br label %112

90:                                               ; preds = %81
  %91 = load i32, ptr %4, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %96
  store i32 %94, ptr %97, align 4, !tbaa !5
  %98 = load i32, ptr %2, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp eq i32 %101, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %90
  store i32 5, ptr %3, align 4
  br label %112

108:                                              ; preds = %90
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %4, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %4, align 4, !tbaa !5
  br label %81, !llvm.loop !9

112:                                              ; preds = %107, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %2, align 4, !tbaa !5
  br label %61, !llvm.loop !11

117:                                              ; preds = %64
  %118 = load i32, ptr @tot, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %119
  store i32 101, ptr %120, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  br label %121

121:                                              ; preds = %501, %117
  %122 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %6)
  %123 = icmp eq i32 %122, 1
  br i1 %123, label %124, label %508

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 1, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 1, ptr %12, align 8, !tbaa !12
  %125 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %126 unwind label %149

126:                                              ; preds = %124
  %127 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %128 = extractvalue { i64, i64 } %125, 0
  store i64 %128, ptr %127, align 8
  %129 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %130 = extractvalue { i64, i64 } %125, 1
  store i64 %130, ptr %129, align 8
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %132 unwind label %149

132:                                              ; preds = %126
  store i64 1, ptr %131, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 -1, ptr %16, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %272, %132
  %134 = load i32, ptr %15, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = load i32, ptr %15, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = mul nsw i64 %138, %143
  %145 = load i32, ptr %6, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = icmp sle i64 %144, %146
  br i1 %147, label %153, label %148

148:                                              ; preds = %133
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %276

149:                                              ; preds = %126, %124
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %13, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %507

153:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %154 = load i32, ptr %6, align 4, !tbaa !5
  %155 = load i32, ptr %15, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = sdiv i32 %154, %158
  store i32 %159, ptr %18, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %165, %153
  %161 = load i32, ptr %18, align 4, !tbaa !5
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %164, label %163

163:                                              ; preds = %160
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %175

164:                                              ; preds = %160
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %18, align 4, !tbaa !5
  %167 = load i32, ptr %17, align 4, !tbaa !5
  %168 = add nsw i32 %167, %166
  store i32 %168, ptr %17, align 4, !tbaa !5
  %169 = load i32, ptr %15, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = load i32, ptr %18, align 4, !tbaa !5
  %174 = sdiv i32 %173, %172
  store i32 %174, ptr %18, align 4, !tbaa !5
  br label %160, !llvm.loop !14

175:                                              ; preds = %163
  %176 = load i32, ptr %16, align 4, !tbaa !5
  %177 = load i32, ptr %17, align 4, !tbaa !5
  %178 = icmp ne i32 %176, %177
  br i1 %178, label %179, label %188

179:                                              ; preds = %175
  %180 = load i32, ptr %17, align 4, !tbaa !5
  %181 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %180)
          to label %182 unwind label %184

182:                                              ; preds = %179
  %183 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %183, ptr %16, align 4, !tbaa !5
  br label %188

184:                                              ; preds = %268, %188, %179
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %13, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %14, align 4
  br label %275

188:                                              ; preds = %182, %175
  %189 = load i32, ptr %15, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %192)
          to label %194 unwind label %184

194:                                              ; preds = %188
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #6
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %195 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  %196 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %20, i32 0, i32 0
  store ptr %195, ptr %196, align 8
  br label %197

197:                                              ; preds = %266, %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %198 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  %199 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %21, i32 0, i32 0
  store ptr %198, ptr %199, align 8
  %200 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br i1 %200, label %202, label %201

201:                                              ; preds = %197
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %268

202:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %203 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %204 = getelementptr inbounds %"struct.std::pair.0", ptr %203, i32 0, i32 0
  %205 = getelementptr inbounds %"struct.std::pair", ptr %204, i32 0, i32 0
  %206 = load i64, ptr %205, align 8, !tbaa !15
  store i64 %206, ptr %22, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %207 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %208 = getelementptr inbounds %"struct.std::pair.0", ptr %207, i32 0, i32 0
  %209 = getelementptr inbounds %"struct.std::pair", ptr %208, i32 0, i32 1
  %210 = load i64, ptr %209, align 8, !tbaa !18
  store i64 %210, ptr %23, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %211 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %212 = getelementptr inbounds %"struct.std::pair.0", ptr %211, i32 0, i32 1
  %213 = load i64, ptr %212, align 8, !tbaa !19
  store i64 %213, ptr %24, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %214

214:                                              ; preds = %253, %202
  %215 = load i32, ptr %25, align 4, !tbaa !5
  %216 = load i32, ptr %17, align 4, !tbaa !5
  %217 = icmp sle i32 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %214
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %265

219:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %220 = load i64, ptr %22, align 8, !tbaa !12
  %221 = load i32, ptr %25, align 4, !tbaa !5
  %222 = add nsw i32 %221, 1
  %223 = sext i32 %222 to i64
  %224 = mul nsw i64 %220, %223
  store i64 %224, ptr %26, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %225 = load i64, ptr %23, align 8, !tbaa !12
  %226 = load i32, ptr %17, align 4, !tbaa !5
  %227 = load i32, ptr %25, align 4, !tbaa !5
  %228 = sub nsw i32 %226, %227
  %229 = add nsw i32 %228, 1
  %230 = sext i32 %229 to i64
  %231 = mul nsw i64 %225, %230
  store i64 %231, ptr %27, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %232 = load i64, ptr %26, align 8, !tbaa !12
  %233 = load i64, ptr %27, align 8, !tbaa !12
  %234 = invoke noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef %232, i64 noundef %233)
          to label %235 unwind label %256

235:                                              ; preds = %219
  store i64 %234, ptr %28, align 8, !tbaa !12
  %236 = load i64, ptr %24, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %237 = load i64, ptr %26, align 8, !tbaa !12
  %238 = load i64, ptr %28, align 8, !tbaa !12
  %239 = sdiv i64 %237, %238
  store i64 %239, ptr %30, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %240 = load i64, ptr %27, align 8, !tbaa !12
  %241 = load i64, ptr %28, align 8, !tbaa !12
  %242 = sdiv i64 %240, %241
  store i64 %242, ptr %31, align 8, !tbaa !12
  %243 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %244 unwind label %260

244:                                              ; preds = %235
  %245 = getelementptr inbounds { i64, i64 }, ptr %29, i32 0, i32 0
  %246 = extractvalue { i64, i64 } %243, 0
  store i64 %246, ptr %245, align 8
  %247 = getelementptr inbounds { i64, i64 }, ptr %29, i32 0, i32 1
  %248 = extractvalue { i64, i64 } %243, 1
  store i64 %248, ptr %247, align 8
  %249 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %250 unwind label %260

250:                                              ; preds = %244
  %251 = load i64, ptr %249, align 8, !tbaa !12
  %252 = add nsw i64 %251, %236
  store i64 %252, ptr %249, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %253

253:                                              ; preds = %250
  %254 = load i32, ptr %25, align 4, !tbaa !5
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %25, align 4, !tbaa !5
  br label %214, !llvm.loop !20

256:                                              ; preds = %219
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %13, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %14, align 4
  br label %264

260:                                              ; preds = %244, %235
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %13, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  br label %264

264:                                              ; preds = %260, %256
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %275

265:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %266

266:                                              ; preds = %265
  %267 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  br label %197, !llvm.loop !21

268:                                              ; preds = %201
  %269 = call noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  %270 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %269)
          to label %271 unwind label %184

271:                                              ; preds = %268
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %272

272:                                              ; preds = %271
  %273 = load i32, ptr %15, align 4, !tbaa !5
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %15, align 4, !tbaa !5
  br label %133, !llvm.loop !22

275:                                              ; preds = %264, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %507

276:                                              ; preds = %148
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %32) #6
  call void @llvm.memset.p0.i64(ptr align 8 %32, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  store i64 1, ptr %34, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  store i64 1, ptr %35, align 8, !tbaa !12
  %277 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35)
          to label %278 unwind label %302

278:                                              ; preds = %276
  %279 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 0
  %280 = extractvalue { i64, i64 } %277, 0
  store i64 %280, ptr %279, align 8
  %281 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 1
  %282 = extractvalue { i64, i64 } %277, 1
  store i64 %282, ptr %281, align 8
  %283 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(16) %33)
          to label %284 unwind label %302

284:                                              ; preds = %278
  store i64 1, ptr %283, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  %285 = load i32, ptr @tot, align 4, !tbaa !5
  store i32 %285, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  store i32 -1, ptr %37, align 4, !tbaa !5
  br label %286

286:                                              ; preds = %433, %284
  %287 = load i32, ptr %36, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %288
  %290 = load i32, ptr %289, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = load i32, ptr %36, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %293
  %295 = load i32, ptr %294, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = mul nsw i64 %291, %296
  %298 = load i32, ptr %6, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = icmp sgt i64 %297, %299
  br i1 %300, label %306, label %301

301:                                              ; preds = %286
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %437

302:                                              ; preds = %278, %276
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %13, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  br label %507

306:                                              ; preds = %286
  %307 = load i32, ptr %6, align 4, !tbaa !5
  %308 = load i32, ptr %36, align 4, !tbaa !5
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !5
  %312 = icmp slt i32 %307, %311
  br i1 %312, label %313, label %314

313:                                              ; preds = %306
  br label %433

314:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  store i32 0, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  %315 = load i32, ptr %6, align 4, !tbaa !5
  %316 = load i32, ptr %36, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %317
  %319 = load i32, ptr %318, align 4, !tbaa !5
  %320 = sdiv i32 %315, %319
  store i32 %320, ptr %39, align 4, !tbaa !5
  br label %321

321:                                              ; preds = %326, %314
  %322 = load i32, ptr %39, align 4, !tbaa !5
  %323 = icmp ne i32 %322, 0
  br i1 %323, label %325, label %324

324:                                              ; preds = %321
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %336

325:                                              ; preds = %321
  br label %326

326:                                              ; preds = %325
  %327 = load i32, ptr %39, align 4, !tbaa !5
  %328 = load i32, ptr %38, align 4, !tbaa !5
  %329 = add nsw i32 %328, %327
  store i32 %329, ptr %38, align 4, !tbaa !5
  %330 = load i32, ptr %36, align 4, !tbaa !5
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %331
  %333 = load i32, ptr %332, align 4, !tbaa !5
  %334 = load i32, ptr %39, align 4, !tbaa !5
  %335 = sdiv i32 %334, %333
  store i32 %335, ptr %39, align 4, !tbaa !5
  br label %321, !llvm.loop !23

336:                                              ; preds = %324
  %337 = load i32, ptr %37, align 4, !tbaa !5
  %338 = load i32, ptr %38, align 4, !tbaa !5
  %339 = icmp ne i32 %337, %338
  br i1 %339, label %340, label %349

340:                                              ; preds = %336
  %341 = load i32, ptr %38, align 4, !tbaa !5
  %342 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %341)
          to label %343 unwind label %345

343:                                              ; preds = %340
  %344 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %344, ptr %37, align 4, !tbaa !5
  br label %349

345:                                              ; preds = %429, %349, %340
  %346 = landingpad { ptr, i32 }
          cleanup
  %347 = extractvalue { ptr, i32 } %346, 0
  store ptr %347, ptr %13, align 8
  %348 = extractvalue { ptr, i32 } %346, 1
  store i32 %348, ptr %14, align 4
  br label %436

349:                                              ; preds = %343, %336
  %350 = load i32, ptr %36, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %351
  %353 = load i32, ptr %352, align 4, !tbaa !5
  %354 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %353)
          to label %355 unwind label %345

355:                                              ; preds = %349
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %40) #6
  call void @llvm.memset.p0.i64(ptr align 8 %40, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %40) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %40, ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %40) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %40) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  %356 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  %357 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %41, i32 0, i32 0
  store ptr %356, ptr %357, align 8
  br label %358

358:                                              ; preds = %427, %355
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #6
  %359 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  %360 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %42, i32 0, i32 0
  store ptr %359, ptr %360, align 8
  %361 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  br i1 %361, label %363, label %362

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

363:                                              ; preds = %358
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #6
  %364 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #6
  %365 = getelementptr inbounds %"struct.std::pair.0", ptr %364, i32 0, i32 0
  %366 = getelementptr inbounds %"struct.std::pair", ptr %365, i32 0, i32 0
  %367 = load i64, ptr %366, align 8, !tbaa !15
  store i64 %367, ptr %43, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  %368 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #6
  %369 = getelementptr inbounds %"struct.std::pair.0", ptr %368, i32 0, i32 0
  %370 = getelementptr inbounds %"struct.std::pair", ptr %369, i32 0, i32 1
  %371 = load i64, ptr %370, align 8, !tbaa !18
  store i64 %371, ptr %44, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  %372 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #6
  %373 = getelementptr inbounds %"struct.std::pair.0", ptr %372, i32 0, i32 1
  %374 = load i64, ptr %373, align 8, !tbaa !19
  store i64 %374, ptr %45, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #6
  store i32 0, ptr %46, align 4, !tbaa !5
  br label %375

375:                                              ; preds = %414, %363
  %376 = load i32, ptr %46, align 4, !tbaa !5
  %377 = load i32, ptr %38, align 4, !tbaa !5
  %378 = icmp sle i32 %376, %377
  br i1 %378, label %380, label %379

379:                                              ; preds = %375
  store i32 31, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #6
  br label %426

380:                                              ; preds = %375
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #6
  %381 = load i64, ptr %43, align 8, !tbaa !12
  %382 = load i32, ptr %46, align 4, !tbaa !5
  %383 = add nsw i32 %382, 1
  %384 = sext i32 %383 to i64
  %385 = mul nsw i64 %381, %384
  store i64 %385, ptr %47, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #6
  %386 = load i64, ptr %44, align 8, !tbaa !12
  %387 = load i32, ptr %38, align 4, !tbaa !5
  %388 = load i32, ptr %46, align 4, !tbaa !5
  %389 = sub nsw i32 %387, %388
  %390 = add nsw i32 %389, 1
  %391 = sext i32 %390 to i64
  %392 = mul nsw i64 %386, %391
  store i64 %392, ptr %48, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #6
  %393 = load i64, ptr %47, align 8, !tbaa !12
  %394 = load i64, ptr %48, align 8, !tbaa !12
  %395 = invoke noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef %393, i64 noundef %394)
          to label %396 unwind label %417

396:                                              ; preds = %380
  store i64 %395, ptr %49, align 8, !tbaa !12
  %397 = load i64, ptr %45, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #6
  %398 = load i64, ptr %47, align 8, !tbaa !12
  %399 = load i64, ptr %49, align 8, !tbaa !12
  %400 = sdiv i64 %398, %399
  store i64 %400, ptr %51, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #6
  %401 = load i64, ptr %48, align 8, !tbaa !12
  %402 = load i64, ptr %49, align 8, !tbaa !12
  %403 = sdiv i64 %401, %402
  store i64 %403, ptr %52, align 8, !tbaa !12
  %404 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull align 8 dereferenceable(8) %52)
          to label %405 unwind label %421

405:                                              ; preds = %396
  %406 = getelementptr inbounds { i64, i64 }, ptr %50, i32 0, i32 0
  %407 = extractvalue { i64, i64 } %404, 0
  store i64 %407, ptr %406, align 8
  %408 = getelementptr inbounds { i64, i64 }, ptr %50, i32 0, i32 1
  %409 = extractvalue { i64, i64 } %404, 1
  store i64 %409, ptr %408, align 8
  %410 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(16) %50)
          to label %411 unwind label %421

411:                                              ; preds = %405
  %412 = load i64, ptr %410, align 8, !tbaa !12
  %413 = add nsw i64 %412, %397
  store i64 %413, ptr %410, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  br label %414

414:                                              ; preds = %411
  %415 = load i32, ptr %46, align 4, !tbaa !5
  %416 = add nsw i32 %415, 1
  store i32 %416, ptr %46, align 4, !tbaa !5
  br label %375, !llvm.loop !24

417:                                              ; preds = %380
  %418 = landingpad { ptr, i32 }
          cleanup
  %419 = extractvalue { ptr, i32 } %418, 0
  store ptr %419, ptr %13, align 8
  %420 = extractvalue { ptr, i32 } %418, 1
  store i32 %420, ptr %14, align 4
  br label %425

421:                                              ; preds = %405, %396
  %422 = landingpad { ptr, i32 }
          cleanup
  %423 = extractvalue { ptr, i32 } %422, 0
  store ptr %423, ptr %13, align 8
  %424 = extractvalue { ptr, i32 } %422, 1
  store i32 %424, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #6
  br label %425

425:                                              ; preds = %421, %417
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  br label %436

426:                                              ; preds = %379
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  br label %427

427:                                              ; preds = %426
  %428 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #6
  br label %358, !llvm.loop !25

429:                                              ; preds = %362
  %430 = call noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  %431 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %430)
          to label %432 unwind label %345

432:                                              ; preds = %429
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  br label %433

433:                                              ; preds = %432, %313
  %434 = load i32, ptr %36, align 4, !tbaa !5
  %435 = add nsw i32 %434, -1
  store i32 %435, ptr %36, align 4, !tbaa !5
  br label %286, !llvm.loop !26

436:                                              ; preds = %425, %345
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %507

437:                                              ; preds = %301
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #6
  store i64 0, ptr %53, align 8, !tbaa !12
  %438 = call noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  %439 = call noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  %440 = icmp ult i64 %438, %439
  br i1 %440, label %441, label %442

441:                                              ; preds = %437
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  br label %442

442:                                              ; preds = %441, %437
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #6
  %443 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  %444 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %54, i32 0, i32 0
  store ptr %443, ptr %444, align 8
  br label %445

445:                                              ; preds = %494, %442
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #6
  %446 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  %447 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %55, i32 0, i32 0
  store ptr %446, ptr %447, align 8
  %448 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 8 dereferenceable(8) %55) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #6
  br i1 %448, label %450, label %449

449:                                              ; preds = %445
  store i32 34, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #6
  br label %497

450:                                              ; preds = %445
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #6
  %451 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %54) #6
  %452 = getelementptr inbounds %"struct.std::pair.0", ptr %451, i32 0, i32 0
  %453 = getelementptr inbounds %"struct.std::pair", ptr %452, i32 0, i32 0
  %454 = load i64, ptr %453, align 8, !tbaa !15
  store i64 %454, ptr %56, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #6
  %455 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %54) #6
  %456 = getelementptr inbounds %"struct.std::pair.0", ptr %455, i32 0, i32 0
  %457 = getelementptr inbounds %"struct.std::pair", ptr %456, i32 0, i32 1
  %458 = load i64, ptr %457, align 8, !tbaa !18
  store i64 %458, ptr %57, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #6
  %459 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %54) #6
  %460 = getelementptr inbounds %"struct.std::pair.0", ptr %459, i32 0, i32 1
  %461 = load i64, ptr %460, align 8, !tbaa !19
  store i64 %461, ptr %58, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %59) #6
  %462 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %56)
          to label %463 unwind label %485

463:                                              ; preds = %450
  %464 = getelementptr inbounds { i64, i64 }, ptr %59, i32 0, i32 0
  %465 = extractvalue { i64, i64 } %462, 0
  store i64 %465, ptr %464, align 8
  %466 = getelementptr inbounds { i64, i64 }, ptr %59, i32 0, i32 1
  %467 = extractvalue { i64, i64 } %462, 1
  store i64 %467, ptr %466, align 8
  %468 = invoke noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(16) %59)
          to label %469 unwind label %485

469:                                              ; preds = %463
  %470 = icmp ne i64 %468, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #6
  br i1 %470, label %471, label %493

471:                                              ; preds = %469
  call void @llvm.lifetime.start.p0(i64 16, ptr %60) #6
  %472 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %56)
          to label %473 unwind label %489

473:                                              ; preds = %471
  %474 = getelementptr inbounds { i64, i64 }, ptr %60, i32 0, i32 0
  %475 = extractvalue { i64, i64 } %472, 0
  store i64 %475, ptr %474, align 8
  %476 = getelementptr inbounds { i64, i64 }, ptr %60, i32 0, i32 1
  %477 = extractvalue { i64, i64 } %472, 1
  store i64 %477, ptr %476, align 8
  %478 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(16) %60)
          to label %479 unwind label %489

479:                                              ; preds = %473
  %480 = load i64, ptr %478, align 8, !tbaa !12
  %481 = load i64, ptr %58, align 8, !tbaa !12
  %482 = mul nsw i64 %480, %481
  %483 = load i64, ptr %53, align 8, !tbaa !12
  %484 = add nsw i64 %483, %482
  store i64 %484, ptr %53, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %60) #6
  br label %493

485:                                              ; preds = %463, %450
  %486 = landingpad { ptr, i32 }
          cleanup
  %487 = extractvalue { ptr, i32 } %486, 0
  store ptr %487, ptr %13, align 8
  %488 = extractvalue { ptr, i32 } %486, 1
  store i32 %488, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #6
  br label %496

489:                                              ; preds = %473, %471
  %490 = landingpad { ptr, i32 }
          cleanup
  %491 = extractvalue { ptr, i32 } %490, 0
  store ptr %491, ptr %13, align 8
  %492 = extractvalue { ptr, i32 } %490, 1
  store i32 %492, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %60) #6
  br label %496

493:                                              ; preds = %479, %469
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #6
  br label %494

494:                                              ; preds = %493
  %495 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %54) #6
  br label %445, !llvm.loop !27

496:                                              ; preds = %489, %485
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #6
  br label %506

497:                                              ; preds = %449
  %498 = load i64, ptr %53, align 8, !tbaa !12
  %499 = ashr i64 %498, 1
  %500 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %499)
          to label %501 unwind label %502

501:                                              ; preds = %497
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #6
  br label %121, !llvm.loop !28

502:                                              ; preds = %497
  %503 = landingpad { ptr, i32 }
          cleanup
  %504 = extractvalue { ptr, i32 } %503, 0
  store ptr %504, ptr %13, align 8
  %505 = extractvalue { ptr, i32 } %503, 1
  store i32 %505, ptr %14, align 4
  br label %506

506:                                              ; preds = %502, %496
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #6
  br label %507

507:                                              ; preds = %506, %436, %302, %275, %149
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %510

508:                                              ; preds = %121
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %509 = load i32, ptr %1, align 4
  ret i32 %509

510:                                              ; preds = %507
  %511 = load ptr, ptr %13, align 8
  %512 = load i32, ptr %14, align 4
  %513 = insertvalue { ptr, i32 } poison, ptr %511, 0
  %514 = insertvalue { ptr, i32 } %513, i32 %512, 1
  resume { ptr, i32 } %514
}

; 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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef, i64 noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = !{!16, !13, i64 0}
!16 = !{!"_ZTSSt4pairIKS_IxxExE", !17, i64 0, !13, i64 16}
!17 = !{!"_ZTSSt4pairIxxE", !13, i64 0, !13, i64 8}
!18 = !{!16, !13, i64 8}
!19 = !{!16, !13, i64 16}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<const std::pair<long long, long long>, long long>, std::_Select1st<std::pair<const std::pair<long long, long long>, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<const std::pair<long long, long long>, long long>, std::_Select1st<std::pair<const std::pair<long long, long long>, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@tot = external dso_local local_unnamed_addr global i32, align 4
@pr = external dso_local local_unnamed_addr global [101 x i32], align 16
@d = external dso_local local_unnamed_addr global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::map", align 8
  %3 = alloca %"class.std::map", align 8
  %4 = alloca %"class.std::map", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::map", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::map", align 8
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.std::map", align 8
  %19 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %21 = alloca %"struct.std::pair", align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca %"struct.std::pair", align 8
  %29 = alloca %"struct.std::pair", align 8
  %tot.promoted = load i32, ptr @tot, align 4, !tbaa !5
  br label %41

30:                                               ; preds = %._crit_edge
  %31 = sext i32 %50 to i64
  %32 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %31
  store i32 101, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %.lr.ph146, label %._crit_edge147

.lr.ph146:                                        ; preds = %30
  %35 = getelementptr inbounds i8, ptr %5, i64 8
  %36 = getelementptr inbounds i8, ptr %11, i64 8
  %37 = getelementptr inbounds i8, ptr %15, i64 8
  %38 = getelementptr inbounds i8, ptr %21, i64 8
  %39 = getelementptr inbounds i8, ptr %28, i64 8
  %40 = getelementptr inbounds i8, ptr %29, i64 8
  br label %65

41:                                               ; preds = %0, %._crit_edge
  %indvars.iv151 = phi i64 [ 2, %0 ], [ %indvars.iv.next152, %._crit_edge ]
  %42 = phi i32 [ %tot.promoted, %0 ], [ %50, %._crit_edge ]
  %43 = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %indvars.iv151
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %.not107 = icmp eq i32 %44, 0
  %45 = trunc nuw nsw i64 %indvars.iv151 to i32
  br i1 %.not107, label %46, label %._crit_edge171

46:                                               ; preds = %41
  store i32 %45, ptr %43, align 4, !tbaa !5
  %47 = add nsw i32 %42, 1
  store i32 %47, ptr @tot, align 4, !tbaa !5
  %48 = sext i32 %42 to i64
  %49 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %48
  store i32 %45, ptr %49, align 4, !tbaa !5
  br label %._crit_edge171

._crit_edge171:                                   ; preds = %41, %46
  %50 = phi i32 [ %47, %46 ], [ %42, %41 ]
  %51 = load i32, ptr @pr, align 16, !tbaa !5
  %52 = mul nsw i32 %51, %45
  %53 = icmp slt i32 %52, 101
  br i1 %53, label %.lr.ph, label %._crit_edge

54:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %indvars.iv.next
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = mul nsw i32 %56, %45
  %58 = icmp slt i32 %57, 101
  br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph:                                           ; preds = %._crit_edge171, %54
  %indvars.iv = phi i64 [ %indvars.iv.next, %54 ], [ 0, %._crit_edge171 ]
  %59 = phi i32 [ %57, %54 ], [ %52, %._crit_edge171 ]
  %60 = phi i32 [ %56, %54 ], [ %51, %._crit_edge171 ]
  %61 = sext i32 %59 to i64
  %62 = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %61
  store i32 %60, ptr %62, align 4, !tbaa !5
  %63 = load i32, ptr %43, align 4, !tbaa !5
  %64 = icmp eq i32 %63, %60
  br i1 %64, label %._crit_edge, label %54

._crit_edge:                                      ; preds = %54, %.lr.ph, %._crit_edge171
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next152, 101
  br i1 %exitcond.not, label %30, label %41, !llvm.loop !11

65:                                               ; preds = %.lr.ph146, %._crit_edge144
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store i64 1, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store i64 1, ptr %7, align 8, !tbaa !12
  %66 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %67 unwind label %81

67:                                               ; preds = %65
  %68 = extractvalue { i64, i64 } %66, 0
  store i64 %68, ptr %5, align 8
  %69 = extractvalue { i64, i64 } %66, 1
  store i64 %69, ptr %35, align 8
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %71 unwind label %81

71:                                               ; preds = %67
  store i64 1, ptr %70, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %72 = load i32, ptr @pr, align 16, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = mul nsw i64 %73, %73
  %75 = load i32, ptr %1, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %.not124 = icmp sgt i64 %74, %76
  br i1 %.not124, label %._crit_edge127, label %.preheader110

.preheader110:                                    ; preds = %71, %._crit_edge123
  %indvars.iv158 = phi i64 [ %indvars.iv.next159, %._crit_edge123 ], [ 0, %71 ]
  %77 = phi i32 [ %107, %._crit_edge123 ], [ %75, %71 ]
  %78 = phi i32 [ %104, %._crit_edge123 ], [ %72, %71 ]
  %79 = phi ptr [ %103, %._crit_edge123 ], [ @pr, %71 ]
  %.089125 = phi i32 [ %.190, %._crit_edge123 ], [ -1, %71 ]
  br label %83

._crit_edge127:                                   ; preds = %._crit_edge123, %71
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %14) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %14, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  store i64 1, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  store i64 1, ptr %17, align 8, !tbaa !12
  %80 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %139 unwind label %156

81:                                               ; preds = %67, %65
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %261

83:                                               ; preds = %83, %.preheader110
  %.pn108 = phi i32 [ %.092, %83 ], [ %77, %.preheader110 ]
  %.091 = phi i32 [ %84, %83 ], [ 0, %.preheader110 ]
  %.091.fr = freeze i32 %.091
  %.092 = sdiv i32 %.pn108, %78
  %.not102 = icmp eq i32 %.092, 0
  %84 = add nsw i32 %.092, %.091.fr
  br i1 %.not102, label %85, label %83, !llvm.loop !14

85:                                               ; preds = %83
  %.not103 = icmp eq i32 %.089125, %.091.fr
  br i1 %.not103, label %88, label %86

86:                                               ; preds = %85
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.091.fr)
  %.pre = load i32, ptr %79, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %86, %85
  %89 = phi i32 [ %.pre, %86 ], [ %78, %85 ]
  %.190 = phi i32 [ %.091.fr, %86 ], [ %.089125, %85 ]
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %89)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %8, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %91 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  store ptr %91, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %92 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  store ptr %92, ptr %10, align 8
  %93 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(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 nonnull %10) #6
  br i1 %93, label %.lr.ph122, label %._crit_edge123

.lr.ph122:                                        ; preds = %88
  %.not104116 = icmp slt i32 %.091.fr, 0
  %94 = add i32 %.091.fr, 1
  br i1 %.not104116, label %.lr.ph122.split.us, label %.lr.ph119.preheader

.lr.ph119.preheader:                              ; preds = %.lr.ph122
  %wide.trip.count = zext i32 %94 to i64
  br label %.lr.ph119

.lr.ph122.split.us:                               ; preds = %.lr.ph122, %.lr.ph122.split.us
  %95 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %96 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %97 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %99 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  store ptr %99, ptr %10, align 8
  %100 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(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 nonnull %10) #6
  br i1 %100, label %.lr.ph122.split.us, label %._crit_edge123, !llvm.loop !15

._crit_edge123:                                   ; preds = %._crit_edge120, %.lr.ph122.split.us, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %101 = call noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %101)
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %103 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %indvars.iv.next159
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = mul nsw i64 %105, %105
  %107 = load i32, ptr %1, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %.not = icmp sgt i64 %106, %108
  br i1 %.not, label %._crit_edge127, label %.preheader110, !llvm.loop !16

.lr.ph119:                                        ; preds = %.lr.ph119.preheader, %._crit_edge120
  %109 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %110 = load i64, ptr %109, align 8, !tbaa !17
  %111 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %112 = getelementptr inbounds i8, ptr %111, i64 8
  %113 = load i64, ptr %112, align 8, !tbaa !20
  %114 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %115 = getelementptr inbounds i8, ptr %114, i64 16
  %116 = load i64, ptr %115, align 8, !tbaa !21
  br label %120

._crit_edge120:                                   ; preds = %134
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %118 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  store ptr %118, ptr %10, align 8
  %119 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(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 nonnull %10) #6
  br i1 %119, label %.lr.ph119, label %._crit_edge123, !llvm.loop !15

120:                                              ; preds = %.lr.ph119, %134
  %indvars.iv154 = phi i64 [ 0, %.lr.ph119 ], [ %indvars.iv.next155, %134 ]
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %121 = mul nsw i64 %110, %indvars.iv.next155
  %122 = trunc nuw nsw i64 %indvars.iv154 to i32
  %123 = sub i32 %94, %122
  %124 = sext i32 %123 to i64
  %125 = mul nsw i64 %113, %124
  %126 = call noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef %121, i64 noundef %125)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %127 = sdiv i64 %121, %126
  store i64 %127, ptr %12, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %128 = sdiv i64 %125, %126
  store i64 %128, ptr %13, align 8, !tbaa !12
  %129 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %130 unwind label %137

130:                                              ; preds = %120
  %131 = extractvalue { i64, i64 } %129, 0
  store i64 %131, ptr %11, align 8
  %132 = extractvalue { i64, i64 } %129, 1
  store i64 %132, ptr %36, align 8
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %134 unwind label %137

134:                                              ; preds = %130
  %135 = load i64, ptr %133, align 8, !tbaa !12
  %136 = add nsw i64 %135, %116
  store i64 %136, ptr %133, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  %exitcond157.not = icmp eq i64 %indvars.iv.next155, %wide.trip.count
  br i1 %exitcond157.not, label %._crit_edge120, label %120, !llvm.loop !22

137:                                              ; preds = %130, %120
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %261

139:                                              ; preds = %._crit_edge127
  %140 = extractvalue { i64, i64 } %80, 0
  store i64 %140, ptr %15, align 8
  %141 = extractvalue { i64, i64 } %80, 1
  store i64 %141, ptr %37, align 8
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %143 unwind label %156

143:                                              ; preds = %139
  store i64 1, ptr %142, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  %144 = load i32, ptr @tot, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = mul nsw i64 %148, %148
  %150 = load i32, ptr %1, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = icmp sgt i64 %149, %151
  br i1 %152, label %.lr.ph139, label %._crit_edge140

._crit_edge140:                                   ; preds = %211, %143
  %153 = call noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  %154 = call noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  %155 = icmp ult i64 %153, %154
  br i1 %155, label %219, label %220

156:                                              ; preds = %139, %._crit_edge127
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  br label %261

.lr.ph139:                                        ; preds = %143, %211
  %158 = phi i32 [ %212, %211 ], [ %150, %143 ]
  %indvars.iv166 = phi i64 [ %indvars.iv.next167, %211 ], [ %145, %143 ]
  %159 = phi i32 [ %214, %211 ], [ %147, %143 ]
  %160 = phi ptr [ %213, %211 ], [ %146, %143 ]
  %.086137 = phi i32 [ %.2, %211 ], [ -1, %143 ]
  %161 = icmp slt i32 %158, %159
  br i1 %161, label %211, label %.preheader

.preheader:                                       ; preds = %.lr.ph139, %.preheader
  %.085 = phi i32 [ %162, %.preheader ], [ 0, %.lr.ph139 ]
  %.pn109 = phi i32 [ %.084, %.preheader ], [ %158, %.lr.ph139 ]
  %.085.fr = freeze i32 %.085
  %.084 = sdiv i32 %.pn109, %159
  %.not99 = icmp eq i32 %.084, 0
  %162 = add nsw i32 %.084, %.085.fr
  br i1 %.not99, label %163, label %.preheader, !llvm.loop !23

163:                                              ; preds = %.preheader
  %.not100 = icmp eq i32 %.086137, %.085.fr
  br i1 %.not100, label %166, label %164

164:                                              ; preds = %163
  %165 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.085.fr)
  %.pre169 = load i32, ptr %160, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %164, %163
  %167 = phi i32 [ %.pre169, %164 ], [ %159, %163 ]
  %.187 = phi i32 [ %.085.fr, %164 ], [ %.086137, %163 ]
  %168 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %167)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %18) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %18, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %18, ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %169 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  store ptr %169, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %170 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  store ptr %170, ptr %20, align 8
  %171 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br i1 %171, label %.lr.ph134, label %._crit_edge135

.lr.ph134:                                        ; preds = %166
  %.not101128 = icmp slt i32 %.085.fr, 0
  %172 = add i32 %.085.fr, 1
  br i1 %.not101128, label %.lr.ph134.split.us, label %.lr.ph131.preheader

.lr.ph131.preheader:                              ; preds = %.lr.ph134
  %wide.trip.count164 = zext i32 %172 to i64
  br label %.lr.ph131

.lr.ph134.split.us:                               ; preds = %.lr.ph134, %.lr.ph134.split.us
  %173 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %174 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %175 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %177 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  store ptr %177, ptr %20, align 8
  %178 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br i1 %178, label %.lr.ph134.split.us, label %._crit_edge135, !llvm.loop !24

._crit_edge135:                                   ; preds = %._crit_edge132, %.lr.ph134.split.us, %166
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  %179 = call noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  %180 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %179)
  %.pre170 = load i32, ptr %1, align 4, !tbaa !5
  br label %211

.lr.ph131:                                        ; preds = %.lr.ph131.preheader, %._crit_edge132
  %181 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %182 = load i64, ptr %181, align 8, !tbaa !17
  %183 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %184 = getelementptr inbounds i8, ptr %183, i64 8
  %185 = load i64, ptr %184, align 8, !tbaa !20
  %186 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %187 = getelementptr inbounds i8, ptr %186, i64 16
  %188 = load i64, ptr %187, align 8, !tbaa !21
  br label %192

._crit_edge132:                                   ; preds = %206
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %190 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  store ptr %190, ptr %20, align 8
  %191 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br i1 %191, label %.lr.ph131, label %._crit_edge135, !llvm.loop !24

192:                                              ; preds = %.lr.ph131, %206
  %indvars.iv161 = phi i64 [ 0, %.lr.ph131 ], [ %indvars.iv.next162, %206 ]
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %193 = mul nsw i64 %182, %indvars.iv.next162
  %194 = trunc nuw nsw i64 %indvars.iv161 to i32
  %195 = sub i32 %172, %194
  %196 = sext i32 %195 to i64
  %197 = mul nsw i64 %185, %196
  %198 = call noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef %193, i64 noundef %197)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #6
  %199 = sdiv i64 %193, %198
  store i64 %199, ptr %22, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  %200 = sdiv i64 %197, %198
  store i64 %200, ptr %23, align 8, !tbaa !12
  %201 = invoke { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %202 unwind label %209

202:                                              ; preds = %192
  %203 = extractvalue { i64, i64 } %201, 0
  store i64 %203, ptr %21, align 8
  %204 = extractvalue { i64, i64 } %201, 1
  store i64 %204, ptr %38, align 8
  %205 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %206 unwind label %209

206:                                              ; preds = %202
  %207 = load i64, ptr %205, align 8, !tbaa !12
  %208 = add nsw i64 %207, %188
  store i64 %208, ptr %205, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  %exitcond165.not = icmp eq i64 %indvars.iv.next162, %wide.trip.count164
  br i1 %exitcond165.not, label %._crit_edge132, label %192, !llvm.loop !25

209:                                              ; preds = %202, %192
  %210 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br label %261

211:                                              ; preds = %.lr.ph139, %._crit_edge135
  %212 = phi i32 [ %158, %.lr.ph139 ], [ %.pre170, %._crit_edge135 ]
  %.2 = phi i32 [ %.086137, %.lr.ph139 ], [ %.187, %._crit_edge135 ]
  %indvars.iv.next167 = add nsw i64 %indvars.iv166, -1
  %213 = getelementptr inbounds [101 x i32], ptr @pr, i64 0, i64 %indvars.iv.next167
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = mul nsw i64 %215, %215
  %217 = sext i32 %212 to i64
  %218 = icmp sgt i64 %216, %217
  br i1 %218, label %.lr.ph139, label %._crit_edge140, !llvm.loop !26

219:                                              ; preds = %._crit_edge140
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE4swapERS7_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  br label %220

220:                                              ; preds = %219, %._crit_edge140
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #6
  %221 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %221, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #6
  %222 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %222, ptr %25, align 8
  %223 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #6
  br i1 %223, label %.lr.ph143, label %._crit_edge144

._crit_edge144:                                   ; preds = %256, %220
  %.0.lcssa = phi i64 [ 0, %220 ], [ %.1, %256 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #6
  %224 = ashr i64 %.0.lcssa, 1
  %225 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %224)
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  %226 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %227 = icmp eq i32 %226, 1
  br i1 %227, label %65, label %._crit_edge147, !llvm.loop !27

.lr.ph143:                                        ; preds = %220, %256
  %.0141 = phi i64 [ %.1, %256 ], [ 0, %220 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #6
  %228 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  %229 = load i64, ptr %228, align 8, !tbaa !17
  store i64 %229, ptr %26, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #6
  %230 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  %231 = getelementptr inbounds i8, ptr %230, i64 8
  %232 = load i64, ptr %231, align 8, !tbaa !20
  store i64 %232, ptr %27, align 8, !tbaa !12
  %233 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  %234 = getelementptr inbounds i8, ptr %233, i64 16
  %235 = load i64, ptr %234, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #6
  %236 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %237 unwind label %252

237:                                              ; preds = %.lr.ph143
  %238 = extractvalue { i64, i64 } %236, 0
  store i64 %238, ptr %28, align 8
  %239 = extractvalue { i64, i64 } %236, 1
  store i64 %239, ptr %39, align 8
  %240 = invoke noundef i64 @_ZNKSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %241 unwind label %252

241:                                              ; preds = %237
  %.not97 = icmp eq i64 %240, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #6
  br i1 %.not97, label %256, label %242

242:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) #6
  %243 = invoke { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %244 unwind label %254

244:                                              ; preds = %242
  %245 = extractvalue { i64, i64 } %243, 0
  store i64 %245, ptr %29, align 8
  %246 = extractvalue { i64, i64 } %243, 1
  store i64 %246, ptr %40, align 8
  %247 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %248 unwind label %254

248:                                              ; preds = %244
  %249 = load i64, ptr %247, align 8, !tbaa !12
  %250 = mul nsw i64 %249, %235
  %251 = add nsw i64 %250, %.0141
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #6
  br label %256

252:                                              ; preds = %237, %.lr.ph143
  %253 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #6
  br label %260

254:                                              ; preds = %244, %242
  %255 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #6
  br label %260

256:                                              ; preds = %248, %241
  %.1 = phi i64 [ %251, %248 ], [ %.0141, %241 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #6
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #6
  %258 = call ptr @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %258, ptr %25, align 8
  %259 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IxxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #6
  br i1 %259, label %.lr.ph143, label %._crit_edge144, !llvm.loop !28

260:                                              ; preds = %254, %252
  %.pn = phi { ptr, i32 } [ %255, %254 ], [ %253, %252 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #6
  br label %261

261:                                              ; preds = %260, %209, %156, %137, %81
  %.pn105 = phi { ptr, i32 } [ %138, %137 ], [ %210, %209 ], [ %.pn, %260 ], [ %157, %156 ], [ %82, %81 ]
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @_ZNSt3mapISt4pairIxxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn105

._crit_edge147:                                   ; preds = %._crit_edge144, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt5__gcdIxET_S0_S0_(i64 noundef, i64 noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!18, !13, i64 0}
!18 = !{!"_ZTSSt4pairIKS_IxxExE", !19, i64 0, !13, i64 16}
!19 = !{!"_ZTSSt4pairIxxE", !13, i64 0, !13, i64 8}
!20 = !{!18, !13, i64 8}
!21 = !{!18, !13, i64 16}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}


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