; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/1114_codefes2015_final (D)

; 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_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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [100010 x i32], align 16
  %4 = alloca [100010 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca [100010 x i32], align 16
  %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
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %18 = 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)
  call void @llvm.lifetime.start.p0(i64 400040, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 400040, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %19

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

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

24:                                               ; preds = %19
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %26
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %30
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %31)
  br label %33

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

36:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 400040, ptr %6) #6
  %37 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 0
  %38 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 0
  %39 = getelementptr inbounds i32, ptr %38, i64 100010
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %37, ptr noundef %39, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %62, %36
  %41 = load i32, ptr %8, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %65

45:                                               ; preds = %40
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %51, align 4, !tbaa !5
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr %59, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %45
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %8, align 4, !tbaa !5
  br label %40, !llvm.loop !11

65:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %81, %65
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = icmp slt i32 %67, 100010
  br i1 %68, label %70, label %69

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

70:                                               ; preds = %66
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = add nsw i32 %79, %75
  store i32 %80, ptr %78, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %70
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %9, align 4, !tbaa !5
  br label %66, !llvm.loop !12

84:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %95, %84
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = icmp slt i32 %86, 100010
  br i1 %87, label %89, label %88

88:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %98

89:                                               ; preds = %85
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 %91
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %92)
  %94 = load i32, ptr %93, align 4, !tbaa !5
  store i32 %94, ptr %10, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %89
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %11, align 4, !tbaa !5
  br label %85, !llvm.loop !13

98:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %113, %98
  %100 = load i32, ptr %14, align 4, !tbaa !5
  %101 = icmp slt i32 %100, 100010
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  store i32 14, ptr %15, align 4
  br label %116

103:                                              ; preds = %99
  %104 = load i32, ptr %14, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = icmp eq i32 %107, %108
  br i1 %109, label %110, label %112

110:                                              ; preds = %103
  %111 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %111, ptr %12, align 4, !tbaa !5
  store i32 14, ptr %15, align 4
  br label %116

112:                                              ; preds = %103
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %14, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %14, align 4, !tbaa !5
  br label %99, !llvm.loop !14

116:                                              ; preds = %110, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %117

117:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 100009, ptr %16, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %132, %117
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = icmp sge i32 %119, 0
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 17, ptr %15, align 4
  br label %135

122:                                              ; preds = %118
  %123 = load i32, ptr %16, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100010 x i32], ptr %6, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = load i32, ptr %10, align 4, !tbaa !5
  %128 = icmp eq i32 %126, %127
  br i1 %128, label %129, label %131

129:                                              ; preds = %122
  %130 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %130, ptr %13, align 4, !tbaa !5
  store i32 17, ptr %15, align 4
  br label %135

131:                                              ; preds = %122
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %16, align 4, !tbaa !5
  %134 = add nsw i32 %133, -1
  store i32 %134, ptr %16, align 4, !tbaa !5
  br label %118, !llvm.loop !15

135:                                              ; preds = %129, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %136

136:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %162, %136
  %138 = load i32, ptr %17, align 4, !tbaa !5
  %139 = load i32, ptr %2, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  store i32 20, ptr %15, align 4
  br label %165

142:                                              ; preds = %137
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = load i32, ptr %17, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = icmp sge i32 %143, %147
  br i1 %148, label %149, label %161

149:                                              ; preds = %142
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = load i32, ptr %17, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = icmp slt i32 %150, %154
  br i1 %155, label %156, label %161

156:                                              ; preds = %149
  %157 = load i32, ptr %10, align 4, !tbaa !5
  %158 = sub nsw i32 %157, 1
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %158)
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %15, align 4
  br label %165

161:                                              ; preds = %149, %142
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %17, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %17, align 4, !tbaa !5
  br label %137, !llvm.loop !16

165:                                              ; preds = %156, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  %166 = load i32, ptr %15, align 4
  switch i32 %166, label %171 [
    i32 20, label %167
  ]

167:                                              ; preds = %165
  %168 = load i32, ptr %10, align 4, !tbaa !5
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %168)
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %169, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %15, align 4
  br label %171

171:                                              ; preds = %167, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 400040, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 400040, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 400040, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %172 = load i32, ptr %15, align 4
  switch i32 %172, label %175 [
    i32 0, label %173
    i32 1, label %173
  ]

173:                                              ; preds = %171, %171
  %174 = load i32, ptr %1, align 4
  ret i32 %174

175:                                              ; preds = %171
  unreachable
}

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

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

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

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

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

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

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

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


; 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_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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca [100010 x i32], align 16
  %3 = alloca [100010 x i32], align 16
  %4 = alloca [100010 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %7 = 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)
  call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %3) #6
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %4) #6
  %10 = getelementptr inbounds i8, ptr %4, i64 400040
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %4, ptr noundef nonnull %10, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph46.preheader, label %.preheader42

.lr.ph46.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %11 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %13 = icmp eq i32 %11, 1
  br i1 %13, label %.preheader42.loopexit.unr-lcssa, label %.lr.ph46.preheader.new

.lr.ph46.preheader.new:                           ; preds = %.lr.ph46.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph46

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %14 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv
  %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) %14)
  %16 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %indvars.iv
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next, %19
  br i1 %20, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader42.loopexit.unr-lcssa:                  ; preds = %.lr.ph46, %.lr.ph46.preheader
  %indvars.iv56.unr = phi i64 [ 0, %.lr.ph46.preheader ], [ %indvars.iv.next57.1, %.lr.ph46 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader42, label %.lr.ph46.epil

.lr.ph46.epil:                                    ; preds = %.preheader42.loopexit.unr-lcssa
  %21 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv56.unr
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %24, align 4, !tbaa !5
  %27 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %indvars.iv56.unr
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = add nsw i32 %31, -1
  store i32 %32, ptr %30, align 4, !tbaa !5
  br label %.preheader42

.preheader42:                                     ; preds = %.lr.ph46.epil, %.preheader42.loopexit.unr-lcssa, %._crit_edge
  %.pre = load i32, ptr %4, align 16, !tbaa !5
  br label %58

.lr.ph46:                                         ; preds = %.lr.ph46, %.lr.ph46.preheader.new
  %indvars.iv56 = phi i64 [ 0, %.lr.ph46.preheader.new ], [ %indvars.iv.next57.1, %.lr.ph46 ]
  %niter = phi i64 [ 0, %.lr.ph46.preheader.new ], [ %niter.next.1, %.lr.ph46 ]
  %33 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv56
  %34 = load i32, ptr %33, align 8, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %36, align 4, !tbaa !5
  %39 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %indvars.iv56
  %40 = load i32, ptr %39, align 8, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr %42, align 4, !tbaa !5
  %indvars.iv.next57 = or disjoint i64 %indvars.iv56, 1
  %45 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv.next57
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %48, align 4, !tbaa !5
  %51 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %indvars.iv.next57
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr %54, align 4, !tbaa !5
  %indvars.iv.next57.1 = add nuw nsw i64 %indvars.iv56, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader42.loopexit.unr-lcssa, label %.lr.ph46, !llvm.loop !11

57:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %73

58:                                               ; preds = %63, %.preheader42
  %59 = phi i32 [ %.pre, %.preheader42 ], [ %72, %63 ]
  %indvars.iv59 = phi i64 [ 1, %.preheader42 ], [ %indvars.iv.next60.3, %63 ]
  %60 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, %59
  store i32 %62, ptr %60, align 4, !tbaa !5
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond62.not = icmp eq i64 %indvars.iv.next60, 100010
  br i1 %exitcond62.not, label %57, label %63, !llvm.loop !12

63:                                               ; preds = %58
  %64 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv.next60
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = add nsw i32 %65, %62
  store i32 %66, ptr %64, align 4, !tbaa !5
  %indvars.iv.next60.1 = add nuw nsw i64 %indvars.iv59, 2
  %67 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv.next60.1
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = add nsw i32 %68, %66
  store i32 %69, ptr %67, align 4, !tbaa !5
  %indvars.iv.next60.2 = add nuw nsw i64 %indvars.iv59, 3
  %70 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv.next60.2
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, %69
  store i32 %72, ptr %70, align 4, !tbaa !5
  %indvars.iv.next60.3 = add nuw nsw i64 %indvars.iv59, 4
  br label %58

73:                                               ; preds = %57, %73
  %indvars.iv63 = phi i64 [ 0, %57 ], [ %indvars.iv.next64, %73 ]
  %74 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv63
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %74)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr %6, align 4, !tbaa !5
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next64, 100010
  br i1 %exitcond66.not, label %.preheader, label %73, !llvm.loop !13

.preheader:                                       ; preds = %73, %92
  %indvars.iv67 = phi i64 [ %indvars.iv.next68.4, %92 ], [ 0, %73 ]
  %77 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv67
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp eq i32 %78, %76
  br i1 %79, label %.split.loop.exit, label %.preheader.1

.preheader.1:                                     ; preds = %.preheader
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %80 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv.next68
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = icmp eq i32 %81, %76
  br i1 %82, label %.split.loop.exit, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.1
  %indvars.iv.next68.1 = add nuw nsw i64 %indvars.iv67, 2
  %83 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv.next68.1
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp eq i32 %84, %76
  br i1 %85, label %.split.loop.exit, label %.preheader.3

.preheader.3:                                     ; preds = %.preheader.2
  %indvars.iv.next68.2 = add nuw nsw i64 %indvars.iv67, 3
  %86 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv.next68.2
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = icmp eq i32 %87, %76
  br i1 %88, label %.split.loop.exit, label %.preheader.4

.preheader.4:                                     ; preds = %.preheader.3
  %indvars.iv.next68.3 = add nuw nsw i64 %indvars.iv67, 4
  %89 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %indvars.iv.next68.3
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = icmp eq i32 %90, %76
  br i1 %91, label %.split.loop.exit, label %92

92:                                               ; preds = %.preheader.4
  %indvars.iv.next68.4 = add nuw nsw i64 %indvars.iv67, 5
  %exitcond70.not.4 = icmp eq i64 %indvars.iv.next68.4, 100010
  br i1 %exitcond70.not.4, label %.split.loop.exit77, label %.preheader, !llvm.loop !14

.split.loop.exit:                                 ; preds = %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader
  %indvars.iv67.lcssa = phi i64 [ %indvars.iv67, %.preheader ], [ %indvars.iv.next68, %.preheader.1 ], [ %indvars.iv.next68.1, %.preheader.2 ], [ %indvars.iv.next68.2, %.preheader.3 ], [ %indvars.iv.next68.3, %.preheader.4 ]
  %93 = trunc nuw nsw i64 %indvars.iv67.lcssa to i32
  br label %.split.loop.exit77

.split.loop.exit77:                               ; preds = %92, %.split.loop.exit
  %.033.lcssa = phi i32 [ %93, %.split.loop.exit ], [ 100010, %92 ]
  br label %94

94:                                               ; preds = %123, %.split.loop.exit77
  %.03150 = phi i32 [ 100009, %.split.loop.exit77 ], [ %124, %123 ]
  %95 = zext nneg i32 %.03150 to i64
  %96 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = icmp eq i32 %97, %76
  br i1 %98, label %125, label %99

99:                                               ; preds = %94
  %100 = add nsw i32 %.03150, -1
  %101 = zext nneg i32 %100 to i64
  %102 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = icmp eq i32 %103, %76
  br i1 %104, label %125, label %105

105:                                              ; preds = %99
  %106 = add nsw i32 %.03150, -2
  %107 = zext nneg i32 %106 to i64
  %108 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp eq i32 %109, %76
  br i1 %110, label %125, label %111

111:                                              ; preds = %105
  %112 = add nsw i32 %.03150, -3
  %113 = zext nneg i32 %112 to i64
  %114 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = icmp eq i32 %115, %76
  br i1 %116, label %125, label %117

117:                                              ; preds = %111
  %118 = add nsw i32 %.03150, -4
  %119 = zext nneg i32 %118 to i64
  %120 = getelementptr inbounds [100010 x i32], ptr %4, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = icmp eq i32 %121, %76
  br i1 %122, label %125, label %123

123:                                              ; preds = %117
  %124 = add nsw i32 %.03150, -5
  %.not76.4 = icmp eq i32 %118, 0
  br i1 %.not76.4, label %125, label %94, !llvm.loop !15

125:                                              ; preds = %123, %117, %111, %105, %99, %94
  %.031.lcssa = phi i32 [ %.03150, %94 ], [ %100, %99 ], [ %106, %105 ], [ %112, %111 ], [ %118, %117 ], [ -1, %123 ]
  %126 = load i32, ptr %1, align 4, !tbaa !5
  %.not4151 = icmp sgt i32 %126, 0
  br i1 %.not4151, label %.lr.ph54.preheader, label %.critedge

.lr.ph54.preheader:                               ; preds = %125
  %wide.trip.count74 = zext nneg i32 %126 to i64
  br label %.lr.ph54

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %135
  %indvars.iv71 = phi i64 [ 0, %.lr.ph54.preheader ], [ %indvars.iv.next72, %135 ]
  %127 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv71
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %.not = icmp slt i32 %.033.lcssa, %128
  br i1 %.not, label %135, label %129

129:                                              ; preds = %.lr.ph54
  %130 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %indvars.iv71
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = icmp slt i32 %.031.lcssa, %131
  br i1 %132, label %133, label %135

133:                                              ; preds = %129
  %134 = add nsw i32 %76, -1
  br label %.critedge

135:                                              ; preds = %.lr.ph54, %129
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %.critedge, label %.lr.ph54, !llvm.loop !16

.critedge:                                        ; preds = %135, %125, %133
  %.sink79 = phi i32 [ %134, %133 ], [ %76, %125 ], [ %76, %135 ]
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sink79)
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

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

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

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

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

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

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

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass