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

; 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::File" = type { %"class.juce::String" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::FileChooser" = type <{ %"class.juce::String", %"class.juce::String", %"class.juce::File", %"class.juce::Array.0", i8, i8, [6 x i8] }>
%"class.juce::Array.0" = type { %"class.juce::ArrayAllocationBase.1", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.1" = type <{ %"class.juce::HeapBlock.2", i32, [4 x i8] }>
%"class.juce::HeapBlock.2" = type { ptr }
%"class.juce::FileBasedDocument" = type { %"class.juce::ChangeBroadcaster", %"class.juce::File", i8, %"class.juce::String", %"class.juce::String", %"class.juce::String", %"class.juce::String" }
%"class.juce::ChangeBroadcaster" = type { ptr, %"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback", %"class.juce::ListenerList" }
%"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback" = type { %"class.juce::AsyncUpdater", ptr }
%"class.juce::AsyncUpdater" = type { ptr, %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%"class.juce::ListenerList" = type { %"class.juce::Array" }
%"class.juce::Array" = type { %"class.juce::ArrayAllocationBase", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase" = type <{ %"class.juce::HeapBlock", i32, [4 x i8] }>
%"class.juce::HeapBlock" = type { ptr }

@.str.16 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

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

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

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) #3

declare noundef zeroext i1 @_ZNK4juce4File12existsAsFileEv(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

declare void @_ZN4juce11FileChooserC1ERKNS_6StringERKNS_4FileES3_bb(ptr noundef nonnull align 8 dereferenceable(50), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #2

declare void @_ZNK4juce11FileChooser9getResultEv(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(50)) #2

; Function Attrs: nounwind
declare void @_ZN4juce11FileChooserD1Ev(ptr noundef nonnull align 8 dereferenceable(50)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce17FileBasedDocument6saveAsERKNS_4FileEbbb(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4juce17FileBasedDocument17saveAsInteractiveEb(ptr noundef nonnull align 8 dereferenceable(104) %0, i1 noundef zeroext %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.juce::File", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.juce::File", align 8
  %10 = alloca %"class.juce::String", align 8
  %11 = alloca %"class.juce::String", align 8
  %12 = alloca %"class.juce::String", align 8
  %13 = alloca %"class.juce::File", align 8
  %14 = alloca i1, align 1
  %15 = alloca i1, align 1
  %16 = alloca %"class.juce::File", align 8
  %17 = alloca %"class.juce::StringRef", align 8
  %18 = alloca %"class.juce::File", align 8
  %19 = alloca %"class.juce::File", align 8
  %20 = alloca %"class.juce::StringRef", align 8
  %21 = alloca %"class.juce::File", align 8
  %22 = alloca %"class.juce::FileChooser", align 8
  %23 = alloca %"class.juce::File", align 8
  %24 = alloca %"class.juce::String", align 8
  %25 = alloca %"class.juce::File", align 8
  %26 = alloca %"class.juce::StringRef", align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  %28 = zext i1 %1 to i8
  store i8 %28, ptr %5, align 1, !tbaa !9
  %29 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @_ZN4juce4FileC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %30 = getelementptr inbounds %"class.juce::FileBasedDocument", ptr %29, i32 0, i32 1
  %31 = invoke noundef zeroext i1 @_ZNK4juce4File12existsAsFileEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %32 unwind label %37

32:                                               ; preds = %2
  br i1 %31, label %33, label %41

33:                                               ; preds = %32
  %34 = getelementptr inbounds %"class.juce::FileBasedDocument", ptr %29, i32 0, i32 1
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %36 unwind label %37

36:                                               ; preds = %33
  br label %51

37:                                               ; preds = %33, %2
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  br label %201

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %42 = load ptr, ptr %29, align 8, !tbaa !11
  %43 = getelementptr inbounds ptr, ptr %42, i64 6
  %44 = load ptr, ptr %43, align 8
  invoke void %44(ptr dead_on_unwind writable sret(%"class.juce::File") align 8 %9, ptr noundef nonnull align 8 dereferenceable(104) %29)
          to label %45 unwind label %47

45:                                               ; preds = %41
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %51

47:                                               ; preds = %41
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %201

51:                                               ; preds = %45, %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %52 = load ptr, ptr %29, align 8, !tbaa !11
  %53 = getelementptr inbounds ptr, ptr %52, i64 3
  %54 = load ptr, ptr %53, align 8
  invoke void %54(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %11, ptr noundef nonnull align 8 dereferenceable(104) %29)
          to label %55 unwind label %61

55:                                               ; preds = %51
  invoke void @_ZN4juce4File19createLegalFileNameERKNS_6StringE(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %56 unwind label %65

56:                                               ; preds = %55
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %57 = call noundef zeroext i1 @_ZNK4juce6String7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %57, label %58, label %74

58:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  invoke void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @.str.16)
          to label %59 unwind label %70

59:                                               ; preds = %58
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %74

61:                                               ; preds = %51
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %7, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %8, align 4
  br label %69

65:                                               ; preds = %55
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %7, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %8, align 4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %200

70:                                               ; preds = %58
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %7, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %199

74:                                               ; preds = %59, %56
  store i1 false, ptr %14, align 1
  store i1 false, ptr %15, align 1
  %75 = invoke noundef zeroext i1 @_ZNK4juce4File12existsAsFileEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %76 unwind label %92

76:                                               ; preds = %74
  br i1 %75, label %81, label %77

77:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i1 true, ptr %14, align 1
  invoke void @_ZNK4juce4File18getParentDirectoryEv(ptr dead_on_unwind writable sret(%"class.juce::File") align 8 %13, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %78 unwind label %96

78:                                               ; preds = %77
  store i1 true, ptr %15, align 1
  %79 = invoke noundef zeroext i1 @_ZNK4juce4File11isDirectoryEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %80 unwind label %100

80:                                               ; preds = %78
  br label %81

81:                                               ; preds = %80, %76
  %82 = phi i1 [ true, %76 ], [ %79, %80 ]
  %83 = load i1, ptr %15, align 1
  br i1 %83, label %84, label %85

84:                                               ; preds = %81
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br label %85

85:                                               ; preds = %84, %81
  %86 = load i1, ptr %14, align 1
  br i1 %86, label %87, label %88

87:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %88

88:                                               ; preds = %87, %85
  br i1 %82, label %89, label %115

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  invoke void @_ZNK4juce4File14getSiblingFileENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8 %16, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %17)
          to label %90 unwind label %111

90:                                               ; preds = %89
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %128

92:                                               ; preds = %74
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %7, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %8, align 4
  br label %199

96:                                               ; preds = %77
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %7, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %8, align 4
  br label %107

100:                                              ; preds = %78
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %7, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %8, align 4
  %104 = load i1, ptr %15, align 1
  br i1 %104, label %105, label %106

105:                                              ; preds = %100
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br label %106

106:                                              ; preds = %105, %100
  br label %107

107:                                              ; preds = %106, %96
  %108 = load i1, ptr %14, align 1
  br i1 %108, label %109, label %110

109:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %110

110:                                              ; preds = %109, %107
  br label %199

111:                                              ; preds = %89
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %7, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %199

115:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  invoke void @_ZN4juce4File18getSpecialLocationENS0_19SpecialLocationTypeE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8 %19, i32 noundef 1)
          to label %116 unwind label %119

116:                                              ; preds = %115
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  invoke void @_ZNK4juce4File12getChildFileENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8 %18, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef %20)
          to label %117 unwind label %123

117:                                              ; preds = %116
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %128

119:                                              ; preds = %115
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %7, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %8, align 4
  br label %127

123:                                              ; preds = %116
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %7, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %8, align 4
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  br label %127

127:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %199

128:                                              ; preds = %117, %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %129 = load ptr, ptr %29, align 8, !tbaa !11
  %130 = getelementptr inbounds ptr, ptr %129, i64 8
  %131 = load ptr, ptr %130, align 8
  invoke void %131(ptr dead_on_unwind writable sret(%"class.juce::File") align 8 %21, ptr noundef nonnull align 8 dereferenceable(104) %29, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %132 unwind label %155

132:                                              ; preds = %128
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #6
  %134 = getelementptr inbounds %"class.juce::FileBasedDocument", ptr %29, i32 0, i32 6
  %135 = getelementptr inbounds %"class.juce::FileBasedDocument", ptr %29, i32 0, i32 4
  invoke void @_ZN4juce11FileChooserC1ERKNS_6StringERKNS_4FileES3_bb(ptr noundef nonnull align 8 dereferenceable(50) %22, ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %135, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %136 unwind label %159

136:                                              ; preds = %132
  %137 = load i8, ptr %5, align 1, !tbaa !9, !range !13, !noundef !14
  %138 = trunc i8 %137 to i1
  %139 = invoke noundef zeroext i1 @_ZN4juce11FileChooser19browseForFileToSaveEb(ptr noundef nonnull align 8 dereferenceable(50) %22, i1 noundef zeroext %138)
          to label %140 unwind label %163

140:                                              ; preds = %136
  br i1 %139, label %141, label %194

141:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  invoke void @_ZNK4juce11FileChooser9getResultEv(ptr dead_on_unwind writable sret(%"class.juce::File") align 8 %23, ptr noundef nonnull align 8 dereferenceable(50) %22)
          to label %142 unwind label %167

142:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  invoke void @_ZNK4juce4File16getFileExtensionEv(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %24, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %143 unwind label %171

143:                                              ; preds = %142
  %144 = call noundef zeroext i1 @_ZNK4juce6String7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br i1 %144, label %145, label %184

145:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %146 = getelementptr inbounds %"class.juce::FileBasedDocument", ptr %29, i32 0, i32 3
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %146) #6
  invoke void @_ZNK4juce4File17withFileExtensionENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8 %25, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %26)
          to label %147 unwind label %175

147:                                              ; preds = %145
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  %149 = invoke noundef zeroext i1 @_ZNK4juce4File6existsEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %150 unwind label %179

150:                                              ; preds = %147
  br i1 %149, label %151, label %183

151:                                              ; preds = %150
  %152 = invoke noundef zeroext i1 @_ZN4juceL18askToOverwriteFileERKNS_4FileE(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %153 unwind label %179

153:                                              ; preds = %151
  br i1 %152, label %183, label %154

154:                                              ; preds = %153
  store i32 1, ptr %3, align 4
  store i32 1, ptr %27, align 4
  br label %191

155:                                              ; preds = %128
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %7, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %199

159:                                              ; preds = %132
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %7, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %8, align 4
  br label %198

163:                                              ; preds = %136
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %7, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %8, align 4
  br label %197

167:                                              ; preds = %141
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %7, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %8, align 4
  br label %193

171:                                              ; preds = %142
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %7, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %192

175:                                              ; preds = %145
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %7, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %192

179:                                              ; preds = %188, %184, %151, %147
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %7, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %8, align 4
  br label %192

183:                                              ; preds = %153, %150
  br label %184

184:                                              ; preds = %183, %143
  %185 = load ptr, ptr %29, align 8, !tbaa !11
  %186 = getelementptr inbounds ptr, ptr %185, i64 7
  %187 = load ptr, ptr %186, align 8
  invoke void %187(ptr noundef nonnull align 8 dereferenceable(104) %29, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %188 unwind label %179

188:                                              ; preds = %184
  %189 = invoke noundef i32 @_ZN4juce17FileBasedDocument6saveAsERKNS_4FileEbbb(ptr noundef nonnull align 8 dereferenceable(104) %29, ptr noundef nonnull align 8 dereferenceable(8) %23, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext true)
          to label %190 unwind label %179

190:                                              ; preds = %188
  store i32 %189, ptr %3, align 4
  store i32 1, ptr %27, align 4
  br label %191

191:                                              ; preds = %190, %154
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %195

192:                                              ; preds = %179, %175, %171
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br label %193

193:                                              ; preds = %192, %167
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %197

194:                                              ; preds = %140
  store i32 1, ptr %3, align 4
  store i32 1, ptr %27, align 4
  br label %195

195:                                              ; preds = %194, %191
  call void @_ZN4juce11FileChooserD1Ev(ptr noundef nonnull align 8 dereferenceable(50) %22) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %196 = load i32, ptr %3, align 4
  ret i32 %196

197:                                              ; preds = %193, %163
  call void @_ZN4juce11FileChooserD1Ev(ptr noundef nonnull align 8 dereferenceable(50) %22) #6
  br label %198

198:                                              ; preds = %197, %159
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #6
  br label %199

199:                                              ; preds = %198, %155, %127, %111, %110, %92, %70
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br label %200

200:                                              ; preds = %199, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %201

201:                                              ; preds = %200, %47, %37
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %202

202:                                              ; preds = %201
  %203 = load ptr, ptr %7, align 8
  %204 = load i32, ptr %8, align 4
  %205 = insertvalue { ptr, i32 } poison, ptr %203, 0
  %206 = insertvalue { ptr, i32 } %205, i32 %204, 1
  resume { ptr, i32 } %206
}

declare noundef zeroext i1 @_ZNK4juce4File6existsEv(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN4juceL18askToOverwriteFileERKNS_4FileE(ptr noundef nonnull align 8 dereferenceable(8)) #4

declare void @_ZNK4juce4File17withFileExtensionENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

declare void @_ZN4juce4File19createLegalFileNameERKNS_6StringE(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

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

declare void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

declare void @_ZNK4juce4File18getParentDirectoryEv(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

declare noundef zeroext i1 @_ZNK4juce4File11isDirectoryEv(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZNK4juce4File14getSiblingFileENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

declare void @_ZN4juce4File18getSpecialLocationENS0_19SpecialLocationTypeE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, i32 noundef) #2

declare void @_ZNK4juce4File12getChildFileENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

declare noundef zeroext i1 @_ZN4juce11FileChooser19browseForFileToSaveEb(ptr noundef nonnull align 8 dereferenceable(50), i1 noundef zeroext) #2

declare void @_ZNK4juce4File16getFileExtensionEv(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

attributes #0 = { 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 #1 = { 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; 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::File" = type { %"class.juce::String" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::FileChooser" = type <{ %"class.juce::String", %"class.juce::String", %"class.juce::File", %"class.juce::Array.0", i8, i8, [6 x i8] }>
%"class.juce::Array.0" = type { %"class.juce::ArrayAllocationBase.1", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.1" = type <{ %"class.juce::HeapBlock.2", i32, [4 x i8] }>
%"class.juce::HeapBlock.2" = type { ptr }

@.str.16 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

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

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

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) #3

declare noundef zeroext i1 @_ZNK4juce4File12existsAsFileEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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 #1

declare void @_ZN4juce11FileChooserC1ERKNS_6StringERKNS_4FileES3_bb(ptr noundef nonnull align 8 dereferenceable(50), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #2

declare void @_ZNK4juce11FileChooser9getResultEv(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(50)) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4juce11FileChooserD1Ev(ptr noundef nonnull align 8 dereferenceable(50)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce17FileBasedDocument6saveAsERKNS_4FileEbbb(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4juce17FileBasedDocument17saveAsInteractiveEb(ptr noundef nonnull align 8 dereferenceable(104) %0, i1 noundef zeroext %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::File", align 8
  %4 = alloca %"class.juce::File", align 8
  %5 = alloca %"class.juce::String", align 8
  %6 = alloca %"class.juce::String", align 8
  %7 = alloca %"class.juce::String", align 8
  %8 = alloca %"class.juce::File", align 8
  %9 = alloca %"class.juce::File", align 8
  %10 = alloca %"class.juce::StringRef", align 8
  %11 = alloca %"class.juce::File", align 8
  %12 = alloca %"class.juce::File", align 8
  %13 = alloca %"class.juce::StringRef", align 8
  %14 = alloca %"class.juce::File", align 8
  %15 = alloca %"class.juce::FileChooser", align 8
  %16 = alloca %"class.juce::File", align 8
  %17 = alloca %"class.juce::String", align 8
  %18 = alloca %"class.juce::File", align 8
  %19 = alloca %"class.juce::StringRef", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZN4juce4FileC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = invoke noundef zeroext i1 @_ZNK4juce4File12existsAsFileEv(ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %22 unwind label %25

22:                                               ; preds = %2
  br i1 %21, label %23, label %27

23:                                               ; preds = %22
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %35 unwind label %25

25:                                               ; preds = %23, %2
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %130

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %28 = load ptr, ptr %0, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 48
  %30 = load ptr, ptr %29, align 8
  invoke void %30(ptr dead_on_unwind nonnull writable sret(%"class.juce::File") align 8 %4, ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %31 unwind label %33

31:                                               ; preds = %27
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %35

33:                                               ; preds = %27
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %130

35:                                               ; preds = %23, %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 24
  %38 = load ptr, ptr %37, align 8
  invoke void %38(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %6, ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %39 unwind label %45

39:                                               ; preds = %35
  invoke void @_ZN4juce4File19createLegalFileNameERKNS_6StringE(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %40 unwind label %47

40:                                               ; preds = %39
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %41 = call noundef zeroext i1 @_ZNK4juce6String7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %41, label %42, label %52

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  invoke void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull @.str.16)
          to label %43 unwind label %50

43:                                               ; preds = %42
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %52

45:                                               ; preds = %35
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %39
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %49

49:                                               ; preds = %47, %45
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %129

50:                                               ; preds = %42
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %128

52:                                               ; preds = %43, %40
  %53 = invoke noundef zeroext i1 @_ZNK4juce4File12existsAsFileEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %54 unwind label %60

54:                                               ; preds = %52
  br i1 %53, label %.critedge.thread, label %55

55:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  invoke void @_ZNK4juce4File18getParentDirectoryEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::File") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %56 unwind label %62

56:                                               ; preds = %55
  %57 = invoke noundef zeroext i1 @_ZNK4juce4File11isDirectoryEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %.critedge unwind label %64

.critedge:                                        ; preds = %56
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br i1 %57, label %.critedge.thread, label %69

.critedge.thread:                                 ; preds = %54, %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  invoke void @_ZNK4juce4File14getSiblingFileENS_9StringRefE(ptr dead_on_unwind nonnull writable sret(%"class.juce::File") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %10)
          to label %58 unwind label %67

58:                                               ; preds = %.critedge.thread
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %78

60:                                               ; preds = %52
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %128

62:                                               ; preds = %55
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %66

64:                                               ; preds = %56
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br label %66

66:                                               ; preds = %62, %64
  %.pn23 = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %128

67:                                               ; preds = %.critedge.thread
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %128

69:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  invoke void @_ZN4juce4File18getSpecialLocationENS0_19SpecialLocationTypeE(ptr dead_on_unwind nonnull writable sret(%"class.juce::File") align 8 %12, i32 noundef 1)
          to label %70 unwind label %73

70:                                               ; preds = %69
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  invoke void @_ZNK4juce4File12getChildFileENS_9StringRefE(ptr dead_on_unwind nonnull writable sret(%"class.juce::File") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull %13)
          to label %71 unwind label %75

71:                                               ; preds = %70
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %78

73:                                               ; preds = %69
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %77

75:                                               ; preds = %70
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %77

77:                                               ; preds = %75, %73
  %.pn25 = phi { ptr, i32 } [ %76, %75 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %128

78:                                               ; preds = %71, %58
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %79 = load ptr, ptr %0, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 64
  %81 = load ptr, ptr %80, align 8
  invoke void %81(ptr dead_on_unwind nonnull writable sret(%"class.juce::File") align 8 %14, ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %82 unwind label %102

82:                                               ; preds = %78
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %15) #6
  %84 = getelementptr inbounds i8, ptr %0, i64 96
  %85 = getelementptr inbounds i8, ptr %0, i64 80
  invoke void @_ZN4juce11FileChooserC1ERKNS_6StringERKNS_4FileES3_bb(ptr noundef nonnull align 8 dereferenceable(50) %15, ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %85, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %86 unwind label %104

86:                                               ; preds = %82
  %87 = invoke noundef zeroext i1 @_ZN4juce11FileChooser19browseForFileToSaveEb(ptr noundef nonnull align 8 dereferenceable(50) %15, i1 noundef zeroext %1)
          to label %88 unwind label %106

88:                                               ; preds = %86
  br i1 %87, label %89, label %125

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  invoke void @_ZNK4juce11FileChooser9getResultEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::File") align 8 %16, ptr noundef nonnull align 8 dereferenceable(50) %15)
          to label %90 unwind label %108

90:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  invoke void @_ZNK4juce4File16getFileExtensionEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %17, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %91 unwind label %110

91:                                               ; preds = %90
  %92 = call noundef zeroext i1 @_ZNK4juce6String7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br i1 %92, label %93, label %116

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %94 = getelementptr inbounds i8, ptr %0, i64 72
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %94) #6
  invoke void @_ZNK4juce4File17withFileExtensionENS_9StringRefE(ptr dead_on_unwind nonnull writable sret(%"class.juce::File") align 8 %18, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull %19)
          to label %95 unwind label %112

95:                                               ; preds = %93
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %97 = invoke noundef zeroext i1 @_ZNK4juce4File6existsEv(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %98 unwind label %114

98:                                               ; preds = %95
  br i1 %97, label %99, label %116

99:                                               ; preds = %98
  %100 = invoke noundef zeroext i1 @_ZN4juceL18askToOverwriteFileERKNS_4FileE(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %101 unwind label %114

101:                                              ; preds = %99
  br i1 %100, label %116, label %122

102:                                              ; preds = %78
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %128

104:                                              ; preds = %82
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %127

106:                                              ; preds = %86
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %126

108:                                              ; preds = %89
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %124

110:                                              ; preds = %90
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br label %123

112:                                              ; preds = %93
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %123

114:                                              ; preds = %120, %116, %99, %95
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %123

116:                                              ; preds = %98, %101, %91
  %117 = load ptr, ptr %0, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 56
  %119 = load ptr, ptr %118, align 8
  invoke void %119(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %120 unwind label %114

120:                                              ; preds = %116
  %121 = invoke noundef i32 @_ZN4juce17FileBasedDocument6saveAsERKNS_4FileEbbb(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(8) %16, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext true)
          to label %122 unwind label %114

122:                                              ; preds = %120, %101
  %.020 = phi i32 [ 1, %101 ], [ %121, %120 ]
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %125

123:                                              ; preds = %114, %112, %110
  %.pn27 = phi { ptr, i32 } [ %115, %114 ], [ %113, %112 ], [ %111, %110 ]
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  br label %124

124:                                              ; preds = %123, %108
  %.pn27.pn = phi { ptr, i32 } [ %.pn27, %123 ], [ %109, %108 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %126

125:                                              ; preds = %88, %122
  %.121 = phi i32 [ %.020, %122 ], [ 1, %88 ]
  call void @_ZN4juce11FileChooserD1Ev(ptr noundef nonnull align 8 dereferenceable(50) %15) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i32 %.121

126:                                              ; preds = %124, %106
  %.pn27.pn.pn = phi { ptr, i32 } [ %.pn27.pn, %124 ], [ %107, %106 ]
  call void @_ZN4juce11FileChooserD1Ev(ptr noundef nonnull align 8 dereferenceable(50) %15) #6
  br label %127

127:                                              ; preds = %126, %104
  %.pn27.pn.pn.pn = phi { ptr, i32 } [ %.pn27.pn.pn, %126 ], [ %105, %104 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #6
  br label %128

128:                                              ; preds = %66, %127, %102, %77, %67, %60, %50
  %.pn27.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn27.pn.pn.pn, %127 ], [ %103, %102 ], [ %68, %67 ], [ %.pn25, %77 ], [ %.pn23, %66 ], [ %61, %60 ], [ %51, %50 ]
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br label %129

129:                                              ; preds = %128, %49
  %.pn27.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn27.pn.pn.pn.pn, %128 ], [ %.pn, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %130

130:                                              ; preds = %129, %33, %25
  %.pn27.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn27.pn.pn.pn.pn.pn, %129 ], [ %26, %25 ], [ %34, %33 ]
  call void @_ZN4juce4FileD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn27.pn.pn.pn.pn.pn.pn
}

declare noundef zeroext i1 @_ZNK4juce4File6existsEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN4juceL18askToOverwriteFileERKNS_4FileE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare void @_ZNK4juce4File17withFileExtensionENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce4FileaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZN4juce4File19createLegalFileNameERKNS_6StringE(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

declare void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZNK4juce4File18getParentDirectoryEv(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZNK4juce4File11isDirectoryEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

declare void @_ZNK4juce4File14getSiblingFileENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

declare void @_ZN4juce4File18getSpecialLocationENS0_19SpecialLocationTypeE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, i32 noundef) local_unnamed_addr #2

declare void @_ZNK4juce4File12getChildFileENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::File") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN4juce11FileChooser19browseForFileToSaveEb(ptr noundef nonnull align 8 dereferenceable(50), i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZNK4juce4File16getFileExtensionEv(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

attributes #0 = { 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 #1 = { 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 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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