; LLVM IR from intel/qpl :: tools/utils/generators/configurators/rfc1951_stream/break_header_configurators/_0f639cfa (generator29ManyDistanceCodesConfigurator10breakInRunEjj)

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN12gz_generator29ManyDistanceCodesConfigurator10breakInRunEjj(i32 noundef %0, i32 noundef %1) #0 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  %5 = load i32, ptr %3, align 4, !tbaa !5
  %6 = add i32 %5, -1
  store i32 %6, ptr %3, align 4, !tbaa !5
  %7 = load i32, ptr %4, align 4, !tbaa !5
  %8 = add i32 %7, -1
  store i32 %8, ptr %4, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %27, %15, %2
  %10 = load i32, ptr %4, align 4, !tbaa !5
  %11 = icmp ugt i32 %10, 0
  br i1 %11, label %12, label %32

12:                                               ; preds = %9
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp ult i32 %13, 3
  br i1 %14, label %15, label %20

15:                                               ; preds = %12
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = add i32 %16, -1
  store i32 %17, ptr %3, align 4, !tbaa !5
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = add i32 %18, -1
  store i32 %19, ptr %4, align 4, !tbaa !5
  br label %9, !llvm.loop !9

20:                                               ; preds = %12
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = icmp ule i32 %21, 6
  br i1 %22, label %23, label %27

23:                                               ; preds = %20
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = sub i32 %25, %24
  store i32 %26, ptr %4, align 4, !tbaa !5
  br label %32

27:                                               ; preds = %20
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sub i32 %28, 6
  store i32 %29, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sub i32 %30, 6
  store i32 %31, ptr %4, align 4, !tbaa !5
  br label %9, !llvm.loop !9

32:                                               ; preds = %23, %9
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = icmp eq i32 %33, 0
  ret i1 %34
}

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

!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"}


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

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local noundef zeroext i1 @_ZN12gz_generator29ManyDistanceCodesConfigurator10breakInRunEjj(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 align 2 {
  %3 = add i32 %1, -1
  %.not15 = icmp eq i32 %3, 0
  br i1 %.not15, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %2
  %4 = add i32 %0, -1
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.backedge
  %.017 = phi i32 [ %7, %.backedge ], [ %3, %.lr.ph.preheader ]
  %.01216 = phi i32 [ %6, %.backedge ], [ %4, %.lr.ph.preheader ]
  %5 = icmp ult i32 %.01216, 3
  br i1 %5, label %.backedge, label %8

.backedge:                                        ; preds = %.lr.ph, %8
  %.sink22 = phi i32 [ -6, %8 ], [ -1, %.lr.ph ]
  %6 = add i32 %.01216, %.sink22
  %7 = add i32 %.017, %.sink22
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %.loopexit, label %.lr.ph, !llvm.loop !5

8:                                                ; preds = %.lr.ph
  %9 = icmp ult i32 %.01216, 7
  br i1 %9, label %10, label %.backedge

10:                                               ; preds = %8
  %11 = icmp eq i32 %.017, %.01216
  br label %.loopexit

.loopexit:                                        ; preds = %.backedge, %2, %10
  %.1 = phi i1 [ %11, %10 ], [ true, %2 ], [ true, %.backedge ]
  ret i1 %.1
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) 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" }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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