; LLVM IR from yinqiwen/ardb :: src (statistics)

; 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::__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] }
%"class.std::allocator" = type { i8 }
%"struct.ardb::CostTrack" = type { %"struct.ardb::Track.base", %"class.std::vector", %"class.std::vector.3" }
%"struct.ardb::Track.base" = type <{ ptr, %"class.std::__cxx11::basic_string", i32 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ardb::CostRange, std::allocator<ardb::CostRange>>::_Vector_impl" }
%"struct.std::_Vector_base<ardb::CostRange, std::allocator<ardb::CostRange>>::_Vector_impl" = type { %"struct.std::_Vector_base<ardb::CostRange, std::allocator<ardb::CostRange>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ardb::CostRange, std::allocator<ardb::CostRange>>::_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<ardb::CostRecord, std::allocator<ardb::CostRecord>>::_Vector_impl" }
%"struct.std::_Vector_base<ardb::CostRecord, std::allocator<ardb::CostRecord>>::_Vector_impl" = type { %"struct.std::_Vector_base<ardb::CostRecord, std::allocator<ardb::CostRecord>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ardb::CostRecord, std::allocator<ardb::CostRecord>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ardb::CostRecord" = type { i64, i64 }
%"struct.ardb::CostRange" = type { i64, i64 }
%"struct.ardb::Track" = type <{ ptr, %"class.std::__cxx11::basic_string", i32, [4 x i8] }>

@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [69 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4ardb9CostTrack4DumpEPFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPvES9_(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca [1024 x i8], align 16
  %9 = alloca [1024 x i8], align 16
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  %15 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 0) #4
  %17 = getelementptr inbounds %"struct.ardb::CostRecord", ptr %16, i32 0, i32 1
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %19 = icmp eq i64 0, %18
  br i1 %19, label %20, label %21

20:                                               ; preds = %3
  br label %132

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !12
  br label %22

22:                                               ; preds = %120, %21
  %23 = load i64, ptr %7, align 8, !tbaa !12
  %24 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %25 = call noundef i64 @_ZNKSt6vectorIN4ardb10CostRecordESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #4
  %26 = icmp ult i64 %23, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %132

28:                                               ; preds = %22
  %29 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %30 = load i64, ptr %7, align 8, !tbaa !12
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %30) #4
  %32 = getelementptr inbounds %"struct.ardb::CostRecord", ptr %31, i32 0, i32 1
  %33 = load i64, ptr %32, align 8, !tbaa !9
  %34 = icmp eq i64 0, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %28
  br label %120

36:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 1024, ptr %8) #4
  %37 = load i64, ptr %7, align 8, !tbaa !12
  %38 = icmp eq i64 %37, 0
  br i1 %38, label %39, label %42

39:                                               ; preds = %36
  %40 = getelementptr inbounds [1024 x i8], ptr %8, i64 0, i64 0
  %41 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %40, ptr noundef @.str.1) #4
  br label %75

42:                                               ; preds = %36
  %43 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 1
  %44 = load i64, ptr %7, align 8, !tbaa !12
  %45 = sub i64 %44, 1
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb9CostRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #4
  %47 = getelementptr inbounds %"struct.ardb::CostRange", ptr %46, i32 0, i32 1
  %48 = load i64, ptr %47, align 8, !tbaa !13
  %49 = icmp eq i64 %48, -1
  br i1 %49, label %50, label %59

50:                                               ; preds = %42
  %51 = getelementptr inbounds [1024 x i8], ptr %8, i64 0, i64 0
  %52 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 1
  %53 = load i64, ptr %7, align 8, !tbaa !12
  %54 = sub i64 %53, 1
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb9CostRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54) #4
  %56 = getelementptr inbounds %"struct.ardb::CostRange", ptr %55, i32 0, i32 0
  %57 = load i64, ptr %56, align 8, !tbaa !15
  %58 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %51, i64 noundef 1023, ptr noundef @.str.2, i64 noundef %57) #4
  br label %74

59:                                               ; preds = %42
  %60 = getelementptr inbounds [1024 x i8], ptr %8, i64 0, i64 0
  %61 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 1
  %62 = load i64, ptr %7, align 8, !tbaa !12
  %63 = sub i64 %62, 1
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb9CostRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %63) #4
  %65 = getelementptr inbounds %"struct.ardb::CostRange", ptr %64, i32 0, i32 0
  %66 = load i64, ptr %65, align 8, !tbaa !15
  %67 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 1
  %68 = load i64, ptr %7, align 8, !tbaa !12
  %69 = sub i64 %68, 1
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb9CostRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #4
  %71 = getelementptr inbounds %"struct.ardb::CostRange", ptr %70, i32 0, i32 1
  %72 = load i64, ptr %71, align 8, !tbaa !13
  %73 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %60, i64 noundef 1023, ptr noundef @.str.3, i64 noundef %66, i64 noundef %72) #4
  br label %74

