; LLVM IR from tangjz/acm-icpc :: TDL_training/2016-05-22 (E - Next Partition in RLE Notation - tjz)

; 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"

%"struct.std::pair" = type { i64, i64 }
%"struct.std::pair.0" = type <{ i64, i32, [4 x i8] }>
%"struct.std::pair.2" = type { i32, i64 }

@tot = external dso_local global i32, align 4
@a = external dso_local global [100010 x %"struct.std::pair"], align 16
@b = external dso_local global [100010 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::pair.0", align 8
  %12 = alloca i32, align 4
  %13 = alloca { i64, i32 }, align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.std::pair.0", align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca { i64, i32 }, align 8
  %19 = alloca %"struct.std::pair.2", align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @tot)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %23

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

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %41

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %30
  %32 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 1
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %34
  %36 = getelementptr inbounds %"struct.std::pair", ptr %35, i32 0, i32 0
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %32, ptr noundef %36)
  br label %38

38:                                               ; preds = %28
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %2, align 4, !tbaa !5
  br label %23, !llvm.loop !9

41:                                               ; preds = %27
  %42 = load i32, ptr @tot, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds %"struct.std::pair", ptr @a, i64 %43
  call void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef @a, ptr noundef %44)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 0, ptr %3, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %235, %41
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = load i32, ptr @tot, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 5, ptr %6, align 4
  br label %238

50:                                               ; preds = %45
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %53, label %214

53:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %54 = load i64, ptr %3, align 8, !tbaa !11
  %55 = add nsw i64 %54, 1
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %57
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 0
  %60 = load i64, ptr %59, align 16, !tbaa !13
  %61 = sub nsw i64 %60, 1
  %62 = sdiv i64 %55, %61
  %63 = load i64, ptr %3, align 8, !tbaa !11
  %64 = add nsw i64 %63, 1
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %66
  %68 = getelementptr inbounds %"struct.std::pair", ptr %67, i32 0, i32 0
  %69 = load i64, ptr %68, align 16, !tbaa !13
  %70 = sub nsw i64 %69, 1
  %71 = srem i64 %64, %70
  %72 = icmp sgt i64 %71, 0
  %73 = zext i1 %72 to i64
  %74 = add nsw i64 %62, %73
  store i64 %74, ptr %7, align 8, !tbaa !11
  %75 = load i64, ptr %4, align 8, !tbaa !11
  %76 = load i64, ptr %7, align 8, !tbaa !11
  %77 = icmp sge i64 %75, %76
  br i1 %77, label %78, label %210

78:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %79 = load i32, ptr @tot, align 4, !tbaa !5
  %80 = sub nsw i32 %79, 1
  store i32 %80, ptr %9, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %95, %78
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = icmp sge i32 %82, %83
  br i1 %84, label %86, label %85

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

86:                                               ; preds = %81
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %88
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %8, align 4, !tbaa !5
  %92 = sext i32 %90 to i64
  %93 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %92
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %93, ptr noundef nonnull align 8 dereferenceable(16) %89)
  br label %95

95:                                               ; preds = %86
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = add nsw i32 %96, -1
  store i32 %97, ptr %9, align 4, !tbaa !5
  br label %81, !llvm.loop !15

98:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = sub nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %101
  %103 = getelementptr inbounds %"struct.std::pair", ptr %102, i32 0, i32 0
  %104 = load i64, ptr %103, align 16, !tbaa !13
  %105 = sub nsw i64 %104, 1
  store i64 %105, ptr %10, align 8, !tbaa !11
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %108
  %110 = getelementptr inbounds %"struct.std::pair", ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !16
  %112 = add nsw i64 %111, -1
  store i64 %112, ptr %110, align 8, !tbaa !16
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %117, label %114

114:                                              ; preds = %98
  %115 = load i32, ptr %8, align 4, !tbaa !5
  %116 = add nsw i32 %115, -1
  store i32 %116, ptr %8, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %114, %98
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !5
  %118 = call { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store { i64, i32 } %118, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %13, i64 12, i1 false)
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %8, align 4, !tbaa !5
  %121 = sext i32 %119 to i64
  %122 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %121
  %123 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSIxiEENSt9enable_ifIXsr6__and_ISt13is_assignableIRxOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16) %122, ptr noundef nonnull align 8 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  %124 = load i64, ptr %3, align 8, !tbaa !11
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %3, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %126 = load i64, ptr %3, align 8, !tbaa !11
  %127 = load i64, ptr %4, align 8, !tbaa !11
  %128 = sub nsw i64 %126, %127
  %129 = load i64, ptr %10, align 8, !tbaa !11
  %130 = sub nsw i64 %129, 1
  %131 = sdiv i64 %128, %130
  store i64 %131, ptr %14, align 8, !tbaa !11
  %132 = load i64, ptr %14, align 8, !tbaa !11
  %133 = load i32, ptr %8, align 4, !tbaa !5
  %134 = sub nsw i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %135
  %137 = getelementptr inbounds %"struct.std::pair", ptr %136, i32 0, i32 1
  %138 = load i64, ptr %137, align 8, !tbaa !16
  %139 = add nsw i64 %138, %132
  store i64 %139, ptr %137, align 8, !tbaa !16
  %140 = load i64, ptr %14, align 8, !tbaa !11
  %141 = load i64, ptr %10, align 8, !tbaa !11
  %142 = mul nsw i64 %140, %141
  %143 = load i64, ptr %3, align 8, !tbaa !11
  %144 = sub nsw i64 %143, %142
  store i64 %144, ptr %3, align 8, !tbaa !11
  %145 = load i64, ptr %14, align 8, !tbaa !11
  %146 = load i64, ptr %4, align 8, !tbaa !11
  %147 = sub nsw i64 %146, %145
  store i64 %147, ptr %4, align 8, !tbaa !11
  %148 = load i64, ptr %3, align 8, !tbaa !11
  %149 = load i64, ptr %4, align 8, !tbaa !11
  %150 = sub nsw i64 %148, %149
  %151 = add nsw i64 %150, 1
  %152 = icmp sgt i64 %151, 1
  br i1 %152, label %153, label %172

153:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %154 = load i64, ptr %3, align 8, !tbaa !11
  %155 = load i64, ptr %4, align 8, !tbaa !11
  %156 = sub nsw i64 %154, %155
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !5
  %158 = call { i64, i32 } @_ZSt9make_pairIxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store { i64, i32 } %158, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %18, i64 12, i1 false)
  %159 = load i32, ptr %8, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %8, align 4, !tbaa !5
  %161 = sext i32 %159 to i64
  %162 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %161
  %163 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSIxiEENSt9enable_ifIXsr6__and_ISt13is_assignableIRxOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16) %162, ptr noundef nonnull align 8 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  %164 = load i64, ptr %3, align 8, !tbaa !11
  %165 = load i64, ptr %4, align 8, !tbaa !11
  %166 = sub nsw i64 %164, %165
  %167 = add nsw i64 %166, 1
  %168 = load i64, ptr %3, align 8, !tbaa !11
  %169 = sub nsw i64 %168, %167
  store i64 %169, ptr %3, align 8, !tbaa !11
  %170 = load i64, ptr %4, align 8, !tbaa !11
  %171 = add nsw i64 %170, -1
  store i64 %171, ptr %4, align 8, !tbaa !11
  br label %172

172:                                              ; preds = %153, %117
  %173 = load i64, ptr %4, align 8, !tbaa !11
  %174 = icmp sgt i64 %173, 0
  br i1 %174, label %175, label %186

175:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 1, ptr %20, align 4, !tbaa !5
  %176 = call { i32, i64 } @_ZSt9make_pairIiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %177 = getelementptr inbounds { i32, i64 }, ptr %19, i32 0, i32 0
  %178 = extractvalue { i32, i64 } %176, 0
  store i32 %178, ptr %177, align 8
  %179 = getelementptr inbounds { i32, i64 }, ptr %19, i32 0, i32 1
  %180 = extractvalue { i32, i64 } %176, 1
  store i64 %180, ptr %179, align 8
  %181 = load i32, ptr %8, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %8, align 4, !tbaa !5
  %183 = sext i32 %181 to i64
  %184 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %183
  %185 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSIixEENSt9enable_ifIXsr6__and_ISt13is_assignableIRxOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16) %184, ptr noundef nonnull align 8 dereferenceable(16) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %186

186:                                              ; preds = %175, %172
  %187 = load i32, ptr %8, align 4, !tbaa !5
  %188 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %187)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %206, %186
  %190 = load i32, ptr %21, align 4, !tbaa !5
  %191 = load i32, ptr %8, align 4, !tbaa !5
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %194, label %193

193:                                              ; preds = %189
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %209

194:                                              ; preds = %189
  %195 = load i32, ptr %21, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %196
  %198 = getelementptr inbounds %"struct.std::pair", ptr %197, i32 0, i32 1
  %199 = load i64, ptr %198, align 8, !tbaa !16
  %200 = load i32, ptr %21, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %201
  %203 = getelementptr inbounds %"struct.std::pair", ptr %202, i32 0, i32 0
  %204 = load i64, ptr %203, align 16, !tbaa !13
  %205 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %199, i64 noundef %204)
  br label %206

206:                                              ; preds = %194
  %207 = load i32, ptr %21, align 4, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %21, align 4, !tbaa !5
  br label %189, !llvm.loop !17

209:                                              ; preds = %193
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %211

210:                                              ; preds = %53
  store i32 0, ptr %6, align 4
  br label %211

211:                                              ; preds = %210, %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %212 = load i32, ptr %6, align 4
  switch i32 %212, label %238 [
    i32 0, label %213
  ]

213:                                              ; preds = %211
  br label %214

214:                                              ; preds = %213, %50
  %215 = load i32, ptr %5, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %216
  %218 = getelementptr inbounds %"struct.std::pair", ptr %217, i32 0, i32 0
  %219 = load i64, ptr %218, align 16, !tbaa !13
  %220 = load i32, ptr %5, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %221
  %223 = getelementptr inbounds %"struct.std::pair", ptr %222, i32 0, i32 1
  %224 = load i64, ptr %223, align 8, !tbaa !16
  %225 = mul nsw i64 %219, %224
  %226 = load i64, ptr %3, align 8, !tbaa !11
  %227 = add nsw i64 %226, %225
  store i64 %227, ptr %3, align 8, !tbaa !11
  %228 = load i32, ptr %5, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %229
  %231 = getelementptr inbounds %"struct.std::pair", ptr %230, i32 0, i32 1
  %232 = load i64, ptr %231, align 8, !tbaa !16
  %233 = load i64, ptr %4, align 8, !tbaa !11
  %234 = add nsw i64 %233, %232
  store i64 %234, ptr %4, align 8, !tbaa !11
  br label %235

235:                                              ; preds = %214
  %236 = load i32, ptr %5, align 4, !tbaa !5
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %5, align 4, !tbaa !5
  br label %45, !llvm.loop !18

238:                                              ; preds = %211, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  %239 = load i32, ptr %6, align 4
  switch i32 %239, label %242 [
    i32 5, label %240
  ]

240:                                              ; preds = %238
  %241 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  br label %242

242:                                              ; preds = %240, %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  %243 = load i32, ptr %1, align 4
  ret i32 %243
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef, ptr noundef) #3

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

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

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

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

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

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

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

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

declare i32 @puts(ptr noundef) #1

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 = { "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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }

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

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

%"struct.std::pair" = type { i64, i64 }
%"struct.std::pair.0" = type <{ i64, i32, [4 x i8] }>
%"struct.std::pair.2" = type { i32, i64 }

@tot = external dso_local global i32, align 4
@a = external dso_local global [100010 x %"struct.std::pair"], align 16
@b = external dso_local global [100010 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"struct.std::pair.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair.0", align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair.2", align 8
  %9 = alloca i32, align 4
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @tot)
  %11 = load i32, ptr @tot, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre113 = sext i32 %11 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre113, %.._crit_edge_crit_edge ], [ %23, %.lr.ph ]
  %13 = getelementptr inbounds %"struct.std::pair", ptr @a, i64 %.pre-phi
  tail call void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef nonnull @a, ptr noundef nonnull %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %14 = load i32, ptr @tot, align 4, !tbaa !5
  %.not7184 = icmp sgt i32 %14, 0
  br i1 %.not7184, label %.thread.peel, label %.critedge

.thread.peel:                                     ; preds = %._crit_edge
  %.sroa.211.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %15 = getelementptr inbounds i8, ptr %8, i64 8
  %16 = zext nneg i32 %14 to i64
  %.not71.peel.not = icmp eq i32 %14, 1
  br i1 %.not71.peel.not, label %.critedge, label %.peel.next

.peel.next:                                       ; preds = %.thread.peel
  %17 = load i64, ptr getelementptr inbounds (i8, ptr @a, i64 8), align 8, !tbaa !9
  %.pre = load i64, ptr @a, align 16, !tbaa !12
  %18 = mul nsw i64 %17, %.pre
  %.promoted = load i64, ptr %1, align 8, !tbaa !13
  br label %25

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %19 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %20, ptr noundef nonnull %19)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr @tot, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !14

25:                                               ; preds = %.thread, %.peel.next
  %26 = phi i64 [ %.promoted, %.peel.next ], [ %98, %.thread ]
  %27 = phi i64 [ %17, %.peel.next ], [ %98, %.thread ]
  %indvars.iv96 = phi i64 [ 1, %.peel.next ], [ %indvars.iv.next97, %.thread ]
  %.05486 = phi i64 [ %18, %.peel.next ], [ %97, %.thread ]
  %28 = add nsw i64 %.05486, 1
  %29 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv96
  %30 = load i64, ptr %29, align 16, !tbaa !12
  %31 = add nsw i64 %30, -1
  %32 = sdiv i64 %28, %31
  %33 = srem i64 %28, %31
  %34 = icmp sgt i64 %33, 0
  %35 = zext i1 %34 to i64
  %36 = add nsw i64 %32, %35
  %.not68 = icmp slt i64 %27, %36
  br i1 %.not68, label %.thread, label %.preheader

.preheader:                                       ; preds = %25
  store i64 %26, ptr %1, align 8, !tbaa !13
  %37 = trunc nuw nsw i64 %indvars.iv96 to i32
  %.not69.not74 = icmp sgt i32 %14, %37
  br i1 %.not69.not74, label %.lr.ph77.preheader, label %._crit_edge78

.lr.ph77.preheader:                               ; preds = %.preheader
  %38 = zext nneg i32 %14 to i64
  %39 = sub i32 %14, %37
  %wide.trip.count = zext i32 %39 to i64
  br label %.lr.ph77

._crit_edge78:                                    ; preds = %.lr.ph77, %.preheader
  %.062.lcssa = phi i32 [ 0, %.preheader ], [ %39, %.lr.ph77 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %40 = add nsw i32 %.062.lcssa, -1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %41
  %43 = load i64, ptr %42, align 16, !tbaa !12
  %44 = add nsw i64 %43, -1
  store i64 %44, ptr %2, align 8, !tbaa !13
  %45 = getelementptr inbounds i8, ptr %42, i64 8
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = add nsw i64 %46, -1
  store i64 %47, ptr %45, align 8, !tbaa !9
  %.not70 = icmp eq i64 %47, 0
  %spec.select = select i1 %.not70, i32 %40, i32 %.062.lcssa
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  %48 = call { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %.fca.0.extract8 = extractvalue { i64, i32 } %48, 0
  %.fca.1.extract9 = extractvalue { i64, i32 } %48, 1
  store i64 %.fca.0.extract8, ptr %3, align 8
  store i32 %.fca.1.extract9, ptr %.sroa.211.0..sroa_idx, align 8
  %49 = add nsw i32 %spec.select, 1
  %50 = sext i32 %spec.select to i64
  %51 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %50
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSIxiEENSt9enable_ifIXsr6__and_ISt13is_assignableIRxOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %53 = sub nsw i64 %28, %27
  %54 = load i64, ptr %2, align 8, !tbaa !13
  %55 = add nsw i64 %54, -1
  %56 = sdiv i64 %53, %55
  %57 = getelementptr inbounds i8, ptr %51, i64 8
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = add nsw i64 %58, %56
  store i64 %59, ptr %57, align 8, !tbaa !9
  %60 = mul nsw i64 %56, %54
  %61 = sub nsw i64 %28, %60
  %62 = sub nsw i64 %27, %56
  store i64 %62, ptr %1, align 8, !tbaa !13
  %63 = icmp sgt i64 %61, %62
  br i1 %63, label %67, label %75

.lr.ph77:                                         ; preds = %.lr.ph77.preheader, %.lr.ph77
  %indvars.iv102 = phi i64 [ 0, %.lr.ph77.preheader ], [ %indvars.iv.next103, %.lr.ph77 ]
  %indvars.iv100 = phi i64 [ %38, %.lr.ph77.preheader ], [ %indvars.iv.next101, %.lr.ph77 ]
  %indvars.iv.next101 = add nsw i64 %indvars.iv100, -1
  %64 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv.next101
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %65 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %indvars.iv102
  %66 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef nonnull align 8 dereferenceable(16) %64)
  %exitcond.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge78, label %.lr.ph77, !llvm.loop !16

67:                                               ; preds = %._crit_edge78
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %reass.sub = sub i64 %61, %62
  %68 = add i64 %reass.sub, 1
  store i64 %68, ptr %6, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  %69 = call { i64, i32 } @_ZSt9make_pairIxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %.fca.0.extract = extractvalue { i64, i32 } %69, 0
  %.fca.1.extract = extractvalue { i64, i32 } %69, 1
  store i64 %.fca.0.extract, ptr %5, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %70 = add nsw i32 %spec.select, 2
  %71 = sext i32 %49 to i64
  %72 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %71
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSIxiEENSt9enable_ifIXsr6__and_ISt13is_assignableIRxOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 4, 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
  %74 = add i64 %62, -1
  store i64 %74, ptr %1, align 8, !tbaa !13
  br label %75

75:                                               ; preds = %67, %._crit_edge78
  %76 = phi i64 [ %74, %67 ], [ %62, %._crit_edge78 ]
  %.264 = phi i32 [ %70, %67 ], [ %49, %._crit_edge78 ]
  %77 = icmp sgt i64 %76, 0
  br i1 %77, label %78, label %86

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  %79 = call { i32, i64 } @_ZSt9make_pairIiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %80 = extractvalue { i32, i64 } %79, 0
  store i32 %80, ptr %8, align 8
  %81 = extractvalue { i32, i64 } %79, 1
  store i64 %81, ptr %15, align 8
  %82 = add nsw i32 %.264, 1
  %83 = sext i32 %.264 to i64
  %84 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %83
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSIixEENSt9enable_ifIXsr6__and_ISt13is_assignableIRxOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16) %84, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br label %86

86:                                               ; preds = %78, %75
  %.365 = phi i32 [ %82, %78 ], [ %.264, %75 ]
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.365)
  %88 = icmp sgt i32 %.365, 0
  br i1 %88, label %.lr.ph82.preheader, label %._crit_edge83

.lr.ph82.preheader:                               ; preds = %86
  %wide.trip.count110 = zext nneg i32 %.365 to i64
  br label %.lr.ph82

.lr.ph82:                                         ; preds = %.lr.ph82.preheader, %.lr.ph82
  %indvars.iv107 = phi i64 [ 0, %.lr.ph82.preheader ], [ %indvars.iv.next108, %.lr.ph82 ]
  %89 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @b, i64 0, i64 %indvars.iv107
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  %91 = load i64, ptr %90, align 8, !tbaa !9
  %92 = load i64, ptr %89, align 16, !tbaa !12
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %91, i64 noundef %92)
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond111.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count110
  br i1 %exitcond111.not, label %._crit_edge83, label %.lr.ph82, !llvm.loop !17

._crit_edge83:                                    ; preds = %.lr.ph82, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  br label %100

.thread:                                          ; preds = %25
  %94 = getelementptr inbounds [100010 x %"struct.std::pair"], ptr @a, i64 0, i64 %indvars.iv96, i32 1
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = mul nsw i64 %95, %30
  %97 = add nsw i64 %96, %.05486
  %98 = add nsw i64 %27, %95
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %.not71 = icmp ult i64 %indvars.iv.next97, %16
  br i1 %.not71, label %25, label %.critedge.loopexit, !llvm.loop !18

.critedge.loopexit:                               ; preds = %.thread
  store i64 %98, ptr %1, align 8, !tbaa !13
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.thread.peel, %._crit_edge
  %99 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %100

100:                                              ; preds = %._crit_edge83, %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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