; LLVM IR from microsoft/X-Mem :: src/Benchmark.ll (ZN4xmem9Benchmark16stopPowerThreadsEv)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.xmem::Benchmark" = type <{ ptr, ptr, i64, i32, i32, i32, i32, i32, i32, i32, i32, %"class.std::vector", %"class.std::vector.3", %"class.std::vector.8", double, double, double, double, double, double, double, double, double, %"class.std::__cxx11::basic_string", %"class.std::vector.8", %"class.std::vector.8", %"class.std::__cxx11::basic_string", i8, i8, i8, [5 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<xmem::PowerReader *, std::allocator<xmem::PowerReader *>>::_Vector_impl" }
%"struct.std::_Vector_base<xmem::PowerReader *, std::allocator<xmem::PowerReader *>>::_Vector_impl" = type { %"struct.std::_Vector_base<xmem::PowerReader *, std::allocator<xmem::PowerReader *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<xmem::PowerReader *, std::allocator<xmem::PowerReader *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<xmem::Thread *, std::allocator<xmem::Thread *>>::_Vector_impl" }
%"struct.std::_Vector_base<xmem::Thread *, std::allocator<xmem::Thread *>>::_Vector_impl" = type { %"struct.std::_Vector_base<xmem::Thread *, std::allocator<xmem::Thread *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<xmem::Thread *, std::allocator<xmem::Thread *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.44 = external hidden unnamed_addr constant [137 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [93 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

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

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

declare noundef double @_ZN4xmem11PowerReader12getMeanPowerEv(ptr noundef nonnull align 8 dereferenceable(156)) #4

declare noundef double @_ZN4xmem11PowerReader13getPowerUnitsEv(ptr noundef nonnull align 8 dereferenceable(156)) #4

declare noundef double @_ZN4xmem11PowerReader12getPeakPowerEv(ptr noundef nonnull align 8 dereferenceable(156)) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4xmem9Benchmark16stopPowerThreadsEv(ptr noundef nonnull align 8 dereferenceable(315) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  store i8 1, ptr %3, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !11
  br label %11

11:                                               ; preds = %44, %1
  %12 = load i32, ptr %4, align 4, !tbaa !11
  %13 = zext i32 %12 to i64
  %14 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 12
  %15 = call noundef i64 @_ZNKSt6vectorIPN4xmem6ThreadESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %16 = icmp ult i64 %13, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %47

18:                                               ; preds = %11
  %19 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 12
  %20 = load i32, ptr %4, align 4, !tbaa !11
  %21 = zext i32 %20 to i64
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %21) #5
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %43

25:                                               ; preds = %18
  %26 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 12
  %27 = load i32, ptr %4, align 4, !tbaa !11
  %28 = zext i32 %27 to i64
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %28) #5
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = call noundef zeroext i1 @_ZN4xmem6Thread7startedEv(ptr noundef nonnull align 8 dereferenceable(32) %30)
  br i1 %31, label %32, label %42

32:                                               ; preds = %25
  %33 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 11
  %34 = load i32, ptr %4, align 4, !tbaa !11
  %35 = zext i32 %34 to i64
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %35) #5
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZN4xmem11PowerReader4stopEv(ptr noundef nonnull align 8 dereferenceable(156) %37)
  br i1 %38, label %42, label %39

39:                                               ; preds = %32
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.44)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i8 0, ptr %3, align 1, !tbaa !9
  br label %42

42:                                               ; preds = %39, %32, %25
  br label %43

43:                                               ; preds = %42, %18
  br label %44

44:                                               ; preds = %43
  %45 = load i32, ptr %4, align 4, !tbaa !11
  %46 = add i32 %45, 1
  store i32 %46, ptr %4, align 4, !tbaa !11
  br label %11, !llvm.loop !13

47:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %48

48:                                               ; preds = %132, %47
  %49 = load i32, ptr %5, align 4, !tbaa !11
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 12
  %52 = call noundef i64 @_ZNKSt6vectorIPN4xmem6ThreadESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #5
  %53 = icmp ult i64 %50, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %48
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %135

55:                                               ; preds = %48
  %56 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 12
  %57 = load i32, ptr %5, align 4, !tbaa !11
  %58 = zext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58) #5
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %83

62:                                               ; preds = %55
  %63 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 12
  %64 = load i32, ptr %5, align 4, !tbaa !11
  %65 = zext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65) #5
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = call noundef zeroext i1 @_ZN4xmem6Thread4joinEv(ptr noundef nonnull align 8 dereferenceable(32) %67)
  br i1 %68, label %82, label %69

69:                                               ; preds = %62
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.45)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %72 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 12
  %73 = load i32, ptr %5, align 4, !tbaa !11
  %74 = zext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #5
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = call noundef zeroext i1 @_ZN4xmem6Thread6cancelEv(ptr noundef nonnull align 8 dereferenceable(32) %76)
  br i1 %77, label %81, label %78

78:                                               ; preds = %69
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.46)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %81

81:                                               ; preds = %78, %69
  br label %82

82:                                               ; preds = %81, %62
  br label %83

83:                                               ; preds = %82, %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %84

84:                                               ; preds = %128, %83
  %85 = load i32, ptr %7, align 4, !tbaa !11
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 11
  %88 = call noundef i64 @_ZNKSt6vectorIPN4xmem11PowerReaderESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %87) #5
  %89 = icmp ult i64 %86, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %84
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %131

91:                                               ; preds = %84
  %92 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 11
  %93 = load i32, ptr %7, align 4, !tbaa !11
  %94 = zext i32 %93 to i64
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %94) #5
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %127

98:                                               ; preds = %91
  %99 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 24
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %100 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 11
  %101 = load i32, ptr %7, align 4, !tbaa !11
  %102 = zext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %102) #5
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = call noundef double @_ZN4xmem11PowerReader12getMeanPowerEv(ptr noundef nonnull align 8 dereferenceable(156) %104)
  %106 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 11
  %107 = load i32, ptr %7, align 4, !tbaa !11
  %108 = zext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %108) #5
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = call noundef double @_ZN4xmem11PowerReader13getPowerUnitsEv(ptr noundef nonnull align 8 dereferenceable(156) %110)
  %112 = fmul double %105, %111
  store double %112, ptr %8, align 8, !tbaa !15
  call void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %113 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 25
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %114 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 11
  %115 = load i32, ptr %7, align 4, !tbaa !11
  %116 = zext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %116) #5
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = call noundef double @_ZN4xmem11PowerReader12getPeakPowerEv(ptr noundef nonnull align 8 dereferenceable(156) %118)
  %120 = getelementptr inbounds %"class.xmem::Benchmark", ptr %10, i32 0, i32 11
  %121 = load i32, ptr %7, align 4, !tbaa !11
  %122 = zext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %122) #5
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = call noundef double @_ZN4xmem11PowerReader13getPowerUnitsEv(ptr noundef nonnull align 8 dereferenceable(156) %124)
  %126 = fmul double %119, %125
  store double %126, ptr %9, align 8, !tbaa !15
  call void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24) %113, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %127

127:                                              ; preds = %98, %91
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %7, align 4, !tbaa !11
  %130 = add i32 %129, 1
  store i32 %130, ptr %7, align 4, !tbaa !11
  br label %84, !llvm.loop !17

131:                                              ; preds = %90
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %5, align 4, !tbaa !11
  %134 = add i32 %133, 1
  store i32 %134, ptr %5, align 4, !tbaa !11
  br label %48, !llvm.loop !18

135:                                              ; preds = %54
  %136 = load i8, ptr %3, align 1, !tbaa !9, !range !19, !noundef !20
  %137 = trunc i8 %136 to i1
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  ret i1 %137
}

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

declare noundef zeroext i1 @_ZN4xmem6Thread7startedEv(ptr noundef nonnull align 8 dereferenceable(32)) #4

declare noundef zeroext i1 @_ZN4xmem11PowerReader4stopEv(ptr noundef nonnull align 8 dereferenceable(156)) #4

declare noundef zeroext i1 @_ZN4xmem6Thread4joinEv(ptr noundef nonnull align 8 dereferenceable(32)) #4

declare noundef zeroext i1 @_ZN4xmem6Thread6cancelEv(ptr noundef nonnull align 8 dereferenceable(32)) #4

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 = { 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 #3 = { 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 #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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = !{i8 0, i8 2}
!20 = !{}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.44 = external hidden unnamed_addr constant [137 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [93 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

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

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

declare noundef double @_ZN4xmem11PowerReader12getMeanPowerEv(ptr noundef nonnull align 8 dereferenceable(156)) local_unnamed_addr #4

declare noundef double @_ZN4xmem11PowerReader13getPowerUnitsEv(ptr noundef nonnull align 8 dereferenceable(156)) local_unnamed_addr #4

declare noundef double @_ZN4xmem11PowerReader12getPeakPowerEv(ptr noundef nonnull align 8 dereferenceable(156)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4xmem9Benchmark16stopPowerThreadsEv(ptr noundef nonnull align 8 dereferenceable(315) %0) local_unnamed_addr #1 align 2 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 80
  %5 = tail call noundef i64 @_ZNKSt6vectorIPN4xmem6ThreadESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %.not34 = icmp eq i64 %5, 0
  br i1 %.not34, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  br label %11

.preheader:                                       ; preds = %26, %1
  %.020.lcssa = phi i1 [ true, %1 ], [ %.1, %26 ]
  %7 = tail call noundef i64 @_ZNKSt6vectorIPN4xmem6ThreadESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %.not35 = icmp eq i64 %7, 0
  br i1 %.not35, label %._crit_edge33, label %.lr.ph32

.lr.ph32:                                         ; preds = %.preheader
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  %9 = getelementptr inbounds i8, ptr %0, i64 232
  %10 = getelementptr inbounds i8, ptr %0, i64 256
  br label %31

11:                                               ; preds = %.lr.ph, %26
  %12 = phi i64 [ 0, %.lr.ph ], [ %28, %26 ]
  %.01927 = phi i32 [ 0, %.lr.ph ], [ %27, %26 ]
  %.02026 = phi i1 [ true, %.lr.ph ], [ %.1, %26 ]
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %12) #5
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %.not25 = icmp eq ptr %14, null
  br i1 %.not25, label %26, label %15

15:                                               ; preds = %11
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %12) #5
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = tail call noundef zeroext i1 @_ZN4xmem6Thread7startedEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  br i1 %18, label %19, label %26

19:                                               ; preds = %15
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %12) #5
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = tail call noundef zeroext i1 @_ZN4xmem11PowerReader4stopEv(ptr noundef nonnull align 8 dereferenceable(156) %21)
  br i1 %22, label %26, label %23

23:                                               ; preds = %19
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.44)
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %26

