; LLVM IR from tangjz/acm-icpc :: codechef/MAY18/STMINCUT.ll (Z9dsu_queryii)

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

@dsu = external dso_local global [1001 x i32], align 16
@dis = external dso_local global [1001 x i32], align 16
@_ZZ9dsu_queryiiE2sz = external hidden global [2 x i32], align 4
@_ZZ9dsu_queryiiE3que = external hidden global [2 x [11 x i32]], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z9dsu_queryii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 1061109567, ptr %5, align 4, !tbaa !5
  store i32 0, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %18, %2
  %7 = load i32, ptr %3, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds [1001 x i32], ptr @dsu, i64 0, i64 %8
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = icmp sge i32 %10, 0
  br i1 %11, label %12, label %23

12:                                               ; preds = %6
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = load i32, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %16 = sext i32 %14 to i64
  %17 = getelementptr inbounds [11 x i32], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 %16
  store i32 %13, ptr %17, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %12
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [1001 x i32], ptr @dsu, i64 0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %22, ptr %3, align 4, !tbaa !5
  br label %6, !llvm.loop !9

23:                                               ; preds = %6
  store i32 0, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  br label %24

24:                                               ; preds = %36, %23
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [1001 x i32], ptr @dsu, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = icmp sge i32 %28, 0
  br i1 %29, label %30, label %41

30:                                               ; preds = %24
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  %34 = sext i32 %32 to i64
  %35 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds ([2 x [11 x i32]], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 1), i64 0, i64 %34
  store i32 %31, ptr %35, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %30
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [1001 x i32], ptr @dsu, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %40, ptr %4, align 4, !tbaa !5
  br label %24, !llvm.loop !11

41:                                               ; preds = %24
  br label %42

42:                                               ; preds = %63, %41
  %43 = load i32, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %60

45:                                               ; preds = %42
  %46 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %60

48:                                               ; preds = %45
  %49 = load i32, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [11 x i32], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds ([2 x [11 x i32]], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 1), i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = icmp eq i32 %53, %58
  br label %60

60:                                               ; preds = %48, %45, %42
  %61 = phi i1 [ false, %45 ], [ false, %42 ], [ %59, %48 ]
  br i1 %61, label %62, label %68

62:                                               ; preds = %60
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %65 = add nsw i32 %64, -1
  store i32 %65, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %66 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  %67 = add nsw i32 %66, -1
  store i32 %67, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  br label %42, !llvm.loop !12

68:                                               ; preds = %60
  br label %69

69:                                               ; preds = %73, %68
  %70 = load i32, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %83

72:                                               ; preds = %69
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %75 = add nsw i32 %74, -1
  store i32 %75, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [11 x i32], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1001 x i32], ptr @dis, i64 0, i64 %79
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %80)
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr %5, align 4, !tbaa !5
  br label %69, !llvm.loop !13

83:                                               ; preds = %69
  br label %84

84:                                               ; preds = %88, %83
  %85 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %98

87:                                               ; preds = %84
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr getelementptr inbounds ([2 x i32], ptr @_ZZ9dsu_queryiiE2sz, i64 0, i64 1), align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds ([2 x [11 x i32]], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 1), i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [1001 x i32], ptr @dis, i64 0, i64 %94
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %95)
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr %5, align 4, !tbaa !5
  br label %84, !llvm.loop !14

98:                                               ; preds = %84
  %99 = load i32, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret i32 %99
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 = { 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 #3 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

@dsu = external dso_local local_unnamed_addr global [1001 x i32], align 16
@dis = external dso_local global [1001 x i32], align 16
@_ZZ9dsu_queryiiE2sz = external hidden local_unnamed_addr global [2 x i32], align 4
@_ZZ9dsu_queryiiE3que = external hidden local_unnamed_addr global [2 x [11 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z9dsu_queryii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 1061109567, ptr %3, align 4, !tbaa !5
  store i32 0, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %4 = sext i32 %0 to i64
  %5 = getelementptr inbounds [1001 x i32], ptr @dsu, i64 0, i64 %4
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, -1
  br i1 %7, label %.lr.ph, label %15

.lr.ph:                                           ; preds = %2, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %2 ]
  %8 = phi i32 [ %12, %.lr.ph ], [ %6, %2 ]
  %.0714 = phi i32 [ %8, %.lr.ph ], [ %0, %2 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = getelementptr inbounds [11 x i32], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 %indvars.iv
  store i32 %.0714, ptr %9, align 4, !tbaa !5
  %10 = zext nneg i32 %8 to i64
  %11 = getelementptr inbounds [1001 x i32], ptr @dsu, i64 0, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, -1
  br i1 %13, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph
  %14 = trunc nuw i64 %indvars.iv.next to i32
  store i32 %14, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %._crit_edge, %2
  %_ZZ9dsu_queryiiE2sz.promoted19 = phi i32 [ %14, %._crit_edge ], [ 0, %2 ]
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE2sz, i64 4), align 4, !tbaa !5
  %16 = sext i32 %1 to i64
  %17 = getelementptr inbounds [1001 x i32], ptr @dsu, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, -1
  br i1 %19, label %.lr.ph17, label %.critedge

.preheader13:                                     ; preds = %.lr.ph17
  %20 = trunc nuw i64 %indvars.iv.next32 to i32
  store i32 %20, ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE2sz, i64 4), align 4, !tbaa !5
  %.not47 = icmp eq i32 %_ZZ9dsu_queryiiE2sz.promoted19, 0
  br i1 %.not47, label %.critedge, label %.lr.ph22.preheader

.lr.ph22.preheader:                               ; preds = %.preheader13
  %21 = sext i32 %_ZZ9dsu_queryiiE2sz.promoted19 to i64
  %sext = shl i64 %indvars.iv.next32, 32
  %22 = ashr exact i64 %sext, 32
  %indvars.iv.next3550 = add nsw i64 %21, -1
  %23 = getelementptr inbounds [11 x i32], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 %indvars.iv.next3550
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %indvars.iv.next3751 = add nsw i64 %22, -1
  %25 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE3que, i64 44), i64 0, i64 %indvars.iv.next3751
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = icmp eq i32 %24, %26
  br i1 %27, label %.lr.ph54, label %.critedge

.lr.ph17:                                         ; preds = %15, %.lr.ph17
  %indvars.iv31 = phi i64 [ %indvars.iv.next32, %.lr.ph17 ], [ 0, %15 ]
  %28 = phi i32 [ %32, %.lr.ph17 ], [ %18, %15 ]
  %.015 = phi i32 [ %28, %.lr.ph17 ], [ %1, %15 ]
  %indvars.iv.next32 = add nuw nsw i64 %indvars.iv31, 1
  %29 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE3que, i64 44), i64 0, i64 %indvars.iv31
  store i32 %.015, ptr %29, align 4, !tbaa !5
  %30 = zext nneg i32 %28 to i64
  %31 = getelementptr inbounds [1001 x i32], ptr @dsu, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, -1
  br i1 %33, label %.lr.ph17, label %.preheader13, !llvm.loop !11

.lr.ph22:                                         ; preds = %.lr.ph54
  %indvars.iv.next35 = add nsw i64 %indvars.iv.next3552, -1
  %34 = getelementptr inbounds [11 x i32], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 %indvars.iv.next35
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %indvars.iv.next37 = add nsw i64 %indvars.iv.next3753, -1
  %36 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE3que, i64 44), i64 0, i64 %indvars.iv.next37
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = icmp eq i32 %35, %37
  br i1 %38, label %.lr.ph54, label %.critedge.loopexit, !llvm.loop !12

.lr.ph54:                                         ; preds = %.lr.ph22.preheader, %.lr.ph22
  %indvars.iv.next3753 = phi i64 [ %indvars.iv.next37, %.lr.ph22 ], [ %indvars.iv.next3751, %.lr.ph22.preheader ]
  %indvars.iv.next3552 = phi i64 [ %indvars.iv.next35, %.lr.ph22 ], [ %indvars.iv.next3550, %.lr.ph22.preheader ]
  %39 = trunc nsw i64 %indvars.iv.next3552 to i32
  %40 = trunc nsw i64 %indvars.iv.next3753 to i32
  %41 = icmp ne i64 %indvars.iv.next3552, 0
  %42 = icmp ne i64 %indvars.iv.next3753, 0
  %or.cond = and i1 %41, %42
  br i1 %or.cond, label %.lr.ph22, label %.critedge.loopexit, !llvm.loop !12

.critedge.loopexit:                               ; preds = %.lr.ph22, %.lr.ph54
  store i32 %39, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  store i32 %40, ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE2sz, i64 4), align 4, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph22.preheader, %15, %.preheader13
  %43 = phi i32 [ %20, %.preheader13 ], [ 0, %15 ], [ %20, %.lr.ph22.preheader ], [ %40, %.critedge.loopexit ]
  %44 = phi i32 [ %_ZZ9dsu_queryiiE2sz.promoted19, %.preheader13 ], [ %_ZZ9dsu_queryiiE2sz.promoted19, %15 ], [ %_ZZ9dsu_queryiiE2sz.promoted19, %.lr.ph22.preheader ], [ %39, %.critedge.loopexit ]
  %.not24 = icmp eq i32 %44, 0
  br i1 %.not24, label %.preheader, label %.lr.ph25

.preheader.loopexit:                              ; preds = %.lr.ph25
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE2sz, i64 4), align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.critedge
  %45 = phi i32 [ %55, %.preheader.loopexit ], [ 1061109567, %.critedge ]
  %46 = phi i32 [ %.pre, %.preheader.loopexit ], [ %43, %.critedge ]
  %.not1226 = icmp eq i32 %46, 0
  br i1 %.not1226, label %._crit_edge28, label %.lr.ph27

.lr.ph25:                                         ; preds = %.critedge, %.lr.ph25
  %47 = phi i32 [ %56, %.lr.ph25 ], [ %44, %.critedge ]
  %48 = add nsw i32 %47, -1
  store i32 %48, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [11 x i32], ptr @_ZZ9dsu_queryiiE3que, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1001 x i32], ptr @dis, i64 0, i64 %52
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %53)
  %55 = load i32, ptr %54, align 4, !tbaa !5
  store i32 %55, ptr %3, align 4, !tbaa !5
  %56 = load i32, ptr @_ZZ9dsu_queryiiE2sz, align 4, !tbaa !5
  %.not = icmp eq i32 %56, 0
  br i1 %.not, label %.preheader.loopexit, label %.lr.ph25, !llvm.loop !13

.lr.ph27:                                         ; preds = %.preheader, %.lr.ph27
  %57 = phi i32 [ %66, %.lr.ph27 ], [ %46, %.preheader ]
  %58 = add nsw i32 %57, -1
  store i32 %58, ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE2sz, i64 4), align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE3que, i64 44), i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1001 x i32], ptr @dis, i64 0, i64 %62
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %63)
  %65 = load i32, ptr %64, align 4, !tbaa !5
  store i32 %65, ptr %3, align 4, !tbaa !5
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ9dsu_queryiiE2sz, i64 4), align 4, !tbaa !5
  %.not12 = icmp eq i32 %66, 0
  br i1 %.not12, label %._crit_edge28, label %.lr.ph27, !llvm.loop !14

._crit_edge28:                                    ; preds = %.lr.ph27, %.preheader
  %67 = phi i32 [ %45, %.preheader ], [ %65, %.lr.ph27 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  ret i32 %67
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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