; LLVM IR from gem5/gem5 :: ext/mcpat/iocontrollers.ll (ZN14PCIeController14set_pcie_paramEv)

; 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.McPATComponent = type { ptr, %class.Component, ptr, %class.InputParameter, %"class.std::__cxx11::basic_string", double, %"class.std::vector", %class.McPATOutput, %class.statsDef, %class.statsDef, %class.powerDef, %class.powerDef }
%class.Component = type { %class.Area, %class.powerDef, %class.powerDef, double, double }
%class.Area = type { double, double, double }
%class.InputParameter = type { i32, i32, i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i32, i32, i32, i8, i8, i32, i32, i8, double, double, i8, i32, i32, i8 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<McPATComponent *, std::allocator<McPATComponent *>>::_Vector_impl" }
%"struct.std::_Vector_base<McPATComponent *, std::allocator<McPATComponent *>>::_Vector_impl" = type { %"struct.std::_Vector_base<McPATComponent *, std::allocator<McPATComponent *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<McPATComponent *, std::allocator<McPATComponent *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.McPATOutput = type { double, double, double, double, double, double }
%class.statsDef = type { %class.statsComponents, %class.statsComponents, %class.statsComponents, %class.statsComponents, %class.statsComponents, %class.statsComponents, %class.statsComponents }
%class.statsComponents = type { double, double, double }
%class.powerDef = type { %class.powerComponents, %class.powerComponents, %class.powerComponents }
%class.powerComponents = type { double, double, double, double, double }
%class.PCIeController = type { %class.McPATComponent, %class.PCIeParameters, %class.PCIeStatistics }
%class.PCIeParameters = type { double, i32, i32, i8, i32 }
%class.PCIeStatistics = type { double, double }

@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1

; 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 i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

declare noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef) #1

declare noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef) #1

declare void @_ZN14McPATComponent20warnMissingParamNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #3

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

declare void @_ZN14McPATComponent21warnUnrecognizedParamEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) #1

declare void @_ZN14McPATComponent19warnMissingStatNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) #1

declare void @_ZN14McPATComponent20warnUnrecognizedStatEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14PCIeController14set_pcie_paramEv(ptr noundef nonnull align 8 dereferenceable(1392) %0) #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %12 = getelementptr inbounds %class.McPATComponent, ptr %11, i32 0, i32 2
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef @.str.1)
  store i32 %14, ptr %3, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !30
  br label %15

15:                                               ; preds = %87, %1
  %16 = load i32, ptr %4, align 4, !tbaa !30
  %17 = load i32, ptr %3, align 4, !tbaa !30
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %90

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %20 = getelementptr inbounds %class.McPATComponent, ptr %11, i32 0, i32 2
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef @.str.1, ptr noundef %4)
  store ptr %22, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef @.str.2, ptr noundef null)
  store ptr %24, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @.str.3, ptr noundef null)
  store ptr %26, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %32, label %29

29:                                               ; preds = %19
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef @.str.4, ptr noundef null)
  call void @_ZN14McPATComponent20warnMissingParamNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %11, ptr noundef %31)
  br label %86

32:                                               ; preds = %19
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call i32 @strcmp(ptr noundef %33, ptr noundef @.str.12) #6
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %41

36:                                               ; preds = %32
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = call double @atof(ptr noundef %37) #6
  %39 = getelementptr inbounds %class.PCIeController, ptr %11, i32 0, i32 1
  %40 = getelementptr inbounds %class.PCIeParameters, ptr %39, i32 0, i32 0
  store double %38, ptr %40, align 8, !tbaa !31
  br label %85

41:                                               ; preds = %32
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = call i32 @strcmp(ptr noundef %42, ptr noundef @.str.6) #6
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %50

45:                                               ; preds = %41
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = call i32 @atoi(ptr noundef %46) #6
  %48 = getelementptr inbounds %class.PCIeController, ptr %11, i32 0, i32 1
  %49 = getelementptr inbounds %class.PCIeParameters, ptr %48, i32 0, i32 2
  store i32 %47, ptr %49, align 4, !tbaa !35
  br label %84

50:                                               ; preds = %41
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = call i32 @strcmp(ptr noundef %51, ptr noundef @.str.13) #6
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %59

54:                                               ; preds = %50
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = call i32 @atoi(ptr noundef %55) #6
  %57 = getelementptr inbounds %class.PCIeController, ptr %11, i32 0, i32 1
  %58 = getelementptr inbounds %class.PCIeParameters, ptr %57, i32 0, i32 1
  store i32 %56, ptr %58, align 8, !tbaa !36
  br label %83

59:                                               ; preds = %50
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = call i32 @strcmp(ptr noundef %60, ptr noundef @.str.7) #6
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %68

63:                                               ; preds = %59
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = call i32 @atoi(ptr noundef %64) #6
  %66 = getelementptr inbounds %class.PCIeController, ptr %11, i32 0, i32 1
  %67 = getelementptr inbounds %class.PCIeParameters, ptr %66, i32 0, i32 4
  store i32 %65, ptr %67, align 4, !tbaa !37
  br label %82

68:                                               ; preds = %59
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call i32 @strcmp(ptr noundef %69, ptr noundef @.str.14) #6
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %79

72:                                               ; preds = %68
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = call i32 @atoi(ptr noundef %73) #6
  %75 = icmp ne i32 %74, 0
  %76 = getelementptr inbounds %class.PCIeController, ptr %11, i32 0, i32 1
  %77 = getelementptr inbounds %class.PCIeParameters, ptr %76, i32 0, i32 3
  %78 = zext i1 %75 to i8
  store i8 %78, ptr %77, align 8, !tbaa !38
  br label %81

79:                                               ; preds = %68
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent21warnUnrecognizedParamEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %11, ptr noundef %80)
  br label %81

81:                                               ; preds = %79, %72
  br label %82

82:                                               ; preds = %81, %63
  br label %83

83:                                               ; preds = %82, %54
  br label %84

84:                                               ; preds = %83, %45
  br label %85

85:                                               ; preds = %84, %36
  br label %86

86:                                               ; preds = %85, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %4, align 4, !tbaa !30
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %4, align 4, !tbaa !30
  br label %15, !llvm.loop !39

90:                                               ; preds = %15
  %91 = getelementptr inbounds %class.PCIeController, ptr %11, i32 0, i32 1
  %92 = getelementptr inbounds %class.PCIeParameters, ptr %91, i32 0, i32 0
  %93 = load double, ptr %92, align 8, !tbaa !31
  %94 = fmul double %93, 1.000000e+06
  store double %94, ptr %92, align 8, !tbaa !31
  %95 = getelementptr inbounds %class.McPATComponent, ptr %11, i32 0, i32 2
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef @.str.8)
  store i32 %97, ptr %3, align 4, !tbaa !30
  store i32 0, ptr %4, align 4, !tbaa !30
  br label %98

98:                                               ; preds = %138, %90
  %99 = load i32, ptr %4, align 4, !tbaa !30
  %100 = load i32, ptr %3, align 4, !tbaa !30
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %102, label %141

102:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %103 = getelementptr inbounds %class.McPATComponent, ptr %11, i32 0, i32 2
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef @.str.8, ptr noundef %4)
  store ptr %105, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef @.str.2, ptr noundef null)
  store ptr %107, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef @.str.3, ptr noundef null)
  store ptr %109, ptr %10, align 8, !tbaa !5
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = icmp ne ptr %110, null
  br i1 %111, label %115, label %112

112:                                              ; preds = %102
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef @.str.4, ptr noundef null)
  call void @_ZN14McPATComponent19warnMissingStatNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %11, ptr noundef %114)
  br label %137

115:                                              ; preds = %102
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = call i32 @strcmp(ptr noundef %116, ptr noundef @.str.9) #6
  %118 = icmp eq i32 %117, 0
  br i1 %118, label %119, label %124

119:                                              ; preds = %115
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = call double @atof(ptr noundef %120) #6
  %122 = getelementptr inbounds %class.PCIeController, ptr %11, i32 0, i32 2
  %123 = getelementptr inbounds %class.PCIeStatistics, ptr %122, i32 0, i32 0
  store double %121, ptr %123, align 8, !tbaa !41
  br label %136

124:                                              ; preds = %115
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = call i32 @strcmp(ptr noundef %125, ptr noundef @.str.10) #6
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %133

128:                                              ; preds = %124
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = call double @atof(ptr noundef %129) #6
  %131 = getelementptr inbounds %class.PCIeController, ptr %11, i32 0, i32 2
  %132 = getelementptr inbounds %class.PCIeStatistics, ptr %131, i32 0, i32 1
  store double %130, ptr %132, align 8, !tbaa !42
  br label %135

133:                                              ; preds = %124
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN14McPATComponent20warnUnrecognizedStatEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %11, ptr noundef %134)
  br label %135

135:                                              ; preds = %133, %128
  br label %136

136:                                              ; preds = %135, %119
  br label %137

137:                                              ; preds = %136, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %4, align 4, !tbaa !30
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %4, align 4, !tbaa !30
  br label %98, !llvm.loop !43

141:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  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 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind willreturn memory(read) 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 = { 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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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, !6, i64 288}
!10 = !{!"_ZTS14McPATComponent", !11, i64 8, !6, i64 288, !16, i64 296, !20, i64 664, !13, i64 696, !23, i64 704, !27, i64 728, !28, i64 776, !28, i64 944, !14, i64 1112, !14, i64 1232}
!11 = !{!"_ZTS9Component", !12, i64 0, !14, i64 24, !14, i64 144, !13, i64 264, !13, i64 272}
!12 = !{!"_ZTS4Area", !13, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTS8powerDef", !15, i64 0, !15, i64 40, !15, i64 80}
!15 = !{!"_ZTS15powerComponents", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!16 = !{!"_ZTS14InputParameter", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12, !17, i64 16, !18, i64 20, !17, i64 24, !17, i64 28, !17, i64 32, !17, i64 36, !17, i64 40, !17, i64 44, !13, i64 48, !13, i64 56, !17, i64 64, !17, i64 68, !17, i64 72, !17, i64 76, !17, i64 80, !18, i64 84, !18, i64 85, !18, i64 86, !18, i64 87, !18, i64 88, !17, i64 92, !17, i64 96, !17, i64 100, !17, i64 104, !17, i64 108, !17, i64 112, !17, i64 116, !17, i64 120, !17, i64 124, !17, i64 128, !17, i64 132, !17, i64 136, !17, i64 140, !17, i64 144, !17, i64 148, !19, i64 152, !17, i64 156, !18, i64 160, !17, i64 164, !17, i64 168, !17, i64 172, !17, i64 176, !17, i64 180, !17, i64 184, !17, i64 188, !18, i64 192, !17, i64 196, !17, i64 200, !17, i64 204, !17, i64 208, !17, i64 212, !17, i64 216, !17, i64 220, !17, i64 224, !17, i64 228, !17, i64 232, !17, i64 236, !17, i64 240, !17, i64 244, !17, i64 248, !17, i64 252, !17, i64 256, !17, i64 260, !17, i64 264, !17, i64 268, !17, i64 272, !17, i64 276, !17, i64 280, !17, i64 284, !17, i64 288, !17, i64 292, !17, i64 296, !18, i64 300, !17, i64 304, !17, i64 308, !17, i64 312, !18, i64 316, !18, i64 317, !17, i64 320, !17, i64 324, !18, i64 328, !13, i64 336, !13, i64 344, !18, i64 352, !17, i64 356, !17, i64 360, !18, i64 364}
!17 = !{!"int", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTS9Wire_type", !7, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSSt6vectorIP14McPATComponentSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIP14McPATComponentSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP14McPATComponentSaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP14McPATComponentSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTS11McPATOutput", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40}
!28 = !{!"_ZTS8statsDef", !29, i64 0, !29, i64 24, !29, i64 48, !29, i64 72, !29, i64 96, !29, i64 120, !29, i64 144}
!29 = !{!"_ZTS15statsComponents", !13, i64 0, !13, i64 8, !13, i64 16}
!30 = !{!17, !17, i64 0}
!31 = !{!32, !13, i64 1352}
!32 = !{!"_ZTS14PCIeController", !10, i64 0, !33, i64 1352, !34, i64 1376}
!33 = !{!"_ZTS14PCIeParameters", !13, i64 0, !17, i64 8, !17, i64 12, !18, i64 16, !17, i64 20}
!34 = !{!"_ZTS14PCIeStatistics", !13, i64 0, !13, i64 8}
!35 = !{!32, !17, i64 1364}
!36 = !{!32, !17, i64 1360}
!37 = !{!32, !17, i64 1372}
!38 = !{!32, !18, i64 1368}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!32, !13, i64 1376}
!42 = !{!32, !13, i64 1384}
!43 = distinct !{!43, !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"

@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

declare noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

declare noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN14McPATComponent20warnMissingParamNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

declare void @_ZN14McPATComponent21warnUnrecognizedParamEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) local_unnamed_addr #1

declare void @_ZN14McPATComponent19warnMissingStatNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) local_unnamed_addr #1

declare void @_ZN14McPATComponent20warnUnrecognizedStatEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14PCIeController14set_pcie_paramEv(ptr noundef nonnull align 8 dereferenceable(1392) %0) local_unnamed_addr #4 align 2 {
  %2 = alloca i32, align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 288
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = tail call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 0, ptr %2, align 4, !tbaa !29
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 1368
  %8 = getelementptr inbounds i8, ptr %0, i64 1372
  %9 = getelementptr inbounds i8, ptr %0, i64 1360
  %10 = getelementptr inbounds i8, ptr %0, i64 1364
  %11 = getelementptr inbounds i8, ptr %0, i64 1352
  br label %12

12:                                               ; preds = %.lr.ph, %47
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.1, ptr noundef nonnull %2)
  %15 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @.str.2, ptr noundef null)
  %16 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @.str.3, ptr noundef null)
  %.not28 = icmp eq ptr %15, null
  br i1 %.not28, label %17, label %19

17:                                               ; preds = %12
  %18 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @.str.4, ptr noundef null)
  call void @_ZN14McPATComponent20warnMissingParamNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef %18)
  br label %47

19:                                               ; preds = %12
  %20 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.12) #6
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %24

22:                                               ; preds = %19
  %23 = call double @atof(ptr noundef %16) #6
  store double %23, ptr %11, align 8, !tbaa !30
  br label %47

24:                                               ; preds = %19
  %25 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.6) #6
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %29

27:                                               ; preds = %24
  %28 = call i32 @atoi(ptr nocapture noundef %16) #6
  store i32 %28, ptr %10, align 4, !tbaa !34
  br label %47

29:                                               ; preds = %24
  %30 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.13) #6
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %34

32:                                               ; preds = %29
  %33 = call i32 @atoi(ptr nocapture noundef %16) #6
  store i32 %33, ptr %9, align 8, !tbaa !35
  br label %47

34:                                               ; preds = %29
  %35 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %34
  %38 = call i32 @atoi(ptr nocapture noundef %16) #6
  store i32 %38, ptr %8, align 4, !tbaa !36
  br label %47

39:                                               ; preds = %34
  %40 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.14) #6
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %46

42:                                               ; preds = %39
  %43 = call i32 @atoi(ptr nocapture noundef %16) #6
  %44 = icmp ne i32 %43, 0
  %45 = zext i1 %44 to i8
  store i8 %45, ptr %7, align 8, !tbaa !37
  br label %47

46:                                               ; preds = %39
  call void @_ZN14McPATComponent21warnUnrecognizedParamEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %15)
  br label %47

47:                                               ; preds = %22, %32, %42, %46, %37, %27, %17
  %48 = load i32, ptr %2, align 4, !tbaa !29
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %2, align 4, !tbaa !29
  %50 = icmp slt i32 %49, %5
  br i1 %50, label %12, label %._crit_edge, !llvm.loop !38

._crit_edge:                                      ; preds = %47, %1
  %51 = getelementptr inbounds i8, ptr %0, i64 1352
  %52 = load double, ptr %51, align 8, !tbaa !30
  %53 = fmul double %52, 1.000000e+06
  store double %53, ptr %51, align 8, !tbaa !30
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull @.str.8)
  store i32 0, ptr %2, align 4, !tbaa !29
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph30, label %._crit_edge31

.lr.ph30:                                         ; preds = %._crit_edge
  %57 = getelementptr inbounds i8, ptr %0, i64 1384
  %58 = getelementptr inbounds i8, ptr %0, i64 1376
  br label %59

59:                                               ; preds = %.lr.ph30, %77
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str.8, ptr noundef nonnull %2)
  %62 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.2, ptr noundef null)
  %63 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.3, ptr noundef null)
  %.not = icmp eq ptr %62, null
  br i1 %.not, label %64, label %66

64:                                               ; preds = %59
  %65 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.4, ptr noundef null)
  call void @_ZN14McPATComponent19warnMissingStatNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef %65)
  br label %77

66:                                               ; preds = %59
  %67 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %62, ptr noundef nonnull dereferenceable(1) @.str.9) #6
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %71

69:                                               ; preds = %66
  %70 = call double @atof(ptr noundef %63) #6
  store double %70, ptr %58, align 8, !tbaa !40
  br label %77

71:                                               ; preds = %66
  %72 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %62, ptr noundef nonnull dereferenceable(1) @.str.10) #6
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %76

74:                                               ; preds = %71
  %75 = call double @atof(ptr noundef %63) #6
  store double %75, ptr %57, align 8, !tbaa !41
  br label %77

76:                                               ; preds = %71
  call void @_ZN14McPATComponent20warnUnrecognizedStatEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %62)
  br label %77

77:                                               ; preds = %69, %76, %74, %64
  %78 = load i32, ptr %2, align 4, !tbaa !29
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %2, align 4, !tbaa !29
  %80 = icmp slt i32 %79, %55
  br i1 %80, label %59, label %._crit_edge31, !llvm.loop !42

._crit_edge31:                                    ; preds = %77, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  ret void
}

attributes #0 = { mustprogress 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 nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { 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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 288}
!6 = !{!"_ZTS14McPATComponent", !7, i64 8, !14, i64 288, !15, i64 296, !19, i64 664, !9, i64 696, !22, i64 704, !26, i64 728, !27, i64 776, !27, i64 944, !12, i64 1112, !12, i64 1232}
!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 = !{!"any pointer", !10, i64 0}
!15 = !{!"_ZTS14InputParameter", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !17, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !16, i64 40, !16, i64 44, !9, i64 48, !9, i64 56, !16, i64 64, !16, i64 68, !16, i64 72, !16, i64 76, !16, i64 80, !17, i64 84, !17, i64 85, !17, i64 86, !17, i64 87, !17, i64 88, !16, i64 92, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108, !16, i64 112, !16, i64 116, !16, i64 120, !16, i64 124, !16, i64 128, !16, i64 132, !16, i64 136, !16, i64 140, !16, i64 144, !16, i64 148, !18, i64 152, !16, i64 156, !17, i64 160, !16, i64 164, !16, i64 168, !16, i64 172, !16, i64 176, !16, i64 180, !16, i64 184, !16, i64 188, !17, i64 192, !16, i64 196, !16, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !16, i64 220, !16, i64 224, !16, i64 228, !16, i64 232, !16, i64 236, !16, i64 240, !16, i64 244, !16, i64 248, !16, i64 252, !16, i64 256, !16, i64 260, !16, i64 264, !16, i64 268, !16, i64 272, !16, i64 276, !16, i64 280, !16, i64 284, !16, i64 288, !16, i64 292, !16, i64 296, !17, i64 300, !16, i64 304, !16, i64 308, !16, i64 312, !17, i64 316, !17, i64 317, !16, i64 320, !16, i64 324, !17, i64 328, !9, i64 336, !9, i64 344, !17, i64 352, !16, i64 356, !16, i64 360, !17, i64 364}
!16 = !{!"int", !10, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = !{!"_ZTS9Wire_type", !10, i64 0}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !10, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!21 = !{!"long", !10, i64 0}
!22 = !{!"_ZTSSt6vectorIP14McPATComponentSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP14McPATComponentSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP14McPATComponentSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP14McPATComponentSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!26 = !{!"_ZTS11McPATOutput", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40}
!27 = !{!"_ZTS8statsDef", !28, i64 0, !28, i64 24, !28, i64 48, !28, i64 72, !28, i64 96, !28, i64 120, !28, i64 144}
!28 = !{!"_ZTS15statsComponents", !9, i64 0, !9, i64 8, !9, i64 16}
!29 = !{!16, !16, i64 0}
!30 = !{!31, !9, i64 1352}
!31 = !{!"_ZTS14PCIeController", !6, i64 0, !32, i64 1352, !33, i64 1376}
!32 = !{!"_ZTS14PCIeParameters", !9, i64 0, !16, i64 8, !16, i64 12, !17, i64 16, !16, i64 20}
!33 = !{!"_ZTS14PCIeStatistics", !9, i64 0, !9, i64 8}
!34 = !{!31, !16, i64 1364}
!35 = !{!31, !16, i64 1360}
!36 = !{!31, !16, i64 1372}
!37 = !{!31, !17, i64 1368}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!31, !9, i64 1376}
!41 = !{!31, !9, i64 1384}
!42 = distinct !{!42, !39}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass