; LLVM IR from xirc/cp-algorithm :: atcoder/abc099/D/main.ll (Z5solvev)

; 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<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.std::allocator.2" = type { i8 }

@N = external dso_local global i32, align 4
@C = external dso_local global i32, align 4
@DD = external dso_local global %"class.std::vector", align 8
@CC = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = alloca %"class.std::vector.5", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::allocator.7", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::allocator.2", align 1
  %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 i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #4
  %19 = load i32, ptr @C, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %20, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %21 unwind label %28

21:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  call void @_ZNSaISt6vectorIxSaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %22 unwind label %32

22:                                               ; preds = %21
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %100, %22
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = load i32, ptr @C, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %37, label %27

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

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %5, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %6, align 4
  br label %36

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

36:                                               ; preds = %32, %28
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #4
  br label %174

37:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %96, %37
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 3
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %99

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

43:                                               ; preds = %92, %42
  %44 = load i32, ptr %11, align 4, !tbaa !5
  %45 = load i32, ptr @N, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %95

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %88, %48
  %50 = load i32, ptr %12, align 4, !tbaa !5
  %51 = load i32, ptr @N, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %91

54:                                               ; preds = %49
  %55 = load i32, ptr %11, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  %57 = load i32, ptr %12, align 4, !tbaa !5
  %58 = add nsw i32 %56, %57
  %59 = add nsw i32 %58, 1
  %60 = srem i32 %59, 3
  %61 = load i32, ptr %10, align 4, !tbaa !5
  %62 = icmp ne i32 %60, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %54
  br label %88

64:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @CC, i64 noundef %66) #4
  %68 = load i32, ptr %12, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #4
  %71 = load i32, ptr %70, align 4, !tbaa !5
  store i32 %71, ptr %13, align 4, !tbaa !5
  %72 = load i32, ptr %13, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @DD, i64 noundef %73) #4
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #4
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %81) #4
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #4
  %86 = load i64, ptr %85, align 8, !tbaa !9
  %87 = add nsw i64 %86, %79
  store i64 %87, ptr %85, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %88

88:                                               ; preds = %64, %63
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %12, align 4, !tbaa !5
  br label %49, !llvm.loop !11

91:                                               ; preds = %53
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %11, align 4, !tbaa !5
  br label %43, !llvm.loop !13

95:                                               ; preds = %47
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %10, align 4, !tbaa !5
  br label %38, !llvm.loop !14

99:                                               ; preds = %41
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %8, align 4, !tbaa !5
  br label %23, !llvm.loop !15

103:                                              ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %104 = call noundef i64 @_ZNSt14numeric_limitsIxE3maxEv() #4
  store i64 %104, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %169, %103
  %106 = load i32, ptr %15, align 4, !tbaa !5
  %107 = load i32, ptr @C, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %172

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

111:                                              ; preds = %165, %110
  %112 = load i32, ptr %16, align 4, !tbaa !5
  %113 = load i32, ptr @C, align 4, !tbaa !5
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %168

116:                                              ; preds = %111
  %117 = load i32, ptr %16, align 4, !tbaa !5
  %118 = load i32, ptr %15, align 4, !tbaa !5
  %119 = icmp eq i32 %117, %118
  br i1 %119, label %120, label %121

120:                                              ; preds = %116
  br label %165

121:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %157, %121
  %123 = load i32, ptr %17, align 4, !tbaa !5
  %124 = load i32, ptr @C, align 4, !tbaa !5
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %164

127:                                              ; preds = %122
  %128 = load i32, ptr %17, align 4, !tbaa !5
  %129 = load i32, ptr %16, align 4, !tbaa !5
  %130 = icmp eq i32 %128, %129
  br i1 %130, label %135, label %131

131:                                              ; preds = %127
  %132 = load i32, ptr %17, align 4, !tbaa !5
  %133 = load i32, ptr %15, align 4, !tbaa !5
  %134 = icmp eq i32 %132, %133
  br i1 %134, label %135, label %136

135:                                              ; preds = %131, %127
  br label %157

136:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %137 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #4
  %138 = load i32, ptr %15, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %139) #4
  %141 = load i64, ptr %140, align 8, !tbaa !9
  %142 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #4
  %143 = load i32, ptr %16, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %142, i64 noundef %144) #4
  %146 = load i64, ptr %145, align 8, !tbaa !9
  %147 = add nsw i64 %141, %146
  %148 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #4
  %149 = load i32, ptr %17, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %148, i64 noundef %150) #4
  %152 = load i64, ptr %151, align 8, !tbaa !9
  %153 = add nsw i64 %147, %152
  store i64 %153, ptr %18, align 8, !tbaa !9
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %155 unwind label %160

155:                                              ; preds = %136
  %156 = load i64, ptr %154, align 8, !tbaa !9
  store i64 %156, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %157

157:                                              ; preds = %155, %135
  %158 = load i32, ptr %17, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %17, align 4, !tbaa !5
  br label %122, !llvm.loop !16

160:                                              ; preds = %136
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %5, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  br label %174

164:                                              ; preds = %126
  br label %165

165:                                              ; preds = %164, %120
  %166 = load i32, ptr %16, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %16, align 4, !tbaa !5
  br label %111, !llvm.loop !17

168:                                              ; preds = %115
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %15, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %15, align 4, !tbaa !5
  br label %105, !llvm.loop !18

172:                                              ; preds = %109
  %173 = load i64, ptr %14, align 8, !tbaa !9
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #4
  ret i64 %173

174:                                              ; preds = %160, %36
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #4
  br label %175

