; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode/juce_gui_basics.ll (ZN4juce8Drawable19createFromImageDataEPKvm)

; 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::Image" = type { %"class.juce::ReferenceCountedObjectPtr.48" }
%"class.juce::ReferenceCountedObjectPtr.48" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::XmlDocument" = type { %"class.juce::String", %"class.juce::CharPointer_UTF8", i8, i8, %"class.juce::String", %"class.juce::String", %"class.juce::StringArray", i8, i8, %"class.juce::ScopedPointer.171" }
%"class.juce::StringArray" = type { %"class.juce::Array.150" }
%"class.juce::Array.150" = type { %"class.juce::ArrayAllocationBase.151", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.151" = type <{ %"class.juce::HeapBlock.152", i32, [4 x i8] }>
%"class.juce::HeapBlock.152" = type { ptr }
%"class.juce::ScopedPointer.171" = type { ptr }
%"class.juce::ScopedPointer.172" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }

@.str.19 = external hidden unnamed_addr constant [4 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce5Image7isValidEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4juce8Drawable19createFromImageDataEPKvm(ptr noundef %0, i64 noundef %1) #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.juce::Image", align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.juce::String", align 8
  %11 = alloca %"class.juce::XmlDocument", align 8
  %12 = alloca %"class.juce::ScopedPointer.172", align 8
  %13 = alloca %"class.juce::StringRef", align 8
  %14 = alloca %"class.juce::ScopedPointer.172", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = load i64, ptr %4, align 8, !tbaa !9
  call void @_ZN4juce15ImageFileFormat8loadFromEPKvm(ptr dead_on_unwind writable sret(%"class.juce::Image") align 8 %6, ptr noundef %15, i64 noundef %16)
  %17 = call noundef zeroext i1 @_ZNK4juce5Image7isValidEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %17, label %18, label %34

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %19 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 272) #8
          to label %20 unwind label %25

20:                                               ; preds = %18
  invoke void @_ZN4juce13DrawableImageC1Ev(ptr noundef nonnull align 8 dereferenceable(272) %19)
          to label %21 unwind label %29

21:                                               ; preds = %20
  store ptr %19, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN4juce13DrawableImage8setImageERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(272) %22, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %23 unwind label %25

23:                                               ; preds = %21
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %24, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %82

25:                                               ; preds = %21, %18
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %8, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %9, align 4
  br label %33

29:                                               ; preds = %20
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %8, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %19, i64 noundef 272) #9
  br label %33

33:                                               ; preds = %29, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %84

34:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = load i64, ptr %4, align 8, !tbaa !9
  %37 = trunc i64 %36 to i32
  invoke void @_ZN4juce6String20createStringFromDataEPKvi(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %10, ptr noundef %35, i32 noundef %37)
          to label %38 unwind label %56

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 80, ptr %11) #7
  invoke void @_ZN4juce11XmlDocumentC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %39 unwind label %60

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %40 = invoke noundef ptr @_ZN4juce11XmlDocument18getDocumentElementEb(ptr noundef nonnull align 8 dereferenceable(80) %11, i1 noundef zeroext true)
          to label %41 unwind label %64

41:                                               ; preds = %39
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef %40) #7
  %42 = call noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %78

44:                                               ; preds = %41
  %45 = call noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef @.str.19) #7
  %46 = call noundef zeroext i1 @_ZNK4juce10XmlElement10hasTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef %13) #7
  br i1 %46, label %47, label %78

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %48 = invoke noundef ptr @_ZN4juce11XmlDocument18getDocumentElementEb(ptr noundef nonnull align 8 dereferenceable(80) %11, i1 noundef zeroext false)
          to label %49 unwind label %68

49:                                               ; preds = %47
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %48) #7
  %50 = call noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %76

52:                                               ; preds = %49
  %53 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %54 = invoke noundef ptr @_ZN4juce8Drawable13createFromSVGERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(32) %53)
          to label %55 unwind label %72

55:                                               ; preds = %52
  store ptr %54, ptr %5, align 8, !tbaa !5
  br label %76

56:                                               ; preds = %34
  %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
  br label %81

60:                                               ; preds = %38
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %8, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %9, align 4
  br label %80

64:                                               ; preds = %39
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %8, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %9, align 4
  br label %79

68:                                               ; preds = %47
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %8, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %9, align 4
  br label %77

72:                                               ; preds = %52
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %77

76:                                               ; preds = %55, %49
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %78

77:                                               ; preds = %72, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %79

78:                                               ; preds = %76, %44, %41
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZN4juce11XmlDocumentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %82

79:                                               ; preds = %77, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZN4juce11XmlDocumentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #7
  br label %80

80:                                               ; preds = %79, %60
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %81

81:                                               ; preds = %80, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %84

82:                                               ; preds = %78, %23
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret ptr %83

84:                                               ; preds = %81, %33
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %8, align 8
  %87 = load i32, ptr %9, align 4
  %88 = insertvalue { ptr, i32 } poison, ptr %86, 0
  %89 = insertvalue { ptr, i32 } %88, i32 %87, 1
  resume { ptr, i32 } %89
}

declare void @_ZN4juce15ImageFileFormat8loadFromEPKvm(ptr dead_on_unwind writable sret(%"class.juce::Image") align 8, ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce13DrawableImage8setImageERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

declare void @_ZN4juce6String20createStringFromDataEPKvi(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef, i32 noundef) #6

declare void @_ZN4juce11XmlDocumentC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

declare noundef ptr @_ZN4juce11XmlDocument18getDocumentElementEb(ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce13ScopedPointerINS_10XmlElementEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4juce8Drawable13createFromSVGERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

; Function Attrs: nounwind
declare void @_ZN4juce11XmlDocumentD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0

declare void @_ZN4juce13DrawableImageC1Ev(ptr)

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { "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 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 = !{!"long", !7, i64 0}


; 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::Image" = type { %"class.juce::ReferenceCountedObjectPtr.48" }
%"class.juce::ReferenceCountedObjectPtr.48" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::XmlDocument" = type { %"class.juce::String", %"class.juce::CharPointer_UTF8", i8, i8, %"class.juce::String", %"class.juce::String", %"class.juce::StringArray", i8, i8, %"class.juce::ScopedPointer.171" }
%"class.juce::StringArray" = type { %"class.juce::Array.150" }
%"class.juce::Array.150" = type { %"class.juce::ArrayAllocationBase.151", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.151" = type <{ %"class.juce::HeapBlock.152", i32, [4 x i8] }>
%"class.juce::HeapBlock.152" = type { ptr }
%"class.juce::ScopedPointer.171" = type { ptr }
%"class.juce::ScopedPointer.172" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }

@.str.19 = external hidden unnamed_addr constant [4 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce5Image7isValidEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4juce8Drawable19createFromImageDataEPKvm(ptr noundef %0, i64 noundef %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::Image", align 8
  %4 = alloca %"class.juce::String", align 8
  %5 = alloca %"class.juce::XmlDocument", align 8
  %6 = alloca %"class.juce::ScopedPointer.172", align 8
  %7 = alloca %"class.juce::StringRef", align 8
  %8 = alloca %"class.juce::ScopedPointer.172", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @_ZN4juce15ImageFileFormat8loadFromEPKvm(ptr dead_on_unwind nonnull writable sret(%"class.juce::Image") align 8 %3, ptr noundef %0, i64 noundef %1)
  %9 = call noundef zeroext i1 @_ZNK4juce5Image7isValidEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  br i1 %9, label %10, label %18

10:                                               ; preds = %2
  %11 = invoke noalias noundef nonnull dereferenceable(272) ptr @_Znwm(i64 noundef 272) #8
          to label %12 unwind label %14

12:                                               ; preds = %10
  invoke void @_ZN4juce13DrawableImageC1Ev(ptr noundef nonnull align 8 dereferenceable(272) %11)
          to label %13 unwind label %16

13:                                               ; preds = %12
  invoke void @_ZN4juce13DrawableImage8setImageERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(272) %11, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %51 unwind label %14

14:                                               ; preds = %13, %10
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %52

16:                                               ; preds = %12
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %11, i64 noundef 272) #9
  br label %52

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %19 = trunc i64 %1 to i32
  invoke void @_ZN4juce6String20createStringFromDataEPKvi(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %4, ptr noundef %0, i32 noundef %19)
          to label %20 unwind label %35

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #7
  invoke void @_ZN4juce11XmlDocumentC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %21 unwind label %37

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %22 = invoke noundef ptr @_ZN4juce11XmlDocument18getDocumentElementEb(ptr noundef nonnull align 8 dereferenceable(80) %5, i1 noundef zeroext true)
          to label %23 unwind label %39

23:                                               ; preds = %21
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %22) #7
  %24 = call noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %.not = icmp eq ptr %24, null
  br i1 %.not, label %47, label %25

25:                                               ; preds = %23
  %26 = call noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull @.str.19) #7
  %27 = call noundef zeroext i1 @_ZNK4juce10XmlElement10hasTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull %7) #7
  br i1 %27, label %28, label %47

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %29 = invoke noundef ptr @_ZN4juce11XmlDocument18getDocumentElementEb(ptr noundef nonnull align 8 dereferenceable(80) %5, i1 noundef zeroext false)
          to label %30 unwind label %41

30:                                               ; preds = %28
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %29) #7
  %31 = call noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %.not17 = icmp eq ptr %31, null
  br i1 %.not17, label %45, label %32

32:                                               ; preds = %30
  %33 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %34 = invoke noundef ptr @_ZN4juce8Drawable13createFromSVGERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %45 unwind label %43

35:                                               ; preds = %18
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %50

37:                                               ; preds = %20
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %49

39:                                               ; preds = %21
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %48

41:                                               ; preds = %28
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %46

43:                                               ; preds = %32
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %46

45:                                               ; preds = %32, %30
  %.014 = phi ptr [ null, %30 ], [ %34, %32 ]
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %47

46:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %48

47:                                               ; preds = %45, %25, %23
  %.115 = phi ptr [ %.014, %45 ], [ null, %25 ], [ null, %23 ]
  call void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN4juce11XmlDocumentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %51

48:                                               ; preds = %46, %39
  %.pn.pn = phi { ptr, i32 } [ %.pn, %46 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN4juce11XmlDocumentD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #7
  br label %49

49:                                               ; preds = %48, %37
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %48 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br label %50

50:                                               ; preds = %49, %35
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %49 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %52

51:                                               ; preds = %13, %47
  %.216 = phi ptr [ %.115, %47 ], [ %11, %13 ]
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret ptr %.216

52:                                               ; preds = %14, %16, %50
  %.pn22.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %50 ], [ %15, %14 ], [ %17, %16 ]
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn22.pn
}

declare void @_ZN4juce15ImageFileFormat8loadFromEPKvm(ptr dead_on_unwind writable sret(%"class.juce::Image") align 8, ptr noundef, i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce13DrawableImage8setImageERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

declare void @_ZN4juce6String20createStringFromDataEPKvi(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef, i32 noundef) local_unnamed_addr #6

declare void @_ZN4juce11XmlDocumentC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

declare noundef ptr @_ZN4juce11XmlDocument18getDocumentElementEb(ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce13ScopedPointerINS_10XmlElementEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4juce8Drawable13createFromSVGERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4juce13ScopedPointerINS_10XmlElementEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce13ScopedPointerINS_10XmlElementEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

; Function Attrs: nounwind
declare void @_ZN4juce11XmlDocumentD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0

declare void @_ZN4juce13DrawableImageC1Ev(ptr) local_unnamed_addr

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { "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 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass