; LLVM IR from kazunetakahashi/atcoder :: 2019/0720_ABC134/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 i32, align 4
@K = external dso_local global i32, align 4
@dp = external dso_local global [55 x [55 x [1305 x %class.mint]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca %class.mint, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %class.mint, align 8
  %11 = alloca %class.mint, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.mint, align 8
  %14 = alloca %class.mint, align 8
  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) @K)
  %17 = load i32, ptr @K, align 4, !tbaa !5
  %18 = and i32 %17, 1
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %23

20:                                               ; preds = %0
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %174

23:                                               ; preds = %0
  %24 = load i32, ptr @K, align 4, !tbaa !5
  %25 = sdiv i32 %24, 2
  store i32 %25, ptr @K, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef 1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @dp, ptr align 8 %2, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %26

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

30:                                               ; preds = %26
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %164

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %157, %31
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = icmp sle i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %160

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

38:                                               ; preds = %153, %37
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = load i32, ptr @K, align 4, !tbaa !5
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %156

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %44 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %44, ptr %7, align 4, !tbaa !5
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %46
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %47, i64 0, i64 %49
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1305 x %class.mint], ptr %50, i64 0, i64 %52
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %56
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %57, i64 0, i64 %59
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = add nsw i32 %61, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1305 x %class.mint], ptr %60, i64 0, i64 %64
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull align 8 dereferenceable(8) %53)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %8, align 4, !tbaa !5
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %70
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %71, i64 0, i64 %73
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1305 x %class.mint], ptr %74, i64 0, i64 %76
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %80
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %81, i64 0, i64 %83
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = add nsw i32 %85, %86
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1305 x %class.mint], ptr %84, i64 0, i64 %88
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull align 8 dereferenceable(8) %77)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %91 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %91, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = mul nsw i32 %92, 2
  %94 = sext i32 %93 to i64
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef %94)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %95 = load i32, ptr %3, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %96
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %97, i64 0, i64 %99
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1305 x %class.mint], ptr %100, i64 0, i64 %102
  %104 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %105 = getelementptr inbounds %class.mint, ptr %11, i32 0, i32 0
  store i64 %104, ptr %105, align 8
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %108
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %109, i64 0, i64 %111
  %113 = load i32, ptr %6, align 4, !tbaa !5
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = add nsw i32 %113, %114
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [1305 x %class.mint], ptr %112, i64 0, i64 %116
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = icmp sge i32 %119, 1
  br i1 %120, label %121, label %152

121:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = sub nsw i32 %122, 1
  store i32 %123, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %124 = load i32, ptr %5, align 4, !tbaa !5
  %125 = load i32, ptr %5, align 4, !tbaa !5
  %126 = mul nsw i32 %124, %125
  %127 = sext i32 %126 to i64
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %127)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %128 = load i32, ptr %3, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %129
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %130, i64 0, i64 %132
  %134 = load i32, ptr %6, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [1305 x %class.mint], ptr %133, i64 0, i64 %135
  %137 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %138 = getelementptr inbounds %class.mint, ptr %14, i32 0, i32 0
  store i64 %137, ptr %138, align 8
  %139 = load i32, ptr %3, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %141
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %142, i64 0, i64 %144
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = load i32, ptr %12, align 4, !tbaa !5
  %148 = add nsw i32 %146, %147
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1305 x %class.mint], ptr %145, i64 0, i64 %149
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %152

152:                                              ; preds = %121, %43
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %6, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %6, align 4, !tbaa !5
  br label %38, !llvm.loop !12

156:                                              ; preds = %42
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %5, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %5, align 4, !tbaa !5
  br label %32, !llvm.loop !14

160:                                              ; preds = %36
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %3, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %3, align 4, !tbaa !5
  br label %26, !llvm.loop !15

164:                                              ; preds = %30
  %165 = load i32, ptr @N, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %166
  %168 = getelementptr inbounds [55 x [1305 x %class.mint]], ptr %167, i64 0, i64 0
  %169 = load i32, ptr @K, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [1305 x %class.mint], ptr %168, i64 0, i64 %170
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(8) %171)
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %174

174:                                              ; preds = %164, %20
  %175 = load i32, ptr %1, align 4
  ret 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)) #3

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

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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 #3 = { "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{i64 0, i64 8, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !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 i32, align 4
@K = external dso_local global i32, align 4
@dp = external dso_local global [55 x [55 x [1305 x %class.mint]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca %class.mint, align 8
  %2 = alloca %class.mint, align 8
  %3 = alloca %class.mint, align 8
  %4 = alloca %class.mint, align 8
  %5 = alloca %class.mint, align 8
  %6 = 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)
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %8 = load i32, ptr @K, align 4, !tbaa !5
  %9 = and i32 %8, 1
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %13, label %10

10:                                               ; preds = %0
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %65

13:                                               ; preds = %0
  %14 = ashr exact i32 %8, 1
  store i32 %14, ptr @K, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 1)
  %15 = load i64, ptr %1, align 8, !tbaa !9
  store i64 %15, ptr @dp, align 16, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %16 = load i32, ptr @N, align 4, !tbaa !5
  %17 = icmp slt i32 %16, 1
  %.pre77 = load i32, ptr @K, align 4, !tbaa !5
  %18 = icmp slt i32 %.pre77, 0
  %or.cond = select i1 %17, i1 true, i1 %18
  br i1 %or.cond, label %._crit_edge56, label %.preheader50

.preheader50:                                     ; preds = %13, %.split.us
  %19 = phi i32 [ %44, %.split.us ], [ %16, %13 ]
  %20 = phi i32 [ %45, %.split.us ], [ %.pre77, %13 ]
  %21 = phi i32 [ %46, %.split.us ], [ %.pre77, %13 ]
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %.split.us ], [ 0, %13 ]
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.split.us ], [ 1, %13 ]
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %22 = icmp slt i32 %21, 0
  br i1 %22, label %.split.us, label %.preheader

._crit_edge56:                                    ; preds = %.split.us, %13
  %23 = phi i32 [ %.pre77, %13 ], [ %45, %.split.us ]
  %.lcssa = phi i32 [ %16, %13 ], [ %44, %.split.us ]
  %24 = sext i32 %.lcssa to i64
  %25 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %24
  %26 = sext i32 %23 to i64
  %27 = getelementptr inbounds [1305 x %class.mint], ptr %25, i64 0, i64 %26
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK4mint(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %65

.preheader:                                       ; preds = %.preheader50, %._crit_edge
  %30 = phi i32 [ %49, %._crit_edge ], [ %20, %.preheader50 ]
  %indvars.iv65 = phi i64 [ %.pre78, %._crit_edge ], [ 0, %.preheader50 ]
  %.not4851 = icmp slt i32 %30, 0
  %.pre78 = add nuw nsw i64 %indvars.iv65, 1
  br i1 %.not4851, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %31 = shl nuw nsw i64 %indvars.iv65, 1
  %.not49 = icmp eq i64 %indvars.iv65, 0
  %32 = add nsw i64 %indvars.iv65, -1
  %33 = mul nuw nsw i64 %indvars.iv65, %indvars.iv65
  br i1 %.not49, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %34 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %indvars.iv72, i64 0, i64 %indvars.iv62
  %35 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %indvars.iv.next73, i64 0, i64 %indvars.iv62
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %37 = add nuw nsw i64 %indvars.iv62, %.pre78
  %38 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %indvars.iv.next73, i64 %.pre78, i64 %37
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %34)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %40 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %40, ptr %3, align 8
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %42 = load i32, ptr @K, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %.not48.us.not = icmp slt i64 %indvars.iv62, %43
  br i1 %.not48.us.not, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !11

.split.us.loopexit58:                             ; preds = %._crit_edge
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %.split.us

.split.us:                                        ; preds = %.preheader50, %.split.us.loopexit58
  %44 = phi i32 [ %.pre, %.split.us.loopexit58 ], [ %19, %.preheader50 ]
  %45 = phi i32 [ %49, %.split.us.loopexit58 ], [ %20, %.preheader50 ]
  %46 = phi i32 [ %49, %.split.us.loopexit58 ], [ %21, %.preheader50 ]
  %47 = sext i32 %44 to i64
  %48 = icmp slt i64 %indvars.iv.next73, %47
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  br i1 %48, label %.preheader50, label %._crit_edge56, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph.split, %.lr.ph.split.us, %.preheader
  %49 = phi i32 [ %30, %.preheader ], [ %42, %.lr.ph.split.us ], [ %63, %.lr.ph.split ]
  %exitcond = icmp eq i64 %.pre78, %indvars.iv70
  br i1 %exitcond, label %.split.us.loopexit58, label %.preheader, !llvm.loop !15

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split ], [ 0, %.lr.ph ]
  %50 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %indvars.iv72, i64 %indvars.iv65, i64 %indvars.iv
  %51 = add nuw nsw i64 %indvars.iv, %indvars.iv65
  %52 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %indvars.iv.next73, i64 %indvars.iv65, i64 %51
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(8) %50)
  %54 = add nuw nsw i64 %indvars.iv, %.pre78
  %55 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %indvars.iv.next73, i64 %.pre78, i64 %54
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(8) %50)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %57 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %57, ptr %3, align 8
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4mintpLERKS_(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %33)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %59 = call i64 @_ZNK4mintmlERKS_(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i64 %59, ptr %5, align 8
  %60 = add nuw nsw i64 %indvars.iv, %32
  %61 = getelementptr inbounds [55 x [55 x [1305 x %class.mint]]], ptr @dp, i64 0, i64 %indvars.iv.next73, i64 %32, i64 %60
  %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) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %63 = load i32, ptr @K, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %.not48.not = icmp slt i64 %indvars.iv, %64
  br i1 %.not48.not, label %.lr.ph.split, label %._crit_edge, !llvm.loop !11

65:                                               ; preds = %._crit_edge56, %10
  ret i32 0
}

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 #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4mintC2Ex(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #5 align 2

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

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

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

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

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


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