74:                                               ; preds = %59, %50
  br label %75

75:                                               ; preds = %74, %39
  call void @llvm.lifetime.start.p0(i64 1024, ptr %9) #4
  %76 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %77 = getelementptr inbounds %"struct.ardb::Track", ptr %14, i32 0, i32 1
  %78 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %77) #4
  %79 = getelementptr inbounds [1024 x i8], ptr %8, i64 0, i64 0
  %80 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %81 = load i64, ptr %7, align 8, !tbaa !12
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %81) #4
  %83 = getelementptr inbounds %"struct.ardb::CostRecord", ptr %82, i32 0, i32 1
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %86 = load i64, ptr %7, align 8, !tbaa !12
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %86) #4
  %88 = getelementptr inbounds %"struct.ardb::CostRecord", ptr %87, i32 0, i32 0
  %89 = load i64, ptr %88, align 8, !tbaa !16
  %90 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %91 = load i64, ptr %7, align 8, !tbaa !12
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %91) #4
  %93 = getelementptr inbounds %"struct.ardb::CostRecord", ptr %92, i32 0, i32 0
  %94 = load i64, ptr %93, align 8, !tbaa !16
  %95 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %96 = load i64, ptr %7, align 8, !tbaa !12
  %97 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %96) #4
  %98 = getelementptr inbounds %"struct.ardb::CostRecord", ptr %97, i32 0, i32 1
  %99 = load i64, ptr %98, align 8, !tbaa !9
  %100 = udiv i64 %94, %99
  %101 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %102 = load i64, ptr %7, align 8, !tbaa !12
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %102) #4
  %104 = getelementptr inbounds %"struct.ardb::CostRecord", ptr %103, i32 0, i32 1
  %105 = load i64, ptr %104, align 8, !tbaa !9
  %106 = uitofp i64 %105 to double
  %107 = getelementptr inbounds %"struct.ardb::CostTrack", ptr %14, i32 0, i32 2
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef 0) #4
  %109 = getelementptr inbounds %"struct.ardb::CostRecord", ptr %108, i32 0, i32 1
  %110 = load i64, ptr %109, align 8, !tbaa !9
  %111 = uitofp i64 %110 to double
  %112 = fdiv double %106, %111
  %113 = fmul double %112, 1.000000e+02
  %114 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %76, i64 noundef 1023, ptr noundef @.str.4, ptr noundef %78, ptr noundef %79, i64 noundef %84, i64 noundef %89, i64 noundef %100, double noundef %113) #4
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #4
  %116 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef %116, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %117 unwind label %123

117:                                              ; preds = %75
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void %115(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef %118)
          to label %119 unwind label %127

119:                                              ; preds = %117
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %8) #4
  br label %120

120:                                              ; preds = %119, %35
  %121 = load i64, ptr %7, align 8, !tbaa !12
  %122 = add i64 %121, 1
  store i64 %122, ptr %7, align 8, !tbaa !12
  br label %22, !llvm.loop !17

123:                                              ; preds = %75
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %12, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %13, align 4
  br label %131

127:                                              ; preds = %117
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %12, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %131

131:                                              ; preds = %127, %123
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %133

132:                                              ; preds = %27, %20
  ret void

133:                                              ; preds = %131
  %134 = load ptr, ptr %12, align 8
  %135 = load i32, ptr %13, align 4
  %136 = insertvalue { ptr, i32 } poison, ptr %134, 0
  %137 = insertvalue { ptr, i32 } %136, i32 %135, 1
  resume { ptr, i32 } %137
}

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #3

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN4ardb10CostRecordE", !11, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 8}
!14 = !{!"_ZTSN4ardb9CostRangeE", !11, i64 0, !11, i64 8}
!15 = !{!14, !11, i64 0}
!16 = !{!10, !11, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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

%"class.std::__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] }
%"class.std::allocator" = type { i8 }

@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [69 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4ardb9CostTrack4DumpEPFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPvES9_(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr nocapture noundef readonly %1, ptr noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca [1024 x i8], align 16
  %5 = alloca [1024 x i8], align 16
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = icmp eq i64 %11, 0
  br i1 %12, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %3
  %13 = tail call noundef i64 @_ZNKSt6vectorIN4ardb10CostRecordESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %14 = getelementptr inbounds i8, ptr %0, i64 48
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %19 = icmp eq i64 %18, 0
  br i1 %19, label %47, label %20

20:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #4
  %21 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.1) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %5) #4
  %22 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %27 = load i64, ptr %26, align 8, !tbaa !10
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %29 = load i64, ptr %28, align 8, !tbaa !10
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = udiv i64 %29, %32
  %34 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = uitofp i64 %36 to double
  %38 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = uitofp i64 %40 to double
  %42 = fdiv double %37, %41
  %43 = fmul double %42, 1.000000e+02
  %44 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 1023, ptr noundef nonnull @.str.4, ptr noundef %22, ptr noundef nonnull %4, i64 noundef %25, i64 noundef %27, i64 noundef %33, double noundef %43) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %5, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %45 unwind label %.loopexit.split-lp

45:                                               ; preds = %20
  invoke void %1(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %2)
          to label %46 unwind label %.loopexit.split-lp25

46:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #4
  br label %47

47:                                               ; preds = %46, %.lr.ph
  %48 = call noundef i64 @_ZNKSt6vectorIN4ardb10CostRecordESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %49 = icmp ugt i64 %48, 1
  br i1 %49, label %.peel.next, label %.loopexit

.peel.next:                                       ; preds = %47, %95
  %.01820 = phi i64 [ %96, %95 ], [ 1, %47 ]
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.01820) #4
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = icmp eq i64 %52, 0
  br i1 %53, label %95, label %54

54:                                               ; preds = %.peel.next
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #4
  %55 = add i64 %.01820, -1
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb9CostRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %55) #4
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = icmp eq i64 %58, -1
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb9CostRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %55) #4
  %61 = load i64, ptr %60, align 8, !tbaa !13
  br i1 %59, label %62, label %64

62:                                               ; preds = %54
  %63 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %4, i64 noundef 1023, ptr noundef nonnull @.str.2, i64 noundef %61) #4
  br label %69

64:                                               ; preds = %54
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb9CostRangeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %55) #4
  %66 = getelementptr inbounds i8, ptr %65, i64 8
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %4, i64 noundef 1023, ptr noundef nonnull @.str.3, i64 noundef %61, i64 noundef %67) #4
  br label %69

69:                                               ; preds = %62, %64
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %5) #4
  %70 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.01820) #4
  %72 = getelementptr inbounds i8, ptr %71, i64 8
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.01820) #4
  %75 = load i64, ptr %74, align 8, !tbaa !10
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.01820) #4
  %77 = load i64, ptr %76, align 8, !tbaa !10
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.01820) #4
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = udiv i64 %77, %80
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.01820) #4
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load i64, ptr %83, align 8, !tbaa !5
  %85 = uitofp i64 %84 to double
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN4ardb10CostRecordESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  %88 = load i64, ptr %87, align 8, !tbaa !5
  %89 = uitofp i64 %88 to double
  %90 = fdiv double %85, %89
  %91 = fmul double %90, 1.000000e+02
  %92 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 1023, ptr noundef nonnull @.str.4, ptr noundef %70, ptr noundef nonnull %4, i64 noundef %73, i64 noundef %75, i64 noundef %81, double noundef %91) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %5, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %93 unwind label %.loopexit23

93:                                               ; preds = %69
  invoke void %1(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %2)
          to label %94 unwind label %.loopexit24

94:                                               ; preds = %93
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #4
  br label %95

95:                                               ; preds = %.peel.next, %94
  %96 = add nuw i64 %.01820, 1
  %97 = call noundef i64 @_ZNKSt6vectorIN4ardb10CostRecordESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %98 = icmp ult i64 %96, %97
  br i1 %98, label %.peel.next, label %.loopexit, !llvm.loop !14

.loopexit23:                                      ; preds = %69
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %100

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

.loopexit24:                                      ; preds = %93
  %lpad.loopexit26 = landingpad { ptr, i32 }
          cleanup
  br label %99

.loopexit.split-lp25:                             ; preds = %45
  %lpad.loopexit.split-lp27 = landingpad { ptr, i32 }
          cleanup
  br label %99

99:                                               ; preds = %.loopexit.split-lp25, %.loopexit24
  %lpad.phi28 = phi { ptr, i32 } [ %lpad.loopexit26, %.loopexit24 ], [ %lpad.loopexit.split-lp27, %.loopexit.split-lp25 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %100

100:                                              ; preds = %.loopexit23, %.loopexit.split-lp, %99
  %.pn = phi { ptr, i32 } [ %lpad.phi28, %99 ], [ %lpad.loopexit, %.loopexit23 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %95, %47, %.preheader, %3
  ret void
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN4ardb10CostRecordE", !7, i64 0, !7, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 0}
!11 = !{!12, !7, i64 8}
!12 = !{!"_ZTSN4ardb9CostRangeE", !7, i64 0, !7, i64 8}
!13 = !{!12, !7, i64 0}
!14 = distinct !{!14, !15, !16}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.peeled.count", i32 1}


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