; LLVM IR from eyangch/competitive-programming :: Codeforces/1551 (f)

; 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<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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@MOD = external dso_local global i64, align 8
@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@graph = external dso_local global [100 x %"class.std::vector"], align 16
@subtl = external dso_local global %"class.std::vector", align 8
@dp = external dso_local global [101 x [101 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsxxx(i64 noundef, i64 noundef, i64 noundef) #0

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  %26 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %28

28:                                               ; preds = %222, %72, %0
  %29 = load i64, ptr @T, align 8, !tbaa !8
  %30 = add nsw i64 %29, -1
  store i64 %30, ptr @T, align 8, !tbaa !8
  %31 = icmp ne i64 %29, 0
  br i1 %31, label %32, label %226

32:                                               ; preds = %28
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(8) @K)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %35

35:                                               ; preds = %43, %32
  %36 = load i64, ptr %2, align 8, !tbaa !8
  %37 = load i64, ptr @N, align 8, !tbaa !8
  %38 = icmp slt i64 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %46

40:                                               ; preds = %35
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %41
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #7
  br label %43

43:                                               ; preds = %40
  %44 = load i64, ptr %2, align 8, !tbaa !8
  %45 = add nsw i64 %44, 1
  store i64 %45, ptr %2, align 8, !tbaa !8
  br label %35, !llvm.loop !11

46:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %47

47:                                               ; preds = %66, %46
  %48 = load i64, ptr %3, align 8, !tbaa !8
  %49 = load i64, ptr @N, align 8, !tbaa !8
  %50 = sub nsw i64 %49, 1
  %51 = icmp slt i64 %48, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %69

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %56 = load i64, ptr %4, align 8, !tbaa !8
  %57 = sub nsw i64 %56, 1
  %58 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %59 = load i64, ptr %5, align 8, !tbaa !8
  %60 = sub nsw i64 %59, 1
  store i64 %60, ptr %6, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %61 = load i64, ptr %5, align 8, !tbaa !8
  %62 = sub nsw i64 %61, 1
  %63 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %64 = load i64, ptr %4, align 8, !tbaa !8
  %65 = sub nsw i64 %64, 1
  store i64 %65, ptr %7, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %63, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %66

66:                                               ; preds = %53
  %67 = load i64, ptr %3, align 8, !tbaa !8
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %3, align 8, !tbaa !8
  br label %47, !llvm.loop !13

69:                                               ; preds = %52
  %70 = load i64, ptr @K, align 8, !tbaa !8
  %71 = icmp eq i64 %70, 2
  br i1 %71, label %72, label %80

72:                                               ; preds = %69
  %73 = load i64, ptr @N, align 8, !tbaa !8
  %74 = load i64, ptr @N, align 8, !tbaa !8
  %75 = sub nsw i64 %74, 1
  %76 = mul nsw i64 %73, %75
  %77 = sdiv i64 %76, 2
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %77)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %78, i8 noundef signext 10)
  br label %28, !llvm.loop !14

80:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %81

81:                                               ; preds = %219, %80
  %82 = load i64, ptr %9, align 8, !tbaa !8
  %83 = load i64, ptr @N, align 8, !tbaa !8
  %84 = icmp slt i64 %82, %83
  br i1 %84, label %86, label %85

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

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %87

87:                                               ; preds = %108, %86
  %88 = load i64, ptr %11, align 8, !tbaa !8
  %89 = icmp slt i64 %88, 101
  br i1 %89, label %91, label %90

90:                                               ; preds = %87
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %111

91:                                               ; preds = %87
  %92 = load i64, ptr %11, align 8, !tbaa !8
  %93 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %92
  %94 = getelementptr inbounds [101 x i64], ptr %93, i64 0, i64 0
  store i64 1, ptr %94, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 1, ptr %12, align 8, !tbaa !8
  br label %95

95:                                               ; preds = %104, %91
  %96 = load i64, ptr %12, align 8, !tbaa !8
  %97 = icmp slt i64 %96, 101
  br i1 %97, label %99, label %98

98:                                               ; preds = %95
  store i32 16, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %107

99:                                               ; preds = %95
  %100 = load i64, ptr %11, align 8, !tbaa !8
  %101 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %100
  %102 = load i64, ptr %12, align 8, !tbaa !8
  %103 = getelementptr inbounds [101 x i64], ptr %101, i64 0, i64 %102
  store i64 -100000000000000000, ptr %103, align 8, !tbaa !8
  br label %104

104:                                              ; preds = %99
  %105 = load i64, ptr %12, align 8, !tbaa !8
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %12, align 8, !tbaa !8
  br label %95, !llvm.loop !15

107:                                              ; preds = %98
  br label %108

108:                                              ; preds = %107
  %109 = load i64, ptr %11, align 8, !tbaa !8
  %110 = add nsw i64 %109, 1
  store i64 %110, ptr %11, align 8, !tbaa !8
  br label %87, !llvm.loop !16

111:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %112 = load i64, ptr %9, align 8, !tbaa !8
  %113 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %112
  store ptr %113, ptr %13, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %114 = load ptr, ptr %13, align 8, !tbaa !17
  %115 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #7
  %116 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %115, ptr %116, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %117 = load ptr, ptr %13, align 8, !tbaa !17
  %118 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %117) #7
  %119 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %118, ptr %119, align 8
  br label %120

120:                                              ; preds = %197, %111
  %121 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %121, label %123, label %122

122:                                              ; preds = %120
  store i32 19, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %199

123:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %125 = load i64, ptr %124, align 8, !tbaa !8
  store i64 %125, ptr %16, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @subtl) #7
  %126 = load i64, ptr %16, align 8, !tbaa !8
  %127 = load i64, ptr %9, align 8, !tbaa !8
  call void @_Z3dfsxxx(i64 noundef %126, i64 noundef 0, i64 noundef %127)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 0, ptr %17, align 8, !tbaa !8
  br label %128

128:                                              ; preds = %193, %123
  %129 = load i64, ptr %17, align 8, !tbaa !8
  %130 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @subtl) #7
  %131 = icmp slt i64 %129, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %128
  store i32 21, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %196

133:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %134 = load i64, ptr @K, align 8, !tbaa !8
  store i64 %134, ptr %18, align 8, !tbaa !8
  br label %135

135:                                              ; preds = %189, %133
  %136 = load i64, ptr %18, align 8, !tbaa !8
  %137 = icmp sge i64 %136, 0
  br i1 %137, label %139, label %138

138:                                              ; preds = %135
  store i32 24, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %192

139:                                              ; preds = %135
  %140 = load i64, ptr %17, align 8, !tbaa !8
  %141 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %140
  %142 = load i64, ptr %18, align 8, !tbaa !8
  %143 = getelementptr inbounds [101 x i64], ptr %141, i64 0, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !8
  %145 = sitofp i64 %144 to double
  %146 = fcmp oeq double %145, -1.000000e+17
  br i1 %146, label %147, label %148

147:                                              ; preds = %139
  br label %189

148:                                              ; preds = %139
  %149 = load i64, ptr %17, align 8, !tbaa !8
  %150 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %149
  %151 = load i64, ptr %18, align 8, !tbaa !8
  %152 = add nsw i64 %151, 1
  %153 = getelementptr inbounds [101 x i64], ptr %150, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !8
  %155 = sitofp i64 %154 to double
  %156 = fcmp oeq double %155, -1.000000e+17
  br i1 %156, label %157, label %163

157:                                              ; preds = %148
  %158 = load i64, ptr %17, align 8, !tbaa !8
  %159 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %158
  %160 = load i64, ptr %18, align 8, !tbaa !8
  %161 = add nsw i64 %160, 1
  %162 = getelementptr inbounds [101 x i64], ptr %159, i64 0, i64 %161
  store i64 0, ptr %162, align 8, !tbaa !8
  br label %163

163:                                              ; preds = %157, %148
  %164 = load i64, ptr %17, align 8, !tbaa !8
  %165 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %164
  %166 = load i64, ptr %18, align 8, !tbaa !8
  %167 = add nsw i64 %166, 1
  %168 = getelementptr inbounds [101 x i64], ptr %165, i64 0, i64 %167
  %169 = load i64, ptr %168, align 8, !tbaa !8
  %170 = load i64, ptr %17, align 8, !tbaa !8
  %171 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %170
  %172 = load i64, ptr %18, align 8, !tbaa !8
  %173 = getelementptr inbounds [101 x i64], ptr %171, i64 0, i64 %172
  %174 = load i64, ptr %173, align 8, !tbaa !8
  %175 = load i64, ptr %17, align 8, !tbaa !8
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @subtl, i64 noundef %175) #7
  %177 = load i64, ptr %176, align 8, !tbaa !8
  %178 = mul nsw i64 %174, %177
  %179 = load i64, ptr @MOD, align 8, !tbaa !8
  %180 = srem i64 %178, %179
  %181 = add nsw i64 %169, %180
  %182 = load i64, ptr @MOD, align 8, !tbaa !8
  %183 = srem i64 %181, %182
  %184 = load i64, ptr %17, align 8, !tbaa !8
  %185 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %184
  %186 = load i64, ptr %18, align 8, !tbaa !8
  %187 = add nsw i64 %186, 1
  %188 = getelementptr inbounds [101 x i64], ptr %185, i64 0, i64 %187
  store i64 %183, ptr %188, align 8, !tbaa !8
  br label %189

189:                                              ; preds = %163, %147
  %190 = load i64, ptr %18, align 8, !tbaa !8
  %191 = add nsw i64 %190, -1
  store i64 %191, ptr %18, align 8, !tbaa !8
  br label %135, !llvm.loop !19

192:                                              ; preds = %138
  br label %193

193:                                              ; preds = %192
  %194 = load i64, ptr %17, align 8, !tbaa !8
  %195 = add nsw i64 %194, 1
  store i64 %195, ptr %17, align 8, !tbaa !8
  br label %128, !llvm.loop !20

196:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %197

197:                                              ; preds = %196
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %120

199:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store i64 0, ptr %19, align 8, !tbaa !8
  br label %200

200:                                              ; preds = %215, %199
  %201 = load i64, ptr %19, align 8, !tbaa !8
  %202 = icmp slt i64 %201, 101
  br i1 %202, label %204, label %203

203:                                              ; preds = %200
  store i32 27, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %218

204:                                              ; preds = %200
  %205 = load i64, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !8
  %206 = load i64, ptr %19, align 8, !tbaa !8
  %207 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %206
  %208 = load i64, ptr @K, align 8, !tbaa !8
  %209 = getelementptr inbounds [101 x i64], ptr %207, i64 0, i64 %208
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %209)
  %211 = load i64, ptr %210, align 8, !tbaa !8
  %212 = add nsw i64 %205, %211
  %213 = load i64, ptr @MOD, align 8, !tbaa !8
  %214 = srem i64 %212, %213
  store i64 %214, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %215

215:                                              ; preds = %204
  %216 = load i64, ptr %19, align 8, !tbaa !8
  %217 = add nsw i64 %216, 1
  store i64 %217, ptr %19, align 8, !tbaa !8
  br label %200, !llvm.loop !21

218:                                              ; preds = %203
  br label %219

219:                                              ; preds = %218
  %220 = load i64, ptr %9, align 8, !tbaa !8
  %221 = add nsw i64 %220, 1
  store i64 %221, ptr %9, align 8, !tbaa !8
  br label %81, !llvm.loop !22

222:                                              ; preds = %85
  %223 = load i64, ptr %8, align 8, !tbaa !8
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %223)
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %224, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %28, !llvm.loop !14

226:                                              ; preds = %28
  %227 = load i32, ptr %1, align 4
  ret i32 %227
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !10, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !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<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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@MOD = external dso_local local_unnamed_addr global i64, align 8
@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@graph = external dso_local global [100 x %"class.std::vector"], align 16
@subtl = external dso_local global %"class.std::vector", align 8
@dp = external dso_local global [101 x [101 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsxxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: 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 #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca i64, align 8
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %15 = load i64, ptr @T, align 8, !tbaa !8
  %16 = add nsw i64 %15, -1
  store i64 %16, ptr @T, align 8, !tbaa !8
  %.not76 = icmp eq i64 %15, 0
  br i1 %.not76, label %._crit_edge79, label %.lr.ph78

.lr.ph78:                                         ; preds = %0, %.backedge
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %19 = load i64, ptr @N, align 8, !tbaa !8
  %20 = icmp sgt i64 %19, 0
  br i1 %20, label %.lr.ph, label %.preheader51.thread

.preheader51.thread:                              ; preds = %.lr.ph78
  %21 = add nsw i64 %19, -1
  br label %._crit_edge

.preheader51:                                     ; preds = %.lr.ph
  %22 = add nsw i64 %26, -1
  %23 = icmp sgt i64 %26, 1
  br i1 %23, label %.lr.ph55, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph78, %.lr.ph
  %.04353 = phi i64 [ %25, %.lr.ph ], [ 0, %.lr.ph78 ]
  %24 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %.04353
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %25 = add nuw nsw i64 %.04353, 1
  %26 = load i64, ptr @N, align 8, !tbaa !8
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %.lr.ph, label %.preheader51, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph55, %.preheader51.thread, %.preheader51
  %28 = phi i64 [ %26, %.preheader51 ], [ %19, %.preheader51.thread ], [ %45, %.lr.ph55 ]
  %.lcssa = phi i64 [ %22, %.preheader51 ], [ %21, %.preheader51.thread ], [ %46, %.lr.ph55 ]
  %29 = load i64, ptr @K, align 8, !tbaa !8
  %30 = icmp eq i64 %29, 2
  br i1 %30, label %48, label %.preheader50

.preheader50:                                     ; preds = %._crit_edge
  %31 = icmp sgt i64 %28, 0
  br i1 %31, label %.preheader, label %.backedge

.lr.ph55:                                         ; preds = %.preheader51, %.lr.ph55
  %.04454 = phi i64 [ %44, %.lr.ph55 ], [ 0, %.preheader51 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %34 = load i64, ptr %1, align 8, !tbaa !8
  %35 = add nsw i64 %34, -1
  %36 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %37 = load i64, ptr %2, align 8, !tbaa !8
  %38 = add nsw i64 %37, -1
  store i64 %38, ptr %3, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %39 = load i64, ptr %2, align 8, !tbaa !8
  %40 = add nsw i64 %39, -1
  %41 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %42 = load i64, ptr %1, align 8, !tbaa !8
  %43 = add nsw i64 %42, -1
  store i64 %43, ptr %4, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %44 = add nuw nsw i64 %.04454, 1
  %45 = load i64, ptr @N, align 8, !tbaa !8
  %46 = add nsw i64 %45, -1
  %47 = icmp slt i64 %44, %46
  br i1 %47, label %.lr.ph55, label %._crit_edge, !llvm.loop !13

48:                                               ; preds = %._crit_edge
  %49 = mul nsw i64 %.lcssa, %28
  %50 = sdiv i64 %49, 2
  br label %.backedge

.backedge:                                        ; preds = %146, %.preheader50, %48
  %.sink89 = phi i64 [ %50, %48 ], [ 0, %.preheader50 ], [ %157, %146 ]
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.sink89)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %51, i8 noundef signext 10)
  %53 = load i64, ptr @T, align 8, !tbaa !8
  %54 = add nsw i64 %53, -1
  store i64 %54, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %53, 0
  br i1 %.not, label %._crit_edge79, label %.lr.ph78, !llvm.loop !14

.preheader:                                       ; preds = %.preheader50, %146
  %.04773 = phi i64 [ %147, %146 ], [ 0, %.preheader50 ]
  %.04872 = phi i64 [ %157, %146 ], [ 0, %.preheader50 ]
  br label %vector.ph

55:                                               ; preds = %vector.ph
  %56 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %.04773
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %57 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #7
  store ptr %57, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %58 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #7
  store ptr %58, ptr %6, align 8
  %59 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %59, label %.lr.ph68, label %._crit_edge69

vector.ph:                                        ; preds = %.preheader, %vector.ph
  %.04658 = phi i64 [ 0, %.preheader ], [ %111, %vector.ph ]
  %60 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658
  store i64 1, ptr %60, align 8, !tbaa !8
  %61 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 1
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %61, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %62, align 8, !tbaa !8
  %63 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 5
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %63, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %64, align 8, !tbaa !8
  %65 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 9
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %65, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %66, align 8, !tbaa !8
  %67 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 13
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %67, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %68, align 8, !tbaa !8
  %69 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 17
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %69, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %70, align 8, !tbaa !8
  %71 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 21
  %72 = getelementptr inbounds i8, ptr %71, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %71, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %72, align 8, !tbaa !8
  %73 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 25
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %73, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %74, align 8, !tbaa !8
  %75 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 29
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %75, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %76, align 8, !tbaa !8
  %77 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 33
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %77, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %78, align 8, !tbaa !8
  %79 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 37
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %79, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %80, align 8, !tbaa !8
  %81 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 41
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %81, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %82, align 8, !tbaa !8
  %83 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 45
  %84 = getelementptr inbounds i8, ptr %83, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %83, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %84, align 8, !tbaa !8
  %85 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 49
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %85, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %86, align 8, !tbaa !8
  %87 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 53
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %87, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %88, align 8, !tbaa !8
  %89 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 57
  %90 = getelementptr inbounds i8, ptr %89, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %89, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %90, align 8, !tbaa !8
  %91 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 61
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %91, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %92, align 8, !tbaa !8
  %93 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 65
  %94 = getelementptr inbounds i8, ptr %93, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %93, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %94, align 8, !tbaa !8
  %95 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 69
  %96 = getelementptr inbounds i8, ptr %95, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %95, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %96, align 8, !tbaa !8
  %97 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 73
  %98 = getelementptr inbounds i8, ptr %97, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %97, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %98, align 8, !tbaa !8
  %99 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 77
  %100 = getelementptr inbounds i8, ptr %99, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %99, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %100, align 8, !tbaa !8
  %101 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 81
  %102 = getelementptr inbounds i8, ptr %101, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %101, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %102, align 8, !tbaa !8
  %103 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 85
  %104 = getelementptr inbounds i8, ptr %103, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %103, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %104, align 8, !tbaa !8
  %105 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 89
  %106 = getelementptr inbounds i8, ptr %105, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %105, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %106, align 8, !tbaa !8
  %107 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 93
  %108 = getelementptr inbounds i8, ptr %107, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %107, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %108, align 8, !tbaa !8
  %109 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04658, i64 97
  %110 = getelementptr inbounds i8, ptr %109, i64 16
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %109, align 8, !tbaa !8
  store <2 x i64> <i64 -100000000000000000, i64 -100000000000000000>, ptr %110, align 8, !tbaa !8
  %111 = add nuw nsw i64 %.04658, 1
  %exitcond83.not = icmp eq i64 %111, 101
  br i1 %exitcond83.not, label %55, label %vector.ph, !llvm.loop !15

._crit_edge69:                                    ; preds = %._crit_edge66, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %150

.lr.ph68:                                         ; preds = %55, %._crit_edge66
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %113 = load i64, ptr %112, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @subtl) #7
  call void @_Z3dfsxxx(i64 noundef %113, i64 noundef 0, i64 noundef %.04773)
  %114 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @subtl) #7
  %115 = icmp sgt i64 %114, 0
  br i1 %115, label %.lr.ph65, label %._crit_edge66

._crit_edge66:                                    ; preds = %._crit_edge62, %.lr.ph68
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %117 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %117, label %.lr.ph68, label %._crit_edge69

.lr.ph65:                                         ; preds = %.lr.ph68, %._crit_edge62
  %.04263 = phi i64 [ %120, %._crit_edge62 ], [ 0, %.lr.ph68 ]
  %118 = load i64, ptr @K, align 8, !tbaa !8
  %119 = icmp sgt i64 %118, -1
  br i1 %119, label %.lr.ph61, label %._crit_edge62

._crit_edge62:                                    ; preds = %143, %.lr.ph65
  %120 = add nuw nsw i64 %.04263, 1
  %121 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @subtl) #7
  %122 = icmp slt i64 %120, %121
  br i1 %122, label %.lr.ph65, label %._crit_edge66, !llvm.loop !16

.lr.ph61:                                         ; preds = %.lr.ph65, %143
  %.04159 = phi i64 [ %144, %143 ], [ %118, %.lr.ph65 ]
  %123 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04263, i64 %.04159
  %124 = load i64, ptr %123, align 8, !tbaa !8
  %125 = sitofp i64 %124 to double
  %126 = fcmp oeq double %125, -1.000000e+17
  br i1 %126, label %143, label %127

127:                                              ; preds = %.lr.ph61
  %128 = add nuw nsw i64 %.04159, 1
  %129 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.04263, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !8
  %131 = sitofp i64 %130 to double
  %132 = fcmp oeq double %131, -1.000000e+17
  br i1 %132, label %133, label %134

133:                                              ; preds = %127
  store i64 0, ptr %129, align 8, !tbaa !8
  br label %134

134:                                              ; preds = %133, %127
  %135 = phi i64 [ 0, %133 ], [ %130, %127 ]
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @subtl, i64 noundef %.04263) #7
  %137 = load i64, ptr %136, align 8, !tbaa !8
  %138 = mul nsw i64 %137, %124
  %139 = load i64, ptr @MOD, align 8, !tbaa !8
  %140 = srem i64 %138, %139
  %141 = add nsw i64 %140, %135
  %142 = srem i64 %141, %139
  store i64 %142, ptr %129, align 8, !tbaa !8
  br label %143

143:                                              ; preds = %.lr.ph61, %134
  %144 = add nsw i64 %.04159, -1
  %145 = icmp sgt i64 %.04159, 0
  br i1 %145, label %.lr.ph61, label %._crit_edge62, !llvm.loop !17

146:                                              ; preds = %150
  %147 = add nuw nsw i64 %.04773, 1
  %148 = load i64, ptr @N, align 8, !tbaa !8
  %149 = icmp slt i64 %147, %148
  br i1 %149, label %.preheader, label %.backedge, !llvm.loop !18

150:                                              ; preds = %._crit_edge69, %150
  %.071 = phi i64 [ 0, %._crit_edge69 ], [ %158, %150 ]
  %.170 = phi i64 [ %.04872, %._crit_edge69 ], [ %157, %150 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  %151 = load i64, ptr @K, align 8, !tbaa !8
  %152 = getelementptr inbounds [101 x [101 x i64]], ptr @dp, i64 0, i64 %.071, i64 %151
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %152)
  %154 = load i64, ptr %153, align 8, !tbaa !8
  %155 = add nsw i64 %154, %.170
  %156 = load i64, ptr @MOD, align 8, !tbaa !8
  %157 = srem i64 %155, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %158 = add nuw nsw i64 %.071, 1
  %exitcond84.not = icmp eq i64 %158, 101
  br i1 %exitcond84.not, label %146, label %150, !llvm.loop !19

._crit_edge79:                                    ; preds = %.backedge, %0
  ret i32 0
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

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

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

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

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

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


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