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

; 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.sc_core::sc_time" = type { i64 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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.sc_core::sc_trace_file_base" = type <{ %"class.sc_core::sc_trace_file", ptr, double, i8, [7 x i8], %"class.std::__cxx11::basic_string", i8, i8, [6 x i8] }>
%"class.sc_core::sc_trace_file" = type { ptr }
%"class.sc_core::vcd_trace_file" = type { %"class.sc_core::sc_trace_file_base.base", i32, i32, i32, %"class.std::vector" }
%"class.sc_core::sc_trace_file_base.base" = type <{ %"class.sc_core::sc_trace_file", ptr, double, i8, [7 x i8], %"class.std::__cxx11::basic_string", i8, i8 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sc_core::vcd_trace *, std::allocator<sc_core::vcd_trace *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::vcd_trace *, std::allocator<sc_core::vcd_trace *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::vcd_trace *, std::allocator<sc_core::vcd_trace *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::vcd_trace *, std::allocator<sc_core::vcd_trace *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [89 x i8], align 1
@_ZZN7sc_core14vcd_trace_file5cycleEbE6warned = external hidden global i8, align 1
@_ZN7sc_core30SC_ID_TRACING_VCD_DELTA_CYCLE_E = external constant [0 x i8], align 1
@_ZZN7sc_core14vcd_trace_file5cycleEbE6warned_0 = external hidden global i8, align 1
@.str.45 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [150 x i8], align 1
@_ZN7sc_core33SC_ID_TRACING_VCD_DUPLICATE_TIME_E = external constant [0 x i8], align 1
@_ZZN7sc_core14vcd_trace_file5cycleEbE6warned_1 = external hidden global i8, align 1
@.str.47 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [179 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [4 x i8], align 1

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 #0 align 2

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 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: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #4 align 2

; 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) #5

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #0 align 2

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

declare i32 @fputc(i32 noundef, ptr noundef) #1

declare void @_ZN7sc_core7sc_timeC1EdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(8), double noundef, i32 noundef) unnamed_addr #1

declare noundef double @_ZNK7sc_core7sc_time10to_secondsEv(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv() #1

declare void @_ZN7sc_core23double_to_special_int64EdPjS0_(double noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7sc_core14vcd_trace_file5cycleEb(ptr noundef nonnull align 8 dereferenceable(104) %0, i1 noundef zeroext %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.sc_core::sc_time", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca i8, align 1
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca [200 x i8], align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  %26 = zext i1 %1 to i8
  store i8 %26, ptr %4, align 1, !tbaa !9
  %27 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  store i32 0, ptr %5, align 4, !tbaa !11
  %28 = call noundef zeroext i1 @_ZNK7sc_core18sc_trace_file_base12delta_cyclesEv(ptr noundef nonnull align 8 dereferenceable(66) %27)
  br i1 %28, label %33, label %29

29:                                               ; preds = %2
  %30 = load i8, ptr %4, align 1, !tbaa !9, !range !13, !noundef !14
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %33

32:                                               ; preds = %29
  store i32 1, ptr %7, align 4
  br label %269

33:                                               ; preds = %29, %2
  %34 = call noundef zeroext i1 @_ZN7sc_core18sc_trace_file_base10initializeEv(ptr noundef nonnull align 8 dereferenceable(66) %27)
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  store i32 1, ptr %7, align 4
  br label %269

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv()
  %38 = call noundef double @_ZNK7sc_core7sc_time10to_secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %37)
  %39 = getelementptr inbounds %"class.sc_core::sc_trace_file_base", ptr %27, i32 0, i32 2
  %40 = load double, ptr %39, align 8, !tbaa !15
  %41 = fdiv double %38, %40
  store double %41, ptr %8, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %42 = load double, ptr %8, align 8, !tbaa !22
  call void @_ZN7sc_core23double_to_special_int64EdPjS0_(double noundef %42, ptr noundef %9, ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  store i8 0, ptr %11, align 1, !tbaa !9
  %43 = load i32, ptr %10, align 4, !tbaa !11
  %44 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 2
  %45 = load i32, ptr %44, align 8, !tbaa !23
  %46 = icmp ugt i32 %43, %45
  br i1 %46, label %47, label %52

47:                                               ; preds = %36
  %48 = load i32, ptr %9, align 4, !tbaa !11
  %49 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 3
  %50 = load i32, ptr %49, align 4, !tbaa !29
  %51 = icmp eq i32 %48, %50
  br i1 %51, label %57, label %52

52:                                               ; preds = %47, %36
  %53 = load i32, ptr %9, align 4, !tbaa !11
  %54 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 3
  %55 = load i32, ptr %54, align 4, !tbaa !29
  %56 = icmp ugt i32 %53, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %52, %47
  store i8 1, ptr %11, align 1, !tbaa !9
  br label %58

58:                                               ; preds = %57, %52
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  store i8 0, ptr %12, align 1, !tbaa !9
  %59 = load i8, ptr %11, align 1, !tbaa !9, !range !13, !noundef !14
  %60 = trunc i8 %59 to i1
  br i1 %60, label %61, label %64

61:                                               ; preds = %58
  %62 = load i32, ptr %9, align 4, !tbaa !11
  store i32 %62, ptr %5, align 4, !tbaa !11
  %63 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %63, ptr %6, align 4, !tbaa !11
  br label %78

64:                                               ; preds = %58
  %65 = load i32, ptr %10, align 4, !tbaa !11
  %66 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 2
  %67 = load i32, ptr %66, align 8, !tbaa !23
  %68 = icmp eq i32 %65, %67
  br i1 %68, label %69, label %77

69:                                               ; preds = %64
  %70 = load i32, ptr %9, align 4, !tbaa !11
  %71 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 3
  %72 = load i32, ptr %71, align 4, !tbaa !29
  %73 = icmp eq i32 %70, %72
  br i1 %73, label %74, label %77

74:                                               ; preds = %69
  store i8 1, ptr %12, align 1, !tbaa !9
  %75 = load i32, ptr %9, align 4, !tbaa !11
  store i32 %75, ptr %5, align 4, !tbaa !11
  %76 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %76, ptr %6, align 4, !tbaa !11
  br label %77

77:                                               ; preds = %74, %69, %64
  br label %78

78:                                               ; preds = %77, %61
  %79 = load i8, ptr %4, align 1, !tbaa !9, !range !13, !noundef !14
  %80 = trunc i8 %79 to i1
  br i1 %80, label %81, label %105

81:                                               ; preds = %78
  %82 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 3
  %83 = load i32, ptr %82, align 4, !tbaa !29
  store i32 %83, ptr %5, align 4, !tbaa !11
  %84 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 2
  %85 = load i32, ptr %84, align 8, !tbaa !23
  %86 = add i32 %85, 1
  store i32 %86, ptr %6, align 4, !tbaa !11
  %87 = load i32, ptr %6, align 4, !tbaa !11
  %88 = icmp eq i32 %87, 1000000000
  br i1 %88, label %89, label %92

89:                                               ; preds = %81
  %90 = load i32, ptr %5, align 4, !tbaa !11
  %91 = add i32 %90, 1
  store i32 %91, ptr %5, align 4, !tbaa !11
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %92

92:                                               ; preds = %89, %81
  %93 = load i8, ptr @_ZZN7sc_core14vcd_trace_file5cycleEbE6warned, align 1, !tbaa !9, !range !13, !noundef !14
  %94 = trunc i8 %93 to i1
  br i1 %94, label %104, label %95

95:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %96 = getelementptr inbounds %"class.sc_core::sc_trace_file_base", ptr %27, i32 0, i32 2
  %97 = load double, ptr %96, align 8, !tbaa !15
  call void @_ZN7sc_core7sc_timeC1EdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(8) %14, double noundef %97, i32 noundef 5)
  call void @_ZNK7sc_core7sc_time9to_stringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %98 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 0, ptr noundef @_ZN7sc_core30SC_ID_TRACING_VCD_DELTA_CYCLE_E, ptr noundef %98, ptr noundef @.str.3, i32 noundef 1959)
          to label %99 unwind label %100

99:                                               ; preds = %95
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  store i8 1, ptr @_ZZN7sc_core14vcd_trace_file5cycleEbE6warned, align 1, !tbaa !9
  br label %104

100:                                              ; preds = %95
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %15, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  br label %272

104:                                              ; preds = %99, %92
  br label %105

105:                                              ; preds = %104, %78
  %106 = load i8, ptr %4, align 1, !tbaa !9, !range !13, !noundef !14
  %107 = trunc i8 %106 to i1
  br i1 %107, label %147, label %108

108:                                              ; preds = %105
  %109 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %147

111:                                              ; preds = %108
  %112 = load i32, ptr %9, align 4, !tbaa !11
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %117, label %114

114:                                              ; preds = %111
  %115 = load i32, ptr %10, align 4, !tbaa !11
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %147

117:                                              ; preds = %114, %111
  %118 = load i8, ptr @_ZZN7sc_core14vcd_trace_file5cycleEbE6warned_0, align 1, !tbaa !9, !range !13, !noundef !14
  %119 = trunc i8 %118 to i1
  br i1 %119, label %146, label %120

120:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 392, ptr %17) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17)
  %121 = getelementptr inbounds i8, ptr %17, i64 16
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef @.str.45)
          to label %123 unwind label %132

123:                                              ; preds = %120
  %124 = load i32, ptr %10, align 4, !tbaa !11
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %122, i32 noundef %124)
          to label %126 unwind label %132

126:                                              ; preds = %123
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef @.str.46)
          to label %128 unwind label %132

128:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(128) %17)
          to label %129 unwind label %136

129:                                              ; preds = %128
  %130 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef @_ZN7sc_core33SC_ID_TRACING_VCD_DUPLICATE_TIME_E, ptr noundef %130, ptr noundef @.str.3, i32 noundef 1977)
          to label %131 unwind label %140

131:                                              ; preds = %129
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %17) #6
  br label %146

132:                                              ; preds = %126, %123, %120
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %15, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %16, align 4
  br label %145

136:                                              ; preds = %128
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %15, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %16, align 4
  br label %144

140:                                              ; preds = %129
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %15, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  br label %144

144:                                              ; preds = %140, %136
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br label %145

145:                                              ; preds = %144, %132
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %17) #6
  br label %272

146:                                              ; preds = %131, %117
  br label %147

147:                                              ; preds = %146, %114, %108, %105
  %148 = load i8, ptr %4, align 1, !tbaa !9, !range !13, !noundef !14
  %149 = trunc i8 %148 to i1
  br i1 %149, label %192, label %150

150:                                              ; preds = %147
  %151 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %152 = trunc i8 %151 to i1
  br i1 %152, label %192, label %153

153:                                              ; preds = %150
  %154 = load i8, ptr %11, align 1, !tbaa !9, !range !13, !noundef !14
  %155 = trunc i8 %154 to i1
  br i1 %155, label %192, label %156

156:                                              ; preds = %153
  %157 = load i8, ptr @_ZZN7sc_core14vcd_trace_file5cycleEbE6warned_1, align 1, !tbaa !9, !range !13, !noundef !14
  %158 = trunc i8 %157 to i1
  br i1 %158, label %191, label %159

159:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 392, ptr %19) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %19)
  %160 = getelementptr inbounds i8, ptr %19, i64 16
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef @.str.47)
          to label %162 unwind label %177

162:                                              ; preds = %159
  %163 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 2
  %164 = load i32, ptr %163, align 8, !tbaa !23
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %161, i32 noundef %164)
          to label %166 unwind label %177

166:                                              ; preds = %162
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %165, ptr noundef @.str.48)
          to label %168 unwind label %177

168:                                              ; preds = %166
  %169 = load i32, ptr %10, align 4, !tbaa !11
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %167, i32 noundef %169)
          to label %171 unwind label %177

171:                                              ; preds = %168
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %170, ptr noundef @.str.49)
          to label %173 unwind label %177

173:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef nonnull align 8 dereferenceable(128) %19)
          to label %174 unwind label %181

174:                                              ; preds = %173
  %175 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef @_ZN7sc_core33SC_ID_TRACING_VCD_DUPLICATE_TIME_E, ptr noundef %175, ptr noundef @.str.3, i32 noundef 1997)
          to label %176 unwind label %185

176:                                              ; preds = %174
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %19) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %19) #6
  br label %191

177:                                              ; preds = %171, %168, %166, %162, %159
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %15, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %16, align 4
  br label %190

181:                                              ; preds = %173
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %15, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %16, align 4
  br label %189

185:                                              ; preds = %174
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %15, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  br label %189

189:                                              ; preds = %185, %181
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  br label %190

190:                                              ; preds = %189, %177
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %19) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %19) #6
  br label %272

191:                                              ; preds = %176, %156
  store i32 1, ptr %7, align 4
  br label %268

192:                                              ; preds = %153, %150, %147
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  store i8 0, ptr %21, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %193 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 4
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7sc_core9vcd_traceESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %193, i64 noundef 0) #6
  store ptr %194, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %195

195:                                              ; preds = %249, %192
  %196 = load i32, ptr %23, align 4, !tbaa !11
  %197 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 4
  %198 = call noundef i64 @_ZNKSt6vectorIPN7sc_core9vcd_traceESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %197) #6
  %199 = trunc i64 %198 to i32
  %200 = icmp slt i32 %196, %199
  br i1 %200, label %202, label %201

201:                                              ; preds = %195
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %252

202:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %203 = load ptr, ptr %22, align 8, !tbaa !5
  %204 = load i32, ptr %23, align 4, !tbaa !11
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds ptr, ptr %203, i64 %205
  %207 = load ptr, ptr %206, align 8, !tbaa !5
  store ptr %207, ptr %24, align 8, !tbaa !5
  %208 = load ptr, ptr %24, align 8, !tbaa !5
  %209 = load ptr, ptr %208, align 8, !tbaa !30
  %210 = getelementptr inbounds ptr, ptr %209, i64 2
  %211 = load ptr, ptr %210, align 8
  %212 = call noundef zeroext i1 %211(ptr noundef nonnull align 8 dereferenceable(84) %208)
  br i1 %212, label %213, label %248

213:                                              ; preds = %202
  %214 = load i8, ptr %21, align 1, !tbaa !9, !range !13, !noundef !14
  %215 = trunc i8 %214 to i1
  %216 = zext i1 %215 to i32
  %217 = icmp eq i32 %216, 0
  br i1 %217, label %218, label %238

218:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 200, ptr %25) #6
  %219 = load i32, ptr %5, align 4, !tbaa !11
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %226

221:                                              ; preds = %218
  %222 = getelementptr inbounds [200 x i8], ptr %25, i64 0, i64 0
  %223 = load i32, ptr %5, align 4, !tbaa !11
  %224 = load i32, ptr %6, align 4, !tbaa !11
  %225 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %222, ptr noundef @.str.50, i32 noundef %223, i32 noundef %224) #6
  br label %230

226:                                              ; preds = %218
  %227 = getelementptr inbounds [200 x i8], ptr %25, i64 0, i64 0
  %228 = load i32, ptr %6, align 4, !tbaa !11
  %229 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %227, ptr noundef @.str.51, i32 noundef %228) #6
  br label %230

230:                                              ; preds = %226, %221
  %231 = getelementptr inbounds [200 x i8], ptr %25, i64 0, i64 0
  %232 = getelementptr inbounds %"class.sc_core::sc_trace_file_base", ptr %27, i32 0, i32 1
  %233 = load ptr, ptr %232, align 8, !tbaa !32
  %234 = call i32 @fputs(ptr noundef %231, ptr noundef %233)
  %235 = getelementptr inbounds %"class.sc_core::sc_trace_file_base", ptr %27, i32 0, i32 1
  %236 = load ptr, ptr %235, align 8, !tbaa !32
  %237 = call i32 @fputc(i32 noundef 10, ptr noundef %236)
  store i8 1, ptr %21, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 200, ptr %25) #6
  br label %238

238:                                              ; preds = %230, %213
  %239 = load ptr, ptr %24, align 8, !tbaa !5
  %240 = getelementptr inbounds %"class.sc_core::sc_trace_file_base", ptr %27, i32 0, i32 1
  %241 = load ptr, ptr %240, align 8, !tbaa !32
  %242 = load ptr, ptr %239, align 8, !tbaa !30
  %243 = getelementptr inbounds ptr, ptr %242, i64 0
  %244 = load ptr, ptr %243, align 8
  call void %244(ptr noundef nonnull align 8 dereferenceable(84) %239, ptr noundef %241)
  %245 = getelementptr inbounds %"class.sc_core::sc_trace_file_base", ptr %27, i32 0, i32 1
  %246 = load ptr, ptr %245, align 8, !tbaa !32
  %247 = call i32 @fputc(i32 noundef 10, ptr noundef %246)
  br label %248

248:                                              ; preds = %238, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %249

249:                                              ; preds = %248
  %250 = load i32, ptr %23, align 4, !tbaa !11
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %23, align 4, !tbaa !11
  br label %195, !llvm.loop !33

252:                                              ; preds = %201
  %253 = load i8, ptr %21, align 1, !tbaa !9, !range !13, !noundef !14
  %254 = trunc i8 %253 to i1
  br i1 %254, label %255, label %259

255:                                              ; preds = %252
  %256 = getelementptr inbounds %"class.sc_core::sc_trace_file_base", ptr %27, i32 0, i32 1
  %257 = load ptr, ptr %256, align 8, !tbaa !32
  %258 = call i32 @fputc(i32 noundef 10, ptr noundef %257)
  br label %259

259:                                              ; preds = %255, %252
  %260 = load i8, ptr %21, align 1, !tbaa !9, !range !13, !noundef !14
  %261 = trunc i8 %260 to i1
  br i1 %261, label %262, label %267

262:                                              ; preds = %259
  %263 = load i32, ptr %5, align 4, !tbaa !11
  %264 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 3
  store i32 %263, ptr %264, align 4, !tbaa !29
  %265 = load i32, ptr %6, align 4, !tbaa !11
  %266 = getelementptr inbounds %"class.sc_core::vcd_trace_file", ptr %27, i32 0, i32 2
  store i32 %265, ptr %266, align 8, !tbaa !23
  br label %267

267:                                              ; preds = %262, %259
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  store i32 0, ptr %7, align 4
  br label %268

268:                                              ; preds = %267, %191
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %269

269:                                              ; preds = %268, %35, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %270 = load i32, ptr %7, align 4
  switch i32 %270, label %278 [
    i32 0, label %271
    i32 1, label %271
  ]

271:                                              ; preds = %269, %269
  ret void

272:                                              ; preds = %190, %145, %100
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %273

273:                                              ; preds = %272
  %274 = load ptr, ptr %15, align 8
  %275 = load i32, ptr %16, align 4
  %276 = insertvalue { ptr, i32 } poison, ptr %274, 0
  %277 = insertvalue { ptr, i32 } %276, i32 %275, 1
  resume { ptr, i32 } %277

278:                                              ; preds = %269
  unreachable
}

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

declare noundef zeroext i1 @_ZN7sc_core18sc_trace_file_base10initializeEv(ptr noundef nonnull align 8 dereferenceable(66)) #1

declare void @_ZNK7sc_core7sc_time9to_stringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4 align 2

attributes #0 = { 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 #1 = { "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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!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 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !18, i64 16}
!16 = !{!"_ZTSN7sc_core18sc_trace_file_baseE", !17, i64 0, !6, i64 8, !18, i64 16, !10, i64 24, !19, i64 32, !10, i64 64, !10, i64 65}
!17 = !{!"_ZTSN7sc_core13sc_trace_fileE"}
!18 = !{!"double", !7, i64 0}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!18, !18, i64 0}
!23 = !{!24, !12, i64 72}
!24 = !{!"_ZTSN7sc_core14vcd_trace_fileE", !16, i64 0, !12, i64 68, !12, i64 72, !12, i64 76, !25, i64 80}
!25 = !{!"_ZTSSt6vectorIPN7sc_core9vcd_traceESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9vcd_traceESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9vcd_traceESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9vcd_traceESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!24, !12, i64 76}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !8, i64 0}
!32 = !{!16, !6, i64 8}
!33 = distinct !{!33, !34}
!34 = !{!"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.sc_core::sc_time" = type { i64 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }

@.str.3 = external hidden unnamed_addr constant [89 x i8], align 1
@_ZZN7sc_core14vcd_trace_file5cycleEbE6warned = external hidden local_unnamed_addr global i8, align 1
@_ZN7sc_core30SC_ID_TRACING_VCD_DELTA_CYCLE_E = external constant [0 x i8], align 1
@_ZZN7sc_core14vcd_trace_file5cycleEbE6warned_0 = external hidden local_unnamed_addr global i8, align 1
@.str.45 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [150 x i8], align 1
@_ZN7sc_core33SC_ID_TRACING_VCD_DUPLICATE_TIME_E = external constant [0 x i8], align 1
@_ZZN7sc_core14vcd_trace_file5cycleEbE6warned_1 = external hidden local_unnamed_addr global i8, align 1
@.str.47 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [179 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [4 x i8], align 1

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 #0 align 2

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 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: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #4 align 2

; 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 #5

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #0 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fputc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #3

declare void @_ZN7sc_core7sc_timeC1EdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(8), double noundef, i32 noundef) unnamed_addr #1

declare noundef double @_ZNK7sc_core7sc_time10to_secondsEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv() local_unnamed_addr #1

declare void @_ZN7sc_core23double_to_special_int64EdPjS0_(double noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7sc_core14vcd_trace_file5cycleEb(ptr noundef nonnull align 8 dereferenceable(104) %0, i1 noundef zeroext %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.sc_core::sc_time", align 8
  %7 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca [200 x i8], align 16
  %12 = tail call noundef zeroext i1 @_ZNK7sc_core18sc_trace_file_base12delta_cyclesEv(ptr noundef nonnull align 8 dereferenceable(66) %0)
  %.not55 = xor i1 %1, true
  %brmerge = or i1 %12, %.not55
  br i1 %brmerge, label %13, label %163

13:                                               ; preds = %2
  %14 = tail call noundef zeroext i1 @_ZN7sc_core18sc_trace_file_base10initializeEv(ptr noundef nonnull align 8 dereferenceable(66) %0)
  br i1 %14, label %163, label %15

15:                                               ; preds = %13
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv()
  %17 = tail call noundef double @_ZNK7sc_core7sc_time10to_secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %16)
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load double, ptr %18, align 8, !tbaa !5
  %20 = fdiv double %17, %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @_ZN7sc_core23double_to_special_int64EdPjS0_(double noundef %20, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %21 = load i32, ptr %4, align 4
  %22 = getelementptr inbounds i8, ptr %0, i64 72
  %23 = load i32, ptr %22, align 8, !tbaa !16
  %24 = icmp ugt i32 %21, %23
  %.pre = load i32, ptr %3, align 4, !tbaa !23
  %25 = getelementptr inbounds i8, ptr %0, i64 76
  %26 = load i32, ptr %25, align 4, !tbaa !24
  %27 = icmp eq i32 %.pre, %26
  %or.cond = select i1 %24, i1 %27, i1 false
  br i1 %or.cond, label %32, label %._crit_edge82

._crit_edge82:                                    ; preds = %15
  %28 = icmp ugt i32 %.pre, %26
  br i1 %28, label %32, label %29

29:                                               ; preds = %._crit_edge82
  %30 = icmp eq i32 %21, %23
  %31 = icmp eq i32 %.pre, %26
  %or.cond114 = select i1 %30, i1 %31, i1 false
  br i1 %or.cond114, label %.thread, label %32

32:                                               ; preds = %15, %._crit_edge82, %29
  %33 = phi i32 [ %26, %29 ], [ %26, %._crit_edge82 ], [ %.pre, %15 ]
  %.04561 = phi i1 [ false, %29 ], [ true, %._crit_edge82 ], [ true, %15 ]
  %.030 = phi i32 [ 0, %29 ], [ %21, %._crit_edge82 ], [ %21, %15 ]
  %.0 = phi i32 [ 0, %29 ], [ %.pre, %._crit_edge82 ], [ %.pre, %15 ]
  br i1 %1, label %34, label %72

.thread:                                          ; preds = %29
  br i1 %1, label %34, label %47

34:                                               ; preds = %.thread, %32
  %35 = phi i32 [ %.pre, %.thread ], [ %33, %32 ]
  %36 = add i32 %23, 1
  %37 = icmp eq i32 %36, 1000000000
  %spec.select = select i1 %37, i32 0, i32 %36
  %38 = zext i1 %37 to i32
  %spec.select56 = add i32 %35, %38
  %39 = load i8, ptr @_ZZN7sc_core14vcd_trace_file5cycleEbE6warned, align 1, !tbaa !25, !range !26, !noundef !27
  %40 = trunc nuw i8 %39 to i1
  br i1 %40, label %.thread70, label %41

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %42 = load double, ptr %18, align 8, !tbaa !5
  call void @_ZN7sc_core7sc_timeC1EdNS_12sc_time_unitE(ptr noundef nonnull align 8 dereferenceable(8) %6, double noundef %42, i32 noundef 5)
  call void @_ZNK7sc_core7sc_time9to_stringB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %43 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 0, ptr noundef nonnull @_ZN7sc_core30SC_ID_TRACING_VCD_DELTA_CYCLE_E, ptr noundef %43, ptr noundef nonnull @.str.3, i32 noundef 1959)
          to label %44 unwind label %45

44:                                               ; preds = %41
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  store i8 1, ptr @_ZZN7sc_core14vcd_trace_file5cycleEbE6warned, align 1, !tbaa !25
  br label %.thread70

45:                                               ; preds = %41
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %164

47:                                               ; preds = %.thread
  %48 = or i32 %.pre, %21
  %or.cond.not = icmp eq i32 %48, 0
  br i1 %or.cond.not, label %.thread70, label %49

49:                                               ; preds = %47
  %50 = load i8, ptr @_ZZN7sc_core14vcd_trace_file5cycleEbE6warned_0, align 1, !tbaa !25, !range !26, !noundef !27
  %51 = trunc nuw i8 %50 to i1
  br i1 %51, label %.thread70, label %52

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7)
  %53 = getelementptr inbounds i8, ptr %7, i64 16
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @.str.45)
          to label %55 unwind label %64

55:                                               ; preds = %52
  %56 = load i32, ptr %4, align 4, !tbaa !23
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %54, i32 noundef %56)
          to label %58 unwind label %64

58:                                               ; preds = %55
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @.str.46)
          to label %60 unwind label %64

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(128) %7)
          to label %61 unwind label %66

61:                                               ; preds = %60
  %62 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef nonnull @_ZN7sc_core33SC_ID_TRACING_VCD_DUPLICATE_TIME_E, ptr noundef %62, ptr noundef nonnull @.str.3, i32 noundef 1977)
          to label %63 unwind label %68

63:                                               ; preds = %61
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %7) #6
  br label %.thread70

64:                                               ; preds = %58, %55, %52
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %71

66:                                               ; preds = %60
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %70

68:                                               ; preds = %61
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %70

70:                                               ; preds = %68, %66
  %.pn = phi { ptr, i32 } [ %69, %68 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %71

71:                                               ; preds = %70, %64
  %.pn.pn = phi { ptr, i32 } [ %.pn, %70 ], [ %65, %64 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %7) #6
  br label %164

72:                                               ; preds = %32
  br i1 %.04561, label %.thread70, label %73

73:                                               ; preds = %72
  %74 = load i8, ptr @_ZZN7sc_core14vcd_trace_file5cycleEbE6warned_1, align 1, !tbaa !25, !range !26, !noundef !27
  %75 = trunc nuw i8 %74 to i1
  br i1 %75, label %.critedge, label %76

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9)
  %77 = getelementptr inbounds i8, ptr %9, i64 16
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @.str.47)
          to label %79 unwind label %93

79:                                               ; preds = %76
  %80 = load i32, ptr %22, align 8, !tbaa !16
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %78, i32 noundef %80)
          to label %82 unwind label %93

82:                                               ; preds = %79
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull @.str.48)
          to label %84 unwind label %93

