; LLVM IR from gem5/gem5 :: ext/mcpat/iocontrollers.ll (ZN13NIUController13set_niu_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.NIUController = type { %class.McPATComponent, %class.NIUParameters, %class.NIUStatistics }
%class.NIUParameters = type { double, i32, i32 }
%class.NIUStatistics = 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.5 = external hidden unnamed_addr constant [14 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13NIUController13set_niu_paramEv(ptr noundef nonnull align 8 dereferenceable(1384) %0) #0 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 = %65, %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 %68

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

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

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.NIUController, ptr %11, i32 0, i32 1
  %49 = getelementptr inbounds %class.NIUParameters, ptr %48, i32 0, i32 1
  store i32 %47, ptr %49, align 8, !tbaa !35
  br label %62

50:                                               ; preds = %41
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = call i32 @strcmp(ptr noundef %51, ptr noundef @.str.7) #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.NIUController, ptr %11, i32 0, i32 1
  %58 = getelementptr inbounds %class.NIUParameters, ptr %57, i32 0, i32 2
  store i32 %56, ptr %58, align 4, !tbaa !36
  br label %61

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

61:                                               ; preds = %59, %54
  br label %62

62:                                               ; preds = %61, %45
  br label %63

63:                                               ; preds = %62, %36
  br label %64

64:                                               ; preds = %63, %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 %65

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

68:                                               ; preds = %15
  %69 = getelementptr inbounds %class.NIUController, ptr %11, i32 0, i32 1
  %70 = getelementptr inbounds %class.NIUParameters, ptr %69, i32 0, i32 0
  %71 = load double, ptr %70, align 8, !tbaa !31
  %72 = fmul double %71, 1.000000e+06
  store double %72, ptr %70, align 8, !tbaa !31
  %73 = getelementptr inbounds %class.McPATComponent, ptr %11, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef @.str.8)
  store i32 %75, ptr %3, align 4, !tbaa !30
  store i32 0, ptr %4, align 4, !tbaa !30
  br label %76

76:                                               ; preds = %116, %68
  %77 = load i32, ptr %4, align 4, !tbaa !30
  %78 = load i32, ptr %3, align 4, !tbaa !30
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %80, label %119

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %81 = getelementptr inbounds %class.McPATComponent, ptr %11, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef @.str.8, ptr noundef %4)
  store ptr %83, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #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.2, ptr noundef null)
  store ptr %85, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef @.str.3, ptr noundef null)
  store ptr %87, ptr %10, align 8, !tbaa !5
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %93, label %90

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

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

97:                                               ; preds = %93
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = call double @atof(ptr noundef %98) #6
  %100 = getelementptr inbounds %class.NIUController, ptr %11, i32 0, i32 2
  %101 = getelementptr inbounds %class.NIUStatistics, ptr %100, i32 0, i32 0
  store double %99, ptr %101, align 8, !tbaa !39
  br label %114

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

106:                                              ; preds = %102
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = call double @atof(ptr noundef %107) #6
  %109 = getelementptr inbounds %class.NIUController, ptr %11, i32 0, i32 2
  %110 = getelementptr inbounds %class.NIUStatistics, ptr %109, i32 0, i32 1
  store double %108, ptr %110, align 8, !tbaa !40
  br label %113

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

113:                                              ; preds = %111, %106
  br label %114

114:                                              ; preds = %113, %97
  br label %115

115:                                              ; preds = %114, %90
  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 %116

116:                                              ; preds = %115
  %117 = load i32, ptr %4, align 4, !tbaa !30
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %4, align 4, !tbaa !30
  br label %76, !llvm.loop !41

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind 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 #4 = { 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 #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 = !{!"_ZTS13NIUController", !10, i64 0, !33, i64 1352, !34, i64 1368}
!33 = !{!"_ZTS13NIUParameters", !13, i64 0, !17, i64 8, !17, i64 12}
!34 = !{!"_ZTS13NIUStatistics", !13, i64 0, !13, i64 8}
!35 = !{!32, !17, i64 1360}
!36 = !{!32, !17, i64 1364}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!32, !13, i64 1368}
!40 = !{!32, !13, i64 1376}
!41 = distinct !{!41, !38}


; 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.5 = external hidden unnamed_addr constant [14 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13NIUController13set_niu_paramEv(ptr noundef nonnull align 8 dereferenceable(1384) %0) local_unnamed_addr #0 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 1364
  %8 = getelementptr inbounds i8, ptr %0, i64 1360
  %9 = getelementptr inbounds i8, ptr %0, i64 1352
  br label %10

10:                                               ; preds = %.lr.ph, %33
  %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 %33

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

20:                                               ; preds = %17
  %21 = call double @atof(ptr noundef %14) #6
  store double %21, ptr %9, align 8, !tbaa !30
  br label %33

22:                                               ; preds = %17
  %23 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %13, ptr noundef nonnull dereferenceable(1) @.str.6) #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 8, !tbaa !34
  br label %33

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

30:                                               ; preds = %27
  %31 = call i32 @atoi(ptr nocapture noundef %14) #6
  store i32 %31, ptr %7, align 4, !tbaa !35
  br label %33

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

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

._crit_edge:                                      ; preds = %33, %1
  %37 = getelementptr inbounds i8, ptr %0, i64 1352
  %38 = load double, ptr %37, align 8, !tbaa !30
  %39 = fmul double %38, 1.000000e+06
  store double %39, ptr %37, align 8, !tbaa !30
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @.str.8)
  store i32 0, ptr %2, align 4, !tbaa !29
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph26, label %._crit_edge27

.lr.ph26:                                         ; preds = %._crit_edge
  %43 = getelementptr inbounds i8, ptr %0, i64 1376
  %44 = getelementptr inbounds i8, ptr %0, i64 1368
  br label %45

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

50:                                               ; preds = %45
  %51 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull @.str.4, ptr noundef null)
  call void @_ZN14McPATComponent19warnMissingStatNameEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef %51)
  br label %63

52:                                               ; preds = %45
  %53 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %48, ptr noundef nonnull dereferenceable(1) @.str.9) #6
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %57

55:                                               ; preds = %52
  %56 = call double @atof(ptr noundef %49) #6
  store double %56, ptr %44, align 8, !tbaa !38
  br label %63

57:                                               ; preds = %52
  %58 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %48, ptr noundef nonnull dereferenceable(1) @.str.10) #6
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %57
  %61 = call double @atof(ptr noundef %49) #6
  store double %61, ptr %43, align 8, !tbaa !39
  br label %63

62:                                               ; preds = %57
  call void @_ZN14McPATComponent20warnUnrecognizedStatEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %48)
  br label %63

63:                                               ; preds = %55, %62, %60, %50
  %64 = load i32, ptr %2, align 4, !tbaa !29
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %2, align 4, !tbaa !29
  %66 = icmp slt i32 %65, %41
  br i1 %66, label %45, label %._crit_edge27, !llvm.loop !40

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #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 = !{!"_ZTS13NIUController", !6, i64 0, !32, i64 1352, !33, i64 1368}
!32 = !{!"_ZTS13NIUParameters", !9, i64 0, !16, i64 8, !16, i64 12}
!33 = !{!"_ZTS13NIUStatistics", !9, i64 0, !9, i64 8}
!34 = !{!31, !16, i64 1360}
!35 = !{!31, !16, i64 1364}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!31, !9, i64 1368}
!39 = !{!31, !9, i64 1376}
!40 = distinct !{!40, !37}


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