; LLVM IR from gem5/gem5 :: src/base/circular_queue.test.ll (ZN36CircularQueueTest_MultipleRound_Test8TestBodyEv)

; 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.gem5::CircularQueue<unsigned int>::iterator" = type { ptr, i64 }
%"class.testing::AssertionResult" = type { i8, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.4" }
%"struct.std::_Head_base.4" = type { ptr }
%"class.gem5::CircularQueue" = type { %"class.std::vector", i64, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.testing::Message" = type { %"class.std::unique_ptr.5" }
%"class.std::unique_ptr.5" = type { %"struct.std::__uniq_ptr_data.6" }
%"struct.std::__uniq_ptr_data.6" = type { %"class.std::__uniq_ptr_impl.7" }
%"class.std::__uniq_ptr_impl.7" = type { %"class.std::tuple.8" }
%"class.std::tuple.8" = type { %"struct.std::_Tuple_impl.9" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Head_base.12" }
%"struct.std::_Head_base.12" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [24 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: mustprogress uwtable
declare dso_local void @_ZN4gem513CircularQueueIjEC2Em(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef) unnamed_addr #1 align 2

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

declare void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

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

declare void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef, i32 noundef, ptr noundef) unnamed_addr #3

declare void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nounwind
declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4gem513CircularQueueIjE5beginEv(ptr dead_on_unwind noalias writable sret(%"struct.gem5::CircularQueue<unsigned int>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4gem513CircularQueueIjE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.gem5::CircularQueue<unsigned int>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelper7CompareIliTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN36CircularQueueTest_MultipleRound_Test8TestBodyEv(ptr noundef nonnull align 8 dereferenceable(16) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.gem5::CircularQueue", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.gem5::CircularQueue<unsigned int>::iterator", align 8
  %10 = alloca %"struct.gem5::CircularQueue<unsigned int>::iterator", align 8
  %11 = alloca %"class.testing::AssertionResult", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.testing::Message", align 8
  %14 = alloca %"class.testing::internal::AssertHelper", align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 8, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #6
  call void @_ZN4gem513CircularQueueIjEC2Em(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef 8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 24, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %24, %1
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %31

22:                                               ; preds = %17
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %4, i32 noundef 0)
          to label %23 unwind label %27

23:                                               ; preds = %22
  br label %24

24:                                               ; preds = %23
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %6, align 4, !tbaa !9
  br label %17, !llvm.loop !11

27:                                               ; preds = %22
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %7, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %87

31:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  invoke void @_ZN4gem513CircularQueueIjE5beginEv(ptr dead_on_unwind writable sret(%"struct.gem5::CircularQueue<unsigned int>::iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %32 unwind label %40

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  invoke void @_ZN4gem513CircularQueueIjE3endEv(ptr dead_on_unwind writable sret(%"struct.gem5::CircularQueue<unsigned int>::iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %33 unwind label %44

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %34 = invoke noundef i64 @_ZN4gem513CircularQueueIjE8iteratormiERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %35 unwind label %48

35:                                               ; preds = %33
  store i64 %34, ptr %12, align 8, !tbaa !13
  invoke void @_ZN7testing8internal8EqHelper7CompareIliTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(ptr dead_on_unwind writable sret(%"class.testing::AssertionResult") align 8 %11, ptr noundef @.str.65, ptr noundef @.str.5, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %36 unwind label %48

36:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %37 = invoke noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %38 unwind label %52

38:                                               ; preds = %36
  br i1 %37, label %39, label %56

39:                                               ; preds = %38
  br label %76

40:                                               ; preds = %31
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  br label %86

44:                                               ; preds = %32
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  br label %85

48:                                               ; preds = %35, %33
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %7, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %84

52:                                               ; preds = %36
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %7, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %8, align 4
  br label %83

56:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %57 unwind label %62

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %58 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %59 unwind label %66

59:                                               ; preds = %57
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 2, ptr noundef @.str.3, i32 noundef 266, ptr noundef %58)
          to label %60 unwind label %66

60:                                               ; preds = %59
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %61 unwind label %70

61:                                               ; preds = %60
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  store i32 1, ptr %15, align 4
  br label %77

62:                                               ; preds = %56
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %7, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %8, align 4
  br label %75

66:                                               ; preds = %59, %57
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %7, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %8, align 4
  br label %74

70:                                               ; preds = %60
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %7, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %8, align 4
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %74

74:                                               ; preds = %70, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br label %75

75:                                               ; preds = %74, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %83

76:                                               ; preds = %39
  store i32 0, ptr %15, align 4
  br label %77

77:                                               ; preds = %76, %61
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  %78 = load i32, ptr %15, align 4
  switch i32 %78, label %80 [
    i32 0, label %79
  ]

79:                                               ; preds = %77
  store i32 0, ptr %15, align 4
  br label %80

80:                                               ; preds = %79, %77
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @_ZN4gem513CircularQueueIjED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  %81 = load i32, ptr %15, align 4
  switch i32 %81, label %93 [
    i32 0, label %82
    i32 1, label %82
  ]

82:                                               ; preds = %80, %80
  ret void

83:                                               ; preds = %75, %52
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  br label %84

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

85:                                               ; preds = %84, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %86

86:                                               ; preds = %85, %40
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %87

87:                                               ; preds = %86, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @_ZN4gem513CircularQueueIjED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %7, align 8
  %90 = load i32, ptr %8, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92

93:                                               ; preds = %80
  unreachable
}

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.gem5::CircularQueue<unsigned int>::iterator" = type { ptr, i64 }
%"class.testing::AssertionResult" = type { i8, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.4" }
%"struct.std::_Head_base.4" = type { ptr }
%"class.gem5::CircularQueue" = type { %"class.std::vector", i64, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.testing::Message" = type { %"class.std::unique_ptr.5" }
%"class.std::unique_ptr.5" = type { %"struct.std::__uniq_ptr_data.6" }
%"struct.std::__uniq_ptr_data.6" = type { %"class.std::__uniq_ptr_impl.7" }
%"class.std::__uniq_ptr_impl.7" = type { %"class.std::tuple.8" }
%"class.std::tuple.8" = type { %"struct.std::_Tuple_impl.9" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Head_base.12" }
%"struct.std::_Head_base.12" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [24 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: mustprogress uwtable
declare dso_local void @_ZN4gem513CircularQueueIjEC2Em(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef) unnamed_addr #1 align 2

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

declare void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

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

declare void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef, i32 noundef, ptr noundef) unnamed_addr #3

declare void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4gem513CircularQueueIjE5beginEv(ptr dead_on_unwind noalias writable sret(%"struct.gem5::CircularQueue<unsigned int>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4gem513CircularQueueIjE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.gem5::CircularQueue<unsigned int>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelper7CompareIliTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN36CircularQueueTest_MultipleRound_Test8TestBodyEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.gem5::CircularQueue", align 8
  %4 = alloca %"struct.gem5::CircularQueue<unsigned int>::iterator", align 8
  %5 = alloca %"struct.gem5::CircularQueue<unsigned int>::iterator", align 8
  %6 = alloca %"class.testing::AssertionResult", align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.testing::Message", align 8
  %9 = alloca %"class.testing::internal::AssertHelper", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 8, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  call void @_ZN4gem513CircularQueueIjEC2Em(ptr noundef nonnull align 8 dereferenceable(48) %3, i64 noundef 8)
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %10 unwind label %34

10:                                               ; preds = %1
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %11 unwind label %34

11:                                               ; preds = %10
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %12 unwind label %34

12:                                               ; preds = %11
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %13 unwind label %34

13:                                               ; preds = %12
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %14 unwind label %34

14:                                               ; preds = %13
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %15 unwind label %34

15:                                               ; preds = %14
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %16 unwind label %34

16:                                               ; preds = %15
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %17 unwind label %34

17:                                               ; preds = %16
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %18 unwind label %34

18:                                               ; preds = %17
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %19 unwind label %34

19:                                               ; preds = %18
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %20 unwind label %34

20:                                               ; preds = %19
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %21 unwind label %34

21:                                               ; preds = %20
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %22 unwind label %34

22:                                               ; preds = %21
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %23 unwind label %34

23:                                               ; preds = %22
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %24 unwind label %34

24:                                               ; preds = %23
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %25 unwind label %34

25:                                               ; preds = %24
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %26 unwind label %34

26:                                               ; preds = %25
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %27 unwind label %34

27:                                               ; preds = %26
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %28 unwind label %34

28:                                               ; preds = %27
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %29 unwind label %34

29:                                               ; preds = %28
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %30 unwind label %34

30:                                               ; preds = %29
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %31 unwind label %34

31:                                               ; preds = %30
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %32 unwind label %34

32:                                               ; preds = %31
  invoke void @_ZN4gem513CircularQueueIjE9push_backEj(ptr noundef nonnull align 8 dereferenceable(48) %3, i32 noundef 0)
          to label %33 unwind label %34

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  invoke void @_ZN4gem513CircularQueueIjE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.gem5::CircularQueue<unsigned int>::iterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %36 unwind label %41

34:                                               ; preds = %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %1
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %65

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  invoke void @_ZN4gem513CircularQueueIjE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.gem5::CircularQueue<unsigned int>::iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %37 unwind label %43

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %38 = call noundef i64 @_ZN4gem513CircularQueueIjE8iteratormiERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %4)
  store i64 %38, ptr %7, align 8, !tbaa !9
  invoke void @_ZN7testing8internal8EqHelper7CompareIliTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %6, ptr noundef nonnull @.str.65, ptr noundef nonnull @.str.5, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %39 unwind label %45

39:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %40 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  br i1 %40, label %61, label %47

41:                                               ; preds = %33
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %64

43:                                               ; preds = %36
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %63

45:                                               ; preds = %37
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %62

47:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %48 unwind label %53

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %49 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %50 unwind label %55

50:                                               ; preds = %48
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 2, ptr noundef nonnull @.str.3, i32 noundef 266, ptr noundef %49)
          to label %51 unwind label %55

51:                                               ; preds = %50
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %52 unwind label %57

52:                                               ; preds = %51
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %61

53:                                               ; preds = %47
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %60

55:                                               ; preds = %50, %48
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %51
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %59

59:                                               ; preds = %57, %55
  %.pn = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br label %60

60:                                               ; preds = %59, %53
  %.pn.pn = phi { ptr, i32 } [ %.pn, %59 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  br label %62

61:                                               ; preds = %39, %52
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @_ZN4gem513CircularQueueIjED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  ret void

62:                                               ; preds = %60, %45
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %60 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %63

63:                                               ; preds = %62, %43
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %62 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %64

64:                                               ; preds = %63, %41
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %63 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %65

65:                                               ; preds = %64, %34
  %.pn19 = phi { ptr, i32 } [ %35, %34 ], [ %.pn.pn.pn.pn.pn, %64 ]
  call void @_ZN4gem513CircularQueueIjED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn19
}

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass