; LLVM IR from gem5/gem5 :: ext/dsent/model/ElectricalModel.ll (ZN5DSENT15ElectricalModel23createElectricalResultsEv)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.LibUtil::String" = type { %"class.std::__cxx11::basic_string" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str.37 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #1

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

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

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

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

declare void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #6

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5DSENT15ElectricalModel23createElectricalResultsEv(ptr noundef nonnull align 8 dereferenceable(240) %0) #8 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.LibUtil::String", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i1, align 1
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.LibUtil::String", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i1, align 1
  %14 = alloca %"class.LibUtil::String", align 8
  %15 = alloca i1, align 1
  %16 = alloca %"class.LibUtil::String", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8
  %18 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #9
  store i1 true, ptr %6, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #10
  invoke void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str.37)
          to label %19 unwind label %42

19:                                               ; preds = %1
  invoke void @_ZN5DSENT6ResultC1ERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(64) %18, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %20 unwind label %46

20:                                               ; preds = %19
  store i1 false, ptr %6, align 1
  invoke void @_ZN5DSENT5Model13addAreaResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131) %17, ptr noundef %18)
          to label %21 unwind label %46

21:                                               ; preds = %20
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %22 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %17)
  %23 = call noundef ptr @_ZNK5DSENT9TechModel22getAvailableWireLayersEv(ptr noundef nonnull align 8 dereferenceable(72) %22)
  %24 = call ptr @_ZNKSt3setIN7LibUtil6StringESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %23) #10
  %25 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %7, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %26 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %17)
  %27 = call noundef ptr @_ZNK5DSENT9TechModel22getAvailableWireLayersEv(ptr noundef nonnull align 8 dereferenceable(72) %26)
  %28 = call ptr @_ZNKSt3setIN7LibUtil6StringESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %27) #10
  %29 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %8, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  call void @_ZNSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %7, i64 8, i1 false), !tbaa.struct !9
  br label %30

30:                                               ; preds = %40, %21
  %31 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEES4_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  br i1 %31, label %32, label %71

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %33 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  store ptr %33, ptr %10, align 8, !tbaa !5
  %34 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #9
  store i1 true, ptr %13, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #10
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef @.str.38)
          to label %36 unwind label %54

36:                                               ; preds = %32
  invoke void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %37 unwind label %58

37:                                               ; preds = %36
  invoke void @_ZN5DSENT6ResultC1ERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(64) %34, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %38 unwind label %62

38:                                               ; preds = %37
  store i1 false, ptr %13, align 1
  invoke void @_ZN5DSENT5Model13addAreaResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131) %17, ptr noundef %34)
          to label %39 unwind label %62

39:                                               ; preds = %38
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  br label %40

40:                                               ; preds = %39
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  br label %30, !llvm.loop !10

42:                                               ; preds = %1
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %4, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %5, align 4
  br label %50

46:                                               ; preds = %20, %19
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %4, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %5, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  br label %50

50:                                               ; preds = %46, %42
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #10
  %51 = load i1, ptr %6, align 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %50
  call void @_ZdlPvm(ptr noundef %18, i64 noundef 64) #11
  br label %53

53:                                               ; preds = %52, %50
  br label %94

54:                                               ; preds = %32
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %4, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %5, align 4
  br label %67

58:                                               ; preds = %36
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %4, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %5, align 4
  br label %66

62:                                               ; preds = %38, %37
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %4, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %5, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  br label %66

66:                                               ; preds = %62, %58
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  br label %67

67:                                               ; preds = %66, %54
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #10
  %68 = load i1, ptr %13, align 1
  br i1 %68, label %69, label %70

69:                                               ; preds = %67
  call void @_ZdlPvm(ptr noundef %34, i64 noundef 64) #11
  br label %70

70:                                               ; preds = %69, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  br label %93

71:                                               ; preds = %30
  %72 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #9
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #10
  invoke void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.39)
          to label %73 unwind label %77

73:                                               ; preds = %71
  invoke void @_ZN5DSENT6ResultC1ERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(64) %72, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %74 unwind label %81

74:                                               ; preds = %73
  store i1 false, ptr %15, align 1
  invoke void @_ZN5DSENT5Model17addNddPowerResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131) %17, ptr noundef %72)
          to label %75 unwind label %81

75:                                               ; preds = %74
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #10
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.40)
  invoke void @_ZN5DSENT15ElectricalModel27createElectricalEventResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(240) %17, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %76 unwind label %89

76:                                               ; preds = %75
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  ret void

77:                                               ; preds = %71
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %4, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %5, align 4
  br label %85

81:                                               ; preds = %74, %73
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %4, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %5, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  br label %85

85:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #10
  %86 = load i1, ptr %15, align 1
  br i1 %86, label %87, label %88

87:                                               ; preds = %85
  call void @_ZdlPvm(ptr noundef %72, i64 noundef 64) #11
  br label %88

88:                                               ; preds = %87, %85
  br label %93

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

93:                                               ; preds = %89, %88, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  br label %94

94:                                               ; preds = %93, %53
  %95 = load ptr, ptr %4, align 8
  %96 = load i32, ptr %5, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98
}

declare void @_ZN5DSENT5Model13addAreaResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131), ptr noundef) #3

declare void @_ZN5DSENT6ResultC1ERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

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

declare noundef ptr @_ZNK5DSENT9TechModel22getAvailableWireLayersEv(ptr noundef nonnull align 8 dereferenceable(72)) #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEES4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

declare void @_ZN5DSENT5Model17addNddPowerResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5DSENT15ElectricalModel27createElectricalEventResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(32)) #8 align 2

attributes #0 = { nobuiltin allocsize(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 = { nobuiltin 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 = { "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 = { 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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { builtin allocsize(0) }
attributes #10 = { nounwind }
attributes #11 = { builtin 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 = !{i64 0, i64 8, !5}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.LibUtil::String" = type { %"class.std::__cxx11::basic_string" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str.37 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

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

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

declare void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5DSENT15ElectricalModel23createElectricalResultsEv(ptr noundef nonnull align 8 dereferenceable(240) %0) local_unnamed_addr #7 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.LibUtil::String", align 8
  %3 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"class.LibUtil::String", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.LibUtil::String", align 8
  %8 = alloca %"class.LibUtil::String", align 8
  %9 = tail call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #9
  invoke void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.37)
          to label %10 unwind label %.thread

10:                                               ; preds = %1
  invoke void @_ZN5DSENT6ResultC1ERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(64) %9, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %12 unwind label %.thread30

.thread30:                                        ; preds = %10
  %11 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  br label %32

12:                                               ; preds = %10
  invoke void @_ZN5DSENT5Model13addAreaResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131) %0, ptr noundef nonnull %9)
          to label %13 unwind label %30

13:                                               ; preds = %12
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  %14 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %0)
  %15 = call noundef ptr @_ZNK5DSENT9TechModel22getAvailableWireLayersEv(ptr noundef nonnull align 8 dereferenceable(72) %14)
  %16 = call ptr @_ZNKSt3setIN7LibUtil6StringESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %17 = call noundef ptr @_ZNK5DSENT5Model12getTechModelEv(ptr noundef nonnull align 8 dereferenceable(131) %0)
  %18 = call noundef ptr @_ZNK5DSENT9TechModel22getAvailableWireLayersEv(ptr noundef nonnull align 8 dereferenceable(72) %17)
  %19 = call ptr @_ZNKSt3setIN7LibUtil6StringESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #9
  store ptr %19, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  call void @_ZNSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  store ptr %16, ptr %4, align 8, !tbaa !5
  %20 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEES4_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13, %26
  %21 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  %22 = call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull @.str.38)
          to label %23 unwind label %.thread32

23:                                               ; preds = %.lr.ph
  invoke void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %24 unwind label %.thread36

24:                                               ; preds = %23
  invoke void @_ZN5DSENT6ResultC1ERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(64) %22, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %25 unwind label %35

25:                                               ; preds = %24
  invoke void @_ZN5DSENT5Model13addAreaResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131) %0, ptr noundef nonnull %22)
          to label %26 unwind label %35

26:                                               ; preds = %25
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  %28 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEES4_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.thread:                                          ; preds = %1
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  br label %32

30:                                               ; preds = %12
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  br label %51

32:                                               ; preds = %.thread30, %.thread
  %.pn29 = phi { ptr, i32 } [ %29, %.thread ], [ %11, %.thread30 ]
  call void @_ZdlPvm(ptr noundef nonnull %9, i64 noundef 64) #10
  br label %51

.thread32:                                        ; preds = %.lr.ph
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  br label %37

.thread36:                                        ; preds = %23
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  br label %37

35:                                               ; preds = %24, %25
  %.06 = phi i1 [ false, %25 ], [ true, %24 ]
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  br i1 %.06, label %37, label %50

37:                                               ; preds = %.thread36, %.thread32, %35
  %.pn22.pn35 = phi { ptr, i32 } [ %33, %.thread32 ], [ %36, %35 ], [ %34, %.thread36 ]
  call void @_ZdlPvm(ptr noundef nonnull %22, i64 noundef 64) #10
  br label %50

._crit_edge:                                      ; preds = %26, %13
  %38 = call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  invoke void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.39)
          to label %39 unwind label %.thread39

39:                                               ; preds = %._crit_edge
  invoke void @_ZN5DSENT6ResultC1ERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(64) %38, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %41 unwind label %.thread43

.thread43:                                        ; preds = %39
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br label %47

41:                                               ; preds = %39
  invoke void @_ZN5DSENT5Model17addNddPowerResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131) %0, ptr noundef nonnull %38)
          to label %42 unwind label %45

42:                                               ; preds = %41
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #9
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.40)
  invoke void @_ZN5DSENT15ElectricalModel27createElectricalEventResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %43 unwind label %48

43:                                               ; preds = %42
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  ret void

.thread39:                                        ; preds = %._crit_edge
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br label %47

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

47:                                               ; preds = %.thread43, %.thread39
  %.pn2042 = phi { ptr, i32 } [ %44, %.thread39 ], [ %40, %.thread43 ]
  call void @_ZdlPvm(ptr noundef nonnull %38, i64 noundef 64) #10
  br label %50

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

50:                                               ; preds = %45, %35, %37, %47, %48
  %.pn22.pn.pn = phi { ptr, i32 } [ %49, %48 ], [ %.pn2042, %47 ], [ %46, %45 ], [ %.pn22.pn35, %37 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %51

51:                                               ; preds = %30, %32, %50
  %.pn22.pn.pn.pn = phi { ptr, i32 } [ %.pn22.pn.pn, %50 ], [ %.pn29, %32 ], [ %31, %30 ]
  resume { ptr, i32 } %.pn22.pn.pn.pn
}

declare void @_ZN5DSENT5Model13addAreaResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131), ptr noundef) local_unnamed_addr #3

declare void @_ZN5DSENT6ResultC1ERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

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

declare noundef ptr @_ZNK5DSENT9TechModel22getAvailableWireLayersEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEES4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN7LibUtil6StringEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

declare void @_ZN5DSENT5Model17addNddPowerResultEPNS_6ResultE(ptr noundef nonnull align 8 dereferenceable(131), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5DSENT15ElectricalModel27createElectricalEventResultERKN7LibUtil6StringE(ptr noundef nonnull align 8 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #7 align 2

attributes #0 = { nobuiltin allocsize(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 = { nobuiltin 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 = { "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 = { 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 = { 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 #7 = { 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 #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { builtin 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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