175:                                              ; preds = %174
  %176 = load ptr, ptr %5, align 8
  %177 = load i32, ptr %6, align 4
  %178 = insertvalue { ptr, i32 } poison, ptr %176, 0
  %179 = insertvalue { ptr, i32 } %178, i32 %177, 1
  resume { ptr, i32 } %179
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 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) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsIxE3maxEv() #2 align 2

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

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

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

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

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 = { 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 = { 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 #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 = !{!"long long", !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}


; 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<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.std::allocator.2" = type { i8 }

@N = external dso_local local_unnamed_addr global i32, align 4
@C = external dso_local local_unnamed_addr global i32, align 4
@DD = external dso_local global %"class.std::vector", align 8
@CC = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = alloca %"class.std::vector.5", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::allocator.7", align 1
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  %8 = load i32, ptr @C, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %9, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %10 unwind label %25

10:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaISt6vectorIxSaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %11 unwind label %27

11:                                               ; preds = %10
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @_ZNSt15__new_allocatorIxED2Ev(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 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  %12 = load i32, ptr @C, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  %14 = load i32, ptr @N, align 4
  %15 = icmp sgt i32 %14, 0
  %or.cond113 = select i1 %13, i1 %15, i1 false
  br i1 %or.cond113, label %.preheader45, label %._crit_edge52

.preheader45:                                     ; preds = %11, %.split.us
  %16 = phi i32 [ %30, %.split.us ], [ %12, %11 ]
  %17 = phi i32 [ %31, %.split.us ], [ %14, %11 ]
  %18 = phi i32 [ %32, %.split.us ], [ %14, %11 ]
  %19 = phi i32 [ %33, %.split.us ], [ %14, %11 ]
  %20 = phi i32 [ %34, %.split.us ], [ %14, %11 ]
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.split.us ], [ 0, %11 ]
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.preheader43, label %.split.us

._crit_edge52:                                    ; preds = %.split.us, %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %22 = call noundef i64 @_ZNSt14numeric_limitsIxE3maxEv() #4
  store i64 %22, ptr %6, align 8, !tbaa !9
  %23 = load i32, ptr @C, align 4
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.preheader42, label %._crit_edge60

25:                                               ; preds = %0
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

27:                                               ; preds = %10
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br label %29

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ]
  call void @_ZNSt15__new_allocatorIxED2Ev(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 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn

.split.us:                                        ; preds = %.preheader45, %._crit_edge48.2
  %30 = phi i32 [ %.pre88, %._crit_edge48.2 ], [ %16, %.preheader45 ]
  %31 = phi i32 [ %122, %._crit_edge48.2 ], [ %17, %.preheader45 ]
  %32 = phi i32 [ %123, %._crit_edge48.2 ], [ %18, %.preheader45 ]
  %33 = phi i32 [ %124, %._crit_edge48.2 ], [ %19, %.preheader45 ]
  %34 = phi i32 [ %124, %._crit_edge48.2 ], [ %20, %.preheader45 ]
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %35 = sext i32 %30 to i64
  %36 = icmp slt i64 %indvars.iv.next75, %35
  br i1 %36, label %.preheader45, label %._crit_edge52, !llvm.loop !11

.preheader43:                                     ; preds = %.preheader45, %._crit_edge
  %37 = phi i32 [ %125, %._crit_edge ], [ %17, %.preheader45 ]
  %38 = phi i32 [ %126, %._crit_edge ], [ %18, %.preheader45 ]
  %39 = phi i32 [ %127, %._crit_edge ], [ %19, %.preheader45 ]
  %40 = phi i32 [ %128, %._crit_edge ], [ %20, %.preheader45 ]
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %._crit_edge ], [ 0, %.preheader45 ]
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader43
  %42 = add nuw nsw i64 %indvars.iv68, 2
  br label %131

._crit_edge48:                                    ; preds = %._crit_edge
  %43 = icmp sgt i32 %128, 0
  br i1 %43, label %.preheader43.1, label %._crit_edge48.1

.preheader43.1:                                   ; preds = %._crit_edge48, %._crit_edge.1
  %44 = phi i32 [ %80, %._crit_edge.1 ], [ %125, %._crit_edge48 ]
  %45 = phi i32 [ %81, %._crit_edge.1 ], [ %126, %._crit_edge48 ]
  %46 = phi i32 [ %82, %._crit_edge.1 ], [ %127, %._crit_edge48 ]
  %47 = phi i32 [ %83, %._crit_edge.1 ], [ %128, %._crit_edge48 ]
  %indvars.iv68.1 = phi i64 [ %indvars.iv.next69.1, %._crit_edge.1 ], [ 0, %._crit_edge48 ]
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph.1, label %._crit_edge.1

.lr.ph.1:                                         ; preds = %.preheader43.1
  %49 = add nuw nsw i64 %indvars.iv68.1, 2
  br label %50

50:                                               ; preds = %72, %.lr.ph.1
  %51 = phi i32 [ %44, %.lr.ph.1 ], [ %73, %72 ]
  %52 = phi i32 [ %45, %.lr.ph.1 ], [ %74, %72 ]
  %53 = phi i32 [ %46, %.lr.ph.1 ], [ %75, %72 ]
  %54 = phi i32 [ %47, %.lr.ph.1 ], [ %76, %72 ]
  %55 = phi i32 [ %47, %.lr.ph.1 ], [ %77, %72 ]
  %indvars.iv.1 = phi i64 [ 0, %.lr.ph.1 ], [ %indvars.iv.next.1, %72 ]
  %56 = add nuw nsw i64 %49, %indvars.iv.1
  %57 = trunc nuw i64 %56 to i32
  %58 = urem i32 %57, 3
  %.not.1 = icmp eq i32 %58, 1
  br i1 %.not.1, label %59, label %72

59:                                               ; preds = %50
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @CC, i64 noundef %indvars.iv68.1) #4
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %indvars.iv.1) #4
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @DD, i64 noundef %63) #4
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %indvars.iv74) #4
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #4
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %indvars.iv74) #4
  %70 = load i64, ptr %69, align 8, !tbaa !9
  %71 = add nsw i64 %70, %67
  store i64 %71, ptr %69, align 8, !tbaa !9
  %.pre86 = load i32, ptr @N, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %59, %50
  %73 = phi i32 [ %.pre86, %59 ], [ %51, %50 ]
  %74 = phi i32 [ %.pre86, %59 ], [ %52, %50 ]
  %75 = phi i32 [ %.pre86, %59 ], [ %53, %50 ]
  %76 = phi i32 [ %.pre86, %59 ], [ %54, %50 ]
  %77 = phi i32 [ %.pre86, %59 ], [ %55, %50 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next.1, %78
  br i1 %79, label %50, label %._crit_edge.1, !llvm.loop !14

._crit_edge.1:                                    ; preds = %72, %.preheader43.1
  %80 = phi i32 [ %44, %.preheader43.1 ], [ %73, %72 ]
  %81 = phi i32 [ %45, %.preheader43.1 ], [ %74, %72 ]
  %82 = phi i32 [ %46, %.preheader43.1 ], [ %75, %72 ]
  %83 = phi i32 [ %47, %.preheader43.1 ], [ %76, %72 ]
  %indvars.iv.next69.1 = add nuw nsw i64 %indvars.iv68.1, 1
  %84 = sext i32 %83 to i64
  %85 = icmp slt i64 %indvars.iv.next69.1, %84
  br i1 %85, label %.preheader43.1, label %._crit_edge48.1, !llvm.loop !15

._crit_edge48.1:                                  ; preds = %._crit_edge.1, %._crit_edge48
  %86 = phi i32 [ %125, %._crit_edge48 ], [ %80, %._crit_edge.1 ]
  %87 = phi i32 [ %126, %._crit_edge48 ], [ %81, %._crit_edge.1 ]
  %88 = phi i32 [ %127, %._crit_edge48 ], [ %82, %._crit_edge.1 ]
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %.preheader43.lr.ph.2, label %._crit_edge48.2

.preheader43.lr.ph.2:                             ; preds = %._crit_edge48.1
  %90 = icmp sgt i32 %87, 0
  br i1 %90, label %.preheader43.2, label %._crit_edge48.2

.preheader43.2:                                   ; preds = %.preheader43.lr.ph.2, %._crit_edge.2
  %91 = phi i32 [ %119, %._crit_edge.2 ], [ %86, %.preheader43.lr.ph.2 ]
  %92 = phi i32 [ %119, %._crit_edge.2 ], [ %87, %.preheader43.lr.ph.2 ]
  %indvars.iv68.2 = phi i64 [ %indvars.iv.next69.2, %._crit_edge.2 ], [ 0, %.preheader43.lr.ph.2 ]
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %.lr.ph.2, label %._crit_edge.2

.lr.ph.2:                                         ; preds = %.preheader43.2
  %94 = add nuw nsw i64 %indvars.iv68.2, 2
  br label %95

95:                                               ; preds = %114, %.lr.ph.2
  %96 = phi i32 [ %91, %.lr.ph.2 ], [ %115, %114 ]
  %97 = phi i32 [ %92, %.lr.ph.2 ], [ %116, %114 ]
  %indvars.iv.2 = phi i64 [ 0, %.lr.ph.2 ], [ %indvars.iv.next.2, %114 ]
  %98 = add nuw nsw i64 %94, %indvars.iv.2
  %99 = trunc nuw i64 %98 to i32
  %100 = urem i32 %99, 3
  %.not.2 = icmp eq i32 %100, 2
  br i1 %.not.2, label %101, label %114

101:                                              ; preds = %95
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @CC, i64 noundef %indvars.iv68.2) #4
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %indvars.iv.2) #4
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @DD, i64 noundef %105) #4
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %indvars.iv74) #4
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #4
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %indvars.iv74) #4
  %112 = load i64, ptr %111, align 8, !tbaa !9
  %113 = add nsw i64 %112, %109
  store i64 %113, ptr %111, align 8, !tbaa !9
  %.pre87 = load i32, ptr @N, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %101, %95
  %115 = phi i32 [ %.pre87, %101 ], [ %96, %95 ]
  %116 = phi i32 [ %.pre87, %101 ], [ %97, %95 ]
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %117 = sext i32 %116 to i64
  %118 = icmp slt i64 %indvars.iv.next.2, %117
  br i1 %118, label %95, label %._crit_edge.2, !llvm.loop !14

._crit_edge.2:                                    ; preds = %114, %.preheader43.2
  %119 = phi i32 [ %91, %.preheader43.2 ], [ %115, %114 ]
  %indvars.iv.next69.2 = add nuw nsw i64 %indvars.iv68.2, 1
  %120 = sext i32 %119 to i64
  %121 = icmp slt i64 %indvars.iv.next69.2, %120
  br i1 %121, label %.preheader43.2, label %._crit_edge48.2, !llvm.loop !15

._crit_edge48.2:                                  ; preds = %._crit_edge.2, %.preheader43.lr.ph.2, %._crit_edge48.1
  %122 = phi i32 [ %86, %._crit_edge48.1 ], [ %86, %.preheader43.lr.ph.2 ], [ %119, %._crit_edge.2 ]
  %123 = phi i32 [ %87, %._crit_edge48.1 ], [ %87, %.preheader43.lr.ph.2 ], [ %119, %._crit_edge.2 ]
  %124 = phi i32 [ %88, %._crit_edge48.1 ], [ %87, %.preheader43.lr.ph.2 ], [ %119, %._crit_edge.2 ]
  %.pre88 = load i32, ptr @C, align 4, !tbaa !5
  br label %.split.us

._crit_edge:                                      ; preds = %153, %.preheader43
  %125 = phi i32 [ %37, %.preheader43 ], [ %154, %153 ]
  %126 = phi i32 [ %38, %.preheader43 ], [ %155, %153 ]
  %127 = phi i32 [ %39, %.preheader43 ], [ %156, %153 ]
  %128 = phi i32 [ %40, %.preheader43 ], [ %157, %153 ]
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %129 = sext i32 %128 to i64
  %130 = icmp slt i64 %indvars.iv.next69, %129
  br i1 %130, label %.preheader43, label %._crit_edge48, !llvm.loop !15

131:                                              ; preds = %.lr.ph, %153
  %132 = phi i32 [ %37, %.lr.ph ], [ %154, %153 ]
  %133 = phi i32 [ %38, %.lr.ph ], [ %155, %153 ]
  %134 = phi i32 [ %39, %.lr.ph ], [ %156, %153 ]
  %135 = phi i32 [ %40, %.lr.ph ], [ %157, %153 ]
  %136 = phi i32 [ %40, %.lr.ph ], [ %158, %153 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %153 ]
  %137 = add nuw nsw i64 %42, %indvars.iv
  %138 = trunc nuw i64 %137 to i32
  %139 = urem i32 %138, 3
  %.not = icmp eq i32 %139, 0
  br i1 %.not, label %140, label %153

140:                                              ; preds = %131
  %141 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @CC, i64 noundef %indvars.iv68) #4
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef %indvars.iv) #4
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @DD, i64 noundef %144) #4
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %indvars.iv74) #4
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #4
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %149, i64 noundef %indvars.iv74) #4
  %151 = load i64, ptr %150, align 8, !tbaa !9
  %152 = add nsw i64 %151, %148
  store i64 %152, ptr %150, align 8, !tbaa !9
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %131, %140
  %154 = phi i32 [ %132, %131 ], [ %.pre, %140 ]
  %155 = phi i32 [ %133, %131 ], [ %.pre, %140 ]
  %156 = phi i32 [ %134, %131 ], [ %.pre, %140 ]
  %157 = phi i32 [ %135, %131 ], [ %.pre, %140 ]
  %158 = phi i32 [ %136, %131 ], [ %.pre, %140 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %159 = sext i32 %158 to i64
  %160 = icmp slt i64 %indvars.iv.next, %159
  br i1 %160, label %131, label %._crit_edge, !llvm.loop !14

.preheader42:                                     ; preds = %._crit_edge52, %._crit_edge58
  %161 = phi i64 [ %165, %._crit_edge58 ], [ %22, %._crit_edge52 ]
  %162 = phi i32 [ %166, %._crit_edge58 ], [ %23, %._crit_edge52 ]
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %._crit_edge58 ], [ 0, %._crit_edge52 ]
  %163 = icmp sgt i32 %162, 0
  br i1 %163, label %.lr.ph57, label %._crit_edge58

._crit_edge60:                                    ; preds = %._crit_edge58, %._crit_edge52
  %164 = phi i64 [ %22, %._crit_edge52 ], [ %165, %._crit_edge58 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #4
  ret i64 %164

._crit_edge58:                                    ; preds = %.loopexit, %.preheader42
  %165 = phi i64 [ %161, %.preheader42 ], [ %201, %.loopexit ]
  %166 = phi i32 [ %162, %.preheader42 ], [ %202, %.loopexit ]
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %167 = sext i32 %166 to i64
  %168 = icmp slt i64 %indvars.iv.next84, %167
  br i1 %168, label %.preheader42, label %._crit_edge60, !llvm.loop !16

.lr.ph57:                                         ; preds = %.preheader42, %.loopexit
  %169 = phi i64 [ %201, %.loopexit ], [ %161, %.preheader42 ]
  %170 = phi i32 [ %202, %.loopexit ], [ %162, %.preheader42 ]
  %171 = phi i32 [ %203, %.loopexit ], [ %162, %.preheader42 ]
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.loopexit ], [ 0, %.preheader42 ]
  %172 = icmp ne i64 %indvars.iv80, %indvars.iv83
  %173 = icmp sgt i32 %171, 0
  %or.cond62 = and i1 %172, %173
  br i1 %or.cond62, label %.lr.ph54, label %.loopexit

.lr.ph54:                                         ; preds = %.lr.ph57, %194
  %174 = phi i64 [ %195, %194 ], [ %169, %.lr.ph57 ]
  %175 = phi i32 [ %196, %194 ], [ %170, %.lr.ph57 ]
  %176 = phi i32 [ %197, %194 ], [ %171, %.lr.ph57 ]
  %177 = phi i32 [ %198, %194 ], [ %171, %.lr.ph57 ]
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %194 ], [ 0, %.lr.ph57 ]
  %178 = icmp eq i64 %indvars.iv77, %indvars.iv80
  %179 = icmp eq i64 %indvars.iv77, %indvars.iv83
  %or.cond = or i1 %178, %179
  br i1 %or.cond, label %194, label %180

180:                                              ; preds = %.lr.ph54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %181 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #4
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %indvars.iv83) #4
  %183 = load i64, ptr %182, align 8, !tbaa !9
  %184 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #4
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %indvars.iv80) #4
  %186 = load i64, ptr %185, align 8, !tbaa !9
  %187 = add nsw i64 %186, %183
  %188 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #4
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %188, i64 noundef %indvars.iv77) #4
  %190 = load i64, ptr %189, align 8, !tbaa !9
  %191 = add nsw i64 %187, %190
  store i64 %191, ptr %7, align 8, !tbaa !9
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %193 = load i64, ptr %192, align 8, !tbaa !9
  store i64 %193, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  %.pre89 = load i32, ptr @C, align 4
  br label %194

194:                                              ; preds = %.lr.ph54, %180
  %195 = phi i64 [ %174, %.lr.ph54 ], [ %193, %180 ]
  %196 = phi i32 [ %175, %.lr.ph54 ], [ %.pre89, %180 ]
  %197 = phi i32 [ %176, %.lr.ph54 ], [ %.pre89, %180 ]
  %198 = phi i32 [ %177, %.lr.ph54 ], [ %.pre89, %180 ]
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %199 = sext i32 %198 to i64
  %200 = icmp slt i64 %indvars.iv.next78, %199
  br i1 %200, label %.lr.ph54, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %194, %.lr.ph57
  %201 = phi i64 [ %169, %.lr.ph57 ], [ %195, %194 ]
  %202 = phi i32 [ %170, %.lr.ph57 ], [ %196, %194 ]
  %203 = phi i32 [ %171, %.lr.ph57 ], [ %197, %194 ]
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %204 = sext i32 %203 to i64
  %205 = icmp slt i64 %indvars.iv.next81, %204
  br i1 %205, label %.lr.ph57, label %._crit_edge58, !llvm.loop !18
}

; 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 nounwind uwtable
declare dso_local void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 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 #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsIxE3maxEv() local_unnamed_addr #2 align 2

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

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

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

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

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 = { 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 = { 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 #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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !13}
!16 = distinct !{!16, !12, !13}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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