; LLVM IR from Tunghohin/Competitive_Coding :: Codeforces/cf1582_D.ll (Z5solvev)

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

@a = external dso_local global [100010 x i64], align 16
@b = external dso_local global [100010 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 uwtable
define dso_local void @_Z5solvev() #0 {
  %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 i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  %9 = 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 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %20, %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = icmp sle i32 %11, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %23

15:                                               ; preds = %10
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %17
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %18)
  br label %20

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

23:                                               ; preds = %14
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = srem i32 %24, 2
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %55

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %51, %27
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %54

33:                                               ; preds = %28
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !11
  %39 = sub nsw i64 0, %38
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %41
  store i64 %39, ptr %42, align 8, !tbaa !11
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !11
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %49
  store i64 %46, ptr %50, align 8, !tbaa !11
  br label %51

51:                                               ; preds = %33
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = add nsw i32 %52, 2
  store i32 %53, ptr %3, align 4, !tbaa !5
  br label %28, !llvm.loop !13

54:                                               ; preds = %32
  br label %118

55:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 4, ptr %4, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %79, %55
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = load i32, ptr %1, align 4, !tbaa !5
  %59 = icmp sle i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %82

61:                                               ; preds = %56
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !11
  %67 = sub nsw i64 0, %66
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %69
  store i64 %67, ptr %70, align 8, !tbaa !11
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !11
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %77
  store i64 %74, ptr %78, align 8, !tbaa !11
  br label %79

79:                                               ; preds = %61
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = add nsw i32 %80, 2
  store i32 %81, ptr %4, align 4, !tbaa !5
  br label %56, !llvm.loop !14

82:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %83 = load i64, ptr getelementptr inbounds ([100010 x i64], ptr @a, i64 0, i64 1), align 8, !tbaa !11
  store i64 %83, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %84 = load i64, ptr getelementptr inbounds ([100010 x i64], ptr @a, i64 0, i64 2), align 16, !tbaa !11
  store i64 %84, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %85 = load i64, ptr getelementptr inbounds ([100010 x i64], ptr @a, i64 0, i64 3), align 8, !tbaa !11
  store i64 %85, ptr %7, align 8, !tbaa !11
  %86 = load i64, ptr %5, align 8, !tbaa !11
  %87 = load i64, ptr %6, align 8, !tbaa !11
  %88 = add nsw i64 %86, %87
  %89 = icmp ne i64 %88, 0
  br i1 %89, label %90, label %97

90:                                               ; preds = %82
  %91 = load i64, ptr %7, align 8, !tbaa !11
  store i64 %91, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 1), align 8, !tbaa !11
  %92 = load i64, ptr %7, align 8, !tbaa !11
  store i64 %92, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 2), align 16, !tbaa !11
  %93 = load i64, ptr %5, align 8, !tbaa !11
  %94 = load i64, ptr %6, align 8, !tbaa !11
  %95 = add nsw i64 %93, %94
  %96 = sub nsw i64 0, %95
  store i64 %96, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 3), align 8, !tbaa !11
  br label %117

97:                                               ; preds = %82
  %98 = load i64, ptr %5, align 8, !tbaa !11
  %99 = load i64, ptr %7, align 8, !tbaa !11
  %100 = add nsw i64 %98, %99
  %101 = icmp ne i64 %100, 0
  br i1 %101, label %102, label %109

102:                                              ; preds = %97
  %103 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %103, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 1), align 8, !tbaa !11
  %104 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %104, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 3), align 8, !tbaa !11
  %105 = load i64, ptr %5, align 8, !tbaa !11
  %106 = load i64, ptr %7, align 8, !tbaa !11
  %107 = add nsw i64 %105, %106
  %108 = sub nsw i64 0, %107
  store i64 %108, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 2), align 16, !tbaa !11
  br label %116

109:                                              ; preds = %97
  %110 = load i64, ptr %5, align 8, !tbaa !11
  store i64 %110, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 2), align 16, !tbaa !11
  %111 = load i64, ptr %5, align 8, !tbaa !11
  store i64 %111, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 3), align 8, !tbaa !11
  %112 = load i64, ptr %6, align 8, !tbaa !11
  %113 = load i64, ptr %7, align 8, !tbaa !11
  %114 = add nsw i64 %112, %113
  %115 = sub nsw i64 0, %114
  store i64 %115, ptr getelementptr inbounds ([100010 x i64], ptr @b, i64 0, i64 1), align 8, !tbaa !11
  br label %116

