; LLVM IR from wangziqi2013/EpochManager :: test/local_em_test.ll (Z11MixedGCTestmm)

; 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.peloton::index::AtomicStack" = type { %"struct.std::atomic.4" }
%"struct.std::atomic.4" = type { %"struct.std::__atomic_base.5" }
%"struct.std::__atomic_base.5" = type { ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%class.anon = type { ptr, ptr, ptr, ptr, i64, i64 }

@stderr = external global ptr, align 8
@stdout = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__._Z11MixedGCTestmm = external hidden unnamed_addr constant [37 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [48 x i8], align 1

declare void @_Z13PrintTestNamePKc(ptr noundef) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare i32 @fflush(ptr noundef) #0

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEEC2Em(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13StartGCThreadEv(ptr noundef nonnull align 8 dereferenceable(136)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE22GetCurrentEpochCounterEv(ptr noundef nonnull align 8 dereferenceable(136)) #7 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11MixedGCTestmm(i64 noundef %0, i64 noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.peloton::index::AtomicStack", align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::atomic", align 8
  %10 = alloca %"struct.std::atomic", align 8
  %11 = alloca %class.anon, align 8
  %12 = alloca i64, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !5
  call void @_Z13PrintTestNamePKc(ptr noundef @.str.9)
  %13 = load i64, ptr %3, align 8, !tbaa !5
  %14 = urem i64 %13, 2
  %15 = icmp ne i64 %14, 0
  br i1 %15, label %16, label %23

16:                                               ; preds = %2
  br label %17

17:                                               ; preds = %16
  %18 = load ptr, ptr @stderr, align 8, !tbaa !9
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef @.str.10, ptr noundef @.str.9) #10
  %20 = load ptr, ptr @stdout, align 8, !tbaa !9
  %21 = call i32 @fflush(ptr noundef %20)
  br label %22

22:                                               ; preds = %17
  br label %109

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  call void @_ZN7peloton5index11AtomicStackImEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  %24 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #11
  invoke void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEEC2Em(ptr noundef nonnull align 8 dereferenceable(136) %24, i64 noundef 8)
          to label %25 unwind label %47

25:                                               ; preds = %23
  store ptr %24, ptr %6, align 8, !tbaa !9
  %26 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13SetGCIntervalEm(ptr noundef nonnull align 8 dereferenceable(136) %26, i64 noundef 5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef 0, i32 noundef 5) #10
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef 0, i32 noundef 5) #10
  %27 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13StartGCThreadEv(ptr noundef nonnull align 8 dereferenceable(136) %27)
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #10
  %28 = getelementptr inbounds %class.anon, ptr %11, i32 0, i32 0
  store ptr %5, ptr %28, align 8, !tbaa !9
  %29 = getelementptr inbounds %class.anon, ptr %11, i32 0, i32 1
  store ptr %9, ptr %29, align 8, !tbaa !9
  %30 = getelementptr inbounds %class.anon, ptr %11, i32 0, i32 2
  store ptr %10, ptr %30, align 8, !tbaa !9
  %31 = getelementptr inbounds %class.anon, ptr %11, i32 0, i32 3
  %32 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %32, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds %class.anon, ptr %11, i32 0, i32 4
  %34 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %34, ptr %33, align 8, !tbaa !13
  %35 = getelementptr inbounds %class.anon, ptr %11, i32 0, i32 5
  %36 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %36, ptr %35, align 8, !tbaa !14
  %37 = load i64, ptr %3, align 8, !tbaa !5
  call void @"_Z12StartThreadsIRZ11MixedGCTestmmE3$_0JEEvmOT_DpOT0_"(i64 noundef %37, ptr noundef nonnull align 8 dereferenceable(48) %11)
  %38 = load i64, ptr %3, align 8, !tbaa !5
  %39 = lshr i64 %38, 1
  store i64 %39, ptr %3, align 8, !tbaa !5
  %40 = call noundef i64 @_ZNKSt13__atomic_baseImE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 5) #10
  %41 = load i64, ptr %3, align 8, !tbaa !5
  %42 = load i64, ptr %4, align 8, !tbaa !5
  %43 = mul i64 %41, %42
  %44 = icmp eq i64 %40, %43
  br i1 %44, label %45, label %46

45:                                               ; preds = %25
  br label %52

46:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.12, i32 noundef 169, ptr noundef @__PRETTY_FUNCTION__._Z11MixedGCTestmm) #12
  unreachable

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %24, i64 noundef 136) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  br label %110

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %53 = load i64, ptr %4, align 8, !tbaa !5
  %54 = load i64, ptr %3, align 8, !tbaa !5
  %55 = mul i64 %53, %54
  %56 = load i64, ptr %4, align 8, !tbaa !5
  %57 = load i64, ptr %3, align 8, !tbaa !5
  %58 = mul i64 %56, %57
  %59 = sub i64 %58, 1
  %60 = mul i64 %55, %59
  %61 = udiv i64 %60, 2
  store i64 %61, ptr %12, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %52
  %63 = load ptr, ptr @stderr, align 8, !tbaa !9
  %64 = call noundef i64 @_ZNKSt13__atomic_baseImE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef 5) #10
  %65 = load i64, ptr %12, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.13, ptr noundef @.str.9, i64 noundef %64, i64 noundef %65) #10
  %67 = load ptr, ptr @stdout, align 8, !tbaa !9
  %68 = call i32 @fflush(ptr noundef %67)
  br label %69

69:                                               ; preds = %62
  br label %70

70:                                               ; preds = %69
  %71 = call noundef i64 @_ZNKSt13__atomic_baseImE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef 5) #10
  %72 = load i64, ptr %12, align 8, !tbaa !5
  %73 = icmp eq i64 %71, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %70
  br label %77

75:                                               ; preds = %70
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.12, i32 noundef 174, ptr noundef @__PRETTY_FUNCTION__._Z11MixedGCTestmm) #12
  unreachable

76:                                               ; No predecessors!
  br label %77

77:                                               ; preds = %76, %74
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  %81 = call noundef i64 @_ZNK12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13GetGCIntervalEv(ptr noundef nonnull align 8 dereferenceable(136) %80)
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.15, ptr noundef @.str.9, i64 noundef %81) #10
  %83 = load ptr, ptr @stdout, align 8, !tbaa !9
  %84 = call i32 @fflush(ptr noundef %83)
  br label %85

85:                                               ; preds = %78
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr @stderr, align 8, !tbaa !9
  %89 = load ptr, ptr %6, align 8, !tbaa !9
  %90 = call noundef i64 @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE22GetCurrentEpochCounterEv(ptr noundef nonnull align 8 dereferenceable(136) %89)
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.16, ptr noundef @.str.9, i64 noundef %90) #10
  %92 = load ptr, ptr @stdout, align 8, !tbaa !9
  %93 = call i32 @fflush(ptr noundef %92)
  br label %94

94:                                               ; preds = %87
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr @stderr, align 8, !tbaa !9
  %98 = load ptr, ptr %6, align 8, !tbaa !9
  %99 = call noundef i64 @_ZNK12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE17GetNodeFreedCountEv(ptr noundef nonnull align 8 dereferenceable(136) %98)
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.17, ptr noundef @.str.9, i64 noundef %99) #10
  %101 = load ptr, ptr @stdout, align 8, !tbaa !9
  %102 = call i32 @fflush(ptr noundef %101)
  br label %103

103:                                              ; preds = %96
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %6, align 8, !tbaa !9
  %106 = icmp eq ptr %105, null
  br i1 %106, label %108, label %107

107:                                              ; preds = %104
  call void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(136) %105) #10
  call void @_ZdlPvm(ptr noundef %105, i64 noundef 136) #13
  br label %108

108:                                              ; preds = %107, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  br label %109

109:                                              ; preds = %108, %22
  ret void

110:                                              ; preds = %47
  %111 = load ptr, ptr %7, align 8
  %112 = load i32, ptr %8, align 4
  %113 = insertvalue { ptr, i32 } poison, ptr %111, 0
  %114 = insertvalue { ptr, i32 } %113, i32 %112, 1
  resume { ptr, i32 } %114
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13SetGCIntervalEm(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) #7 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) #8 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_Z12StartThreadsIRZ11MixedGCTestmmE3$_0JEEvmOT_DpOT0_"(i64 noundef, ptr noundef nonnull align 8 dereferenceable(48)) #4

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #9

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13GetGCIntervalEv(ptr noundef nonnull align 8 dereferenceable(136)) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE17GetNodeFreedCountEv(ptr noundef nonnull align 8 dereferenceable(136)) #7 align 2

attributes #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 = { nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 = { 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 #5 = { nobuiltin nounwind "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 = { 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 #7 = { 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 #8 = { alwaysinline 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 #9 = { noreturn nounwind "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 #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { noreturn nounwind }
attributes #13 = { builtin 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"_ZTSZ11MixedGCTestmmE3$_0", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 40}
!13 = !{!12, !6, i64 32}
!14 = !{!12, !6, i64 40}


; 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.peloton::index::AtomicStack" = type { %"struct.std::atomic.4" }
%"struct.std::atomic.4" = type { %"struct.std::__atomic_base.5" }
%"struct.std::__atomic_base.5" = type { ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%class.anon = type { ptr, ptr, ptr, ptr, i64, i64 }

@stderr = external local_unnamed_addr global ptr, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__._Z11MixedGCTestmm = external hidden unnamed_addr constant [37 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [48 x i8], align 1

declare void @_Z13PrintTestNamePKc(ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #1

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEEC2Em(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13StartGCThreadEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE22GetCurrentEpochCounterEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11MixedGCTestmm(i64 noundef %0, i64 noundef %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.peloton::index::AtomicStack", align 8
  %4 = alloca %"struct.std::atomic", align 8
  %5 = alloca %"struct.std::atomic", align 8
  %6 = alloca %class.anon, align 8
  tail call void @_Z13PrintTestNamePKc(ptr noundef nonnull @.str.9)
  %7 = and i64 %0, 1
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %13, label %8

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.9) #10
  %11 = load ptr, ptr @stdout, align 8, !tbaa !5
  %12 = tail call i32 @fflush(ptr noundef %11)
  br label %56

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #11
  call void @_ZN7peloton5index11AtomicStackImEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %14 = call noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #12
  invoke void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEEC2Em(ptr noundef nonnull align 8 dereferenceable(136) %14, i64 noundef 8)
          to label %15 unwind label %26

15:                                               ; preds = %13
  call void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13SetGCIntervalEm(ptr noundef nonnull align 8 dereferenceable(136) %14, i64 noundef 5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #11
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef 0, i32 noundef 5) #11
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef 0, i32 noundef 5) #11
  call void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13StartGCThreadEv(ptr noundef nonnull align 8 dereferenceable(136) %14)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #11
  store ptr %3, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %4, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %5, ptr %17, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr %14, ptr %18, align 8, !tbaa !9
  %19 = getelementptr inbounds i8, ptr %6, i64 32
  store i64 %0, ptr %19, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %6, i64 40
  store i64 %1, ptr %20, align 8, !tbaa !13
  call void @"_Z12StartThreadsIRZ11MixedGCTestmmE3$_0JEEvmOT_DpOT0_"(i64 noundef %0, ptr noundef nonnull align 8 dereferenceable(48) %6)
  %21 = lshr exact i64 %0, 1
  %22 = call noundef i64 @_ZNKSt13__atomic_baseImE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 5) #11
  %23 = mul i64 %21, %1
  %24 = icmp eq i64 %22, %23
  br i1 %24, label %28, label %25

25:                                               ; preds = %15
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12, i32 noundef 169, ptr noundef nonnull @__PRETTY_FUNCTION__._Z11MixedGCTestmm) #13
  unreachable

26:                                               ; preds = %13
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %14, i64 noundef 136) #14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #11
  resume { ptr, i32 } %27

28:                                               ; preds = %15
  %29 = add i64 %22, -1
  %30 = mul i64 %29, %22
  %31 = lshr i64 %30, 1
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = call noundef i64 @_ZNKSt13__atomic_baseImE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 5) #11
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.9, i64 noundef %33, i64 noundef %31) #10
  %35 = load ptr, ptr @stdout, align 8, !tbaa !5
  %36 = call i32 @fflush(ptr noundef %35)
  %37 = call noundef i64 @_ZNKSt13__atomic_baseImE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 5) #11
  %38 = icmp eq i64 %37, %31
  br i1 %38, label %40, label %39

39:                                               ; preds = %28
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.12, i32 noundef 174, ptr noundef nonnull @__PRETTY_FUNCTION__._Z11MixedGCTestmm) #13
  unreachable

40:                                               ; preds = %28
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = call noundef i64 @_ZNK12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13GetGCIntervalEv(ptr noundef nonnull align 8 dereferenceable(136) %14)
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.9, i64 noundef %42) #10
  %44 = load ptr, ptr @stdout, align 8, !tbaa !5
  %45 = call i32 @fflush(ptr noundef %44)
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call noundef i64 @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE22GetCurrentEpochCounterEv(ptr noundef nonnull align 8 dereferenceable(136) %14)
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.9, i64 noundef %47) #10
  %49 = load ptr, ptr @stdout, align 8, !tbaa !5
  %50 = call i32 @fflush(ptr noundef %49)
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call noundef i64 @_ZNK12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE17GetNodeFreedCountEv(ptr noundef nonnull align 8 dereferenceable(136) %14)
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.9, i64 noundef %52) #10
  %54 = load ptr, ptr @stdout, align 8, !tbaa !5
  %55 = call i32 @fflush(ptr noundef %54)
  call void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(136) %14) #11
  call void @_ZdlPvm(ptr noundef nonnull %14, i64 noundef 136) #14
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #11
  br label %56

56:                                               ; preds = %40, %8
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13SetGCIntervalEm(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) local_unnamed_addr #7 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_Z12StartThreadsIRZ11MixedGCTestmmE3$_0JEEvmOT_DpOT0_"(i64 noundef, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #9

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE13GetGCIntervalEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK12LocalWriteEMIN7peloton5index11AtomicStackImE4NodeEE17GetNodeFreedCountEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #7 align 2

attributes #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 = { nofree nounwind "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 = { 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 #5 = { nobuiltin nounwind "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 = { 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 #7 = { 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 #8 = { alwaysinline 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 #9 = { noreturn nounwind "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 #10 = { cold nounwind }
attributes #11 = { nounwind }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { noreturn nounwind }
attributes #14 = { builtin 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, !6, i64 24}
!10 = !{!"_ZTSZ11MixedGCTestmmE3$_0", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !11, i64 40}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 32}
!13 = !{!10, !11, i64 40}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass