; LLVM IR from duc0/ContestNeko :: CPPProjects (Matrix)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::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.Matrix = type { %"class.std::vector.0", i32, i32 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<ModInt<int, 1000000007>>, std::allocator<std::vector<ModInt<int, 1000000007>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<ModInt<int, 1000000007>>, std::allocator<std::vector<ModInt<int, 1000000007>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<ModInt<int, 1000000007>>, std::allocator<std::vector<ModInt<int, 1000000007>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<ModInt<int, 1000000007>>, std::allocator<std::vector<ModInt<int, 1000000007>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.ModInt = type { i32 }

@n = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@d = external dso_local global %"class.std::vector", align 8
@cnt = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %class.Matrix, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %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 %class.Matrix, align 8
  %14 = alloca %class.ModInt, align 4
  store i32 0, ptr %1, align 4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) @x)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %34, %0
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %37

24:                                               ; preds = %19
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %26) #7
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %30) #7
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %33 = load i32, ptr %32, align 4, !tbaa !5
  store i32 %33, ptr %2, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %24
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %3, align 4, !tbaa !5
  br label %19, !llvm.loop !9

37:                                               ; preds = %23
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %40)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %55, %37
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %48) #7
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %51) #7
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %52, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %46
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %4, align 4, !tbaa !5
  br label %41, !llvm.loop !11

58:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  call void @_ZN6MatrixI6ModIntIiLi1000000007EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  invoke void @_ZN6MatrixI6ModIntIiLi1000000007EEE4initEii(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %60, i32 noundef %62)
          to label %63 unwind label %75

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  %64 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
          to label %65 unwind label %79

65:                                               ; preds = %63
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef 0) #7
  %67 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ModIntIiLi1000000007EEaSERKi(ptr noundef nonnull align 4 dereferenceable(4) %66, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %68 unwind label %79

68:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %93, %68
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 1
  %73 = icmp sle i32 %70, %72
  br i1 %73, label %83, label %74

74:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %100

75:                                               ; preds = %58
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %6, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %7, align 4
  br label %170

79:                                               ; preds = %65, %63
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %6, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %170

83:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %84)
          to label %86 unwind label %96

86:                                               ; preds = %83
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %89) #7
  %91 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ModIntIiLi1000000007EEaSERKi(ptr noundef nonnull align 4 dereferenceable(4) %90, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %92 unwind label %96

92:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %9, align 4, !tbaa !5
  br label %69, !llvm.loop !12

96:                                               ; preds = %86, %83
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %6, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %170

100:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  %101 = load i32, ptr %2, align 4, !tbaa !5
  %102 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %101)
          to label %103 unwind label %112

103:                                              ; preds = %100
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef 0) #7
  %105 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ModIntIiLi1000000007EEaSERKi(ptr noundef nonnull align 4 dereferenceable(4) %104, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %106 unwind label %112

106:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %131, %106
  %108 = load i32, ptr %12, align 4, !tbaa !5
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = icmp sle i32 %108, %109
  br i1 %110, label %116, label %111

111:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %138

112:                                              ; preds = %103, %100
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %6, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %170

116:                                              ; preds = %107
  %117 = load i32, ptr %2, align 4, !tbaa !5
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = sub nsw i32 %117, %118
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %121) #7
  %123 = load i32, ptr %2, align 4, !tbaa !5
  %124 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %123)
          to label %125 unwind label %134

125:                                              ; preds = %116
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %127) #7
  %129 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ModIntIiLi1000000007EEaSERKi(ptr noundef nonnull align 4 dereferenceable(4) %128, ptr noundef nonnull align 4 dereferenceable(4) %122)
          to label %130 unwind label %134

130:                                              ; preds = %125
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %12, align 4, !tbaa !5
  br label %107, !llvm.loop !13

134:                                              ; preds = %125, %116
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %6, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %170

138:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  %139 = load i32, ptr @x, align 4, !tbaa !5
  invoke void @_ZNK6MatrixI6ModIntIiLi1000000007EEE5powerEi(ptr dead_on_unwind writable sret(%class.Matrix) align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %139)
          to label %140 unwind label %162

140:                                              ; preds = %138
  %141 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @_ZN6MatrixI6ModIntIiLi1000000007EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %142 = load i32, ptr %2, align 4, !tbaa !5
  %143 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %142)
          to label %144 unwind label %166

144:                                              ; preds = %140
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef 0) #7
  %146 = load i32, ptr %2, align 4, !tbaa !5
  %147 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %146)
          to label %148 unwind label %166

148:                                              ; preds = %144
  %149 = load i32, ptr %2, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %147, i64 noundef %150) #7
  %152 = invoke i32 @_ZNK6ModIntIiLi1000000007EEplIS0_EES0_RKT_(ptr noundef nonnull align 4 dereferenceable(4) %145, ptr noundef nonnull align 4 dereferenceable(4) %151)
          to label %153 unwind label %166

153:                                              ; preds = %148
  %154 = getelementptr inbounds %class.ModInt, ptr %14, i32 0, i32 0
  store i32 %152, ptr %154, align 4
  %155 = invoke noundef i32 @_ZNK6ModIntIiLi1000000007EE3getEv(ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %156 unwind label %166

156:                                              ; preds = %153
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %155)
          to label %158 unwind label %166

158:                                              ; preds = %156
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %157, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %160 unwind label %166

160:                                              ; preds = %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  store i32 0, ptr %1, align 4
  call void @_ZN6MatrixI6ModIntIiLi1000000007EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %161 = load i32, ptr %1, align 4
  ret i32 %161

162:                                              ; preds = %138
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %6, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %170

166:                                              ; preds = %158, %156, %153, %148, %144, %140
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %6, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %170

170:                                              ; preds = %166, %162, %134, %112, %96, %79, %75
  call void @_ZN6MatrixI6ModIntIiLi1000000007EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %171

171:                                              ; preds = %170
  %172 = load ptr, ptr %6, align 8
  %173 = load i32, ptr %7, align 4
  %174 = insertvalue { ptr, i32 } poison, ptr %172, 0
  %175 = insertvalue { ptr, i32 } %174, i32 %173, 1
  resume { ptr, i32 } %175
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6MatrixI6ModIntIiLi1000000007EEE4initEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6MatrixI6ModIntIiLi1000000007EEE5powerEi(ptr dead_on_unwind noalias writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::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.Matrix = type { %"class.std::vector.0", i32, i32 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<ModInt<int, 1000000007>>, std::allocator<std::vector<ModInt<int, 1000000007>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<ModInt<int, 1000000007>>, std::allocator<std::vector<ModInt<int, 1000000007>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<ModInt<int, 1000000007>>, std::allocator<std::vector<ModInt<int, 1000000007>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<ModInt<int, 1000000007>>, std::allocator<std::vector<ModInt<int, 1000000007>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.ModInt = type { i32 }

@n = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@d = external dso_local global %"class.std::vector", align 8
@cnt = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %class.Matrix, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %class.Matrix, align 8
  %7 = alloca %class.ModInt, align 4
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) @x)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %11)
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %14 = add nsw i32 %23, 1
  %15 = sext i32 %14 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %16 = phi i64 [ %15, %._crit_edge.loopexit ], [ 1, %0 ]
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %16)
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph27, label %._crit_edge28

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %indvars.iv) #7
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %indvars.iv) #7
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %23 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %23, ptr %1, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %indvars.iv.next, %25
  br i1 %26, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !9

._crit_edge28:                                    ; preds = %.lr.ph27, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZN6MatrixI6ModIntIiLi1000000007EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  invoke void @_ZN6MatrixI6ModIntIiLi1000000007EEE4initEii(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %28, i32 noundef %28)
          to label %38 unwind label %47

.lr.ph27:                                         ; preds = %._crit_edge, %.lr.ph27
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %.lr.ph27 ], [ 0, %._crit_edge ]
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %indvars.iv42) #7
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %31) #7
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %32, align 4, !tbaa !5
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next43, %36
  br i1 %37, label %.lr.ph27, label %._crit_edge28, !llvm.loop !11

38:                                               ; preds = %._crit_edge28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  %39 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 0)
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef 0) #7
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ModIntIiLi1000000007EEaSERKi(ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %42 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not29 = icmp sgt i32 %42, 1
  br i1 %.not.not29, label %.lr.ph32, label %._crit_edge33

._crit_edge33:                                    ; preds = %.lr.ph32, %38
  %.lcssa = phi i32 [ %42, %38 ], [ %53, %.lr.ph32 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 1, ptr %5, align 4, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %.lcssa)
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef 0) #7
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ModIntIiLi1000000007EEaSERKi(ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %.not34 = icmp slt i32 %46, 1
  br i1 %.not34, label %._crit_edge38, label %.lr.ph37

47:                                               ; preds = %._crit_edge28
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %88

.lr.ph32:                                         ; preds = %38, %.lr.ph32
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %.lr.ph32 ], [ 1, %38 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  %49 = trunc nuw nsw i64 %indvars.iv45 to i32
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %49)
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %indvars.iv.next46) #7
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ModIntIiLi1000000007EEaSERKi(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %.not.not = icmp slt i64 %indvars.iv.next46, %54
  br i1 %.not.not, label %.lr.ph32, label %._crit_edge33, !llvm.loop !12

._crit_edge38:                                    ; preds = %.lr.ph37, %._crit_edge33
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  %55 = load i32, ptr @x, align 4, !tbaa !5
  invoke void @_ZNK6MatrixI6ModIntIiLi1000000007EEE5powerEi(ptr dead_on_unwind nonnull writable sret(%class.Matrix) align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %55)
          to label %67 unwind label %84

.lr.ph37:                                         ; preds = %._crit_edge33, %.lr.ph37
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %.lr.ph37 ], [ 1, %._crit_edge33 ]
  %56 = phi i32 [ %65, %.lr.ph37 ], [ %46, %._crit_edge33 ]
  %57 = trunc nuw nsw i64 %indvars.iv48 to i32
  %reass.sub = sub i32 %56, %57
  %58 = add i32 %reass.sub, 1
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %59) #7
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %61)
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %indvars.iv48) #7
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ModIntIiLi1000000007EEaSERKi(ptr noundef nonnull align 4 dereferenceable(4) %63, ptr noundef nonnull align 4 dereferenceable(4) %60)
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %65 = load i32, ptr %1, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %.not.not39 = icmp slt i64 %indvars.iv48, %66
  br i1 %.not.not39, label %.lr.ph37, label %._crit_edge38, !llvm.loop !13

67:                                               ; preds = %._crit_edge38
  %68 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZN6MatrixI6ModIntIiLi1000000007EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %69)
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef 0) #7
  %72 = load i32, ptr %1, align 4, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef %72)
  %74 = load i32, ptr %1, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6ModIntIiLi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #7
  %77 = invoke i32 @_ZNK6ModIntIiLi1000000007EEplIS0_EES0_RKT_(ptr noundef nonnull align 4 dereferenceable(4) %71, ptr noundef nonnull align 4 dereferenceable(4) %76)
          to label %78 unwind label %86

78:                                               ; preds = %67
  store i32 %77, ptr %7, align 4
  %79 = call noundef i32 @_ZNK6ModIntIiLi1000000007EE3getEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %79)
          to label %81 unwind label %86

81:                                               ; preds = %78
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %83 unwind label %86

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @_ZN6MatrixI6ModIntIiLi1000000007EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

84:                                               ; preds = %._crit_edge38
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %88

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

88:                                               ; preds = %86, %84, %47
  %.pn = phi { ptr, i32 } [ %87, %86 ], [ %85, %84 ], [ %48, %47 ]
  call void @_ZN6MatrixI6ModIntIiLi1000000007EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6MatrixI6ModIntIiLi1000000007EEE4initEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6MatrixI6ModIntIiLi1000000007EEE5powerEi(ptr dead_on_unwind noalias writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN6MatrixI6ModIntIiLi1000000007EEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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