; LLVM IR from plaidml/plaidml :: pmlc/util/math/util.ll (ZN4pmlc4util4math11FirstFactorEm)

; 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.pmlc::util::math::Seive" = type { %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZZN4pmlc4util4math11FirstFactorEmE5seive = external hidden global %"struct.pmlc::util::math::Seive", align 8
@_ZGVZN4pmlc4util4math11FirstFactorEmE5seive = external hidden global i64, align 8
@__dso_handle = external hidden global i8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN4pmlc4util4math11FirstFactorEm(i64 noundef %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  store i64 65537, ptr %4, align 8, !tbaa !5
  %13 = load atomic i8, ptr @_ZGVZN4pmlc4util4math11FirstFactorEmE5seive acquire, align 8
  %14 = icmp eq i8 %13, 0
  br i1 %14, label %15, label %22, !prof !9

15:                                               ; preds = %1
  %16 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN4pmlc4util4math11FirstFactorEmE5seive) #3
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %22

18:                                               ; preds = %15
  %19 = load i64, ptr %4, align 8, !tbaa !5
  invoke void @_ZN4pmlc4util4math5SeiveC1Em(ptr noundef nonnull align 8 dereferenceable(48) @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 noundef %19)
          to label %20 unwind label %30

20:                                               ; preds = %18
  %21 = call i32 @__cxa_atexit(ptr @_ZN4pmlc4util4math5SeiveD2Ev, ptr @_ZZN4pmlc4util4math11FirstFactorEmE5seive, ptr @__dso_handle) #3
  call void @__cxa_guard_release(ptr @_ZGVZN4pmlc4util4math11FirstFactorEmE5seive) #3
  br label %22

22:                                               ; preds = %20, %15, %1
  %23 = load i64, ptr %3, align 8, !tbaa !5
  %24 = load i64, ptr %4, align 8, !tbaa !5
  %25 = icmp ult i64 %23, %24
  br i1 %25, label %26, label %34

26:                                               ; preds = %22
  %27 = load i64, ptr %3, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 noundef %27) #3
  %29 = load i64, ptr %28, align 8, !tbaa !5
  store i64 %29, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %91

30:                                               ; preds = %18
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %5, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %6, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZN4pmlc4util4math11FirstFactorEmE5seive) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  br label %93

34:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store ptr getelementptr (i8, ptr @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 24), ptr %8, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %35 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr (i8, ptr @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 24)) #3
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %37 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr (i8, ptr @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 24)) #3
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  br label %39

39:                                               ; preds = %63, %34
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  br i1 %40, label %42, label %41

41:                                               ; preds = %39
  store i32 2, ptr %7, align 4
  br label %65

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  %44 = load i64, ptr %43, align 8, !tbaa !5
  store i64 %44, ptr %11, align 8, !tbaa !5
  %45 = load i64, ptr %3, align 8, !tbaa !5
  %46 = load i64, ptr %11, align 8, !tbaa !5
  %47 = urem i64 %45, %46
  %48 = icmp eq i64 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %42
  %50 = load i64, ptr %11, align 8, !tbaa !5
  store i64 %50, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %60

51:                                               ; preds = %42
  %52 = load i64, ptr %11, align 8, !tbaa !5
  %53 = load i64, ptr %11, align 8, !tbaa !5
  %54 = mul i64 %52, %53
  %55 = load i64, ptr %3, align 8, !tbaa !5
  %56 = icmp ugt i64 %54, %55
  br i1 %56, label %57, label %59

57:                                               ; preds = %51
  %58 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %58, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %60

59:                                               ; preds = %51
  store i32 0, ptr %7, align 4
  br label %60

60:                                               ; preds = %59, %57, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %61 = load i32, ptr %7, align 4
  switch i32 %61, label %65 [
    i32 0, label %62
  ]

62:                                               ; preds = %60
  br label %63

63:                                               ; preds = %62
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  br label %39

65:                                               ; preds = %60, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %66 = load i32, ptr %7, align 4
  switch i32 %66, label %91 [
    i32 2, label %67
  ]

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %68 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %68, ptr %12, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %84, %67
  %70 = load i64, ptr %12, align 8, !tbaa !5
  %71 = load i64, ptr %12, align 8, !tbaa !5
  %72 = mul i64 %70, %71
  %73 = load i64, ptr %3, align 8, !tbaa !5
  %74 = icmp ule i64 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %69
  store i32 4, ptr %7, align 4
  br label %87

76:                                               ; preds = %69
  %77 = load i64, ptr %3, align 8, !tbaa !5
  %78 = load i64, ptr %12, align 8, !tbaa !5
  %79 = urem i64 %77, %78
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %83

81:                                               ; preds = %76
  %82 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %82, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %87

83:                                               ; preds = %76
  br label %84

84:                                               ; preds = %83
  %85 = load i64, ptr %12, align 8, !tbaa !5
  %86 = add i64 %85, 2
  store i64 %86, ptr %12, align 8, !tbaa !5
  br label %69, !llvm.loop !12

87:                                               ; preds = %81, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %88 = load i32, ptr %7, align 4
  switch i32 %88, label %91 [
    i32 4, label %89
  ]

89:                                               ; preds = %87
  %90 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %90, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %91

91:                                               ; preds = %89, %87, %65, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %92 = load i64, ptr %2, align 8
  ret i64 %92

93:                                               ; preds = %30
  %94 = load ptr, ptr %5, align 8
  %95 = load i32, ptr %6, align 4
  %96 = insertvalue { ptr, i32 } poison, ptr %94, 0
  %97 = insertvalue { ptr, i32 } %96, i32 %95, 1
  resume { ptr, i32 } %97
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #3

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

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

declare void @_ZN4pmlc4util4math5SeiveC1Em(ptr, i64)

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

!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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"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"

%"struct.pmlc::util::math::Seive" = type { %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZZN4pmlc4util4math11FirstFactorEmE5seive = external hidden global %"struct.pmlc::util::math::Seive", align 8
@_ZGVZN4pmlc4util4math11FirstFactorEmE5seive = external hidden global i64, align 8
@__dso_handle = external hidden global i8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN4pmlc4util4math11FirstFactorEm(i64 noundef %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = load atomic i8, ptr @_ZGVZN4pmlc4util4math11FirstFactorEmE5seive acquire, align 8
  %5 = icmp eq i8 %4, 0
  br i1 %5, label %6, label %11, !prof !5

6:                                                ; preds = %1
  %7 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN4pmlc4util4math11FirstFactorEmE5seive) #5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %11, label %8

8:                                                ; preds = %6
  invoke void @_ZN4pmlc4util4math5SeiveC1Em(ptr noundef nonnull align 8 dereferenceable(48) @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 noundef 65537)
          to label %9 unwind label %16

9:                                                ; preds = %8
  %10 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN4pmlc4util4math5SeiveD2Ev, ptr nonnull @_ZZN4pmlc4util4math11FirstFactorEmE5seive, ptr nonnull @__dso_handle) #5
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZN4pmlc4util4math11FirstFactorEmE5seive) #5
  br label %11

11:                                               ; preds = %9, %6, %1
  %12 = icmp ult i64 %0, 65537
  br i1 %12, label %13, label %18

13:                                               ; preds = %11
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 noundef %0) #5
  %15 = load i64, ptr %14, align 8, !tbaa !6
  br label %.loopexit

16:                                               ; preds = %8
  %17 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZN4pmlc4util4math11FirstFactorEmE5seive) #5
  resume { ptr, i32 } %17

18:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %19 = tail call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 24)) #5
  store ptr %19, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %20 = tail call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @_ZZN4pmlc4util4math11FirstFactorEmE5seive, i64 24)) #5
  store ptr %20, ptr %3, align 8
  %21 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %18, %28
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %23 = load i64, ptr %22, align 8, !tbaa !6
  %24 = urem i64 %0, %23
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %.thread36, label %26

26:                                               ; preds = %.lr.ph
  %27 = mul i64 %23, %23
  %.not38 = icmp ugt i64 %27, %0
  br i1 %.not38, label %.thread36, label %28

28:                                               ; preds = %26
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %30, label %.lr.ph, label %._crit_edge

.thread36:                                        ; preds = %26, %.lr.ph
  %.2.ph = phi i64 [ %0, %26 ], [ %23, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  br label %.loopexit

._crit_edge:                                      ; preds = %28, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %.not3340 = icmp ult i64 %0, 4295098369
  br i1 %.not3340, label %.loopexit, label %.lr.ph43

.lr.ph43:                                         ; preds = %._crit_edge, %33
  %.041 = phi i64 [ %34, %33 ], [ 65537, %._crit_edge ]
  %31 = urem i64 %0, %.041
  %32 = icmp eq i64 %31, 0
  br i1 %32, label %.loopexit, label %33

33:                                               ; preds = %.lr.ph43
  %34 = add i64 %.041, 2
  %35 = mul i64 %34, %34
  %.not33 = icmp ugt i64 %35, %0
  br i1 %.not33, label %.loopexit, label %.lr.ph43, !llvm.loop !10

.loopexit:                                        ; preds = %.lr.ph43, %33, %._crit_edge, %.thread36, %13
  %.4 = phi i64 [ %15, %13 ], [ %.2.ph, %.thread36 ], [ %0, %._crit_edge ], [ %.041, %.lr.ph43 ], [ %0, %33 ]
  ret i64 %.4
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

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

declare void @_ZN4pmlc4util4math5SeiveC1Em(ptr, i64) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 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 = { nofree nounwind }
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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass