; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/1014_KUPC_2013 (F)

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

%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }
%"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" }

@n = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@T = external dso_local global [510 x %"class.std::tuple"], align 16
@memo = external dso_local global [510 x i32], align 16
@W = external dso_local global [510 x [510 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4calci(i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::tuple", align 4
  %6 = alloca i32, align 4
  %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 i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = 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)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) @s)
  %18 = load i32, ptr @s, align 4, !tbaa !5
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr @s, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %20

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

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %35

25:                                               ; preds = %20
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %5, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [510 x %"class.std::tuple"], ptr @T, i64 0, i64 %29
  %31 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5tupleIJiiEEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %32

32:                                               ; preds = %25
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %4, align 4, !tbaa !5
  br label %20, !llvm.loop !9

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

36:                                               ; preds = %59, %35
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

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

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

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

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

47:                                               ; preds = %42
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %49
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [510 x i32], ptr %50, i64 0, i64 %52
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %53)
  br label %55

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

58:                                               ; preds = %46
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %6, align 4, !tbaa !5
  br label %36, !llvm.loop !12

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

63:                                               ; preds = %75, %62
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = icmp sle i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %78

68:                                               ; preds = %63
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %70
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [510 x i32], ptr %71, i64 0, i64 %73
  store i32 1073741824, ptr %74, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %68
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %9, align 4, !tbaa !5
  br label %63, !llvm.loop !13

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

79:                                               ; preds = %98, %78
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = load i32, ptr @n, align 4, !tbaa !5
  %82 = icmp sle i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %101

84:                                               ; preds = %79
  %85 = load i32, ptr @s, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %86
  %88 = load i32, ptr %10, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [510 x i32], ptr %87, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = load i32, ptr @n, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %93
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [510 x i32], ptr %94, i64 0, i64 %96
  store i32 %91, ptr %97, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %84
  %99 = load i32, ptr %10, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %10, align 4, !tbaa !5
  br label %79, !llvm.loop !14

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

102:                                              ; preds = %157, %101
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = load i32, ptr @n, align 4, !tbaa !5
  %105 = icmp sle i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %160

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

108:                                              ; preds = %153, %107
  %109 = load i32, ptr %12, align 4, !tbaa !5
  %110 = load i32, ptr @n, align 4, !tbaa !5
  %111 = icmp sle i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %156

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

114:                                              ; preds = %149, %113
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = load i32, ptr @n, align 4, !tbaa !5
  %117 = icmp sle i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  store i32 23, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %152

119:                                              ; preds = %114
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %121
  %123 = load i32, ptr %13, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [510 x i32], ptr %122, i64 0, i64 %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %127
  %129 = load i32, ptr %11, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [510 x i32], ptr %128, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %134
  %136 = load i32, ptr %13, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [510 x i32], ptr %135, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = add nsw i32 %132, %139
  store i32 %140, ptr %14, align 4, !tbaa !5
  %141 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %125, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %144
  %146 = load i32, ptr %13, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [510 x i32], ptr %145, i64 0, i64 %147
  store i32 %142, ptr %148, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %149

149:                                              ; preds = %119
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %13, align 4, !tbaa !5
  br label %114, !llvm.loop !15

152:                                              ; preds = %118
  br label %153

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

156:                                              ; preds = %112
  br label %157

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

160:                                              ; preds = %106
  %161 = load i32, ptr @n, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr @memo, i64 %162
  %164 = getelementptr inbounds i32, ptr %163, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 -1, ptr %15, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @memo, ptr noundef %164, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  %165 = load i32, ptr @n, align 4, !tbaa !5
  %166 = call noundef i32 @_Z4calci(i32 noundef %165)
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %166)
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %169 = load i32, ptr %1, align 4
  ret i32 %169
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 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}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }
%"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" }

@n = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@T = external dso_local global [510 x %"class.std::tuple"], align 16
@memo = external dso_local global [510 x i32], align 16
@W = external dso_local global [510 x [510 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4calci(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::tuple", align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %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) @s)
  %8 = load i32, ptr @s, align 4, !tbaa !5
  %9 = add nsw i32 %8, -1
  store i32 %9, ptr @s, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %.preheader48

.preheader50:                                     ; preds = %.lr.ph
  %12 = icmp sgt i32 %17, 0
  br i1 %12, label %.preheader49, label %.preheader48

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %3, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %15 = getelementptr inbounds [510 x %"class.std::tuple"], ptr @T, i64 0, i64 %indvars.iv
  %16 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5tupleIJiiEEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = icmp slt i64 %indvars.iv.next, %18
  br i1 %19, label %.lr.ph, label %.preheader50, !llvm.loop !9

.preheader49:                                     ; preds = %.preheader50, %._crit_edge
  %20 = phi i32 [ %25, %._crit_edge ], [ %17, %.preheader50 ]
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %._crit_edge ], [ 0, %.preheader50 ]
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph54, label %.preheader49.._crit_edge_crit_edge

.preheader49.._crit_edge_crit_edge:               ; preds = %.preheader49
  %.pre = sext i32 %20 to i64
  br label %._crit_edge

.preheader48:                                     ; preds = %._crit_edge, %0, %.preheader50
  %.lcssa51 = phi i32 [ %17, %.preheader50 ], [ %10, %0 ], [ %25, %._crit_edge ]
  %.not56 = icmp slt i32 %.lcssa51, 0
  br i1 %.not56, label %._crit_edge71, label %.lr.ph58

.lr.ph58:                                         ; preds = %.preheader48
  %22 = zext nneg i32 %.lcssa51 to i64
  %23 = add nuw i32 %.lcssa51, 1
  %wide.trip.count = zext i32 %23 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %24 = icmp ult i32 %.lcssa51, 3
  br i1 %24, label %.preheader47.unr-lcssa, label %.lr.ph58.new

.lr.ph58.new:                                     ; preds = %.lr.ph58
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  br label %50

._crit_edge:                                      ; preds = %.lr.ph54, %.preheader49.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader49.._crit_edge_crit_edge ], [ %30, %.lr.ph54 ]
  %25 = phi i32 [ %20, %.preheader49.._crit_edge_crit_edge ], [ %29, %.lr.ph54 ]
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %26 = icmp slt i64 %indvars.iv.next84, %.pre-phi
  br i1 %26, label %.preheader49, label %.preheader48, !llvm.loop !11

.lr.ph54:                                         ; preds = %.preheader49, %.lr.ph54
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph54 ], [ 0, %.preheader49 ]
  %27 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv83, i64 %indvars.iv80
  %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)
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next81, %30
  br i1 %31, label %.lr.ph54, label %._crit_edge, !llvm.loop !13

.preheader47.unr-lcssa:                           ; preds = %50, %.lr.ph58
  %indvars.iv86.unr = phi i64 [ 0, %.lr.ph58 ], [ %indvars.iv.next87.3, %50 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader47, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader47.unr-lcssa, %.epil.preheader
  %indvars.iv86.epil = phi i64 [ %indvars.iv.next87.epil, %.epil.preheader ], [ %indvars.iv86.unr, %.preheader47.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader47.unr-lcssa ]
  %32 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv86.epil, i64 %22
  store i32 1073741824, ptr %32, align 4, !tbaa !5
  %indvars.iv.next87.epil = add nuw nsw i64 %indvars.iv86.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader47, label %.epil.preheader, !llvm.loop !14

.preheader47:                                     ; preds = %.epil.preheader, %.preheader47.unr-lcssa
  br i1 %.not56, label %._crit_edge71, label %.lr.ph61

.lr.ph61:                                         ; preds = %.preheader47
  %33 = load i32, ptr @s, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = zext nneg i32 %.lcssa51 to i64
  %36 = add nuw i32 %.lcssa51, 1
  %wide.trip.count93 = zext i32 %36 to i64
  %min.iters.check = icmp ult i32 %.lcssa51, 15
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph61
  %indvars.iv90.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph61 ], [ %n.vec, %middle.block ]
  %37 = zext nneg i32 %.lcssa51 to i64
  %38 = sub nsw i64 %37, %indvars.iv90.ph
  %xtraiter132 = and i64 %wide.trip.count, 3
  %lcmp.mod133.not = icmp eq i64 %xtraiter132, 0
  br i1 %lcmp.mod133.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv90.prol = phi i64 [ %indvars.iv.next91.prol, %scalar.ph.prol ], [ %indvars.iv90.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %39 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %34, i64 %indvars.iv90.prol
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %35, i64 %indvars.iv90.prol
  store i32 %40, ptr %41, align 4, !tbaa !5
  %indvars.iv.next91.prol = add nuw nsw i64 %indvars.iv90.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter132
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !16

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv90.unr = phi i64 [ %indvars.iv90.ph, %scalar.ph.preheader ], [ %indvars.iv.next91.prol, %scalar.ph.prol ]
  %42 = icmp ult i64 %38, 3
  br i1 %42, label %.preheader45.preheader, label %scalar.ph

vector.memcheck:                                  ; preds = %.lr.ph61
  %43 = mul nuw nsw i64 %22, 2040
  %.neg = mul nsw i64 %34, -2040
  %44 = add nsw i64 %.neg, %43
  %diff.check = icmp ult i64 %44, 32
  br i1 %diff.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 4294967288
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %45 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %34, i64 %index
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %wide.load = load <4 x i32>, ptr %45, align 8, !tbaa !5
  %wide.load123 = load <4 x i32>, ptr %46, align 8, !tbaa !5
  %47 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %35, i64 %index
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  store <4 x i32> %wide.load, ptr %47, align 8, !tbaa !5
  store <4 x i32> %wide.load123, ptr %48, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %49 = icmp eq i64 %index.next, %n.vec
  br i1 %49, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader45.preheader, label %scalar.ph.preheader

50:                                               ; preds = %50, %.lr.ph58.new
  %indvars.iv86 = phi i64 [ 0, %.lr.ph58.new ], [ %indvars.iv.next87.3, %50 ]
  %niter = phi i64 [ 0, %.lr.ph58.new ], [ %niter.next.3, %50 ]
  %51 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv86, i64 %22
  store i32 1073741824, ptr %51, align 4, !tbaa !5
  %indvars.iv.next87 = or disjoint i64 %indvars.iv86, 1
  %52 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv.next87, i64 %22
  store i32 1073741824, ptr %52, align 4, !tbaa !5
  %indvars.iv.next87.1 = or disjoint i64 %indvars.iv86, 2
  %53 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv.next87.1, i64 %22
  store i32 1073741824, ptr %53, align 4, !tbaa !5
  %indvars.iv.next87.2 = or disjoint i64 %indvars.iv86, 3
  %54 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv.next87.2, i64 %22
  store i32 1073741824, ptr %54, align 4, !tbaa !5
  %indvars.iv.next87.3 = add nuw nsw i64 %indvars.iv86, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader47.unr-lcssa, label %50, !llvm.loop !20

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv90 = phi i64 [ %indvars.iv.next91.3, %scalar.ph ], [ %indvars.iv90.unr, %scalar.ph.prol.loopexit ]
  %55 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %34, i64 %indvars.iv90
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %35, i64 %indvars.iv90
  store i32 %56, ptr %57, align 4, !tbaa !5
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %58 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %34, i64 %indvars.iv.next91
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %35, i64 %indvars.iv.next91
  store i32 %59, ptr %60, align 4, !tbaa !5
  %indvars.iv.next91.1 = add nuw nsw i64 %indvars.iv90, 2
  %61 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %34, i64 %indvars.iv.next91.1
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %35, i64 %indvars.iv.next91.1
  store i32 %62, ptr %63, align 4, !tbaa !5
  %indvars.iv.next91.2 = add nuw nsw i64 %indvars.iv90, 3
  %64 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %34, i64 %indvars.iv.next91.2
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %35, i64 %indvars.iv.next91.2
  store i32 %65, ptr %66, align 4, !tbaa !5
  %indvars.iv.next91.3 = add nuw nsw i64 %indvars.iv90, 4
  %exitcond94.not.3 = icmp eq i64 %indvars.iv.next91.3, %wide.trip.count93
  br i1 %exitcond94.not.3, label %.preheader45.preheader, label %scalar.ph, !llvm.loop !21

.preheader45.preheader:                           ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  br label %.preheader45

.preheader45:                                     ; preds = %.preheader45.preheader, %._crit_edge68
  %67 = phi i32 [ %78, %._crit_edge68 ], [ %.lcssa51, %.preheader45.preheader ]
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %._crit_edge68 ], [ 0, %.preheader45.preheader ]
  %.not4366 = icmp slt i32 %67, 0
  br i1 %.not4366, label %._crit_edge68, label %.preheader

._crit_edge71:                                    ; preds = %._crit_edge68, %.preheader48, %.preheader47
  %.lcssa = phi i32 [ %.lcssa51, %.preheader47 ], [ %.lcssa51, %.preheader48 ], [ %78, %._crit_edge68 ]
  %68 = sext i32 %.lcssa to i64
  %69 = getelementptr inbounds i32, ptr @memo, i64 %68
  %70 = getelementptr inbounds i8, ptr %69, i64 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 -1, ptr %5, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @memo, ptr noundef nonnull %70, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = call noundef i32 @_Z4calci(i32 noundef %71)
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %72)
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.preheader:                                       ; preds = %.preheader45, %._crit_edge65
  %75 = phi i32 [ %80, %._crit_edge65 ], [ %67, %.preheader45 ]
  %76 = phi i32 [ %81, %._crit_edge65 ], [ %67, %.preheader45 ]
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %._crit_edge65 ], [ 0, %.preheader45 ]
  %.not4462 = icmp slt i32 %76, 0
  br i1 %.not4462, label %.preheader.._crit_edge65_crit_edge, label %.lr.ph64

.preheader.._crit_edge65_crit_edge:               ; preds = %.preheader
  %.pre104 = sext i32 %76 to i64
  br label %._crit_edge65

.lr.ph64:                                         ; preds = %.preheader
  %77 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv98, i64 %indvars.iv101
  br label %82

._crit_edge68:                                    ; preds = %._crit_edge65, %.preheader45
  %78 = phi i32 [ %67, %.preheader45 ], [ %80, %._crit_edge65 ]
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %79 = sext i32 %78 to i64
  %.not42.not = icmp slt i64 %indvars.iv101, %79
  br i1 %.not42.not, label %.preheader45, label %._crit_edge71, !llvm.loop !22

._crit_edge65:                                    ; preds = %82, %.preheader.._crit_edge65_crit_edge
  %.pre-phi105 = phi i64 [ %.pre104, %.preheader.._crit_edge65_crit_edge ], [ %91, %82 ]
  %80 = phi i32 [ %75, %.preheader.._crit_edge65_crit_edge ], [ %90, %82 ]
  %81 = phi i32 [ %76, %.preheader.._crit_edge65_crit_edge ], [ %90, %82 ]
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %.not43.not = icmp slt i64 %indvars.iv98, %.pre-phi105
  br i1 %.not43.not, label %.preheader, label %._crit_edge68, !llvm.loop !23

82:                                               ; preds = %.lr.ph64, %82
  %indvars.iv95 = phi i64 [ 0, %.lr.ph64 ], [ %indvars.iv.next96, %82 ]
  %83 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv98, i64 %indvars.iv95
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %84 = load i32, ptr %77, align 4, !tbaa !5
  %85 = getelementptr inbounds [510 x [510 x i32]], ptr @W, i64 0, i64 %indvars.iv101, i64 %indvars.iv95
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = add nsw i32 %86, %84
  store i32 %87, ptr %4, align 4, !tbaa !5
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %89 = load i32, ptr %88, align 4, !tbaa !5
  store i32 %89, ptr %83, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %.not44.not = icmp slt i64 %indvars.iv95, %91
  br i1 %.not44.not, label %82, label %._crit_edge65, !llvm.loop !24
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 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}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !10, !18, !19}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !18}
!22 = distinct !{!22, !10, !12}
!23 = distinct !{!23, !10, !12}
!24 = distinct !{!24, !10}


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