116:                                              ; preds = %109, %102
  br label %117

117:                                              ; preds = %116, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %118

118:                                              ; preds = %117, %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %131, %118
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = icmp sle i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %134

124:                                              ; preds = %119
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !11
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %128)
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %129, i8 noundef signext 32)
  br label %131

131:                                              ; preds = %124
  %132 = load i32, ptr %8, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %8, align 4, !tbaa !5
  br label %119, !llvm.loop !15

134:                                              ; preds = %123
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

; 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: 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)) #0 align 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #3

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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" }

@a = external dso_local global [100010 x i64], align 16
@b = external dso_local local_unnamed_addr global [100010 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 uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %2 = 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)
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %.not46 = icmp slt i32 %3, 1
  br i1 %.not46, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %4 = phi i32 [ %3, %0 ], [ %15, %.lr.ph ]
  %5 = and i32 %4, 1
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %.preheader, label %.preheader45

.preheader45:                                     ; preds = %._crit_edge
  %.not4048 = icmp slt i32 %4, 4
  br i1 %.not4048, label %._crit_edge51, label %.lr.ph50.preheader

.lr.ph50.preheader:                               ; preds = %.preheader45
  %7 = zext nneg i32 %4 to i64
  br label %.lr.ph50

.preheader:                                       ; preds = %._crit_edge
  %.not4352 = icmp slt i32 %4, 1
  br i1 %.not4352, label %._crit_edge59, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %.preheader
  %8 = zext nneg i32 %4 to i64
  %9 = add nsw i64 %8, -1
  %10 = icmp ult i32 %4, 3
  br i1 %10, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph54.preheader.new

.lr.ph54.preheader.new:                           ; preds = %.lr.ph54.preheader
  %11 = lshr i64 %9, 1
  %12 = add nuw i64 %11, 1
  %unroll_iter = and i64 %12, -2
  br label %.lr.ph54

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %13 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %.not.not = icmp slt i64 %indvars.iv, %16
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph54:                                         ; preds = %.lr.ph54, %.lr.ph54.preheader.new
  %indvars.iv65 = phi i64 [ 1, %.lr.ph54.preheader.new ], [ %indvars.iv.next66.1, %.lr.ph54 ]
  %niter = phi i64 [ 0, %.lr.ph54.preheader.new ], [ %niter.next.1, %.lr.ph54 ]
  %17 = add nuw nsw i64 %indvars.iv65, 1
  %18 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %17
  %19 = load i64, ptr %18, align 8, !tbaa !11
  %20 = sub nsw i64 0, %19
  %21 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %indvars.iv65
  store i64 %20, ptr %21, align 8, !tbaa !11
  %22 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv65
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %17
  store i64 %23, ptr %24, align 8, !tbaa !11
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 2
  %25 = add nuw nsw i64 %indvars.iv65, 3
  %26 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = sub nsw i64 0, %27
  %29 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %indvars.iv.next66
  store i64 %28, ptr %29, align 8, !tbaa !11
  %30 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv.next66
  %31 = load i64, ptr %30, align 8, !tbaa !11
  %32 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %25
  store i64 %31, ptr %32, align 8, !tbaa !11
  %indvars.iv.next66.1 = add nuw nsw i64 %indvars.iv65, 4
  %niter.next.1 = add nuw nsw i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph54, !llvm.loop !13

._crit_edge51:                                    ; preds = %.lr.ph50, %.preheader45
  %33 = load i64, ptr getelementptr inbounds (i8, ptr @a, i64 8), align 8, !tbaa !11
  %34 = load i64, ptr getelementptr inbounds (i8, ptr @a, i64 16), align 16, !tbaa !11
  %35 = load i64, ptr getelementptr inbounds (i8, ptr @a, i64 24), align 8, !tbaa !11
  %36 = add nsw i64 %34, %33
  %.not41 = icmp eq i64 %36, 0
  br i1 %.not41, label %47, label %45

.lr.ph50:                                         ; preds = %.lr.ph50.preheader, %.lr.ph50
  %indvars.iv62 = phi i64 [ 4, %.lr.ph50.preheader ], [ %indvars.iv.next63, %.lr.ph50 ]
  %37 = or disjoint i64 %indvars.iv62, 1
  %38 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %37
  %39 = load i64, ptr %38, align 8, !tbaa !11
  %40 = sub nsw i64 0, %39
  %41 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %indvars.iv62
  store i64 %40, ptr %41, align 16, !tbaa !11
  %42 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv62
  %43 = load i64, ptr %42, align 16, !tbaa !11
  %44 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %37
  store i64 %43, ptr %44, align 8, !tbaa !11
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 2
  %.not40 = icmp ugt i64 %indvars.iv.next63, %7
  br i1 %.not40, label %._crit_edge51, label %.lr.ph50, !llvm.loop !14

45:                                               ; preds = %._crit_edge51
  store i64 %35, ptr getelementptr inbounds (i8, ptr @b, i64 8), align 8, !tbaa !11
  store i64 %35, ptr getelementptr inbounds (i8, ptr @b, i64 16), align 16, !tbaa !11
  %46 = sub nsw i64 0, %36
  store i64 %46, ptr getelementptr inbounds (i8, ptr @b, i64 24), align 8, !tbaa !11
  br label %.loopexit

47:                                               ; preds = %._crit_edge51
  %48 = add nsw i64 %35, %33
  %.not42 = icmp eq i64 %48, 0
  br i1 %.not42, label %51, label %49

49:                                               ; preds = %47
  store i64 %34, ptr getelementptr inbounds (i8, ptr @b, i64 8), align 8, !tbaa !11
  store i64 %34, ptr getelementptr inbounds (i8, ptr @b, i64 24), align 8, !tbaa !11
  %50 = sub nsw i64 0, %48
  store i64 %50, ptr getelementptr inbounds (i8, ptr @b, i64 16), align 16, !tbaa !11
  br label %.loopexit

51:                                               ; preds = %47
  store i64 %33, ptr getelementptr inbounds (i8, ptr @b, i64 16), align 16, !tbaa !11
  store i64 %33, ptr getelementptr inbounds (i8, ptr @b, i64 24), align 8, !tbaa !11
  %52 = add nsw i64 %34, %35
  %53 = sub nsw i64 0, %52
  store i64 %53, ptr getelementptr inbounds (i8, ptr @b, i64 8), align 8, !tbaa !11
  br label %.loopexit

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph54, %.lr.ph54.preheader
  %indvars.iv65.unr = phi i64 [ 1, %.lr.ph54.preheader ], [ %indvars.iv.next66.1, %.lr.ph54 ]
  %54 = and i64 %9, 2
  %lcmp.mod.not.not = icmp eq i64 %54, 0
  br i1 %lcmp.mod.not.not, label %.lr.ph54.epil, label %.loopexit

.lr.ph54.epil:                                    ; preds = %.loopexit.loopexit.unr-lcssa
  %55 = add nuw nsw i64 %indvars.iv65.unr, 1
  %56 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !11
  %58 = sub nsw i64 0, %57
  %59 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %indvars.iv65.unr
  store i64 %58, ptr %59, align 8, !tbaa !11
  %60 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv65.unr
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %55
  store i64 %61, ptr %62, align 8, !tbaa !11
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph54.epil, %.loopexit.loopexit.unr-lcssa, %45, %51, %49
  %.not4455 = icmp slt i32 %4, 1
  br i1 %.not4455, label %._crit_edge59, label %.lr.ph58

._crit_edge59:                                    ; preds = %.lr.ph58, %.preheader, %.loopexit
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void

.lr.ph58:                                         ; preds = %.loopexit, %.lr.ph58
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph58 ], [ 1, %.loopexit ]
  %64 = getelementptr inbounds [100010 x i64], ptr @b, i64 0, i64 %indvars.iv68
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %65)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %66, i8 noundef signext 32)
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %.not44.not = icmp slt i64 %indvars.iv68, %69
  br i1 %.not44.not, label %.lr.ph58, label %._crit_edge59, !llvm.loop !15
}

; 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 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 #0 align 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #3

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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