; LLVM IR from kazunetakahashi/atcoder :: 2017/0701_ARC077 (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" }

@n = external dso_local global i32, align 4
@a = external dso_local global [100010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() #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 nounwind uwtable
declare dso_local noundef i64 @_Z1Cii(i32 noundef, i32 noundef) #0

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

15:                                               ; preds = %26, %0
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1
  %19 = icmp slt i32 %16, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %15
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %24)
  br label %26

26:                                               ; preds = %21
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %2, align 4, !tbaa !5
  br label %15, !llvm.loop !9

29:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 400040, ptr %3) #7
  %30 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 0
  %31 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 0
  %32 = getelementptr inbounds i32, ptr %31, i64 100010
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %30, ptr noundef %32, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %48, %29
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  %37 = icmp slt i32 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %51

39:                                               ; preds = %33
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %45, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %39
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %5, align 4, !tbaa !5
  br label %33, !llvm.loop !11

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

52:                                               ; preds = %67, %51
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  %56 = icmp slt i32 %53, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %52
  store i32 8, ptr %8, align 4
  br label %70

58:                                               ; preds = %52
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 2
  br i1 %63, label %64, label %66

64:                                               ; preds = %58
  %65 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %65, ptr %6, align 4, !tbaa !5
  store i32 8, ptr %8, align 4
  br label %70

66:                                               ; preds = %58
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %7, align 4, !tbaa !5
  br label %52, !llvm.loop !12

70:                                               ; preds = %64, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %71
  br label %77

75:                                               ; preds = %71
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 100, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

76:                                               ; No predecessors!
  br label %77

77:                                               ; preds = %76, %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  store i8 1, ptr %10, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %104, %77
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = load i32, ptr @n, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  %82 = icmp slt i32 %79, %81
  br i1 %82, label %84, label %83

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

84:                                               ; preds = %78
  %85 = load i32, ptr %11, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = icmp eq i32 %88, %89
  br i1 %90, label %91, label %96

91:                                               ; preds = %84
  %92 = load i8, ptr %10, align 1, !tbaa !13, !range !15, !noundef !16
  %93 = trunc i8 %92 to i1
  %94 = xor i1 %93, true
  %95 = zext i1 %94 to i8
  store i8 %95, ptr %10, align 1, !tbaa !13
  br label %103

96:                                               ; preds = %84
  %97 = load i8, ptr %10, align 1, !tbaa !13, !range !15, !noundef !16
  %98 = trunc i8 %97 to i1
  br i1 %98, label %99, label %102

99:                                               ; preds = %96
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %9, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %99, %96
  br label %103

103:                                              ; preds = %102, %91
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %11, align 4, !tbaa !5
  br label %78, !llvm.loop !17

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

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

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

114:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !18
  %115 = load i32, ptr @n, align 4, !tbaa !5
  %116 = sub nsw i32 %115, 1
  %117 = load i32, ptr %12, align 4, !tbaa !5
  %118 = call noundef i64 @_Z1Cii(i32 noundef %116, i32 noundef %117)
  %119 = load i64, ptr %13, align 8, !tbaa !18
  %120 = add nsw i64 %119, %118
  store i64 %120, ptr %13, align 8, !tbaa !18
  %121 = load i32, ptr @n, align 4, !tbaa !5
  %122 = sub nsw i32 %121, 1
  %123 = load i32, ptr %12, align 4, !tbaa !5
  %124 = sub nsw i32 %123, 1
  %125 = call noundef i64 @_Z1Cii(i32 noundef %122, i32 noundef %124)
  %126 = mul nsw i64 2, %125
  %127 = load i64, ptr %13, align 8, !tbaa !18
  %128 = add nsw i64 %127, %126
  store i64 %128, ptr %13, align 8, !tbaa !18
  %129 = load i64, ptr %13, align 8, !tbaa !18
  %130 = srem i64 %129, 1000000007
  store i64 %130, ptr %13, align 8, !tbaa !18
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = sub nsw i32 %132, 1
  %134 = call noundef i64 @_Z1Cii(i32 noundef %131, i32 noundef %133)
  %135 = sub nsw i64 1000000007, %134
  %136 = load i64, ptr %13, align 8, !tbaa !18
  %137 = add nsw i64 %136, %135
  store i64 %137, ptr %13, align 8, !tbaa !18
  %138 = load i64, ptr %13, align 8, !tbaa !18
  %139 = srem i64 %138, 1000000007
  store i64 %139, ptr %13, align 8, !tbaa !18
  %140 = load i32, ptr @n, align 4, !tbaa !5
  %141 = sub nsw i32 %140, 1
  %142 = load i32, ptr %12, align 4, !tbaa !5
  %143 = sub nsw i32 %142, 2
  %144 = call noundef i64 @_Z1Cii(i32 noundef %141, i32 noundef %143)
  %145 = load i64, ptr %13, align 8, !tbaa !18
  %146 = add nsw i64 %145, %144
  store i64 %146, ptr %13, align 8, !tbaa !18
  %147 = load i64, ptr %13, align 8, !tbaa !18
  %148 = srem i64 %147, 1000000007
  store i64 %148, ptr %13, align 8, !tbaa !18
  %149 = load i64, ptr %13, align 8, !tbaa !18
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %149)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %152

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

155:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 400040, ptr %3) #7
  %156 = load i32, ptr %1, align 4
  ret i32 %156
}

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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

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

attributes #0 = { 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 #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 = { 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 #5 = { noreturn nounwind "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 = { 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 }
attributes #8 = { noreturn 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 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !10}
!18 = !{!19, !19, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = distinct !{!20, !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" }

@n = external dso_local global i32, align 4
@a = external dso_local global [100010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() 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 nounwind uwtable
declare dso_local noundef i64 @_Z1Cii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca [100010 x i32], align 16
  %2 = alloca i32, align 4
  tail call void @_Z4initv()
  %3 = 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)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not52 = icmp slt i32 %4, 0
  br i1 %.not52, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %1) #7
  %5 = getelementptr inbounds i8, ptr %1, i64 400040
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %1, ptr noundef nonnull %5, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not4254 = icmp slt i32 %6, 0
  br i1 %.not4254, label %.thread, label %.lr.ph57.preheader

.lr.ph57.preheader:                               ; preds = %._crit_edge
  %7 = add nuw i32 %6, 1
  %wide.trip.count = zext i32 %7 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %8 = icmp ult i32 %6, 3
  br i1 %8, label %.preheader50.unr-lcssa, label %.lr.ph57.preheader.new

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

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %9 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv
  %10 = 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) %9)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %.not.not = icmp slt i64 %indvars.iv, %12
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader50.unr-lcssa:                           ; preds = %.lr.ph57, %.lr.ph57.preheader
  %indvars.iv74.unr = phi i64 [ 0, %.lr.ph57.preheader ], [ %indvars.iv.next75.3, %.lr.ph57 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader50, label %.lr.ph57.epil

.lr.ph57.epil:                                    ; preds = %.preheader50.unr-lcssa, %.lr.ph57.epil
  %indvars.iv74.epil = phi i64 [ %indvars.iv.next75.epil, %.lr.ph57.epil ], [ %indvars.iv74.unr, %.preheader50.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph57.epil ], [ 0, %.preheader50.unr-lcssa ]
  %13 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv74.epil
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [100010 x i32], ptr %1, i64 0, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr %16, align 4, !tbaa !5
  %indvars.iv.next75.epil = add nuw nsw i64 %indvars.iv74.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 %.preheader50, label %.lr.ph57.epil, !llvm.loop !11

.preheader50:                                     ; preds = %.lr.ph57.epil, %.preheader50.unr-lcssa
  br i1 %.not4254, label %.thread, label %.lr.ph60.preheader

.lr.ph60.preheader:                               ; preds = %.preheader50
  %19 = add nuw i32 %6, 1
  %wide.trip.count80 = zext i32 %19 to i64
  br label %.lr.ph60

.lr.ph57:                                         ; preds = %.lr.ph57, %.lr.ph57.preheader.new
  %indvars.iv74 = phi i64 [ 0, %.lr.ph57.preheader.new ], [ %indvars.iv.next75.3, %.lr.ph57 ]
  %niter = phi i64 [ 0, %.lr.ph57.preheader.new ], [ %niter.next.3, %.lr.ph57 ]
  %20 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv74
  %21 = load i32, ptr %20, align 16, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [100010 x i32], ptr %1, i64 0, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %23, align 4, !tbaa !5
  %indvars.iv.next75 = or disjoint i64 %indvars.iv74, 1
  %26 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv.next75
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100010 x i32], ptr %1, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %29, align 4, !tbaa !5
  %indvars.iv.next75.1 = or disjoint i64 %indvars.iv74, 2
  %32 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv.next75.1
  %33 = load i32, ptr %32, align 8, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100010 x i32], ptr %1, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %35, align 4, !tbaa !5
  %indvars.iv.next75.2 = or disjoint i64 %indvars.iv74, 3
  %38 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv.next75.2
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [100010 x i32], ptr %1, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %41, align 4, !tbaa !5
  %indvars.iv.next75.3 = add nuw nsw i64 %indvars.iv74, 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 %.preheader50.unr-lcssa, label %.lr.ph57, !llvm.loop !13

.lr.ph60:                                         ; preds = %.lr.ph60.preheader, %47
  %indvars.iv77 = phi i64 [ 0, %.lr.ph60.preheader ], [ %indvars.iv.next78, %47 ]
  %44 = getelementptr inbounds [100010 x i32], ptr %1, i64 0, i64 %indvars.iv77
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = icmp eq i32 %45, 2
  br i1 %46, label %48, label %47

47:                                               ; preds = %.lr.ph60
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond81.not = icmp eq i64 %indvars.iv.next78, %wide.trip.count80
  br i1 %exitcond81.not, label %.thread, label %.lr.ph60, !llvm.loop !14

48:                                               ; preds = %.lr.ph60
  %49 = trunc nuw nsw i64 %indvars.iv77 to i32
  %.not44 = icmp eq i64 %indvars.iv77, 0
  br i1 %.not44, label %.thread, label %.lr.ph65.preheader

.lr.ph65.preheader:                               ; preds = %48
  %xtraiter89 = and i64 %wide.trip.count, 1
  %50 = icmp eq i32 %6, 0
  br i1 %50, label %.lr.ph69.preheader.unr-lcssa, label %.lr.ph65.preheader.new

.lr.ph65.preheader.new:                           ; preds = %.lr.ph65.preheader
  %unroll_iter93 = and i64 %wide.trip.count, 4294967294
  br label %.lr.ph65

.thread:                                          ; preds = %47, %._crit_edge, %.preheader50, %48
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 100, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

.lr.ph65:                                         ; preds = %.lr.ph65, %.lr.ph65.preheader.new
  %indvars.iv82 = phi i64 [ 0, %.lr.ph65.preheader.new ], [ %indvars.iv.next83.1, %.lr.ph65 ]
  %.03663 = phi i8 [ 1, %.lr.ph65.preheader.new ], [ %.1.1, %.lr.ph65 ]
  %.03762 = phi i32 [ 0, %.lr.ph65.preheader.new ], [ %.138.1, %.lr.ph65 ]
  %niter94 = phi i64 [ 0, %.lr.ph65.preheader.new ], [ %niter94.next.1, %.lr.ph65 ]
  %51 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv82
  %52 = load i32, ptr %51, align 8, !tbaa !5
  %53 = icmp eq i32 %52, %49
  %54 = and i8 %.03663, 1
  %55 = xor i8 %54, 1
  %56 = zext nneg i8 %54 to i32
  %spec.select = select i1 %53, i32 0, i32 %56
  %.138 = add nuw nsw i32 %spec.select, %.03762
  %.1 = select i1 %53, i8 %55, i8 %.03663
  %indvars.iv.next83 = or disjoint i64 %indvars.iv82, 1
  %57 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv.next83
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = icmp eq i32 %58, %49
  %60 = and i8 %.1, 1
  %61 = xor i8 %60, 1
  %62 = zext nneg i8 %60 to i32
  %spec.select.1 = select i1 %59, i32 0, i32 %62
  %.138.1 = add nuw nsw i32 %spec.select.1, %.138
  %.1.1 = select i1 %59, i8 %61, i8 %.1
  %indvars.iv.next83.1 = add nuw nsw i64 %indvars.iv82, 2
  %niter94.next.1 = add i64 %niter94, 2
  %niter94.ncmp.1 = icmp eq i64 %niter94.next.1, %unroll_iter93
  br i1 %niter94.ncmp.1, label %.lr.ph69.preheader.unr-lcssa.loopexit, label %.lr.ph65, !llvm.loop !15

.lr.ph69.preheader.unr-lcssa.loopexit:            ; preds = %.lr.ph65
  %63 = and i8 %.1.1, 1
  %64 = zext nneg i8 %63 to i32
  br label %.lr.ph69.preheader.unr-lcssa

.lr.ph69.preheader.unr-lcssa:                     ; preds = %.lr.ph69.preheader.unr-lcssa.loopexit, %.lr.ph65.preheader
  %.138.lcssa.ph = phi i32 [ poison, %.lr.ph65.preheader ], [ %.138.1, %.lr.ph69.preheader.unr-lcssa.loopexit ]
  %indvars.iv82.unr = phi i64 [ 0, %.lr.ph65.preheader ], [ %indvars.iv.next83.1, %.lr.ph69.preheader.unr-lcssa.loopexit ]
  %.03663.unr = phi i32 [ 1, %.lr.ph65.preheader ], [ %64, %.lr.ph69.preheader.unr-lcssa.loopexit ]
  %.03762.unr = phi i32 [ 0, %.lr.ph65.preheader ], [ %.138.1, %.lr.ph69.preheader.unr-lcssa.loopexit ]
  %lcmp.mod91.not = icmp eq i64 %xtraiter89, 0
  br i1 %lcmp.mod91.not, label %.lr.ph69.preheader, label %.lr.ph65.epil

.lr.ph65.epil:                                    ; preds = %.lr.ph69.preheader.unr-lcssa
  %65 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %indvars.iv82.unr
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = icmp eq i32 %66, %49
  %spec.select.epil = select i1 %67, i32 0, i32 %.03663.unr
  %.138.epil = add nuw nsw i32 %spec.select.epil, %.03762.unr
  br label %.lr.ph69.preheader

.lr.ph69.preheader:                               ; preds = %.lr.ph69.preheader.unr-lcssa, %.lr.ph65.epil
  %.138.lcssa = phi i32 [ %.138.lcssa.ph, %.lr.ph69.preheader.unr-lcssa ], [ %.138.epil, %.lr.ph65.epil ]
  br label %.lr.ph69

._crit_edge70:                                    ; preds = %.lr.ph69
  call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %1) #7
  ret i32 0

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %.lr.ph69
  %68 = phi i32 [ %90, %.lr.ph69 ], [ %6, %.lr.ph69.preheader ]
  %.03468 = phi i32 [ %89, %.lr.ph69 ], [ 1, %.lr.ph69.preheader ]
  %69 = add nsw i32 %68, -1
  %70 = call noundef i64 @_Z1Cii(i32 noundef %69, i32 noundef %.03468)
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = add nsw i32 %71, -1
  %73 = add nsw i32 %.03468, -1
  %74 = call noundef i64 @_Z1Cii(i32 noundef %72, i32 noundef %73)
  %75 = shl nsw i64 %74, 1
  %76 = add nsw i64 %75, %70
  %77 = srem i64 %76, 1000000007
  %78 = call noundef i64 @_Z1Cii(i32 noundef %.138.lcssa, i32 noundef %73)
  %reass.sub71 = sub i64 %77, %78
  %79 = add i64 %reass.sub71, 1000000007
  %80 = srem i64 %79, 1000000007
  %81 = load i32, ptr @n, align 4, !tbaa !5
  %82 = add nsw i32 %81, -1
  %83 = add nsw i32 %.03468, -2
  %84 = call noundef i64 @_Z1Cii(i32 noundef %82, i32 noundef %83)
  %85 = add nsw i64 %80, %84
  %86 = srem i64 %85, 1000000007
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %86)
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %89 = add nuw nsw i32 %.03468, 1
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %.not46 = icmp sgt i32 %.03468, %90
  br i1 %.not46, label %._crit_edge70, label %.lr.ph69, !llvm.loop !16
}

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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

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

attributes #0 = { 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 #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 = { 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 #5 = { noreturn nounwind "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 = { 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 }
attributes #8 = { noreturn 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, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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