; LLVM IR from gem5/gem5 :: ext/mcpat/cacti/decoder.ll (ZN7Decoder12compute_areaEv)

; 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.Decoder = type { %class.Component, i8, i32, double, double, i32, i32, [20 x double], [20 x double], double, i8, i8, i8, 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 }

@g_tp = external global %class.TechnologyParameter, align 8

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Decoder12compute_areaEv(ptr noundef nonnull align 8 dereferenceable(656) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  store double 0.000000e+00, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  store double 0.000000e+00, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  %8 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 1
  %9 = load i8, ptr %8, align 8, !tbaa !11, !range !19, !noundef !20
  %10 = trunc i8 %9 to i1
  br i1 %10, label %11, label %159

11:                                               ; preds = %1
  %12 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 2
  %13 = load i32, ptr %12, align 4, !tbaa !21
  %14 = icmp eq i32 %13, 2
  br i1 %14, label %15, label %46

15:                                               ; preds = %11
  %16 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %17 = getelementptr inbounds [20 x double], ptr %16, i64 0, i64 0
  %18 = load double, ptr %17, align 8, !tbaa !9
  %19 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %20 = getelementptr inbounds [20 x double], ptr %19, i64 0, i64 0
  %21 = load double, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds %class.Component, ptr %7, i32 0, i32 0
  %23 = getelementptr inbounds %class.Area, ptr %22, i32 0, i32 1
  %24 = load double, ptr %23, align 8, !tbaa !22
  %25 = call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %7, i32 noundef 2, i32 noundef 2, double noundef %18, double noundef %21, double noundef %24)
  store double %25, ptr %3, align 8, !tbaa !9
  %26 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %27 = getelementptr inbounds [20 x double], ptr %26, i64 0, i64 0
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %30 = getelementptr inbounds [20 x double], ptr %29, i64 0, i64 0
  %31 = load double, ptr %30, align 8, !tbaa !9
  %32 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 11
  %33 = load i8, ptr %32, align 1, !tbaa !23, !range !19, !noundef !20
  %34 = trunc i8 %33 to i1
  %35 = call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %28, double noundef %31, i32 noundef 2, i32 noundef 3, i1 noundef zeroext %34, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %35, ptr %4, align 8, !tbaa !9
  %36 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %37 = getelementptr inbounds [20 x double], ptr %36, i64 0, i64 0
  %38 = load double, ptr %37, align 8, !tbaa !9
  %39 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %40 = getelementptr inbounds [20 x double], ptr %39, i64 0, i64 0
  %41 = load double, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 11
  %43 = load i8, ptr %42, align 1, !tbaa !23, !range !19, !noundef !20
  %44 = trunc i8 %43 to i1
  %45 = call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %38, double noundef %41, i32 noundef 2, i32 noundef 3, i1 noundef zeroext %44, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %45, ptr %5, align 8, !tbaa !9
  br label %82

46:                                               ; preds = %11
  %47 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !21
  %49 = icmp eq i32 %48, 3
  br i1 %49, label %50, label %81

50:                                               ; preds = %46
  %51 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %52 = getelementptr inbounds [20 x double], ptr %51, i64 0, i64 0
  %53 = load double, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %55 = getelementptr inbounds [20 x double], ptr %54, i64 0, i64 0
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds %class.Component, ptr %7, i32 0, i32 0
  %58 = getelementptr inbounds %class.Area, ptr %57, i32 0, i32 1
  %59 = load double, ptr %58, align 8, !tbaa !22
  %60 = call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %7, i32 noundef 2, i32 noundef 3, double noundef %53, double noundef %56, double noundef %59)
  store double %60, ptr %3, align 8, !tbaa !9
  %61 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %62 = getelementptr inbounds [20 x double], ptr %61, i64 0, i64 0
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %65 = getelementptr inbounds [20 x double], ptr %64, i64 0, i64 0
  %66 = load double, ptr %65, align 8, !tbaa !9
  %67 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 11
  %68 = load i8, ptr %67, align 1, !tbaa !23, !range !19, !noundef !20
  %69 = trunc i8 %68 to i1
  %70 = call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %63, double noundef %66, i32 noundef 3, i32 noundef 3, i1 noundef zeroext %69, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %70, ptr %4, align 8, !tbaa !9
  %71 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %72 = getelementptr inbounds [20 x double], ptr %71, i64 0, i64 0
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %75 = getelementptr inbounds [20 x double], ptr %74, i64 0, i64 0
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 11
  %78 = load i8, ptr %77, align 1, !tbaa !23, !range !19, !noundef !20
  %79 = trunc i8 %78 to i1
  %80 = call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %73, double noundef %76, i32 noundef 3, i32 noundef 3, i1 noundef zeroext %79, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %80, ptr %5, align 8, !tbaa !9
  br label %81

81:                                               ; preds = %50, %46
  br label %82

82:                                               ; preds = %81, %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 1, ptr %6, align 4, !tbaa !24
  br label %83

83:                                               ; preds = %136, %82
  %84 = load i32, ptr %6, align 4, !tbaa !24
  %85 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 5
  %86 = load i32, ptr %85, align 8, !tbaa !25
  %87 = icmp slt i32 %84, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %139

89:                                               ; preds = %83
  %90 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %91 = load i32, ptr %6, align 4, !tbaa !24
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [20 x double], ptr %90, i64 0, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !9
  %95 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %96 = load i32, ptr %6, align 4, !tbaa !24
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [20 x double], ptr %95, i64 0, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !9
  %100 = getelementptr inbounds %class.Component, ptr %7, i32 0, i32 0
  %101 = getelementptr inbounds %class.Area, ptr %100, i32 0, i32 1
  %102 = load double, ptr %101, align 8, !tbaa !22
  %103 = call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %7, i32 noundef 0, i32 noundef 1, double noundef %94, double noundef %99, double noundef %102)
  %104 = load double, ptr %3, align 8, !tbaa !9
  %105 = fadd double %104, %103
  store double %105, ptr %3, align 8, !tbaa !9
  %106 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %107 = load i32, ptr %6, align 4, !tbaa !24
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [20 x double], ptr %106, i64 0, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %112 = load i32, ptr %6, align 4, !tbaa !24
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [20 x double], ptr %111, i64 0, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !9
  %116 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 11
  %117 = load i8, ptr %116, align 1, !tbaa !23, !range !19, !noundef !20
  %118 = trunc i8 %117 to i1
  %119 = call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %110, double noundef %115, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %118, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %120 = load double, ptr %4, align 8, !tbaa !9
  %121 = fadd double %120, %119
  store double %121, ptr %4, align 8, !tbaa !9
  %122 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 7
  %123 = load i32, ptr %6, align 4, !tbaa !24
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [20 x double], ptr %122, i64 0, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !9
  %127 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 8
  %128 = load i32, ptr %6, align 4, !tbaa !24
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [20 x double], ptr %127, i64 0, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !9
  %132 = getelementptr inbounds %class.Decoder, ptr %7, i32 0, i32 11
  %133 = load i8, ptr %132, align 1, !tbaa !23, !range !19, !noundef !20
  %134 = trunc i8 %133 to i1
  %135 = call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %126, double noundef %131, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %134, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %135, ptr %5, align 8, !tbaa !9
  br label %136

136:                                              ; preds = %89
  %137 = load i32, ptr %6, align 4, !tbaa !24
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %6, align 4, !tbaa !24
  br label %83, !llvm.loop !26

139:                                              ; preds = %88
  %140 = load double, ptr %4, align 8, !tbaa !9
  %141 = load double, ptr getelementptr inbounds (%"class.TechnologyParameter::DeviceType", ptr getelementptr inbounds (%class.TechnologyParameter, ptr @g_tp, i32 0, i32 48), i32 0, i32 9), align 8, !tbaa !28
  %142 = fmul double %140, %141
  %143 = getelementptr inbounds %class.Component, ptr %7, i32 0, i32 1
  %144 = getelementptr inbounds %class.powerDef, ptr %143, i32 0, i32 0
  %145 = getelementptr inbounds %class.powerComponents, ptr %144, i32 0, i32 1
  store double %142, ptr %145, align 8, !tbaa !35
  %146 = load double, ptr %5, align 8, !tbaa !9
  %147 = load double, ptr getelementptr inbounds (%"class.TechnologyParameter::DeviceType", ptr getelementptr inbounds (%class.TechnologyParameter, ptr @g_tp, i32 0, i32 48), i32 0, i32 9), align 8, !tbaa !28
  %148 = fmul double %146, %147
  %149 = getelementptr inbounds %class.Component, ptr %7, 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 2
  store double %148, ptr %151, align 8, !tbaa !36
  %152 = load double, ptr %3, align 8, !tbaa !9
  %153 = getelementptr inbounds %class.Component, ptr %7, i32 0, i32 0
  %154 = getelementptr inbounds %class.Area, ptr %153, i32 0, i32 1
  %155 = load double, ptr %154, align 8, !tbaa !22
  %156 = fdiv double %152, %155
  %157 = getelementptr inbounds %class.Component, ptr %7, i32 0, i32 0
  %158 = getelementptr inbounds %class.Area, ptr %157, i32 0, i32 0
  store double %156, ptr %158, align 8, !tbaa !37
  br label %159

159:                                              ; preds = %139, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret void
}

declare noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280), i32 noundef, i32 noundef, double noundef, double noundef, double noundef) #2

declare noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef, double noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, i32 noundef) #2

declare noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef, double noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, i32 noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !17, i64 280}
!12 = !{!"_ZTS7Decoder", !13, i64 0, !17, i64 280, !18, i64 284, !10, i64 288, !10, i64 296, !18, i64 304, !18, i64 308, !7, i64 312, !7, i64 472, !10, i64 632, !17, i64 640, !17, i64 641, !17, i64 642, !6, i64 648}
!13 = !{!"_ZTS9Component", !14, i64 0, !15, i64 24, !15, i64 144, !10, i64 264, !10, i64 272}
!14 = !{!"_ZTS4Area", !10, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!"_ZTS8powerDef", !16, i64 0, !16, i64 40, !16, i64 80}
!16 = !{!"_ZTS15powerComponents", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!12, !18, i64 284}
!22 = !{!13, !10, i64 8}
!23 = !{!12, !17, i64 641}
!24 = !{!18, !18, i64 0}
!25 = !{!12, !18, i64 304}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !10, i64 936}
!29 = !{!"_ZTS19TechnologyParameter", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !30, i64 352, !31, i64 360, !31, i64 528, !31, i64 696, !31, i64 864, !31, i64 1032, !32, i64 1200, !32, i64 1264, !32, i64 1328, !33, i64 1392, !34, i64 1416, !34, i64 1464, !34, i64 1512}
!30 = !{!"long", !7, i64 0}
!31 = !{!"_ZTSN19TechnologyParameter10DeviceTypeE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160}
!32 = !{!"_ZTSN19TechnologyParameter16InterconnectTypeE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!33 = !{!"_ZTSN19TechnologyParameter13ScalingFactorE", !10, i64 0, !10, i64 8, !10, i64 16}
!34 = !{!"_ZTSN19TechnologyParameter10MemoryTypeE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!35 = !{!13, !10, i64 32}
!36 = !{!13, !10, i64 40}
!37 = !{!13, !10, 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.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 }

@g_tp = external local_unnamed_addr global %class.TechnologyParameter, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Decoder12compute_areaEv(ptr noundef nonnull align 8 dereferenceable(656) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 280
  %3 = load i8, ptr %2, align 8, !tbaa !5, !range !17, !noundef !18
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %5, label %65

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 284
  %7 = load i32, ptr %6, align 4, !tbaa !19
  %8 = and i32 %7, -2
  %switch = icmp eq i32 %8, 2
  br i1 %switch, label %.sink.split, label %27

.sink.split:                                      ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 472
  %10 = load double, ptr %9, align 8, !tbaa !20
  %11 = getelementptr inbounds i8, ptr %0, i64 312
  %12 = load double, ptr %11, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load double, ptr %13, align 8, !tbaa !21
  %15 = tail call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %0, i32 noundef 2, i32 noundef %7, double noundef %10, double noundef %12, double noundef %14)
  %16 = load double, ptr %11, align 8, !tbaa !20
  %17 = load double, ptr %9, align 8, !tbaa !20
  %18 = getelementptr inbounds i8, ptr %0, i64 641
  %19 = load i8, ptr %18, align 1, !tbaa !22, !range !17, !noundef !18
  %20 = trunc nuw i8 %19 to i1
  %21 = tail call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %16, double noundef %17, i32 noundef %7, i32 noundef 3, i1 noundef zeroext %20, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %22 = load double, ptr %11, align 8, !tbaa !20
  %23 = load double, ptr %9, align 8, !tbaa !20
  %24 = load i8, ptr %18, align 1, !tbaa !22, !range !17, !noundef !18
  %25 = trunc nuw i8 %24 to i1
  %26 = tail call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %22, double noundef %23, i32 noundef %7, i32 noundef 3, i1 noundef zeroext %25, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  br label %27

27:                                               ; preds = %5, %.sink.split
  %.016 = phi double [ 0.000000e+00, %5 ], [ %15, %.sink.split ]
  %.014 = phi double [ 0.000000e+00, %5 ], [ %21, %.sink.split ]
  %.013 = phi double [ 0.000000e+00, %5 ], [ %26, %.sink.split ]
  %28 = getelementptr inbounds i8, ptr %0, i64 304
  %29 = load i32, ptr %28, align 8, !tbaa !23
  %30 = icmp sgt i32 %29, 1
  br i1 %30, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %27
  %31 = getelementptr inbounds i8, ptr %0, i64 472
  %32 = getelementptr inbounds i8, ptr %0, i64 312
  %33 = getelementptr inbounds i8, ptr %0, i64 8
  %34 = getelementptr inbounds i8, ptr %0, i64 641
  br label %43

._crit_edge:                                      ; preds = %43, %27
  %.117.lcssa = phi double [ %.016, %27 ], [ %50, %43 ]
  %.115.lcssa = phi double [ %.014, %27 ], [ %56, %43 ]
  %.1.lcssa = phi double [ %.013, %27 ], [ %61, %43 ]
  %35 = load double, ptr getelementptr inbounds (i8, ptr @g_tp, i64 936), align 8, !tbaa !24
  %36 = fmul double %.115.lcssa, %35
  %37 = getelementptr inbounds i8, ptr %0, i64 32
  store double %36, ptr %37, align 8, !tbaa !31
  %38 = fmul double %.1.lcssa, %35
  %39 = getelementptr inbounds i8, ptr %0, i64 40
  store double %38, ptr %39, align 8, !tbaa !32
  %40 = getelementptr inbounds i8, ptr %0, i64 8
  %41 = load double, ptr %40, align 8, !tbaa !21
  %42 = fdiv double %.117.lcssa, %41
  store double %42, ptr %0, align 8, !tbaa !33
  br label %65

43:                                               ; preds = %.lr.ph, %43
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %43 ]
  %.11520 = phi double [ %.014, %.lr.ph ], [ %56, %43 ]
  %.11719 = phi double [ %.016, %.lr.ph ], [ %50, %43 ]
  %44 = getelementptr inbounds [20 x double], ptr %31, i64 0, i64 %indvars.iv
  %45 = load double, ptr %44, align 8, !tbaa !20
  %46 = getelementptr inbounds [20 x double], ptr %32, i64 0, i64 %indvars.iv
  %47 = load double, ptr %46, align 8, !tbaa !20
  %48 = load double, ptr %33, align 8, !tbaa !21
  %49 = tail call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %0, i32 noundef 0, i32 noundef 1, double noundef %45, double noundef %47, double noundef %48)
  %50 = fadd double %.11719, %49
  %51 = load double, ptr %46, align 8, !tbaa !20
  %52 = load double, ptr %44, align 8, !tbaa !20
  %53 = load i8, ptr %34, align 1, !tbaa !22, !range !17, !noundef !18
  %54 = trunc nuw i8 %53 to i1
  %55 = tail call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %51, double noundef %52, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %54, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %56 = fadd double %.11520, %55
  %57 = load double, ptr %46, align 8, !tbaa !20
  %58 = load double, ptr %44, align 8, !tbaa !20
  %59 = load i8, ptr %34, align 1, !tbaa !22, !range !17, !noundef !18
  %60 = trunc nuw i8 %59 to i1
  %61 = tail call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %57, double noundef %58, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %60, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %62 = load i32, ptr %28, align 8, !tbaa !23
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv.next, %63
  br i1 %64, label %43, label %._crit_edge, !llvm.loop !34

65:                                               ; preds = %._crit_edge, %1
  ret void
}

declare noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280), i32 noundef, i32 noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1

declare noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef, double noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, i32 noundef) local_unnamed_addr #1

declare noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef, double noundef, i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, i32 noundef) local_unnamed_addr #1

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" }

!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 280}
!6 = !{!"_ZTS7Decoder", !7, i64 0, !14, i64 280, !15, i64 284, !9, i64 288, !9, i64 296, !15, i64 304, !15, i64 308, !10, i64 312, !10, i64 472, !9, i64 632, !14, i64 640, !14, i64 641, !14, i64 642, !16, i64 648}
!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 = !{!"bool", !10, i64 0}
!15 = !{!"int", !10, i64 0}
!16 = !{!"any pointer", !10, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!6, !15, i64 284}
!20 = !{!9, !9, i64 0}
!21 = !{!7, !9, i64 8}
!22 = !{!6, !14, i64 641}
!23 = !{!6, !15, i64 304}
!24 = !{!25, !9, i64 936}
!25 = !{!"_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, !26, i64 352, !27, i64 360, !27, i64 528, !27, i64 696, !27, i64 864, !27, i64 1032, !28, i64 1200, !28, i64 1264, !28, i64 1328, !29, i64 1392, !30, i64 1416, !30, i64 1464, !30, i64 1512}
!26 = !{!"long", !10, i64 0}
!27 = !{!"_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}
!28 = !{!"_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}
!29 = !{!"_ZTSN19TechnologyParameter13ScalingFactorE", !9, i64 0, !9, i64 8, !9, i64 16}
!30 = !{!"_ZTSN19TechnologyParameter10MemoryTypeE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40}
!31 = !{!7, !9, i64 32}
!32 = !{!7, !9, i64 40}
!33 = !{!7, !9, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


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