; LLVM IR from gem5/gem5 :: ext/dsent/model/optical/RingFilter.ll (ZN5DSENT10RingFilter11updateModelEv)

; 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.LibUtil::String" = type { %"class.std::__cxx11::basic_string" }
%"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] }
%"struct.std::pair" = type { i32, i32 }

@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_ZN5DSENT19makeWavelengthGroupEii(i32 noundef, i32 noundef) #3

declare void @_ZNK5DSENT5Model12getParameterERKN7LibUtil6StringE(ptr dead_on_unwind writable sret(%"class.LibUtil::String") align 8, ptr noundef nonnull align 8 dereferenceable(131), ptr noundef nonnull align 8 dereferenceable(32)) #1

declare noundef i32 @_ZNK7LibUtil6StringcviEv(ptr noundef nonnull align 8 dereferenceable(32)) #1

declare noundef ptr @_ZN5DSENT12OpticalModel9getFilterERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5DSENT10RingFilter11updateModelEv(ptr noundef nonnull align 8 dereferenceable(296) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca %"class.LibUtil::String", align 8
  %8 = alloca %"class.LibUtil::String", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.LibUtil::String", align 8
  %12 = alloca %"class.LibUtil::String", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.LibUtil::String", align 8
  %16 = alloca %"class.LibUtil::String", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store double 2.000000e-10, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store double 1.000000e-04, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store double 1.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.2)
  invoke void @_ZNK5DSENT5Model12getParameterERKN7LibUtil6StringE(ptr dead_on_unwind writable sret(%"class.LibUtil::String") align 8 %7, ptr noundef nonnull align 8 dereferenceable(131) %17, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %18 unwind label %56

18:                                               ; preds = %1
  %19 = invoke noundef i32 @_ZNK7LibUtil6StringcviEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %20 unwind label %60

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  invoke void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.3)
          to label %21 unwind label %64

21:                                               ; preds = %20
  invoke void @_ZNK5DSENT5Model12getParameterERKN7LibUtil6StringE(ptr dead_on_unwind writable sret(%"class.LibUtil::String") align 8 %11, ptr noundef nonnull align 8 dereferenceable(131) %17, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %22 unwind label %68

22:                                               ; preds = %21
  %23 = invoke noundef i32 @_ZNK7LibUtil6StringcviEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %24 unwind label %72

24:                                               ; preds = %22
  %25 = invoke i64 @_ZN5DSENT19makeWavelengthGroupEii(i32 noundef %19, i32 noundef %23)
          to label %26 unwind label %72

26:                                               ; preds = %24
  store i64 %25, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %27 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 1
  %28 = load i32, ptr %27, align 4, !tbaa !11
  %29 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 0
  %30 = load i32, ptr %29, align 4, !tbaa !14
  %31 = sub nsw i32 %28, %30
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %13, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.10)
  %33 = invoke noundef ptr @_ZN5DSENT12OpticalModel9getFilterERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296) %17, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %34 unwind label %80

34:                                               ; preds = %26
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  store ptr %33, ptr %14, align 8, !tbaa !5
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = load double, ptr %4, align 8, !tbaa !9
  %37 = load i32, ptr %13, align 4, !tbaa !15
  %38 = sitofp i32 %37 to double
  %39 = fmul double %36, %38
  call void @_ZN5DSENT11OpticalNode7setLossEd(ptr noundef nonnull align 8 dereferenceable(80) %35, double noundef %39)
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = load double, ptr %5, align 8, !tbaa !9
  %42 = load double, ptr %4, align 8, !tbaa !9
  %43 = load i32, ptr %13, align 4, !tbaa !15
  %44 = sitofp i32 %43 to double
  %45 = call double @llvm.fmuladd.f64(double %42, double %44, double %41)
  call void @_ZN5DSENT13OpticalFilter11setDropLossEd(ptr noundef nonnull align 8 dereferenceable(112) %40, double noundef %45)
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.6)
  %46 = invoke noundef ptr @_ZN5DSENT5Model13getAreaResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(131) %17, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %47 unwind label %84

47:                                               ; preds = %34
  %48 = load double, ptr %3, align 8, !tbaa !9
  %49 = load i32, ptr %13, align 4, !tbaa !15
  %50 = sitofp i32 %49 to double
  %51 = fmul double %48, %50
  %52 = load ptr, ptr %46, align 8, !tbaa !16
  %53 = getelementptr inbounds ptr, ptr %52, i64 2
  %54 = load ptr, ptr %53, align 8
  invoke void %54(ptr noundef nonnull align 8 dereferenceable(64) %46, double noundef %51)
          to label %55 unwind label %84

55:                                               ; preds = %47
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void

56:                                               ; preds = %1
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  br label %79

60:                                               ; preds = %18
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %9, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %10, align 4
  br label %78

64:                                               ; preds = %20
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %9, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %10, align 4
  br label %77

68:                                               ; preds = %21
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %9, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %10, align 4
  br label %76

72:                                               ; preds = %24, %22
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %9, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %76

76:                                               ; preds = %72, %68
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %77

77:                                               ; preds = %76, %64
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  br label %78

78:                                               ; preds = %77, %60
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %79

79:                                               ; preds = %78, %56
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  br label %89

80:                                               ; preds = %26
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %88

84:                                               ; preds = %47, %34
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %9, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  br label %88

88:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %89

89:                                               ; preds = %88, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %9, align 8
  %92 = load i32, ptr %10, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

declare void @_ZN5DSENT11OpticalNode7setLossEd(ptr noundef nonnull align 8 dereferenceable(80), double noundef) #1

declare void @_ZN5DSENT13OpticalFilter11setDropLossEd(ptr noundef nonnull align 8 dereferenceable(112), double noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

declare noundef ptr @_ZN5DSENT5Model13getAreaResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(131), ptr noundef nonnull align 8 dereferenceable(32)) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 4}
!12 = !{!"_ZTSSt4pairIiiE", !13, i64 0, !13, i64 4}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 0}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, 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"

%"class.LibUtil::String" = type { %"class.std::__cxx11::basic_string" }
%"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] }

@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_ZN5DSENT19makeWavelengthGroupEii(i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZNK5DSENT5Model12getParameterERKN7LibUtil6StringE(ptr dead_on_unwind writable sret(%"class.LibUtil::String") align 8, ptr noundef nonnull align 8 dereferenceable(131), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare noundef i32 @_ZNK7LibUtil6StringcviEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare noundef ptr @_ZN5DSENT12OpticalModel9getFilterERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5DSENT10RingFilter11updateModelEv(ptr noundef nonnull align 8 dereferenceable(296) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.LibUtil::String", align 8
  %3 = alloca %"class.LibUtil::String", align 8
  %4 = alloca %"class.LibUtil::String", align 8
  %5 = alloca %"class.LibUtil::String", align 8
  %6 = alloca %"class.LibUtil::String", align 8
  %7 = alloca %"class.LibUtil::String", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.2)
  invoke void @_ZNK5DSENT5Model12getParameterERKN7LibUtil6StringE(ptr dead_on_unwind nonnull writable sret(%"class.LibUtil::String") align 8 %2, ptr noundef nonnull align 8 dereferenceable(131) %0, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %8 unwind label %30

8:                                                ; preds = %1
  %9 = invoke noundef i32 @_ZNK7LibUtil6StringcviEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %10 unwind label %32

10:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  invoke void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.3)
          to label %11 unwind label %34

11:                                               ; preds = %10
  invoke void @_ZNK5DSENT5Model12getParameterERKN7LibUtil6StringE(ptr dead_on_unwind nonnull writable sret(%"class.LibUtil::String") align 8 %4, ptr noundef nonnull align 8 dereferenceable(131) %0, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %12 unwind label %36

12:                                               ; preds = %11
  %13 = invoke noundef i32 @_ZNK7LibUtil6StringcviEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %14 unwind label %38

14:                                               ; preds = %12
  %15 = invoke i64 @_ZN5DSENT19makeWavelengthGroupEii(i32 noundef %9, i32 noundef %13)
          to label %16 unwind label %38

16:                                               ; preds = %14
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.10)
  %17 = invoke noundef ptr @_ZN5DSENT12OpticalModel9getFilterERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296) %0, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %18 unwind label %44

18:                                               ; preds = %16
  %.sroa.5.0.extract.shift = lshr i64 %15, 32
  %.sroa.5.0.extract.trunc = trunc nuw i64 %.sroa.5.0.extract.shift to i32
  %.sroa.0.0.extract.trunc = trunc i64 %15 to i32
  %reass.sub = sub i32 %.sroa.5.0.extract.trunc, %.sroa.0.0.extract.trunc
  %19 = add i32 %reass.sub, 1
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  %20 = sitofp i32 %19 to double
  %21 = fmul double %20, 1.000000e-04
  call void @_ZN5DSENT11OpticalNode7setLossEd(ptr noundef nonnull align 8 dereferenceable(80) %17, double noundef %21)
  %22 = call double @llvm.fmuladd.f64(double %20, double 1.000000e-04, double 1.000000e+00)
  call void @_ZN5DSENT13OpticalFilter11setDropLossEd(ptr noundef nonnull align 8 dereferenceable(112) %17, double noundef %22)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.6)
  %23 = invoke noundef ptr @_ZN5DSENT5Model13getAreaResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(131) %0, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %24 unwind label %46

24:                                               ; preds = %18
  %25 = fmul double %20, 2.000000e-10
  %26 = load ptr, ptr %23, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %28 = load ptr, ptr %27, align 8
  invoke void %28(ptr noundef nonnull align 8 dereferenceable(64) %23, double noundef %25)
          to label %29 unwind label %46

29:                                               ; preds = %24
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  ret void

30:                                               ; preds = %1
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %43

32:                                               ; preds = %8
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %42

34:                                               ; preds = %10
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %41

36:                                               ; preds = %11
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %14, %12
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %41

41:                                               ; preds = %40, %34
  %.pn.pn = phi { ptr, i32 } [ %.pn, %40 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %42

42:                                               ; preds = %41, %32
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %41 ], [ %33, %32 ]
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  br label %43

43:                                               ; preds = %42, %30
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %42 ], [ %31, %30 ]
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  br label %48

44:                                               ; preds = %16
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %48

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

48:                                               ; preds = %44, %46, %43
  %.pn21.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %43 ], [ %47, %46 ], [ %45, %44 ]
  resume { ptr, i32 } %.pn21.pn
}

declare void @_ZN5DSENT11OpticalNode7setLossEd(ptr noundef nonnull align 8 dereferenceable(80), double noundef) local_unnamed_addr #1

declare void @_ZN5DSENT13OpticalFilter11setDropLossEd(ptr noundef nonnull align 8 dereferenceable(112), double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

declare noundef ptr @_ZN5DSENT5Model13getAreaResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(131), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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