; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode (juce_audio_basics)

; 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.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }
%"class.juce::StringArray" = type { %"class.juce::Array.11" }
%"class.juce::Array.11" = type { %"class.juce::ArrayAllocationBase.12", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.12" = type <{ %"class.juce::HeapBlock.13", i32, [4 x i8] }>
%"class.juce::HeapBlock.13" = type { ptr }
%"class.juce::ChannelRemappingAudioSource" = type { %"class.juce::AudioSource", %"class.juce::OptionalScopedPointer.85", %"class.juce::Array.88", %"class.juce::Array.88", i32, [4 x i8], %"class.juce::AudioBuffer", %"struct.juce::AudioSourceChannelInfo", %"class.juce::CriticalSection" }
%"class.juce::AudioSource" = type { ptr }
%"class.juce::OptionalScopedPointer.85" = type <{ %"class.juce::ScopedPointer.86", i8, [7 x i8] }>
%"class.juce::ScopedPointer.86" = type { ptr }
%"class.juce::Array.88" = type { %"class.juce::ArrayAllocationBase.89", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.89" = type <{ %"class.juce::HeapBlock.90", i32, [4 x i8] }>
%"class.juce::HeapBlock.90" = type { ptr }
%"class.juce::AudioBuffer" = type <{ i32, i32, i64, ptr, %"class.juce::HeapBlock.0", [32 x ptr], i8, [7 x i8] }>
%"class.juce::HeapBlock.0" = type { ptr }
%"struct.juce::AudioSourceChannelInfo" = type { ptr, i32, i32 }
%"class.juce::CriticalSection" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }

@.str.371 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.372 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.373 = 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce6String11getIntValueEv(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: nounwind
declare void @_ZN4juce11StringArrayC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce27ChannelRemappingAudioSource16clearAllMappingsEv(ptr noundef nonnull align 8 dereferenceable(432)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayIiNS_20DummyCriticalSectionELi0EE3addEOi(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce27ChannelRemappingAudioSource14restoreFromXmlERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(432) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.juce::StringRef", align 8
  %6 = alloca %"class.juce::GenericScopedLock", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.juce::StringArray", align 8
  %10 = alloca %"class.juce::StringArray", align 8
  %11 = alloca %"class.juce::StringRef", align 8
  %12 = alloca %"class.juce::StringRef", align 8
  %13 = alloca %"class.juce::StringRef", align 8
  %14 = alloca %"class.juce::StringRef", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.371) #5
  %21 = call noundef zeroext i1 @_ZNK4juce10XmlElement10hasTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %5) #5
  br i1 %21, label %22, label %81

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %23 = getelementptr inbounds %"class.juce::ChannelRemappingAudioSource", ptr %19, i32 0, i32 8
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %23) #5
  invoke void @_ZN4juce27ChannelRemappingAudioSource16clearAllMappingsEv(ptr noundef nonnull align 8 dereferenceable(432) %19)
          to label %24 unwind label %38

24:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  call void @_ZN4juce11StringArrayC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @_ZN4juce11StringArrayC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @.str.372) #5
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef %12) #5
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %26) #5
  %27 = invoke noundef i32 @_ZN4juce11StringArray9addTokensENS_9StringRefEb(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef %11, i1 noundef zeroext false)
          to label %28 unwind label %42

28:                                               ; preds = %24
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef @.str.373) #5
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef %14) #5
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %30) #5
  %31 = invoke noundef i32 @_ZN4juce11StringArray9addTokensENS_9StringRefEb(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef %13, i1 noundef zeroext false)
          to label %32 unwind label %42

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %52, %32
  %34 = load i32, ptr %15, align 4, !tbaa !9
  %35 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %46, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %59

38:                                               ; preds = %22
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  br label %80

42:                                               ; preds = %28, %24
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %8, align 4
  br label %79

46:                                               ; preds = %33
  %47 = getelementptr inbounds %"class.juce::ChannelRemappingAudioSource", ptr %19, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %48 = load i32, ptr %15, align 4, !tbaa !9
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %48) #5
  %50 = call noundef i32 @_ZNK4juce6String11getIntValueEv(ptr noundef nonnull align 8 dereferenceable(8) %49) #5
  store i32 %50, ptr %16, align 4, !tbaa !9
  invoke void @_ZN4juce5ArrayIiNS_20DummyCriticalSectionELi0EE3addEOi(ptr noundef nonnull align 8 dereferenceable(20) %47, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %51 unwind label %55

51:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %15, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %15, align 4, !tbaa !9
  br label %33, !llvm.loop !11

55:                                               ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %7, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %79

59:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %71, %59
  %61 = load i32, ptr %17, align 4, !tbaa !9
  %62 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %78

65:                                               ; preds = %60
  %66 = getelementptr inbounds %"class.juce::ChannelRemappingAudioSource", ptr %19, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %67 = load i32, ptr %17, align 4, !tbaa !9
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %67) #5
  %69 = call noundef i32 @_ZNK4juce6String11getIntValueEv(ptr noundef nonnull align 8 dereferenceable(8) %68) #5
  store i32 %69, ptr %18, align 4, !tbaa !9
  invoke void @_ZN4juce5ArrayIiNS_20DummyCriticalSectionELi0EE3addEOi(ptr noundef nonnull align 8 dereferenceable(20) %66, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %70 unwind label %74

70:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %17, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %17, align 4, !tbaa !9
  br label %60, !llvm.loop !13

74:                                               ; preds = %65
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %7, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %79

78:                                               ; preds = %64
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %81

79:                                               ; preds = %74, %55, %42
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %80

80:                                               ; preds = %79, %38
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %82

81:                                               ; preds = %78, %2
  ret void

82:                                               ; preds = %80
  %83 = load ptr, ptr %7, align 8
  %84 = load i32, ptr %8, align 4
  %85 = insertvalue { ptr, i32 } poison, ptr %83, 0
  %86 = insertvalue { ptr, i32 } %85, i32 %84, 1
  resume { ptr, i32 } %86
}

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce10XmlElement10hasTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2

declare noundef i32 @_ZN4juce11StringArray9addTokensENS_9StringRefEb(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i1 noundef zeroext) #4

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #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 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 }

!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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::GenericScopedLock" = type { ptr }
%"class.juce::StringArray" = type { %"class.juce::Array.11" }
%"class.juce::Array.11" = type { %"class.juce::ArrayAllocationBase.12", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.12" = type <{ %"class.juce::HeapBlock.13", i32, [4 x i8] }>
%"class.juce::HeapBlock.13" = type { ptr }

@.str.371 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.372 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.373 = 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce6String11getIntValueEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce11StringArrayC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce27ChannelRemappingAudioSource16clearAllMappingsEv(ptr noundef nonnull align 8 dereferenceable(432)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayIiNS_20DummyCriticalSectionELi0EE3addEOi(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce27ChannelRemappingAudioSource14restoreFromXmlERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(432) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::StringRef", align 8
  %4 = alloca %"class.juce::GenericScopedLock", align 8
  %5 = alloca %"class.juce::StringArray", align 8
  %6 = alloca %"class.juce::StringArray", align 8
  %7 = alloca %"class.juce::StringRef", align 8
  %8 = alloca %"class.juce::StringRef", align 8
  %9 = alloca %"class.juce::StringRef", align 8
  %10 = alloca %"class.juce::StringRef", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.371) #5
  %13 = call noundef zeroext i1 @_ZNK4juce10XmlElement10hasTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %3) #5
  br i1 %13, label %14, label %52

14:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %15 = getelementptr inbounds i8, ptr %0, i64 392
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(40) %15) #5
  invoke void @_ZN4juce27ChannelRemappingAudioSource16clearAllMappingsEv(ptr noundef nonnull align 8 dereferenceable(432) %0)
          to label %16 unwind label %28

16:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @_ZN4juce11StringArrayC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @_ZN4juce11StringArrayC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.372) #5
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %8) #5
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %18 = invoke noundef i32 @_ZN4juce11StringArray9addTokensENS_9StringRefEb(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull %7, i1 noundef zeroext false)
          to label %19 unwind label %30

19:                                               ; preds = %16
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull @.str.373) #5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %10) #5
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  %21 = invoke noundef i32 @_ZN4juce11StringArray9addTokensENS_9StringRefEb(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull %9, i1 noundef zeroext false)
          to label %.preheader17 unwind label %30

.preheader17:                                     ; preds = %19
  %22 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %.preheader17
  %24 = getelementptr inbounds i8, ptr %0, i64 24
  br label %32

.preheader:                                       ; preds = %35, %.preheader17
  %25 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph20, label %._crit_edge

.lr.ph20:                                         ; preds = %.preheader
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  br label %41

28:                                               ; preds = %14
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %51

30:                                               ; preds = %19, %16
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %50

32:                                               ; preds = %.lr.ph, %35
  %.01118 = phi i32 [ 0, %.lr.ph ], [ %36, %35 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %.01118) #5
  %34 = call noundef i32 @_ZNK4juce6String11getIntValueEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #5
  store i32 %34, ptr %11, align 4, !tbaa !5
  invoke void @_ZN4juce5ArrayIiNS_20DummyCriticalSectionELi0EE3addEOi(ptr noundef nonnull align 8 dereferenceable(20) %24, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %35 unwind label %39

35:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  %36 = add nuw nsw i32 %.01118, 1
  %37 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %32, label %.preheader, !llvm.loop !9

39:                                               ; preds = %32
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %50

._crit_edge:                                      ; preds = %44, %.preheader
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %52

41:                                               ; preds = %.lr.ph20, %44
  %.019 = phi i32 [ 0, %.lr.ph20 ], [ %45, %44 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce11StringArrayixEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %.019) #5
  %43 = call noundef i32 @_ZNK4juce6String11getIntValueEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #5
  store i32 %43, ptr %12, align 4, !tbaa !5
  invoke void @_ZN4juce5ArrayIiNS_20DummyCriticalSectionELi0EE3addEOi(ptr noundef nonnull align 8 dereferenceable(20) %27, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %44 unwind label %48

44:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  %45 = add nuw nsw i32 %.019, 1
  %46 = call noundef i32 @_ZNK4juce11StringArray4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %41, label %._crit_edge, !llvm.loop !11

48:                                               ; preds = %41
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %50

50:                                               ; preds = %48, %39, %30
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %49, %48 ], [ %31, %30 ]
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %51

51:                                               ; preds = %50, %28
  %.pn.pn = phi { ptr, i32 } [ %.pn, %50 ], [ %29, %28 ]
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn

52:                                               ; preds = %._crit_edge, %2
  ret void
}

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce10XmlElement10hasTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2

declare noundef i32 @_ZN4juce11StringArray9addTokensENS_9StringRefEb(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #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 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 }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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