; LLVM IR from HarshCasper/NeoAlgo :: C-Plus-Plus/cp/rain_water_trapping.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_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.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [40 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %13 = load i64, ptr %1, align 8, !tbaa !5
  %14 = call ptr @llvm.stacksave.p0()
  store ptr %14, ptr %2, align 8
  %15 = alloca i64, i64 %13, align 16
  store i64 %13, ptr %3, align 8
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %26, %0
  %18 = load i64, ptr %4, align 8, !tbaa !5
  %19 = load i64, ptr %1, align 8, !tbaa !5
  %20 = icmp slt i64 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %29

22:                                               ; preds = %17
  %23 = load i64, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds i64, ptr %15, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  br label %26

26:                                               ; preds = %22
  %27 = load i64, ptr %4, align 8, !tbaa !5
  %28 = add nsw i64 %27, 1
  store i64 %28, ptr %4, align 8, !tbaa !5
  br label %17, !llvm.loop !9

29:                                               ; preds = %21
  %30 = load i64, ptr %1, align 8, !tbaa !5
  %31 = alloca i64, i64 %30, align 16
  store i64 %30, ptr %5, align 8
  %32 = load i64, ptr %1, align 8, !tbaa !5
  %33 = alloca i64, i64 %32, align 16
  store i64 %32, ptr %6, align 8
  %34 = getelementptr inbounds i64, ptr %15, i64 0
  %35 = load i64, ptr %34, align 16, !tbaa !5
  %36 = getelementptr inbounds i64, ptr %31, i64 0
  store i64 %35, ptr %36, align 16, !tbaa !5
  %37 = load i64, ptr %1, align 8, !tbaa !5
  %38 = sub nsw i64 %37, 1
  %39 = getelementptr inbounds i64, ptr %15, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %42 = sub nsw i64 %41, 1
  %43 = getelementptr inbounds i64, ptr %33, i64 %42
  store i64 %40, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 1, ptr %7, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %59, %29
  %45 = load i64, ptr %7, align 8, !tbaa !5
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %62

49:                                               ; preds = %44
  %50 = load i64, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds i64, ptr %15, i64 %50
  %52 = load i64, ptr %7, align 8, !tbaa !5
  %53 = sub nsw i64 %52, 1
  %54 = getelementptr inbounds i64, ptr %31, i64 %53
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull align 8 dereferenceable(8) %54)
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = load i64, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds i64, ptr %31, i64 %57
  store i64 %56, ptr %58, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %49
  %60 = load i64, ptr %7, align 8, !tbaa !5
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %7, align 8, !tbaa !5
  br label %44, !llvm.loop !11

62:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %63 = load i64, ptr %1, align 8, !tbaa !5
  %64 = sub nsw i64 %63, 2
  store i64 %64, ptr %8, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %79, %62
  %66 = load i64, ptr %8, align 8, !tbaa !5
  %67 = icmp sge i64 %66, 0
  br i1 %67, label %69, label %68

68:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %82

69:                                               ; preds = %65
  %70 = load i64, ptr %8, align 8, !tbaa !5
  %71 = add nsw i64 %70, 1
  %72 = getelementptr inbounds i64, ptr %33, i64 %71
  %73 = load i64, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds i64, ptr %15, i64 %73
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %74)
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = load i64, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds i64, ptr %33, i64 %77
  store i64 %76, ptr %78, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %69
  %80 = load i64, ptr %8, align 8, !tbaa !5
  %81 = add nsw i64 %80, -1
  store i64 %81, ptr %8, align 8, !tbaa !5
  br label %65, !llvm.loop !12

82:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %101, %82
  %84 = load i64, ptr %10, align 8, !tbaa !5
  %85 = load i64, ptr %1, align 8, !tbaa !5
  %86 = icmp slt i64 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %104

88:                                               ; preds = %83
  %89 = load i64, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds i64, ptr %31, i64 %89
  %91 = load i64, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds i64, ptr %33, i64 %91
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 8 dereferenceable(8) %92)
  %94 = load i64, ptr %93, align 8, !tbaa !5
  %95 = load i64, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds i64, ptr %15, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !5
  %98 = sub nsw i64 %94, %97
  %99 = load i64, ptr %9, align 8, !tbaa !5
  %100 = add nsw i64 %99, %98
  store i64 %100, ptr %9, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %88
  %102 = load i64, ptr %10, align 8, !tbaa !5
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %10, align 8, !tbaa !5
  br label %83, !llvm.loop !13

104:                                              ; preds = %87
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %106 = load i64, ptr %9, align 8, !tbaa !5
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %106)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %109 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %109)
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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
declare ptr @llvm.stacksave.p0() #3

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

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

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

; 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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !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_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.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [40 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %4 = load i64, ptr %1, align 8, !tbaa !5
  %5 = call ptr @llvm.stacksave.p0()
  %6 = alloca i64, i64 %4, align 16
  %7 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %8 = load i64, ptr %1, align 8, !tbaa !5
  %9 = icmp sgt i64 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i64, ptr %6, align 16, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %10 = phi i64 [ undef, %0 ], [ %.pre, %._crit_edge.loopexit ]
  %11 = phi i64 [ %8, %0 ], [ %22, %._crit_edge.loopexit ]
  %12 = alloca i64, i64 %11, align 16
  %13 = alloca i64, i64 %11, align 16
  store i64 %10, ptr %12, align 16, !tbaa !5
  %14 = add nsw i64 %11, -1
  %15 = getelementptr inbounds i64, ptr %6, i64 %14
  %16 = load i64, ptr %15, align 8, !tbaa !5
  %17 = getelementptr inbounds i64, ptr %13, i64 %14
  store i64 %16, ptr %17, align 8, !tbaa !5
  %18 = icmp sgt i64 %11, 1
  br i1 %18, label %.lr.ph30, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02327 = phi i64 [ %21, %.lr.ph ], [ 0, %0 ]
  %19 = getelementptr inbounds i64, ptr %6, i64 %.02327
  %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) %19)
  %21 = add nuw nsw i64 %.02327, 1
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = icmp slt i64 %21, %22
  br i1 %23, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !9

._crit_edge31:                                    ; preds = %.lr.ph30
  %24 = icmp sgt i64 %32, 1
  br i1 %24, label %.lr.ph35.preheader, label %.preheader

.lr.ph35.preheader:                               ; preds = %._crit_edge31
  %25 = add nsw i64 %32, -2
  br label %.lr.ph35

.lr.ph30:                                         ; preds = %._crit_edge, %.lr.ph30
  %.02228 = phi i64 [ %31, %.lr.ph30 ], [ 1, %._crit_edge ]
  %26 = getelementptr inbounds i64, ptr %6, i64 %.02228
  %27 = getelementptr i64, ptr %12, i64 %.02228
  %28 = getelementptr i8, ptr %27, i64 -8
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %30 = load i64, ptr %29, align 8, !tbaa !5
  store i64 %30, ptr %27, align 8, !tbaa !5
  %31 = add nuw nsw i64 %.02228, 1
  %32 = load i64, ptr %1, align 8, !tbaa !5
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %.lr.ph30, label %._crit_edge31, !llvm.loop !11

.preheader.loopexit:                              ; preds = %.lr.ph35
  %.pre44 = load i64, ptr %1, align 8, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %._crit_edge, %.preheader.loopexit, %._crit_edge31
  %34 = phi i64 [ %.pre44, %.preheader.loopexit ], [ %32, %._crit_edge31 ], [ %11, %._crit_edge ]
  %35 = icmp sgt i64 %34, 0
  br i1 %35, label %.lr.ph38, label %._crit_edge39

.lr.ph35:                                         ; preds = %.lr.ph35.preheader, %.lr.ph35
  %.02133 = phi i64 [ %41, %.lr.ph35 ], [ %25, %.lr.ph35.preheader ]
  %36 = getelementptr inbounds i64, ptr %13, i64 %.02133
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = getelementptr inbounds i64, ptr %6, i64 %.02133
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38)
  %40 = load i64, ptr %39, align 8, !tbaa !5
  store i64 %40, ptr %36, align 8, !tbaa !5
  %41 = add nsw i64 %.02133, -1
  %.not = icmp eq i64 %.02133, 0
  br i1 %.not, label %.preheader.loopexit, label %.lr.ph35, !llvm.loop !12

._crit_edge39:                                    ; preds = %.lr.ph38, %.preheader
  %.020.lcssa = phi i64 [ 0, %.preheader ], [ %52, %.lr.ph38 ]
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.020.lcssa)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.stackrestore.p0(ptr %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void

.lr.ph38:                                         ; preds = %.preheader, %.lr.ph38
  %.037 = phi i64 [ %53, %.lr.ph38 ], [ 0, %.preheader ]
  %.02036 = phi i64 [ %52, %.lr.ph38 ], [ 0, %.preheader ]
  %45 = getelementptr inbounds i64, ptr %12, i64 %.037
  %46 = getelementptr inbounds i64, ptr %13, i64 %.037
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %46)
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds i64, ptr %6, i64 %.037
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = add i64 %48, %.02036
  %52 = sub i64 %51, %50
  %53 = add nuw nsw i64 %.037, 1
  %54 = load i64, ptr %1, align 8, !tbaa !5
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %.lr.ph38, label %._crit_edge39, !llvm.loop !13
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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
declare ptr @llvm.stacksave.p0() #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #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 #0 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 #0 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)) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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