; LLVM IR from gem5/gem5 :: ext/mcpat/cacti (htree2)

; 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.TechnologyParameter = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i64, %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::InterconnectType", %"class.TechnologyParameter::InterconnectType", %"class.TechnologyParameter::InterconnectType", %"class.TechnologyParameter::ScalingFactor", %"class.TechnologyParameter::MemoryType", %"class.TechnologyParameter::MemoryType", %"class.TechnologyParameter::MemoryType" }
%"class.TechnologyParameter::DeviceType" = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%"class.TechnologyParameter::InterconnectType" = type { double, double, double, double, double, double, double, double }
%"class.TechnologyParameter::ScalingFactor" = type { double, double, double }
%"class.TechnologyParameter::MemoryType" = type { double, double, double, double, double, double }
%class.Htree2 = type { %class.Component, double, double, double, %class.powerDef, double, double, i32, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i8, i8, i32, double, double, ptr }
%class.Component = type { %class.Area, %class.powerDef, %class.powerDef, double, double }
%class.Area = type { double, double, double }
%class.powerDef = type { %class.powerComponents, %class.powerComponents, %class.powerComponents }
%class.powerComponents = type { double, double, double, double, double }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE = external hidden unnamed_addr constant [146 x i8], align 1
@g_tp = external global %class.TechnologyParameter, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE(ptr noundef nonnull align 8 dereferenceable(544) %0, i32 noundef %1, double noundef %2, double noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i1 noundef zeroext %12, i1 noundef zeroext %13, ptr noundef %14) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i8, align 1
  %29 = alloca i8, align 1
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  store ptr %0, ptr %16, align 8, !tbaa !5
  store i32 %1, ptr %17, align 4, !tbaa !9
  store double %2, ptr %18, align 8, !tbaa !11
  store double %3, ptr %19, align 8, !tbaa !11
  store i32 %4, ptr %20, align 4, !tbaa !13
  store i32 %5, ptr %21, align 4, !tbaa !13
  store i32 %6, ptr %22, align 4, !tbaa !13
  store i32 %7, ptr %23, align 4, !tbaa !13
  store i32 %8, ptr %24, align 4, !tbaa !13
  store i32 %9, ptr %25, align 4, !tbaa !13
  store i32 %10, ptr %26, align 4, !tbaa !13
  store i32 %11, ptr %27, align 4, !tbaa !15
  %33 = zext i1 %12 to i8
  store i8 %33, ptr %28, align 1, !tbaa !17
  %34 = zext i1 %13 to i8
  store i8 %34, ptr %29, align 1, !tbaa !17
  store ptr %14, ptr %30, align 8, !tbaa !5
  %35 = load ptr, ptr %16, align 8
  call void @_ZN9ComponentC2Ev(ptr noundef nonnull align 8 dereferenceable(280) %35)
  %36 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 1
  store double 0.000000e+00, ptr %36, align 8, !tbaa !19
  %37 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 2
  store double 0.000000e+00, ptr %37, align 8, !tbaa !25
  %38 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 4
  invoke void @_ZN8powerDefC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %38)
          to label %39 unwind label %83

39:                                               ; preds = %15
  %40 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 7
  %41 = load i32, ptr %27, align 4, !tbaa !15
  store i32 %41, ptr %40, align 8, !tbaa !26
  %42 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 10
  %43 = load double, ptr %18, align 8, !tbaa !11
  store double %43, ptr %42, align 8, !tbaa !27
  %44 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 11
  %45 = load double, ptr %19, align 8, !tbaa !11
  store double %45, ptr %44, align 8, !tbaa !28
  %46 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 12
  %47 = load i32, ptr %20, align 4, !tbaa !13
  store i32 %47, ptr %46, align 8, !tbaa !29
  %48 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 13
  %49 = load i32, ptr %21, align 4, !tbaa !13
  store i32 %49, ptr %48, align 4, !tbaa !30
  %50 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 14
  %51 = load i32, ptr %22, align 4, !tbaa !13
  store i32 %51, ptr %50, align 8, !tbaa !31
  %52 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 15
  %53 = load i32, ptr %23, align 4, !tbaa !13
  store i32 %53, ptr %52, align 4, !tbaa !32
  %54 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 16
  %55 = load i32, ptr %24, align 4, !tbaa !13
  store i32 %55, ptr %54, align 8, !tbaa !33
  %56 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 17
  %57 = load i32, ptr %25, align 4, !tbaa !13
  store i32 %57, ptr %56, align 4, !tbaa !34
  %58 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 18
  %59 = load i32, ptr %26, align 4, !tbaa !13
  store i32 %59, ptr %58, align 8, !tbaa !35
  %60 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 19
  %61 = load i8, ptr %28, align 1, !tbaa !17, !range !36, !noundef !37
  %62 = trunc i8 %61 to i1
  %63 = zext i1 %62 to i8
  store i8 %63, ptr %60, align 4, !tbaa !38
  %64 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 20
  %65 = load i8, ptr %29, align 1, !tbaa !17, !range !36, !noundef !37
  %66 = trunc i8 %65 to i1
  %67 = zext i1 %66 to i8
  store i8 %67, ptr %64, align 1, !tbaa !39
  %68 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 21
  %69 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %69, ptr %68, align 8, !tbaa !40
  %70 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 24
  %71 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %71, ptr %70, align 8, !tbaa !41
  %72 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 17
  %73 = load i32, ptr %72, align 4, !tbaa !34
  %74 = icmp sge i32 %73, 2
  br i1 %74, label %75, label %79

75:                                               ; preds = %39
  %76 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 18
  %77 = load i32, ptr %76, align 8, !tbaa !35
  %78 = icmp sge i32 %77, 2
  br label %79

79:                                               ; preds = %75, %39
  %80 = phi i1 [ false, %39 ], [ %78, %75 ]
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  br label %88

82:                                               ; preds = %79
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 53, ptr noundef @__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE) #5
  unreachable

83:                                               ; preds = %137, %129, %122, %115, %108, %101, %15
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %31, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %32, align 4
  call void @_ZN9ComponentD2Ev(ptr noundef nonnull align 8 dereferenceable(280) %35) #6
  br label %167

87:                                               ; No predecessors!
  br label %88

88:                                               ; preds = %87, %81
  %89 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 3
  store double 0.000000e+00, ptr %89, align 8, !tbaa !42
  %90 = load double, ptr getelementptr inbounds (%class.TechnologyParameter, ptr @g_tp, i32 0, i32 1), align 8, !tbaa !43
  %91 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 22
  store double %90, ptr %91, align 8, !tbaa !50
  %92 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 24
  %93 = load ptr, ptr %92, align 8, !tbaa !41
  %94 = getelementptr inbounds %"class.TechnologyParameter::DeviceType", ptr %93, i32 0, i32 19
  %95 = load double, ptr %94, align 8, !tbaa !51
  %96 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 22
  %97 = load double, ptr %96, align 8, !tbaa !50
  %98 = fmul double %95, %97
  %99 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 23
  store double %98, ptr %99, align 8, !tbaa !52
  %100 = load i32, ptr %27, align 4, !tbaa !15
  switch i32 %100, label %136 [
    i32 0, label %101
    i32 1, label %108
    i32 2, label %115
    i32 3, label %122
    i32 4, label %129
  ]

101:                                              ; preds = %88
  %102 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 12
  %103 = load i32, ptr %102, align 8, !tbaa !29
  %104 = sitofp i32 %103 to double
  %105 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 6
  store double %104, ptr %105, align 8, !tbaa !53
  %106 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 5
  store double %104, ptr %106, align 8, !tbaa !54
  invoke void @_ZN6Htree28in_htreeEv(ptr noundef nonnull align 8 dereferenceable(544) %35)
          to label %107 unwind label %83

107:                                              ; preds = %101
  br label %137

108:                                              ; preds = %88
  %109 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 13
  %110 = load i32, ptr %109, align 4, !tbaa !30
  %111 = sitofp i32 %110 to double
  %112 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 6
  store double %111, ptr %112, align 8, !tbaa !53
  %113 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 5
  store double %111, ptr %113, align 8, !tbaa !54
  invoke void @_ZN6Htree28in_htreeEv(ptr noundef nonnull align 8 dereferenceable(544) %35)
          to label %114 unwind label %83

114:                                              ; preds = %108
  br label %137

115:                                              ; preds = %88
  %116 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 15
  %117 = load i32, ptr %116, align 4, !tbaa !32
  %118 = sitofp i32 %117 to double
  %119 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 6
  store double %118, ptr %119, align 8, !tbaa !53
  %120 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 5
  store double %118, ptr %120, align 8, !tbaa !54
  invoke void @_ZN6Htree29out_htreeEv(ptr noundef nonnull align 8 dereferenceable(544) %35)
          to label %121 unwind label %83

121:                                              ; preds = %115
  br label %137

122:                                              ; preds = %88
  %123 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 14
  %124 = load i32, ptr %123, align 8, !tbaa !31
  %125 = sitofp i32 %124 to double
  %126 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 6
  store double %125, ptr %126, align 8, !tbaa !53
  %127 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 5
  store double %125, ptr %127, align 8, !tbaa !54
  invoke void @_ZN6Htree28in_htreeEv(ptr noundef nonnull align 8 dereferenceable(544) %35)
          to label %128 unwind label %83

128:                                              ; preds = %122
  br label %137

129:                                              ; preds = %88
  %130 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 16
  %131 = load i32, ptr %130, align 8, !tbaa !33
  %132 = sitofp i32 %131 to double
  %133 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 6
  store double %132, ptr %133, align 8, !tbaa !53
  %134 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 5
  store double %132, ptr %134, align 8, !tbaa !54
  invoke void @_ZN6Htree29out_htreeEv(ptr noundef nonnull align 8 dereferenceable(544) %35)
          to label %135 unwind label %83

135:                                              ; preds = %129
  br label %137

136:                                              ; preds = %88
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 93, ptr noundef @__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE) #5
  unreachable

137:                                              ; preds = %135, %128, %121, %114, %107
  %138 = getelementptr inbounds %class.Component, ptr %35, i32 0, i32 1
  %139 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 4
  %140 = invoke noundef nonnull align 8 dereferenceable(120) ptr @_ZN8powerDefaSERKS_(ptr noundef nonnull align 8 dereferenceable(120) %139, ptr noundef nonnull align 8 dereferenceable(120) %138)
          to label %141 unwind label %83

141:                                              ; preds = %137
  %142 = getelementptr inbounds %class.Htree2, ptr %35, i32 0, i32 6
  %143 = load double, ptr %142, align 8, !tbaa !53
  %144 = getelementptr inbounds %class.Component, ptr %35, i32 0, i32 1
  %145 = getelementptr inbounds %class.powerDef, ptr %144, i32 0, i32 0
  %146 = getelementptr inbounds %class.powerComponents, ptr %145, i32 0, i32 0
  %147 = load double, ptr %146, align 8, !tbaa !55
  %148 = fmul double %147, %143
  store double %148, ptr %146, align 8, !tbaa !55
  %149 = getelementptr inbounds %class.Component, ptr %35, i32 0, i32 1
  %150 = getelementptr inbounds %class.powerDef, ptr %149, i32 0, i32 0
  %151 = getelementptr inbounds %class.powerComponents, ptr %150, i32 0, i32 0
  %152 = load double, ptr %151, align 8, !tbaa !55
  %153 = fcmp oge double %152, 0.000000e+00
  br i1 %153, label %154, label %155

154:                                              ; preds = %141
  br label %157

155:                                              ; preds = %141
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 100, ptr noundef @__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE) #5
  unreachable

156:                                              ; No predecessors!
  br label %157

157:                                              ; preds = %156, %154
  %158 = getelementptr inbounds %class.Component, ptr %35, i32 0, i32 1
  %159 = getelementptr inbounds %class.powerDef, ptr %158, i32 0, i32 0
  %160 = getelementptr inbounds %class.powerComponents, ptr %159, i32 0, i32 1
  %161 = load double, ptr %160, align 8, !tbaa !56
  %162 = fcmp oge double %161, 0.000000e+00
  br i1 %162, label %163, label %164

163:                                              ; preds = %157
  br label %166

164:                                              ; preds = %157
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 101, ptr noundef @__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE) #5
  unreachable

165:                                              ; No predecessors!
  br label %166

166:                                              ; preds = %165, %163
  ret void

167:                                              ; preds = %83
  %168 = load ptr, ptr %31, align 8
  %169 = load i32, ptr %32, align 4
  %170 = insertvalue { ptr, i32 } poison, ptr %168, 0
  %171 = insertvalue { ptr, i32 } %170, i32 %169, 1
  resume { ptr, i32 } %171
}

declare void @_ZN9ComponentC2Ev(ptr noundef nonnull align 8 dereferenceable(280)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8powerDefC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Htree28in_htreeEv(ptr noundef nonnull align 8 dereferenceable(544)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Htree29out_htreeEv(ptr noundef nonnull align 8 dereferenceable(544)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(120) ptr @_ZN8powerDefaSERKS_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

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

attributes #0 = { 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 #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 = { noreturn 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 = { 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 = { noreturn nounwind }
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 = !{!"_ZTS9Wire_type", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTS10Htree_type", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!20, !12, i64 280}
!20 = !{!"_ZTS6Htree2", !21, i64 0, !12, i64 280, !12, i64 288, !12, i64 296, !23, i64 304, !12, i64 424, !12, i64 432, !16, i64 440, !12, i64 448, !12, i64 456, !12, i64 464, !12, i64 472, !14, i64 480, !14, i64 484, !14, i64 488, !14, i64 492, !14, i64 496, !14, i64 500, !14, i64 504, !18, i64 508, !18, i64 509, !10, i64 512, !12, i64 520, !12, i64 528, !6, i64 536}
!21 = !{!"_ZTS9Component", !22, i64 0, !23, i64 24, !23, i64 144, !12, i64 264, !12, i64 272}
!22 = !{!"_ZTS4Area", !12, i64 0, !12, i64 8, !12, i64 16}
!23 = !{!"_ZTS8powerDef", !24, i64 0, !24, i64 40, !24, i64 80}
!24 = !{!"_ZTS15powerComponents", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!25 = !{!20, !12, i64 288}
!26 = !{!20, !16, i64 440}
!27 = !{!20, !12, i64 464}
!28 = !{!20, !12, i64 472}
!29 = !{!20, !14, i64 480}
!30 = !{!20, !14, i64 484}
!31 = !{!20, !14, i64 488}
!32 = !{!20, !14, i64 492}
!33 = !{!20, !14, i64 496}
!34 = !{!20, !14, i64 500}
!35 = !{!20, !14, i64 504}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = !{!20, !18, i64 508}
!39 = !{!20, !18, i64 509}
!40 = !{!20, !10, i64 512}
!41 = !{!20, !6, i64 536}
!42 = !{!20, !12, i64 296}
!43 = !{!44, !12, i64 8}
!44 = !{!"_ZTS19TechnologyParameter", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !12, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !45, i64 352, !46, i64 360, !46, i64 528, !46, i64 696, !46, i64 864, !46, i64 1032, !47, i64 1200, !47, i64 1264, !47, i64 1328, !48, i64 1392, !49, i64 1416, !49, i64 1464, !49, i64 1512}
!45 = !{!"long", !7, i64 0}
!46 = !{!"_ZTSN19TechnologyParameter10DeviceTypeE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160}
!47 = !{!"_ZTSN19TechnologyParameter16InterconnectTypeE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56}
!48 = !{!"_ZTSN19TechnologyParameter13ScalingFactorE", !12, i64 0, !12, i64 8, !12, i64 16}
!49 = !{!"_ZTSN19TechnologyParameter10MemoryTypeE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40}
!50 = !{!20, !12, i64 520}
!51 = !{!46, !12, i64 152}
!52 = !{!20, !12, i64 528}
!53 = !{!20, !12, i64 432}
!54 = !{!20, !12, i64 424}
!55 = !{!21, !12, i64 24}
!56 = !{!21, !12, i64 32}


; 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.TechnologyParameter = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i64, %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::DeviceType", %"class.TechnologyParameter::InterconnectType", %"class.TechnologyParameter::InterconnectType", %"class.TechnologyParameter::InterconnectType", %"class.TechnologyParameter::ScalingFactor", %"class.TechnologyParameter::MemoryType", %"class.TechnologyParameter::MemoryType", %"class.TechnologyParameter::MemoryType" }
%"class.TechnologyParameter::DeviceType" = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%"class.TechnologyParameter::InterconnectType" = type { double, double, double, double, double, double, double, double }
%"class.TechnologyParameter::ScalingFactor" = type { double, double, double }
%"class.TechnologyParameter::MemoryType" = type { double, double, double, double, double, double }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE = external hidden unnamed_addr constant [146 x i8], align 1
@g_tp = external local_unnamed_addr global %class.TechnologyParameter, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE(ptr noundef nonnull align 8 dereferenceable(544) %0, i32 noundef %1, double noundef %2, double noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i1 noundef zeroext %12, i1 noundef zeroext %13, ptr noundef %14) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN9ComponentC2Ev(ptr noundef nonnull align 8 dereferenceable(280) %0)
  %16 = getelementptr inbounds i8, ptr %0, i64 280
  %17 = getelementptr inbounds i8, ptr %0, i64 304
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %16, i8 0, i64 16, i1 false)
  invoke void @_ZN8powerDefC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %17)
          to label %18 unwind label %37

18:                                               ; preds = %15
  %19 = zext i1 %13 to i8
  %20 = zext i1 %12 to i8
  %21 = getelementptr inbounds i8, ptr %0, i64 440
  store i32 %11, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %0, i64 464
  store double %2, ptr %22, align 8, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %0, i64 472
  store double %3, ptr %23, align 8, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %0, i64 480
  store i32 %4, ptr %24, align 8, !tbaa !21
  %25 = getelementptr inbounds i8, ptr %0, i64 484
  store i32 %5, ptr %25, align 4, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %0, i64 488
  store i32 %6, ptr %26, align 8, !tbaa !23
  %27 = getelementptr inbounds i8, ptr %0, i64 492
  store i32 %7, ptr %27, align 4, !tbaa !24
  %28 = getelementptr inbounds i8, ptr %0, i64 496
  store i32 %8, ptr %28, align 8, !tbaa !25
  %29 = getelementptr inbounds i8, ptr %0, i64 500
  store i32 %9, ptr %29, align 4, !tbaa !26
  %30 = getelementptr inbounds i8, ptr %0, i64 504
  store i32 %10, ptr %30, align 8, !tbaa !27
  %31 = getelementptr inbounds i8, ptr %0, i64 508
  store i8 %20, ptr %31, align 4, !tbaa !28
  %32 = getelementptr inbounds i8, ptr %0, i64 509
  store i8 %19, ptr %32, align 1, !tbaa !29
  %33 = getelementptr inbounds i8, ptr %0, i64 512
  store i32 %1, ptr %33, align 8, !tbaa !30
  %34 = getelementptr inbounds i8, ptr %0, i64 536
  store ptr %14, ptr %34, align 8, !tbaa !31
  %35 = icmp sgt i32 %9, 1
  %36 = icmp sgt i32 %10, 1
  %or.cond = and i1 %35, %36
  br i1 %or.cond, label %39, label %.critedge

.critedge:                                        ; preds = %18
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 53, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE) #6
  unreachable

37:                                               ; preds = %.invoke18, %.invoke, %57, %15
  %38 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN9ComponentD2Ev(ptr noundef nonnull align 8 dereferenceable(280) %0) #7
  resume { ptr, i32 } %38

39:                                               ; preds = %18
  %40 = getelementptr inbounds i8, ptr %0, i64 296
  store double 0.000000e+00, ptr %40, align 8, !tbaa !32
  %41 = load double, ptr getelementptr inbounds (i8, ptr @g_tp, i64 8), align 8, !tbaa !33
  %42 = getelementptr inbounds i8, ptr %0, i64 520
  store double %41, ptr %42, align 8, !tbaa !40
  %43 = getelementptr inbounds i8, ptr %14, i64 152
  %44 = load double, ptr %43, align 8, !tbaa !41
  %45 = fmul double %41, %44
  %46 = getelementptr inbounds i8, ptr %0, i64 528
  store double %45, ptr %46, align 8, !tbaa !42
  switch i32 %11, label %56 [
    i32 0, label %.invoke18
    i32 1, label %47
    i32 2, label %.invoke
    i32 3, label %48
    i32 4, label %52
  ]

47:                                               ; preds = %39
  br label %.invoke18

48:                                               ; preds = %39
  br label %.invoke18

.invoke18:                                        ; preds = %39, %47, %48
  %.sink22 = phi i32 [ %5, %47 ], [ %6, %48 ], [ %4, %39 ]
  %49 = sitofp i32 %.sink22 to double
  %50 = getelementptr inbounds i8, ptr %0, i64 432
  store double %49, ptr %50, align 8, !tbaa !43
  %51 = getelementptr inbounds i8, ptr %0, i64 424
  store double %49, ptr %51, align 8, !tbaa !44
  invoke void @_ZN6Htree28in_htreeEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
          to label %57 unwind label %37

52:                                               ; preds = %39
  br label %.invoke

.invoke:                                          ; preds = %39, %52
  %.sink26 = phi i32 [ %8, %52 ], [ %7, %39 ]
  %53 = sitofp i32 %.sink26 to double
  %54 = getelementptr inbounds i8, ptr %0, i64 432
  store double %53, ptr %54, align 8, !tbaa !43
  %55 = getelementptr inbounds i8, ptr %0, i64 424
  store double %53, ptr %55, align 8, !tbaa !44
  invoke void @_ZN6Htree29out_htreeEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
          to label %57 unwind label %37

56:                                               ; preds = %39
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 93, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE) #6
  unreachable

57:                                               ; preds = %.invoke18, %.invoke
  %58 = getelementptr inbounds i8, ptr %0, i64 24
  %59 = invoke noundef nonnull align 8 dereferenceable(120) ptr @_ZN8powerDefaSERKS_(ptr noundef nonnull align 8 dereferenceable(120) %17, ptr noundef nonnull align 8 dereferenceable(120) %58)
          to label %60 unwind label %37

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %0, i64 432
  %62 = load double, ptr %61, align 8, !tbaa !43
  %63 = load double, ptr %58, align 8, !tbaa !45
  %64 = fmul double %62, %63
  store double %64, ptr %58, align 8, !tbaa !45
  %65 = fcmp ult double %64, 0.000000e+00
  br i1 %65, label %66, label %67

66:                                               ; preds = %60
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 100, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE) #6
  unreachable

67:                                               ; preds = %60
  %68 = getelementptr inbounds i8, ptr %0, i64 32
  %69 = load double, ptr %68, align 8, !tbaa !46
  %70 = fcmp ult double %69, 0.000000e+00
  br i1 %70, label %71, label %72

71:                                               ; preds = %67
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 101, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6Htree2C2E9Wire_typeddiiiiiii10Htree_typebbPN19TechnologyParameter10DeviceTypeE) #6
  unreachable

72:                                               ; preds = %67
  ret void
}

declare void @_ZN9ComponentC2Ev(ptr noundef nonnull align 8 dereferenceable(280)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8powerDefC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Htree28in_htreeEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Htree29out_htreeEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(120) ptr @_ZN8powerDefaSERKS_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { 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 #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 = { noreturn 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !14, i64 440}
!6 = !{!"_ZTS6Htree2", !7, i64 0, !9, i64 280, !9, i64 288, !9, i64 296, !12, i64 304, !9, i64 424, !9, i64 432, !14, i64 440, !9, i64 448, !9, i64 456, !9, i64 464, !9, i64 472, !15, i64 480, !15, i64 484, !15, i64 488, !15, i64 492, !15, i64 496, !15, i64 500, !15, i64 504, !16, i64 508, !16, i64 509, !17, i64 512, !9, i64 520, !9, i64 528, !18, i64 536}
!7 = !{!"_ZTS9Component", !8, i64 0, !12, i64 24, !12, i64 144, !9, i64 264, !9, i64 272}
!8 = !{!"_ZTS4Area", !9, i64 0, !9, i64 8, !9, i64 16}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTS8powerDef", !13, i64 0, !13, i64 40, !13, i64 80}
!13 = !{!"_ZTS15powerComponents", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32}
!14 = !{!"_ZTS10Htree_type", !10, i64 0}
!15 = !{!"int", !10, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = !{!"_ZTS9Wire_type", !10, i64 0}
!18 = !{!"any pointer", !10, i64 0}
!19 = !{!6, !9, i64 464}
!20 = !{!6, !9, i64 472}
!21 = !{!6, !15, i64 480}
!22 = !{!6, !15, i64 484}
!23 = !{!6, !15, i64 488}
!24 = !{!6, !15, i64 492}
!25 = !{!6, !15, i64 496}
!26 = !{!6, !15, i64 500}
!27 = !{!6, !15, i64 504}
!28 = !{!6, !16, i64 508}
!29 = !{!6, !16, i64 509}
!30 = !{!6, !17, i64 512}
!31 = !{!6, !18, i64 536}
!32 = !{!6, !9, i64 296}
!33 = !{!34, !9, i64 8}
!34 = !{!"_ZTS19TechnologyParameter", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !9, i64 88, !9, i64 96, !9, i64 104, !9, i64 112, !9, i64 120, !9, i64 128, !9, i64 136, !9, i64 144, !9, i64 152, !9, i64 160, !9, i64 168, !9, i64 176, !9, i64 184, !9, i64 192, !9, i64 200, !9, i64 208, !9, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !9, i64 272, !9, i64 280, !9, i64 288, !9, i64 296, !9, i64 304, !9, i64 312, !9, i64 320, !9, i64 328, !9, i64 336, !9, i64 344, !35, i64 352, !36, i64 360, !36, i64 528, !36, i64 696, !36, i64 864, !36, i64 1032, !37, i64 1200, !37, i64 1264, !37, i64 1328, !38, i64 1392, !39, i64 1416, !39, i64 1464, !39, i64 1512}
!35 = !{!"long", !10, i64 0}
!36 = !{!"_ZTSN19TechnologyParameter10DeviceTypeE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !9, i64 88, !9, i64 96, !9, i64 104, !9, i64 112, !9, i64 120, !9, i64 128, !9, i64 136, !9, i64 144, !9, i64 152, !9, i64 160}
!37 = !{!"_ZTSN19TechnologyParameter16InterconnectTypeE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !9, i64 48, !9, i64 56}
!38 = !{!"_ZTSN19TechnologyParameter13ScalingFactorE", !9, i64 0, !9, i64 8, !9, i64 16}
!39 = !{!"_ZTSN19TechnologyParameter10MemoryTypeE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40}
!40 = !{!6, !9, i64 520}
!41 = !{!36, !9, i64 152}
!42 = !{!6, !9, i64 528}
!43 = !{!6, !9, i64 432}
!44 = !{!6, !9, i64 424}
!45 = !{!7, !9, i64 24}
!46 = !{!7, !9, i64 32}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass