; LLVM IR from tangjz/acm-icpc :: lydsy/3349.ll (Z3dfsiii)

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

%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@dt = external dso_local global i32, align 4
@e = external dso_local global [51 x [51 x i32]], align 16
@vis = external dso_local global [103 x i8], align 16
@_ZL3INF = external hidden constant i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local i64 @_Z3dfsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  %13 = call i64 @_ZSt9make_pairIRKiS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL3INF, ptr noundef nonnull align 4 dereferenceable(4) @_ZL3INF)
  store i64 %13, ptr %4, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %16, label %72

16:                                               ; preds = %3
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [103 x i8], ptr @vis, i64 0, i64 %18
  store i8 1, ptr %19, align 1, !tbaa !9
  %20 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %21 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %68, %16
  %23 = load i32, ptr %9, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %71

27:                                               ; preds = %22
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [51 x [51 x i32]], ptr @e, i64 0, i64 %29
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [51 x i32], ptr %30, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = icmp ne i32 %34, -1
  br i1 %35, label %36, label %67

36:                                               ; preds = %27
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = add nsw i32 %37, %38
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [103 x i8], ptr @vis, i64 0, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !9, !range !11, !noundef !12
  %43 = trunc i8 %42 to i1
  br i1 %43, label %67, label %44

44:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = sub nsw i32 0, %46
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [51 x [51 x i32]], ptr @e, i64 0, i64 %49
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [51 x i32], ptr %50, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = load i32, ptr @dt, align 4, !tbaa !5
  %56 = sub nsw i32 %54, %55
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = sub nsw i32 %56, %57
  %59 = call i64 @_Z3dfsiii(i32 noundef %45, i32 noundef %47, i32 noundef %58)
  store i64 %59, ptr %10, align 4
  %60 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %61 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %62 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !13
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %61, i32 noundef %63)
  %64 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %65 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !15
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %64, i32 noundef %66)
  br label %67

67:                                               ; preds = %44, %36, %27
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %9, align 4, !tbaa !5
  br label %22, !llvm.loop !16

71:                                               ; preds = %26
  br label %128

72:                                               ; preds = %3
  %73 = load i32, ptr @n, align 4, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = add nsw i32 %73, %74
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [103 x i8], ptr @vis, i64 0, i64 %76
  store i8 1, ptr %77, align 1, !tbaa !9
  %78 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %79 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %78, i32 noundef %79)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %124, %72
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = load i32, ptr @n, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %127

85:                                               ; preds = %80
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [51 x [51 x i32]], ptr @e, i64 0, i64 %87
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [51 x i32], ptr %88, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = icmp ne i32 %92, -1
  br i1 %93, label %94, label %123

94:                                               ; preds = %85
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [103 x i8], ptr @vis, i64 0, i64 %96
  %98 = load i8, ptr %97, align 1, !tbaa !9, !range !11, !noundef !12
  %99 = trunc i8 %98 to i1
  br i1 %99, label %123, label %100

100:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %101 = load i32, ptr %11, align 4, !tbaa !5
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = sub nsw i32 0, %102
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [51 x [51 x i32]], ptr @e, i64 0, i64 %105
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [51 x i32], ptr %106, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = load i32, ptr @dt, align 4, !tbaa !5
  %112 = sub nsw i32 %110, %111
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = sub nsw i32 %112, %113
  %115 = call i64 @_Z3dfsiii(i32 noundef %101, i32 noundef %103, i32 noundef %114)
  store i64 %115, ptr %12, align 4
  %116 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %117 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %118 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 0
  %119 = load i32, ptr %118, align 4, !tbaa !13
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %117, i32 noundef %119)
  %120 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %121 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %122 = load i32, ptr %121, align 4, !tbaa !15
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %120, i32 noundef %122)
  br label %123

123:                                              ; preds = %100, %94, %85
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %11, align 4, !tbaa !5
  br label %80, !llvm.loop !18

127:                                              ; preds = %84
  br label %128

128:                                              ; preds = %127, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %129 = load i64, ptr %4, align 4
  ret i64 %129
}

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRKiS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #3

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!14, !6, i64 4}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


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

%"struct.std::pair" = type { i32, i32 }

@n = external dso_local local_unnamed_addr global i32, align 4
@dt = external dso_local local_unnamed_addr global i32, align 4
@e = external dso_local local_unnamed_addr global [51 x [51 x i32]], align 16
@vis = external dso_local local_unnamed_addr global [103 x i8], align 16
@_ZL3INF = external hidden constant i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local i64 @_Z3dfsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = tail call i64 @_ZSt9make_pairIRKiS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL3INF, ptr noundef nonnull align 4 dereferenceable(4) @_ZL3INF)
  store i64 %8, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %5)
  %9 = icmp sgt i32 %1, 0
  br i1 %9, label %10, label %41

10:                                               ; preds = %3
  %11 = sext i32 %0 to i64
  %12 = getelementptr inbounds [103 x i8], ptr @vis, i64 0, i64 %11
  store i8 1, ptr %12, align 1, !tbaa !5
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %2)
  %13 = load i32, ptr @n, align 4, !tbaa !9
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph36, label %.loopexit

.lr.ph36:                                         ; preds = %10
  %15 = sub nsw i32 0, %1
  %16 = getelementptr inbounds i8, ptr %4, i64 4
  %17 = getelementptr inbounds i8, ptr %5, i64 4
  br label %18

18:                                               ; preds = %.lr.ph36, %37
  %19 = phi i32 [ %13, %.lr.ph36 ], [ %38, %37 ]
  %indvars.iv39 = phi i64 [ 0, %.lr.ph36 ], [ %indvars.iv.next40, %37 ]
  %20 = getelementptr inbounds [51 x [51 x i32]], ptr @e, i64 0, i64 %11, i64 %indvars.iv39
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %.not28 = icmp eq i32 %21, -1
  br i1 %.not28, label %37, label %22

22:                                               ; preds = %18
  %23 = trunc nuw nsw i64 %indvars.iv39 to i32
  %24 = add nsw i32 %19, %23
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [103 x i8], ptr @vis, i64 0, i64 %25
  %27 = load i8, ptr %26, align 1, !tbaa !5, !range !11, !noundef !12
  %28 = trunc nuw i8 %27 to i1
  br i1 %28, label %37, label %29

29:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %30 = load i32, ptr @dt, align 4, !tbaa !9
  %31 = add i32 %30, %2
  %32 = sub i32 %21, %31
  %33 = call i64 @_Z3dfsiii(i32 noundef %23, i32 noundef %15, i32 noundef %32)
  store i64 %33, ptr %6, align 8
  %34 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %35 = load i32, ptr %5, align 4, !tbaa !13
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %35)
  %36 = load i32, ptr %17, align 4, !tbaa !15
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef %36)
  %.pre42 = load i32, ptr @n, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %18, %22, %29
  %38 = phi i32 [ %19, %18 ], [ %19, %22 ], [ %.pre42, %29 ]
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next40, %39
  br i1 %40, label %18, label %.loopexit, !llvm.loop !16

41:                                               ; preds = %3
  %42 = load i32, ptr @n, align 4, !tbaa !9
  %43 = add nsw i32 %42, %0
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [103 x i8], ptr @vis, i64 0, i64 %44
  store i8 1, ptr %45, align 1, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %4, i64 4
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %46, i32 noundef %2)
  %47 = load i32, ptr @n, align 4, !tbaa !9
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %41
  %49 = sext i32 %0 to i64
  %50 = sub nsw i32 0, %1
  %51 = getelementptr inbounds i8, ptr %5, i64 4
  br label %52

52:                                               ; preds = %.lr.ph, %69
  %53 = phi i32 [ %47, %.lr.ph ], [ %70, %69 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %69 ]
  %54 = getelementptr inbounds [51 x [51 x i32]], ptr @e, i64 0, i64 %indvars.iv, i64 %49
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %.not = icmp eq i32 %55, -1
  br i1 %.not, label %69, label %56

56:                                               ; preds = %52
  %57 = getelementptr inbounds [103 x i8], ptr @vis, i64 0, i64 %indvars.iv
  %58 = load i8, ptr %57, align 1, !tbaa !5, !range !11, !noundef !12
  %59 = trunc nuw i8 %58 to i1
  br i1 %59, label %69, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %61 = load i32, ptr @dt, align 4, !tbaa !9
  %62 = add i32 %61, %2
  %63 = sub i32 %55, %62
  %64 = trunc nuw nsw i64 %indvars.iv to i32
  %65 = call i64 @_Z3dfsiii(i32 noundef %64, i32 noundef %50, i32 noundef %63)
  store i64 %65, ptr %7, align 8
  %66 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  %67 = load i32, ptr %5, align 4, !tbaa !13
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %67)
  %68 = load i32, ptr %51, align 4, !tbaa !15
  call void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4) %46, i32 noundef %68)
  %.pre = load i32, ptr @n, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %52, %56, %60
  %70 = phi i32 [ %53, %52 ], [ %53, %56 ], [ %.pre, %60 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next, %71
  br i1 %72, label %52, label %.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %69, %37, %41, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %73 = load i64, ptr %4, align 8
  ret i64 %73
}

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRKiS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z7upd_minRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #3

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!15 = !{!14, !10, i64 4}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


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