; LLVM IR from kazunetakahashi/atcoder :: 2019/0629_ABC132/past (F2)

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

%"class.std::basic_ostream" = type { ptr, %"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.mint = type { i64 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@X = external dso_local global i64, align 8
@dp = external dso_local global [100010 x [100 x %class.mint]], align 16
@dp_sum = external dso_local global [100010 x [100 x %class.mint]], align 16
@dp2 = external dso_local global [100010 x [100 x %class.mint]], align 16
@dp2_sum = external dso_local global [100010 x [100 x %class.mint]], align 16
@cnt = external dso_local global [100010 x %class.mint], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 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)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %class.mint, align 8
  %10 = alloca %class.mint, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %class.mint, align 8
  %14 = alloca i32, align 4
  %15 = alloca %class.mint, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca %class.mint, align 8
  %19 = alloca i32, align 4
  %20 = alloca %class.mint, align 8
  %21 = alloca %class.mint, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %24 = 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)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) @K)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 -1, ptr %2, align 4, !tbaa !5
  %26 = load i64, ptr @N, align 8, !tbaa !9
  %27 = call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %26)
  %28 = fadd double %27, 1.000000e+01
  %29 = fptosi double %28 to i64
  store i64 %29, ptr @X, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %69, %0
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = load i64, ptr @X, align 8, !tbaa !9
  %34 = icmp sle i64 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %30
  store i32 2, ptr %4, align 4
  br label %72

36:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %37 = load i64, ptr @N, align 8, !tbaa !9
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = sdiv i64 %37, %39
  store i64 %40, ptr %6, align 8, !tbaa !9
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) @X)
  %42 = load i64, ptr %41, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  store i64 %42, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %43 = load i64, ptr @N, align 8, !tbaa !9
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = sdiv i64 %43, %46
  store i64 %47, ptr %8, align 8, !tbaa !9
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) @X)
  %49 = load i64, ptr %48, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  store i64 %49, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %50 = load i64, ptr %5, align 8, !tbaa !9
  %51 = load i64, ptr %7, align 8, !tbaa !9
  %52 = sub nsw i64 %50, %51
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %52)
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100010 x %class.mint], ptr @cnt, i64 0, i64 %54
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %55, ptr align 8 %9, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  %56 = load i64, ptr %5, align 8, !tbaa !9
  %57 = load i64, ptr @X, align 8, !tbaa !9
  %58 = icmp eq i64 %56, %57
  br i1 %58, label %59, label %65

59:                                               ; preds = %36
  %60 = load i64, ptr %7, align 8, !tbaa !9
  %61 = load i64, ptr @X, align 8, !tbaa !9
  %62 = icmp eq i64 %60, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %59
  %64 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %64, ptr %2, align 4, !tbaa !5
  store i32 2, ptr %4, align 4
  br label %66

65:                                               ; preds = %59, %36
  store i32 0, ptr %4, align 4
  br label %66

66:                                               ; preds = %65, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  %67 = load i32, ptr %4, align 4
  switch i32 %67, label %72 [
    i32 0, label %68
  ]

68:                                               ; preds = %66
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %3, align 4, !tbaa !5
  br label %30, !llvm.loop !12

72:                                               ; preds = %66, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %73

73:                                               ; preds = %72
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.10)
  %75 = load i64, ptr @X, align 8, !tbaa !9
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %74, i64 noundef %75)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.11)
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %78, i32 noundef %79)
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef 1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 1), ptr align 8 %10, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %240, %73
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = load i64, ptr @K, align 8, !tbaa !9
  %86 = icmp slt i64 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %82
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %243

88:                                               ; preds = %82
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.12)
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %122, %88
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = load i64, ptr @X, align 8, !tbaa !9
  %97 = icmp sle i64 %95, %96
  br i1 %97, label %99, label %98

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

99:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %100 = load i32, ptr %12, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 %101
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100 x %class.mint], ptr %102, i64 0, i64 %104
  %106 = load i32, ptr %12, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp_sum, i64 0, i64 %108
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100 x %class.mint], ptr %109, i64 0, i64 %111
  %113 = call i64 @_ZNK4mintplERKS_(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull align 8 dereferenceable(8) %112)
  %114 = getelementptr inbounds %class.mint, ptr %13, i32 0, i32 0
  store i64 %113, ptr %114, align 8
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp_sum, i64 0, i64 %116
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100 x %class.mint], ptr %117, i64 0, i64 %119
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %122

