; LLVM IR from kazunetakahashi/atcoder :: 2019/0720_ABC134/past/F.ll (Z12maxi_strangev)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.4" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4calcRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24)) #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 speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12maxi_strangev(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0) #3 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i1, align 1
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::allocator.4", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca %"class.std::vector.0", align 8
  %20 = alloca %"struct.std::_Bit_reference", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::_Bit_reference", align 8
  %23 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %2, align 8
  store i1 false, ptr %3, align 1
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #4
  %24 = load i32, ptr @N, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %26 unwind label %32

26:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %189, %26
  %28 = load i32, ptr %9, align 4, !tbaa !5
  %29 = load i32, ptr @N, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %36, label %31

31:                                               ; preds = %27
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %201

32:                                               ; preds = %1
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %7, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  br label %203

36:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %37 = load i32, ptr @N, align 4, !tbaa !5
  %38 = sub nsw i32 %37, 1
  store i32 %38, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %62, %36
  %40 = load i32, ptr %13, align 4, !tbaa !5
  %41 = load i32, ptr @N, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 5, ptr %10, align 4
  br label %65

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %45 = load i32, ptr %13, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %46)
          to label %48 unwind label %57

48:                                               ; preds = %44
  %49 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %50 = extractvalue { ptr, i64 } %47, 0
  store ptr %50, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %52 = extractvalue { ptr, i64 } %47, 1
  store i64 %52, ptr %51, align 8
  %53 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  %54 = xor i1 %53, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  br i1 %54, label %55, label %61

55:                                               ; preds = %48
  %56 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %56, ptr %11, align 4, !tbaa !5
  store i32 5, ptr %10, align 4
  br label %65

57:                                               ; preds = %44
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %7, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %200

61:                                               ; preds = %48
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %13, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %13, align 4, !tbaa !5
  br label %39, !llvm.loop !11

65:                                               ; preds = %55, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %66

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %67 = load i32, ptr @N, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  store i32 %68, ptr %15, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %91, %66
  %70 = load i32, ptr %15, align 4, !tbaa !5
  %71 = icmp sge i32 %70, 0
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 8, ptr %10, align 4
  br label %94

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %74 = load i32, ptr %15, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %75)
          to label %77 unwind label %86

77:                                               ; preds = %73
  %78 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %79 = extractvalue { ptr, i64 } %76, 0
  store ptr %79, ptr %78, align 8
  %80 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %81 = extractvalue { ptr, i64 } %76, 1
  store i64 %81, ptr %80, align 8
  %82 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #4
  %83 = xor i1 %82, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  br i1 %83, label %84, label %90

84:                                               ; preds = %77
  %85 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %85, ptr %12, align 4, !tbaa !5
  store i32 8, ptr %10, align 4
  br label %94

86:                                               ; preds = %73
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %7, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %200

90:                                               ; preds = %77
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %15, align 4, !tbaa !5
  %93 = add nsw i32 %92, -1
  store i32 %93, ptr %15, align 4, !tbaa !5
  br label %69, !llvm.loop !13

94:                                               ; preds = %84, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %174, %95
  %97 = load i32, ptr %12, align 4, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = sub nsw i32 %97, %98
  %100 = call i32 @llvm.abs.i32(i32 %99, i1 true)
  %101 = icmp sgt i32 %100, 1
  br i1 %101, label %102, label %178

102:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %103 = load i32, ptr %12, align 4, !tbaa !5
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = add nsw i32 %103, %104
  %106 = sdiv i32 %105, 2
  store i32 %106, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %107 unwind label %124

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %108 unwind label %128

108:                                              ; preds = %107
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %109 unwind label %132

109:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %110 = load i32, ptr %17, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %19, i64 noundef %111)
          to label %113 unwind label %136

113:                                              ; preds = %109
  %114 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %115 = extractvalue { ptr, i64 } %112, 0
  store ptr %115, ptr %114, align 8
  %116 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %117 = extractvalue { ptr, i64 } %112, 1
  store i64 %117, ptr %116, align 8
  %118 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %20, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %162, %113
  %120 = load i32, ptr %21, align 4, !tbaa !5
  %121 = load i32, ptr @N, align 4, !tbaa !5
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %140, label %123

123:                                              ; preds = %119
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %166

124:                                              ; preds = %102
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %7, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %8, align 4
  br label %177

128:                                              ; preds = %107
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %7, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %8, align 4
  br label %176

132:                                              ; preds = %108
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %7, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %8, align 4
  br label %175

136:                                              ; preds = %109
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %7, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  br label %175

140:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #4
  %141 = load i32, ptr %21, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %19, i64 noundef %142)
          to label %144 unwind label %153

144:                                              ; preds = %140
  %145 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %146 = extractvalue { ptr, i64 } %143, 0
  store ptr %146, ptr %145, align 8
  %147 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %148 = extractvalue { ptr, i64 } %143, 1
  store i64 %148, ptr %147, align 8
  %149 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #4
  %150 = xor i1 %149, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #4
  br i1 %150, label %151, label %161

151:                                              ; preds = %144
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %152 unwind label %157

152:                                              ; preds = %151
  br label %161

153:                                              ; preds = %140
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %7, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #4
  br label %165

157:                                              ; preds = %151
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %7, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %8, align 4
  br label %165

161:                                              ; preds = %152, %144
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %21, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %21, align 4, !tbaa !5
  br label %119, !llvm.loop !14

165:                                              ; preds = %157, %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %175

166:                                              ; preds = %123
  %167 = call noundef i32 @_Z4calcRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %18)
  %168 = load i32, ptr @K, align 4, !tbaa !5
  %169 = icmp sle i32 %167, %168
  br i1 %169, label %170, label %172

170:                                              ; preds = %166
  %171 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %171, ptr %11, align 4, !tbaa !5
  br label %174

172:                                              ; preds = %166
  %173 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %173, ptr %12, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %172, %170
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %96, !llvm.loop !15

175:                                              ; preds = %165, %136, %132
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #4
  br label %176

176:                                              ; preds = %175, %128
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  br label %177

177:                                              ; preds = %176, %124
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %200

178:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #4
  %179 = load i32, ptr %11, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %180)
          to label %182 unwind label %192

182:                                              ; preds = %178
  %183 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %184 = extractvalue { ptr, i64 } %181, 0
  store ptr %184, ptr %183, align 8
  %185 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %186 = extractvalue { ptr, i64 } %181, 1
  store i64 %186, ptr %185, align 8
  %187 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %23, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %188 unwind label %196

188:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %9, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %9, align 4, !tbaa !5
  br label %27, !llvm.loop !16

192:                                              ; preds = %178
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %7, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  br label %200

196:                                              ; preds = %182
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %7, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %8, align 4
  br label %200

200:                                              ; preds = %196, %192, %177, %86, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  br label %203

201:                                              ; preds = %31
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #4
  %202 = load i1, ptr %3, align 1
  br i1 %202, label %205, label %204

203:                                              ; preds = %200, %32
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %206

204:                                              ; preds = %201
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %205

205:                                              ; preds = %204, %201
  ret void

206:                                              ; preds = %203
  %207 = load ptr, ptr %7, align 8
  %208 = load i32, ptr %8, align 4
  %209 = insertvalue { ptr, i32 } poison, ptr %207, 0
  %210 = insertvalue { ptr, i32 } %209, i32 %208, 1
  resume { ptr, i32 } %210
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !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}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.4" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@N = external dso_local local_unnamed_addr global i32, align 4
@K = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4calcRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24)) 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 speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12maxi_strangev(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector") align 8 %0) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca i8, align 1
  %4 = alloca %"class.std::allocator.4", align 1
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_Bit_reference", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  tail call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #4
  %15 = load i32, ptr @N, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #4
  store i8 0, ptr %3, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %16, ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %17 unwind label %25

17:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  %18 = load i32, ptr @N, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph49, label %._crit_edge50

.lr.ph49:                                         ; preds = %17
  %20 = getelementptr inbounds i8, ptr %6, i64 8
  %21 = getelementptr inbounds i8, ptr %7, i64 8
  %22 = getelementptr inbounds i8, ptr %11, i64 8
  %23 = getelementptr inbounds i8, ptr %13, i64 8
  %24 = getelementptr inbounds i8, ptr %14, i64 8
  br label %27

._crit_edge50:                                    ; preds = %120, %17
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #4
  ret void

25:                                               ; preds = %1
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  br label %129

27:                                               ; preds = %.lr.ph49, %120
  %28 = phi i32 [ %18, %.lr.ph49 ], [ %122, %120 ]
  %.01647 = phi i32 [ 0, %.lr.ph49 ], [ %121, %120 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  %29 = add nsw i32 %28, -1
  %30 = icmp sgt i32 %28, 0
  br i1 %30, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %27, %40
  %indvars.iv = phi i64 [ %indvars.iv.next, %40 ], [ 0, %27 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  %31 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %indvars.iv)
          to label %32 unwind label %38

32:                                               ; preds = %.lr.ph
  %33 = extractvalue { ptr, i64 } %31, 0
  store ptr %33, ptr %6, align 8
  %34 = extractvalue { ptr, i64 } %31, 1
  store i64 %34, ptr %20, align 8
  %35 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  br i1 %35, label %40, label %36

36:                                               ; preds = %32
  %37 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %37, ptr %5, align 4, !tbaa !5
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %.loopexit

38:                                               ; preds = %.lr.ph
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  br label %128

40:                                               ; preds = %32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = load i32, ptr @N, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next, %42
  br i1 %43, label %.lr.ph, label %.loopexit, !llvm.loop !11

.loopexit:                                        ; preds = %40, %27, %36
  %44 = phi i32 [ %28, %27 ], [ %.pre, %36 ], [ %41, %40 ]
  %45 = zext i32 %44 to i64
  br label %46

46:                                               ; preds = %52, %.loopexit
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %52 ], [ %45, %.loopexit ]
  %indvars.iv.next56 = add nsw i64 %indvars.iv55, -1
  %47 = trunc nuw i64 %indvars.iv55 to i32
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %49, label %.split.loop.exit62

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %50 = and i64 %indvars.iv.next56, 4294967295
  %51 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %50)
          to label %52 unwind label %56

52:                                               ; preds = %49
  %53 = extractvalue { ptr, i64 } %51, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i64 } %51, 1
  store i64 %54, ptr %21, align 8
  %55 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br i1 %55, label %46, label %.split.loop.exit, !llvm.loop !13

56:                                               ; preds = %49
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %128

.split.loop.exit:                                 ; preds = %52
  %indvars.le = trunc i64 %indvars.iv.next56 to i32
  br label %.split.loop.exit62

.split.loop.exit62:                               ; preds = %46, %.split.loop.exit
  %.015 = phi i32 [ %indvars.le, %.split.loop.exit ], [ %29, %46 ]
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sub nsw i32 %.015, %58
  %60 = call i32 @llvm.abs.i32(i32 %59, i1 true)
  %61 = icmp ugt i32 %60, 1
  br i1 %61, label %.lr.ph45, label %._crit_edge46

.lr.ph45:                                         ; preds = %.split.loop.exit62, %106
  %62 = phi i32 [ %107, %106 ], [ %58, %.split.loop.exit62 ]
  %.143 = phi i32 [ %.2, %106 ], [ %.015, %.split.loop.exit62 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %63 = add nsw i32 %62, %.143
  %64 = sdiv i32 %63, 2
  store i32 %64, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %65 unwind label %80

65:                                               ; preds = %.lr.ph45
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %66 unwind label %82

66:                                               ; preds = %65
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %67 unwind label %84

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #4
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %69)
          to label %71 unwind label %86

71:                                               ; preds = %67
  %72 = extractvalue { ptr, i64 } %70, 0
  store ptr %72, ptr %11, align 8
  %73 = extractvalue { ptr, i64 } %70, 1
  store i64 %73, ptr %22, align 8
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  %75 = load i32, ptr @N, align 4, !tbaa !5
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %.lr.ph42, label %._crit_edge

._crit_edge:                                      ; preds = %99, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  %77 = call noundef i32 @_Z4calcRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %78 = load i32, ptr @K, align 4, !tbaa !5
  %.not = icmp sgt i32 %77, %78
  %79 = load i32, ptr %8, align 4, !tbaa !5
  br i1 %.not, label %106, label %105

80:                                               ; preds = %.lr.ph45
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %113

82:                                               ; preds = %65
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %112

84:                                               ; preds = %66
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %111

86:                                               ; preds = %67
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #4
  br label %111

.lr.ph42:                                         ; preds = %71, %99
  %storemerge41 = phi i32 [ %101, %99 ], [ 0, %71 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #4
  %88 = sext i32 %storemerge41 to i64
  %89 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %88)
          to label %90 unwind label %95

90:                                               ; preds = %.lr.ph42
  %91 = extractvalue { ptr, i64 } %89, 0
  store ptr %91, ptr %13, align 8
  %92 = extractvalue { ptr, i64 } %89, 1
  store i64 %92, ptr %23, align 8
  %93 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #4
  br i1 %93, label %99, label %94

94:                                               ; preds = %90
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %99 unwind label %97

95:                                               ; preds = %.lr.ph42
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #4
  br label %104

97:                                               ; preds = %94
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %104

99:                                               ; preds = %90, %94
  %100 = load i32, ptr %12, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %12, align 4, !tbaa !5
  %102 = load i32, ptr @N, align 4, !tbaa !5
  %103 = icmp slt i32 %101, %102
  br i1 %103, label %.lr.ph42, label %._crit_edge, !llvm.loop !14

104:                                              ; preds = %97, %95
  %.pn = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  br label %111

105:                                              ; preds = %._crit_edge
  store i32 %79, ptr %5, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %._crit_edge, %105
  %.2 = phi i32 [ %.143, %105 ], [ %79, %._crit_edge ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = sub nsw i32 %.2, %107
  %109 = call i32 @llvm.abs.i32(i32 %108, i1 true)
  %110 = icmp ugt i32 %109, 1
  br i1 %110, label %.lr.ph45, label %._crit_edge46, !llvm.loop !15

111:                                              ; preds = %104, %86, %84
  %.pn.pn = phi { ptr, i32 } [ %.pn, %104 ], [ %87, %86 ], [ %85, %84 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #4
  br label %112

112:                                              ; preds = %111, %82
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %111 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %113

113:                                              ; preds = %112, %80
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %112 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br label %128

._crit_edge46:                                    ; preds = %106, %.split.loop.exit62
  %.lcssa = phi i32 [ %58, %.split.loop.exit62 ], [ %107, %106 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #4
  %114 = sext i32 %.lcssa to i64
  %115 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %114)
          to label %116 unwind label %124

116:                                              ; preds = %._crit_edge46
  %117 = extractvalue { ptr, i64 } %115, 0
  store ptr %117, ptr %14, align 8
  %118 = extractvalue { ptr, i64 } %115, 1
  store i64 %118, ptr %24, align 8
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %14, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #4
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %120 unwind label %126

120:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %121 = add nuw nsw i32 %.01647, 1
  %122 = load i32, ptr @N, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %27, label %._crit_edge50, !llvm.loop !16

124:                                              ; preds = %._crit_edge46
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #4
  br label %128

126:                                              ; preds = %116
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %128

128:                                              ; preds = %126, %124, %113, %56, %38
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %113 ], [ %127, %126 ], [ %125, %124 ], [ %57, %56 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #4
  br label %129

129:                                              ; preds = %128, %25
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %128 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !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}


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