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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.juce::StretchableLayoutManager" = type { %"class.juce::OwnedArray.369", i32, [4 x i8] }
%"class.juce::OwnedArray.369" = type { %"class.juce::ArrayAllocationBase.370", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.370" = type <{ %"class.juce::HeapBlock.371", i32, [4 x i8] }>
%"class.juce::HeapBlock.371" = type { ptr }
%"struct.juce::StretchableLayoutManager::ItemLayoutProperties" = type { i32, i32, double, double, double }

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce6jlimitIiEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4juce24StretchableLayoutManager22fitComponentsIntoSpaceEiiii(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #3 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store double 0.000000e+00, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %32 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %32, ptr %13, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %64, %5
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %39 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 0
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = call noundef ptr @_ZNK4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %39, i32 noundef %40) #4
  store ptr %41, ptr %14, align 8, !tbaa !5
  %42 = load ptr, ptr %14, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %42, i32 0, i32 2
  %44 = load double, ptr %43, align 8, !tbaa !13
  %45 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 1
  %46 = load i32, ptr %45, align 8, !tbaa !15
  %47 = call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %44, i32 noundef %46)
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %48, i32 0, i32 1
  store i32 %47, ptr %49, align 4, !tbaa !20
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !20
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = add nsw i32 %53, %52
  store i32 %54, ptr %12, align 4, !tbaa !9
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %55, i32 0, i32 4
  %57 = load double, ptr %56, align 8, !tbaa !21
  %58 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 1
  %59 = load i32, ptr %58, align 8, !tbaa !15
  %60 = call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %57, i32 noundef %59)
  %61 = sitofp i32 %60 to double
  %62 = load double, ptr %11, align 8, !tbaa !11
  %63 = fadd double %62, %61
  store double %63, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %64

64:                                               ; preds = %38
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %13, align 4, !tbaa !9
  br label %33, !llvm.loop !22

67:                                               ; preds = %37
  %68 = load double, ptr %11, align 8, !tbaa !11
  %69 = fcmp ole double %68, 0.000000e+00
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  store double 1.000000e+00, ptr %11, align 8, !tbaa !11
  br label %71

71:                                               ; preds = %70, %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = sub nsw i32 %72, %73
  store i32 %74, ptr %15, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %209, %71
  %76 = load i32, ptr %15, align 4, !tbaa !9
  %77 = icmp sgt i32 %76, 0
  br i1 %77, label %78, label %210

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %79 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %79, ptr %18, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %126, %78
  %81 = load i32, ptr %18, align 4, !tbaa !9
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %129

85:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %86 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 0
  %87 = load i32, ptr %18, align 4, !tbaa !9
  %88 = call noundef ptr @_ZNK4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %86, i32 noundef %87) #4
  store ptr %88, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %89 = load ptr, ptr %19, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %89, i32 0, i32 4
  %91 = load double, ptr %90, align 8, !tbaa !21
  %92 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 1
  %93 = load i32, ptr %92, align 8, !tbaa !15
  %94 = call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %91, i32 noundef %93)
  %95 = sitofp i32 %94 to double
  store double %95, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %96 = load ptr, ptr %19, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !20
  %99 = load ptr, ptr %19, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %99, i32 0, i32 1
  %101 = load i32, ptr %100, align 4, !tbaa !20
  %102 = load ptr, ptr %19, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %102, i32 0, i32 3
  %104 = load double, ptr %103, align 8, !tbaa !24
  %105 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 1
  %106 = load i32, ptr %105, align 8, !tbaa !15
  %107 = call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %104, i32 noundef %106)
  %108 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %101, i32 noundef %107)
  %109 = load double, ptr %20, align 8, !tbaa !11
  %110 = load i32, ptr %9, align 4, !tbaa !9
  %111 = sitofp i32 %110 to double
  %112 = fmul double %109, %111
  %113 = load double, ptr %11, align 8, !tbaa !11
  %114 = fdiv double %112, %113
  %115 = call noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef %114) #4
  %116 = call noundef i32 @_ZN4juce6jlimitIiEET_S1_S1_S1_(i32 noundef %98, i32 noundef %108, i32 noundef %115) #4
  store i32 %116, ptr %21, align 4, !tbaa !9
  %117 = load i32, ptr %21, align 4, !tbaa !9
  %118 = load ptr, ptr %19, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 4, !tbaa !20
  %121 = icmp sgt i32 %117, %120
  br i1 %121, label %122, label %125

122:                                              ; preds = %85
  %123 = load i32, ptr %16, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %16, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %122, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %18, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %18, align 4, !tbaa !9
  br label %80, !llvm.loop !25

129:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %130 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %130, ptr %22, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %199, %129
  %132 = load i32, ptr %22, align 4, !tbaa !9
  %133 = load i32, ptr %8, align 4, !tbaa !9
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %202

136:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %137 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 0
  %138 = load i32, ptr %22, align 4, !tbaa !9
  %139 = call noundef ptr @_ZNK4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %137, i32 noundef %138) #4
  store ptr %139, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %140 = load ptr, ptr %23, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %140, i32 0, i32 4
  %142 = load double, ptr %141, align 8, !tbaa !21
  %143 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 1
  %144 = load i32, ptr %143, align 8, !tbaa !15
  %145 = call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %142, i32 noundef %144)
  %146 = sitofp i32 %145 to double
  store double %146, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %147 = load ptr, ptr %23, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %147, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !20
  %150 = load ptr, ptr %23, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %150, i32 0, i32 1
  %152 = load i32, ptr %151, align 4, !tbaa !20
  %153 = load ptr, ptr %23, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %153, i32 0, i32 3
  %155 = load double, ptr %154, align 8, !tbaa !24
  %156 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 1
  %157 = load i32, ptr %156, align 8, !tbaa !15
  %158 = call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %155, i32 noundef %157)
  %159 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %152, i32 noundef %158)
  %160 = load double, ptr %24, align 8, !tbaa !11
  %161 = load i32, ptr %9, align 4, !tbaa !9
  %162 = sitofp i32 %161 to double
  %163 = fmul double %160, %162
  %164 = load double, ptr %11, align 8, !tbaa !11
  %165 = fdiv double %163, %164
  %166 = call noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef %165) #4
  %167 = call noundef i32 @_ZN4juce6jlimitIiEET_S1_S1_S1_(i32 noundef %149, i32 noundef %159, i32 noundef %166) #4
  store i32 %167, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %168 = load i32, ptr %25, align 4, !tbaa !9
  %169 = load ptr, ptr %23, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %169, i32 0, i32 1
  %171 = load i32, ptr %170, align 4, !tbaa !20
  %172 = sub nsw i32 %168, %171
  store i32 %172, ptr %26, align 4, !tbaa !9
  %173 = load i32, ptr %26, align 4, !tbaa !9
  %174 = icmp sgt i32 %173, 0
  br i1 %174, label %175, label %198

175:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %176 = load i32, ptr %26, align 4, !tbaa !9
  %177 = load i32, ptr %15, align 4, !tbaa !9
  %178 = load i32, ptr %16, align 4, !tbaa !9
  %179 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 1, i32 noundef %178)
  %180 = sdiv i32 %177, %179
  %181 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %176, i32 noundef %180)
  store i32 %181, ptr %27, align 4, !tbaa !9
  %182 = load i32, ptr %27, align 4, !tbaa !9
  %183 = icmp sgt i32 %182, 0
  br i1 %183, label %184, label %197

184:                                              ; preds = %175
  %185 = load i32, ptr %17, align 4, !tbaa !9
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %17, align 4, !tbaa !9
  %187 = load i32, ptr %16, align 4, !tbaa !9
  %188 = add nsw i32 %187, -1
  store i32 %188, ptr %16, align 4, !tbaa !9
  %189 = load i32, ptr %27, align 4, !tbaa !9
  %190 = load ptr, ptr %23, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %190, i32 0, i32 1
  %192 = load i32, ptr %191, align 4, !tbaa !20
  %193 = add nsw i32 %192, %189
  store i32 %193, ptr %191, align 4, !tbaa !20
  %194 = load i32, ptr %27, align 4, !tbaa !9
  %195 = load i32, ptr %15, align 4, !tbaa !9
  %196 = sub nsw i32 %195, %194
  store i32 %196, ptr %15, align 4, !tbaa !9
  br label %197

197:                                              ; preds = %184, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %198

198:                                              ; preds = %197, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %22, align 4, !tbaa !9
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %22, align 4, !tbaa !9
  br label %131, !llvm.loop !26

202:                                              ; preds = %135
  %203 = load i32, ptr %17, align 4, !tbaa !9
  %204 = icmp sle i32 %203, 0
  br i1 %204, label %205, label %206

205:                                              ; preds = %202
  store i32 6, ptr %28, align 4
  br label %207

206:                                              ; preds = %202
  store i32 0, ptr %28, align 4
  br label %207

207:                                              ; preds = %206, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  %208 = load i32, ptr %28, align 4
  switch i32 %208, label %231 [
    i32 0, label %209
    i32 6, label %210
  ]

209:                                              ; preds = %207
  br label %75, !llvm.loop !27

210:                                              ; preds = %207, %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %211 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %211, ptr %29, align 4, !tbaa !9
  br label %212

212:                                              ; preds = %226, %210
  %213 = load i32, ptr %29, align 4, !tbaa !9
  %214 = load i32, ptr %8, align 4, !tbaa !9
  %215 = icmp slt i32 %213, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %212
  store i32 13, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %229

217:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %218 = getelementptr inbounds %"class.juce::StretchableLayoutManager", ptr %31, i32 0, i32 0
  %219 = load i32, ptr %29, align 4, !tbaa !9
  %220 = call noundef ptr @_ZNK4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %218, i32 noundef %219) #4
  store ptr %220, ptr %30, align 8, !tbaa !5
  %221 = load ptr, ptr %30, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %221, i32 0, i32 1
  %223 = load i32, ptr %222, align 4, !tbaa !20
  %224 = load i32, ptr %10, align 4, !tbaa !9
  %225 = add nsw i32 %224, %223
  store i32 %225, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  br label %226

226:                                              ; preds = %217
  %227 = load i32, ptr %29, align 4, !tbaa !9
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %29, align 4, !tbaa !9
  br label %212, !llvm.loop !28

229:                                              ; preds = %216
  %230 = load i32, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  ret i32 %230

231:                                              ; preds = %207
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef, i32 noundef) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTSN4juce24StretchableLayoutManager20ItemLayoutPropertiesE", !10, i64 0, !10, i64 4, !12, i64 8, !12, i64 16, !12, i64 24}
!15 = !{!16, !10, i64 24}
!16 = !{!"_ZTSN4juce24StretchableLayoutManagerE", !17, i64 0, !10, i64 24}
!17 = !{!"_ZTSN4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEEE", !18, i64 0, !10, i64 16}
!18 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEEE", !19, i64 0, !10, i64 8}
!19 = !{!"_ZTSN4juce9HeapBlockIPNS_24StretchableLayoutManager20ItemLayoutPropertiesELb0EEE", !6, i64 0}
!20 = !{!14, !10, i64 4}
!21 = !{!14, !12, i64 24}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!14, !12, i64 16}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !23}


; 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"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce6jlimitIiEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN4juce24StretchableLayoutManager22fitComponentsIntoSpaceEiiii(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 align 2 {
  %6 = icmp slt i32 %1, %2
  br i1 %6, label %.lr.ph, label %._crit_edge116

.lr.ph:                                           ; preds = %5
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  br label %68

._crit_edge:                                      ; preds = %68
  %8 = fcmp ugt double %81, 0.000000e+00
  %.1 = select i1 %8, double %81, double 1.000000e+00
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = sitofp i32 %3 to double
  br i1 %6, label %.split.us.preheader, label %._crit_edge116

.split.us.preheader:                              ; preds = %._crit_edge
  %11 = sub nsw i32 %3, %75
  br label %.split.us

.split.us:                                        ; preds = %.split.us.preheader, %._crit_edge98.us
  %.070.us = phi i32 [ %.3.us, %._crit_edge98.us ], [ %11, %.split.us.preheader ]
  %12 = icmp sgt i32 %.070.us, 0
  br i1 %12, label %.lr.ph91.us, label %.split102.us

.preheader.us:                                    ; preds = %.lr.ph91.us, %44
  %.17196.us = phi i32 [ %.3.us, %44 ], [ %.070.us, %.lr.ph91.us ]
  %.27495.us = phi i32 [ %.4.us, %44 ], [ %spec.select.us, %.lr.ph91.us ]
  %.07694.us = phi i32 [ %45, %44 ], [ %1, %.lr.ph91.us ]
  %.07793.us = phi i32 [ %.279.us, %44 ], [ 0, %.lr.ph91.us ]
  %13 = tail call noundef ptr @_ZNK4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %0, i32 noundef %.07694.us) #2
  %14 = getelementptr inbounds i8, ptr %13, i64 24
  %15 = load double, ptr %14, align 8, !tbaa !5
  %16 = load i32, ptr %9, align 8, !tbaa !11
  %17 = tail call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %15, i32 noundef %16)
  %18 = sitofp i32 %17 to double
  %19 = getelementptr inbounds i8, ptr %13, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %13, i64 16
  %22 = load double, ptr %21, align 8, !tbaa !18
  %23 = load i32, ptr %9, align 8, !tbaa !11
  %24 = tail call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %22, i32 noundef %23)
  %25 = tail call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %20, i32 noundef %24)
  %26 = fmul double %10, %18
  %27 = fdiv double %26, %.1
  %28 = tail call noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef %27) #2
  %29 = tail call noundef i32 @_ZN4juce6jlimitIiEET_S1_S1_S1_(i32 noundef %20, i32 noundef %25, i32 noundef %28) #2
  %30 = load i32, ptr %19, align 4, !tbaa !17
  %31 = sub nsw i32 %29, %30
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %33, label %44

33:                                               ; preds = %.preheader.us
  %34 = tail call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 1, i32 noundef %.27495.us)
  %35 = sdiv i32 %.17196.us, %34
  %36 = tail call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %31, i32 noundef %35)
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %38, label %44

38:                                               ; preds = %33
  %39 = add nsw i32 %.07793.us, 1
  %40 = add nsw i32 %.27495.us, -1
  %41 = load i32, ptr %19, align 4, !tbaa !17
  %42 = add nsw i32 %41, %36
  store i32 %42, ptr %19, align 4, !tbaa !17
  %43 = sub nsw i32 %.17196.us, %36
  br label %44

44:                                               ; preds = %38, %33, %.preheader.us
  %.279.us = phi i32 [ %.07793.us, %.preheader.us ], [ %39, %38 ], [ %.07793.us, %33 ]
  %.4.us = phi i32 [ %.27495.us, %.preheader.us ], [ %40, %38 ], [ %.27495.us, %33 ]
  %.3.us = phi i32 [ %.17196.us, %.preheader.us ], [ %43, %38 ], [ %.17196.us, %33 ]
  %45 = add i32 %.07694.us, 1
  %exitcond122.not = icmp eq i32 %45, %2
  br i1 %exitcond122.not, label %._crit_edge98.us, label %.preheader.us, !llvm.loop !19

.lr.ph91.us:                                      ; preds = %.split.us, %.lr.ph91.us
  %.07290.us = phi i32 [ %spec.select.us, %.lr.ph91.us ], [ 0, %.split.us ]
  %.08089.us = phi i32 [ %66, %.lr.ph91.us ], [ %1, %.split.us ]
  %46 = tail call noundef ptr @_ZNK4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %0, i32 noundef %.08089.us) #2
  %47 = getelementptr inbounds i8, ptr %46, i64 24
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = load i32, ptr %9, align 8, !tbaa !11
  %50 = tail call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %48, i32 noundef %49)
  %51 = sitofp i32 %50 to double
  %52 = getelementptr inbounds i8, ptr %46, i64 4
  %53 = load i32, ptr %52, align 4, !tbaa !17
  %54 = getelementptr inbounds i8, ptr %46, i64 16
  %55 = load double, ptr %54, align 8, !tbaa !18
  %56 = load i32, ptr %9, align 8, !tbaa !11
  %57 = tail call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %55, i32 noundef %56)
  %58 = tail call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef %53, i32 noundef %57)
  %59 = fmul double %10, %51
  %60 = fdiv double %59, %.1
  %61 = tail call noundef i32 @_ZN4juce10roundToIntIdEEiT_(double noundef %60) #2
  %62 = tail call noundef i32 @_ZN4juce6jlimitIiEET_S1_S1_S1_(i32 noundef %53, i32 noundef %58, i32 noundef %61) #2
  %63 = load i32, ptr %52, align 4, !tbaa !17
  %64 = icmp sgt i32 %62, %63
  %65 = zext i1 %64 to i32
  %spec.select.us = add nuw nsw i32 %.07290.us, %65
  %66 = add i32 %.08089.us, 1
  %exitcond121.not = icmp eq i32 %66, %2
  br i1 %exitcond121.not, label %.preheader.us, label %.lr.ph91.us, !llvm.loop !21

._crit_edge98.us:                                 ; preds = %44
  %67 = icmp slt i32 %.279.us, 1
  br i1 %67, label %.split102.us, label %.split.us

68:                                               ; preds = %.lr.ph, %68
  %.06787 = phi double [ 0.000000e+00, %.lr.ph ], [ %81, %68 ]
  %.06886 = phi i32 [ 0, %.lr.ph ], [ %75, %68 ]
  %.06985 = phi i32 [ %1, %.lr.ph ], [ %82, %68 ]
  %69 = tail call noundef ptr @_ZNK4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %0, i32 noundef %.06985) #2
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load double, ptr %70, align 8, !tbaa !22
  %72 = load i32, ptr %7, align 8, !tbaa !11
  %73 = tail call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %71, i32 noundef %72)
  %74 = getelementptr inbounds i8, ptr %69, i64 4
  store i32 %73, ptr %74, align 4, !tbaa !17
  %75 = add nsw i32 %73, %.06886
  %76 = getelementptr inbounds i8, ptr %69, i64 24
  %77 = load double, ptr %76, align 8, !tbaa !5
  %78 = load i32, ptr %7, align 8, !tbaa !11
  %79 = tail call noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef %77, i32 noundef %78)
  %80 = sitofp i32 %79 to double
  %81 = fadd double %.06787, %80
  %82 = add i32 %.06985, 1
  %exitcond.not = icmp eq i32 %82, %2
  br i1 %exitcond.not, label %._crit_edge, label %68, !llvm.loop !23

.split102.us:                                     ; preds = %.split.us, %._crit_edge98.us
  br i1 %6, label %.lr.ph115, label %._crit_edge116

._crit_edge116:                                   ; preds = %.lr.ph115, %5, %._crit_edge, %.split102.us
  %.0.lcssa = phi i32 [ %4, %.split102.us ], [ %4, %._crit_edge ], [ %4, %5 ], [ %86, %.lr.ph115 ]
  ret i32 %.0.lcssa

.lr.ph115:                                        ; preds = %.split102.us, %.lr.ph115
  %.0113 = phi i32 [ %86, %.lr.ph115 ], [ %4, %.split102.us ]
  %.065112 = phi i32 [ %87, %.lr.ph115 ], [ %1, %.split102.us ]
  %83 = tail call noundef ptr @_ZNK4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %0, i32 noundef %.065112) #2
  %84 = getelementptr inbounds i8, ptr %83, i64 4
  %85 = load i32, ptr %84, align 4, !tbaa !17
  %86 = add nsw i32 %85, %.0113
  %87 = add i32 %.065112, 1
  %exitcond123.not = icmp eq i32 %87, %2
  br i1 %exitcond123.not, label %._crit_edge116, label %.lr.ph115, !llvm.loop !24
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce24StretchableLayoutManager14sizeToRealSizeEdi(double noundef, i32 noundef) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!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, !10, i64 24}
!6 = !{!"_ZTSN4juce24StretchableLayoutManager20ItemLayoutPropertiesE", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!12, !7, i64 24}
!12 = !{!"_ZTSN4juce24StretchableLayoutManagerE", !13, i64 0, !7, i64 24}
!13 = !{!"_ZTSN4juce10OwnedArrayINS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEEE", !14, i64 0, !7, i64 16}
!14 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_24StretchableLayoutManager20ItemLayoutPropertiesENS_20DummyCriticalSectionEEE", !15, i64 0, !7, i64 8}
!15 = !{!"_ZTSN4juce9HeapBlockIPNS_24StretchableLayoutManager20ItemLayoutPropertiesELb0EEE", !16, i64 0}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!6, !7, i64 4}
!18 = !{!6, !10, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!6, !10, i64 8}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass