; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/tracing (sc_vcd_trace)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.sc_dt::sc_fxnum_bitref" = type <{ ptr, i32, [4 x i8] }>
%"class.sc_core::vcd_sc_fxnum_trace" = type { %"class.sc_core::vcd_trace.base", ptr, %"class.sc_dt::sc_fxnum" }
%"class.sc_core::vcd_trace.base" = type <{ ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", ptr, i32 }>
%"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.sc_dt::sc_fxnum" = type { ptr, %"class.sc_dt::scfx_params", i8, i8, ptr }
%"class.sc_dt::scfx_params" = type { %"class.sc_dt::sc_fxtype_params", i32, %"class.sc_dt::sc_fxcast_switch" }
%"class.sc_dt::sc_fxtype_params" = type { i32, i32, i32, i32, i32 }
%"class.sc_dt::sc_fxcast_switch" = type { i32 }

@__dso_handle = external hidden global i8
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata = external hidden global %"class.std::vector.4", align 8
@_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata = external hidden global i64, align 8
@_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata = external hidden global %"class.std::vector.4", align 8
@_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata = external hidden global i64, align 8

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare i32 @fputs(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

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

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

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #0

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN5sc_dt8sc_fxnumaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::vector.4", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::vector.4", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.sc_dt::sc_fxnum_bitref", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  %18 = load atomic i8, ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata acquire, align 8
  %19 = icmp eq i8 %18, 0
  br i1 %19, label %20, label %26, !prof !9

20:                                               ; preds = %2
  %21 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #0
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #0
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #0
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata, i64 noundef 1024, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %53

24:                                               ; preds = %23
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #0
  %25 = call i32 @__cxa_atexit(ptr @_ZNSt6vectorIcSaIcEED2Ev, ptr @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #0
  br label %26

26:                                               ; preds = %24, %20, %2
  %27 = load atomic i8, ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata acquire, align 8
  %28 = icmp eq i8 %27, 0
  br i1 %28, label %29, label %35, !prof !9

29:                                               ; preds = %26
  %30 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata) #0
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %35

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #0
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #0
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata, i64 noundef 1024, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %33 unwind label %57

33:                                               ; preds = %32
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #0
  %34 = call i32 @__cxa_atexit(ptr @_ZNSt6vectorIcSaIcEED2Ev, ptr @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata) #0
  br label %35

35:                                               ; preds = %33, %29, %26
  %36 = call noundef i64 @_ZNKSt6vectorIcSaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #0
  %37 = getelementptr inbounds %"class.sc_core::vcd_sc_fxnum_trace", ptr %17, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !10
  %39 = call noundef i32 @_ZNK5sc_dt8sc_fxnum2wlEv(ptr noundef nonnull align 8 dereferenceable(48) %38)
  %40 = sext i32 %39 to i64
  %41 = icmp ult i64 %36, %40
  br i1 %41, label %42, label %70

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #0
  %43 = getelementptr inbounds %"class.sc_core::vcd_sc_fxnum_trace", ptr %17, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !10
  %45 = call noundef i32 @_ZNK5sc_dt8sc_fxnum2wlEv(ptr noundef nonnull align 8 dereferenceable(48) %44)
  %46 = sext i32 %45 to i64
  %47 = add i64 %46, 4096
  %48 = and i64 %47, -4096
  store i64 %48, ptr %9, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #0
  %49 = load i64, ptr %9, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #0
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #0
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %49, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %50 unwind label %61

50:                                               ; preds = %42
  call void @_ZNSt6vectorIcSaIcEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #0
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #0
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #0
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #0
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #0
  %51 = load i64, ptr %9, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #0
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #0
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %51, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %52 unwind label %65

52:                                               ; preds = %50
  call void @_ZNSt6vectorIcSaIcEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata) #0
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #0
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #0
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #0
  br label %70

53:                                               ; preds = %23
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %6, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #0
  call void @__cxa_guard_abort(ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #0
  br label %104

57:                                               ; preds = %32
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %6, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #0
  call void @__cxa_guard_abort(ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata) #0
  br label %104

61:                                               ; preds = %42
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %6, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #0
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #0
  br label %69

65:                                               ; preds = %50
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %6, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #0
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #0
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #0
  br label %104

70:                                               ; preds = %52, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #0
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata, i64 noundef 0) #0
  store ptr %71, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #0
  %72 = getelementptr inbounds %"class.sc_core::vcd_sc_fxnum_trace", ptr %17, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !10
  %74 = call noundef i32 @_ZNK5sc_dt8sc_fxnum2wlEv(ptr noundef nonnull align 8 dereferenceable(48) %73)
  %75 = sub nsw i32 %74, 1
  store i32 %75, ptr %15, align 4, !tbaa !27
  br label %76

76:                                               ; preds = %90, %70
  %77 = load i32, ptr %15, align 4, !tbaa !27
  %78 = icmp sge i32 %77, 0
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #0
  br label %93

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #0
  %81 = getelementptr inbounds %"class.sc_core::vcd_sc_fxnum_trace", ptr %17, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !10
  %83 = load i32, ptr %15, align 4, !tbaa !27
  call void @_ZNK5sc_dt8sc_fxnumixEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_fxnum_bitref") align 8 %16, ptr noundef nonnull align 8 dereferenceable(48) %82, i32 noundef %83)
  %84 = call noundef zeroext i1 @_ZNK5sc_dt15sc_fxnum_bitrefcvbEv(ptr noundef nonnull align 8 dereferenceable(12) %16)
  %85 = zext i1 %84 to i64
  %86 = getelementptr inbounds [3 x i8], ptr @.str.13, i64 0, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !28
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i32 1
  store ptr %89, ptr %14, align 8, !tbaa !5
  store i8 %87, ptr %88, align 1, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #0
  br label %90

90:                                               ; preds = %80
  %91 = load i32, ptr %15, align 4, !tbaa !27
  %92 = add nsw i32 %91, -1
  store i32 %92, ptr %15, align 4, !tbaa !27
  br label %76, !llvm.loop !29

93:                                               ; preds = %79
  %94 = load ptr, ptr %14, align 8, !tbaa !5
  store i8 0, ptr %94, align 1, !tbaa !28
  %95 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata, i64 noundef 0) #0
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata, i64 noundef 0) #0
  call void @_ZN7sc_core9vcd_trace17compose_data_lineEPcS1_(ptr noundef nonnull align 8 dereferenceable(84) %17, ptr noundef %95, ptr noundef %96)
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata, i64 noundef 0) #0
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = call i32 @fputs(ptr noundef %97, ptr noundef %98)
  %100 = getelementptr inbounds %"class.sc_core::vcd_sc_fxnum_trace", ptr %17, i32 0, i32 1
  %101 = load ptr, ptr %100, align 8, !tbaa !10
  %102 = getelementptr inbounds %"class.sc_core::vcd_sc_fxnum_trace", ptr %17, i32 0, i32 2
  %103 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN5sc_dt8sc_fxnumaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %102, ptr noundef nonnull align 8 dereferenceable(48) %101)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #0
  ret void

104:                                              ; preds = %69, %57, %53
  %105 = load ptr, ptr %6, align 8
  %106 = load i32, ptr %7, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt8sc_fxnum2wlEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5sc_dt8sc_fxnumixEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_fxnum_bitref") align 8, ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt15sc_fxnum_bitrefcvbEv(ptr noundef nonnull align 8 dereferenceable(12)) #5 align 2

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

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

!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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !6, i64 88}
!11 = !{!"_ZTSN7sc_core18vcd_sc_fxnum_traceE", !12, i64 0, !6, i64 88, !17, i64 96}
!12 = !{!"_ZTSN7sc_core9vcd_traceE", !13, i64 8, !13, i64 40, !6, i64 72, !16, i64 80}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN5sc_dt8sc_fxnumE", !6, i64 0, !18, i64 8, !25, i64 36, !25, i64 37, !6, i64 40}
!18 = !{!"_ZTSN5sc_dt11scfx_paramsE", !19, i64 0, !22, i64 20, !23, i64 24}
!19 = !{!"_ZTSN5sc_dt16sc_fxtype_paramsE", !16, i64 0, !16, i64 4, !20, i64 8, !21, i64 12, !16, i64 16}
!20 = !{!"_ZTSN5sc_dt9sc_q_modeE", !7, i64 0}
!21 = !{!"_ZTSN5sc_dt9sc_o_modeE", !7, i64 0}
!22 = !{!"_ZTSN5sc_dt6sc_encE", !7, i64 0}
!23 = !{!"_ZTSN5sc_dt16sc_fxcast_switchE", !24, i64 0}
!24 = !{!"_ZTSN5sc_dt9sc_switchE", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!15, !15, i64 0}
!27 = !{!16, !16, i64 0}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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

%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.sc_dt::sc_fxnum_bitref" = type <{ ptr, i32, [4 x i8] }>

@__dso_handle = external hidden global i8
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata = external hidden global %"class.std::vector.4", align 8
@_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata = external hidden global i64, align 8
@_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata = external hidden global %"class.std::vector.4", align 8
@_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata = external hidden global i64, align 8

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fputs(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

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

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

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN5sc_dt8sc_fxnumaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr nocapture noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::vector.4", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector.4", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.sc_dt::sc_fxnum_bitref", align 8
  %10 = load atomic i8, ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata acquire, align 8
  %11 = icmp eq i8 %10, 0
  br i1 %11, label %12, label %17, !prof !5

12:                                               ; preds = %2
  %13 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #6
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %17, label %14

14:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata, i64 noundef 1024, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %15 unwind label %40

15:                                               ; preds = %14
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  %16 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt6vectorIcSaIcEED2Ev, ptr nonnull @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata, ptr nonnull @__dso_handle) #6
  call void @__cxa_guard_release(ptr nonnull @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #6
  br label %17

17:                                               ; preds = %15, %12, %2
  %18 = load atomic i8, ptr @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata acquire, align 8
  %19 = icmp eq i8 %18, 0
  br i1 %19, label %20, label %25, !prof !5

20:                                               ; preds = %17
  %21 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata) #6
  %.not14 = icmp eq i32 %21, 0
  br i1 %.not14, label %25, label %22

22:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata, i64 noundef 1024, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %23 unwind label %42

23:                                               ; preds = %22
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  %24 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt6vectorIcSaIcEED2Ev, ptr nonnull @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata, ptr nonnull @__dso_handle) #6
  call void @__cxa_guard_release(ptr nonnull @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata) #6
  br label %25

25:                                               ; preds = %23, %20, %17
  %26 = call noundef i64 @_ZNKSt6vectorIcSaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #6
  %27 = getelementptr inbounds i8, ptr %0, i64 88
  %28 = load ptr, ptr %27, align 8, !tbaa !6
  %29 = call noundef i32 @_ZNK5sc_dt8sc_fxnum2wlEv(ptr noundef nonnull align 8 dereferenceable(48) %28)
  %30 = sext i32 %29 to i64
  %31 = icmp ult i64 %26, %30
  br i1 %31, label %32, label %48

32:                                               ; preds = %25
  %33 = load ptr, ptr %27, align 8, !tbaa !6
  %34 = call noundef i32 @_ZNK5sc_dt8sc_fxnum2wlEv(ptr noundef nonnull align 8 dereferenceable(48) %33)
  %35 = and i32 %34, -4096
  %36 = sext i32 %35 to i64
  %37 = add nsw i64 %36, 4096
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %38 unwind label %44

38:                                               ; preds = %32
  call void @_ZNSt6vectorIcSaIcEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #6
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %39 unwind label %46

39:                                               ; preds = %38
  call void @_ZNSt6vectorIcSaIcEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata) #6
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %48

40:                                               ; preds = %14
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  call void @__cxa_guard_abort(ptr nonnull @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata) #6
  br label %67

42:                                               ; preds = %22
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @__cxa_guard_abort(ptr nonnull @_ZGVZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata) #6
  br label %67

44:                                               ; preds = %32
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %67

46:                                               ; preds = %38
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %67

48:                                               ; preds = %39, %25
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata, i64 noundef 0) #6
  %50 = load ptr, ptr %27, align 8, !tbaa !6
  %51 = call noundef i32 @_ZNK5sc_dt8sc_fxnum2wlEv(ptr noundef nonnull align 8 dereferenceable(48) %50)
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %48
  %.010.lcssa = phi ptr [ %49, %48 ], [ %65, %.lr.ph ]
  store i8 0, ptr %.010.lcssa, align 1, !tbaa !25
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE7rawdata, i64 noundef 0) #6
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata, i64 noundef 0) #6
  call void @_ZN7sc_core9vcd_trace17compose_data_lineEPcS1_(ptr noundef nonnull align 8 dereferenceable(84) %0, ptr noundef nonnull %53, ptr noundef nonnull %54)
  %55 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZZN7sc_core18vcd_sc_fxnum_trace5writeEP8_IO_FILEE8compdata, i64 noundef 0) #6
  %56 = call i32 @fputs(ptr noundef nonnull %55, ptr noundef %1)
  %57 = load ptr, ptr %27, align 8, !tbaa !6
  %58 = getelementptr inbounds i8, ptr %0, i64 96
  %59 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN5sc_dt8sc_fxnumaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %58, ptr noundef nonnull align 8 dereferenceable(48) %57)
  ret void

.lr.ph:                                           ; preds = %48, %.lr.ph
  %.0.in18 = phi i32 [ %.0, %.lr.ph ], [ %51, %48 ]
  %.01017 = phi ptr [ %65, %.lr.ph ], [ %49, %48 ]
  %.0 = add nsw i32 %.0.in18, -1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %60 = load ptr, ptr %27, align 8, !tbaa !6
  call void @_ZNK5sc_dt8sc_fxnumixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_fxnum_bitref") align 8 %9, ptr noundef nonnull align 8 dereferenceable(48) %60, i32 noundef %.0)
  %61 = call noundef zeroext i1 @_ZNK5sc_dt15sc_fxnum_bitrefcvbEv(ptr noundef nonnull align 8 dereferenceable(12) %9)
  %62 = zext i1 %61 to i64
  %63 = getelementptr inbounds [3 x i8], ptr @.str.13, i64 0, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !25
  %65 = getelementptr inbounds i8, ptr %.01017, i64 1
  store i8 %64, ptr %.01017, align 1, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  %66 = icmp ugt i32 %.0.in18, 1
  br i1 %66, label %.lr.ph, label %._crit_edge, !llvm.loop !26

67:                                               ; preds = %44, %46, %42, %40
  %.pn.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ], [ %47, %46 ], [ %45, %44 ]
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt8sc_fxnum2wlEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5sc_dt8sc_fxnumixEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_fxnum_bitref") align 8, ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt15sc_fxnum_bitrefcvbEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #5 align 2

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

attributes #0 = { nofree nounwind }
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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { 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 #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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !11, i64 88}
!7 = !{!"_ZTSN7sc_core18vcd_sc_fxnum_traceE", !8, i64 0, !11, i64 88, !16, i64 96}
!8 = !{!"_ZTSN7sc_core9vcd_traceE", !9, i64 8, !9, i64 40, !11, i64 72, !15, i64 80}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !10, i64 0, !14, i64 8, !12, i64 16}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"long", !12, i64 0}
!15 = !{!"int", !12, i64 0}
!16 = !{!"_ZTSN5sc_dt8sc_fxnumE", !11, i64 0, !17, i64 8, !24, i64 36, !24, i64 37, !11, i64 40}
!17 = !{!"_ZTSN5sc_dt11scfx_paramsE", !18, i64 0, !21, i64 20, !22, i64 24}
!18 = !{!"_ZTSN5sc_dt16sc_fxtype_paramsE", !15, i64 0, !15, i64 4, !19, i64 8, !20, i64 12, !15, i64 16}
!19 = !{!"_ZTSN5sc_dt9sc_q_modeE", !12, i64 0}
!20 = !{!"_ZTSN5sc_dt9sc_o_modeE", !12, i64 0}
!21 = !{!"_ZTSN5sc_dt6sc_encE", !12, i64 0}
!22 = !{!"_ZTSN5sc_dt16sc_fxcast_switchE", !23, i64 0}
!23 = !{!"_ZTSN5sc_dt9sc_switchE", !12, i64 0}
!24 = !{!"bool", !12, i64 0}
!25 = !{!12, !12, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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