84:                                               ; preds = %82
  %85 = load i32, ptr %4, align 4, !tbaa !23
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %83, i32 noundef %85)
          to label %87 unwind label %93

87:                                               ; preds = %84
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull @.str.49)
          to label %89 unwind label %93

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(128) %9)
          to label %90 unwind label %95

90:                                               ; preds = %89
  %91 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef nonnull @_ZN7sc_core33SC_ID_TRACING_VCD_DUPLICATE_TIME_E, ptr noundef %91, ptr noundef nonnull @.str.3, i32 noundef 1997)
          to label %92 unwind label %97

92:                                               ; preds = %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #6
  br label %.critedge

93:                                               ; preds = %87, %84, %82, %79, %76
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %100

95:                                               ; preds = %89
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %99

97:                                               ; preds = %90
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %99

99:                                               ; preds = %97, %95
  %.pn51 = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %100

100:                                              ; preds = %99, %93
  %.pn51.pn = phi { ptr, i32 } [ %.pn51, %99 ], [ %94, %93 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #6
  br label %164

.thread70:                                        ; preds = %47, %63, %49, %34, %44, %72
  %.2326876 = phi i32 [ %.030, %72 ], [ %spec.select, %44 ], [ %spec.select, %34 ], [ %21, %49 ], [ %21, %63 ], [ %21, %47 ]
  %.26975 = phi i32 [ %.0, %72 ], [ %spec.select56, %44 ], [ %spec.select56, %34 ], [ %.pre, %49 ], [ %.pre, %63 ], [ %.pre, %47 ]
  %.26975.fr = freeze i32 %.26975
  %101 = getelementptr inbounds i8, ptr %0, i64 80
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7sc_core9vcd_traceESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef 0) #6
  %103 = call noundef i64 @_ZNKSt6vectorIPN7sc_core9vcd_traceESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #6
  %104 = trunc i64 %103 to i32
  %105 = icmp sgt i32 %104, 0
  br i1 %105, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.thread70
  %.not = icmp eq i32 %.26975.fr, 0
  %106 = getelementptr inbounds i8, ptr %0, i64 8
  br i1 %.not, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %128
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %128 ], [ 0, %.lr.ph ]
  %.03377.us = phi i8 [ %.235.us, %128 ], [ 0, %.lr.ph ]
  %107 = getelementptr inbounds ptr, ptr %102, i64 %indvars.iv80
  %108 = load ptr, ptr %107, align 8, !tbaa !28
  %109 = load ptr, ptr %108, align 8, !tbaa !29
  %110 = getelementptr inbounds i8, ptr %109, i64 16
  %111 = load ptr, ptr %110, align 8
  %112 = call noundef zeroext i1 %111(ptr noundef nonnull align 8 dereferenceable(84) %108)
  br i1 %112, label %113, label %128

113:                                              ; preds = %.lr.ph.split.us
  %114 = and i8 %.03377.us, 1
  %115 = icmp eq i8 %114, 0
  br i1 %115, label %116, label %122

116:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %11) #6
  %117 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) @.str.51, i32 noundef %.2326876) #6
  %118 = load ptr, ptr %106, align 8, !tbaa !31
  %119 = call i32 @fputs(ptr noundef nonnull %11, ptr noundef %118)
  %120 = load ptr, ptr %106, align 8, !tbaa !31
  %121 = call i32 @fputc(i32 noundef 10, ptr noundef %120)
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %11) #6
  br label %122

122:                                              ; preds = %116, %113
  %.134.us = phi i8 [ 1, %116 ], [ %.03377.us, %113 ]
  %123 = load ptr, ptr %106, align 8, !tbaa !31
  %124 = load ptr, ptr %108, align 8, !tbaa !29
  %125 = load ptr, ptr %124, align 8
  call void %125(ptr noundef nonnull align 8 dereferenceable(84) %108, ptr noundef %123)
  %126 = load ptr, ptr %106, align 8, !tbaa !31
  %127 = call i32 @fputc(i32 noundef 10, ptr noundef %126)
  br label %128

128:                                              ; preds = %122, %.lr.ph.split.us
  %.235.us = phi i8 [ %.134.us, %122 ], [ %.03377.us, %.lr.ph.split.us ]
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %129 = call noundef i64 @_ZNKSt6vectorIPN7sc_core9vcd_traceESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #6
  %sext84 = shl i64 %129, 32
  %130 = ashr exact i64 %sext84, 32
  %131 = icmp slt i64 %indvars.iv.next81, %130
  br i1 %131, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !32

._crit_edge:                                      ; preds = %154, %128
  %.033.lcssa = phi i8 [ %.235.us, %128 ], [ %.235, %154 ]
  %132 = trunc nuw i8 %.033.lcssa to i1
  br i1 %132, label %158, label %.critedge

.lr.ph.split:                                     ; preds = %.lr.ph, %154
  %indvars.iv = phi i64 [ %indvars.iv.next, %154 ], [ 0, %.lr.ph ]
  %.03377 = phi i8 [ %.235, %154 ], [ 0, %.lr.ph ]
  %133 = getelementptr inbounds ptr, ptr %102, i64 %indvars.iv
  %134 = load ptr, ptr %133, align 8, !tbaa !28
  %135 = load ptr, ptr %134, align 8, !tbaa !29
  %136 = getelementptr inbounds i8, ptr %135, i64 16
  %137 = load ptr, ptr %136, align 8
  %138 = call noundef zeroext i1 %137(ptr noundef nonnull align 8 dereferenceable(84) %134)
  br i1 %138, label %139, label %154

139:                                              ; preds = %.lr.ph.split
  %140 = and i8 %.03377, 1
  %141 = icmp eq i8 %140, 0
  br i1 %141, label %142, label %148

142:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %11) #6
  %143 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) @.str.50, i32 noundef %.26975.fr, i32 noundef %.2326876) #6
  %144 = load ptr, ptr %106, align 8, !tbaa !31
  %145 = call i32 @fputs(ptr noundef nonnull %11, ptr noundef %144)
  %146 = load ptr, ptr %106, align 8, !tbaa !31
  %147 = call i32 @fputc(i32 noundef 10, ptr noundef %146)
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %11) #6
  br label %148

148:                                              ; preds = %142, %139
  %.134 = phi i8 [ 1, %142 ], [ %.03377, %139 ]
  %149 = load ptr, ptr %106, align 8, !tbaa !31
  %150 = load ptr, ptr %134, align 8, !tbaa !29
  %151 = load ptr, ptr %150, align 8
  call void %151(ptr noundef nonnull align 8 dereferenceable(84) %134, ptr noundef %149)
  %152 = load ptr, ptr %106, align 8, !tbaa !31
  %153 = call i32 @fputc(i32 noundef 10, ptr noundef %152)
  br label %154

154:                                              ; preds = %148, %.lr.ph.split
  %.235 = phi i8 [ %.134, %148 ], [ %.03377, %.lr.ph.split ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %155 = call noundef i64 @_ZNKSt6vectorIPN7sc_core9vcd_traceESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #6
  %sext = shl i64 %155, 32
  %156 = ashr exact i64 %sext, 32
  %157 = icmp slt i64 %indvars.iv.next, %156
  br i1 %157, label %.lr.ph.split, label %._crit_edge, !llvm.loop !32

158:                                              ; preds = %._crit_edge
  %159 = getelementptr inbounds i8, ptr %0, i64 8
  %160 = load ptr, ptr %159, align 8, !tbaa !31
  %161 = call i32 @fputc(i32 noundef 10, ptr noundef %160)
  %162 = getelementptr inbounds i8, ptr %0, i64 76
  store i32 %.26975.fr, ptr %162, align 4, !tbaa !24
  store i32 %.2326876, ptr %22, align 8, !tbaa !16
  br label %.critedge

.critedge:                                        ; preds = %.thread70, %158, %._crit_edge, %73, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %163

163:                                              ; preds = %13, %2, %.critedge
  ret void

164:                                              ; preds = %100, %71, %45
  %.pn51.pn.pn = phi { ptr, i32 } [ %.pn51.pn, %100 ], [ %.pn.pn, %71 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn51.pn.pn
}

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

declare noundef zeroext i1 @_ZN7sc_core18sc_trace_file_base10initializeEv(ptr noundef nonnull align 8 dereferenceable(66)) local_unnamed_addr #1

declare void @_ZNK7sc_core7sc_time9to_stringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { "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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!6, !11, i64 16}
!6 = !{!"_ZTSN7sc_core18sc_trace_file_baseE", !7, i64 0, !8, i64 8, !11, i64 16, !12, i64 24, !13, i64 32, !12, i64 64, !12, i64 65}
!7 = !{!"_ZTSN7sc_core13sc_trace_fileE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !9, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !8, i64 0}
!15 = !{!"long", !9, i64 0}
!16 = !{!17, !18, i64 72}
!17 = !{!"_ZTSN7sc_core14vcd_trace_fileE", !6, i64 0, !18, i64 68, !18, i64 72, !18, i64 76, !19, i64 80}
!18 = !{!"int", !9, i64 0}
!19 = !{!"_ZTSSt6vectorIPN7sc_core9vcd_traceESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9vcd_traceESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9vcd_traceESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9vcd_traceESaIS2_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!23 = !{!18, !18, i64 0}
!24 = !{!17, !18, i64 76}
!25 = !{!12, !12, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!8, !8, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !10, i64 0}
!31 = !{!6, !8, i64 8}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass