; LLVM IR from gem5/gem5 :: ext/dsent/model/optical/RingDetector.ll (ZN5DSENT12RingDetector11updateModelEv)

; 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] }

@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [28 x i8], align 1

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

; Function Attrs: nounwind
declare void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #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) #2

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

declare noundef ptr @_ZN5DSENT5Model16getGenPropertiesEv(ptr noundef nonnull align 8 dereferenceable(131)) #0

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

declare noundef ptr @_ZN5DSENT12OpticalModel11getDetectorERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296), ptr noundef nonnull align 8 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5DSENT12RingDetector11updateModelEv(ptr noundef nonnull align 8 dereferenceable(336) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.LibUtil::String", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca %"class.LibUtil::String", align 8
  %9 = alloca double, align 8
  %10 = alloca %"class.LibUtil::String", align 8
  %11 = alloca double, align 8
  %12 = alloca %"class.LibUtil::String", align 8
  %13 = alloca double, align 8
  %14 = alloca %"class.LibUtil::String", align 8
  %15 = alloca double, align 8
  %16 = alloca %"class.LibUtil::String", align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.LibUtil::String", align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"class.LibUtil::String", align 8
  %21 = alloca %"class.LibUtil::String", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %23 = call noundef ptr @_ZN5DSENT5Model16getGenPropertiesEv(ptr noundef nonnull align 8 dereferenceable(131) %22)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.9)
  %24 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7LibUtil3MapINS_6StringEE3getERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %25 unwind label %82

25:                                               ; preds = %1
  %26 = invoke noundef i32 @_ZNK7LibUtil6StringcvjEv(ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %27 unwind label %82

27:                                               ; preds = %25
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  store i32 %26, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %28 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %22)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.23)
  %29 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %28, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %30 unwind label %86

30:                                               ; preds = %27
  %31 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %32 unwind label %86

32:                                               ; preds = %30
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  store double %31, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %33 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %22)
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.24)
  %34 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %33, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %35 unwind label %90

35:                                               ; preds = %32
  %36 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %37 unwind label %90

37:                                               ; preds = %35
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  store double %36, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %38 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %22)
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.25)
  %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %38, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %40 unwind label %94

40:                                               ; preds = %37
  %41 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %39)
          to label %42 unwind label %94

42:                                               ; preds = %40
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  store double %41, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %43 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %22)
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.26)
  %44 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %43, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %45 unwind label %98

45:                                               ; preds = %42
  %46 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %44)
          to label %47 unwind label %98

47:                                               ; preds = %45
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  store double %46, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %48 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %22)
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.27)
  %49 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %48, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %50 unwind label %102

50:                                               ; preds = %47
  %51 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %49)
          to label %52 unwind label %102

52:                                               ; preds = %50
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  store double %51, ptr %15, align 8, !tbaa !11
  call void @_ZN5DSENT12RingDetector14designReceiverEv(ptr noundef nonnull align 8 dereferenceable(336) %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.19)
  %53 = invoke noundef ptr @_ZN5DSENT12OpticalModel9getFilterERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296) %22, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %54 unwind label %106

54:                                               ; preds = %52
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  store ptr %53, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.20)
  %55 = invoke noundef ptr @_ZN5DSENT12OpticalModel11getDetectorERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296) %22, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %56 unwind label %110

56:                                               ; preds = %54
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  store ptr %55, ptr %19, align 8, !tbaa !5
  %57 = load ptr, ptr %17, align 8, !tbaa !5
  %58 = load double, ptr %9, align 8, !tbaa !11
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = uitofp i32 %59 to double
  %61 = fmul double %58, %60
  call void @_ZN5DSENT11OpticalNode7setLossEd(ptr noundef nonnull align 8 dereferenceable(80) %57, double noundef %61)
  %62 = load ptr, ptr %17, align 8, !tbaa !5
  %63 = load double, ptr %11, align 8, !tbaa !11
  %64 = load double, ptr %9, align 8, !tbaa !11
  %65 = load i32, ptr %3, align 4, !tbaa !9
  %66 = uitofp i32 %65 to double
  %67 = call double @llvm.fmuladd.f64(double %64, double %66, double %63)
  call void @_ZN5DSENT13OpticalFilter11setDropLossEd(ptr noundef nonnull align 8 dereferenceable(112) %62, double noundef %67)
  %68 = load ptr, ptr %19, align 8, !tbaa !5
  %69 = load double, ptr %13, align 8, !tbaa !11
  call void @_ZN5DSENT11OpticalNode7setLossEd(ptr noundef nonnull align 8 dereferenceable(80) %68, double noundef %69)
  %70 = load ptr, ptr %19, align 8, !tbaa !5
  %71 = load double, ptr %15, align 8, !tbaa !11
  call void @_ZN5DSENT15OpticalDetector15setResponsivityEd(ptr noundef nonnull align 8 dereferenceable(104) %70, double noundef %71)
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.10)
  %72 = invoke noundef ptr @_ZN5DSENT5Model13getAreaResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(131) %22, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %73 unwind label %114

73:                                               ; preds = %56
  %74 = load double, ptr %7, align 8, !tbaa !11
  %75 = load i32, ptr %3, align 4, !tbaa !9
  %76 = uitofp i32 %75 to double
  %77 = fmul double %74, %76
  %78 = load ptr, ptr %72, align 8, !tbaa !13
  %79 = getelementptr inbounds ptr, ptr %78, i64 2
  %80 = load ptr, ptr %79, align 8
  invoke void %80(ptr noundef nonnull align 8 dereferenceable(64) %72, double noundef %77)
          to label %81 unwind label %114

81:                                               ; preds = %73
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void

82:                                               ; preds = %25, %1
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %5, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  br label %125

86:                                               ; preds = %30, %27
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %5, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  br label %124

90:                                               ; preds = %35, %32
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %5, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  br label %123

94:                                               ; preds = %40, %37
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %5, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %122

98:                                               ; preds = %45, %42
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %5, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %121

102:                                              ; preds = %50, %47
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %5, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %120

106:                                              ; preds = %52
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %5, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %119

110:                                              ; preds = %54
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %5, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  br label %118

114:                                              ; preds = %73, %56
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %5, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %6, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #5
  br label %118

118:                                              ; preds = %114, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %119

119:                                              ; preds = %118, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %120

120:                                              ; preds = %119, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %121

121:                                              ; preds = %120, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %122

122:                                              ; preds = %121, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %123

123:                                              ; preds = %122, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %124

124:                                              ; preds = %123, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %125

125:                                              ; preds = %124, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %5, align 8
  %128 = load i32, ptr %6, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7LibUtil3MapINS_6StringEE3getERKS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

declare noundef i32 @_ZNK7LibUtil6StringcvjEv(ptr noundef nonnull align 8 dereferenceable(32)) #0

declare noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131)) #0

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32)) #0

declare noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5DSENT12RingDetector14designReceiverEv(ptr noundef nonnull align 8 dereferenceable(336)) #3 align 2

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

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

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

declare void @_ZN5DSENT15OpticalDetector15setResponsivityEd(ptr noundef nonnull align 8 dereferenceable(104), double noundef) #0

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

attributes #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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"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.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [28 x i8], align 1

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

; Function Attrs: nounwind
declare void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #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) #2

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

declare noundef ptr @_ZN5DSENT5Model16getGenPropertiesEv(ptr noundef nonnull align 8 dereferenceable(131)) local_unnamed_addr #0

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

declare noundef ptr @_ZN5DSENT12OpticalModel11getDetectorERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5DSENT12RingDetector11updateModelEv(ptr noundef nonnull align 8 dereferenceable(336) %0) unnamed_addr #3 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
  %8 = alloca %"class.LibUtil::String", align 8
  %9 = alloca %"class.LibUtil::String", align 8
  %10 = alloca %"class.LibUtil::String", align 8
  %11 = tail call noundef ptr @_ZN5DSENT5Model16getGenPropertiesEv(ptr noundef nonnull align 8 dereferenceable(131) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.9)
  %12 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7LibUtil3MapINS_6StringEE3getERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %13 unwind label %55

13:                                               ; preds = %1
  %14 = invoke noundef i32 @_ZNK7LibUtil6StringcvjEv(ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %15 unwind label %55

15:                                               ; preds = %13
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  %16 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.23)
  %17 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %16, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %18 unwind label %57

18:                                               ; preds = %15
  %19 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %20 unwind label %57

20:                                               ; preds = %18
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  %21 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.24)
  %22 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %21, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %23 unwind label %59

23:                                               ; preds = %20
  %24 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %25 unwind label %59

25:                                               ; preds = %23
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  %26 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.25)
  %27 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %26, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %28 unwind label %61

28:                                               ; preds = %25
  %29 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %30 unwind label %61

30:                                               ; preds = %28
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  %31 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.26)
  %32 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %31, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %33 unwind label %63

33:                                               ; preds = %30
  %34 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %35 unwind label %63

35:                                               ; preds = %33
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  %36 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.27)
  %37 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72) %36, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %38 unwind label %65

38:                                               ; preds = %35
  %39 = invoke noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32) %37)
          to label %40 unwind label %65

40:                                               ; preds = %38
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @_ZN5DSENT12RingDetector14designReceiverEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.19)
  %41 = invoke noundef ptr @_ZN5DSENT12OpticalModel9getFilterERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296) %0, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %42 unwind label %67

42:                                               ; preds = %40
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.20)
  %43 = invoke noundef ptr @_ZN5DSENT12OpticalModel11getDetectorERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(296) %0, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %44 unwind label %69

44:                                               ; preds = %42
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  %45 = uitofp i32 %14 to double
  %46 = fmul double %24, %45
  call void @_ZN5DSENT11OpticalNode7setLossEd(ptr noundef nonnull align 8 dereferenceable(80) %41, double noundef %46)
  %47 = call double @llvm.fmuladd.f64(double %24, double %45, double %29)
  call void @_ZN5DSENT13OpticalFilter11setDropLossEd(ptr noundef nonnull align 8 dereferenceable(112) %41, double noundef %47)
  call void @_ZN5DSENT11OpticalNode7setLossEd(ptr noundef nonnull align 8 dereferenceable(80) %43, double noundef %34)
  call void @_ZN5DSENT15OpticalDetector15setResponsivityEd(ptr noundef nonnull align 8 dereferenceable(104) %43, double noundef %39)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.10)
  %48 = invoke noundef ptr @_ZN5DSENT5Model13getAreaResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(131) %0, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %49 unwind label %71

49:                                               ; preds = %44
  %50 = fmul double %19, %45
  %51 = load ptr, ptr %48, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %53 = load ptr, ptr %52, align 8
  invoke void %53(ptr noundef nonnull align 8 dereferenceable(64) %48, double noundef %50)
          to label %54 unwind label %71

54:                                               ; preds = %49
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  ret void

55:                                               ; preds = %13, %1
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  br label %73

57:                                               ; preds = %18, %15
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %73

59:                                               ; preds = %23, %20
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %73

61:                                               ; preds = %28, %25
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %73

63:                                               ; preds = %33, %30
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %73

65:                                               ; preds = %38, %35
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %73

67:                                               ; preds = %40
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %73

69:                                               ; preds = %42
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br label %73

71:                                               ; preds = %49, %44
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  br label %73

73:                                               ; preds = %57, %61, %65, %69, %71, %67, %63, %59, %55
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %56, %55 ], [ %58, %57 ], [ %60, %59 ], [ %62, %61 ], [ %64, %63 ], [ %66, %65 ], [ %68, %67 ], [ %72, %71 ], [ %70, %69 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7LibUtil3MapINS_6StringEE3getERKS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

declare noundef i32 @_ZNK7LibUtil6StringcvjEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

declare noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131)) local_unnamed_addr #0

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5DSENT9TechModel3getERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

declare noundef double @_ZNK7LibUtil6StringcvdEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5DSENT12RingDetector14designReceiverEv(ptr noundef nonnull align 8 dereferenceable(336)) local_unnamed_addr #3 align 2

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

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

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

declare void @_ZN5DSENT15OpticalDetector15setResponsivityEd(ptr noundef nonnull align 8 dereferenceable(104), double noundef) local_unnamed_addr #0

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

attributes #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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass