; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/1024_ABC030/D2.ll (Z10solvelargev)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_ostream" = type { ptr, %"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.__gnu_cxx::__normal_iterator" = type { ptr }

@V = external dso_local global %"class.std::vector", align 8
@tail = external dso_local global i64, align 8
@circ = external dso_local global i64, align 8
@_Z1SB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@A = external dso_local global [100010 x i64], align 16
@B = external dso_local global [100010 x i64], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

; 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
define dso_local void @_Z10solvelargev() #3 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = load i64, ptr @circ, align 8, !tbaa !5
  %9 = srem i64 1, %8
  store i64 %9, ptr @A, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store i32 1, ptr %1, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %28, %0
  %11 = load i32, ptr %1, align 4, !tbaa !9
  %12 = icmp slt i32 %11, 100010
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  br label %31

14:                                               ; preds = %10
  %15 = load i32, ptr %1, align 4, !tbaa !9
  %16 = sub nsw i32 %15, 1
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %17
  %19 = load i64, ptr %18, align 8, !tbaa !5
  %20 = load i64, ptr @circ, align 8, !tbaa !5
  %21 = srem i64 10, %20
  %22 = mul nsw i64 %19, %21
  %23 = load i64, ptr @circ, align 8, !tbaa !5
  %24 = srem i64 %22, %23
  %25 = load i32, ptr %1, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %26
  store i64 %24, ptr %27, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %14
  %29 = load i32, ptr %1, align 4, !tbaa !9
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %1, align 4, !tbaa !9
  br label %10, !llvm.loop !11

31:                                               ; preds = %13
  %32 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #5
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %2, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  %34 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #5
  %35 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %3, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %2, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %3, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %37, ptr %39)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %59, %31
  %41 = load i32, ptr %4, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #5
  %44 = icmp ult i64 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %62

46:                                               ; preds = %40
  %47 = load i32, ptr %4, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %48)
  %50 = load i8, ptr %49, align 1, !tbaa !13
  %51 = sext i8 %50 to i32
  %52 = sub nsw i32 %51, 48
  %53 = sext i32 %52 to i64
  %54 = load i64, ptr @circ, align 8, !tbaa !5
  %55 = srem i64 %53, %54
  %56 = load i32, ptr %4, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %57
  store i64 %55, ptr %58, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %46
  %60 = load i32, ptr %4, align 4, !tbaa !9
  %61 = add i32 %60, 1
  store i32 %61, ptr %4, align 4, !tbaa !9
  br label %40, !llvm.loop !14

62:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %86, %62
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #5
  %67 = icmp ult i64 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %89

69:                                               ; preds = %63
  %70 = load i32, ptr %6, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %75
  %77 = load i64, ptr %76, align 8, !tbaa !5
  %78 = mul nsw i64 %73, %77
  %79 = load i64, ptr @circ, align 8, !tbaa !5
  %80 = srem i64 %78, %79
  %81 = load i64, ptr %5, align 8, !tbaa !5
  %82 = add nsw i64 %81, %80
  store i64 %82, ptr %5, align 8, !tbaa !5
  %83 = load i64, ptr @circ, align 8, !tbaa !5
  %84 = load i64, ptr %5, align 8, !tbaa !5
  %85 = srem i64 %84, %83
  store i64 %85, ptr %5, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %69
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = add i32 %87, 1
  store i32 %88, ptr %6, align 4, !tbaa !9
  br label %63, !llvm.loop !15

89:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %90 = load i64, ptr @tail, align 8, !tbaa !5
  %91 = load i64, ptr @circ, align 8, !tbaa !5
  %92 = srem i64 %90, %91
  store i64 %92, ptr %7, align 8, !tbaa !5
  %93 = load i64, ptr @tail, align 8, !tbaa !5
  %94 = load i64, ptr %5, align 8, !tbaa !5
  %95 = load i64, ptr @circ, align 8, !tbaa !5
  %96 = add nsw i64 %94, %95
  %97 = load i64, ptr %7, align 8, !tbaa !5
  %98 = sub nsw i64 %96, %97
  %99 = load i64, ptr @circ, align 8, !tbaa !5
  %100 = srem i64 %98, %99
  %101 = add nsw i64 %93, %100
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @V, i64 noundef %101) #5
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %104)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr, ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_ostream" = type { ptr, %"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 }

@V = external dso_local global %"class.std::vector", align 8
@tail = external dso_local local_unnamed_addr global i64, align 8
@circ = external dso_local local_unnamed_addr global i64, align 8
@_Z1SB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@A = external dso_local local_unnamed_addr global [100010 x i64], align 16
@B = external dso_local local_unnamed_addr global [100010 x i64], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 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 #2 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)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10solvelargev() local_unnamed_addr #2 {
  %1 = load i64, ptr @circ, align 8, !tbaa !5
  %2 = srem i64 1, %1
  store i64 %2, ptr @A, align 16, !tbaa !5
  %3 = srem i64 10, %1
  br label %8

4:                                                ; preds = %8
  %5 = tail call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #4
  %6 = tail call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #4
  tail call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %5, ptr %6)
  %7 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #4
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %.preheader, label %.lr.ph

8:                                                ; preds = %13, %0
  %9 = phi i64 [ %2, %0 ], [ %15, %13 ]
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next.1, %13 ]
  %10 = mul nsw i64 %3, %9
  %11 = srem i64 %10, %1
  %12 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %indvars.iv
  store i64 %11, ptr %12, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100010
  br i1 %exitcond.not, label %4, label %13, !llvm.loop !9

13:                                               ; preds = %8
  %14 = mul nsw i64 %3, %11
  %15 = srem i64 %14, %1
  %16 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %indvars.iv.next
  store i64 %15, ptr %16, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  br label %8

.preheader:                                       ; preds = %.lr.ph, %4
  %17 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #4
  %.not27 = icmp eq i64 %17, 0
  br i1 %.not27, label %._crit_edge, label %.lr.ph26

.lr.ph:                                           ; preds = %4, %.lr.ph
  %18 = phi i64 [ %27, %.lr.ph ], [ 0, %4 ]
  %.01923 = phi i32 [ %26, %.lr.ph ], [ 0, %4 ]
  %19 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %18)
  %20 = load i8, ptr %19, align 1, !tbaa !11
  %21 = sext i8 %20 to i64
  %22 = add nsw i64 %21, -48
  %23 = load i64, ptr @circ, align 8, !tbaa !5
  %24 = srem i64 %22, %23
  %25 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %18
  store i64 %24, ptr %25, align 8, !tbaa !5
  %26 = add i32 %.01923, 1
  %27 = zext i32 %26 to i64
  %28 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #4
  %29 = icmp ugt i64 %28, %27
  br i1 %29, label %.lr.ph, label %.preheader, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph26, %.preheader
  %.018.lcssa = phi i64 [ 0, %.preheader ], [ %51, %.lr.ph26 ]
  %30 = load i64, ptr @tail, align 8, !tbaa !5
  %31 = load i64, ptr @circ, align 8, !tbaa !5
  %32 = srem i64 %30, %31
  %33 = add nsw i64 %31, %.018.lcssa
  %34 = sub i64 %33, %32
  %35 = srem i64 %34, %31
  %36 = add nsw i64 %35, %30
  %37 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @V, i64 noundef %36) #4
  %38 = load i32, ptr %37, align 4, !tbaa !13
  %39 = add nsw i32 %38, 1
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %39)
  %41 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret void

.lr.ph26:                                         ; preds = %.preheader, %.lr.ph26
  %42 = phi i64 [ %53, %.lr.ph26 ], [ 0, %.preheader ]
  %.01725 = phi i32 [ %52, %.lr.ph26 ], [ 0, %.preheader ]
  %.01824 = phi i64 [ %51, %.lr.ph26 ], [ 0, %.preheader ]
  %43 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %42
  %46 = load i64, ptr %45, align 8, !tbaa !5
  %47 = mul nsw i64 %46, %44
  %48 = load i64, ptr @circ, align 8, !tbaa !5
  %49 = srem i64 %47, %48
  %50 = add nsw i64 %49, %.01824
  %51 = srem i64 %50, %48
  %52 = add i32 %.01725, 1
  %53 = zext i32 %52 to i64
  %54 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #4
  %55 = icmp ugt i64 %54, %53
  br i1 %55, label %.lr.ph26, label %._crit_edge, !llvm.loop !15
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr, ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #1 align 2

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


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