122:                                              ; preds = %99
  %123 = load i32, ptr %12, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %12, align 4, !tbaa !5
  br label %93, !llvm.loop !14

125:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %154, %125
  %127 = load i32, ptr %14, align 4, !tbaa !5
  %128 = load i32, ptr %2, align 4, !tbaa !5
  %129 = icmp sle i32 %127, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %157

131:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %132 = load i32, ptr %14, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2, i64 0, i64 %133
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100 x %class.mint], ptr %134, i64 0, i64 %136
  %138 = load i32, ptr %14, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2_sum, i64 0, i64 %140
  %142 = load i32, ptr %11, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100 x %class.mint], ptr %141, i64 0, i64 %143
  %145 = call i64 @_ZNK4mintplERKS_(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef nonnull align 8 dereferenceable(8) %144)
  %146 = getelementptr inbounds %class.mint, ptr %15, i32 0, i32 0
  store i64 %145, ptr %146, align 8
  %147 = load i32, ptr %14, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2_sum, i64 0, i64 %148
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100 x %class.mint], ptr %149, i64 0, i64 %151
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %154

154:                                              ; preds = %131
  %155 = load i32, ptr %14, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %14, align 4, !tbaa !5
  br label %126, !llvm.loop !15

157:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %202, %157
  %159 = load i32, ptr %16, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = load i64, ptr @X, align 8, !tbaa !9
  %162 = icmp sle i64 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %158
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %205

164:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %165 = load i64, ptr @N, align 8, !tbaa !9
  %166 = load i32, ptr %16, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = sdiv i64 %165, %167
  store i64 %168, ptr %17, align 8, !tbaa !9
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %170 = load i64, ptr %169, align 8, !tbaa !9
  %171 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp_sum, i64 0, i64 %170
  %172 = load i32, ptr %11, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [100 x %class.mint], ptr %171, i64 0, i64 %173
  %175 = load i32, ptr %16, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 %176
  %178 = load i32, ptr %11, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [100 x %class.mint], ptr %177, i64 0, i64 %180
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef nonnull align 8 dereferenceable(8) %174)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %183 = load i32, ptr %16, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [100010 x %class.mint], ptr @cnt, i64 0, i64 %184
  %186 = load i32, ptr %16, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp_sum, i64 0, i64 %187
  %189 = load i32, ptr %11, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [100 x %class.mint], ptr %188, i64 0, i64 %190
  %192 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %185, ptr noundef nonnull align 8 dereferenceable(8) %191)
  %193 = getelementptr inbounds %class.mint, ptr %18, i32 0, i32 0
  store i64 %192, ptr %193, align 8
  %194 = load i32, ptr %16, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2, i64 0, i64 %195
  %197 = load i32, ptr %11, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [100 x %class.mint], ptr %196, i64 0, i64 %199
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %200, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %202

202:                                              ; preds = %164
  %203 = load i32, ptr %16, align 4, !tbaa !5
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %16, align 4, !tbaa !5
  br label %158, !llvm.loop !16

205:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %236, %205
  %207 = load i32, ptr %19, align 4, !tbaa !5
  %208 = load i32, ptr %2, align 4, !tbaa !5
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %206
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %239

211:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %212 = load i32, ptr %2, align 4, !tbaa !5
  %213 = sub nsw i32 %212, 1
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2_sum, i64 0, i64 %214
  %216 = load i32, ptr %11, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [100 x %class.mint], ptr %215, i64 0, i64 %217
  %219 = load i32, ptr %19, align 4, !tbaa !5
  %220 = sub nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2_sum, i64 0, i64 %221
  %223 = load i32, ptr %11, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [100 x %class.mint], ptr %222, i64 0, i64 %224
  %226 = call i64 @_ZNK4mintmiERKS_(ptr noundef nonnull align 8 dereferenceable(8) %218, ptr noundef nonnull align 8 dereferenceable(8) %225)
  %227 = getelementptr inbounds %class.mint, ptr %20, i32 0, i32 0
  store i64 %226, ptr %227, align 8
  %228 = load i32, ptr %19, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 %229
  %231 = load i32, ptr %11, align 4, !tbaa !5
  %232 = add nsw i32 %231, 1
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [100 x %class.mint], ptr %230, i64 0, i64 %233
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %234, ptr noundef nonnull align 8 dereferenceable(8) %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %236

236:                                              ; preds = %211
  %237 = load i32, ptr %19, align 4, !tbaa !5
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %19, align 4, !tbaa !5
  br label %206, !llvm.loop !17

239:                                              ; preds = %210
  br label %240

240:                                              ; preds = %239
  %241 = load i32, ptr %11, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %11, align 4, !tbaa !5
  br label %82, !llvm.loop !18

243:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %21, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %244

244:                                              ; preds = %257, %243
  %245 = load i32, ptr %22, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = load i64, ptr @X, align 8, !tbaa !9
  %248 = icmp sle i64 %246, %247
  br i1 %248, label %250, label %249

249:                                              ; preds = %244
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %260

250:                                              ; preds = %244
  %251 = load i32, ptr %22, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 %252
  %254 = load i64, ptr @K, align 8, !tbaa !9
  %255 = getelementptr inbounds [100 x %class.mint], ptr %253, i64 0, i64 %254
  %256 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %255)
  br label %257

257:                                              ; preds = %250
  %258 = load i32, ptr %22, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %22, align 4, !tbaa !5
  br label %244, !llvm.loop !19

260:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %261

261:                                              ; preds = %273, %260
  %262 = load i32, ptr %23, align 4, !tbaa !5
  %263 = load i32, ptr %2, align 4, !tbaa !5
  %264 = icmp slt i32 %262, %263
  br i1 %264, label %266, label %265

265:                                              ; preds = %261
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %276

266:                                              ; preds = %261
  %267 = load i32, ptr %23, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2, i64 0, i64 %268
  %270 = load i64, ptr @K, align 8, !tbaa !9
  %271 = getelementptr inbounds [100 x %class.mint], ptr %269, i64 0, i64 %270
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %271)
  br label %273

273:                                              ; preds = %266
  %274 = load i32, ptr %23, align 4, !tbaa !5
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr %23, align 4, !tbaa !5
  br label %261, !llvm.loop !20

276:                                              ; preds = %265
  %277 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %278 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %277, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %279 = load i32, ptr %1, align 4
  ret i32 %279
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) #6

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

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

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

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

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

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

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

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


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

%"class.std::basic_ostream" = type { ptr, %"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.mint = type { i64 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@X = external dso_local global i64, align 8
@dp = external dso_local global [100010 x [100 x %class.mint]], align 16
@dp_sum = external dso_local global [100010 x [100 x %class.mint]], align 16
@dp2 = external dso_local global [100010 x [100 x %class.mint]], align 16
@dp2_sum = external dso_local global [100010 x [100 x %class.mint]], align 16
@cnt = external dso_local global [100010 x %class.mint], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1

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

; 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 #1 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)) #0

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

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

; 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 #1 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 nounwind uwtable
declare dso_local void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #3 align 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 uwtable
declare dso_local i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8), 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 %class.mint, align 8
  %4 = alloca %class.mint, align 8
  %5 = alloca %class.mint, align 8
  %6 = alloca %class.mint, align 8
  %7 = alloca i64, align 8
  %8 = alloca %class.mint, align 8
  %9 = alloca %class.mint, align 8
  %10 = alloca %class.mint, align 8
  %11 = 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) @N)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %13 = load i64, ptr @N, align 8, !tbaa !5
  %14 = tail call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %13)
  %15 = fadd double %14, 1.000000e+01
  %16 = fptosi double %15 to i64
  store i64 %16, ptr @X, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %19, %0
  %18 = phi i64 [ %31, %19 ], [ %16, %0 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %19 ], [ 1, %0 ]
  %.not = icmp slt i64 %18, %indvars.iv
  br i1 %.not, label %.split.loop.exit, label %19

19:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %20 = load i64, ptr @N, align 8, !tbaa !5
  %21 = sdiv i64 %20, %indvars.iv
  store i64 %21, ptr %1, align 8, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) @X)
  %23 = load i64, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %24 = load i64, ptr @N, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = sdiv i64 %24, %indvars.iv.next
  store i64 %25, ptr %2, align 8, !tbaa !5
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) @X)
  %27 = load i64, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %28 = sub nsw i64 %23, %27
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %28)
  %29 = getelementptr inbounds [100010 x %class.mint], ptr @cnt, i64 0, i64 %indvars.iv
  %30 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %30, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %31 = load i64, ptr @X, align 8, !tbaa !5
  %32 = icmp ne i64 %23, %31
  %33 = icmp ne i64 %27, %31
  %or.cond.not = or i1 %32, %33
  br i1 %or.cond.not, label %17, label %.split.loop.exit133, !llvm.loop !9

.split.loop.exit133:                              ; preds = %19
  %34 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.split.loop.exit

.split.loop.exit:                                 ; preds = %17, %.split.loop.exit133
  %.2 = phi i32 [ %34, %.split.loop.exit133 ], [ -1, %17 ]
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.10)
  %36 = load i64, ptr @X, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %35, i64 noundef %36)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.11)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef %.2)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef 1)
  %42 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %42, ptr getelementptr inbounds (i8, ptr @dp, i64 800), align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %43 = load i64, ptr @K, align 8, !tbaa !5
  %44 = icmp sgt i64 %43, 0
  br i1 %44, label %.lr.ph97, label %._crit_edge98

.lr.ph97:                                         ; preds = %.split.loop.exit
  %.not7787 = icmp slt i32 %.2, 1
  %45 = icmp sgt i32 %.2, 1
  %46 = add nsw i32 %.2, -1
  %47 = sext i32 %46 to i64
  %48 = add i32 %.2, 1
  %wide.trip.count = zext i32 %48 to i64
  %wide.trip.count119 = zext nneg i32 %.2 to i64
  br label %50

._crit_edge98:                                    ; preds = %._crit_edge, %.split.loop.exit
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef 0)
  %49 = load i64, ptr @X, align 8, !tbaa !5
  %.not7599 = icmp slt i64 %49, 1
  br i1 %.not7599, label %.preheader, label %.lr.ph102

50:                                               ; preds = %.lr.ph97, %._crit_edge
  %indvars.iv121 = phi i64 [ 0, %.lr.ph97 ], [ %indvars.iv.next122.pre-phi, %._crit_edge ]
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.12)
  %52 = trunc nuw nsw i64 %indvars.iv121 to i32
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %51, i32 noundef %52)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %55 = load i64, ptr @X, align 8, !tbaa !5
  %.not7685 = icmp slt i64 %55, 1
  br i1 %.not7685, label %.preheader84, label %.lr.ph

.preheader84:                                     ; preds = %.lr.ph, %50
  %56 = phi i64 [ %55, %50 ], [ %63, %.lr.ph ]
  br i1 %.not7787, label %.preheader83, label %.lr.ph89

.lr.ph:                                           ; preds = %50, %.lr.ph
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %.lr.ph ], [ 1, %50 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %57 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 %indvars.iv107, i64 %indvars.iv121
  %58 = add nsw i64 %indvars.iv107, -1
  %59 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp_sum, i64 0, i64 %58, i64 %indvars.iv121
  %60 = call i64 @_ZNK4mintplERKS_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %59)
  store i64 %60, ptr %5, align 8
  %61 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp_sum, i64 0, i64 %indvars.iv107, i64 %indvars.iv121
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %63 = load i64, ptr @X, align 8, !tbaa !5
  %.not76.not = icmp sgt i64 %63, %indvars.iv107
  br i1 %.not76.not, label %.lr.ph, label %.preheader84, !llvm.loop !11

.preheader83.loopexit:                            ; preds = %.lr.ph89
  %.pre = load i64, ptr @X, align 8, !tbaa !5
  br label %.preheader83

.preheader83:                                     ; preds = %.preheader83.loopexit, %.preheader84
  %64 = phi i64 [ %.pre, %.preheader83.loopexit ], [ %56, %.preheader84 ]
  %.not7890 = icmp slt i64 %64, 1
  br i1 %.not7890, label %.preheader82, label %.lr.ph92

.lr.ph92:                                         ; preds = %.preheader83
  %65 = add nuw nsw i64 %indvars.iv121, 1
  br label %74

.lr.ph89:                                         ; preds = %.preheader84, %.lr.ph89
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.lr.ph89 ], [ 1, %.preheader84 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %66 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2, i64 0, i64 %indvars.iv110, i64 %indvars.iv121
  %67 = add nsw i64 %indvars.iv110, -1
  %68 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2_sum, i64 0, i64 %67, i64 %indvars.iv121
  %69 = call i64 @_ZNK4mintplERKS_(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull align 8 dereferenceable(8) %68)
  store i64 %69, ptr %6, align 8
  %70 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2_sum, i64 0, i64 %indvars.iv110, i64 %indvars.iv121
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count
  br i1 %exitcond.not, label %.preheader83.loopexit, label %.lr.ph89, !llvm.loop !12

.preheader82:                                     ; preds = %74, %.preheader83
  br i1 %45, label %.lr.ph94, label %.preheader82.._crit_edge_crit_edge

.preheader82.._crit_edge_crit_edge:               ; preds = %.preheader82
  %.pre132 = add nuw nsw i64 %indvars.iv121, 1
  br label %._crit_edge

.lr.ph94:                                         ; preds = %.preheader82
  %72 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2_sum, i64 0, i64 %47, i64 %indvars.iv121
  %73 = add nuw nsw i64 %indvars.iv121, 1
  br label %90

74:                                               ; preds = %.lr.ph92, %74
  %indvars.iv113 = phi i64 [ 1, %.lr.ph92 ], [ %indvars.iv.next114, %74 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %75 = load i64, ptr @N, align 8, !tbaa !5
  %76 = sdiv i64 %75, %indvars.iv113
  store i64 %76, ptr %7, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %78 = load i64, ptr %77, align 8, !tbaa !5
  %79 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp_sum, i64 0, i64 %78, i64 %indvars.iv121
  %80 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 %indvars.iv113, i64 %65
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull align 8 dereferenceable(8) %79)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %82 = getelementptr inbounds [100010 x %class.mint], ptr @cnt, i64 0, i64 %indvars.iv113
  %83 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp_sum, i64 0, i64 %indvars.iv113, i64 %indvars.iv121
  %84 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull align 8 dereferenceable(8) %83)
  store i64 %84, ptr %8, align 8
  %85 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2, i64 0, i64 %indvars.iv113, i64 %65
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %87 = load i64, ptr @X, align 8, !tbaa !5
  %.not78.not = icmp sgt i64 %87, %indvars.iv113
  br i1 %.not78.not, label %74, label %.preheader82, !llvm.loop !13

._crit_edge:                                      ; preds = %90, %.preheader82.._crit_edge_crit_edge
  %indvars.iv.next122.pre-phi = phi i64 [ %.pre132, %.preheader82.._crit_edge_crit_edge ], [ %73, %90 ]
  %88 = load i64, ptr @K, align 8, !tbaa !5
  %89 = icmp sgt i64 %88, %indvars.iv.next122.pre-phi
  br i1 %89, label %50, label %._crit_edge98, !llvm.loop !14

90:                                               ; preds = %.lr.ph94, %90
  %indvars.iv116 = phi i64 [ 1, %.lr.ph94 ], [ %indvars.iv.next117, %90 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %91 = add nsw i64 %indvars.iv116, -1
  %92 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2_sum, i64 0, i64 %91, i64 %indvars.iv121
  %93 = call i64 @_ZNK4mintmiERKS_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %92)
  store i64 %93, ptr %9, align 8
  %94 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 %indvars.iv116, i64 %73
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %exitcond120.not = icmp eq i64 %indvars.iv.next117, %wide.trip.count119
  br i1 %exitcond120.not, label %._crit_edge, label %90, !llvm.loop !15

.preheader:                                       ; preds = %.lr.ph102, %._crit_edge98
  %96 = icmp sgt i32 %.2, 1
  br i1 %96, label %.lr.ph104.preheader, label %._crit_edge105

.lr.ph104.preheader:                              ; preds = %.preheader
  %wide.trip.count130 = zext nneg i32 %.2 to i64
  br label %.lr.ph104

.lr.ph102:                                        ; preds = %._crit_edge98, %.lr.ph102
  %indvars.iv124 = phi i64 [ %indvars.iv.next125, %.lr.ph102 ], [ 1, %._crit_edge98 ]
  %97 = load i64, ptr @K, align 8, !tbaa !5
  %98 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp, i64 0, i64 %indvars.iv124, i64 %97
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %98)
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %100 = load i64, ptr @X, align 8, !tbaa !5
  %.not75.not = icmp sgt i64 %100, %indvars.iv124
  br i1 %.not75.not, label %.lr.ph102, label %.preheader, !llvm.loop !16

._crit_edge105:                                   ; preds = %.lr.ph104, %.preheader
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  ret i32 0

.lr.ph104:                                        ; preds = %.lr.ph104.preheader, %.lr.ph104
  %indvars.iv127 = phi i64 [ 1, %.lr.ph104.preheader ], [ %indvars.iv.next128, %.lr.ph104 ]
  %103 = load i64, ptr @K, align 8, !tbaa !5
  %104 = getelementptr inbounds [100010 x [100 x %class.mint]], ptr @dp2, i64 0, i64 %indvars.iv127, i64 %103
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %104)
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next128, %wide.trip.count130
  br i1 %exitcond131.not, label %._crit_edge105, label %.lr.ph104, !llvm.loop !17
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) local_unnamed_addr #5

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = { "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 = !{!"long long", !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}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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