; LLVM IR from ardiloot/NonlinearTMM :: NonlinearTMM/src/eigen-3.4.0/unsupported/test (cxx11_runqueue)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Eigen::RunQueue" = type { %"class.std::mutex", %"struct.std::atomic", %"struct.std::atomic", [4 x %"struct.Eigen::RunQueue<int, 4>::Elem"] }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"struct.Eigen::RunQueue<int, 4>::Elem" = type { %"struct.std::atomic.9", i32 }
%"struct.std::atomic.9" = type { %"struct.std::__atomic_base.10" }
%"struct.std::__atomic_base.10" = type { i8 }
%"struct.std::atomic.16" = type { %"struct.std::__atomic_base.17" }
%"struct.std::__atomic_base.17" = type { i8 }
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }
%class.anon = type { ptr, ptr }

@_ZN5EigenL12g_test_stackB5cxx11E = external hidden global %"class.std::vector", align 8
@.str.28 = external hidden unnamed_addr constant [120 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [10 x i8], align 1

; 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: inlinehint mustprogress uwtable
declare dso_local void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen8RunQueueIiLj4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5Eigen8RunQueueIiLj4EE5EmptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5Eigen8RunQueueIiLj4EE4SizeEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5Eigen13test_is_equalIiiEEbRKT_RKT0_b(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), i1 noundef zeroext) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5Eigen8RunQueueIiLj4EE9PushFrontEi(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen8RunQueueIiLj4EED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19test_empty_runqueuev() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.Eigen::RunQueue", align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::atomic.16", align 1
  %5 = alloca %"class.std::thread", align 8
  %6 = alloca %class.anon, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 80, ptr %1) #6
  call void @_ZN5Eigen8RunQueueIiLj4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %10 = invoke noundef i32 @_ZN5Eigen8RunQueueIiLj4EE9PushFrontEi(ptr noundef nonnull align 8 dereferenceable(80) %1, i32 noundef 1)
          to label %11 unwind label %37

11:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  call void @llvm.memset.p0.i64(ptr align 1 %4, i8 0, i64 1, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  %12 = getelementptr inbounds %class.anon, ptr %6, i32 0, i32 0
  store ptr %1, ptr %12, align 8, !tbaa !5
  %13 = getelementptr inbounds %class.anon, ptr %6, i32 0, i32 1
  store ptr %4, ptr %13, align 8, !tbaa !5
  invoke void @"_ZNSt6threadC2IZ19test_empty_runqueuevE3$_0JEvEEOT_DpOT0_"(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %14 unwind label %41

14:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %15

15:                                               ; preds = %36, %14
  %16 = call noundef zeroext i1 @_ZNKSt6atomicIbEcvbEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  %17 = xor i1 %16, true
  br i1 %17, label %18, label %53

18:                                               ; preds = %15
  %19 = invoke noundef zeroext i1 @_ZNK5Eigen8RunQueueIiLj4EE5EmptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
          to label %20 unwind label %45

20:                                               ; preds = %18
  %21 = xor i1 %19, true
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5EigenL12g_test_stackB5cxx11E) #6
  %23 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  invoke void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext %21, ptr noundef %23, ptr noundef @.str.28, i32 noundef 148, ptr noundef @.str.67)
          to label %24 unwind label %45

24:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %25 = invoke noundef i32 @_ZNK5Eigen8RunQueueIiLj4EE4SizeEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
          to label %26 unwind label %49

26:                                               ; preds = %24
  store i32 %25, ptr %7, align 4, !tbaa !9
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = icmp sge i32 %27, 1
  %29 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5EigenL12g_test_stackB5cxx11E) #6
  %30 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #6
  invoke void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext %28, ptr noundef %30, ptr noundef @.str.28, i32 noundef 150, ptr noundef @.str.68)
          to label %31 unwind label %49

31:                                               ; preds = %26
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = icmp sle i32 %32, 2
  %34 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5EigenL12g_test_stackB5cxx11E) #6
  %35 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %34) #6
  invoke void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext %33, ptr noundef %35, ptr noundef @.str.28, i32 noundef 151, ptr noundef @.str.69)
          to label %36 unwind label %49

36:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %15, !llvm.loop !11

37:                                               ; preds = %0
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %2, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %3, align 4
  br label %68

41:                                               ; preds = %11
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %2, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %67

45:                                               ; preds = %60, %20, %18
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %2, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %3, align 4
  br label %66

49:                                               ; preds = %31, %26, %24
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %2, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %66

53:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %54 = invoke noundef i32 @_ZN5Eigen8RunQueueIiLj4EE8PopFrontEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
          to label %55 unwind label %62

55:                                               ; preds = %53
  store i32 %54, ptr %9, align 4, !tbaa !9
  %56 = invoke noundef zeroext i1 @_ZN5Eigen13test_is_equalIiiEEbRKT_RKT0_b(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, i1 noundef zeroext true)
          to label %57 unwind label %62

57:                                               ; preds = %55
  %58 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5EigenL12g_test_stackB5cxx11E) #6
  %59 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %58) #6
  invoke void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext %56, ptr noundef %59, ptr noundef @.str.28, i32 noundef 153, ptr noundef @.str.36)
          to label %60 unwind label %62

60:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  invoke void @_ZNSt6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %61 unwind label %45

61:                                               ; preds = %60
  call void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @_ZN5Eigen8RunQueueIiLj4EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %1) #6
  ret void

62:                                               ; preds = %57, %55, %53
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %2, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %66

66:                                               ; preds = %62, %49, %45
  call void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br label %67

67:                                               ; preds = %66, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  br label %68

68:                                               ; preds = %67, %37
  call void @_ZN5Eigen8RunQueueIiLj4EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %1) #6
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %2, align 8
  %71 = load i32, ptr %3, align 4
  %72 = insertvalue { ptr, i32 } poison, ptr %70, 0
  %73 = insertvalue { ptr, i32 } %72, i32 %71, 1
  resume { ptr, i32 } %73
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt6threadC2IZ19test_empty_runqueuevE3$_0JEvEEOT_DpOT0_"(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

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

declare void @_ZNSt6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Eigen::RunQueue" = type { %"class.std::mutex", %"struct.std::atomic", %"struct.std::atomic", [4 x %"struct.Eigen::RunQueue<int, 4>::Elem"] }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"struct.Eigen::RunQueue<int, 4>::Elem" = type { %"struct.std::atomic.9", i32 }
%"struct.std::atomic.9" = type { %"struct.std::__atomic_base.10" }
%"struct.std::__atomic_base.10" = type { i8 }
%"struct.std::atomic.16" = type { %"struct.std::__atomic_base.17" }
%"struct.std::__atomic_base.17" = type { i8 }
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }
%class.anon = type { ptr, ptr }

@_ZN5EigenL12g_test_stackB5cxx11E = external hidden global %"class.std::vector", align 8
@.str.28 = external hidden unnamed_addr constant [120 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [10 x i8], align 1

; 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: inlinehint mustprogress uwtable
declare dso_local void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen8RunQueueIiLj4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5Eigen8RunQueueIiLj4EE5EmptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5Eigen8RunQueueIiLj4EE4SizeEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5Eigen13test_is_equalIiiEEbRKT_RKT0_b(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), i1 noundef zeroext) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5Eigen8RunQueueIiLj4EE9PushFrontEi(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen8RunQueueIiLj4EED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19test_empty_runqueuev() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.Eigen::RunQueue", align 8
  %2 = alloca %"struct.std::atomic.16", align 1
  %3 = alloca %"class.std::thread", align 8
  %4 = alloca %class.anon, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #5
  call void @_ZN5Eigen8RunQueueIiLj4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %7 = call noundef i32 @_ZN5Eigen8RunQueueIiLj4EE9PushFrontEi(ptr noundef nonnull align 8 dereferenceable(80) %1, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  store i8 0, ptr %2, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %2, ptr %8, align 8, !tbaa !5
  invoke void @"_ZNSt6threadC2IZ19test_empty_runqueuevE3$_0JEvEEOT_DpOT0_"(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %9 unwind label %28

9:                                                ; preds = %0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %10

10:                                               ; preds = %24, %9
  %11 = call noundef zeroext i1 @_ZNKSt6atomicIbEcvbEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  br i1 %11, label %32, label %12

12:                                               ; preds = %10
  %13 = invoke noundef zeroext i1 @_ZNK5Eigen8RunQueueIiLj4EE5EmptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
          to label %14 unwind label %.loopexit

14:                                               ; preds = %12
  %15 = xor i1 %13, true
  %16 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5EigenL12g_test_stackB5cxx11E) #5
  %17 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  invoke void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext %15, ptr noundef %17, ptr noundef nonnull @.str.28, i32 noundef 148, ptr noundef nonnull @.str.67)
          to label %18 unwind label %.loopexit

18:                                               ; preds = %14
  %19 = invoke noundef i32 @_ZNK5Eigen8RunQueueIiLj4EE4SizeEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
          to label %20 unwind label %30

20:                                               ; preds = %18
  %21 = icmp sgt i32 %19, 0
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5EigenL12g_test_stackB5cxx11E) #5
  %23 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  invoke void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext %21, ptr noundef %23, ptr noundef nonnull @.str.28, i32 noundef 150, ptr noundef nonnull @.str.68)
          to label %24 unwind label %30

24:                                               ; preds = %20
  %25 = icmp slt i32 %19, 3
  %26 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5EigenL12g_test_stackB5cxx11E) #5
  %27 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %26) #5
  invoke void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext %25, ptr noundef %27, ptr noundef nonnull @.str.28, i32 noundef 151, ptr noundef nonnull @.str.69)
          to label %10 unwind label %30, !llvm.loop !9

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %43

.loopexit:                                        ; preds = %12, %14
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %42

.loopexit.split-lp:                               ; preds = %38
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %42

30:                                               ; preds = %24, %20, %18
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %42

32:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 1, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %33 = call noundef i32 @_ZN5Eigen8RunQueueIiLj4EE8PopFrontEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  store i32 %33, ptr %6, align 4, !tbaa !11
  %34 = invoke noundef zeroext i1 @_ZN5Eigen13test_is_equalIiiEEbRKT_RKT0_b(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, i1 noundef zeroext true)
          to label %35 unwind label %40

35:                                               ; preds = %32
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN5EigenL12g_test_stackB5cxx11E) #5
  %37 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  invoke void @_Z11verify_implbPKcS0_iS0_(i1 noundef zeroext %34, ptr noundef %37, ptr noundef nonnull @.str.28, i32 noundef 153, ptr noundef nonnull @.str.36)
          to label %38 unwind label %40

38:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZNSt6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %39 unwind label %.loopexit.split-lp

39:                                               ; preds = %38
  call void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @_ZN5Eigen8RunQueueIiLj4EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #5
  ret void

40:                                               ; preds = %35, %32
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %42

42:                                               ; preds = %.loopexit, %.loopexit.split-lp, %40, %30
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %41, %40 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br label %43

43:                                               ; preds = %42, %28
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @_ZN5Eigen8RunQueueIiLj4EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt6threadC2IZ19test_empty_runqueuevE3$_0JEvEEOT_DpOT0_"(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

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

declare void @_ZNSt6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass