; LLVM IR from gem5/gem5 :: ext/mcpat/iocontrollers.ll (ZN15FlashController12set_fc_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.FlashController = type { %class.McPATComponent, %class.MCParameters, %class.MCStatistics }
%class.MCParameters = type { double, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.MCStatistics = type { double, double, 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.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.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 @_ZN15FlashController12set_fc_paramEv(ptr noundef nonnull align 8 dereferenceable(1496) %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 = %67, %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 %70

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 %66

32:                                               ; preds = %19
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call i32 @strcmp(ptr noundef %33, ptr noundef @.str.13) #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 i32 @atoi(ptr noundef %37) #6
  %39 = getelementptr inbounds %class.FlashController, ptr %11, i32 0, i32 1
  %40 = getelementptr inbounds %class.MCParameters, ptr %39, i32 0, i32 3
  store i32 %38, ptr %40, align 8, !tbaa !31
  br label %65

41:                                               ; preds = %32
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = call i32 @strcmp(ptr noundef %42, ptr noundef @.str.7) #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.FlashController, ptr %11, i32 0, i32 1
  %49 = getelementptr inbounds %class.MCParameters, ptr %48, i32 0, i32 12
  store i32 %47, ptr %49, align 4, !tbaa !36
  br label %64

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

54:                                               ; preds = %50
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = call i32 @atoi(ptr noundef %55) #6
  %57 = icmp ne i32 %56, 0
  %58 = getelementptr inbounds %class.FlashController, ptr %11, i32 0, i32 1
  %59 = getelementptr inbounds %class.MCParameters, ptr %58, i32 0, i32 14
  %60 = zext i1 %57 to i8
  store i8 %60, ptr %59, align 1, !tbaa !37
  br label %63

61:                                               ; preds = %50
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent21warnUnrecognizedParamEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %11, ptr noundef %62)
  br label %63

63:                                               ; preds = %61, %54
  br label %64

64:                                               ; preds = %63, %45
  br label %65

65:                                               ; preds = %64, %36
  br label %66

66:                                               ; preds = %65, %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 %67

67:                                               ; preds = %66
  %68 = load i32, ptr %4, align 4, !tbaa !30
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %4, align 4, !tbaa !30
  br label %15, !llvm.loop !38

70:                                               ; preds = %15
  %71 = getelementptr inbounds %class.McPATComponent, ptr %11, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef @.str.8)
  store i32 %73, ptr %3, align 4, !tbaa !30
  store i32 0, ptr %4, align 4, !tbaa !30
  br label %74

74:                                               ; preds = %114, %70
  %75 = load i32, ptr %4, align 4, !tbaa !30
  %76 = load i32, ptr %3, align 4, !tbaa !30
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %117

78:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %79 = getelementptr inbounds %class.McPATComponent, ptr %11, i32 0, i32 2
  %80 = load ptr, ptr %79, align 8, !tbaa !9
  %81 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef @.str.8, ptr noundef %4)
  store ptr %81, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef @.str.2, ptr noundef null)
  store ptr %83, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef @.str.3, ptr noundef null)
  store ptr %85, ptr %10, align 8, !tbaa !5
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %91, label %88

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

91:                                               ; preds = %78
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = call i32 @strcmp(ptr noundef %92, ptr noundef @.str.9) #6
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %100

95:                                               ; preds = %91
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = call double @atof(ptr noundef %96) #6
  %98 = getelementptr inbounds %class.FlashController, ptr %11, i32 0, i32 2
  %99 = getelementptr inbounds %class.MCStatistics, ptr %98, i32 0, i32 0
  store double %97, ptr %99, align 8, !tbaa !40
  br label %112

100:                                              ; preds = %91
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = call i32 @strcmp(ptr noundef %101, ptr noundef @.str.10) #6
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %109

104:                                              ; preds = %100
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = call double @atof(ptr noundef %105) #6
  %107 = getelementptr inbounds %class.FlashController, ptr %11, i32 0, i32 2
  %108 = getelementptr inbounds %class.MCStatistics, ptr %107, i32 0, i32 1
  store double %106, ptr %108, align 8, !tbaa !41
  br label %111

109:                                              ; preds = %100
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN14McPATComponent20warnUnrecognizedStatEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %11, ptr noundef %110)
  br label %111

111:                                              ; preds = %109, %104
  br label %112

112:                                              ; preds = %111, %95
  br label %113

113:                                              ; preds = %112, %88
  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 %114

114:                                              ; preds = %113
  %115 = load i32, ptr %4, align 4, !tbaa !30
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %4, align 4, !tbaa !30
  br label %74, !llvm.loop !42

117:                                              ; preds = %74
  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, !17, i64 1376}
!32 = !{!"_ZTS15FlashController", !10, i64 0, !33, i64 1352, !35, i64 1464}
!33 = !{!"_ZTS12MCParameters", !13, i64 0, !34, i64 8, !13, i64 16, !17, i64 24, !17, i64 28, !17, i64 32, !17, i64 36, !17, i64 40, !17, i64 44, !17, i64 48, !17, i64 52, !17, i64 56, !17, i64 60, !18, i64 64, !18, i64 65, !17, i64 68, !17, i64 72, !17, i64 76, !17, i64 80, !17, i64 84, !17, i64 88, !17, i64 92, !17, i64 96, !17, i64 100, !17, i64 104}
!34 = !{!"_ZTS15MemoryCtrl_type", !7, i64 0}
!35 = !{!"_ZTS12MCStatistics", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!36 = !{!32, !17, i64 1412}
!37 = !{!32, !18, i64 1417}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!32, !13, i64 1464}
!41 = !{!32, !13, i64 1472}
!42 = distinct !{!42, !39}


; 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.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.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 @_ZN15FlashController12set_fc_paramEv(ptr noundef nonnull align 8 dereferenceable(1496) %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 1417
  %8 = getelementptr inbounds i8, ptr %0, i64 1412
  %9 = getelementptr inbounds i8, ptr %0, i64 1376
  br label %10

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

15:                                               ; preds = %10
  %16 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @.str.4, ptr noundef null)
  call void @_ZN14McPATComponent20warnMissingParamNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef %16)
  br label %35

17:                                               ; preds = %10
  %18 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %13, ptr noundef nonnull dereferenceable(1) @.str.13) #6
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %22

20:                                               ; preds = %17
  %21 = call i32 @atoi(ptr nocapture noundef %14) #6
  store i32 %21, ptr %9, align 8, !tbaa !30
  br label %35

22:                                               ; preds = %17
  %23 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %13, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %27

25:                                               ; preds = %22
  %26 = call i32 @atoi(ptr nocapture noundef %14) #6
  store i32 %26, ptr %8, align 4, !tbaa !35
  br label %35

27:                                               ; preds = %22
  %28 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %13, ptr noundef nonnull dereferenceable(1) @.str.14) #6
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %34

30:                                               ; preds = %27
  %31 = call i32 @atoi(ptr nocapture noundef %14) #6
  %32 = icmp ne i32 %31, 0
  %33 = zext i1 %32 to i8
  store i8 %33, ptr %7, align 1, !tbaa !36
  br label %35

34:                                               ; preds = %27
  call void @_ZN14McPATComponent21warnUnrecognizedParamEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %13)
  br label %35

35:                                               ; preds = %20, %30, %34, %25, %15
  %36 = load i32, ptr %2, align 4, !tbaa !29
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %2, align 4, !tbaa !29
  %38 = icmp slt i32 %37, %5
  br i1 %38, label %10, label %._crit_edge, !llvm.loop !37

._crit_edge:                                      ; preds = %35, %1
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @.str.8)
  store i32 0, ptr %2, align 4, !tbaa !29
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph26, label %._crit_edge27

.lr.ph26:                                         ; preds = %._crit_edge
  %42 = getelementptr inbounds i8, ptr %0, i64 1472
  %43 = getelementptr inbounds i8, ptr %0, i64 1464
  br label %44

44:                                               ; preds = %.lr.ph26, %62
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str.8, ptr noundef nonnull %2)
  %47 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @.str.2, ptr noundef null)
  %48 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @.str.3, ptr noundef null)
  %.not = icmp eq ptr %47, null
  br i1 %.not, label %49, label %51

49:                                               ; preds = %44
  %50 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @.str.4, ptr noundef null)
  call void @_ZN14McPATComponent19warnMissingStatNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef %50)
  br label %62

51:                                               ; preds = %44
  %52 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) @.str.9) #6
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %51
  %55 = call double @atof(ptr noundef %48) #6
  store double %55, ptr %43, align 8, !tbaa !39
  br label %62

56:                                               ; preds = %51
  %57 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) @.str.10) #6
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = call double @atof(ptr noundef %48) #6
  store double %60, ptr %42, align 8, !tbaa !40
  br label %62

61:                                               ; preds = %56
  call void @_ZN14McPATComponent20warnUnrecognizedStatEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %47)
  br label %62

62:                                               ; preds = %54, %61, %59, %49
  %63 = load i32, ptr %2, align 4, !tbaa !29
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %2, align 4, !tbaa !29
  %65 = icmp slt i32 %64, %40
  br i1 %65, label %44, label %._crit_edge27, !llvm.loop !41

._crit_edge27:                                    ; preds = %62, %._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, !16, i64 1376}
!31 = !{!"_ZTS15FlashController", !6, i64 0, !32, i64 1352, !34, i64 1464}
!32 = !{!"_ZTS12MCParameters", !9, i64 0, !33, i64 8, !9, i64 16, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !16, i64 40, !16, i64 44, !16, i64 48, !16, i64 52, !16, i64 56, !16, i64 60, !17, i64 64, !17, i64 65, !16, i64 68, !16, i64 72, !16, i64 76, !16, i64 80, !16, i64 84, !16, i64 88, !16, i64 92, !16, i64 96, !16, i64 100, !16, i64 104}
!33 = !{!"_ZTS15MemoryCtrl_type", !10, i64 0}
!34 = !{!"_ZTS12MCStatistics", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!35 = !{!31, !16, i64 1412}
!36 = !{!31, !17, i64 1417}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!31, !9, i64 1464}
!40 = !{!31, !9, i64 1472}
!41 = distinct !{!41, !38}


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