26:                                               ; preds = %11, %23, %19, %15
  %.1 = phi i1 [ %.02026, %19 ], [ false, %23 ], [ %.02026, %15 ], [ %.02026, %11 ]
  %27 = add i32 %.01927, 1
  %28 = zext i32 %27 to i64
  %29 = tail call noundef i64 @_ZNKSt6vectorIPN4xmem6ThreadESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %30 = icmp ugt i64 %29, %28
  br i1 %30, label %11, label %.preheader, !llvm.loop !9

._crit_edge33:                                    ; preds = %._crit_edge, %.preheader
  ret i1 %.020.lcssa

31:                                               ; preds = %.lr.ph32, %._crit_edge
  %32 = phi i64 [ 0, %.lr.ph32 ], [ %51, %._crit_edge ]
  %.01831 = phi i32 [ 0, %.lr.ph32 ], [ %50, %._crit_edge ]
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %32) #5
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %.not = icmp eq ptr %34, null
  br i1 %.not, label %48, label %35

35:                                               ; preds = %31
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %32) #5
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZN4xmem6Thread4joinEv(ptr noundef nonnull align 8 dereferenceable(32) %37)
  br i1 %38, label %48, label %39

39:                                               ; preds = %35
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.45)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem6ThreadESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %32) #5
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = call noundef zeroext i1 @_ZN4xmem6Thread6cancelEv(ptr noundef nonnull align 8 dereferenceable(32) %43)
  br i1 %44, label %48, label %45

45:                                               ; preds = %39
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.46)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %48

48:                                               ; preds = %35, %45, %39, %31
  %49 = call noundef i64 @_ZNKSt6vectorIPN4xmem11PowerReaderESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %.not36 = icmp eq i64 %49, 0
  br i1 %.not36, label %._crit_edge, label %.lr.ph30

._crit_edge:                                      ; preds = %72, %48
  %50 = add i32 %.01831, 1
  %51 = zext i32 %50 to i64
  %52 = call noundef i64 @_ZNKSt6vectorIPN4xmem6ThreadESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %53 = icmp ugt i64 %52, %51
  br i1 %53, label %31, label %._crit_edge33, !llvm.loop !11

.lr.ph30:                                         ; preds = %48, %72
  %54 = phi i64 [ %74, %72 ], [ 0, %48 ]
  %.029 = phi i32 [ %73, %72 ], [ 0, %48 ]
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %54) #5
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %.not24 = icmp eq ptr %56, null
  br i1 %.not24, label %72, label %57

57:                                               ; preds = %.lr.ph30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %54) #5
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = call noundef double @_ZN4xmem11PowerReader12getMeanPowerEv(ptr noundef nonnull align 8 dereferenceable(156) %59)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %54) #5
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = call noundef double @_ZN4xmem11PowerReader13getPowerUnitsEv(ptr noundef nonnull align 8 dereferenceable(156) %62)
  %64 = fmul double %60, %63
  store double %64, ptr %2, align 8, !tbaa !12
  call void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %54) #5
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = call noundef double @_ZN4xmem11PowerReader12getPeakPowerEv(ptr noundef nonnull align 8 dereferenceable(156) %66)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4xmem11PowerReaderESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %54) #5
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  %70 = call noundef double @_ZN4xmem11PowerReader13getPowerUnitsEv(ptr noundef nonnull align 8 dereferenceable(156) %69)
  %71 = fmul double %67, %70
  store double %71, ptr %3, align 8, !tbaa !12
  call void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %72

72:                                               ; preds = %.lr.ph30, %57
  %73 = add i32 %.029, 1
  %74 = zext i32 %73 to i64
  %75 = call noundef i64 @_ZNKSt6vectorIPN4xmem11PowerReaderESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %76 = icmp ugt i64 %75, %74
  br i1 %76, label %.lr.ph30, label %._crit_edge, !llvm.loop !14
}

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

declare noundef zeroext i1 @_ZN4xmem6Thread7startedEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN4xmem11PowerReader4stopEv(ptr noundef nonnull align 8 dereferenceable(156)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN4xmem6Thread4joinEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN4xmem6Thread6cancelEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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 = { 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 #3 = { 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 #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 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !10}


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