; LLVM IR from tangjz/acm-icpc :: codeforces/complete (1367F2)

; 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 { i32, i32 }
%class.anon = type { i8 }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.1" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ4mainE1a = external hidden global [200001 x i32], align 16
@_ZZ4mainE3ord = external hidden global [200001 x i32], align 16
@_ZZ4mainE3seg = external hidden global [200001 x %"struct.std::pair"], align 16
@_ZZ4mainE4addL = external hidden global [200001 x i32], align 16
@_ZZ4mainE4addR = external hidden global [200001 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [4 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 i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %class.anon, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::tuple", align 8
  %17 = alloca %"class.std::tuple", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::tuple", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca %"class.std::tuple", align 8
  %34 = alloca %"class.std::tuple", align 8
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %351, %0
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %47 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %62, %46
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %65

53:                                               ; preds = %48
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr @_ZZ4mainE1a, i64 %55
  %57 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %56)
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %60
  store i32 %58, ptr %61, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %53
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %6, align 4, !tbaa !5
  br label %48, !llvm.loop !9

65:                                               ; preds = %52
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %67
  call void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef @_ZZ4mainE3ord, ptr noundef %68)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %108, %65
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %69
  %75 = load i32, ptr %9, align 4, !tbaa !5
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %94

77:                                               ; preds = %74
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE1a, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr %9, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE1a, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = icmp ne i32 %85, %92
  br i1 %93, label %94, label %100

94:                                               ; preds = %77, %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %8, align 4, !tbaa !5
  %97 = sext i32 %95 to i64
  %98 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %97
  %99 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %98, ptr noundef nonnull align 4 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %107

100:                                              ; preds = %77
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = sub nsw i32 %102, 1
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %104
  %106 = getelementptr inbounds %"struct.std::pair", ptr %105, i32 0, i32 1
  store i32 %101, ptr %106, align 4, !tbaa !11
  br label %107

107:                                              ; preds = %100, %94
  br label %108

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

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

112:                                              ; preds = %195, %111
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %198

117:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %119
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %16, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13) #6
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(8) %120) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %124, label %152

124:                                              ; preds = %117
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = sub nsw i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %127
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %17, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15) #6
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(8) %128) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  store i32 %133, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %134 = load i32, ptr %14, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %135
  %137 = load i32, ptr %15, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %138
  %140 = getelementptr inbounds i32, ptr %139, i64 1
  %141 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef %136, ptr noundef %140, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %142 = ptrtoint ptr %141 to i64
  %143 = sub i64 %142, ptrtoint (ptr @_ZZ4mainE3ord to i64)
  %144 = sdiv exact i64 %143, 4
  %145 = trunc i64 %144 to i32
  store i32 %145, ptr %19, align 4, !tbaa !5
  %146 = load i32, ptr %19, align 4, !tbaa !5
  %147 = load i32, ptr %14, align 4, !tbaa !5
  %148 = sub nsw i32 %146, %147
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addL, i64 0, i64 %150
  store i32 %148, ptr %151, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %156

152:                                              ; preds = %117
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addL, i64 0, i64 %154
  store i32 0, ptr %155, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %152, %124
  %157 = load i32, ptr %11, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  %159 = load i32, ptr %8, align 4, !tbaa !5
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %161, label %190

161:                                              ; preds = %156
  %162 = load i32, ptr %11, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %164
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %20, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15) #6
  %166 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(8) %165) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %167 = load i32, ptr %13, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  store i32 %170, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %171 = load i32, ptr %14, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %172
  %174 = load i32, ptr %15, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %175
  %177 = getelementptr inbounds i32, ptr %176, i64 1
  %178 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef %173, ptr noundef %177, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %179 = ptrtoint ptr %178 to i64
  %180 = sub i64 %179, ptrtoint (ptr @_ZZ4mainE3ord to i64)
  %181 = sdiv exact i64 %180, 4
  %182 = trunc i64 %181 to i32
  store i32 %182, ptr %22, align 4, !tbaa !5
  %183 = load i32, ptr %15, align 4, !tbaa !5
  %184 = load i32, ptr %22, align 4, !tbaa !5
  %185 = sub nsw i32 %183, %184
  %186 = add nsw i32 %185, 1
  %187 = load i32, ptr %11, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addR, i64 0, i64 %188
  store i32 %186, ptr %189, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %194

190:                                              ; preds = %156
  %191 = load i32, ptr %11, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addR, i64 0, i64 %192
  store i32 0, ptr %193, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %190, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %11, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %11, align 4, !tbaa !5
  br label %112, !llvm.loop !14

198:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %199 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %199, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %286, %198
  %201 = load i32, ptr %25, align 4, !tbaa !5
  %202 = load i32, ptr %8, align 4, !tbaa !5
  %203 = icmp slt i32 %201, %202
  br i1 %203, label %205, label %204

204:                                              ; preds = %200
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %289

205:                                              ; preds = %200
  br label %206

206:                                              ; preds = %252, %205
  %207 = load i32, ptr %26, align 4, !tbaa !5
  %208 = load i32, ptr %8, align 4, !tbaa !5
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %210, label %235

210:                                              ; preds = %206
  %211 = load i32, ptr %25, align 4, !tbaa !5
  %212 = load i32, ptr %26, align 4, !tbaa !5
  %213 = icmp eq i32 %211, %212
  br i1 %213, label %233, label %214

214:                                              ; preds = %210
  %215 = load i32, ptr %26, align 4, !tbaa !5
  %216 = sub nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %217
  %219 = getelementptr inbounds %"struct.std::pair", ptr %218, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !11
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = load i32, ptr %26, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %225
  %227 = getelementptr inbounds %"struct.std::pair", ptr %226, i32 0, i32 0
  %228 = load i32, ptr %227, align 8, !tbaa !15
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = icmp slt i32 %223, %231
  br label %233

233:                                              ; preds = %214, %210
  %234 = phi i1 [ true, %210 ], [ %232, %214 ]
  br label %235

235:                                              ; preds = %233, %206
  %236 = phi i1 [ false, %206 ], [ %234, %233 ]
  br i1 %236, label %237, label %255

237:                                              ; preds = %235
  %238 = load i32, ptr %26, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %239
  %241 = getelementptr inbounds %"struct.std::pair", ptr %240, i32 0, i32 1
  %242 = load i32, ptr %241, align 4, !tbaa !11
  %243 = load i32, ptr %26, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %244
  %246 = getelementptr inbounds %"struct.std::pair", ptr %245, i32 0, i32 0
  %247 = load i32, ptr %246, align 8, !tbaa !15
  %248 = sub nsw i32 %242, %247
  %249 = add nsw i32 %248, 1
  %250 = load i32, ptr %24, align 4, !tbaa !5
  %251 = add nsw i32 %250, %249
  store i32 %251, ptr %24, align 4, !tbaa !5
  br label %252

252:                                              ; preds = %237
  %253 = load i32, ptr %26, align 4, !tbaa !5
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %26, align 4, !tbaa !5
  br label %206, !llvm.loop !16

255:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %256 = load i32, ptr %5, align 4, !tbaa !5
  %257 = load i32, ptr %24, align 4, !tbaa !5
  %258 = sub nsw i32 %256, %257
  %259 = load i32, ptr %25, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addL, i64 0, i64 %260
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = sub nsw i32 %258, %262
  %264 = load i32, ptr %26, align 4, !tbaa !5
  %265 = sub nsw i32 %264, 1
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addR, i64 0, i64 %266
  %268 = load i32, ptr %267, align 4, !tbaa !5
  %269 = sub nsw i32 %263, %268
  store i32 %269, ptr %27, align 4, !tbaa !5
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %271 = load i32, ptr %270, align 4, !tbaa !5
  store i32 %271, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  %272 = load i32, ptr %25, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %273
  %275 = getelementptr inbounds %"struct.std::pair", ptr %274, i32 0, i32 1
  %276 = load i32, ptr %275, align 4, !tbaa !11
  %277 = load i32, ptr %25, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %278
  %280 = getelementptr inbounds %"struct.std::pair", ptr %279, i32 0, i32 0
  %281 = load i32, ptr %280, align 8, !tbaa !15
  %282 = sub nsw i32 %276, %281
  %283 = add nsw i32 %282, 1
  %284 = load i32, ptr %24, align 4, !tbaa !5
  %285 = sub nsw i32 %284, %283
  store i32 %285, ptr %24, align 4, !tbaa !5
  br label %286

