; LLVM IR from chronoxor/CppBenchmark :: source/benchmark (settings)

; 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.CppBenchmark::Settings" = type <{ i32, i8, [3 x i8], i64, i64, %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %"class.std::tuple", i8, [7 x i8] }>
%"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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.10", %"struct.std::_Head_base.13" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Tuple_impl.11", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.11" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.12" = type { i64 }
%"struct.std::_Head_base.13" = type { i64 }

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(121) ptr @_ZN12CppBenchmark8Settings7PCRangeEiiRKSt8functionIFiiiRiEEiiS6_(ptr noundef nonnull align 8 dereferenceable(121) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %4, i32 noundef %5, ptr noundef nonnull align 8 dereferenceable(32) %6) #3 align 2 {
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !5
  %19 = load ptr, ptr %8, align 8
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %22, label %92

22:                                               ; preds = %7
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %25, label %92

25:                                               ; preds = %22
  %26 = load i32, ptr %12, align 4, !tbaa !9
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %28, label %92

28:                                               ; preds = %25
  %29 = load i32, ptr %13, align 4, !tbaa !9
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %92

31:                                               ; preds = %28
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = call noundef zeroext i1 @_ZNKSt8functionIFiiiRiEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %32) #4
  br i1 %33, label %34, label %92

34:                                               ; preds = %31
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = call noundef zeroext i1 @_ZNKSt8functionIFiiiRiEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %35) #4
  br i1 %36, label %37, label %92

37:                                               ; preds = %34
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = icmp sgt i32 %38, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %37
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #4
  br label %42

42:                                               ; preds = %41, %37
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %13, align 4, !tbaa !9
  %45 = icmp sgt i32 %43, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %42
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13) #4
  br label %47

47:                                               ; preds = %46, %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %48 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %48, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = call noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32) %49, i32 noundef %50, i32 noundef %51, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i32 %52, ptr %16, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %86, %47
  %54 = load i32, ptr %16, align 4, !tbaa !9
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = icmp sge i32 %54, %55
  br i1 %56, label %57, label %61

57:                                               ; preds = %53
  %58 = load i32, ptr %16, align 4, !tbaa !9
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = icmp sle i32 %58, %59
  br label %61

61:                                               ; preds = %57, %53
  %62 = phi i1 [ false, %53 ], [ %60, %57 ]
  br i1 %62, label %63, label %91

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %64 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %64, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = call noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32) %65, i32 noundef %66, i32 noundef %67, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i32 %68, ptr %18, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %79, %63
  %70 = load i32, ptr %18, align 4, !tbaa !9
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = icmp sge i32 %70, %71
  br i1 %72, label %73, label %77

73:                                               ; preds = %69
  %74 = load i32, ptr %18, align 4, !tbaa !9
  %75 = load i32, ptr %13, align 4, !tbaa !9
  %76 = icmp sle i32 %74, %75
  br label %77

77:                                               ; preds = %73, %69
  %78 = phi i1 [ false, %69 ], [ %76, %73 ]
  br i1 %78, label %79, label %86

79:                                               ; preds = %77
  %80 = getelementptr inbounds %"class.CppBenchmark::Settings", ptr %19, i32 0, i32 6
  %81 = call noundef nonnull align 1 ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %80, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = load i32, ptr %13, align 4, !tbaa !9
  %85 = call noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32) %82, i32 noundef %83, i32 noundef %84, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i32 %85, ptr %18, align 4, !tbaa !9
  br label %69, !llvm.loop !11

86:                                               ; preds = %77
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = load i32, ptr %9, align 4, !tbaa !9
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = call noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32) %87, i32 noundef %88, i32 noundef %89, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i32 %90, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %53, !llvm.loop !13

91:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %92

92:                                               ; preds = %91, %34, %31, %28, %25, %22, %7
  ret ptr %19
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!"any pointer", !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 = distinct !{!13, !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"

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFiiiRiEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(121) ptr @_ZN12CppBenchmark8Settings7PCRangeEiiRKSt8functionIFiiiRiEEiiS6_(ptr noundef nonnull returned align 8 dereferenceable(121) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %4, i32 noundef %5, ptr noundef nonnull align 8 dereferenceable(32) %6) local_unnamed_addr #3 align 2 {
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 %1, ptr %8, align 4, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !5
  store i32 %5, ptr %11, align 4, !tbaa !5
  %16 = icmp sgt i32 %1, 0
  %17 = icmp sgt i32 %2, 0
  %or.cond = and i1 %16, %17
  %18 = icmp sgt i32 %4, 0
  %or.cond3 = and i1 %or.cond, %18
  %19 = icmp sgt i32 %5, 0
  %or.cond5 = and i1 %or.cond3, %19
  br i1 %or.cond5, label %20, label %66

20:                                               ; preds = %7
  %21 = tail call noundef zeroext i1 @_ZNKSt8functionIFiiiRiEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br i1 %21, label %22, label %66

22:                                               ; preds = %20
  %23 = tail call noundef zeroext i1 @_ZNKSt8functionIFiiiRiEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br i1 %23, label %24, label %66

24:                                               ; preds = %22
  %25 = icmp ugt i32 %1, %2
  br i1 %25, label %26, label %27

26:                                               ; preds = %24
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9) #4
  br label %27

27:                                               ; preds = %26, %24
  %28 = icmp ugt i32 %4, %5
  br i1 %28, label %29, label %30

29:                                               ; preds = %27
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11) #4
  br label %30

30:                                               ; preds = %29, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  %31 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %31, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  %32 = load i32, ptr %9, align 4, !tbaa !5
  %33 = call noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %31, i32 noundef %32, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i32 %33, ptr %13, align 4, !tbaa !5
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = icmp sge i32 %33, %34
  %36 = load i32, ptr %9, align 4
  %37 = icmp sle i32 %33, %36
  %38 = select i1 %35, i1 %37, i1 false
  br i1 %38, label %.lr.ph13, label %._crit_edge14

.lr.ph13:                                         ; preds = %30
  %39 = getelementptr inbounds i8, ptr %0, i64 48
  br label %40

40:                                               ; preds = %.lr.ph13, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  %41 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %41, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = call noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef %41, i32 noundef %42, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i32 %43, ptr %15, align 4, !tbaa !5
  %44 = load i32, ptr %10, align 4, !tbaa !5
  %45 = icmp sge i32 %43, %44
  %46 = load i32, ptr %11, align 4
  %47 = icmp sle i32 %43, %46
  %48 = select i1 %45, i1 %47, i1 false
  br i1 %48, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %40, %.lr.ph
  %49 = call noundef nonnull align 1 ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %50 = load i32, ptr %10, align 4, !tbaa !5
  %51 = load i32, ptr %11, align 4, !tbaa !5
  %52 = call noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef %50, i32 noundef %51, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i32 %52, ptr %15, align 4, !tbaa !5
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = icmp sge i32 %52, %53
  %55 = load i32, ptr %11, align 4
  %56 = icmp sle i32 %52, %55
  %57 = select i1 %54, i1 %56, i1 false
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %40
  %58 = load i32, ptr %8, align 4, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = call noundef i32 @_ZNKSt8functionIFiiiRiEEclEiiS0_(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %58, i32 noundef %59, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i32 %60, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = icmp sge i32 %60, %61
  %63 = load i32, ptr %9, align 4
  %64 = icmp sle i32 %60, %63
  %65 = select i1 %62, i1 %64, i1 false
  br i1 %65, label %40, label %._crit_edge14, !llvm.loop !11

._crit_edge14:                                    ; preds = %._crit_edge, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  br label %66

66:                                               ; preds = %._crit_edge14, %22, %20, %7
  ret ptr %0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass