; LLVM IR from gem5/gem5 :: ext/mcpat/basic_components.ll (ZN14McPATComponent20recursiveInstantiateEv)

; 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 }

@_ZN14McPATComponent5debugE = external dso_local global i8, align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14McPATComponent20recursiveInstantiateEv(ptr noundef nonnull align 8 dereferenceable(1352) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %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 i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  %11 = load i8, ptr @_ZN14McPATComponent5debugE, align 1, !tbaa !9, !range !11, !noundef !12
  %12 = trunc i8 %11 to i1
  br i1 %12, label %13, label %21

13:                                               ; preds = %1
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = getelementptr inbounds %class.McPATComponent, ptr %10, i32 0, i32 4
  %16 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  %17 = getelementptr inbounds %class.McPATComponent, ptr %10, i32 0, i32 2
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef @.str.3, ptr noundef null)
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef @.str.1, ptr noundef @.str.2, ptr noundef %16, ptr noundef %19) #8
  br label %21

21:                                               ; preds = %13, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %22 = getelementptr inbounds %class.McPATComponent, ptr %10, i32 0, i32 2
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef @.str.4)
  store i32 %24, ptr %4, align 4, !tbaa !33
  store i32 0, ptr %3, align 4, !tbaa !33
  br label %25

25:                                               ; preds = %107, %21
  %26 = load i32, ptr %3, align 4, !tbaa !33
  %27 = load i32, ptr %4, align 4, !tbaa !33
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %29, label %110

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %30 = getelementptr inbounds %class.McPATComponent, ptr %10, i32 0, i32 2
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @.str.4, ptr noundef %3)
  store ptr %32, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef @.str.3, ptr noundef null)
  store ptr %34, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %40, label %37

37:                                               ; preds = %29
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef @.str.5, ptr noundef null)
  call void @_ZN14McPATComponent24warnMissingComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %39)
  br label %106

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

44:                                               ; preds = %40
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %45)
  br label %105

46:                                               ; preds = %40
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call i32 @strcmp(ptr noundef %47, ptr noundef @.str.7) #9
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %60

50:                                               ; preds = %46
  %51 = getelementptr inbounds %class.McPATComponent, ptr %10, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %52 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1784) #10
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %class.McPATComponent, ptr %10, i32 0, i32 3
  invoke void @_ZN9CacheUnitC1EP7XMLNodeP14InputParameter(ptr noundef nonnull align 8 dereferenceable(1784) %52, ptr noundef %53, ptr noundef %54)
          to label %55 unwind label %56

55:                                               ; preds = %50
  store ptr %52, ptr %7, align 8, !tbaa !5
  call void @_ZNSt6vectorIP14McPATComponentSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %104

56:                                               ; preds = %50
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %52, i64 noundef 1784) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %111

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

64:                                               ; preds = %60
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %65)
  br label %103

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

70:                                               ; preds = %66
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %71)
  br label %102

72:                                               ; preds = %66
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = call i32 @strcmp(ptr noundef %73, ptr noundef @.str.10) #9
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %72
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %77)
  br label %101

78:                                               ; preds = %72
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = call i32 @strcmp(ptr noundef %79, ptr noundef @.str.11) #9
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %82, label %84

82:                                               ; preds = %78
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %83)
  br label %100

84:                                               ; preds = %78
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = call i32 @strcmp(ptr noundef %85, ptr noundef @.str.12) #9
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %90

88:                                               ; preds = %84
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %89)
  br label %99

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

94:                                               ; preds = %90
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %95)
  br label %98

96:                                               ; preds = %90
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14McPATComponent25warnUnrecognizedComponentEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %10, ptr noundef %97)
  br label %98

98:                                               ; preds = %96, %94
  br label %99

99:                                               ; preds = %98, %88
  br label %100

100:                                              ; preds = %99, %82
  br label %101

101:                                              ; preds = %100, %76
  br label %102

102:                                              ; preds = %101, %70
  br label %103

103:                                              ; preds = %102, %64
  br label %104

