; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Week of Code/Week 24/Problem D (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 i64, align 8
@m = external dso_local global i64, align 8
@a = external dso_local global [100100 x i64], align 16
@ans = external dso_local global [100100 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 norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %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
  store i32 0, ptr %1, align 4
  %9 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) @m)
  %22 = load i64, ptr @m, align 8, !tbaa !8
  %23 = add nsw i64 %22, -1
  store i64 %23, ptr @m, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !11
  br label %24

24:                                               ; preds = %35, %0
  %25 = load i32, ptr %2, align 4, !tbaa !11
  %26 = sext i32 %25 to i64
  %27 = load i64, ptr @n, align 8, !tbaa !8
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %24
  %31 = load i32, ptr %2, align 4, !tbaa !11
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %33)
  br label %35

35:                                               ; preds = %30
  %36 = load i32, ptr %2, align 4, !tbaa !11
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %2, align 4, !tbaa !11
  br label %24, !llvm.loop !13

38:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %39

39:                                               ; preds = %93, %38
  %40 = load i64, ptr %3, align 8, !tbaa !8
  %41 = icmp sle i64 %40, 60
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %39
  %44 = load i64, ptr @m, align 8, !tbaa !8
  %45 = load i64, ptr %3, align 8, !tbaa !8
  %46 = shl i64 1, %45
  %47 = and i64 %44, %46
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %49, label %92

49:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %50 = load i64, ptr %3, align 8, !tbaa !8
  %51 = shl i64 1, %50
  %52 = load i64, ptr @n, align 8, !tbaa !8
  %53 = srem i64 %51, %52
  store i64 %53, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !8
  br label %54

54:                                               ; preds = %73, %49
  %55 = load i64, ptr %6, align 8, !tbaa !8
  %56 = load i64, ptr @n, align 8, !tbaa !8
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %76

59:                                               ; preds = %54
  %60 = load i64, ptr %6, align 8, !tbaa !8
  %61 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = load i64, ptr %6, align 8, !tbaa !8
  %64 = load i64, ptr %5, align 8, !tbaa !8
  %65 = add nsw i64 %63, %64
  %66 = load i64, ptr @n, align 8, !tbaa !8
  %67 = srem i64 %65, %66
  %68 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !8
  %70 = xor i64 %62, %69
  %71 = load i64, ptr %6, align 8, !tbaa !8
  %72 = getelementptr inbounds [100100 x i64], ptr @ans, i64 0, i64 %71
  store i64 %70, ptr %72, align 8, !tbaa !8
  br label %73

73:                                               ; preds = %59
  %74 = load i64, ptr %6, align 8, !tbaa !8
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %6, align 8, !tbaa !8
  br label %54, !llvm.loop !15

76:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %77

77:                                               ; preds = %88, %76
  %78 = load i64, ptr %7, align 8, !tbaa !8
  %79 = load i64, ptr @n, align 8, !tbaa !8
  %80 = icmp slt i64 %78, %79
  br i1 %80, label %82, label %81

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

82:                                               ; preds = %77
  %83 = load i64, ptr %7, align 8, !tbaa !8
  %84 = getelementptr inbounds [100100 x i64], ptr @ans, i64 0, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !8
  %86 = load i64, ptr %7, align 8, !tbaa !8
  %87 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %86
  store i64 %85, ptr %87, align 8, !tbaa !8
  br label %88

88:                                               ; preds = %82
  %89 = load i64, ptr %7, align 8, !tbaa !8
  %90 = add nsw i64 %89, 1
  store i64 %90, ptr %7, align 8, !tbaa !8
  br label %77, !llvm.loop !16

91:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %92

92:                                               ; preds = %91, %43
  br label %93

93:                                               ; preds = %92
  %94 = load i64, ptr %3, align 8, !tbaa !8
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %3, align 8, !tbaa !8
  br label %39, !llvm.loop !17

96:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %97

97:                                               ; preds = %110, %96
  %98 = load i32, ptr %8, align 4, !tbaa !11
  %99 = sext i32 %98 to i64
  %100 = load i64, ptr @n, align 8, !tbaa !8
  %101 = icmp slt i64 %99, %100
  br i1 %101, label %103, label %102

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

103:                                              ; preds = %97
  %104 = load i32, ptr %8, align 4, !tbaa !11
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !8
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %107)
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %108, i8 noundef signext 32)
  br label %110

110:                                              ; preds = %103
  %111 = load i32, ptr %8, align 4, !tbaa !11
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %8, align 4, !tbaa !11
  br label %97, !llvm.loop !18

113:                                              ; preds = %102
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 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) #3 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 norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


; 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 i64, align 8
@m = external dso_local global i64, align 8
@a = external dso_local global [100100 x i64], align 16
@ans = external dso_local local_unnamed_addr global [100100 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = 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) @n)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) @m)
  %14 = load i64, ptr @m, align 8, !tbaa !8
  %15 = add nsw i64 %14, -1
  store i64 %15, ptr @m, align 8, !tbaa !8
  %16 = load i64, ptr @n, align 8, !tbaa !8
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph, label %.preheader28

.preheader28.loopexit:                            ; preds = %.lr.ph
  %.pre = load i64, ptr @m, align 8, !tbaa !8
  br label %.preheader28

.preheader28:                                     ; preds = %.preheader28.loopexit, %0
  %18 = phi i64 [ %15, %0 ], [ %.pre, %.preheader28.loopexit ]
  %19 = phi i64 [ %16, %0 ], [ %55, %.preheader28.loopexit ]
  %.lcssa.fr = freeze i64 %19
  %20 = icmp sgt i64 %.lcssa.fr, 0
  br i1 %20, label %.preheader28.split.us.preheader, label %._crit_edge

.preheader28.split.us.preheader:                  ; preds = %.preheader28
  %21 = shl nuw i64 %.lcssa.fr, 3
  %xtraiter = and i64 %.lcssa.fr, 1
  %22 = icmp eq i64 %.lcssa.fr, 1
  %unroll_iter = and i64 %.lcssa.fr, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader28.split.us

.preheader28.split.us:                            ; preds = %.preheader28.split.us.preheader, %.loopexit.us
  %.02334.us = phi i64 [ %44, %.loopexit.us ], [ 0, %.preheader28.split.us.preheader ]
  %23 = shl nuw nsw i64 1, %.02334.us
  %24 = and i64 %18, %23
  %.not.us = icmp eq i64 %24, 0
  br i1 %.not.us, label %.loopexit.us, label %.lr.ph31.us

.lr.ph31.us:                                      ; preds = %.preheader28.split.us
  %25 = urem i64 %23, %.lcssa.fr
  br i1 %22, label %.lr.ph33.us.preheader.unr-lcssa, label %.lr.ph31.us.new

.lr.ph31.us.new:                                  ; preds = %.lr.ph31.us, %.lr.ph31.us.new
  %.02130.us = phi i64 [ %43, %.lr.ph31.us.new ], [ 0, %.lr.ph31.us ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph31.us.new ], [ 0, %.lr.ph31.us ]
  %26 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %.02130.us
  %27 = load i64, ptr %26, align 16, !tbaa !8
  %28 = add nuw nsw i64 %.02130.us, %25
  %29 = urem i64 %28, %.lcssa.fr
  %30 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %29
  %31 = load i64, ptr %30, align 8, !tbaa !8
  %32 = xor i64 %31, %27
  %33 = getelementptr inbounds [100100 x i64], ptr @ans, i64 0, i64 %.02130.us
  store i64 %32, ptr %33, align 16, !tbaa !8
  %34 = or disjoint i64 %.02130.us, 1
  %35 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !8
  %37 = add nuw nsw i64 %34, %25
  %38 = urem i64 %37, %.lcssa.fr
  %39 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !8
  %41 = xor i64 %40, %36
  %42 = getelementptr inbounds [100100 x i64], ptr @ans, i64 0, i64 %34
  store i64 %41, ptr %42, align 8, !tbaa !8
  %43 = add nuw nsw i64 %.02130.us, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.lr.ph33.us.preheader.unr-lcssa, label %.lr.ph31.us.new, !llvm.loop !11

.loopexit.us:                                     ; preds = %.lr.ph33.us.preheader, %.preheader28.split.us
  %44 = add nuw nsw i64 %.02334.us, 1
  %exitcond50.not = icmp eq i64 %44, 61
  br i1 %exitcond50.not, label %.lr.ph44, label %.preheader28.split.us, !llvm.loop !13

.lr.ph33.us.preheader.unr-lcssa:                  ; preds = %.lr.ph31.us.new, %.lr.ph31.us
  %.02130.us.unr = phi i64 [ 0, %.lr.ph31.us ], [ %43, %.lr.ph31.us.new ]
  br i1 %lcmp.mod.not, label %.lr.ph33.us.preheader, label %.lr.ph33.us.preheader.epilog-lcssa

.lr.ph33.us.preheader.epilog-lcssa:               ; preds = %.lr.ph33.us.preheader.unr-lcssa
  %45 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %.02130.us.unr
  %46 = load i64, ptr %45, align 8, !tbaa !8
  %47 = add nuw nsw i64 %.02130.us.unr, %25
  %48 = urem i64 %47, %.lcssa.fr
  %49 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !8
  %51 = xor i64 %50, %46
  %52 = getelementptr inbounds [100100 x i64], ptr @ans, i64 0, i64 %.02130.us.unr
  store i64 %51, ptr %52, align 8, !tbaa !8
  br label %.lr.ph33.us.preheader

.lr.ph33.us.preheader:                            ; preds = %.lr.ph33.us.preheader.unr-lcssa, %.lr.ph33.us.preheader.epilog-lcssa
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @a, ptr nonnull align 16 @ans, i64 %21, i1 false), !tbaa !8
  br label %.loopexit.us

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %53 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %indvars.iv
  %54 = 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) %53)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = load i64, ptr @n, align 8, !tbaa !8
  %56 = icmp sgt i64 %55, %indvars.iv.next
  br i1 %56, label %.lr.ph, label %.preheader28.loopexit, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph44, %.preheader28
  %57 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph44:                                         ; preds = %.loopexit.us, %.lr.ph44
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph44 ], [ 0, %.loopexit.us ]
  %58 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %indvars.iv51
  %59 = load i64, ptr %58, align 8, !tbaa !8
  %60 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %59)
  %61 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %60, i8 noundef signext 32)
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %62 = load i64, ptr @n, align 8, !tbaa !8
  %63 = icmp sgt i64 %62, %indvars.iv.next52
  br i1 %63, label %.lr.ph44, label %._crit_edge, !llvm.loop !15
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

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


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