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

; 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::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.77 }
%union.anon.77 = type { i32 }
%"class.juce::ScopedXLock" = type { i8 }
%"class.juce::Image" = type { %"class.juce::ReferenceCountedObjectPtr.48" }
%"class.juce::ReferenceCountedObjectPtr.48" = type { ptr }
%"class.juce::Graphics" = type <{ ptr, %"class.juce::ScopedPointer.71", i8, [7 x i8] }>
%"class.juce::ScopedPointer.71" = type { ptr }
%"class.juce::Rectangle.148" = type { %"class.juce::Point.35", float, float }
%"class.juce::Point.35" = type { float, float }
%"class.juce::RectanglePlacement" = type { i32 }
%"class.juce::HeapBlock.149" = type { ptr }
%struct.XColor = type { i64, i16, i16, i16, i8, i8 }
%"struct.juce::CustomMouseCursorInfo" = type <{ %"class.juce::Image", %"class.juce::Point", float, [4 x i8] }>
%"class.juce::Point" = type { i32, i32 }
%struct._XcursorImage = type { i32, i32, i32, i32, i32, i32, i32, ptr }
%struct.anon.545 = 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 global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB = external hidden global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE18xcursorImageCreate = external hidden global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorImageDestroy = external hidden global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE22xcursorImageLoadCursor = external hidden global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE13hasBeenLoaded = external hidden global i8, align 1
@.str.258 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.259 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.260 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.261 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.262 = external hidden unnamed_addr constant [20 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN4juce5ImageC1ENS0_11PixelFormatEiib(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #1

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

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

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

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce6Colour7getARGBEv(ptr noundef nonnull align 1 dereferenceable(4)) #2

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

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

; Function Attrs: nounwind
declare void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce9RectangleIfED2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4)) #3 align 2

