; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/kernel (sc_time)

; 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.sc_core::sc_simcontext" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"struct.sc_core::sc_curr_proc_info", ptr, i8, i32, %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.0", ptr, %"class.std::vector.10", i8, ptr, ptr, ptr, %"class.sc_core::sc_time", %"class.sc_core::sc_time", ptr, i64, i64, i8, i8, i8, i8, i32, ptr, i8, i8, i32, i8, ptr, ptr }
%"struct.sc_core::sc_curr_proc_info" = type <{ ptr, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<sc_core::sc_trace_file *, std::allocator<sc_core::sc_trace_file *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_trace_file *, std::allocator<sc_core::sc_trace_file *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_trace_file *, std::allocator<sc_core::sc_trace_file *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_trace_file *, std::allocator<sc_core::sc_trace_file *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_time" = type { i64 }
%"struct.sc_core::sc_time_params" = type <{ double, i8, i8, [6 x i8], i64, i8, [7 x i8] }>

@_ZN7sc_coreL11time_valuesE = external hidden global [6 x double], align 16
@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E = external constant [0 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@_ZN7sc_core32SC_ID_DEFAULT_TIME_UNIT_CHANGED_E = external constant [0 x i8], align 1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv() #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN5sc_dt16uint64_to_doubleEy(i64 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7sc_core22sc_set_time_resolutionEdNS_12sc_time_unitE(double noundef %0, i32 noundef %1) #3 {
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  store double %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %10 = load double, ptr %3, align 8, !tbaa !5
  %11 = fcmp olt double %10, 0.000000e+00
  br i1 %11, label %12, label %13

12:                                               ; preds = %2
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 282)
  br label %13

13:                                               ; preds = %12, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %14 = load double, ptr %3, align 8, !tbaa !5
  %15 = call double @log10(double noundef %14) #6
  %16 = call double @modf(double noundef %15, ptr noundef %5) #6
  %17 = fcmp une double %16, 0.000000e+00
  br i1 %17, label %18, label %19

18:                                               ; preds = %13
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 294)
  br label %19

19:                                               ; preds = %18, %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %20 = call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  store ptr %20, ptr %6, align 8, !tbaa !11
  %21 = call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  %22 = call noundef zeroext i1 @_ZN7sc_core13sc_is_runningEPKNS_13sc_simcontextE(ptr noundef %21)
  br i1 %22, label %23, label %24

23:                                               ; preds = %19
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 301)
  br label %24

24:                                               ; preds = %23, %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %25 = load ptr, ptr %6, align 8, !tbaa !11
  %26 = getelementptr inbounds %"class.sc_core::sc_simcontext", ptr %25, i32 0, i32 21
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  store ptr %27, ptr %7, align 8, !tbaa !11
  %28 = load ptr, ptr %7, align 8, !tbaa !11
  %29 = getelementptr inbounds %"struct.sc_core::sc_time_params", ptr %28, i32 0, i32 1
  %30 = load i8, ptr %29, align 8, !tbaa !39, !range !41, !noundef !42
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %33

32:                                               ; preds = %24
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 308)
  br label %33

33:                                               ; preds = %32, %24
  %34 = load ptr, ptr %7, align 8, !tbaa !11
  %35 = getelementptr inbounds %"struct.sc_core::sc_time_params", ptr %34, i32 0, i32 2
  %36 = load i8, ptr %35, align 1, !tbaa !43, !range !41, !noundef !42
  %37 = trunc i8 %36 to i1
  br i1 %37, label %38, label %39

38:                                               ; preds = %33
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 314)
  br label %39

39:                                               ; preds = %38, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %40 = load double, ptr %3, align 8, !tbaa !5
  %41 = load i32, ptr %4, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds [6 x double], ptr @_ZN7sc_coreL11time_valuesE, i64 0, i64 %42
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = fmul double %40, %44
  store volatile double %45, ptr %8, align 8, !tbaa !5
  %46 = load volatile double, ptr %8, align 8, !tbaa !5
  %47 = fcmp olt double %46, 1.000000e+00
  br i1 %47, label %48, label %49

48:                                               ; preds = %39
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 321)
  br label %49

49:                                               ; preds = %48, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %50 = load ptr, ptr %7, align 8, !tbaa !11
  %51 = getelementptr inbounds %"struct.sc_core::sc_time_params", ptr %50, i32 0, i32 4
  %52 = load i64, ptr %51, align 8, !tbaa !44
  %53 = call noundef double @_ZN5sc_dt16uint64_to_doubleEy(i64 noundef %52)
  %54 = load ptr, ptr %7, align 8, !tbaa !11
  %55 = getelementptr inbounds %"struct.sc_core::sc_time_params", ptr %54, i32 0, i32 0
  %56 = load double, ptr %55, align 8, !tbaa !45
  %57 = load volatile double, ptr %8, align 8, !tbaa !5
  %58 = fdiv double %56, %57
  %59 = fmul double %53, %58
  store volatile double %59, ptr %9, align 8, !tbaa !5
  %60 = load volatile double, ptr %9, align 8, !tbaa !5
  %61 = fcmp olt double %60, 1.000000e+00
  br i1 %61, label %62, label %65

62:                                               ; preds = %49
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef @_ZN7sc_core32SC_ID_DEFAULT_TIME_UNIT_CHANGED_E, ptr noundef null, ptr noundef @.str.1, i32 noundef 329)
  %63 = load ptr, ptr %7, align 8, !tbaa !11
  %64 = getelementptr inbounds %"struct.sc_core::sc_time_params", ptr %63, i32 0, i32 4
  store i64 1, ptr %64, align 8, !tbaa !44
  br label %70

65:                                               ; preds = %49
  %66 = load volatile double, ptr %9, align 8, !tbaa !5
  %67 = fptosi double %66 to i64
  %68 = load ptr, ptr %7, align 8, !tbaa !11
  %69 = getelementptr inbounds %"struct.sc_core::sc_time_params", ptr %68, i32 0, i32 4
  store i64 %67, ptr %69, align 8, !tbaa !44
  br label %70

70:                                               ; preds = %65, %62
  %71 = load volatile double, ptr %8, align 8, !tbaa !5
  %72 = load ptr, ptr %7, align 8, !tbaa !11
  %73 = getelementptr inbounds %"struct.sc_core::sc_time_params", ptr %72, i32 0, i32 0
  store double %71, ptr %73, align 8, !tbaa !45
  %74 = load ptr, ptr %7, align 8, !tbaa !11
  %75 = getelementptr inbounds %"struct.sc_core::sc_time_params", ptr %74, i32 0, i32 1
  store i8 1, ptr %75, align 8, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

; Function Attrs: nounwind
declare double @modf(double noundef, ptr noundef) #4

; Function Attrs: nounwind
declare double @log10(double noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7sc_core13sc_is_runningEPKNS_13sc_simcontextE(ptr noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN7sc_core12sc_time_unitE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 248}
!14 = !{!"_ZTSN7sc_core13sc_simcontextE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !15, i64 64, !12, i64 80, !17, i64 88, !18, i64 92, !19, i64 96, !23, i64 120, !27, i64 144, !23, i64 168, !12, i64 192, !31, i64 200, !17, i64 224, !12, i64 232, !12, i64 240, !12, i64 248, !35, i64 256, !35, i64 264, !12, i64 272, !36, i64 280, !36, i64 288, !17, i64 296, !17, i64 297, !17, i64 298, !17, i64 299, !37, i64 300, !12, i64 304, !17, i64 312, !17, i64 313, !38, i64 316, !17, i64 320, !12, i64 328, !12, i64 336}
!15 = !{!"_ZTSN7sc_core17sc_curr_proc_infoE", !12, i64 0, !16, i64 8}
!16 = !{!"_ZTSN7sc_core17sc_curr_proc_kindE", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIPN7sc_core17sc_thread_processESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPN7sc_core17sc_thread_processESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core17sc_thread_processESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core17sc_thread_processESaIS2_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!23 = !{!"_ZTSSt6vectorIPN7sc_core8sc_eventESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!27 = !{!"_ZTSSt6vectorIPN7sc_core9sc_objectESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!31 = !{!"_ZTSSt6vectorIPN7sc_core13sc_trace_fileESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPN7sc_core13sc_trace_fileESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core13sc_trace_fileESaIS2_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core13sc_trace_fileESaIS2_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!35 = !{!"_ZTSN7sc_core7sc_timeE", !36, i64 0}
!36 = !{!"long long", !7, i64 0}
!37 = !{!"_ZTSN7sc_core13sc_simcontext16execution_phasesE", !7, i64 0}
!38 = !{!"_ZTSN7sc_core9sc_statusE", !7, i64 0}
!39 = !{!40, !17, i64 8}
!40 = !{!"_ZTSN7sc_core14sc_time_paramsE", !6, i64 0, !17, i64 8, !17, i64 9, !36, i64 16, !17, i64 24}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{!40, !17, i64 9}
!44 = !{!40, !36, i64 16}
!45 = !{!40, !6, i64 0}


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

@_ZN7sc_coreL11time_valuesE = external hidden local_unnamed_addr global [6 x double], align 16
@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E = external constant [0 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@_ZN7sc_core32SC_ID_DEFAULT_TIME_UNIT_CHANGED_E = external constant [0 x i8], align 1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv() local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN5sc_dt16uint64_to_doubleEy(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7sc_core22sc_set_time_resolutionEdNS_12sc_time_unitE(double noundef %0, i32 noundef %1) local_unnamed_addr #3 {
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = fcmp olt double %0, 0.000000e+00
  br i1 %6, label %7, label %8

7:                                                ; preds = %2
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 282)
  br label %8

8:                                                ; preds = %7, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %9 = tail call double @log10(double noundef %0) #7
  %10 = call double @modf(double noundef %9, ptr noundef nonnull %3) #7
  %11 = fcmp une double %10, 0.000000e+00
  br i1 %11, label %12, label %13

12:                                               ; preds = %8
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 294)
  br label %13

13:                                               ; preds = %12, %8
  %14 = tail call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  %15 = tail call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  %16 = tail call noundef zeroext i1 @_ZN7sc_core13sc_is_runningEPKNS_13sc_simcontextE(ptr noundef %15)
  br i1 %16, label %17, label %18

17:                                               ; preds = %13
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 301)
  br label %18

18:                                               ; preds = %17, %13
  %19 = getelementptr inbounds i8, ptr %14, i64 248
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = load i8, ptr %21, align 8, !tbaa !34, !range !37, !noundef !38
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %24, label %25

24:                                               ; preds = %18
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 308)
  br label %25

25:                                               ; preds = %24, %18
  %26 = getelementptr inbounds i8, ptr %20, i64 9
  %27 = load i8, ptr %26, align 1, !tbaa !39, !range !37, !noundef !38
  %28 = trunc nuw i8 %27 to i1
  br i1 %28, label %29, label %30

29:                                               ; preds = %25
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 314)
  br label %30

30:                                               ; preds = %29, %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4)
  %31 = zext i32 %1 to i64
  %32 = getelementptr inbounds [6 x double], ptr @_ZN7sc_coreL11time_valuesE, i64 0, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !40
  %34 = fmul double %33, %0
  store volatile double %34, ptr %4, align 8, !tbaa !40
  %.0..0..0..0.2 = load volatile double, ptr %4, align 8, !tbaa !40
  %35 = fcmp olt double %.0..0..0..0.2, 1.000000e+00
  br i1 %35, label %36, label %37

36:                                               ; preds = %30
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core26SC_ID_SET_TIME_RESOLUTION_E, ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 321)
  br label %37

37:                                               ; preds = %36, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5)
  %38 = getelementptr inbounds i8, ptr %20, i64 16
  %39 = load i64, ptr %38, align 8, !tbaa !41
  %40 = tail call noundef double @_ZN5sc_dt16uint64_to_doubleEy(i64 noundef %39)
  %41 = load double, ptr %20, align 8, !tbaa !42
  %.0..0..0..0.3 = load volatile double, ptr %4, align 8, !tbaa !40
  %42 = fdiv double %41, %.0..0..0..0.3
  %43 = fmul double %40, %42
  store volatile double %43, ptr %5, align 8, !tbaa !40
  %.0..0..0..0. = load volatile double, ptr %5, align 8, !tbaa !40
  %44 = fcmp olt double %.0..0..0..0., 1.000000e+00
  br i1 %44, label %45, label %46

45:                                               ; preds = %37
  tail call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef nonnull @_ZN7sc_core32SC_ID_DEFAULT_TIME_UNIT_CHANGED_E, ptr noundef null, ptr noundef nonnull @.str.1, i32 noundef 329)
  br label %48

46:                                               ; preds = %37
  %.0..0..0..0.1 = load volatile double, ptr %5, align 8, !tbaa !40
  %47 = fptosi double %.0..0..0..0.1 to i64
  br label %48

48:                                               ; preds = %46, %45
  %storemerge = phi i64 [ %47, %46 ], [ 1, %45 ]
  store i64 %storemerge, ptr %38, align 8, !tbaa !41
  %.0..0..0..0.4 = load volatile double, ptr %4, align 8, !tbaa !40
  store double %.0..0..0..0.4, ptr %20, align 8, !tbaa !42
  store i8 1, ptr %21, align 8, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: write)
declare double @modf(double noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log10(double noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7sc_core13sc_is_runningEPKNS_13sc_simcontextE(ptr noundef) local_unnamed_addr #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 248}
!6 = !{!"_ZTSN7sc_core13sc_simcontextE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 80, !12, i64 88, !13, i64 92, !14, i64 96, !18, i64 120, !22, i64 144, !18, i64 168, !7, i64 192, !26, i64 200, !12, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !30, i64 256, !30, i64 264, !7, i64 272, !31, i64 280, !31, i64 288, !12, i64 296, !12, i64 297, !12, i64 298, !12, i64 299, !32, i64 300, !7, i64 304, !12, i64 312, !12, i64 313, !33, i64 316, !12, i64 320, !7, i64 328, !7, i64 336}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN7sc_core17sc_curr_proc_infoE", !7, i64 0, !11, i64 8}
!11 = !{!"_ZTSN7sc_core17sc_curr_proc_kindE", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSSt6vectorIPN7sc_core17sc_thread_processESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN7sc_core17sc_thread_processESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core17sc_thread_processESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core17sc_thread_processESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!18 = !{!"_ZTSSt6vectorIPN7sc_core8sc_eventESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!22 = !{!"_ZTSSt6vectorIPN7sc_core9sc_objectESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!26 = !{!"_ZTSSt6vectorIPN7sc_core13sc_trace_fileESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIPN7sc_core13sc_trace_fileESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core13sc_trace_fileESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core13sc_trace_fileESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!30 = !{!"_ZTSN7sc_core7sc_timeE", !31, i64 0}
!31 = !{!"long long", !8, i64 0}
!32 = !{!"_ZTSN7sc_core13sc_simcontext16execution_phasesE", !8, i64 0}
!33 = !{!"_ZTSN7sc_core9sc_statusE", !8, i64 0}
!34 = !{!35, !12, i64 8}
!35 = !{!"_ZTSN7sc_core14sc_time_paramsE", !36, i64 0, !12, i64 8, !12, i64 9, !31, i64 16, !12, i64 24}
!36 = !{!"double", !8, i64 0}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = !{!35, !12, i64 9}
!40 = !{!36, !36, i64 0}
!41 = !{!35, !31, i64 16}
!42 = !{!35, !36, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,TailCallElimPass