104:                                              ; preds = %103, %55
  br label %105

105:                                              ; preds = %104, %44
  br label %106

106:                                              ; preds = %105, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %3, align 4, !tbaa !33
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %3, align 4, !tbaa !33
  br label %25, !llvm.loop !34

110:                                              ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret void

111:                                              ; preds = %56
  %112 = load ptr, ptr %8, align 8
  %113 = load i32, ptr %9, align 4
  %114 = insertvalue { ptr, i32 } poison, ptr %112, 0
  %115 = insertvalue { ptr, i32 } %114, i32 %113, 1
  resume { ptr, i32 } %115
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14McPATComponent24warnMissingComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) #3 align 2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #6

declare void @_ZN9CacheUnitC1EP7XMLNodeP14InputParameter(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef, ptr noundef) unnamed_addr #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14McPATComponent25warnUnrecognizedComponentEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 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 #6 = { nobuiltin allocsize(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 #7 = { nobuiltin nounwind "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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !6, i64 288}
!14 = !{!"_ZTS14McPATComponent", !15, i64 8, !6, i64 288, !20, i64 296, !23, i64 664, !17, i64 696, !26, i64 704, !30, i64 728, !31, i64 776, !31, i64 944, !18, i64 1112, !18, i64 1232}
!15 = !{!"_ZTS9Component", !16, i64 0, !18, i64 24, !18, i64 144, !17, i64 264, !17, i64 272}
!16 = !{!"_ZTS4Area", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTS8powerDef", !19, i64 0, !19, i64 40, !19, i64 80}
!19 = !{!"_ZTS15powerComponents", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32}
!20 = !{!"_ZTS14InputParameter", !21, i64 0, !21, i64 4, !21, i64 8, !21, i64 12, !21, i64 16, !10, i64 20, !21, i64 24, !21, i64 28, !21, i64 32, !21, i64 36, !21, i64 40, !21, i64 44, !17, i64 48, !17, i64 56, !21, i64 64, !21, i64 68, !21, i64 72, !21, i64 76, !21, i64 80, !10, i64 84, !10, i64 85, !10, i64 86, !10, i64 87, !10, i64 88, !21, i64 92, !21, i64 96, !21, i64 100, !21, i64 104, !21, i64 108, !21, i64 112, !21, i64 116, !21, i64 120, !21, i64 124, !21, i64 128, !21, i64 132, !21, i64 136, !21, i64 140, !21, i64 144, !21, i64 148, !22, i64 152, !21, i64 156, !10, i64 160, !21, i64 164, !21, i64 168, !21, i64 172, !21, i64 176, !21, i64 180, !21, i64 184, !21, i64 188, !10, i64 192, !21, i64 196, !21, i64 200, !21, i64 204, !21, i64 208, !21, i64 212, !21, i64 216, !21, i64 220, !21, i64 224, !21, i64 228, !21, i64 232, !21, i64 236, !21, i64 240, !21, i64 244, !21, i64 248, !21, i64 252, !21, i64 256, !21, i64 260, !21, i64 264, !21, i64 268, !21, i64 272, !21, i64 276, !21, i64 280, !21, i64 284, !21, i64 288, !21, i64 292, !21, i64 296, !10, i64 300, !21, i64 304, !21, i64 308, !21, i64 312, !10, i64 316, !10, i64 317, !21, i64 320, !21, i64 324, !10, i64 328, !17, i64 336, !17, i64 344, !10, i64 352, !21, i64 356, !21, i64 360, !10, i64 364}
!21 = !{!"int", !7, i64 0}
!22 = !{!"_ZTS9Wire_type", !7, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSSt6vectorIP14McPATComponentSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIP14McPATComponentSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP14McPATComponentSaIS1_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIP14McPATComponentSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTS11McPATOutput", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40}
!31 = !{!"_ZTS8statsDef", !32, i64 0, !32, i64 24, !32, i64 48, !32, i64 72, !32, i64 96, !32, i64 120, !32, i64 144}
!32 = !{!"_ZTS15statsComponents", !17, i64 0, !17, i64 8, !17, i64 16}
!33 = !{!21, !21, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


; 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"

@_ZN14McPATComponent5debugE = external dso_local local_unnamed_addr global i8, align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14McPATComponent20recursiveInstantiateEv(ptr noundef nonnull align 8 dereferenceable(1352) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = load i8, ptr @_ZN14McPATComponent5debugE, align 1, !tbaa !5, !range !9, !noundef !10
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %14

6:                                                ; preds = %1
  %7 = load ptr, ptr @stderr, align 8, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %0, i64 664
  %9 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  %10 = getelementptr inbounds i8, ptr %0, i64 288
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = tail call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @.str.3, ptr noundef null)
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, ptr noundef %9, ptr noundef %12) #9
  br label %14

14:                                               ; preds = %6, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %15 = getelementptr inbounds i8, ptr %0, i64 288
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = tail call noundef i32 @_ZNK7XMLNode10nChildNodeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str.4)
  store i32 0, ptr %2, align 4, !tbaa !33
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %19 = getelementptr inbounds i8, ptr %0, i64 296
  %20 = getelementptr inbounds i8, ptr %0, i64 704
  br label %21

21:                                               ; preds = %.lr.ph, %64
  %22 = load ptr, ptr %15, align 8, !tbaa !13
  %23 = call noundef ptr @_ZNK7XMLNode15getChildNodePtrEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str.4, ptr noundef nonnull %2)
  %24 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull @.str.3, ptr noundef null)
  %.not = icmp eq ptr %24, null
  br i1 %.not, label %25, label %27

25:                                               ; preds = %21
  %26 = call noundef ptr @_ZNK7XMLNode12getAttributeEPKcPi(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull @.str.5, ptr noundef null)
  call void @_ZN14McPATComponent24warnMissingComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef %26)
  br label %64

27:                                               ; preds = %21
  %28 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %24, ptr noundef nonnull dereferenceable(1) @.str.6) #10
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %24)
  br label %64

31:                                               ; preds = %27
  %32 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %24, ptr noundef nonnull dereferenceable(1) @.str.7) #10
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %39

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %35 = call noalias noundef nonnull dereferenceable(1784) ptr @_Znwm(i64 noundef 1784) #11
  invoke void @_ZN9CacheUnitC1EP7XMLNodeP14InputParameter(ptr noundef nonnull align 8 dereferenceable(1784) %35, ptr noundef nonnull %23, ptr noundef nonnull %19)
          to label %36 unwind label %37

36:                                               ; preds = %34
  store ptr %35, ptr %3, align 8, !tbaa !11
  call void @_ZNSt6vectorIP14McPATComponentSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %64

37:                                               ; preds = %34
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %35, i64 noundef 1784) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  resume { ptr, i32 } %38

39:                                               ; preds = %31
  %40 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %24, ptr noundef nonnull dereferenceable(1) @.str.8) #10
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %24)
  br label %64

43:                                               ; preds = %39
  %44 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %24, ptr noundef nonnull dereferenceable(1) @.str.9) #10
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %43
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %24)
  br label %64

47:                                               ; preds = %43
  %48 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %24, ptr noundef nonnull dereferenceable(1) @.str.10) #10
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %47
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %24)
  br label %64

51:                                               ; preds = %47
  %52 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %24, ptr noundef nonnull dereferenceable(1) @.str.11) #10
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %24)
  br label %64

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

58:                                               ; preds = %55
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %24)
  br label %64

59:                                               ; preds = %55
  %60 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %24, ptr noundef nonnull dereferenceable(1) @.str.13) #10
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  call void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %24)
  br label %64

63:                                               ; preds = %59
  call void @_ZN14McPATComponent25warnUnrecognizedComponentEPKc(ptr noundef nonnull align 8 dereferenceable(1352) %0, ptr noundef nonnull %24)
  br label %64

64:                                               ; preds = %30, %42, %50, %58, %63, %62, %54, %46, %36, %25
  %65 = load i32, ptr %2, align 4, !tbaa !33
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %2, align 4, !tbaa !33
  %67 = icmp slt i32 %66, %17
  br i1 %67, label %21, label %._crit_edge, !llvm.loop !34

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14McPATComponent24warnMissingComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14McPATComponent27warnIncompleteComponentTypeEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #6

declare void @_ZN9CacheUnitC1EP7XMLNodeP14InputParameter(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef, ptr noundef) unnamed_addr #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14McPATComponent25warnUnrecognizedComponentEPKc(ptr noundef nonnull align 8 dereferenceable(1352), ptr noundef) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 #6 = { nobuiltin allocsize(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 #7 = { nobuiltin nounwind "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 #8 = { nounwind }
attributes #9 = { cold nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 288}
!14 = !{!"_ZTS14McPATComponent", !15, i64 8, !12, i64 288, !20, i64 296, !23, i64 664, !17, i64 696, !26, i64 704, !30, i64 728, !31, i64 776, !31, i64 944, !18, i64 1112, !18, i64 1232}
!15 = !{!"_ZTS9Component", !16, i64 0, !18, i64 24, !18, i64 144, !17, i64 264, !17, i64 272}
!16 = !{!"_ZTS4Area", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTS8powerDef", !19, i64 0, !19, i64 40, !19, i64 80}
!19 = !{!"_ZTS15powerComponents", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32}
!20 = !{!"_ZTS14InputParameter", !21, i64 0, !21, i64 4, !21, i64 8, !21, i64 12, !21, i64 16, !6, i64 20, !21, i64 24, !21, i64 28, !21, i64 32, !21, i64 36, !21, i64 40, !21, i64 44, !17, i64 48, !17, i64 56, !21, i64 64, !21, i64 68, !21, i64 72, !21, i64 76, !21, i64 80, !6, i64 84, !6, i64 85, !6, i64 86, !6, i64 87, !6, i64 88, !21, i64 92, !21, i64 96, !21, i64 100, !21, i64 104, !21, i64 108, !21, i64 112, !21, i64 116, !21, i64 120, !21, i64 124, !21, i64 128, !21, i64 132, !21, i64 136, !21, i64 140, !21, i64 144, !21, i64 148, !22, i64 152, !21, i64 156, !6, i64 160, !21, i64 164, !21, i64 168, !21, i64 172, !21, i64 176, !21, i64 180, !21, i64 184, !21, i64 188, !6, i64 192, !21, i64 196, !21, i64 200, !21, i64 204, !21, i64 208, !21, i64 212, !21, i64 216, !21, i64 220, !21, i64 224, !21, i64 228, !21, i64 232, !21, i64 236, !21, i64 240, !21, i64 244, !21, i64 248, !21, i64 252, !21, i64 256, !21, i64 260, !21, i64 264, !21, i64 268, !21, i64 272, !21, i64 276, !21, i64 280, !21, i64 284, !21, i64 288, !21, i64 292, !21, i64 296, !6, i64 300, !21, i64 304, !21, i64 308, !21, i64 312, !6, i64 316, !6, i64 317, !21, i64 320, !21, i64 324, !6, i64 328, !17, i64 336, !17, i64 344, !6, i64 352, !21, i64 356, !21, i64 360, !6, i64 364}
!21 = !{!"int", !7, i64 0}
!22 = !{!"_ZTS9Wire_type", !7, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSSt6vectorIP14McPATComponentSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIP14McPATComponentSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP14McPATComponentSaIS1_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIP14McPATComponentSaIS1_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!30 = !{!"_ZTS11McPATOutput", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40}
!31 = !{!"_ZTS8statsDef", !32, i64 0, !32, i64 24, !32, i64 48, !32, i64 72, !32, i64 96, !32, i64 120, !32, i64 144}
!32 = !{!"_ZTS15statsComponents", !17, i64 0, !17, i64 8, !17, i64 16}
!33 = !{!21, !21, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


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