; LLVM IR from turi-code/SFrame :: oss_src/graphlab/scheduler (priority_scheduler)

; 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 { i64, double }
%"class.graphlab::priority_scheduler" = type { %"class.graphlab::ischeduler", %"class.graphlab::dense_bitset", %"class.std::vector", %"class.std::vector.6", %"class.std::vector.11", i64, i64, double, i64 }
%"class.graphlab::ischeduler" = type { ptr }
%"class.graphlab::dense_bitset" = type { ptr, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<graphlab::mutable_queue<unsigned long, double>, std::allocator<graphlab::mutable_queue<unsigned long, double>>>::_Vector_impl" }
%"struct.std::_Vector_base<graphlab::mutable_queue<unsigned long, double>, std::allocator<graphlab::mutable_queue<unsigned long, double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<graphlab::mutable_queue<unsigned long, double>, std::allocator<graphlab::mutable_queue<unsigned long, double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<graphlab::mutable_queue<unsigned long, double>, std::allocator<graphlab::mutable_queue<unsigned long, double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<graphlab::padded_simple_spinlock, std::allocator<graphlab::padded_simple_spinlock>>::_Vector_impl" }
%"struct.std::_Vector_base<graphlab::padded_simple_spinlock, std::allocator<graphlab::padded_simple_spinlock>>::_Vector_impl" = type { %"struct.std::_Vector_base<graphlab::padded_simple_spinlock, std::allocator<graphlab::padded_simple_spinlock>>::_Vector_impl_data" }
%"struct.std::_Vector_base<graphlab::padded_simple_spinlock, std::allocator<graphlab::padded_simple_spinlock>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = 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 }

; 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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8graphlab18priority_scheduler8get_nextEmRm(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) unnamed_addr #3 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca %"struct.std::pair", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %15 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 4
  %16 = load i64, ptr %6, align 8, !tbaa !9
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %16) #4
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %19 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 6
  %20 = load i64, ptr %19, align 8, !tbaa !11
  %21 = urem i64 %18, %20
  %22 = load i64, ptr %6, align 8, !tbaa !9
  %23 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 6
  %24 = load i64, ptr %23, align 8, !tbaa !11
  %25 = mul i64 %22, %24
  %26 = add i64 %21, %25
  store i64 %26, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %110, %3
  %28 = load i64, ptr %9, align 8, !tbaa !9
  %29 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 2
  %30 = call noundef i64 @_ZNKSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  %31 = icmp ult i64 %28, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %27
  store i32 2, ptr %10, align 4
  br label %113

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %34 = load i64, ptr %8, align 8, !tbaa !9
  %35 = load i64, ptr %9, align 8, !tbaa !9
  %36 = add i64 %34, %35
  %37 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 2
  %38 = call noundef i64 @_ZNKSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #4
  %39 = urem i64 %36, %38
  store i64 %39, ptr %11, align 8, !tbaa !9
  %40 = load i64, ptr %9, align 8, !tbaa !9
  %41 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 6
  %42 = load i64, ptr %41, align 8, !tbaa !11
  %43 = icmp ult i64 %40, %42
  %44 = zext i1 %43 to i64
  %45 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 4
  %46 = load i64, ptr %6, align 8, !tbaa !9
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #4
  %48 = load i64, ptr %47, align 8, !tbaa !9
  %49 = add i64 %48, %44
  store i64 %49, ptr %47, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  store i8 0, ptr %12, align 1, !tbaa !28
  %50 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 3
  %51 = load i64, ptr %11, align 8, !tbaa !9
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN8graphlab22padded_simple_spinlockESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %51) #4
  call void @_ZNK8graphlab22padded_simple_spinlock4lockEv(ptr noundef nonnull align 1 dereferenceable(1) %52)
  br label %53

53:                                               ; preds = %98, %97, %33
  %54 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 2
  %55 = load i64, ptr %11, align 8, !tbaa !9
  %56 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %55) #4
  %57 = call noundef zeroext i1 @_ZNK8graphlab13mutable_queueImdE5emptyEv(ptr noundef nonnull align 8 dereferenceable(72) %56)
  br i1 %57, label %68, label %58

58:                                               ; preds = %53
  %59 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 2
  %60 = load i64, ptr %11, align 8, !tbaa !9
  %61 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %60) #4
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK8graphlab13mutable_queueImdE3topEv(ptr noundef nonnull align 8 dereferenceable(72) %61)
  %63 = getelementptr inbounds %"struct.std::pair", ptr %62, i32 0, i32 1
  %64 = load double, ptr %63, align 8, !tbaa !30
  %65 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 7
  %66 = load double, ptr %65, align 8, !tbaa !32
  %67 = fcmp oge double %64, %66
  br label %68

68:                                               ; preds = %58, %53
  %69 = phi i1 [ false, %53 ], [ %67, %58 ]
  br i1 %69, label %70, label %99

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  %71 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 2
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %72) #4
  %74 = call { i64, double } @_ZN8graphlab13mutable_queueImdE3popEv(ptr noundef nonnull align 8 dereferenceable(72) %73)
  %75 = getelementptr inbounds { i64, double }, ptr %13, i32 0, i32 0
  %76 = extractvalue { i64, double } %74, 0
  store i64 %76, ptr %75, align 8
  %77 = getelementptr inbounds { i64, double }, ptr %13, i32 0, i32 1
  %78 = extractvalue { i64, double } %74, 1
  store double %78, ptr %77, align 8
  %79 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %80 = load i64, ptr %79, align 8, !tbaa !33
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %80, ptr %81, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 8
  %85 = load i64, ptr %84, align 8, !tbaa !34
  %86 = icmp ult i64 %83, %85
  br i1 %86, label %87, label %97

87:                                               ; preds = %70
  %88 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 1
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = load i64, ptr %89, align 8, !tbaa !9
  %91 = call noundef zeroext i1 @_ZN8graphlab12dense_bitset9clear_bitEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90)
  %92 = zext i1 %91 to i8
  store i8 %92, ptr %12, align 1, !tbaa !28
  %93 = load i8, ptr %12, align 1, !tbaa !28, !range !35, !noundef !36
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %96

95:                                               ; preds = %87
  br label %99

96:                                               ; preds = %87
  br label %98

97:                                               ; preds = %70
  br label %53, !llvm.loop !37

98:                                               ; preds = %96
  br label %53, !llvm.loop !37

99:                                               ; preds = %95, %68
  %100 = getelementptr inbounds %"class.graphlab::priority_scheduler", ptr %14, i32 0, i32 3
  %101 = load i64, ptr %11, align 8, !tbaa !9
  %102 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN8graphlab22padded_simple_spinlockESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %101) #4
  call void @_ZNK8graphlab22padded_simple_spinlock6unlockEv(ptr noundef nonnull align 1 dereferenceable(1) %102)
  %103 = load i8, ptr %12, align 1, !tbaa !28, !range !35, !noundef !36
  %104 = trunc i8 %103 to i1
  br i1 %104, label %105, label %106

105:                                              ; preds = %99
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %107

106:                                              ; preds = %99
  store i32 0, ptr %10, align 4
  br label %107

107:                                              ; preds = %106, %105
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %108 = load i32, ptr %10, align 4
  switch i32 %108, label %113 [
    i32 0, label %109
  ]

109:                                              ; preds = %107
  br label %110

110:                                              ; preds = %109
  %111 = load i64, ptr %9, align 8, !tbaa !9
  %112 = add i64 %111, 1
  store i64 %112, ptr %9, align 8, !tbaa !9
  br label %27, !llvm.loop !39

113:                                              ; preds = %107, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %114 = load i32, ptr %10, align 4
  switch i32 %114, label %116 [
    i32 2, label %115
  ]

115:                                              ; preds = %113
  store i32 1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %116

116:                                              ; preds = %115, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %117 = load i32, ptr %4, align 4
  ret i32 %117
}

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8graphlab13mutable_queueImdE5emptyEv(ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, double } @_ZN8graphlab13mutable_queueImdE3popEv(ptr noundef nonnull align 8 dereferenceable(72)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8graphlab12dense_bitset9clear_bitEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 112}
!12 = !{!"_ZTSN8graphlab18priority_schedulerE", !13, i64 0, !14, i64 8, !15, i64 32, !19, i64 56, !23, i64 80, !10, i64 104, !10, i64 112, !27, i64 120, !10, i64 128}
!13 = !{!"_ZTSN8graphlab10ischedulerE"}
!14 = !{!"_ZTSN8graphlab12dense_bitsetE", !6, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!"_ZTSSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN8graphlab13mutable_queueImdEESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN8graphlab13mutable_queueImdEESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN8graphlab13mutable_queueImdEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIN8graphlab22padded_simple_spinlockESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN8graphlab22padded_simple_spinlockESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN8graphlab22padded_simple_spinlockESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN8graphlab22padded_simple_spinlockESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorImSaImEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseImSaImEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"double", !7, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!31, !27, i64 8}
!31 = !{!"_ZTSSt4pairImdE", !10, i64 0, !27, i64 8}
!32 = !{!12, !27, i64 120}
!33 = !{!31, !10, i64 0}
!34 = !{!12, !10, i64 128}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = distinct !{!39, !38}


; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8graphlab18priority_scheduler8get_nextEmRm(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %1, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %2) unnamed_addr #2 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 80
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %1) #3
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 112
  %8 = load i64, ptr %7, align 8, !tbaa !9
  %9 = urem i64 %6, %8
  %10 = mul i64 %8, %1
  %11 = add i64 %9, %10
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  %.not33 = icmp eq i64 %13, 0
  br i1 %.not33, label %.loopexit, label %.lr.ph36

.lr.ph36:                                         ; preds = %3
  %14 = getelementptr inbounds i8, ptr %0, i64 56
  %15 = getelementptr inbounds i8, ptr %0, i64 120
  %16 = getelementptr inbounds i8, ptr %0, i64 128
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  br label %18

18:                                               ; preds = %.lr.ph36, %.critedge28
  %.02234 = phi i64 [ 0, %.lr.ph36 ], [ %49, %.critedge28 ]
  %19 = add i64 %11, %.02234
  %20 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  %21 = urem i64 %19, %20
  %22 = load i64, ptr %7, align 8, !tbaa !9
  %23 = icmp ult i64 %.02234, %22
  %24 = zext i1 %23 to i64
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %1) #3
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %27 = add i64 %26, %24
  store i64 %27, ptr %25, align 8, !tbaa !5
  %28 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN8graphlab22padded_simple_spinlockESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %21) #3
  tail call void @_ZNK8graphlab22padded_simple_spinlock4lockEv(ptr noundef nonnull align 1 dereferenceable(1) %28)
  %29 = tail call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %21) #3
  %30 = tail call noundef zeroext i1 @_ZNK8graphlab13mutable_queueImdE5emptyEv(ptr noundef nonnull align 8 dereferenceable(72) %29)
  br i1 %30, label %.critedge28, label %.lr.ph

.lr.ph:                                           ; preds = %18, %.backedge
  %31 = tail call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %21) #3
  %32 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK8graphlab13mutable_queueImdE3topEv(ptr noundef nonnull align 8 dereferenceable(72) %31)
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = load double, ptr %33, align 8, !tbaa !27
  %35 = load double, ptr %15, align 8, !tbaa !29
  %36 = fcmp ult double %34, %35
  br i1 %36, label %.critedge28, label %37

37:                                               ; preds = %.lr.ph
  %38 = tail call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %21) #3
  %39 = tail call { i64, double } @_ZN8graphlab13mutable_queueImdE3popEv(ptr noundef nonnull align 8 dereferenceable(72) %38)
  %40 = extractvalue { i64, double } %39, 0
  store i64 %40, ptr %2, align 8, !tbaa !5
  %41 = load i64, ptr %16, align 8, !tbaa !30
  %42 = icmp ult i64 %40, %41
  br i1 %42, label %45, label %.backedge

.backedge:                                        ; preds = %37, %45
  %43 = tail call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %21) #3
  %44 = tail call noundef zeroext i1 @_ZNK8graphlab13mutable_queueImdE5emptyEv(ptr noundef nonnull align 8 dereferenceable(72) %43)
  br i1 %44, label %.critedge28, label %.lr.ph, !llvm.loop !31

45:                                               ; preds = %37
  %46 = tail call noundef zeroext i1 @_ZN8graphlab12dense_bitset9clear_bitEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %40)
  br i1 %46, label %.critedge, label %.backedge

.critedge:                                        ; preds = %45
  %47 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN8graphlab22padded_simple_spinlockESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %21) #3
  tail call void @_ZNK8graphlab22padded_simple_spinlock6unlockEv(ptr noundef nonnull align 1 dereferenceable(1) %47)
  br label %.loopexit

.critedge28:                                      ; preds = %.backedge, %.lr.ph, %18
  %48 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIN8graphlab22padded_simple_spinlockESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %21) #3
  tail call void @_ZNK8graphlab22padded_simple_spinlock6unlockEv(ptr noundef nonnull align 1 dereferenceable(1) %48)
  %49 = add nuw i64 %.02234, 1
  %50 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  %.not.not = icmp ult i64 %49, %50
  br i1 %.not.not, label %18, label %.loopexit, !llvm.loop !33

.loopexit:                                        ; preds = %.critedge28, %3, %.critedge
  %.not30 = phi i32 [ 0, %.critedge ], [ 1, %3 ], [ 1, %.critedge28 ]
  ret i32 %.not30
}

; 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 #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK8graphlab13mutable_queueImdE3topEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, double } @_ZN8graphlab13mutable_queueImdE3popEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 2

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

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 = { 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 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 112}
!10 = !{!"_ZTSN8graphlab18priority_schedulerE", !11, i64 0, !12, i64 8, !14, i64 32, !18, i64 56, !22, i64 80, !6, i64 104, !6, i64 112, !26, i64 120, !6, i64 128}
!11 = !{!"_ZTSN8graphlab10ischedulerE"}
!12 = !{!"_ZTSN8graphlab12dense_bitsetE", !13, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIN8graphlab13mutable_queueImdEESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN8graphlab13mutable_queueImdEESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN8graphlab13mutable_queueImdEESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN8graphlab13mutable_queueImdEESaIS2_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!18 = !{!"_ZTSSt6vectorIN8graphlab22padded_simple_spinlockESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN8graphlab22padded_simple_spinlockESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN8graphlab22padded_simple_spinlockESaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN8graphlab22padded_simple_spinlockESaIS1_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!22 = !{!"_ZTSSt6vectorImSaImEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseImSaImEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!26 = !{!"double", !7, i64 0}
!27 = !{!28, !26, i64 8}
!28 = !{!"_ZTSSt4pairImdE", !6, i64 0, !26, i64 8}
!29 = !{!10, !26, i64 120}
!30 = !{!10, !6, i64 128}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}


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