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

; 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

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 uwtable
define dso_local void @_ZN7Decoder16leakage_feedbackEd(ptr noundef nonnull align 8 dereferenceable(656) %0, double noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %8 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  %9 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 1
  %10 = load i8, ptr %9, align 8, !tbaa !11, !range !19, !noundef !20
  %11 = trunc i8 %10 to i1
  br i1 %11, label %12, label %117

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

16:                                               ; preds = %12
  %17 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 7
  %18 = getelementptr inbounds [20 x double], ptr %17, i64 0, i64 0
  %19 = load double, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 8
  %21 = getelementptr inbounds [20 x double], ptr %20, i64 0, i64 0
  %22 = load double, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 11
  %24 = load i8, ptr %23, align 1, !tbaa !22, !range !19, !noundef !20
  %25 = trunc i8 %24 to i1
  %26 = call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %19, double noundef %22, i32 noundef 2, i32 noundef 3, i1 noundef zeroext %25, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %26, ptr %5, align 8, !tbaa !9
  %27 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 7
  %28 = getelementptr inbounds [20 x double], ptr %27, i64 0, i64 0
  %29 = load double, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 8
  %31 = getelementptr inbounds [20 x double], ptr %30, i64 0, i64 0
  %32 = load double, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 11
  %34 = load i8, ptr %33, align 1, !tbaa !22, !range !19, !noundef !20
  %35 = trunc i8 %34 to i1
  %36 = call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %29, double noundef %32, i32 noundef 2, i32 noundef 3, i1 noundef zeroext %35, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %36, ptr %6, align 8, !tbaa !9
  br label %63

37:                                               ; preds = %12
  %38 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 2
  %39 = load i32, ptr %38, align 4, !tbaa !21
  %40 = icmp eq i32 %39, 3
  br i1 %40, label %41, label %62

41:                                               ; preds = %37
  %42 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 7
  %43 = getelementptr inbounds [20 x double], ptr %42, i64 0, i64 0
  %44 = load double, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 8
  %46 = getelementptr inbounds [20 x double], ptr %45, i64 0, i64 0
  %47 = load double, ptr %46, align 8, !tbaa !9
  %48 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 11
  %49 = load i8, ptr %48, align 1, !tbaa !22, !range !19, !noundef !20
  %50 = trunc i8 %49 to i1
  %51 = call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %44, double noundef %47, i32 noundef 3, i32 noundef 3, i1 noundef zeroext %50, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %51, ptr %5, align 8, !tbaa !9
  %52 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 7
  %53 = getelementptr inbounds [20 x double], ptr %52, i64 0, i64 0
  %54 = load double, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 8
  %56 = getelementptr inbounds [20 x double], ptr %55, i64 0, i64 0
  %57 = load double, ptr %56, align 8, !tbaa !9
  %58 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 11
  %59 = load i8, ptr %58, align 1, !tbaa !22, !range !19, !noundef !20
  %60 = trunc i8 %59 to i1
  %61 = call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %54, double noundef %57, i32 noundef 3, i32 noundef 3, i1 noundef zeroext %60, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %61, ptr %6, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %41, %37
  br label %63

63:                                               ; preds = %62, %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 1, ptr %7, align 4, !tbaa !23
  br label %64

64:                                               ; preds = %101, %63
  %65 = load i32, ptr %7, align 4, !tbaa !23
  %66 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 5
  %67 = load i32, ptr %66, align 8, !tbaa !24
  %68 = icmp slt i32 %65, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %104

70:                                               ; preds = %64
  %71 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 7
  %72 = load i32, ptr %7, align 4, !tbaa !23
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [20 x double], ptr %71, i64 0, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 8
  %77 = load i32, ptr %7, align 4, !tbaa !23
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [20 x double], ptr %76, i64 0, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !9
  %81 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 11
  %82 = load i8, ptr %81, align 1, !tbaa !22, !range !19, !noundef !20
  %83 = trunc i8 %82 to i1
  %84 = call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %75, double noundef %80, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %83, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %85 = load double, ptr %5, align 8, !tbaa !9
  %86 = fadd double %85, %84
  store double %86, ptr %5, align 8, !tbaa !9
  %87 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 7
  %88 = load i32, ptr %7, align 4, !tbaa !23
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [20 x double], ptr %87, i64 0, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !9
  %92 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 8
  %93 = load i32, ptr %7, align 4, !tbaa !23
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [20 x double], ptr %92, i64 0, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !9
  %97 = getelementptr inbounds %class.Decoder, ptr %8, i32 0, i32 11
  %98 = load i8, ptr %97, align 1, !tbaa !22, !range !19, !noundef !20
  %99 = trunc i8 %98 to i1
  %100 = call noundef double @_Z15cmos_Ig_leakageddi9Gate_typebbb17Half_net_topology(double noundef %91, double noundef %96, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %99, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  store double %100, ptr %6, align 8, !tbaa !9
  br label %101

101:                                              ; preds = %70
  %102 = load i32, ptr %7, align 4, !tbaa !23
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %7, align 4, !tbaa !23
  br label %64, !llvm.loop !25

104:                                              ; preds = %69
  %105 = load double, ptr %5, align 8, !tbaa !9
  %106 = 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 !27
  %107 = fmul double %105, %106
  %108 = getelementptr inbounds %class.Component, ptr %8, i32 0, i32 1
  %109 = getelementptr inbounds %class.powerDef, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %class.powerComponents, ptr %109, i32 0, i32 1
  store double %107, ptr %110, align 8, !tbaa !34
  %111 = load double, ptr %6, align 8, !tbaa !9
  %112 = 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 !27
  %113 = fmul double %111, %112
  %114 = getelementptr inbounds %class.Component, ptr %8, i32 0, i32 1
  %115 = getelementptr inbounds %class.powerDef, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds %class.powerComponents, ptr %115, i32 0, i32 2
  store double %113, ptr %116, align 8, !tbaa !35
  br label %117

117:                                              ; preds = %104, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  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 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 = { 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 = !{!12, !17, i64 641}
!23 = !{!18, !18, i64 0}
!24 = !{!12, !18, i64 304}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !10, i64 936}
!28 = !{!"_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, !29, i64 352, !30, i64 360, !30, i64 528, !30, i64 696, !30, i64 864, !30, i64 1032, !31, i64 1200, !31, i64 1264, !31, i64 1328, !32, i64 1392, !33, i64 1416, !33, i64 1464, !33, i64 1512}
!29 = !{!"long", !7, i64 0}
!30 = !{!"_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}
!31 = !{!"_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}
!32 = !{!"_ZTSN19TechnologyParameter13ScalingFactorE", !10, i64 0, !10, i64 8, !10, i64 16}
!33 = !{!"_ZTSN19TechnologyParameter10MemoryTypeE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!34 = !{!13, !10, i64 32}
!35 = !{!13, !10, i64 40}


; 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 @_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 uwtable
define dso_local void @_ZN7Decoder16leakage_feedbackEd(ptr nocapture noundef nonnull align 8 dereferenceable(656) %0, double noundef %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 280
  %4 = load i8, ptr %3, align 8, !tbaa !5, !range !17, !noundef !18
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %52

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

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

23:                                               ; preds = %6, %.sink.split
  %.010 = phi double [ 0.000000e+00, %6 ], [ %17, %.sink.split ]
  %.09 = phi double [ 0.000000e+00, %6 ], [ %22, %.sink.split ]
  %24 = getelementptr inbounds i8, ptr %0, i64 304
  %25 = load i32, ptr %24, align 8, !tbaa !22
  %26 = icmp sgt i32 %25, 1
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %23
  %27 = getelementptr inbounds i8, ptr %0, i64 312
  %28 = getelementptr inbounds i8, ptr %0, i64 472
  %29 = getelementptr inbounds i8, ptr %0, i64 641
  br label %35

._crit_edge:                                      ; preds = %35, %23
  %.111.lcssa = phi double [ %.010, %23 ], [ %43, %35 ]
  %.1.lcssa = phi double [ %.09, %23 ], [ %48, %35 ]
  %30 = load double, ptr getelementptr inbounds (i8, ptr @g_tp, i64 936), align 8, !tbaa !23
  %31 = fmul double %.111.lcssa, %30
  %32 = getelementptr inbounds i8, ptr %0, i64 32
  store double %31, ptr %32, align 8, !tbaa !30
  %33 = fmul double %.1.lcssa, %30
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  store double %33, ptr %34, align 8, !tbaa !31
  br label %52

35:                                               ; preds = %.lr.ph, %35
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %35 ]
  %.11113 = phi double [ %.010, %.lr.ph ], [ %43, %35 ]
  %36 = getelementptr inbounds [20 x double], ptr %27, i64 0, i64 %indvars.iv
  %37 = load double, ptr %36, align 8, !tbaa !20
  %38 = getelementptr inbounds [20 x double], ptr %28, i64 0, i64 %indvars.iv
  %39 = load double, ptr %38, align 8, !tbaa !20
  %40 = load i8, ptr %29, align 1, !tbaa !21, !range !17, !noundef !18
  %41 = trunc nuw i8 %40 to i1
  %42 = tail call noundef double @_Z17cmos_Isub_leakageddi9Gate_typebbb17Half_net_topology(double noundef %37, double noundef %39, i32 noundef 1, i32 noundef 2, i1 noundef zeroext %41, i1 noundef zeroext false, i1 noundef zeroext false, i32 noundef 1)
  %43 = fadd double %.11113, %42
  %44 = load double, ptr %36, align 8, !tbaa !20
  %45 = load double, ptr %38, align 8, !tbaa !20
  %46 = load i8, ptr %29, align 1, !tbaa !21, !range !17, !noundef !18
  %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)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = load i32, ptr %24, align 8, !tbaa !22
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next, %50
  br i1 %51, label %35, label %._crit_edge, !llvm.loop !32

52:                                               ; preds = %._crit_edge, %2
  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 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 = !{!"_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 = !{!6, !14, i64 641}
!22 = !{!6, !15, i64 304}
!23 = !{!24, !9, i64 936}
!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 = !{!7, !9, i64 32}
!31 = !{!7, !9, i64 40}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


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