; LLVM IR from eyangch/competitive-programming :: Codeforces/510 (d)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dijiPSt6vectorISt4pairIiiESaIS1_EEiRA512_ii(i32 noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(2048), i32 noundef) #0

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

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

; 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)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4pfaciRSt6vectorIiSaIiEE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [300 x i32], align 16
  %4 = alloca [300 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [512 x %"class.std::vector"], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair", align 4
  %21 = alloca i32, align 4
  %22 = alloca [512 x i32], align 16
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %26 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 1200, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 1200, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %32

32:                                               ; preds = %42, %0
  %33 = load i32, ptr %5, align 4, !tbaa !8
  %34 = load i32, ptr %2, align 4, !tbaa !8
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %45

37:                                               ; preds = %32
  %38 = load i32, ptr %5, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %39
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %40)
  br label %42

42:                                               ; preds = %37
  %43 = load i32, ptr %5, align 4, !tbaa !8
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %5, align 4, !tbaa !8
  br label %32, !llvm.loop !11

45:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !8
  br label %46

46:                                               ; preds = %56, %45
  %47 = load i32, ptr %6, align 4, !tbaa !8
  %48 = load i32, ptr %2, align 4, !tbaa !8
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %59

51:                                               ; preds = %46
  %52 = load i32, ptr %6, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [300 x i32], ptr %4, i64 0, i64 %53
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %54)
  br label %56

56:                                               ; preds = %51
  %57 = load i32, ptr %6, align 4, !tbaa !8
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %6, align 4, !tbaa !8
  br label %46, !llvm.loop !13

59:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 2147483647, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %60

60:                                               ; preds = %203, %59
  %61 = load i32, ptr %8, align 4, !tbaa !8
  %62 = load i32, ptr %2, align 4, !tbaa !8
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

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

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %66 = load i32, ptr %8, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !8
  invoke void @_Z4pfaciRSt6vectorIiSaIiEE(i32 noundef %69, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %70 unwind label %77

70:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %71

71:                                               ; preds = %86, %70
  %72 = load i32, ptr %14, align 4, !tbaa !8
  %73 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %74 = trunc i64 %73 to i32
  %75 = icmp slt i32 %72, %74
  br i1 %75, label %81, label %76

76:                                               ; preds = %71
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %89

77:                                               ; preds = %65
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %11, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %12, align 4
  br label %214

81:                                               ; preds = %71
  %82 = load i32, ptr %14, align 4, !tbaa !8
  %83 = shl i32 1, %82
  %84 = load i32, ptr %13, align 4, !tbaa !8
  %85 = or i32 %84, %83
  store i32 %85, ptr %13, align 4, !tbaa !8
  br label %86

86:                                               ; preds = %81
  %87 = load i32, ptr %14, align 4, !tbaa !8
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %14, align 4, !tbaa !8
  br label %71, !llvm.loop !14

89:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 12288, ptr %15) #7
  %90 = getelementptr inbounds [512 x %"class.std::vector"], ptr %15, i32 0, i32 0
  %91 = getelementptr inbounds %"class.std::vector", ptr %90, i64 512
  br label %92

92:                                               ; preds = %92, %89
  %93 = phi ptr [ %90, %89 ], [ %94, %92 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %93) #7
  %94 = getelementptr inbounds %"class.std::vector", ptr %93, i64 1
  %95 = icmp eq ptr %94, %91
  br i1 %95, label %96, label %92

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !8
  br label %97

97:                                               ; preds = %154, %96
  %98 = load i32, ptr %16, align 4, !tbaa !8
  %99 = load i32, ptr %2, align 4, !tbaa !8
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %157

102:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !8
  br label %103

103:                                              ; preds = %126, %102
  %104 = load i32, ptr %18, align 4, !tbaa !8
  %105 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %106 = trunc i64 %105 to i32
  %107 = icmp slt i32 %104, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %103
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %129

109:                                              ; preds = %103
  %110 = load i32, ptr %16, align 4, !tbaa !8
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !8
  %114 = load i32, ptr %18, align 4, !tbaa !8
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %115) #7
  %117 = load i32, ptr %116, align 4, !tbaa !8
  %118 = srem i32 %113, %117
  %119 = icmp eq i32 %118, 0
  br i1 %119, label %120, label %125

120:                                              ; preds = %109
  %121 = load i32, ptr %18, align 4, !tbaa !8
  %122 = shl i32 1, %121
  %123 = load i32, ptr %17, align 4, !tbaa !8
  %124 = or i32 %123, %122
  store i32 %124, ptr %17, align 4, !tbaa !8
  br label %125

125:                                              ; preds = %120, %109
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %18, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %18, align 4, !tbaa !8
  br label %103, !llvm.loop !15

129:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !8
  br label %130

130:                                              ; preds = %146, %129
  %131 = load i32, ptr %19, align 4, !tbaa !8
  %132 = icmp slt i32 %131, 512
  br i1 %132, label %134, label %133

133:                                              ; preds = %130
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %153

134:                                              ; preds = %130
  %135 = load i32, ptr %19, align 4, !tbaa !8
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [512 x %"class.std::vector"], ptr %15, i64 0, i64 %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %138 = load i32, ptr %19, align 4, !tbaa !8
  %139 = load i32, ptr %17, align 4, !tbaa !8
  %140 = and i32 %138, %139
  store i32 %140, ptr %21, align 4, !tbaa !8
  %141 = load i32, ptr %16, align 4, !tbaa !8
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [300 x i32], ptr %4, i64 0, i64 %142
  invoke void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %143)
          to label %144 unwind label %149

144:                                              ; preds = %134
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %137, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %145 unwind label %149

145:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %19, align 4, !tbaa !8
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %19, align 4, !tbaa !8
  br label %130, !llvm.loop !16

149:                                              ; preds = %144, %134
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %11, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %206

153:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %16, align 4, !tbaa !8
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %16, align 4, !tbaa !8
  br label %97, !llvm.loop !17

157:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 2048, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !8
  br label %158

158:                                              ; preds = %164, %157
  %159 = load i32, ptr %23, align 4, !tbaa !8
  %160 = load i32, ptr %13, align 4, !tbaa !8
  %161 = icmp sle i32 %159, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  store i32 23, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %167

163:                                              ; preds = %158
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %23, align 4, !tbaa !8
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %23, align 4, !tbaa !8
  br label %158, !llvm.loop !18

167:                                              ; preds = %162
  %168 = load i32, ptr %13, align 4, !tbaa !8
  %169 = add nsw i32 %168, 1
  %170 = getelementptr inbounds [512 x %"class.std::vector"], ptr %15, i64 0, i64 0
  %171 = load i32, ptr %13, align 4, !tbaa !8
  %172 = load i32, ptr %8, align 4, !tbaa !8
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [300 x i32], ptr %4, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !8
  invoke void @_Z3dijiPSt6vectorISt4pairIiiESaIS1_EEiRA512_ii(i32 noundef %169, ptr noundef %170, i32 noundef %171, ptr noundef nonnull align 4 dereferenceable(2048) %22, i32 noundef %175)
          to label %176 unwind label %187

176:                                              ; preds = %167
  %177 = getelementptr inbounds [512 x i32], ptr %22, i64 0, i64 0
  %178 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %177)
          to label %179 unwind label %187

179:                                              ; preds = %176
  %180 = load i32, ptr %178, align 4, !tbaa !8
  store i32 %180, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !8
  br label %181

181:                                              ; preds = %192, %179
  %182 = load i32, ptr %24, align 4, !tbaa !8
  %183 = load i32, ptr %13, align 4, !tbaa !8
  %184 = add nsw i32 %183, 1
  %185 = icmp slt i32 %182, %184
  br i1 %185, label %191, label %186

186:                                              ; preds = %181
  store i32 26, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %195

187:                                              ; preds = %176, %167
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %11, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 2048, ptr %22) #7
  br label %206

191:                                              ; preds = %181
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %24, align 4, !tbaa !8
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %24, align 4, !tbaa !8
  br label %181, !llvm.loop !19

195:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 2048, ptr %22) #7
  %196 = getelementptr inbounds [512 x %"class.std::vector"], ptr %15, i32 0, i32 0
  %197 = getelementptr inbounds %"class.std::vector", ptr %196, i64 512
  br label %198

198:                                              ; preds = %198, %195
  %199 = phi ptr [ %197, %195 ], [ %200, %198 ]
  %200 = getelementptr inbounds %"class.std::vector", ptr %199, i64 -1
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %200) #7
  %201 = icmp eq ptr %200, %196
  br i1 %201, label %202, label %198

202:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 12288, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %8, align 4, !tbaa !8
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %8, align 4, !tbaa !8
  br label %60, !llvm.loop !20

206:                                              ; preds = %187, %149
  %207 = getelementptr inbounds [512 x %"class.std::vector"], ptr %15, i32 0, i32 0
  %208 = getelementptr inbounds %"class.std::vector", ptr %207, i64 512
  br label %209

209:                                              ; preds = %209, %206
  %210 = phi ptr [ %208, %206 ], [ %211, %209 ]
  %211 = getelementptr inbounds %"class.std::vector", ptr %210, i64 -1
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %211) #7
  %212 = icmp eq ptr %211, %207
  br i1 %212, label %213, label %209

213:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 12288, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %214

214:                                              ; preds = %213, %77
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %226

215:                                              ; preds = %64
  %216 = load i32, ptr %7, align 4, !tbaa !8
  %217 = icmp eq i32 %216, 2147483647
  br i1 %217, label %218, label %219

218:                                              ; preds = %215
  br label %221

219:                                              ; preds = %215
  %220 = load i32, ptr %7, align 4, !tbaa !8
  br label %221

221:                                              ; preds = %219, %218
  %222 = phi i32 [ -1, %218 ], [ %220, %219 ]
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %222)
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %223, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %225 = load i32, ptr %1, align 4
  ret i32 %225

226:                                              ; preds = %214
  %227 = load ptr, ptr %11, align 8
  %228 = load i32, ptr %12, align 4
  %229 = insertvalue { ptr, i32 } poison, ptr %227, 0
  %230 = insertvalue { ptr, i32 } %229, i32 %228, 1
  resume { ptr, i32 } %230
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #5 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_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 #5 align 2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

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

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dijiPSt6vectorISt4pairIiiESaIS1_EEiRA512_ii(i32 noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(2048), i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4pfaciRSt6vectorIiSaIiEE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca [300 x i32], align 16
  %3 = alloca [300 x i32], align 16
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca [512 x %"class.std::vector"], align 16
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca i32, align 4
  %9 = alloca [512 x i32], align 16
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %3) #7
  %17 = load i32, ptr %1, align 4, !tbaa !8
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge.thread

.preheader62:                                     ; preds = %.lr.ph
  %19 = icmp sgt i32 %22, 0
  br i1 %19, label %.lr.ph66, label %._crit_edge.thread

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %20 = getelementptr inbounds [300 x i32], ptr %2, i64 0, i64 %indvars.iv
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr %1, align 4, !tbaa !8
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %.preheader62, !llvm.loop !11

._crit_edge.thread:                               ; preds = %.preheader62, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 2147483647, ptr %4, align 4, !tbaa !8
  br label %._crit_edge81.thread

._crit_edge:                                      ; preds = %.lr.ph66
  %25 = icmp sgt i32 %29, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 2147483647, ptr %4, align 4, !tbaa !8
  br i1 %25, label %.lr.ph80, label %._crit_edge81.thread

.lr.ph80:                                         ; preds = %._crit_edge
  %26 = getelementptr inbounds i8, ptr %6, i64 12288
  br label %37

.lr.ph66:                                         ; preds = %.preheader62, %.lr.ph66
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph66 ], [ 0, %.preheader62 ]
  %27 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %indvars.iv83
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %29 = load i32, ptr %1, align 4, !tbaa !8
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next84, %30
  br i1 %31, label %.lr.ph66, label %._crit_edge, !llvm.loop !13

._crit_edge81:                                    ; preds = %95
  %.pre = load i32, ptr %4, align 4
  %.pre.fr = freeze i32 %.pre
  %32 = icmp eq i32 %.pre.fr, 2147483647
  br i1 %32, label %._crit_edge81.thread, label %33

._crit_edge81.thread:                             ; preds = %._crit_edge.thread, %._crit_edge, %._crit_edge81
  br label %33

33:                                               ; preds = %._crit_edge81, %._crit_edge81.thread
  %34 = phi i32 [ -1, %._crit_edge81.thread ], [ %.pre.fr, %._crit_edge81 ]
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %34)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

37:                                               ; preds = %.lr.ph80, %95
  %indvars.iv95 = phi i64 [ 0, %.lr.ph80 ], [ %indvars.iv.next96, %95 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %38 = getelementptr inbounds [300 x i32], ptr %2, i64 0, i64 %indvars.iv95
  %39 = load i32, ptr %38, align 4, !tbaa !8
  invoke void @_Z4pfaciRSt6vectorIiSaIiEE(i32 noundef %39, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %.preheader61 unwind label %43

.preheader61:                                     ; preds = %37
  %40 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %41 = trunc i64 %40 to i32
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph69, label %._crit_edge70

._crit_edge70:                                    ; preds = %.lr.ph69, %.preheader61
  %.044.lcssa = phi i32 [ 0, %.preheader61 ], [ %46, %.lr.ph69 ]
  call void @llvm.lifetime.start.p0(i64 12288, ptr nonnull %6) #7
  br label %51

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

.lr.ph69:                                         ; preds = %.preheader61, %.lr.ph69
  %.04368 = phi i32 [ %47, %.lr.ph69 ], [ 0, %.preheader61 ]
  %.04467 = phi i32 [ %46, %.lr.ph69 ], [ 0, %.preheader61 ]
  %45 = shl nuw i32 1, %.04368
  %46 = or i32 %45, %.04467
  %47 = add nuw nsw i32 %.04368, 1
  %48 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %49 = trunc i64 %48 to i32
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %.lr.ph69, label %._crit_edge70, !llvm.loop !14

51:                                               ; preds = %51, %._crit_edge70
  %.idx = phi i64 [ 0, %._crit_edge70 ], [ %.add, %51 ]
  %.ptr = getelementptr inbounds i8, ptr %6, i64 %.idx
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr) #7
  %.add = add nuw nsw i64 %.idx, 24
  %52 = icmp eq i64 %.add, 12288
  br i1 %52, label %.preheader60, label %51

.preheader60:                                     ; preds = %51
  %53 = load i32, ptr %1, align 4, !tbaa !8
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.preheader59, label %._crit_edge77

.preheader59:                                     ; preds = %.preheader60, %75
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %75 ], [ 0, %.preheader60 ]
  %55 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %56 = trunc i64 %55 to i32
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %.lr.ph73, label %.preheader

.lr.ph73:                                         ; preds = %.preheader59
  %58 = getelementptr inbounds [300 x i32], ptr %2, i64 0, i64 %indvars.iv92
  br label %63

._crit_edge77:                                    ; preds = %75, %.preheader60
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %9) #7
  %59 = add nsw i32 %.044.lcssa, 1
  %60 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %indvars.iv95
  %61 = load i32, ptr %60, align 4, !tbaa !8
  invoke void @_Z3dijiPSt6vectorISt4pairIiiESaIS1_EEiRA512_ii(i32 noundef %59, ptr noundef nonnull %6, i32 noundef %.044.lcssa, ptr noundef nonnull align 4 dereferenceable(2048) %9, i32 noundef %61)
          to label %86 unwind label %89

.preheader:                                       ; preds = %63, %.preheader59
  %.041.lcssa = phi i32 [ 0, %.preheader59 ], [ %.1, %63 ]
  %62 = getelementptr inbounds [300 x i32], ptr %3, i64 0, i64 %indvars.iv92
  br label %79

63:                                               ; preds = %.lr.ph73, %63
  %indvars.iv86 = phi i64 [ 0, %.lr.ph73 ], [ %indvars.iv.next87, %63 ]
  %.04171 = phi i32 [ 0, %.lr.ph73 ], [ %.1, %63 ]
  %64 = load i32, ptr %58, align 4, !tbaa !8
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv86) #7
  %66 = load i32, ptr %65, align 4, !tbaa !8
  %67 = srem i32 %64, %66
  %68 = icmp eq i32 %67, 0
  %69 = trunc nuw nsw i64 %indvars.iv86 to i32
  %70 = shl nuw i32 1, %69
  %71 = select i1 %68, i32 %70, i32 0
  %.1 = or i32 %71, %.04171
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %72 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %sext = shl i64 %72, 32
  %73 = ashr exact i64 %sext, 32
  %74 = icmp slt i64 %indvars.iv.next87, %73
  br i1 %74, label %63, label %.preheader, !llvm.loop !15

75:                                               ; preds = %83
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %76 = load i32, ptr %1, align 4, !tbaa !8
  %77 = sext i32 %76 to i64
  %78 = icmp slt i64 %indvars.iv.next93, %77
  br i1 %78, label %.preheader59, label %._crit_edge77, !llvm.loop !16

79:                                               ; preds = %.preheader, %83
  %indvars.iv89 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next90, %83 ]
  %80 = getelementptr inbounds [512 x %"class.std::vector"], ptr %6, i64 0, i64 %indvars.iv89
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %81 = trunc nuw nsw i64 %indvars.iv89 to i32
  %82 = and i32 %.041.lcssa, %81
  store i32 %82, ptr %8, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %62)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %80, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %83 unwind label %84

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next90, 512
  br i1 %exitcond.not, label %75, label %79, !llvm.loop !17

84:                                               ; preds = %79
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %99

86:                                               ; preds = %._crit_edge77
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %88 = load i32, ptr %87, align 4, !tbaa !8
  store i32 %88, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %9) #7
  br label %91

89:                                               ; preds = %._crit_edge77
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %9) #7
  br label %99

91:                                               ; preds = %91, %86
  %92 = phi ptr [ %26, %86 ], [ %93, %91 ]
  %93 = getelementptr inbounds i8, ptr %92, i64 -24
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %93) #7
  %94 = icmp eq ptr %93, %6
  br i1 %94, label %95, label %91

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 12288, ptr nonnull %6) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %96 = load i32, ptr %1, align 4, !tbaa !8
  %97 = sext i32 %96 to i64
  %98 = icmp slt i64 %indvars.iv.next96, %97
  br i1 %98, label %37, label %._crit_edge81, !llvm.loop !18

99:                                               ; preds = %89, %84
  %.pn = phi { ptr, i32 } [ %85, %84 ], [ %90, %89 ]
  br label %100

100:                                              ; preds = %100, %99
  %101 = phi ptr [ %26, %99 ], [ %102, %100 ]
  %102 = getelementptr inbounds i8, ptr %101, i64 -24
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %102) #7
  %103 = icmp eq ptr %102, %6
  br i1 %103, label %104, label %100

104:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 12288, ptr nonnull %6) #7
  br label %105

105:                                              ; preds = %104, %43
  %.pn.pn = phi { ptr, i32 } [ %.pn, %104 ], [ %44, %43 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #5 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_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 #5 align 2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

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

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

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

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

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


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