286:                                              ; preds = %255
  %287 = load i32, ptr %25, align 4, !tbaa !5
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %25, align 4, !tbaa !5
  br label %200, !llvm.loop !17

289:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 1, ptr %28, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %345, %289
  %291 = load i32, ptr %28, align 4, !tbaa !5
  %292 = load i32, ptr %8, align 4, !tbaa !5
  %293 = icmp slt i32 %291, %292
  br i1 %293, label %295, label %294

294:                                              ; preds = %290
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %348

295:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %296 = load i32, ptr %28, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %297
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %33, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %30) #6
  %299 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(8) %298) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  %300 = load i32, ptr %28, align 4, !tbaa !5
  %301 = sub nsw i32 %300, 1
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %302
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %34, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32) #6
  %304 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 4 dereferenceable(8) %303) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  %305 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %305, ptr %35, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %341, %295
  %307 = load i32, ptr %35, align 4, !tbaa !5
  %308 = load i32, ptr %30, align 4, !tbaa !5
  %309 = icmp sle i32 %307, %308
  br i1 %309, label %311, label %310

310:                                              ; preds = %306
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %344

311:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  %312 = load i32, ptr %35, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %313
  %315 = load i32, ptr %314, align 4, !tbaa !5
  store i32 %315, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  %316 = load i32, ptr %31, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %317
  %319 = load i32, ptr %32, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %320
  %322 = getelementptr inbounds i32, ptr %321, i64 1
  %323 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef %318, ptr noundef %322, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %324 = ptrtoint ptr %323 to i64
  %325 = sub i64 %324, ptrtoint (ptr @_ZZ4mainE3ord to i64)
  %326 = sdiv exact i64 %325, 4
  %327 = trunc i64 %326 to i32
  store i32 %327, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  %328 = load i32, ptr %37, align 4, !tbaa !5
  %329 = load i32, ptr %31, align 4, !tbaa !5
  %330 = sub nsw i32 %328, %329
  %331 = load i32, ptr %30, align 4, !tbaa !5
  %332 = load i32, ptr %35, align 4, !tbaa !5
  %333 = sub nsw i32 %331, %332
  %334 = add nsw i32 %333, 1
  %335 = add nsw i32 %330, %334
  store i32 %335, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  %336 = load i32, ptr %5, align 4, !tbaa !5
  %337 = load i32, ptr %38, align 4, !tbaa !5
  %338 = sub nsw i32 %336, %337
  store i32 %338, ptr %39, align 4, !tbaa !5
  %339 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %340 = load i32, ptr %339, align 4, !tbaa !5
  store i32 %340, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  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 %341

341:                                              ; preds = %311
  %342 = load i32, ptr %35, align 4, !tbaa !5
  %343 = add nsw i32 %342, 1
  store i32 %343, ptr %35, align 4, !tbaa !5
  br label %306, !llvm.loop !18

344:                                              ; preds = %310
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %345

345:                                              ; preds = %344
  %346 = load i32, ptr %28, align 4, !tbaa !5
  %347 = add nsw i32 %346, 1
  store i32 %347, ptr %28, align 4, !tbaa !5
  br label %290, !llvm.loop !19

348:                                              ; preds = %294
  %349 = load i32, ptr %23, align 4, !tbaa !5
  %350 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %349)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %351

351:                                              ; preds = %348
  %352 = load i32, ptr %3, align 4, !tbaa !5
  %353 = add nsw i32 %352, 1
  store i32 %353, ptr %3, align 4, !tbaa !5
  br label %41, !llvm.loop !20

354:                                              ; preds = %45
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %355 = load i32, ptr %1, align 4
  ret i32 %355
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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 = { 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 = { inlinehint 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 #6 = { nounwind }

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

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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ4mainE1a = external hidden global [200001 x i32], align 16
@_ZZ4mainE3ord = external hidden global [200001 x i32], align 16
@_ZZ4mainE3seg = external hidden global [200001 x %"struct.std::pair"], align 16
@_ZZ4mainE4addL = external hidden local_unnamed_addr global [200001 x i32], align 16
@_ZZ4mainE4addR = external hidden local_unnamed_addr global [200001 x i32], align 16
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::tuple", align 8
  %10 = alloca %"class.std::tuple", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::tuple", align 8
  %13 = alloca i32, align 4
  %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 i32, align 4
  %20 = alloca %"class.std::tuple", align 8
  %21 = alloca %"class.std::tuple", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 1, ptr %1, align 4, !tbaa !5
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %.not117 = icmp slt i32 %25, 1
  br i1 %.not117, label %._crit_edge121, label %.lr.ph120

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

.lr.ph120:                                        ; preds = %0, %._crit_edge116
  %.0118 = phi i32 [ %180, %._crit_edge116 ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph, label %.lr.ph120.._crit_edge_crit_edge

.lr.ph120.._crit_edge_crit_edge:                  ; preds = %.lr.ph120
  %.pre152 = sext i32 %27 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph120.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre152, %.lr.ph120.._crit_edge_crit_edge ], [ %37, %.lr.ph ]
  %29 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %.pre-phi
  call void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef nonnull @_ZZ4mainE3ord, ptr noundef nonnull %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph89, label %._crit_edge90.thread

._crit_edge90.thread:                             ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %._crit_edge96.thread

.lr.ph:                                           ; preds = %.lr.ph120, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph120 ]
  %32 = getelementptr inbounds i32, ptr @_ZZ4mainE1a, i64 %indvars.iv
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %32)
  %34 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %indvars.iv
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %35, ptr %34, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = icmp slt i64 %indvars.iv.next, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge90:                                    ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %39 = icmp sgt i32 %.166, 0
  br i1 %39, label %40, label %._crit_edge96.thread

40:                                               ; preds = %._crit_edge90
  %41 = zext nneg i32 %.166 to i64
  %wide.trip.count = zext nneg i32 %.166 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %9, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #6
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(8) @_ZZ4mainE3seg) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  store i32 0, ptr @_ZZ4mainE4addL, align 16
  %.not = icmp eq i32 %.166, 1
  br i1 %.not, label %._crit_edge96.thread160, label %.lr.ph95.peel.next

._crit_edge96.thread160:                          ; preds = %40
  store i32 0, ptr @_ZZ4mainE4addR, align 16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %.pre149161 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  store i32 %.pre149161, ptr %14, align 4, !tbaa !5
  br label %.preheader.preheader

.lr.ph95.peel.next:                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %12, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #6
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZ4mainE3seg, i64 8)) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %47, ptr %13, align 4, !tbaa !5
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %49
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %gep92.peel = getelementptr i32, ptr getelementptr inbounds (i8, ptr @_ZZ4mainE3ord, i64 4), i64 %52
  %53 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull %50, ptr noundef nonnull %gep92.peel, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %54 = ptrtoint ptr %53 to i64
  %55 = sub i64 %54, ptrtoint (ptr @_ZZ4mainE3ord to i64)
  %56 = lshr exact i64 %55, 2
  %57 = trunc i64 %56 to i32
  %58 = load i32, ptr %8, align 4, !tbaa !5
  %59 = add i32 %58, 1
  %60 = sub i32 %59, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  store i32 %60, ptr @_ZZ4mainE4addR, align 16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %91

.lr.ph89:                                         ; preds = %._crit_edge, %85
  %61 = phi i32 [ %86, %85 ], [ %30, %._crit_edge ]
  %.06587 = phi i32 [ %.166, %85 ], [ 0, %._crit_edge ]
  %storemerge86 = phi i32 [ %88, %85 ], [ 0, %._crit_edge ]
  %.not75 = icmp eq i32 %storemerge86, 0
  br i1 %.not75, label %76, label %62

62:                                               ; preds = %.lr.ph89
  %63 = add nsw i32 %storemerge86, -1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE1a, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = sext i32 %storemerge86 to i64
  %71 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE1a, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %.not76 = icmp eq i32 %69, %75
  br i1 %.not76, label %81, label %76

76:                                               ; preds = %62, %.lr.ph89
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %77 = add nsw i32 %.06587, 1
  %78 = sext i32 %.06587 to i64
  %79 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %78
  %80 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %79, ptr noundef nonnull align 4 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  %.pre148 = load i32, ptr %2, align 4, !tbaa !5
  br label %85

81:                                               ; preds = %62
  %82 = add nsw i32 %.06587, -1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %83, i32 1
  store i32 %storemerge86, ptr %84, align 4, !tbaa !11
  br label %85

85:                                               ; preds = %76, %81
  %86 = phi i32 [ %.pre148, %76 ], [ %61, %81 ]
  %87 = phi i32 [ %.pre, %76 ], [ %storemerge86, %81 ]
  %.166 = phi i32 [ %77, %76 ], [ %.06587, %81 ]
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %3, align 4, !tbaa !5
  %89 = icmp slt i32 %88, %86
  br i1 %89, label %.lr.ph89, label %._crit_edge90, !llvm.loop !13

._crit_edge96.thread:                             ; preds = %._crit_edge90, %._crit_edge90.thread
  %.ph157 = phi i32 [ %30, %._crit_edge90.thread ], [ %86, %._crit_edge90 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  store i32 %.ph157, ptr %14, align 4, !tbaa !5
  br label %._crit_edge116

._crit_edge96:                                    ; preds = %135
  %.pre149 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  store i32 %.pre149, ptr %14, align 4, !tbaa !5
  br i1 %39, label %.preheader.preheader, label %._crit_edge116

.preheader.preheader:                             ; preds = %._crit_edge96.thread160, %._crit_edge96
  %90 = zext nneg i32 %.166 to i64
  %wide.trip.count135 = zext nneg i32 %.166 to i64
  br label %.preheader

91:                                               ; preds = %.lr.ph95.peel.next, %135
  %indvars.iv124 = phi i64 [ 1, %.lr.ph95.peel.next ], [ %indvars.iv.next125, %135 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %92 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %indvars.iv124
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %9, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #6
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(8) %92) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  %94 = add nsw i64 %indvars.iv124, -1
  %95 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %94
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %10, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #6
  %96 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(8) %95) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  store i32 %100, ptr %11, align 4, !tbaa !5
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %102
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @_ZZ4mainE3ord, i64 4), i64 %105
  %106 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull %103, ptr noundef nonnull %gep, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %107 = load i32, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  %108 = ptrtoint ptr %106 to i64
  %109 = sub i64 %108, ptrtoint (ptr @_ZZ4mainE3ord to i64)
  %110 = lshr exact i64 %109, 2
  %111 = trunc i64 %110 to i32
  %112 = sub nsw i32 %111, %107
  %113 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addL, i64 0, i64 %indvars.iv124
  store i32 %112, ptr %113, align 4
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %114 = icmp ult i64 %indvars.iv.next125, %41
  br i1 %114, label %115, label %135

115:                                              ; preds = %91
  %116 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %indvars.iv.next125
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %12, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #6
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(8) %116) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  store i32 %121, ptr %13, align 4, !tbaa !5
  %122 = load i32, ptr %7, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %123
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %gep92 = getelementptr i32, ptr getelementptr inbounds (i8, ptr @_ZZ4mainE3ord, i64 4), i64 %126
  %127 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull %124, ptr noundef nonnull %gep92, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %128 = ptrtoint ptr %127 to i64
  %129 = sub i64 %128, ptrtoint (ptr @_ZZ4mainE3ord to i64)
  %130 = lshr exact i64 %129, 2
  %131 = trunc i64 %130 to i32
  %132 = load i32, ptr %8, align 4, !tbaa !5
  %133 = add i32 %132, 1
  %134 = sub i32 %133, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  br label %135

135:                                              ; preds = %91, %115
  %.sink147 = phi i32 [ %134, %115 ], [ 0, %91 ]
  %136 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addR, i64 0, i64 %indvars.iv124
  store i32 %.sink147, ptr %136, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %exitcond.not = icmp eq i64 %indvars.iv.next125, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge96, label %91, !llvm.loop !14

.preheader84:                                     ; preds = %.critedge
  %.not168 = icmp eq i32 %.166, 1
  br i1 %.not168, label %._crit_edge116, label %.lr.ph115.preheader

.lr.ph115.preheader:                              ; preds = %.preheader84
  %wide.trip.count143 = zext nneg i32 %.166 to i64
  br label %.lr.ph115

.preheader:                                       ; preds = %.preheader.preheader, %.critedge
  %indvars.iv132 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next133, %.critedge ]
  %.059107 = phi i32 [ 0, %.preheader.preheader ], [ %.1.lcssa, %.critedge ]
  %.061105 = phi i32 [ 0, %.preheader.preheader ], [ %177, %.critedge ]
  %137 = icmp slt i32 %.059107, %.166
  br i1 %137, label %.lr.ph99.preheader, label %.critedge

.lr.ph99.preheader:                               ; preds = %.preheader
  %138 = sext i32 %.059107 to i64
  %.phi.trans.insert = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %indvars.iv132
  br label %.lr.ph99

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %.critedge2
  %indvars.iv128 = phi i64 [ %138, %.lr.ph99.preheader ], [ %indvars.iv.next129, %.critedge2 ]
  %.16297 = phi i32 [ %.061105, %.lr.ph99.preheader ], [ %158, %.critedge2 ]
  %139 = icmp eq i64 %indvars.iv128, %indvars.iv132
  br i1 %139, label %.lr.ph99..critedge2_crit_edge, label %140

.lr.ph99..critedge2_crit_edge:                    ; preds = %.lr.ph99
  %.pre150 = load i32, ptr %.phi.trans.insert, align 8, !tbaa !16
  br label %.critedge2

140:                                              ; preds = %.lr.ph99
  %141 = add nsw i64 %indvars.iv128, -1
  %142 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %141, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !11
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %indvars.iv128
  %148 = load i32, ptr %147, align 8, !tbaa !16
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = icmp slt i32 %146, %151
  br i1 %152, label %.critedge2, label %.critedge.loopexit.split.loop.exit165

.critedge2:                                       ; preds = %.lr.ph99..critedge2_crit_edge, %140
  %153 = phi i32 [ %.pre150, %.lr.ph99..critedge2_crit_edge ], [ %148, %140 ]
  %154 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %indvars.iv128, i32 1
  %155 = load i32, ptr %154, align 4, !tbaa !11
  %156 = add i32 %.16297, 1
  %157 = add i32 %156, %155
  %158 = sub i32 %157, %153
  %indvars.iv.next129 = add nsw i64 %indvars.iv128, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next129, %90
  br i1 %exitcond131.not, label %.critedge, label %.lr.ph99, !llvm.loop !17

.critedge.loopexit.split.loop.exit165:            ; preds = %140
  %159 = trunc nsw i64 %indvars.iv128 to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge2, %.critedge.loopexit.split.loop.exit165, %.preheader
  %.162.lcssa = phi i32 [ %.061105, %.preheader ], [ %.16297, %.critedge.loopexit.split.loop.exit165 ], [ %158, %.critedge2 ]
  %.1.lcssa = phi i32 [ %.059107, %.preheader ], [ %159, %.critedge.loopexit.split.loop.exit165 ], [ %.166, %.critedge2 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %160 = load i32, ptr %2, align 4, !tbaa !5
  %161 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addL, i64 0, i64 %indvars.iv132
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = add nsw i32 %.1.lcssa, -1
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE4addR, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = add i32 %.162.lcssa, %162
  %168 = add i32 %167, %166
  %169 = sub i32 %160, %168
  store i32 %169, ptr %15, align 4, !tbaa !5
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %171 = load i32, ptr %170, align 4, !tbaa !5
  store i32 %171, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  %172 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %indvars.iv132
  %173 = getelementptr inbounds i8, ptr %172, i64 4
  %174 = load i32, ptr %173, align 4, !tbaa !11
  %175 = load i32, ptr %172, align 8, !tbaa !16
  %176 = xor i32 %174, -1
  %.neg73 = add i32 %.162.lcssa, %176
  %177 = add i32 %.neg73, %175
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond136.not = icmp eq i64 %indvars.iv.next133, %wide.trip.count135
  br i1 %exitcond136.not, label %.preheader84, label %.preheader, !llvm.loop !18

._crit_edge116.loopexit:                          ; preds = %._crit_edge113
  %.pre151 = load i32, ptr %14, align 4, !tbaa !5
  br label %._crit_edge116

._crit_edge116:                                   ; preds = %._crit_edge96.thread, %._crit_edge96, %._crit_edge116.loopexit, %.preheader84
  %178 = phi i32 [ %.pre151, %._crit_edge116.loopexit ], [ %171, %.preheader84 ], [ %.ph157, %._crit_edge96.thread ], [ %.pre149, %._crit_edge96 ]
  %179 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %178)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %180 = add nuw nsw i32 %.0118, 1
  %181 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.0118, %181
  br i1 %.not.not, label %.lr.ph120, label %._crit_edge121, !llvm.loop !19

.lr.ph115:                                        ; preds = %.lr.ph115.preheader, %._crit_edge113
  %indvars.iv140 = phi i64 [ 1, %.lr.ph115.preheader ], [ %indvars.iv.next141, %._crit_edge113 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  %182 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %indvars.iv140
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %20, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17) #6
  %183 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(8) %182) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  %184 = add nsw i64 %indvars.iv140, -1
  %185 = getelementptr inbounds [200001 x %"struct.std::pair"], ptr @_ZZ4mainE3seg, i64 0, i64 %184
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %21, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19) #6
  %186 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(8) %185) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  %187 = load i32, ptr %16, align 4, !tbaa !5
  %188 = load i32, ptr %17, align 4, !tbaa !5
  %.not70109 = icmp sgt i32 %187, %188
  br i1 %.not70109, label %._crit_edge113, label %.lr.ph112.preheader

.lr.ph112.preheader:                              ; preds = %.lr.ph115
  %189 = sext i32 %187 to i64
  br label %.lr.ph112

._crit_edge113:                                   ; preds = %.lr.ph112, %.lr.ph115
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %exitcond144.not = icmp eq i64 %indvars.iv.next141, %wide.trip.count143
  br i1 %exitcond144.not, label %._crit_edge116.loopexit, label %.lr.ph115, !llvm.loop !20

.lr.ph112:                                        ; preds = %.lr.ph112.preheader, %.lr.ph112
  %indvars.iv137 = phi i64 [ %189, %.lr.ph112.preheader ], [ %indvars.iv.next138, %.lr.ph112 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #6
  %190 = getelementptr inbounds [200001 x i32], ptr @_ZZ4mainE3ord, i64 0, i64 %indvars.iv137
  %191 = load i32, ptr %190, align 4, !tbaa !5
  store i32 %191, ptr %22, align 4, !tbaa !5
  %192 = load i32, ptr %18, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i32, ptr @_ZZ4mainE3ord, i64 %193
  %195 = load i32, ptr %19, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %gep108 = getelementptr i32, ptr getelementptr inbounds (i8, ptr @_ZZ4mainE3ord, i64 4), i64 %196
  %197 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull %194, ptr noundef nonnull %gep108, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %198 = ptrtoint ptr %197 to i64
  %199 = sub i64 %198, ptrtoint (ptr @_ZZ4mainE3ord to i64)
  %200 = lshr exact i64 %199, 2
  %201 = trunc i64 %200 to i32
  %202 = load i32, ptr %18, align 4, !tbaa !5
  %203 = load i32, ptr %17, align 4, !tbaa !5
  %204 = xor i32 %203, -1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #6
  %205 = load i32, ptr %2, align 4, !tbaa !5
  %206 = trunc nsw i64 %indvars.iv137 to i32
  %.neg = add i32 %202, %206
  %.neg71 = add i32 %.neg, %204
  %.neg72 = sub i32 %.neg71, %201
  %207 = add i32 %.neg72, %205
  store i32 %207, ptr %23, align 4, !tbaa !5
  %208 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %209 = load i32, ptr %208, align 4, !tbaa !5
  store i32 %209, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  %indvars.iv.next138 = add nsw i64 %indvars.iv137, 1
  %210 = load i32, ptr %17, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %.not70.not = icmp slt i64 %indvars.iv137, %211
  br i1 %.not70.not, label %.lr.ph112, label %._crit_edge113, !llvm.loop !21
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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 = { 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 = { inlinehint 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 #6 = { nounwind }

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

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


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