; LLVM IR from gem5/gem5 :: ext/mcpat/cacti/decoder.ll (ZN12PredecBlkDrv12compute_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.PredecBlkDrv = type { %class.Component, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, [20 x double], [20 x double], [20 x double], [20 x double], double, double, %class.powerDef, %class.powerDef, ptr, ptr, i8, i32 }
%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

declare noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280), i32 noundef, i32 noundef, double noundef, double noundef, double noundef) #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) #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) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Area8set_areaEd(ptr noundef nonnull align 8 dereferenceable(24), double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12PredecBlkDrv12compute_areaEv(ptr noundef nonnull align 8 dereferenceable(1280) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store double 0.000000e+00, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store double 0.000000e+00, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  %12 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 1
  %13 = load i32, ptr %12, align 8, !tbaa !11
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %215

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !19
  br label %16

16:                                               ; preds = %69, %15
  %17 = load i32, ptr %9, align 4, !tbaa !19
  %18 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 3
  %19 = load i32, ptr %18, align 8, !tbaa !20
  %20 = icmp slt i32 %17, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %72

22:                                               ; preds = %16
  %23 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 17
  %24 = load i32, ptr %9, align 4, !tbaa !19
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [20 x double], ptr %23, i64 0, i64 %25
  %27 = load double, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 16
  %29 = load i32, ptr %9, align 4, !tbaa !19
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [20 x double], ptr %28, i64 0, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !9
  %33 = load double, ptr getelementptr inbounds (%class.TechnologyParameter, ptr @g_tp, i32 0, i32 39), align 8, !tbaa !21
  %34 = call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %11, i32 noundef 0, i32 noundef 1, double noundef %27, double noundef %32, double noundef %33)
  %35 = load double, ptr %3, align 8, !tbaa !9
  %36 = fadd double %35, %34
  store double %36, ptr %3, align 8, !tbaa !9
  %37 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 16
  %38 = load i32, ptr %9, align 4, !tbaa !19
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [20 x double], ptr %37, i64 0, i64 %39
  %41 = load double, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 17
  %43 = load i32, ptr %9, align 4, !tbaa !19
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [20 x double], ptr %42, i64 0, i64 %44
  %46 = load double, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 26
  %48 = load i8, ptr %47, align 8, !tbaa !28, !range !29, !noundef !30
  %49 = trunc i8 %48 to i1
  %50 = call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %41, double noundef %46, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %49, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %51 = load double, ptr %5, align 8, !tbaa !9
  %52 = fadd double %51, %50
  store double %52, ptr %5, align 8, !tbaa !9
  %53 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 16
  %54 = load i32, ptr %9, align 4, !tbaa !19
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [20 x double], ptr %53, i64 0, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !9
  %58 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 17
  %59 = load i32, ptr %9, align 4, !tbaa !19
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [20 x double], ptr %58, i64 0, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 26
  %64 = load i8, ptr %63, align 8, !tbaa !28, !range !29, !noundef !30
  %65 = trunc i8 %64 to i1
  %66 = call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %57, double noundef %62, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %65, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %67 = load double, ptr %7, align 8, !tbaa !9
  %68 = fadd double %67, %66
  store double %68, ptr %7, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %22
  %70 = load i32, ptr %9, align 4, !tbaa !19
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %9, align 4, !tbaa !19
  br label %16, !llvm.loop !31

72:                                               ; preds = %21
  %73 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 6
  %74 = load i32, ptr %73, align 4, !tbaa !33
  %75 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 7
  %76 = load i32, ptr %75, align 8, !tbaa !34
  %77 = add nsw i32 %74, %76
  %78 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 8
  %79 = load i32, ptr %78, align 4, !tbaa !35
  %80 = add nsw i32 %77, %79
  %81 = sitofp i32 %80 to double
  %82 = load double, ptr %3, align 8, !tbaa !9
  %83 = fmul double %82, %81
  store double %83, ptr %3, align 8, !tbaa !9
  %84 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 6
  %85 = load i32, ptr %84, align 4, !tbaa !33
  %86 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 7
  %87 = load i32, ptr %86, align 8, !tbaa !34
  %88 = add nsw i32 %85, %87
  %89 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 8
  %90 = load i32, ptr %89, align 4, !tbaa !35
  %91 = add nsw i32 %88, %90
  %92 = sitofp i32 %91 to double
  %93 = load double, ptr %5, align 8, !tbaa !9
  %94 = fmul double %93, %92
  store double %94, ptr %5, align 8, !tbaa !9
  %95 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 6
  %96 = load i32, ptr %95, align 4, !tbaa !33
  %97 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 7
  %98 = load i32, ptr %97, align 8, !tbaa !34
  %99 = add nsw i32 %96, %98
  %100 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 8
  %101 = load i32, ptr %100, align 4, !tbaa !35
  %102 = add nsw i32 %99, %101
  %103 = sitofp i32 %102 to double
  %104 = load double, ptr %7, align 8, !tbaa !9
  %105 = fmul double %104, %103
  store double %105, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !19
  br label %106

