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

; 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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%struct.XSetWindowAttributes = type { i64, i64, i64, i64, i32, i32, i32, i64, i64, i32, i64, i64, i32, i64, i64 }
%struct.anon.43 = type { ptr, ptr, i32, i32, i32, i32, ptr, i64, i64, i64, i32, ptr, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, i64, i64, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, ptr, i64, i64, i32, i32, ptr, ptr, i32, ptr }
%struct.Screen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }

@_ZN4juce7displayE = external dso_local global ptr, align 8
@_ZN4juce24juce_messageWindowHandleE = external dso_local global i64, align 8
@_ZN4juce20windowHandleXContextE = external dso_local global i32, align 4
@_ZZN4juce14MessageManager32doPlatformSpecificInitialisationEvE16initThreadCalled = external hidden global i8, align 1
@.str.7 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4juce19JUCEApplicationBase15isStandaloneAppEv() #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce14MessageManager32doPlatformSpecificInitialisationEv() #4 align 2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.juce::String", align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.juce::String", align 8
  %5 = alloca %"class.juce::String", align 8
  %6 = alloca %"class.juce::CharPointer_UTF8", align 8
  %7 = alloca %struct.XSetWindowAttributes, align 8
  %8 = alloca i32, align 4
  %9 = call noundef zeroext i1 @_ZN4juce19JUCEApplicationBase15isStandaloneAppEv() #6
  br i1 %9, label %10, label %24

10:                                               ; preds = %0
  %11 = load i8, ptr @_ZZN4juce14MessageManager32doPlatformSpecificInitialisationEvE16initThreadCalled, align 1, !tbaa !5, !range !9, !noundef !10
  %12 = trunc i8 %11 to i1
  br i1 %12, label %23, label %13

13:                                               ; preds = %10
  %14 = call i32 @XInitThreads()
  %15 = icmp ne i32 %14, 0
  br i1 %15, label %22, label %16

16:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  call void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef @.str.7)
  invoke void @_ZN4juce6Logger17outputDebugStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %17 unwind label %18

17:                                               ; preds = %16
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  call void @_ZN4juce7Process9terminateEv()
  br label %81

18:                                               ; preds = %16
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %2, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %3, align 4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  br label %83

22:                                               ; preds = %13
  store i8 1, ptr @_ZZN4juce14MessageManager32doPlatformSpecificInitialisationEvE16initThreadCalled, align 1, !tbaa !5
  br label %23

23:                                               ; preds = %22, %10
  call void @_ZN4juce18LinuxErrorHandling21installXErrorHandlersEv()
  call void @_ZN4juce18LinuxErrorHandling27installKeyboardBreakHandlerEv()
  br label %24

24:                                               ; preds = %23, %0
  %25 = call noundef ptr @_ZN4juce20InternalMessageQueue11getInstanceEv()
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %26 = call ptr @getenv(ptr noundef @.str.8) #6
  call void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %26)
  %27 = call noundef zeroext i1 @_ZNK4juce6String7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %27, label %28, label %35

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  invoke void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.9)
          to label %29 unwind label %31

29:                                               ; preds = %28
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %35

31:                                               ; preds = %28
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %2, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %82

35:                                               ; preds = %29, %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  invoke void @_ZNK4juce6String6toUTF8Ev(ptr dead_on_unwind writable sret(%"class.juce::CharPointer_UTF8") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %36 unwind label %68

36:                                               ; preds = %35
  %37 = call noundef ptr @_ZNK4juce16CharPointer_UTF8cvPKcEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %38 = invoke ptr @XOpenDisplay(ptr noundef %37)
          to label %39 unwind label %68

39:                                               ; preds = %36
  store ptr %38, ptr @_ZN4juce7displayE, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %40 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !11
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %80

42:                                               ; preds = %39
  %43 = invoke i32 @XrmUniqueQuark()
          to label %44 unwind label %72

44:                                               ; preds = %42
  store i32 %43, ptr @_ZN4juce20windowHandleXContextE, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 112, ptr %7) #6
  %45 = getelementptr inbounds %struct.XSetWindowAttributes, ptr %7, i32 0, i32 10
  store i64 0, ptr %45, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %46 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct.anon.43, ptr %46, i32 0, i32 33
  %48 = load i32, ptr %47, align 8, !tbaa !18
  store i32 %48, ptr %8, align 4, !tbaa !13
  %49 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !11
  %50 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct.anon.43, ptr %50, i32 0, i32 35
  %52 = load ptr, ptr %51, align 8, !tbaa !20
  %53 = load i32, ptr %8, align 4, !tbaa !13
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds %struct.Screen, ptr %52, i64 %54
  %56 = getelementptr inbounds %struct.Screen, ptr %55, i32 0, i32 2
  %57 = load i64, ptr %56, align 8, !tbaa !21
  %58 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.anon.43, ptr %58, i32 0, i32 35
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %61 = load i32, ptr %8, align 4, !tbaa !13
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.Screen, ptr %60, i64 %62
  %64 = getelementptr inbounds %struct.Screen, ptr %63, i32 0, i32 10
  %65 = load ptr, ptr %64, align 8, !tbaa !23
  %66 = invoke i64 @XCreateWindow(ptr noundef %49, i64 noundef %57, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 2, ptr noundef %65, i64 noundef 2048, ptr noundef %7)
          to label %67 unwind label %76

67:                                               ; preds = %44
  store i64 %66, ptr @_ZN4juce24juce_messageWindowHandleE, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr %7) #6
  br label %80

68:                                               ; preds = %36, %35
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %2, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %82

72:                                               ; preds = %42
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %2, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %3, align 4
  br label %82

76:                                               ; preds = %44
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %2, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr %7) #6
  br label %82

80:                                               ; preds = %67, %39
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %81

81:                                               ; preds = %80, %17
  ret void

82:                                               ; preds = %76, %72, %68, %31
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %83

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce18LinuxErrorHandling21installXErrorHandlersEv() #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce18LinuxErrorHandling27installKeyboardBreakHandlerEv() #3

declare i32 @XInitThreads() #1

declare void @_ZN4juce6Logger17outputDebugStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8)) #1

declare void @_ZN4juce7Process9terminateEv() #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4juce20InternalMessageQueue11getInstanceEv() #4 align 2

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #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 ptr @XOpenDisplay(ptr noundef) #1

declare void @_ZNK4juce6String6toUTF8Ev(ptr dead_on_unwind writable sret(%"class.juce::CharPointer_UTF8") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1

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

declare i32 @XrmUniqueQuark() #1

declare i64 @XCreateWindow(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !17, i64 72}
!16 = !{!"_ZTS20XSetWindowAttributes", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !14, i64 32, !14, i64 36, !14, i64 40, !17, i64 48, !17, i64 56, !14, i64 64, !17, i64 72, !17, i64 80, !14, i64 88, !17, i64 96, !17, i64 104}
!17 = !{!"long", !7, i64 0}
!18 = !{!19, !14, i64 224}
!19 = !{!"_ZTS3$_0", !12, i64 0, !12, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !12, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !14, i64 64, !12, i64 72, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !12, i64 104, !14, i64 112, !14, i64 116, !12, i64 120, !12, i64 128, !14, i64 136, !17, i64 144, !17, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !14, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !14, i64 224, !14, i64 228, !12, i64 232, !17, i64 240, !17, i64 248, !14, i64 256, !14, i64 260, !12, i64 264, !12, i64 272, !14, i64 280, !12, i64 288}
!20 = !{!19, !12, i64 232}
!21 = !{!22, !17, i64 16}
!22 = !{!"_ZTS6Screen", !12, i64 0, !12, i64 8, !17, i64 16, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !12, i64 48, !14, i64 56, !12, i64 64, !12, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !17, i64 120}
!23 = !{!22, !12, i64 64}
!24 = !{!17, !17, 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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%struct.XSetWindowAttributes = type { i64, i64, i64, i64, i32, i32, i32, i64, i64, i32, i64, i64, i32, i64, i64 }
%struct.Screen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }

@_ZN4juce7displayE = external dso_local local_unnamed_addr global ptr, align 8
@_ZN4juce24juce_messageWindowHandleE = external dso_local local_unnamed_addr global i64, align 8
@_ZN4juce20windowHandleXContextE = external dso_local local_unnamed_addr global i32, align 4
@_ZZN4juce14MessageManager32doPlatformSpecificInitialisationEvE16initThreadCalled = external hidden local_unnamed_addr global i8, align 1
@.str.7 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4juce19JUCEApplicationBase15isStandaloneAppEv() local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce14MessageManager32doPlatformSpecificInitialisationEv() local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.juce::String", align 8
  %2 = alloca %"class.juce::String", align 8
  %3 = alloca %"class.juce::String", align 8
  %4 = alloca %"class.juce::CharPointer_UTF8", align 8
  %5 = alloca %struct.XSetWindowAttributes, align 8
  %6 = tail call noundef zeroext i1 @_ZN4juce19JUCEApplicationBase15isStandaloneAppEv() #7
  br i1 %6, label %7, label %18

7:                                                ; preds = %0
  %8 = load i8, ptr @_ZZN4juce14MessageManager32doPlatformSpecificInitialisationEvE16initThreadCalled, align 1, !tbaa !5, !range !9, !noundef !10
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %17, label %10

10:                                               ; preds = %7
  %11 = tail call i32 @XInitThreads()
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %12, label %16

12:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.7)
  invoke void @_ZN4juce6Logger17outputDebugStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %13 unwind label %14

13:                                               ; preds = %12
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  call void @_ZN4juce7Process9terminateEv()
  br label %56

14:                                               ; preds = %12
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  br label %58

16:                                               ; preds = %10
  store i8 1, ptr @_ZZN4juce14MessageManager32doPlatformSpecificInitialisationEvE16initThreadCalled, align 1, !tbaa !5
  br label %17

17:                                               ; preds = %16, %7
  tail call void @_ZN4juce18LinuxErrorHandling21installXErrorHandlersEv()
  tail call void @_ZN4juce18LinuxErrorHandling27installKeyboardBreakHandlerEv()
  br label %18

18:                                               ; preds = %17, %0
  %19 = tail call noundef ptr @_ZN4juce20InternalMessageQueue11getInstanceEv()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %20 = tail call ptr @getenv(ptr noundef nonnull @.str.8) #7
  call void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %20)
  %21 = call noundef zeroext i1 @_ZNK4juce6String7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  br i1 %21, label %22, label %27

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  invoke void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.9)
          to label %23 unwind label %25

23:                                               ; preds = %22
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %27

25:                                               ; preds = %22
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %57

27:                                               ; preds = %23, %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  invoke void @_ZNK4juce6String6toUTF8Ev(ptr dead_on_unwind nonnull writable sret(%"class.juce::CharPointer_UTF8") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %28 unwind label %49

28:                                               ; preds = %27
  %29 = call noundef ptr @_ZNK4juce16CharPointer_UTF8cvPKcEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %30 = invoke ptr @XOpenDisplay(ptr noundef %29)
          to label %31 unwind label %49

31:                                               ; preds = %28
  store ptr %30, ptr @_ZN4juce7displayE, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %.not5 = icmp eq ptr %30, null
  br i1 %.not5, label %55, label %32

32:                                               ; preds = %31
  %33 = invoke i32 @XrmUniqueQuark()
          to label %34 unwind label %51

34:                                               ; preds = %32
  store i32 %33, ptr @_ZN4juce20windowHandleXContextE, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %5) #7
  %35 = getelementptr inbounds i8, ptr %5, i64 72
  store i64 0, ptr %35, align 8, !tbaa !15
  %36 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !11
  %37 = getelementptr inbounds i8, ptr %36, i64 224
  %38 = load i32, ptr %37, align 8, !tbaa !18
  %39 = getelementptr inbounds i8, ptr %36, i64 232
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  %41 = sext i32 %38 to i64
  %42 = getelementptr inbounds %struct.Screen, ptr %40, i64 %41
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %44 = load i64, ptr %43, align 8, !tbaa !21
  %45 = getelementptr inbounds i8, ptr %42, i64 64
  %46 = load ptr, ptr %45, align 8, !tbaa !23
  %47 = invoke i64 @XCreateWindow(ptr noundef nonnull %36, i64 noundef %44, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 2, ptr noundef %46, i64 noundef 2048, ptr noundef nonnull %5)
          to label %48 unwind label %53

48:                                               ; preds = %34
  store i64 %47, ptr @_ZN4juce24juce_messageWindowHandleE, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %5) #7
  br label %55

49:                                               ; preds = %28, %27
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %57

51:                                               ; preds = %32
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %57

53:                                               ; preds = %34
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %5) #7
  br label %57

55:                                               ; preds = %48, %31
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %56

56:                                               ; preds = %55, %13
  ret void

57:                                               ; preds = %53, %51, %49, %25
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ], [ %50, %49 ], [ %26, %25 ]
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %58

58:                                               ; preds = %57, %14
  %.pn.pn = phi { ptr, i32 } [ %.pn, %57 ], [ %15, %14 ]
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce18LinuxErrorHandling21installXErrorHandlersEv() local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce18LinuxErrorHandling27installKeyboardBreakHandlerEv() local_unnamed_addr #3

declare i32 @XInitThreads() local_unnamed_addr #1

declare void @_ZN4juce6Logger17outputDebugStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZN4juce7Process9terminateEv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4juce20InternalMessageQueue11getInstanceEv() local_unnamed_addr #4 align 2

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #5

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

declare ptr @XOpenDisplay(ptr noundef) local_unnamed_addr #1

declare void @_ZNK4juce6String6toUTF8Ev(ptr dead_on_unwind writable sret(%"class.juce::CharPointer_UTF8") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

declare i32 @XrmUniqueQuark() local_unnamed_addr #1

declare i64 @XCreateWindow(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !17, i64 72}
!16 = !{!"_ZTS20XSetWindowAttributes", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !14, i64 32, !14, i64 36, !14, i64 40, !17, i64 48, !17, i64 56, !14, i64 64, !17, i64 72, !17, i64 80, !14, i64 88, !17, i64 96, !17, i64 104}
!17 = !{!"long", !7, i64 0}
!18 = !{!19, !14, i64 224}
!19 = !{!"_ZTS3$_0", !12, i64 0, !12, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !12, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !14, i64 64, !12, i64 72, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !12, i64 104, !14, i64 112, !14, i64 116, !12, i64 120, !12, i64 128, !14, i64 136, !17, i64 144, !17, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !14, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !14, i64 224, !14, i64 228, !12, i64 232, !17, i64 240, !17, i64 248, !14, i64 256, !14, i64 260, !12, i64 264, !12, i64 272, !14, i64 280, !12, i64 288}
!20 = !{!19, !12, i64 232}
!21 = !{!22, !17, i64 16}
!22 = !{!"_ZTS6Screen", !12, i64 0, !12, i64 8, !17, i64 16, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !12, i64 48, !14, i64 56, !12, i64 64, !12, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !17, i64 120}
!23 = !{!22, !12, i64 64}
!24 = !{!17, !17, i64 0}


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