; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/Random/VFMUL (mul)

; 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@nn = external dso_local global i64, align 8
@a = external dso_local global [1000000 x i8], align 16
@b = external dso_local global [1000000 x i8], align 16
@n1 = external dso_local global %"class.std::vector.0", align 8
@n2 = external dso_local global %"class.std::vector.0", align 8
@r = external dso_local global %"class.std::vector.0", align 8
@l1 = external dso_local global i64, align 8
@l2 = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8multiplyRKSt6vectorIxSaIxEES3_RS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @nn)
  br label %15

15:                                               ; preds = %126, %0
  %16 = load i64, ptr @nn, align 8, !tbaa !5
  %17 = add nsw i64 %16, -1
  store i64 %17, ptr @nn, align 8, !tbaa !5
  %18 = icmp ne i64 %16, 0
  br i1 %18, label %19, label %128

19:                                               ; preds = %15
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef @a, ptr noundef @b)
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @n1) #7
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @n2) #7
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #7
  %21 = call i64 @strlen(ptr noundef @a) #8
  store i64 %21, ptr @l1, align 8, !tbaa !5
  %22 = call i64 @strlen(ptr noundef @b) #8
  store i64 %22, ptr @l2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %23 = load i64, ptr @l1, align 8, !tbaa !5
  %24 = sub nsw i64 %23, 1
  store i64 %24, ptr %2, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %54, %19
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = icmp sge i64 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 4, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %57

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %30 = load i64, ptr %2, align 8, !tbaa !5
  %31 = sub nsw i64 %30, 5
  %32 = add nsw i64 %31, 1
  store i64 %32, ptr %7, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %34 = load i64, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  store i64 %34, ptr %5, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %50, %29
  %36 = load i64, ptr %5, align 8, !tbaa !5
  %37 = load i64, ptr %2, align 8, !tbaa !5
  %38 = icmp sle i64 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 7, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %53

40:                                               ; preds = %35
  %41 = load i64, ptr %4, align 8, !tbaa !5
  %42 = mul nsw i64 %41, 10
  %43 = load i64, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds [1000000 x i8], ptr @a, i64 0, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = sext i8 %45 to i32
  %47 = sub nsw i32 %46, 48
  %48 = sext i32 %47 to i64
  %49 = add nsw i64 %42, %48
  store i64 %49, ptr %4, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %40
  %51 = load i64, ptr %5, align 8, !tbaa !5
  %52 = add nsw i64 %51, 1
  store i64 %52, ptr %5, align 8, !tbaa !5
  br label %35, !llvm.loop !10

53:                                               ; preds = %39
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @n1, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %54

54:                                               ; preds = %53
  %55 = load i64, ptr %2, align 8, !tbaa !5
  %56 = sub nsw i64 %55, 5
  store i64 %56, ptr %2, align 8, !tbaa !5
  br label %25, !llvm.loop !12

57:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %58 = load i64, ptr @l2, align 8, !tbaa !5
  %59 = sub nsw i64 %58, 1
  store i64 %59, ptr %8, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %89, %57
  %61 = load i64, ptr %8, align 8, !tbaa !5
  %62 = icmp sge i64 %61, 0
  br i1 %62, label %64, label %63

63:                                               ; preds = %60
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %92

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %65 = load i64, ptr %8, align 8, !tbaa !5
  %66 = sub nsw i64 %65, 5
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %12, align 8, !tbaa !5
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %69 = load i64, ptr %68, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  store i64 %69, ptr %10, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %85, %64
  %71 = load i64, ptr %10, align 8, !tbaa !5
  %72 = load i64, ptr %8, align 8, !tbaa !5
  %73 = icmp sle i64 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %88

75:                                               ; preds = %70
  %76 = load i64, ptr %9, align 8, !tbaa !5
  %77 = mul nsw i64 %76, 10
  %78 = load i64, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds [1000000 x i8], ptr @b, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = sext i8 %80 to i32
  %82 = sub nsw i32 %81, 48
  %83 = sext i32 %82 to i64
  %84 = add nsw i64 %77, %83
  store i64 %84, ptr %9, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %75
  %86 = load i64, ptr %10, align 8, !tbaa !5
  %87 = add nsw i64 %86, 1
  store i64 %87, ptr %10, align 8, !tbaa !5
  br label %70, !llvm.loop !13

88:                                               ; preds = %74
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @n2, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %89

89:                                               ; preds = %88
  %90 = load i64, ptr %8, align 8, !tbaa !5
  %91 = sub nsw i64 %90, 5
  store i64 %91, ptr %8, align 8, !tbaa !5
  br label %60, !llvm.loop !14

92:                                               ; preds = %63
  call void @_Z8multiplyRKSt6vectorIxSaIxEES3_RS1_(ptr noundef nonnull align 8 dereferenceable(24) @n1, ptr noundef nonnull align 8 dereferenceable(24) @n2, ptr noundef nonnull align 8 dereferenceable(24) @r)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %93 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #7
  %94 = sub i64 %93, 1
  store i64 %94, ptr %13, align 8, !tbaa !5
  br label %95

95:                                               ; preds = %105, %92
  %96 = load i64, ptr %13, align 8, !tbaa !5
  %97 = icmp sgt i64 %96, 0
  br i1 %97, label %98, label %103

98:                                               ; preds = %95
  %99 = load i64, ptr %13, align 8, !tbaa !5
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %99) #7
  %101 = load i64, ptr %100, align 8, !tbaa !5
  %102 = icmp eq i64 %101, 0
  br label %103

103:                                              ; preds = %98, %95
  %104 = phi i1 [ false, %95 ], [ %102, %98 ]
  br i1 %104, label %105, label %108

105:                                              ; preds = %103
  %106 = load i64, ptr %13, align 8, !tbaa !5
  %107 = add nsw i64 %106, -1
  store i64 %107, ptr %13, align 8, !tbaa !5
  br label %95, !llvm.loop !15

108:                                              ; preds = %103
  %109 = load i64, ptr %13, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %109) #7
  %111 = load i64, ptr %110, align 8, !tbaa !5
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str, i64 noundef %111)
  %113 = load i64, ptr %13, align 8, !tbaa !5
  %114 = add nsw i64 %113, -1
  store i64 %114, ptr %13, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %123, %108
  %116 = load i64, ptr %13, align 8, !tbaa !5
  %117 = icmp sge i64 %116, 0
  br i1 %117, label %118, label %126

118:                                              ; preds = %115
  %119 = load i64, ptr %13, align 8, !tbaa !5
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %119) #7
  %121 = load i64, ptr %120, align 8, !tbaa !5
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef 5, i64 noundef %121)
  br label %123

123:                                              ; preds = %118
  %124 = load i64, ptr %13, align 8, !tbaa !5
  %125 = add nsw i64 %124, -1
  store i64 %125, ptr %13, align 8, !tbaa !5
  br label %115, !llvm.loop !16

126:                                              ; preds = %115
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %15, !llvm.loop !17

128:                                              ; preds = %15
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #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: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare i32 @printf(ptr noundef, ...) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { "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 = { nounwind willreturn memory(read) "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 }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}


; 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@nn = external dso_local global i64, align 8
@a = external dso_local global [1000000 x i8], align 16
@b = external dso_local global [1000000 x i8], align 16
@n1 = external dso_local global %"class.std::vector.0", align 8
@n2 = external dso_local global %"class.std::vector.0", align 8
@r = external dso_local global %"class.std::vector.0", align 8
@l1 = external dso_local local_unnamed_addr global i64, align 8
@l2 = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8multiplyRKSt6vectorIxSaIxEES3_RS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i64, align 8
  %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 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @nn)
  %8 = load i64, ptr @nn, align 8, !tbaa !5
  %9 = add nsw i64 %8, -1
  store i64 %9, ptr @nn, align 8, !tbaa !5
  %.not48 = icmp eq i64 %8, 0
  br i1 %.not48, label %._crit_edge51, label %.lr.ph50

.lr.ph50:                                         ; preds = %0, %._crit_edge47
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull @a, ptr noundef nonnull @b)
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @n1) #7
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @n2) #7
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #7
  %11 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @a) #8
  store i64 %11, ptr @l1, align 8, !tbaa !5
  %12 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @b) #8
  store i64 %12, ptr @l2, align 8, !tbaa !5
  %13 = icmp sgt i64 %11, 0
  br i1 %13, label %.lr.ph32.preheader, label %._crit_edge33

.lr.ph32.preheader:                               ; preds = %.lr.ph50
  %14 = add nsw i64 %11, -1
  br label %.lr.ph32

._crit_edge33.loopexit:                           ; preds = %33
  %.pre = load i64, ptr @l2, align 8, !tbaa !5
  br label %._crit_edge33

._crit_edge33:                                    ; preds = %._crit_edge33.loopexit, %.lr.ph50
  %15 = phi i64 [ %.pre, %._crit_edge33.loopexit ], [ %12, %.lr.ph50 ]
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %.lr.ph43.preheader, label %._crit_edge44

.lr.ph43.preheader:                               ; preds = %._crit_edge33
  %17 = add nsw i64 %15, -1
  br label %.lr.ph43

.lr.ph32:                                         ; preds = %.lr.ph32.preheader, %33
  %indvars.iv = phi i64 [ %11, %.lr.ph32.preheader ], [ %indvars.iv.next, %33 ]
  %.02530 = phi i64 [ %14, %.lr.ph32.preheader ], [ %18, %33 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store i64 0, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %18 = add nsw i64 %.02530, -5
  %19 = add nsw i64 %.02530, -4
  store i64 %19, ptr %3, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %21 = load i64, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %.not2728 = icmp sgt i64 %21, %.02530
  br i1 %.not2728, label %33, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph32
  %.promoted = load i64, ptr %1, align 8, !tbaa !5
  %22 = sub i64 %indvars.iv, %21
  %23 = sub i64 %.02530, %21
  %xtraiter = and i64 %22, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.02429.prol = phi i64 [ %31, %.lr.ph.prol ], [ %21, %.lr.ph.preheader ]
  %24 = phi i64 [ %30, %.lr.ph.prol ], [ %.promoted, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %25 = mul nsw i64 %24, 10
  %26 = getelementptr inbounds [1000000 x i8], ptr @a, i64 0, i64 %.02429.prol
  %27 = load i8, ptr %26, align 1, !tbaa !9
  %28 = sext i8 %27 to i64
  %29 = add i64 %25, -48
  %30 = add i64 %29, %28
  %31 = add i64 %.02429.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !10

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.lcssa.unr = phi i64 [ poison, %.lr.ph.preheader ], [ %30, %.lr.ph.prol ]
  %.02429.unr = phi i64 [ %21, %.lr.ph.preheader ], [ %31, %.lr.ph.prol ]
  %.unr = phi i64 [ %.promoted, %.lr.ph.preheader ], [ %30, %.lr.ph.prol ]
  %32 = icmp ult i64 %23, 3
  br i1 %32, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph.prol.loopexit
  %.lcssa = phi i64 [ %.lcssa.unr, %.lr.ph.prol.loopexit ], [ %62, %.lr.ph ]
  store i64 %.lcssa, ptr %1, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %._crit_edge, %.lr.ph32
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @n1, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %34 = icmp sgt i64 %.02530, 4
  %indvars.iv.next = add nsw i64 %indvars.iv, -5
  br i1 %34, label %.lr.ph32, label %._crit_edge33.loopexit, !llvm.loop !12

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.02429 = phi i64 [ %63, %.lr.ph ], [ %.02429.unr, %.lr.ph.prol.loopexit ]
  %35 = phi i64 [ %62, %.lr.ph ], [ %.unr, %.lr.ph.prol.loopexit ]
  %36 = mul nsw i64 %35, 10
  %37 = getelementptr inbounds [1000000 x i8], ptr @a, i64 0, i64 %.02429
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = sext i8 %38 to i64
  %40 = add i64 %36, -48
  %41 = add i64 %40, %39
  %42 = add i64 %.02429, 1
  %43 = mul nsw i64 %41, 10
  %44 = getelementptr inbounds [1000000 x i8], ptr @a, i64 0, i64 %42
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = sext i8 %45 to i64
  %47 = add i64 %43, -48
  %48 = add i64 %47, %46
  %49 = add i64 %.02429, 2
  %50 = mul nsw i64 %48, 10
  %51 = getelementptr inbounds [1000000 x i8], ptr @a, i64 0, i64 %49
  %52 = load i8, ptr %51, align 1, !tbaa !9
  %53 = sext i8 %52 to i64
  %54 = add i64 %50, -48
  %55 = add i64 %54, %53
  %56 = add i64 %.02429, 3
  %57 = mul nsw i64 %55, 10
  %58 = getelementptr inbounds [1000000 x i8], ptr @a, i64 0, i64 %56
  %59 = load i8, ptr %58, align 1, !tbaa !9
  %60 = sext i8 %59 to i64
  %61 = add i64 %57, -48
  %62 = add i64 %61, %60
  %63 = add i64 %.02429, 4
  %exitcond.not.3 = icmp eq i64 %63, %indvars.iv
  br i1 %exitcond.not.3, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge44:                                    ; preds = %80, %._crit_edge33
  call void @_Z8multiplyRKSt6vectorIxSaIxEES3_RS1_(ptr noundef nonnull align 8 dereferenceable(24) @n1, ptr noundef nonnull align 8 dereferenceable(24) @n2, ptr noundef nonnull align 8 dereferenceable(24) @r)
  %64 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @r) #7
  br label %111

.lr.ph43:                                         ; preds = %.lr.ph43.preheader, %80
  %indvars.iv53 = phi i64 [ %15, %.lr.ph43.preheader ], [ %indvars.iv.next54, %80 ]
  %.02341 = phi i64 [ %17, %.lr.ph43.preheader ], [ %65, %80 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %65 = add nsw i64 %.02341, -5
  %66 = add nsw i64 %.02341, -4
  store i64 %66, ptr %6, align 8, !tbaa !5
  %67 = 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)
  %68 = load i64, ptr %67, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %.not2635 = icmp sgt i64 %68, %.02341
  br i1 %.not2635, label %80, label %.lr.ph38.preheader

.lr.ph38.preheader:                               ; preds = %.lr.ph43
  %.promoted34 = load i64, ptr %4, align 8, !tbaa !5
  %69 = sub i64 %indvars.iv53, %68
  %70 = sub i64 %.02341, %68
  %xtraiter60 = and i64 %69, 3
  %lcmp.mod61.not = icmp eq i64 %xtraiter60, 0
  br i1 %lcmp.mod61.not, label %.lr.ph38.prol.loopexit, label %.lr.ph38.prol

.lr.ph38.prol:                                    ; preds = %.lr.ph38.preheader, %.lr.ph38.prol
  %.02236.prol = phi i64 [ %78, %.lr.ph38.prol ], [ %68, %.lr.ph38.preheader ]
  %71 = phi i64 [ %77, %.lr.ph38.prol ], [ %.promoted34, %.lr.ph38.preheader ]
  %prol.iter62 = phi i64 [ %prol.iter62.next, %.lr.ph38.prol ], [ 0, %.lr.ph38.preheader ]
  %72 = mul nsw i64 %71, 10
  %73 = getelementptr inbounds [1000000 x i8], ptr @b, i64 0, i64 %.02236.prol
  %74 = load i8, ptr %73, align 1, !tbaa !9
  %75 = sext i8 %74 to i64
  %76 = add i64 %72, -48
  %77 = add i64 %76, %75
  %78 = add i64 %.02236.prol, 1
  %prol.iter62.next = add i64 %prol.iter62, 1
  %prol.iter62.cmp.not = icmp eq i64 %prol.iter62.next, %xtraiter60
  br i1 %prol.iter62.cmp.not, label %.lr.ph38.prol.loopexit, label %.lr.ph38.prol, !llvm.loop !15

.lr.ph38.prol.loopexit:                           ; preds = %.lr.ph38.prol, %.lr.ph38.preheader
  %.lcssa59.unr = phi i64 [ poison, %.lr.ph38.preheader ], [ %77, %.lr.ph38.prol ]
  %.02236.unr = phi i64 [ %68, %.lr.ph38.preheader ], [ %78, %.lr.ph38.prol ]
  %.unr63 = phi i64 [ %.promoted34, %.lr.ph38.preheader ], [ %77, %.lr.ph38.prol ]
  %79 = icmp ult i64 %70, 3
  br i1 %79, label %._crit_edge39, label %.lr.ph38

._crit_edge39:                                    ; preds = %.lr.ph38, %.lr.ph38.prol.loopexit
  %.lcssa59 = phi i64 [ %.lcssa59.unr, %.lr.ph38.prol.loopexit ], [ %109, %.lr.ph38 ]
  store i64 %.lcssa59, ptr %4, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %._crit_edge39, %.lr.ph43
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @n2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %81 = icmp sgt i64 %.02341, 4
  %indvars.iv.next54 = add nsw i64 %indvars.iv53, -5
  br i1 %81, label %.lr.ph43, label %._crit_edge44, !llvm.loop !16

.lr.ph38:                                         ; preds = %.lr.ph38.prol.loopexit, %.lr.ph38
  %.02236 = phi i64 [ %110, %.lr.ph38 ], [ %.02236.unr, %.lr.ph38.prol.loopexit ]
  %82 = phi i64 [ %109, %.lr.ph38 ], [ %.unr63, %.lr.ph38.prol.loopexit ]
  %83 = mul nsw i64 %82, 10
  %84 = getelementptr inbounds [1000000 x i8], ptr @b, i64 0, i64 %.02236
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = sext i8 %85 to i64
  %87 = add i64 %83, -48
  %88 = add i64 %87, %86
  %89 = add i64 %.02236, 1
  %90 = mul nsw i64 %88, 10
  %91 = getelementptr inbounds [1000000 x i8], ptr @b, i64 0, i64 %89
  %92 = load i8, ptr %91, align 1, !tbaa !9
  %93 = sext i8 %92 to i64
  %94 = add i64 %90, -48
  %95 = add i64 %94, %93
  %96 = add i64 %.02236, 2
  %97 = mul nsw i64 %95, 10
  %98 = getelementptr inbounds [1000000 x i8], ptr @b, i64 0, i64 %96
  %99 = load i8, ptr %98, align 1, !tbaa !9
  %100 = sext i8 %99 to i64
  %101 = add i64 %97, -48
  %102 = add i64 %101, %100
  %103 = add i64 %.02236, 3
  %104 = mul nsw i64 %102, 10
  %105 = getelementptr inbounds [1000000 x i8], ptr @b, i64 0, i64 %103
  %106 = load i8, ptr %105, align 1, !tbaa !9
  %107 = sext i8 %106 to i64
  %108 = add i64 %104, -48
  %109 = add i64 %108, %107
  %110 = add i64 %.02236, 4
  %exitcond55.not.3 = icmp eq i64 %110, %indvars.iv53
  br i1 %exitcond55.not.3, label %._crit_edge39, label %.lr.ph38, !llvm.loop !17

111:                                              ; preds = %113, %._crit_edge44
  %.0.in = phi i64 [ %64, %._crit_edge44 ], [ %.0, %113 ]
  %.0 = add i64 %.0.in, -1
  %112 = icmp sgt i64 %.0, 0
  br i1 %112, label %113, label %.critedge

113:                                              ; preds = %111
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %.0) #7
  %115 = load i64, ptr %114, align 8, !tbaa !5
  %116 = icmp eq i64 %115, 0
  br i1 %116, label %111, label %.critedge, !llvm.loop !18

.critedge:                                        ; preds = %111, %113
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %.0) #7
  %118 = load i64, ptr %117, align 8, !tbaa !5
  %119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %118)
  %120 = add i64 %.0.in, -2
  %121 = icmp sgt i64 %120, -1
  br i1 %121, label %.lr.ph46, label %._crit_edge47

.lr.ph46:                                         ; preds = %.critedge, %.lr.ph46
  %.145 = phi i64 [ %125, %.lr.ph46 ], [ %120, %.critedge ]
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %.145) #7
  %123 = load i64, ptr %122, align 8, !tbaa !5
  %124 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 5, i64 noundef %123)
  %125 = add nsw i64 %.145, -1
  %.not57 = icmp eq i64 %.145, 0
  br i1 %.not57, label %._crit_edge47, label %.lr.ph46, !llvm.loop !19

._crit_edge47:                                    ; preds = %.lr.ph46, %.critedge
  %126 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %127 = load i64, ptr @nn, align 8, !tbaa !5
  %128 = add nsw i64 %127, -1
  store i64 %128, ptr @nn, align 8, !tbaa !5
  %.not = icmp eq i64 %127, 0
  br i1 %.not, label %._crit_edge51, label %.lr.ph50, !llvm.loop !20

._crit_edge51:                                    ; preds = %._crit_edge47, %0
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) 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: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { nofree 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 #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.unroll.disable"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}


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