106:                                              ; preds = %159, %72
  %107 = load i32, ptr %10, align 4, !tbaa !19
  %108 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 4
  %109 = load i32, ptr %108, align 4, !tbaa !36
  %110 = icmp slt i32 %107, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %162

112:                                              ; preds = %106
  %113 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 19
  %114 = load i32, ptr %10, align 4, !tbaa !19
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [20 x double], ptr %113, i64 0, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !9
  %118 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 18
  %119 = load i32, ptr %10, align 4, !tbaa !19
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [20 x double], ptr %118, i64 0, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !9
  %123 = load double, ptr getelementptr inbounds (%class.TechnologyParameter, ptr @g_tp, i32 0, i32 39), align 8, !tbaa !21
  %124 = call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %11, i32 noundef 0, i32 noundef 1, double noundef %117, double noundef %122, double noundef %123)
  %125 = load double, ptr %4, align 8, !tbaa !9
  %126 = fadd double %125, %124
  store double %126, ptr %4, align 8, !tbaa !9
  %127 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 18
  %128 = load i32, ptr %10, align 4, !tbaa !19
  %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.PredecBlkDrv, ptr %11, i32 0, i32 19
  %133 = load i32, ptr %10, align 4, !tbaa !19
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [20 x double], ptr %132, i64 0, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !9
  %137 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 26
  %138 = load i8, ptr %137, align 8, !tbaa !28, !range !29, !noundef !30
  %139 = trunc i8 %138 to i1
  %140 = call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %131, double noundef %136, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %139, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %141 = load double, ptr %6, align 8, !tbaa !9
  %142 = fadd double %141, %140
  store double %142, ptr %6, align 8, !tbaa !9
  %143 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 18
  %144 = load i32, ptr %10, align 4, !tbaa !19
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [20 x double], ptr %143, i64 0, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !9
  %148 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 19
  %149 = load i32, ptr %10, align 4, !tbaa !19
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [20 x double], ptr %148, i64 0, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !9
  %153 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 26
  %154 = load i8, ptr %153, align 8, !tbaa !28, !range !29, !noundef !30
  %155 = trunc i8 %154 to i1
  %156 = call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %147, double noundef %152, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %155, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %157 = load double, ptr %8, align 8, !tbaa !9
  %158 = fadd double %157, %156
  store double %158, ptr %8, align 8, !tbaa !9
  br label %159

159:                                              ; preds = %112
  %160 = load i32, ptr %10, align 4, !tbaa !19
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %10, align 4, !tbaa !19
  br label %106, !llvm.loop !37

162:                                              ; preds = %111
  %163 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 9
  %164 = load i32, ptr %163, align 8, !tbaa !38
  %165 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 10
  %166 = load i32, ptr %165, align 4, !tbaa !39
  %167 = add nsw i32 %164, %166
  %168 = sitofp i32 %167 to double
  %169 = load double, ptr %4, align 8, !tbaa !9
  %170 = fmul double %169, %168
  store double %170, ptr %4, align 8, !tbaa !9
  %171 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 9
  %172 = load i32, ptr %171, align 8, !tbaa !38
  %173 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 10
  %174 = load i32, ptr %173, align 4, !tbaa !39
  %175 = add nsw i32 %172, %174
  %176 = sitofp i32 %175 to double
  %177 = load double, ptr %6, align 8, !tbaa !9
  %178 = fmul double %177, %176
  store double %178, ptr %6, align 8, !tbaa !9
  %179 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 9
  %180 = load i32, ptr %179, align 8, !tbaa !38
  %181 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 10
  %182 = load i32, ptr %181, align 4, !tbaa !39
  %183 = add nsw i32 %180, %182
  %184 = sitofp i32 %183 to double
  %185 = load double, ptr %8, align 8, !tbaa !9
  %186 = fmul double %185, %184
  store double %186, ptr %8, align 8, !tbaa !9
  %187 = load double, ptr %5, align 8, !tbaa !9
  %188 = 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 !40
  %189 = fmul double %187, %188
  %190 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 22
  %191 = getelementptr inbounds %class.powerDef, ptr %190, i32 0, i32 0
  %192 = getelementptr inbounds %class.powerComponents, ptr %191, i32 0, i32 1
  store double %189, ptr %192, align 8, !tbaa !41
  %193 = load double, ptr %6, align 8, !tbaa !9
  %194 = 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 !40
  %195 = fmul double %193, %194
  %196 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 23
  %197 = getelementptr inbounds %class.powerDef, ptr %196, i32 0, i32 0
  %198 = getelementptr inbounds %class.powerComponents, ptr %197, i32 0, i32 1
  store double %195, ptr %198, align 8, !tbaa !42
  %199 = load double, ptr %7, align 8, !tbaa !9
  %200 = 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 !40
  %201 = fmul double %199, %200
  %202 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 22
  %203 = getelementptr inbounds %class.powerDef, ptr %202, i32 0, i32 0
  %204 = getelementptr inbounds %class.powerComponents, ptr %203, i32 0, i32 2
  store double %201, ptr %204, align 8, !tbaa !43
  %205 = load double, ptr %8, align 8, !tbaa !9
  %206 = 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 !40
  %207 = fmul double %205, %206
  %208 = getelementptr inbounds %class.PredecBlkDrv, ptr %11, i32 0, i32 23
  %209 = getelementptr inbounds %class.powerDef, ptr %208, i32 0, i32 0
  %210 = getelementptr inbounds %class.powerComponents, ptr %209, i32 0, i32 2
  store double %207, ptr %210, align 8, !tbaa !44
  %211 = getelementptr inbounds %class.Component, ptr %11, i32 0, i32 0
  %212 = load double, ptr %3, align 8, !tbaa !9
  %213 = load double, ptr %4, align 8, !tbaa !9
  %214 = fadd double %212, %213
  call void @_ZN4Area8set_areaEd(ptr noundef nonnull align 8 dereferenceable(24) %211, double noundef %214)
  br label %215

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"_ZTS12PredecBlkDrv", !13, i64 0, !17, i64 280, !17, i64 284, !17, i64 288, !17, i64 292, !17, i64 296, !17, i64 300, !17, i64 304, !17, i64 308, !17, i64 312, !17, i64 316, !17, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !7, i64 360, !7, i64 520, !7, i64 680, !7, i64 840, !10, i64 1000, !10, i64 1008, !15, i64 1016, !15, i64 1136, !6, i64 1256, !6, i64 1264, !18, i64 1272, !17, i64 1276}
!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 = !{!"int", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!17, !17, i64 0}
!20 = !{!12, !17, i64 288}
!21 = !{!22, !10, i64 312}
!22 = !{!"_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, !23, i64 352, !24, i64 360, !24, i64 528, !24, i64 696, !24, i64 864, !24, i64 1032, !25, i64 1200, !25, i64 1264, !25, i64 1328, !26, i64 1392, !27, i64 1416, !27, i64 1464, !27, i64 1512}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_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}
!25 = !{!"_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}
!26 = !{!"_ZTSN19TechnologyParameter13ScalingFactorE", !10, i64 0, !10, i64 8, !10, i64 16}
!27 = !{!"_ZTSN19TechnologyParameter10MemoryTypeE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!28 = !{!12, !18, i64 1272}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!12, !17, i64 300}
!34 = !{!12, !17, i64 304}
!35 = !{!12, !17, i64 308}
!36 = !{!12, !17, i64 292}
!37 = distinct !{!37, !32}
!38 = !{!12, !17, i64 312}
!39 = !{!12, !17, i64 316}
!40 = !{!22, !10, i64 936}
!41 = !{!12, !10, i64 1024}
!42 = !{!12, !10, i64 1144}
!43 = !{!12, !10, i64 1032}
!44 = !{!12, !10, i64 1152}


; 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

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 #0

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 #0

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 #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Area8set_areaEd(ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12PredecBlkDrv12compute_areaEv(ptr noundef nonnull align 8 dereferenceable(1280) %0) local_unnamed_addr #2 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 280
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %98, label %.preheader

.preheader:                                       ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 288
  %5 = load i32, ptr %4, align 8, !tbaa !17
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %7 = getelementptr inbounds i8, ptr %0, i64 520
  %8 = getelementptr inbounds i8, ptr %0, i64 360
  %9 = getelementptr inbounds i8, ptr %0, i64 1272
  br label %30

._crit_edge:                                      ; preds = %30, %.preheader
  %.040.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %38, %30 ]
  %10 = phi <2 x double> [ zeroinitializer, %.preheader ], [ %51, %30 ]
  %11 = getelementptr inbounds i8, ptr %0, i64 300
  %12 = load i32, ptr %11, align 4, !tbaa !18
  %13 = getelementptr inbounds i8, ptr %0, i64 304
  %14 = load i32, ptr %13, align 8, !tbaa !19
  %15 = add nsw i32 %14, %12
  %16 = getelementptr inbounds i8, ptr %0, i64 308
  %17 = load i32, ptr %16, align 4, !tbaa !20
  %18 = add nsw i32 %15, %17
  %19 = sitofp i32 %18 to double
  %20 = fmul double %.040.lcssa, %19
  %21 = insertelement <2 x double> poison, double %19, i64 0
  %22 = shufflevector <2 x double> %21, <2 x double> poison, <2 x i32> zeroinitializer
  %23 = fmul <2 x double> %10, %22
  %24 = getelementptr inbounds i8, ptr %0, i64 292
  %25 = load i32, ptr %24, align 4, !tbaa !21
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph52, label %._crit_edge53

.lr.ph52:                                         ; preds = %._crit_edge
  %27 = getelementptr inbounds i8, ptr %0, i64 840
  %28 = getelementptr inbounds i8, ptr %0, i64 680
  %29 = getelementptr inbounds i8, ptr %0, i64 1272
  br label %73

30:                                               ; preds = %.lr.ph, %30
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %30 ]
  %.04041 = phi double [ 0.000000e+00, %.lr.ph ], [ %38, %30 ]
  %31 = phi <2 x double> [ zeroinitializer, %.lr.ph ], [ %51, %30 ]
  %32 = getelementptr inbounds [20 x double], ptr %7, i64 0, i64 %indvars.iv
  %33 = load double, ptr %32, align 8, !tbaa !22
  %34 = getelementptr inbounds [20 x double], ptr %8, i64 0, i64 %indvars.iv
  %35 = load double, ptr %34, align 8, !tbaa !22
  %36 = load double, ptr getelementptr inbounds (i8, ptr @g_tp, i64 312), align 8, !tbaa !23
  %37 = tail call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %0, i32 noundef 0, i32 noundef 1, double noundef %33, double noundef %35, double noundef %36)
  %38 = fadd double %.04041, %37
  %39 = load double, ptr %34, align 8, !tbaa !22
  %40 = load double, ptr %32, align 8, !tbaa !22
  %41 = load i8, ptr %9, align 8, !tbaa !30, !range !31, !noundef !32
  %42 = trunc nuw i8 %41 to i1
  %43 = tail call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %39, double noundef %40, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %42, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %44 = load double, ptr %34, align 8, !tbaa !22
  %45 = load double, ptr %32, align 8, !tbaa !22
  %46 = load i8, ptr %9, align 8, !tbaa !30, !range !31, !noundef !32
  %47 = trunc nuw i8 %46 to i1
  %48 = tail call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %44, double noundef %45, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %47, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %49 = insertelement <2 x double> poison, double %43, i64 0
  %50 = insertelement <2 x double> %49, double %48, i64 1
  %51 = fadd <2 x double> %31, %50
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = load i32, ptr %4, align 8, !tbaa !17
  %53 = sext i32 %52 to i64
  %54 = icmp slt i64 %indvars.iv.next, %53
  br i1 %54, label %30, label %._crit_edge, !llvm.loop !33

._crit_edge53:                                    ; preds = %73, %._crit_edge
  %.039.lcssa = phi double [ 0.000000e+00, %._crit_edge ], [ %81, %73 ]
  %55 = phi <2 x double> [ zeroinitializer, %._crit_edge ], [ %94, %73 ]
  %56 = getelementptr inbounds i8, ptr %0, i64 312
  %57 = load i32, ptr %56, align 8, !tbaa !35
  %58 = getelementptr inbounds i8, ptr %0, i64 316
  %59 = load i32, ptr %58, align 4, !tbaa !36
  %60 = add nsw i32 %59, %57
  %61 = sitofp i32 %60 to double
  %62 = fmul double %.039.lcssa, %61
  %63 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @g_tp, i64 936), align 8
  %64 = getelementptr inbounds i8, ptr %0, i64 1024
  %65 = getelementptr inbounds i8, ptr %0, i64 1144
  %66 = shufflevector <2 x double> %63, <2 x double> poison, <2 x i32> zeroinitializer
  %67 = fmul <2 x double> %23, %66
  store <2 x double> %67, ptr %64, align 8, !tbaa !22
  %68 = insertelement <2 x double> poison, double %61, i64 0
  %69 = shufflevector <2 x double> %68, <2 x double> poison, <2 x i32> zeroinitializer
  %70 = fmul <2 x double> %55, %69
  %71 = fmul <2 x double> %66, %70
  store <2 x double> %71, ptr %65, align 8, !tbaa !22
  %72 = fadd double %20, %62
  tail call void @_ZN4Area8set_areaEd(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %72)
  br label %98

73:                                               ; preds = %.lr.ph52, %73
  %indvars.iv63 = phi i64 [ 0, %.lr.ph52 ], [ %indvars.iv.next64, %73 ]
  %.03947 = phi double [ 0.000000e+00, %.lr.ph52 ], [ %81, %73 ]
  %74 = phi <2 x double> [ zeroinitializer, %.lr.ph52 ], [ %94, %73 ]
  %75 = getelementptr inbounds [20 x double], ptr %27, i64 0, i64 %indvars.iv63
  %76 = load double, ptr %75, align 8, !tbaa !22
  %77 = getelementptr inbounds [20 x double], ptr %28, i64 0, i64 %indvars.iv63
  %78 = load double, ptr %77, align 8, !tbaa !22
  %79 = load double, ptr getelementptr inbounds (i8, ptr @g_tp, i64 312), align 8, !tbaa !23
  %80 = tail call noundef double @_ZN9Component17compute_gate_areaEiiddd(ptr noundef nonnull align 8 dereferenceable(280) %0, i32 noundef 0, i32 noundef 1, double noundef %76, double noundef %78, double noundef %79)
  %81 = fadd double %.03947, %80
  %82 = load double, ptr %77, align 8, !tbaa !22
  %83 = load double, ptr %75, align 8, !tbaa !22
  %84 = load i8, ptr %29, align 8, !tbaa !30, !range !31, !noundef !32
  %85 = trunc nuw i8 %84 to i1
  %86 = tail call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %82, double noundef %83, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %85, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %87 = load double, ptr %77, align 8, !tbaa !22
  %88 = load double, ptr %75, align 8, !tbaa !22
  %89 = load i8, ptr %29, align 8, !tbaa !30, !range !31, !noundef !32
  %90 = trunc nuw i8 %89 to i1
  %91 = tail call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %87, double noundef %88, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %90, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %92 = insertelement <2 x double> poison, double %86, i64 0
  %93 = insertelement <2 x double> %92, double %91, i64 1
  %94 = fadd <2 x double> %74, %93
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %95 = load i32, ptr %24, align 4, !tbaa !21
  %96 = sext i32 %95 to i64
  %97 = icmp slt i64 %indvars.iv.next64, %96
  br i1 %97, label %73, label %._crit_edge53, !llvm.loop !37

98:                                               ; preds = %._crit_edge53, %1
  ret void
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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" }

!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 = !{!"_ZTS12PredecBlkDrv", !7, i64 0, !14, i64 280, !14, i64 284, !14, i64 288, !14, i64 292, !14, i64 296, !14, i64 300, !14, i64 304, !14, i64 308, !14, i64 312, !14, i64 316, !14, i64 320, !9, i64 328, !9, i64 336, !9, i64 344, !9, i64 352, !10, i64 360, !10, i64 520, !10, i64 680, !10, i64 840, !9, i64 1000, !9, i64 1008, !12, i64 1016, !12, i64 1136, !15, i64 1256, !15, i64 1264, !16, i64 1272, !14, i64 1276}
!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 = !{!"int", !10, i64 0}
!15 = !{!"any pointer", !10, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = !{!6, !14, i64 288}
!18 = !{!6, !14, i64 300}
!19 = !{!6, !14, i64 304}
!20 = !{!6, !14, i64 308}
!21 = !{!6, !14, i64 292}
!22 = !{!9, !9, i64 0}
!23 = !{!24, !9, i64 312}
!24 = !{!"_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, !25, i64 352, !26, i64 360, !26, i64 528, !26, i64 696, !26, i64 864, !26, i64 1032, !27, i64 1200, !27, i64 1264, !27, i64 1328, !28, i64 1392, !29, i64 1416, !29, i64 1464, !29, i64 1512}
!25 = !{!"long", !10, i64 0}
!26 = !{!"_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}
!27 = !{!"_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}
!28 = !{!"_ZTSN19TechnologyParameter13ScalingFactorE", !9, i64 0, !9, i64 8, !9, i64 16}
!29 = !{!"_ZTSN19TechnologyParameter10MemoryTypeE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40}
!30 = !{!6, !16, i64 1272}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!6, !14, i64 312}
!36 = !{!6, !14, i64 316}
!37 = distinct !{!37, !34}


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