declare void @_ZNK4juce8Graphics11drawImageAtERKNS_5ImageEiib(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce9RectangleIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: nounwind
declare noundef float @_ZNK4juce6Colour13getBrightnessEv(ptr noundef nonnull align 1 dereferenceable(4)) #2

declare void @_ZNK4juce8Graphics9drawImageERKNS_5ImageENS_9RectangleIfEENS_18RectanglePlacementEb(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN4juce11ScopedXLockC1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1

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

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare ptr @dlsym(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4juce21CustomMouseCursorInfo6createEv(ptr noundef nonnull align 8 dereferenceable(20) %0) #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.juce::ScopedXLock", align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.juce::Colour", align 1
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.juce::Image", align 8
  %23 = alloca %"class.juce::Graphics", align 8
  %24 = alloca %"class.juce::Rectangle.148", align 4
  %25 = alloca %"class.juce::RectanglePlacement", align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.juce::HeapBlock.149", align 8
  %28 = alloca %"class.juce::HeapBlock.149", align 8
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i8, align 1
  %33 = alloca i32, align 4
  %34 = alloca %"class.juce::Colour", align 1
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca %struct.XColor, align 8
  %38 = alloca %struct.XColor, align 8
  %39 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %40 = load ptr, ptr %3, align 8
  %41 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %42 = icmp eq ptr %41, null
  br i1 %42, label %43, label %44

43:                                               ; preds = %1
  store ptr null, ptr %2, align 8
  br label %399

44:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  call void @_ZN4juce11ScopedXLockC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %45 = getelementptr inbounds %"struct.juce::CustomMouseCursorInfo", ptr %40, i32 0, i32 0
  %46 = call noundef i32 @_ZNK4juce5Image8getWidthEv(ptr noundef nonnull align 8 dereferenceable(8) %45) #6
  store i32 %46, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %47 = getelementptr inbounds %"struct.juce::CustomMouseCursorInfo", ptr %40, i32 0, i32 0
  %48 = call noundef i32 @_ZNK4juce5Image9getHeightEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #6
  store i32 %48, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %49 = getelementptr inbounds %"struct.juce::CustomMouseCursorInfo", ptr %40, i32 0, i32 1
  %50 = getelementptr inbounds %"class.juce::Point", ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !11
  store i32 %51, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %52 = getelementptr inbounds %"struct.juce::CustomMouseCursorInfo", ptr %40, i32 0, i32 1
  %53 = getelementptr inbounds %"class.juce::Point", ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 4, !tbaa !17
  store i32 %54, ptr %8, align 4, !tbaa !9
  %55 = load i8, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE13hasBeenLoaded, align 1, !tbaa !18, !range !20, !noundef !21
  %56 = trunc i8 %55 to i1
  br i1 %56, label %94, label %57

57:                                               ; preds = %44
  store i8 1, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE13hasBeenLoaded, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %58 = call ptr @dlopen(ptr noundef @.str.258, i32 noundef 258) #6
  store ptr %58, ptr %9, align 8, !tbaa !5
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %93

61:                                               ; preds = %57
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = call ptr @dlsym(ptr noundef %62, ptr noundef @.str.259) #6
  store ptr %63, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = call ptr @dlsym(ptr noundef %64, ptr noundef @.str.260) #6
  store ptr %65, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE18xcursorImageCreate, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = call ptr @dlsym(ptr noundef %66, ptr noundef @.str.261) #6
  store ptr %67, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE22xcursorImageLoadCursor, align 8, !tbaa !5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = call ptr @dlsym(ptr noundef %68, ptr noundef @.str.262) #6
  store ptr %69, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorImageDestroy, align 8, !tbaa !5
  %70 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  %71 = icmp eq ptr %70, null
  br i1 %71, label %87, label %72

72:                                               ; preds = %61
  %73 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE18xcursorImageCreate, align 8, !tbaa !5
  %74 = icmp eq ptr %73, null
  br i1 %74, label %87, label %75

75:                                               ; preds = %72
  %76 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE22xcursorImageLoadCursor, align 8, !tbaa !5
  %77 = icmp eq ptr %76, null
  br i1 %77, label %87, label %78

78:                                               ; preds = %75
  %79 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorImageDestroy, align 8, !tbaa !5
  %80 = icmp eq ptr %79, null
  br i1 %80, label %87, label %81

81:                                               ; preds = %78
  %82 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  %83 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %84 = invoke noundef i32 %82(ptr noundef %83)
          to label %85 unwind label %88

85:                                               ; preds = %81
  %86 = icmp ne i32 %84, 0
  br i1 %86, label %92, label %87

87:                                               ; preds = %85, %78, %75, %72, %61
  store ptr null, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  br label %92

88:                                               ; preds = %81
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %10, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %398

92:                                               ; preds = %87, %85
  br label %93

93:                                               ; preds = %92, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %94

94:                                               ; preds = %93, %44
  %95 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %177

97:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %98 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE18xcursorImageCreate, align 8, !tbaa !5
  %99 = load i32, ptr %5, align 4, !tbaa !9
  %100 = load i32, ptr %6, align 4, !tbaa !9
  %101 = invoke noundef ptr %98(i32 noundef %99, i32 noundef %100)
          to label %102 unwind label %120

102:                                              ; preds = %97
  store ptr %101, ptr %12, align 8, !tbaa !5
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %172

105:                                              ; preds = %102
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._XcursorImage, ptr %107, i32 0, i32 4
  store i32 %106, ptr %108, align 8, !tbaa !22
  %109 = load i32, ptr %8, align 4, !tbaa !9
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._XcursorImage, ptr %110, i32 0, i32 5
  store i32 %109, ptr %111, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._XcursorImage, ptr %112, i32 0, i32 7
  %114 = load ptr, ptr %113, align 8, !tbaa !25
  store ptr %114, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %146, %105
  %116 = load i32, ptr %14, align 4, !tbaa !9
  %117 = load i32, ptr %6, align 4, !tbaa !9
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %124, label %119

119:                                              ; preds = %115
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %149

120:                                              ; preds = %97
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %10, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %11, align 4
  br label %176

124:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %138, %124
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = load i32, ptr %5, align 4, !tbaa !9
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %145

130:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %131 = getelementptr inbounds %"struct.juce::CustomMouseCursorInfo", ptr %40, i32 0, i32 0
  %132 = load i32, ptr %16, align 4, !tbaa !9
  %133 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1 %17, ptr noundef nonnull align 8 dereferenceable(8) %131, i32 noundef %132, i32 noundef %133)
          to label %134 unwind label %141

134:                                              ; preds = %130
  %135 = call noundef i32 @_ZNK4juce6Colour7getARGBEv(ptr noundef nonnull align 1 dereferenceable(4) %17) #6
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = getelementptr inbounds i32, ptr %136, i32 1
  store ptr %137, ptr %13, align 8, !tbaa !5
  store i32 %135, ptr %136, align 4, !tbaa !9
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %138

138:                                              ; preds = %134
  %139 = load i32, ptr %16, align 4, !tbaa !9
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %16, align 4, !tbaa !9
  br label %125, !llvm.loop !26

141:                                              ; preds = %130
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %10, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %171

145:                                              ; preds = %129
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %14, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %14, align 4, !tbaa !9
  br label %115, !llvm.loop !28

149:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %150 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE22xcursorImageLoadCursor, align 8, !tbaa !5
  %151 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = invoke noundef i64 %150(ptr noundef %151, ptr noundef %152)
          to label %154 unwind label %163

154:                                              ; preds = %149
  %155 = inttoptr i64 %153 to ptr
  store ptr %155, ptr %18, align 8, !tbaa !5
  %156 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorImageDestroy, align 8, !tbaa !5
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void %156(ptr noundef %157)
          to label %158 unwind label %163

158:                                              ; preds = %154
  %159 = load ptr, ptr %18, align 8, !tbaa !5
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %167

161:                                              ; preds = %158
  %162 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %162, ptr %2, align 8
  store i32 1, ptr %15, align 4
  br label %168

163:                                              ; preds = %154, %149
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %10, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %171

167:                                              ; preds = %158
  store i32 0, ptr %15, align 4
  br label %168

168:                                              ; preds = %167, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %169 = load i32, ptr %15, align 4
  switch i32 %169, label %173 [
    i32 0, label %170
  ]

170:                                              ; preds = %168
  br label %172

171:                                              ; preds = %163, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %176

172:                                              ; preds = %170, %102
  store i32 0, ptr %15, align 4
  br label %173

173:                                              ; preds = %172, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %174 = load i32, ptr %15, align 4
  switch i32 %174, label %397 [
    i32 0, label %175
  ]

175:                                              ; preds = %173
  br label %177

176:                                              ; preds = %171, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %398

177:                                              ; preds = %175, %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %178 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.anon.545, ptr %178, i32 0, i32 35
  %180 = load ptr, ptr %179, align 8, !tbaa !29
  %181 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.anon.545, ptr %181, i32 0, i32 33
  %183 = load i32, ptr %182, align 8, !tbaa !32
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.Screen, ptr %180, i64 %184
  %186 = getelementptr inbounds %struct.Screen, ptr %185, i32 0, i32 2
  %187 = load i64, ptr %186, align 8, !tbaa !33
  store i64 %187, ptr %19, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %188 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %189 = load i64, ptr %19, align 8, !tbaa !35
  %190 = load i32, ptr %5, align 4, !tbaa !9
  %191 = load i32, ptr %6, align 4, !tbaa !9
  %192 = invoke i32 @XQueryBestCursor(ptr noundef %188, i64 noundef %189, i32 noundef %190, i32 noundef %191, ptr noundef %20, ptr noundef %21)
          to label %193 unwind label %196

193:                                              ; preds = %177
  %194 = icmp ne i32 %192, 0
  br i1 %194, label %200, label %195

195:                                              ; preds = %193
  store ptr null, ptr %2, align 8
  store i32 1, ptr %15, align 4
  br label %395

196:                                              ; preds = %177
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %10, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %11, align 4
  br label %396

200:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %201 = load i32, ptr %20, align 4, !tbaa !9
  %202 = load i32, ptr %21, align 4, !tbaa !9
  invoke void @_ZN4juce5ImageC1ENS0_11PixelFormatEiib(ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef 2, i32 noundef %201, i32 noundef %202, i1 noundef zeroext true)
          to label %203 unwind label %229

203:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  invoke void @_ZN4juce8GraphicsC1ERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(17) %23, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %204 unwind label %233

204:                                              ; preds = %203
  %205 = load i32, ptr %5, align 4, !tbaa !9
  %206 = load i32, ptr %20, align 4, !tbaa !9
  %207 = icmp ugt i32 %205, %206
  br i1 %207, label %212, label %208

208:                                              ; preds = %204
  %209 = load i32, ptr %6, align 4, !tbaa !9
  %210 = load i32, ptr %21, align 4, !tbaa !9
  %211 = icmp ugt i32 %209, %210
  br i1 %211, label %212, label %241

212:                                              ; preds = %208, %204
  %213 = load i32, ptr %7, align 4, !tbaa !9
  %214 = load i32, ptr %20, align 4, !tbaa !9
  %215 = mul nsw i32 %213, %214
  %216 = load i32, ptr %5, align 4, !tbaa !9
  %217 = sdiv i32 %215, %216
  store i32 %217, ptr %7, align 4, !tbaa !9
  %218 = load i32, ptr %8, align 4, !tbaa !9
  %219 = load i32, ptr %21, align 4, !tbaa !9
  %220 = mul nsw i32 %218, %219
  %221 = load i32, ptr %6, align 4, !tbaa !9
  %222 = sdiv i32 %220, %221
  store i32 %222, ptr %8, align 4, !tbaa !9
  %223 = getelementptr inbounds %"struct.juce::CustomMouseCursorInfo", ptr %40, i32 0, i32 0
  %224 = load i32, ptr %5, align 4, !tbaa !9
  %225 = uitofp i32 %224 to float
  %226 = load i32, ptr %6, align 4, !tbaa !9
  %227 = uitofp i32 %226 to float
  call void @_ZN4juce9RectangleIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(16) %24, float noundef %225, float noundef %227) #6
  call void @_ZN4juce18RectanglePlacementC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %25, i32 noundef 265) #6
  invoke void @_ZNK4juce8Graphics9drawImageERKNS_5ImageENS_9RectangleIfEENS_18RectanglePlacementEb(ptr noundef nonnull align 8 dereferenceable(17) %23, ptr noundef nonnull align 8 dereferenceable(8) %223, ptr noundef %24, ptr noundef %25, i1 noundef zeroext false)
          to label %228 unwind label %237

228:                                              ; preds = %212
  call void @_ZN4juce9RectangleIfED2Ev(ptr noundef nonnull align 4 dereferenceable(16) %24) #6
  br label %248

229:                                              ; preds = %200
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %10, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %11, align 4
  br label %394

233:                                              ; preds = %203
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %10, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %11, align 4
  br label %274

237:                                              ; preds = %212
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %10, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %11, align 4
  call void @_ZN4juce9RectangleIfED2Ev(ptr noundef nonnull align 4 dereferenceable(16) %24) #6
  br label %273

241:                                              ; preds = %208
  %242 = getelementptr inbounds %"struct.juce::CustomMouseCursorInfo", ptr %40, i32 0, i32 0
  invoke void @_ZNK4juce8Graphics11drawImageAtERKNS_5ImageEiib(ptr noundef nonnull align 8 dereferenceable(17) %23, ptr noundef nonnull align 8 dereferenceable(8) %242, i32 noundef 0, i32 noundef 0, i1 noundef zeroext false)
          to label %243 unwind label %244

243:                                              ; preds = %241
  br label %248

244:                                              ; preds = %241
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %10, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %11, align 4
  br label %273

248:                                              ; preds = %243, %228
  call void @_ZN4juce8GraphicsD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %249 = load i32, ptr %20, align 4, !tbaa !9
  %250 = add i32 %249, 7
  %251 = lshr i32 %250, 3
  store i32 %251, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  call void @_ZN4juce9HeapBlockIcLb0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  call void @_ZN4juce9HeapBlockIcLb0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  %252 = load i32, ptr %26, align 4, !tbaa !9
  %253 = load i32, ptr %21, align 4, !tbaa !9
  %254 = mul i32 %252, %253
  %255 = zext i32 %254 to i64
  invoke void @_ZN4juce9HeapBlockIcLb0EE6callocEmm(ptr noundef nonnull align 8 dereferenceable(8) %27, i64 noundef %255, i64 noundef 1)
          to label %256 unwind label %275

256:                                              ; preds = %248
  %257 = load i32, ptr %26, align 4, !tbaa !9
  %258 = load i32, ptr %21, align 4, !tbaa !9
  %259 = mul i32 %257, %258
  %260 = zext i32 %259 to i64
  invoke void @_ZN4juce9HeapBlockIcLb0EE6callocEmm(ptr noundef nonnull align 8 dereferenceable(8) %28, i64 noundef %260, i64 noundef 1)
          to label %261 unwind label %275

261:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #6
  %262 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.anon.545, ptr %262, i32 0, i32 15
  %264 = load i32, ptr %263, align 4, !tbaa !36
  %265 = icmp eq i32 %264, 1
  %266 = zext i1 %265 to i8
  store i8 %266, ptr %29, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %267 = load i32, ptr %21, align 4, !tbaa !9
  store i32 %267, ptr %30, align 4, !tbaa !9
  br label %268

268:                                              ; preds = %338, %261
  %269 = load i32, ptr %30, align 4, !tbaa !9
  %270 = add nsw i32 %269, -1
  store i32 %270, ptr %30, align 4, !tbaa !9
  %271 = icmp sge i32 %270, 0
  br i1 %271, label %279, label %272

272:                                              ; preds = %268
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %339

273:                                              ; preds = %244, %237
  call void @_ZN4juce8GraphicsD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %23) #6
  br label %274

274:                                              ; preds = %273, %233
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  br label %393

275:                                              ; preds = %256, %248
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %10, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %11, align 4
  br label %392

279:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %280 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %280, ptr %31, align 4, !tbaa !9
  br label %281

281:                                              ; preds = %337, %279
  %282 = load i32, ptr %31, align 4, !tbaa !9
  %283 = add nsw i32 %282, -1
  store i32 %283, ptr %31, align 4, !tbaa !9
  %284 = icmp sge i32 %283, 0
  br i1 %284, label %286, label %285

285:                                              ; preds = %281
  store i32 10, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %338

286:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #6
  %287 = load i8, ptr %29, align 1, !tbaa !18, !range !20, !noundef !21
  %288 = trunc i8 %287 to i1
  br i1 %288, label %289, label %293

289:                                              ; preds = %286
  %290 = load i32, ptr %31, align 4, !tbaa !9
  %291 = and i32 %290, 7
  %292 = sub nsw i32 7, %291
  br label %296

293:                                              ; preds = %286
  %294 = load i32, ptr %31, align 4, !tbaa !9
  %295 = and i32 %294, 7
  br label %296

296:                                              ; preds = %293, %289
  %297 = phi i32 [ %292, %289 ], [ %295, %293 ]
  %298 = shl i32 1, %297
  %299 = trunc i32 %298 to i8
  store i8 %299, ptr %32, align 1, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  %300 = load i32, ptr %30, align 4, !tbaa !9
  %301 = load i32, ptr %26, align 4, !tbaa !9
  %302 = mul i32 %300, %301
  %303 = load i32, ptr %31, align 4, !tbaa !9
  %304 = lshr i32 %303, 3
  %305 = add i32 %302, %304
  store i32 %305, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %306 = load i32, ptr %31, align 4, !tbaa !9
  %307 = load i32, ptr %30, align 4, !tbaa !9
  invoke void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1 %34, ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef %306, i32 noundef %307)
          to label %308 unwind label %321

308:                                              ; preds = %296
  %309 = call noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4) %34) #6
  %310 = zext i8 %309 to i32
  %311 = icmp sge i32 %310, 128
  br i1 %311, label %312, label %325

312:                                              ; preds = %308
  %313 = load i8, ptr %32, align 1, !tbaa !37
  %314 = sext i8 %313 to i32
  %315 = load i32, ptr %33, align 4, !tbaa !9
  %316 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK4juce9HeapBlockIcLb0EEixIjEERcT_(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef %315) #6
  %317 = load i8, ptr %316, align 1, !tbaa !37
  %318 = sext i8 %317 to i32
  %319 = or i32 %318, %314
  %320 = trunc i32 %319 to i8
  store i8 %320, ptr %316, align 1, !tbaa !37
  br label %325

321:                                              ; preds = %296
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %10, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %391

325:                                              ; preds = %312, %308
  %326 = call noundef float @_ZNK4juce6Colour13getBrightnessEv(ptr noundef nonnull align 1 dereferenceable(4) %34) #6
  %327 = fcmp oge float %326, 5.000000e-01
  br i1 %327, label %328, label %337

328:                                              ; preds = %325
  %329 = load i8, ptr %32, align 1, !tbaa !37
  %330 = sext i8 %329 to i32
  %331 = load i32, ptr %33, align 4, !tbaa !9
  %332 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK4juce9HeapBlockIcLb0EEixIjEERcT_(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef %331) #6
  %333 = load i8, ptr %332, align 1, !tbaa !37
  %334 = sext i8 %333 to i32
  %335 = or i32 %334, %330
  %336 = trunc i32 %335 to i8
  store i8 %336, ptr %332, align 1, !tbaa !37
  br label %337

337:                                              ; preds = %328, %325
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #6
  br label %281, !llvm.loop !38

338:                                              ; preds = %285
  br label %268, !llvm.loop !39

339:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %340 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %341 = load i64, ptr %19, align 8, !tbaa !35
  %342 = call noundef ptr @_ZNK4juce9HeapBlockIcLb0EE7getDataEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  %343 = load i32, ptr %20, align 4, !tbaa !9
  %344 = load i32, ptr %21, align 4, !tbaa !9
  %345 = invoke i64 @XCreatePixmapFromBitmapData(ptr noundef %340, i64 noundef %341, ptr noundef %342, i32 noundef %343, i32 noundef %344, i64 noundef 65535, i64 noundef 0, i32 noundef 1)
          to label %346 unwind label %377

346:                                              ; preds = %339
  store i64 %345, ptr %35, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %347 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %348 = load i64, ptr %19, align 8, !tbaa !35
  %349 = call noundef ptr @_ZNK4juce9HeapBlockIcLb0EE7getDataEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  %350 = load i32, ptr %20, align 4, !tbaa !9
  %351 = load i32, ptr %21, align 4, !tbaa !9
  %352 = invoke i64 @XCreatePixmapFromBitmapData(ptr noundef %347, i64 noundef %348, ptr noundef %349, i32 noundef %350, i32 noundef %351, i64 noundef 65535, i64 noundef 0, i32 noundef 1)
          to label %353 unwind label %381

353:                                              ; preds = %346
  store i64 %352, ptr %36, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #6
  %354 = getelementptr inbounds %struct.XColor, ptr %38, i32 0, i32 3
  store i16 0, ptr %354, align 4, !tbaa !40
  %355 = getelementptr inbounds %struct.XColor, ptr %38, i32 0, i32 2
  store i16 0, ptr %355, align 2, !tbaa !43
  %356 = getelementptr inbounds %struct.XColor, ptr %38, i32 0, i32 1
  store i16 0, ptr %356, align 8, !tbaa !44
  %357 = getelementptr inbounds %struct.XColor, ptr %37, i32 0, i32 3
  store i16 -1, ptr %357, align 4, !tbaa !40
  %358 = getelementptr inbounds %struct.XColor, ptr %37, i32 0, i32 2
  store i16 -1, ptr %358, align 2, !tbaa !43
  %359 = getelementptr inbounds %struct.XColor, ptr %37, i32 0, i32 1
  store i16 -1, ptr %359, align 8, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %360 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %361 = load i64, ptr %35, align 8, !tbaa !35
  %362 = load i64, ptr %36, align 8, !tbaa !35
  %363 = load i32, ptr %7, align 4, !tbaa !9
  %364 = load i32, ptr %8, align 4, !tbaa !9
  %365 = invoke i64 @XCreatePixmapCursor(ptr noundef %360, i64 noundef %361, i64 noundef %362, ptr noundef %37, ptr noundef %38, i32 noundef %363, i32 noundef %364)
          to label %366 unwind label %385

366:                                              ; preds = %353
  %367 = inttoptr i64 %365 to ptr
  store ptr %367, ptr %39, align 8, !tbaa !5
  %368 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %369 = load i64, ptr %35, align 8, !tbaa !35
  %370 = invoke i32 @XFreePixmap(ptr noundef %368, i64 noundef %369)
          to label %371 unwind label %385

371:                                              ; preds = %366
  %372 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %373 = load i64, ptr %36, align 8, !tbaa !35
  %374 = invoke i32 @XFreePixmap(ptr noundef %372, i64 noundef %373)
          to label %375 unwind label %385

375:                                              ; preds = %371
  %376 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %376, ptr %2, align 8
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #6
  call void @_ZN4juce9HeapBlockIcLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @_ZN4juce9HeapBlockIcLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %395

377:                                              ; preds = %339
  %378 = landingpad { ptr, i32 }
          cleanup
  %379 = extractvalue { ptr, i32 } %378, 0
  store ptr %379, ptr %10, align 8
  %380 = extractvalue { ptr, i32 } %378, 1
  store i32 %380, ptr %11, align 4
  br label %390

381:                                              ; preds = %346
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %10, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %11, align 4
  br label %389

385:                                              ; preds = %371, %366, %353
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %10, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #6
  br label %389

389:                                              ; preds = %385, %381
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  br label %390

390:                                              ; preds = %389, %377
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  br label %391

391:                                              ; preds = %390, %321
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #6
  br label %392

392:                                              ; preds = %391, %275
  call void @_ZN4juce9HeapBlockIcLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @_ZN4juce9HeapBlockIcLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %393

393:                                              ; preds = %392, %274
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %394

394:                                              ; preds = %393, %229
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %396

395:                                              ; preds = %375, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %397

396:                                              ; preds = %394, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %398

397:                                              ; preds = %395, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @_ZN4juce11ScopedXLockD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  br label %399

398:                                              ; preds = %396, %176, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @_ZN4juce11ScopedXLockD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  br label %401

399:                                              ; preds = %397, %43
  %400 = load ptr, ptr %2, align 8
  ret ptr %400

401:                                              ; preds = %398
  %402 = load ptr, ptr %10, align 8
  %403 = load i32, ptr %11, align 4
  %404 = insertvalue { ptr, i32 } poison, ptr %402, 0
  %405 = insertvalue { ptr, i32 } %404, i32 %403, 1
  resume { ptr, i32 } %405
}

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

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

declare i32 @XFreePixmap(ptr noundef, i64 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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN4juce21CustomMouseCursorInfoE", !13, i64 0, !15, i64 8, !16, i64 16}
!13 = !{!"_ZTSN4juce5ImageE", !14, i64 0}
!14 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_14ImagePixelDataEEE", !6, i64 0}
!15 = !{!"_ZTSN4juce5PointIiEE", !10, i64 0, !10, i64 4}
!16 = !{!"float", !7, i64 0}
!17 = !{!12, !10, i64 12}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!23, !10, i64 16}
!23 = !{!"_ZTS13_XcursorImage", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32}
!24 = !{!23, !10, i64 20}
!25 = !{!23, !6, i64 32}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!30, !6, i64 232}
!30 = !{!"_ZTS3$_0", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !6, i64 32, !31, i64 40, !31, i64 48, !31, i64 56, !10, i64 64, !6, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !6, i64 104, !10, i64 112, !10, i64 116, !6, i64 120, !6, i64 128, !10, i64 136, !31, i64 144, !31, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !10, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !10, i64 224, !10, i64 228, !6, i64 232, !31, i64 240, !31, i64 248, !10, i64 256, !10, i64 260, !6, i64 264, !6, i64 272, !10, i64 280, !6, i64 288}
!31 = !{!"long", !7, i64 0}
!32 = !{!30, !10, i64 224}
!33 = !{!34, !31, i64 16}
!34 = !{!"_ZTS6Screen", !6, i64 0, !6, i64 8, !31, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !31, i64 80, !31, i64 88, !31, i64 96, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !31, i64 120}
!35 = !{!31, !31, i64 0}
!36 = !{!30, !10, i64 92}
!37 = !{!7, !7, i64 0}
!38 = distinct !{!38, !27}
!39 = distinct !{!39, !27}
!40 = !{!41, !42, i64 12}
!41 = !{!"_ZTS6XColor", !31, i64 0, !42, i64 8, !42, i64 10, !42, i64 12, !7, i64 14, !7, i64 15}
!42 = !{!"short", !7, i64 0}
!43 = !{!41, !42, i64 10}
!44 = !{!41, !42, i64 8}


; 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::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.77 }
%union.anon.77 = type { i32 }
%"class.juce::ScopedXLock" = type { i8 }
%"class.juce::Image" = type { %"class.juce::ReferenceCountedObjectPtr.48" }
%"class.juce::ReferenceCountedObjectPtr.48" = type { ptr }
%"class.juce::Graphics" = type <{ ptr, %"class.juce::ScopedPointer.71", i8, [7 x i8] }>
%"class.juce::ScopedPointer.71" = type { ptr }
%"class.juce::Rectangle.148" = type { %"class.juce::Point.35", float, float }
%"class.juce::Point.35" = type { float, float }
%"class.juce::RectanglePlacement" = type { i32 }
%"class.juce::HeapBlock.149" = type { ptr }
%struct.XColor = type { i64, i16, i16, i16, i8, i8 }
%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 local_unnamed_addr global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB = external hidden local_unnamed_addr global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE18xcursorImageCreate = external hidden local_unnamed_addr global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorImageDestroy = external hidden local_unnamed_addr global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE22xcursorImageLoadCursor = external hidden local_unnamed_addr global ptr, align 8
@_ZZNK4juce21CustomMouseCursorInfo6createEvE13hasBeenLoaded = external hidden local_unnamed_addr global i8, align 1
@.str.258 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.259 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.260 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.261 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.262 = external hidden unnamed_addr constant [20 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN4juce5ImageC1ENS0_11PixelFormatEiib(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) unnamed_addr #1

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

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

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

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce6Colour7getARGBEv(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #2

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

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

; Function Attrs: nounwind
declare void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce9RectangleIfED2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #3 align 2

declare void @_ZNK4juce8Graphics11drawImageAtERKNS_5ImageEiib(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce9RectangleIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: nounwind
declare noundef float @_ZNK4juce6Colour13getBrightnessEv(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #2

declare void @_ZNK4juce8Graphics9drawImageERKNS_5ImageENS_9RectangleIfEENS_18RectanglePlacementEb(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN4juce11ScopedXLockC1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare ptr @dlopen(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare ptr @dlsym(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4juce21CustomMouseCursorInfo6createEv(ptr noundef nonnull align 8 dereferenceable(20) %0) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.juce::ScopedXLock", align 1
  %3 = alloca %"class.juce::Colour", align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.juce::Image", align 8
  %7 = alloca %"class.juce::Graphics", align 8
  %8 = alloca %"class.juce::Rectangle.148", align 4
  %9 = alloca %"class.juce::RectanglePlacement", align 4
  %10 = alloca %"class.juce::HeapBlock.149", align 8
  %11 = alloca %"class.juce::HeapBlock.149", align 8
  %12 = alloca %"class.juce::Colour", align 1
  %13 = alloca %struct.XColor, align 8
  %14 = alloca %struct.XColor, align 8
  %15 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %236, label %17

17:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #6
  call void @_ZN4juce11ScopedXLockC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %2)
  %18 = call noundef i32 @_ZNK4juce5Image8getWidthEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  %19 = call noundef i32 @_ZNK4juce5Image9getHeightEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %0, i64 12
  %23 = load i32, ptr %22, align 4, !tbaa !16
  %24 = load i8, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE13hasBeenLoaded, align 1, !tbaa !17, !range !19, !noundef !20
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %48, label %26

26:                                               ; preds = %17
  store i8 1, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE13hasBeenLoaded, align 1, !tbaa !17
  %27 = call ptr @dlopen(ptr noundef nonnull @.str.258, i32 noundef 258) #6
  %.not = icmp eq ptr %27, null
  br i1 %.not, label %48, label %28

28:                                               ; preds = %26
  %29 = call ptr @dlsym(ptr noundef nonnull %27, ptr noundef nonnull @.str.259) #6
  store ptr %29, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  %30 = call ptr @dlsym(ptr noundef nonnull %27, ptr noundef nonnull @.str.260) #6
  store ptr %30, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE18xcursorImageCreate, align 8, !tbaa !5
  %31 = call ptr @dlsym(ptr noundef nonnull %27, ptr noundef nonnull @.str.261) #6
  store ptr %31, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE22xcursorImageLoadCursor, align 8, !tbaa !5
  %32 = call ptr @dlsym(ptr noundef nonnull %27, ptr noundef nonnull @.str.262) #6
  store ptr %32, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorImageDestroy, align 8, !tbaa !5
  %33 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  %34 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE18xcursorImageCreate, align 8
  %35 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE22xcursorImageLoadCursor, align 8
  %36 = insertelement <4 x ptr> poison, ptr %33, i64 0
  %37 = insertelement <4 x ptr> %36, ptr %34, i64 1
  %38 = insertelement <4 x ptr> %37, ptr %35, i64 2
  %39 = insertelement <4 x ptr> %38, ptr %32, i64 3
  %.fr = freeze <4 x ptr> %39
  %40 = icmp eq <4 x ptr> %.fr, zeroinitializer
  %41 = bitcast <4 x i1> %40 to i4
  %.not147 = icmp eq i4 %41, 0
  br i1 %.not147, label %42, label %.thread

42:                                               ; preds = %28
  %43 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %44 = invoke noundef i32 %33(ptr noundef %43)
          to label %45 unwind label %46

45:                                               ; preds = %42
  %.not104 = icmp eq i32 %44, 0
  br i1 %.not104, label %.thread, label %48

.thread:                                          ; preds = %28, %45
  store ptr null, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  br label %.thread126

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

48:                                               ; preds = %26, %45, %17
  %.pr = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorSupportsARGB, align 8, !tbaa !5
  %.not105 = icmp eq ptr %.pr, null
  br i1 %.not105, label %.thread126, label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE18xcursorImageCreate, align 8, !tbaa !5
  %51 = invoke noundef ptr %50(i32 noundef %18, i32 noundef %19)
          to label %52 unwind label %70

52:                                               ; preds = %49
  %.not106 = icmp eq ptr %51, null
  br i1 %.not106, label %.thread126, label %53

53:                                               ; preds = %52
  %54 = getelementptr inbounds i8, ptr %51, i64 16
  store i32 %21, ptr %54, align 8, !tbaa !21
  %55 = getelementptr inbounds i8, ptr %51, i64 20
  store i32 %23, ptr %55, align 4, !tbaa !23
  %56 = icmp sgt i32 %19, 0
  %57 = icmp sgt i32 %18, 0
  %or.cond145 = and i1 %56, %57
  br i1 %or.cond145, label %.preheader.us.preheader, label %._crit_edge134

.preheader.us.preheader:                          ; preds = %53
  %58 = getelementptr inbounds i8, ptr %51, i64 32
  %59 = load ptr, ptr %58, align 8, !tbaa !24
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %.094133.us = phi ptr [ %63, %._crit_edge.us ], [ %59, %.preheader.us.preheader ]
  %.096132.us = phi i32 [ %65, %._crit_edge.us ], [ 0, %.preheader.us.preheader ]
  br label %60

60:                                               ; preds = %.preheader.us, %61
  %.195131.us = phi ptr [ %.094133.us, %.preheader.us ], [ %63, %61 ]
  %.099130.us = phi i32 [ 0, %.preheader.us ], [ %64, %61 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  invoke void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind nonnull writable sret(%"class.juce::Colour") align 1 %3, ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef %.099130.us, i32 noundef %.096132.us)
          to label %61 unwind label %.split.us

61:                                               ; preds = %60
  %62 = call noundef i32 @_ZNK4juce6Colour7getARGBEv(ptr noundef nonnull align 1 dereferenceable(4) %3) #6
  %63 = getelementptr inbounds i8, ptr %.195131.us, i64 4
  store i32 %62, ptr %.195131.us, align 4, !tbaa !25
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %64 = add nuw nsw i32 %.099130.us, 1
  %exitcond.not = icmp eq i32 %64, %18
  br i1 %exitcond.not, label %._crit_edge.us, label %60, !llvm.loop !26

._crit_edge.us:                                   ; preds = %61
  %65 = add nuw nsw i32 %.096132.us, 1
  %exitcond141.not = icmp eq i32 %65, %19
  br i1 %exitcond141.not, label %._crit_edge134, label %.preheader.us, !llvm.loop !28

.split.us:                                        ; preds = %60
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %235

._crit_edge134:                                   ; preds = %._crit_edge.us, %53
  %67 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE22xcursorImageLoadCursor, align 8, !tbaa !5
  %68 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %69 = invoke noundef i64 %67(ptr noundef %68, ptr noundef nonnull %51)
          to label %72 unwind label %74

70:                                               ; preds = %49
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %235

72:                                               ; preds = %._crit_edge134
  %73 = load ptr, ptr @_ZZNK4juce21CustomMouseCursorInfo6createEvE19xcursorImageDestroy, align 8, !tbaa !5
  invoke void %73(ptr noundef nonnull %51)
          to label %76 unwind label %74

74:                                               ; preds = %72, %._crit_edge134
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %235

76:                                               ; preds = %72
  %77 = inttoptr i64 %69 to ptr
  %.not107 = icmp eq i64 %69, 0
  br i1 %.not107, label %.thread126, label %234

.thread126:                                       ; preds = %52, %.thread, %76, %48
  %78 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i64 232
  %80 = load ptr, ptr %79, align 8, !tbaa !29
  %81 = getelementptr inbounds i8, ptr %78, i64 224
  %82 = load i32, ptr %81, align 8, !tbaa !32
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.Screen, ptr %80, i64 %83, i32 2
  %85 = load i64, ptr %84, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %86 = invoke i32 @XQueryBestCursor(ptr noundef nonnull %78, i64 noundef %85, i32 noundef %18, i32 noundef %19, ptr noundef nonnull %4, ptr noundef nonnull %5)
          to label %87 unwind label %88

87:                                               ; preds = %.thread126
  %.not108 = icmp eq i32 %86, 0
  br i1 %.not108, label %232, label %90

88:                                               ; preds = %.thread126
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %233

90:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %91 = load i32, ptr %4, align 4, !tbaa !25
  %92 = load i32, ptr %5, align 4, !tbaa !25
  invoke void @_ZN4juce5ImageC1ENS0_11PixelFormatEiib(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 2, i32 noundef %91, i32 noundef %92, i1 noundef zeroext true)
          to label %93 unwind label %107

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  invoke void @_ZN4juce8GraphicsC1ERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %94 unwind label %109

94:                                               ; preds = %93
  %95 = load i32, ptr %4, align 4, !tbaa !25
  %96 = icmp ugt i32 %18, %95
  %97 = load i32, ptr %5, align 4
  %98 = icmp ugt i32 %19, %97
  %or.cond124 = select i1 %96, i1 true, i1 %98
  br i1 %or.cond124, label %99, label %113

99:                                               ; preds = %94
  %100 = uitofp i32 %18 to float
  %101 = uitofp i32 %19 to float
  call void @_ZN4juce9RectangleIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(16) %8, float noundef %100, float noundef %101) #6
  call void @_ZN4juce18RectanglePlacementC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef 265) #6
  invoke void @_ZNK4juce8Graphics9drawImageERKNS_5ImageENS_9RectangleIfEENS_18RectanglePlacementEb(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %8, ptr noundef nonnull %9, i1 noundef zeroext false)
          to label %102 unwind label %111

102:                                              ; preds = %99
  %103 = mul nsw i32 %97, %23
  %104 = sdiv i32 %103, %19
  %105 = mul nsw i32 %95, %21
  %106 = sdiv i32 %105, %18
  call void @_ZN4juce9RectangleIfED2Ev(ptr noundef nonnull align 4 dereferenceable(16) %8) #6
  br label %116

107:                                              ; preds = %90
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %231

109:                                              ; preds = %93
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %140

111:                                              ; preds = %99
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce9RectangleIfED2Ev(ptr noundef nonnull align 4 dereferenceable(16) %8) #6
  br label %139

113:                                              ; preds = %94
  invoke void @_ZNK4juce8Graphics11drawImageAtERKNS_5ImageEiib(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 0, i1 noundef zeroext false)
          to label %116 unwind label %114

114:                                              ; preds = %113
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %139

116:                                              ; preds = %113, %102
  %.074 = phi i32 [ %104, %102 ], [ %23, %113 ]
  %.073 = phi i32 [ %106, %102 ], [ %21, %113 ]
  call void @_ZN4juce8GraphicsD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  %117 = load i32, ptr %4, align 4, !tbaa !25
  %118 = add i32 %117, 7
  %119 = lshr i32 %118, 3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @_ZN4juce9HeapBlockIcLb0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @_ZN4juce9HeapBlockIcLb0EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  %120 = load i32, ptr %5, align 4, !tbaa !25
  %121 = mul i32 %120, %119
  %122 = zext i32 %121 to i64
  call void @_ZN4juce9HeapBlockIcLb0EE6callocEmm(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef %122, i64 noundef 1)
  %123 = load i32, ptr %5, align 4, !tbaa !25
  %124 = mul i32 %123, %119
  %125 = zext i32 %124 to i64
  call void @_ZN4juce9HeapBlockIcLb0EE6callocEmm(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %125, i64 noundef 1)
  %126 = load i32, ptr %5, align 4, !tbaa !25
  %127 = icmp sgt i32 %126, 0
  %.pre142 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  br i1 %127, label %.lr.ph136, label %._crit_edge

.lr.ph136:                                        ; preds = %116
  %128 = getelementptr inbounds i8, ptr %.pre142, i64 92
  %129 = load i32, ptr %128, align 4, !tbaa !35
  %.fr137 = freeze i32 %129
  %130 = icmp eq i32 %.fr137, 1
  %131 = load i32, ptr %4, align 4, !tbaa !25
  %132 = icmp sgt i32 %131, 0
  br i1 %132, label %.lr.ph136.split, label %._crit_edge

.loopexit:                                        ; preds = %197, %169, %.lr.ph136.split
  %133 = icmp sgt i32 %.in, 1
  br i1 %133, label %.lr.ph136.splitthread-pre-split, label %._crit_edge.loopexit, !llvm.loop !36

._crit_edge.loopexit:                             ; preds = %.loopexit
  %.pre = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph136, %._crit_edge.loopexit, %116
  %134 = phi ptr [ %.pre, %._crit_edge.loopexit ], [ %.pre142, %116 ], [ %.pre142, %.lr.ph136 ]
  %135 = call noundef ptr @_ZNK4juce9HeapBlockIcLb0EE7getDataEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  %136 = load i32, ptr %4, align 4, !tbaa !25
  %137 = load i32, ptr %5, align 4, !tbaa !25
  %138 = invoke i64 @XCreatePixmapFromBitmapData(ptr noundef %134, i64 noundef %85, ptr noundef %135, i32 noundef %136, i32 noundef %137, i64 noundef 65535, i64 noundef 0, i32 noundef 1)
          to label %200 unwind label %223

139:                                              ; preds = %114, %111
  %.pn = phi { ptr, i32 } [ %112, %111 ], [ %115, %114 ]
  call void @_ZN4juce8GraphicsD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  br label %140

140:                                              ; preds = %139, %109
  %.pn.pn = phi { ptr, i32 } [ %.pn, %139 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %230

.lr.ph136.splitthread-pre-split:                  ; preds = %.loopexit
  %.pr143 = load i32, ptr %4, align 4, !tbaa !25
  br label %.lr.ph136.split

.lr.ph136.split:                                  ; preds = %.lr.ph136, %.lr.ph136.splitthread-pre-split
  %141 = phi i32 [ %.pr143, %.lr.ph136.splitthread-pre-split ], [ %131, %.lr.ph136 ]
  %.in = phi i32 [ %142, %.lr.ph136.splitthread-pre-split ], [ %126, %.lr.ph136 ]
  %142 = add nsw i32 %.in, -1
  %143 = icmp sgt i32 %141, 0
  br i1 %143, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.lr.ph136.split
  %144 = add nsw i32 %141, -1
  %145 = mul i32 %142, %119
  br i1 %130, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %169
  %146 = phi i32 [ %170, %169 ], [ %144, %.lr.ph ]
  %147 = and i32 %146, 7
  %148 = xor i32 %147, 7
  %149 = lshr i32 %146, 3
  %150 = add i32 %149, %145
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  invoke void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind nonnull writable sret(%"class.juce::Colour") align 1 %12, ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef %146, i32 noundef %142)
          to label %151 unwind label %.split.us135

151:                                              ; preds = %.lr.ph.split.us
  %152 = call noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4) %12) #6
  %153 = icmp slt i8 %152, 0
  br i1 %153, label %154, label %160

154:                                              ; preds = %151
  %155 = shl nuw nsw i32 1, %148
  %156 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK4juce9HeapBlockIcLb0EEixIjEERcT_(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef %150) #6
  %157 = load i8, ptr %156, align 1, !tbaa !38
  %158 = trunc nuw i32 %155 to i8
  %159 = or i8 %157, %158
  store i8 %159, ptr %156, align 1, !tbaa !38
  br label %160

160:                                              ; preds = %154, %151
  %161 = call noundef float @_ZNK4juce6Colour13getBrightnessEv(ptr noundef nonnull align 1 dereferenceable(4) %12) #6
  %162 = fcmp ult float %161, 5.000000e-01
  br i1 %162, label %169, label %163

163:                                              ; preds = %160
  %164 = shl nuw nsw i32 1, %148
  %165 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK4juce9HeapBlockIcLb0EEixIjEERcT_(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %150) #6
  %166 = load i8, ptr %165, align 1, !tbaa !38
  %167 = trunc nuw i32 %164 to i8
  %168 = or i8 %166, %167
  store i8 %168, ptr %165, align 1, !tbaa !38
  br label %169

169:                                              ; preds = %163, %160
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  %170 = add nsw i32 %146, -1
  %171 = icmp sgt i32 %146, 0
  br i1 %171, label %.lr.ph.split.us, label %.loopexit, !llvm.loop !39

.split.us135:                                     ; preds = %.lr.ph.split.us
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %187

.lr.ph.split:                                     ; preds = %.lr.ph, %197
  %173 = phi i32 [ %198, %197 ], [ %144, %.lr.ph ]
  %174 = and i32 %173, 7
  %175 = lshr i32 %173, 3
  %176 = add i32 %175, %145
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  invoke void @_ZNK4juce5Image10getPixelAtEii(ptr dead_on_unwind nonnull writable sret(%"class.juce::Colour") align 1 %12, ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef %173, i32 noundef %142)
          to label %177 unwind label %.split

177:                                              ; preds = %.lr.ph.split
  %178 = call noundef zeroext i8 @_ZNK4juce6Colour8getAlphaEv(ptr noundef nonnull align 1 dereferenceable(4) %12) #6
  %179 = icmp slt i8 %178, 0
  br i1 %179, label %180, label %188

180:                                              ; preds = %177
  %181 = shl nuw nsw i32 1, %174
  %182 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK4juce9HeapBlockIcLb0EEixIjEERcT_(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef %176) #6
  %183 = load i8, ptr %182, align 1, !tbaa !38
  %184 = trunc nuw i32 %181 to i8
  %185 = or i8 %183, %184
  store i8 %185, ptr %182, align 1, !tbaa !38
  br label %188

.split:                                           ; preds = %.lr.ph.split
  %186 = landingpad { ptr, i32 }
          cleanup
  br label %187

187:                                              ; preds = %.split.us135, %.split
  %.us-phi = phi { ptr, i32 } [ %186, %.split ], [ %172, %.split.us135 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  br label %229

188:                                              ; preds = %180, %177
  %189 = call noundef float @_ZNK4juce6Colour13getBrightnessEv(ptr noundef nonnull align 1 dereferenceable(4) %12) #6
  %190 = fcmp ult float %189, 5.000000e-01
  br i1 %190, label %197, label %191

191:                                              ; preds = %188
  %192 = shl nuw nsw i32 1, %174
  %193 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK4juce9HeapBlockIcLb0EEixIjEERcT_(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %176) #6
  %194 = load i8, ptr %193, align 1, !tbaa !38
  %195 = trunc nuw i32 %192 to i8
  %196 = or i8 %194, %195
  store i8 %196, ptr %193, align 1, !tbaa !38
  br label %197

197:                                              ; preds = %191, %188
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  %198 = add nsw i32 %173, -1
  %199 = icmp sgt i32 %173, 0
  br i1 %199, label %.lr.ph.split, label %.loopexit, !llvm.loop !39

200:                                              ; preds = %._crit_edge
  %201 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %202 = call noundef ptr @_ZNK4juce9HeapBlockIcLb0EE7getDataEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %203 = load i32, ptr %4, align 4, !tbaa !25
  %204 = load i32, ptr %5, align 4, !tbaa !25
  %205 = invoke i64 @XCreatePixmapFromBitmapData(ptr noundef %201, i64 noundef %85, ptr noundef %202, i32 noundef %203, i32 noundef %204, i64 noundef 65535, i64 noundef 0, i32 noundef 1)
          to label %206 unwind label %225

206:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  %207 = getelementptr inbounds i8, ptr %14, i64 12
  store i16 0, ptr %207, align 4, !tbaa !40
  %208 = getelementptr inbounds i8, ptr %14, i64 10
  store i16 0, ptr %208, align 2, !tbaa !43
  %209 = getelementptr inbounds i8, ptr %14, i64 8
  store i16 0, ptr %209, align 8, !tbaa !44
  %210 = getelementptr inbounds i8, ptr %13, i64 12
  store i16 -1, ptr %210, align 4, !tbaa !40
  %211 = getelementptr inbounds i8, ptr %13, i64 10
  store i16 -1, ptr %211, align 2, !tbaa !43
  %212 = getelementptr inbounds i8, ptr %13, i64 8
  store i16 -1, ptr %212, align 8, !tbaa !44
  %213 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %214 = invoke i64 @XCreatePixmapCursor(ptr noundef %213, i64 noundef %138, i64 noundef %205, ptr noundef nonnull %13, ptr noundef nonnull %14, i32 noundef %.073, i32 noundef %.074)
          to label %215 unwind label %227

215:                                              ; preds = %206
  %216 = inttoptr i64 %214 to ptr
  %217 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %218 = invoke i32 @XFreePixmap(ptr noundef %217, i64 noundef %138)
          to label %219 unwind label %227

219:                                              ; preds = %215
  %220 = load ptr, ptr @_ZN4juce7displayE, align 8, !tbaa !5
  %221 = invoke i32 @XFreePixmap(ptr noundef %220, i64 noundef %205)
          to label %222 unwind label %227

222:                                              ; preds = %219
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  call void @_ZN4juce9HeapBlockIcLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @_ZN4juce9HeapBlockIcLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %232

223:                                              ; preds = %._crit_edge
  %224 = landingpad { ptr, i32 }
          cleanup
  br label %229

225:                                              ; preds = %200
  %226 = landingpad { ptr, i32 }
          cleanup
  br label %229

227:                                              ; preds = %219, %215, %206
  %228 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  br label %229

229:                                              ; preds = %223, %227, %225, %187
  %.pn114 = phi { ptr, i32 } [ %.us-phi, %187 ], [ %224, %223 ], [ %228, %227 ], [ %226, %225 ]
  call void @_ZN4juce9HeapBlockIcLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @_ZN4juce9HeapBlockIcLb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %230

230:                                              ; preds = %229, %140
  %.pn114.pn = phi { ptr, i32 } [ %.pn114, %229 ], [ %.pn.pn, %140 ]
  call void @_ZN4juce5ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %231

231:                                              ; preds = %230, %107
  %.pn114.pn.pn = phi { ptr, i32 } [ %.pn114.pn, %230 ], [ %108, %107 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %233

232:                                              ; preds = %87, %222
  %.3 = phi ptr [ %216, %222 ], [ null, %87 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %234

233:                                              ; preds = %231, %88
  %.pn114.pn.pn.pn = phi { ptr, i32 } [ %.pn114.pn.pn, %231 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %235

234:                                              ; preds = %76, %232
  %.4 = phi ptr [ %.3, %232 ], [ %77, %76 ]
  call void @_ZN4juce11ScopedXLockD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  br label %236

235:                                              ; preds = %70, %74, %.split.us, %233, %46
  %.pn119.pn.pn = phi { ptr, i32 } [ %.pn114.pn.pn.pn, %233 ], [ %47, %46 ], [ %71, %70 ], [ %66, %.split.us ], [ %75, %74 ]
  call void @_ZN4juce11ScopedXLockD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn119.pn.pn

236:                                              ; preds = %1, %234
  %.5 = phi ptr [ %.4, %234 ], [ null, %1 ]
  ret ptr %.5
}

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

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

declare i32 @XFreePixmap(ptr noundef, i64 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 = { 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 = { 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, !14, i64 8}
!10 = !{!"_ZTSN4juce21CustomMouseCursorInfoE", !11, i64 0, !13, i64 8, !15, i64 16}
!11 = !{!"_ZTSN4juce5ImageE", !12, i64 0}
!12 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_14ImagePixelDataEEE", !6, i64 0}
!13 = !{!"_ZTSN4juce5PointIiEE", !14, i64 0, !14, i64 4}
!14 = !{!"int", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!10, !14, i64 12}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !14, i64 16}
!22 = !{!"_ZTS13_XcursorImage", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !6, i64 32}
!23 = !{!22, !14, i64 20}
!24 = !{!22, !6, i64 32}
!25 = !{!14, !14, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!30, !6, i64 232}
!30 = !{!"_ZTS3$_0", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !6, i64 32, !31, i64 40, !31, i64 48, !31, i64 56, !14, i64 64, !6, i64 72, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !6, i64 104, !14, i64 112, !14, i64 116, !6, i64 120, !6, i64 128, !14, i64 136, !31, i64 144, !31, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !14, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !14, i64 224, !14, i64 228, !6, i64 232, !31, i64 240, !31, i64 248, !14, i64 256, !14, i64 260, !6, i64 264, !6, i64 272, !14, i64 280, !6, i64 288}
!31 = !{!"long", !7, i64 0}
!32 = !{!30, !14, i64 224}
!33 = !{!34, !31, i64 16}
!34 = !{!"_ZTS6Screen", !6, i64 0, !6, i64 8, !31, i64 16, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !6, i64 48, !14, i64 56, !6, i64 64, !6, i64 72, !31, i64 80, !31, i64 88, !31, i64 96, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !31, i64 120}
!35 = !{!30, !14, i64 92}
!36 = distinct !{!36, !27, !37}
!37 = !{!"llvm.loop.unswitch.partial.disable"}
!38 = !{!7, !7, i64 0}
!39 = distinct !{!39, !27}
!40 = !{!41, !42, i64 12}
!41 = !{!"_ZTS6XColor", !31, i64 0, !42, i64 8, !42, i64 10, !42, i64 12, !7, i64 14, !7, i64 15}
!42 = !{!"short", !7, i64 0}
!43 = !{!41, !42, i64 10}
!44 = !{!41, !42, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass