; LLVM IR from kazunetakahashi/atcoder :: 2018/0701_ARC100 (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 [200010 x i64], align 16
@sum = external dso_local global i64, align 8
@imos = external dso_local global [200010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5indexx(i64 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 i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %21 = 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 %22

22:                                               ; preds = %38, %0
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @N, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %29
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !9
  %36 = load i64, ptr @sum, align 8, !tbaa !9
  %37 = add nsw i64 %36, %35
  store i64 %37, ptr @sum, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %27
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !11

41:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @imos, ptr noundef getelementptr inbounds (i64, ptr @imos, i64 200010), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  %42 = load i64, ptr @A, align 16, !tbaa !9
  store i64 %42, ptr @imos, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %62, %41
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = load i32, ptr @N, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %65

48:                                               ; preds = %43
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = add nsw i64 %53, %57
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %60
  store i64 %58, ptr %61, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %48
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %4, align 4, !tbaa !5
  br label %43, !llvm.loop !13

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

66:                                               ; preds = %166, %65
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = load i32, ptr @N, align 4, !tbaa !5
  %69 = sub nsw i32 %68, 2
  %70 = icmp slt i32 %67, %69
  br i1 %70, label %72, label %71

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

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !9
  store i64 %76, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %77 = load i64, ptr @sum, align 8, !tbaa !9
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !9
  %82 = sub nsw i64 %77, %81
  store i64 %82, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %83 = load i64, ptr %8, align 8, !tbaa !9
  %84 = sdiv i64 %83, 2
  %85 = call noundef i32 @_Z5indexx(i64 noundef %84)
  store i32 %85, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = sub nsw i32 %86, 2
  store i32 %87, ptr %11, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %162, %72
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = add nsw i32 %90, 2
  %92 = icmp sle i32 %89, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %88
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %165

94:                                               ; preds = %88
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = icmp sle i32 0, %95
  br i1 %96, label %97, label %161

97:                                               ; preds = %94
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %161

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %103
  %105 = load i64, ptr %104, align 8, !tbaa !9
  store i64 %105, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %106 = load i64, ptr %8, align 8, !tbaa !9
  %107 = load i64, ptr %12, align 8, !tbaa !9
  %108 = sub nsw i64 %106, %107
  store i64 %108, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %109 = load i64, ptr %8, align 8, !tbaa !9
  %110 = load i64, ptr %9, align 8, !tbaa !9
  %111 = sdiv i64 %110, 2
  %112 = add nsw i64 %109, %111
  %113 = call noundef i32 @_Z5indexx(i64 noundef %112)
  %114 = sext i32 %113 to i64
  store i64 %114, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %115 = load i64, ptr %14, align 8, !tbaa !9
  %116 = sub nsw i64 %115, 2
  store i64 %116, ptr %15, align 8, !tbaa !9
  br label %117

117:                                              ; preds = %157, %101
  %118 = load i64, ptr %15, align 8, !tbaa !9
  %119 = load i64, ptr %14, align 8, !tbaa !9
  %120 = add nsw i64 %119, 2
  %121 = icmp slt i64 %118, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %117
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %160

123:                                              ; preds = %117
  %124 = load i32, ptr %6, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = load i64, ptr %15, align 8, !tbaa !9
  %127 = icmp slt i64 %125, %126
  br i1 %127, label %128, label %156

128:                                              ; preds = %123
  %129 = load i64, ptr %15, align 8, !tbaa !9
  %130 = load i32, ptr @N, align 4, !tbaa !5
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = icmp slt i64 %129, %132
  br i1 %133, label %134, label %156

134:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %135 = load i64, ptr %15, align 8, !tbaa !9
  %136 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !9
  %138 = load i64, ptr %8, align 8, !tbaa !9
  %139 = sub nsw i64 %137, %138
  store i64 %139, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %140 = load i64, ptr %9, align 8, !tbaa !9
  %141 = load i64, ptr %16, align 8, !tbaa !9
  %142 = sub nsw i64 %140, %141
  store i64 %142, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef nonnull align 8 dereferenceable(8) %144)
  %146 = load i64, ptr %145, align 8, !tbaa !9
  store i64 %146, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull align 8 dereferenceable(8) %148)
  %150 = load i64, ptr %149, align 8, !tbaa !9
  store i64 %150, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %151 = load i64, ptr %18, align 8, !tbaa !9
  %152 = load i64, ptr %19, align 8, !tbaa !9
  %153 = sub nsw i64 %151, %152
  store i64 %153, ptr %20, align 8, !tbaa !9
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %155 = load i64, ptr %154, align 8, !tbaa !9
  store i64 %155, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %156

156:                                              ; preds = %134, %128, %123
  br label %157

157:                                              ; preds = %156
  %158 = load i64, ptr %15, align 8, !tbaa !9
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %15, align 8, !tbaa !9
  br label %117, !llvm.loop !14

160:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %161

161:                                              ; preds = %160, %97, %94
  br label %162

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

165:                                              ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %6, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %6, align 4, !tbaa !5
  br label %66, !llvm.loop !16

169:                                              ; preds = %71
  %170 = load i64, ptr %5, align 8, !tbaa !9
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %170)
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %171, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %173 = load i32, ptr %1, align 4
  ret i32 %173
}

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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

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

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

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

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 = { 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 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


; 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 [200010 x i64], align 16
@sum = external dso_local local_unnamed_addr global i64, align 8
@imos = external dso_local global [200010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5indexx(i64 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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = 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)
  %9 = load i32, ptr @N, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @imos, ptr noundef nonnull getelementptr inbounds (i8, ptr @imos, i64 1600080), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %11 = load i64, ptr @A, align 16, !tbaa !9
  store i64 %11, ptr @imos, align 16, !tbaa !9
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 1
  br i1 %13, label %.lr.ph45.preheader, label %._crit_edge46.thread

._crit_edge46.thread:                             ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 1000000000000007, ptr %2, align 8, !tbaa !9
  br label %._crit_edge52

.lr.ph45.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %12 to i64
  %14 = add nsw i64 %wide.trip.count, -1
  %15 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %14, 3
  %16 = icmp ult i64 %15, 3
  br i1 %16, label %._crit_edge46.unr-lcssa, label %.lr.ph45.preheader.new

.lr.ph45.preheader.new:                           ; preds = %.lr.ph45.preheader
  %unroll_iter = and i64 %14, -4
  br label %.lr.ph45

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %17 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %19 = load i64, ptr %17, align 8, !tbaa !9
  %20 = load i64, ptr @sum, align 8, !tbaa !9
  %21 = add nsw i64 %20, %19
  store i64 %21, ptr @sum, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr @N, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge46.unr-lcssa:                          ; preds = %.lr.ph45, %.lr.ph45.preheader
  %.unr = phi i64 [ %11, %.lr.ph45.preheader ], [ %46, %.lr.ph45 ]
  %indvars.iv55.unr = phi i64 [ 1, %.lr.ph45.preheader ], [ %indvars.iv.next56.3, %.lr.ph45 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge46, label %.lr.ph45.epil

.lr.ph45.epil:                                    ; preds = %._crit_edge46.unr-lcssa, %.lr.ph45.epil
  %25 = phi i64 [ %28, %.lr.ph45.epil ], [ %.unr, %._crit_edge46.unr-lcssa ]
  %indvars.iv55.epil = phi i64 [ %indvars.iv.next56.epil, %.lr.ph45.epil ], [ %indvars.iv55.unr, %._crit_edge46.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph45.epil ], [ 0, %._crit_edge46.unr-lcssa ]
  %26 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv55.epil
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = add nsw i64 %27, %25
  %29 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %indvars.iv55.epil
  store i64 %28, ptr %29, align 8, !tbaa !9
  %indvars.iv.next56.epil = add nuw nsw i64 %indvars.iv55.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 %._crit_edge46, label %.lr.ph45.epil, !llvm.loop !13

._crit_edge46:                                    ; preds = %.lr.ph45.epil, %._crit_edge46.unr-lcssa
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 1000000000000007, ptr %2, align 8, !tbaa !9
  %30 = icmp sgt i32 %12, 3
  br i1 %30, label %.lr.ph51, label %._crit_edge52

.lr.ph45:                                         ; preds = %.lr.ph45, %.lr.ph45.preheader.new
  %31 = phi i64 [ %11, %.lr.ph45.preheader.new ], [ %46, %.lr.ph45 ]
  %indvars.iv55 = phi i64 [ 1, %.lr.ph45.preheader.new ], [ %indvars.iv.next56.3, %.lr.ph45 ]
  %niter = phi i64 [ 0, %.lr.ph45.preheader.new ], [ %niter.next.3, %.lr.ph45 ]
  %32 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv55
  %33 = load i64, ptr %32, align 8, !tbaa !9
  %34 = add nsw i64 %33, %31
  %35 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %indvars.iv55
  store i64 %34, ptr %35, align 8, !tbaa !9
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %36 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv.next56
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = add nsw i64 %37, %34
  %39 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %indvars.iv.next56
  store i64 %38, ptr %39, align 8, !tbaa !9
  %indvars.iv.next56.1 = add nuw nsw i64 %indvars.iv55, 2
  %40 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv.next56.1
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = add nsw i64 %41, %38
  %43 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %indvars.iv.next56.1
  store i64 %42, ptr %43, align 8, !tbaa !9
  %indvars.iv.next56.2 = add nuw nsw i64 %indvars.iv55, 3
  %44 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv.next56.2
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = add nsw i64 %45, %42
  %47 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %indvars.iv.next56.2
  store i64 %46, ptr %47, align 8, !tbaa !9
  %indvars.iv.next56.3 = add nuw nsw i64 %indvars.iv55, 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 %._crit_edge46.unr-lcssa, label %.lr.ph45, !llvm.loop !15

._crit_edge52.loopexit:                           ; preds = %61
  %.pre = load i64, ptr %2, align 8, !tbaa !9
  br label %._crit_edge52

._crit_edge52:                                    ; preds = %._crit_edge46.thread, %._crit_edge52.loopexit, %._crit_edge46
  %48 = phi i64 [ %.pre, %._crit_edge52.loopexit ], [ 1000000000000007, %._crit_edge46 ], [ 1000000000000007, %._crit_edge46.thread ]
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %48)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret i32 0

.lr.ph51:                                         ; preds = %._crit_edge46, %61
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %61 ], [ 1, %._crit_edge46 ]
  %51 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %indvars.iv59
  %52 = load i64, ptr %51, align 8, !tbaa !9
  %53 = load i64, ptr @sum, align 8, !tbaa !9
  %54 = sub nsw i64 %53, %52
  %55 = sdiv i64 %52, 2
  %56 = call noundef i32 @_Z5indexx(i64 noundef %55)
  %57 = add nsw i32 %56, -2
  %58 = add nsw i32 %56, 2
  %59 = sdiv i64 %54, 2
  %60 = add nsw i64 %59, %52
  br label %66

61:                                               ; preds = %163
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %62 = load i32, ptr @N, align 4, !tbaa !5
  %63 = add nsw i32 %62, -2
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next60, %64
  br i1 %65, label %.lr.ph51, label %._crit_edge52.loopexit, !llvm.loop !16

66:                                               ; preds = %.lr.ph51, %163
  %.04148 = phi i32 [ %57, %.lr.ph51 ], [ %164, %163 ]
  %67 = zext i32 %.04148 to i64
  %or.cond = icmp ugt i64 %indvars.iv59, %67
  br i1 %or.cond, label %68, label %163

68:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %69 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %67
  %70 = load i64, ptr %69, align 8, !tbaa !9
  store i64 %70, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %71 = sub nsw i64 %52, %70
  store i64 %71, ptr %4, align 8, !tbaa !9
  %72 = call noundef i32 @_Z5indexx(i64 noundef %60)
  %73 = sext i32 %72 to i64
  %74 = add nsw i64 %73, -2
  %75 = icmp sgt i64 %74, %indvars.iv59
  br i1 %75, label %76, label %97

76:                                               ; preds = %68
  %77 = load i32, ptr @N, align 4, !tbaa !5
  %78 = add nsw i32 %77, -1
  %79 = sext i32 %78 to i64
  %80 = icmp slt i64 %74, %79
  br i1 %80, label %81, label %97

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %82 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %74
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = sub nsw i64 %83, %52
  store i64 %84, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %85 = sub nsw i64 %54, %84
  store i64 %85, ptr %6, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 8 dereferenceable(8) %87)
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 8 dereferenceable(8) %91)
  %93 = load i64, ptr %92, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %94 = sub nsw i64 %89, %93
  store i64 %94, ptr %7, align 8, !tbaa !9
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %96 = load i64, ptr %95, align 8, !tbaa !9
  store i64 %96, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %97

97:                                               ; preds = %68, %76, %81
  %98 = add nsw i64 %73, -1
  %99 = icmp sgt i64 %98, %indvars.iv59
  %100 = load i32, ptr @N, align 4
  %.not.not62 = icmp slt i32 %72, %100
  %or.cond63 = select i1 %99, i1 %.not.not62, i1 false
  br i1 %or.cond63, label %101, label %117

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %102 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %98
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = sub nsw i64 %103, %52
  store i64 %104, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %105 = sub nsw i64 %54, %104
  store i64 %105, ptr %6, align 8, !tbaa !9
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull align 8 dereferenceable(8) %107)
  %109 = load i64, ptr %108, align 8, !tbaa !9
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef nonnull align 8 dereferenceable(8) %111)
  %113 = load i64, ptr %112, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %114 = sub nsw i64 %109, %113
  store i64 %114, ptr %7, align 8, !tbaa !9
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %116 = load i64, ptr %115, align 8, !tbaa !9
  store i64 %116, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %117

117:                                              ; preds = %101, %97
  %118 = icmp slt i64 %indvars.iv59, %73
  br i1 %118, label %119, label %139

119:                                              ; preds = %117
  %120 = load i32, ptr @N, align 4, !tbaa !5
  %121 = add nsw i32 %120, -1
  %122 = icmp slt i32 %72, %121
  br i1 %122, label %123, label %139

123:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %124 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %73
  %125 = load i64, ptr %124, align 8, !tbaa !9
  %126 = sub nsw i64 %125, %52
  store i64 %126, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %127 = sub nsw i64 %54, %126
  store i64 %127, ptr %6, align 8, !tbaa !9
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef nonnull align 8 dereferenceable(8) %129)
  %131 = load i64, ptr %130, align 8, !tbaa !9
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef nonnull align 8 dereferenceable(8) %133)
  %135 = load i64, ptr %134, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %136 = sub nsw i64 %131, %135
  store i64 %136, ptr %7, align 8, !tbaa !9
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %138 = load i64, ptr %137, align 8, !tbaa !9
  store i64 %138, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %139

139:                                              ; preds = %123, %119, %117
  %140 = add nsw i64 %73, 1
  %.not = icmp sgt i64 %indvars.iv59, %73
  br i1 %.not, label %162, label %141

141:                                              ; preds = %139
  %142 = load i32, ptr @N, align 4, !tbaa !5
  %143 = add nsw i32 %142, -1
  %144 = sext i32 %143 to i64
  %145 = icmp slt i64 %140, %144
  br i1 %145, label %146, label %162

146:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %147 = getelementptr inbounds [200010 x i64], ptr @imos, i64 0, i64 %140
  %148 = load i64, ptr %147, align 8, !tbaa !9
  %149 = sub nsw i64 %148, %52
  store i64 %149, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %150 = sub nsw i64 %54, %149
  store i64 %150, ptr %6, align 8, !tbaa !9
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %151, ptr noundef nonnull align 8 dereferenceable(8) %152)
  %154 = load i64, ptr %153, align 8, !tbaa !9
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef nonnull align 8 dereferenceable(8) %156)
  %158 = load i64, ptr %157, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %159 = sub nsw i64 %154, %158
  store i64 %159, ptr %7, align 8, !tbaa !9
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %161 = load i64, ptr %160, align 8, !tbaa !9
  store i64 %161, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %162

162:                                              ; preds = %146, %141, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %163

163:                                              ; preds = %66, %162
  %164 = add nsw i32 %.04148, 1
  %.not.not = icmp slt i32 %.04148, %58
  br i1 %.not.not, label %66, label %61, !llvm.loop !17
}

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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

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

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

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 = { 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 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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