; LLVM IR from jrouwe/JoltPhysics :: TestFramework/Image (ZoomImage)

; 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.BlitSettings = type { i8, i8, i8, i8, i8, %"class.JPH::Color", %"class.JPH::Color", %class.ZoomSettings }
%"class.JPH::Color" = type { %union.anon }
%union.anon = type { i32 }
%class.ZoomSettings = type { i32, i8, float }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Ref" = type { ptr }

@_ZN12BlitSettings8sDefaultE = external global %class.BlitSettings, align 4

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9ZoomImageN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(12) %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.JPH::RefConst", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.JPH::Ref", align 8
  %18 = alloca %"class.JPH::RefConst", align 8
  %19 = alloca %"class.JPH::Ref", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.JPH::Ref", align 8
  %22 = alloca %"class.JPH::RefConst", align 8
  %23 = alloca %"class.JPH::Ref", align 8
  %24 = alloca %"class.JPH::RefConst", align 8
  %25 = alloca %"class.JPH::Ref", align 8
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca %"class.JPH::Ref", align 8
  %29 = alloca %"class.JPH::RefConst", align 8
  %30 = alloca %"class.JPH::Ref", align 8
  %31 = alloca %"class.JPH::RefConst", align 8
  %32 = alloca %"class.JPH::Ref", align 8
  %33 = alloca %"class.JPH::Ref", align 8
  %34 = alloca %"class.JPH::RefConst", align 8
  %35 = alloca %"class.JPH::Ref", align 8
  %36 = alloca %"class.JPH::RefConst", align 8
  %37 = alloca %"class.JPH::Ref", align 8
  %38 = alloca %"class.JPH::RefConst", align 8
  %39 = alloca %"class.JPH::Ref", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.ZoomSettings, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZL9GetFilter7EFilter(i32 noundef %42)
  store ptr %43, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %44 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %45 = call noundef i32 @_ZNK7Surface20GetClosest8BitFormatEv(ptr noundef nonnull align 8 dereferenceable(48) %44)
  store i32 %45, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %46 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %47 = call noundef i32 @_ZNK7Surface20GetClosest8BitFormatEv(ptr noundef nonnull align 8 dereferenceable(48) %46)
  store i32 %47, ptr %11, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %48 = load i32, ptr %10, align 4, !tbaa !14
  %49 = call noundef nonnull align 8 dereferenceable(48) ptr @_Z20GetFormatDescription14ESurfaceFormat(i32 noundef %48)
  store ptr %49, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %50 = load i32, ptr %11, align 4, !tbaa !14
  %51 = call noundef nonnull align 8 dereferenceable(48) ptr @_Z20GetFormatDescription14ESurfaceFormat(i32 noundef %50)
  store ptr %51, ptr %13, align 8, !tbaa !5
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = call noundef i32 @_ZNK17FormatDescription21GetNumberOfComponentsEv(ptr noundef nonnull align 8 dereferenceable(48) %52)
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = call noundef i32 @_ZNK17FormatDescription21GetNumberOfComponentsEv(ptr noundef nonnull align 8 dereferenceable(48) %54)
  %56 = icmp slt i32 %53, %55
  br i1 %56, label %57, label %59

57:                                               ; preds = %3
  %58 = load i32, ptr %10, align 4, !tbaa !14
  store i32 %58, ptr %9, align 4, !tbaa !14
  br label %79

59:                                               ; preds = %3
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = call noundef i32 @_ZNK17FormatDescription21GetNumberOfComponentsEv(ptr noundef nonnull align 8 dereferenceable(48) %60)
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = call noundef i32 @_ZNK17FormatDescription21GetNumberOfComponentsEv(ptr noundef nonnull align 8 dereferenceable(48) %62)
  %64 = icmp sgt i32 %61, %63
  br i1 %64, label %65, label %67

65:                                               ; preds = %59
  %66 = load i32, ptr %11, align 4, !tbaa !14
  store i32 %66, ptr %9, align 4, !tbaa !14
  br label %78

67:                                               ; preds = %59
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = call noundef i32 @_ZNK17FormatDescription16GetBytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(48) %68)
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = call noundef i32 @_ZNK17FormatDescription16GetBytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(48) %70)
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %73, label %75

73:                                               ; preds = %67
  %74 = load i32, ptr %10, align 4, !tbaa !14
  store i32 %74, ptr %9, align 4, !tbaa !14
  br label %77

75:                                               ; preds = %67
  %76 = load i32, ptr %11, align 4, !tbaa !14
  store i32 %76, ptr %9, align 4, !tbaa !14
  br label %77

77:                                               ; preds = %75, %73
  br label %78

78:                                               ; preds = %77, %65
  br label %79

79:                                               ; preds = %78, %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  call void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %0)
  %80 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %81 unwind label %106

81:                                               ; preds = %79
  %82 = invoke noundef i32 @_ZNK7Surface9GetFormatEv(ptr noundef nonnull align 8 dereferenceable(48) %80)
          to label %83 unwind label %106

83:                                               ; preds = %81
  %84 = load i32, ptr %9, align 4, !tbaa !14
  %85 = icmp ne i32 %82, %84
  br i1 %85, label %86, label %139

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %87 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #10
          to label %88 unwind label %110

88:                                               ; preds = %86
  %89 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %90 unwind label %114

90:                                               ; preds = %88
  %91 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %89)
          to label %92 unwind label %114

92:                                               ; preds = %90
  %93 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %94 unwind label %114

94:                                               ; preds = %92
  %95 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %93)
          to label %96 unwind label %114

96:                                               ; preds = %94
  %97 = load i32, ptr %9, align 4, !tbaa !14
  invoke void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64) %87, i32 noundef %91, i32 noundef %95, i32 noundef %97, i32 noundef 0)
          to label %98 unwind label %114

98:                                               ; preds = %96
  invoke void @_ZN3JPH3RefI7SurfaceEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef %87)
          to label %99 unwind label %110

99:                                               ; preds = %98
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %100 unwind label %118

100:                                              ; preds = %99
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %101 unwind label %122

101:                                              ; preds = %100
  %102 = invoke noundef zeroext i1 @_Z11BlitSurfaceN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12BlitSettings(ptr noundef %18, ptr noundef %19, ptr noundef nonnull align 4 dereferenceable(28) @_ZN12BlitSettings8sDefaultE)
          to label %103 unwind label %126

103:                                              ; preds = %101
  %104 = xor i1 %102, true
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br i1 %104, label %105, label %131

105:                                              ; preds = %103
  store i1 false, ptr %4, align 1
  store i32 1, ptr %20, align 4
  br label %134

106:                                              ; preds = %81, %79
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %15, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %16, align 4
  br label %456

110:                                              ; preds = %98, %86
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %15, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %16, align 4
  br label %138

114:                                              ; preds = %96, %94, %92, %90, %88
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %15, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %16, align 4
  call void @_ZdlPvm(ptr noundef %87, i64 noundef 64) #11
  br label %138

118:                                              ; preds = %131, %99
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %15, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %16, align 4
  br label %137

122:                                              ; preds = %100
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %15, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %16, align 4
  br label %130

126:                                              ; preds = %101
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %15, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %16, align 4
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  br label %130

130:                                              ; preds = %126, %122
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br label %137

131:                                              ; preds = %103
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstI7SurfaceEaSERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %133 unwind label %118

133:                                              ; preds = %131
  store i32 0, ptr %20, align 4
  br label %134

134:                                              ; preds = %133, %105
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  %135 = load i32, ptr %20, align 4
  switch i32 %135, label %454 [
    i32 0, label %136
  ]

136:                                              ; preds = %134
  br label %139

137:                                              ; preds = %130, %118
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  br label %138

138:                                              ; preds = %137, %114, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %456

139:                                              ; preds = %136, %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %140 unwind label %162

140:                                              ; preds = %139
  %141 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %142 unwind label %166

142:                                              ; preds = %140
  %143 = invoke noundef i32 @_ZNK7Surface9GetFormatEv(ptr noundef nonnull align 8 dereferenceable(48) %141)
          to label %144 unwind label %166

144:                                              ; preds = %142
  %145 = load i32, ptr %9, align 4, !tbaa !14
  %146 = icmp ne i32 %143, %145
  br i1 %146, label %147, label %174

147:                                              ; preds = %144
  %148 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #10
          to label %149 unwind label %166

149:                                              ; preds = %147
  %150 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %151 unwind label %170

151:                                              ; preds = %149
  %152 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %150)
          to label %153 unwind label %170

153:                                              ; preds = %151
  %154 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %155 unwind label %170

155:                                              ; preds = %153
  %156 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %154)
          to label %157 unwind label %170

157:                                              ; preds = %155
  %158 = load i32, ptr %9, align 4, !tbaa !14
  invoke void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64) %148, i32 noundef %152, i32 noundef %156, i32 noundef %158, i32 noundef 0)
          to label %159 unwind label %170

159:                                              ; preds = %157
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH3RefI7SurfaceEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef %148)
          to label %161 unwind label %166

161:                                              ; preds = %159
  br label %174

162:                                              ; preds = %139
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %15, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %16, align 4
  br label %453

166:                                              ; preds = %433, %430, %429, %427, %426, %424, %214, %210, %208, %206, %204, %190, %186, %184, %182, %180, %179, %177, %176, %174, %159, %147, %142, %140
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %15, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %16, align 4
  br label %452

170:                                              ; preds = %157, %155, %153, %151, %149
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %15, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %16, align 4
  call void @_ZdlPvm(ptr noundef %148, i64 noundef 64) #11
  br label %452

174:                                              ; preds = %161, %144
  %175 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %176 unwind label %166

176:                                              ; preds = %174
  invoke void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48) %175, i32 noundef 1)
          to label %177 unwind label %166

177:                                              ; preds = %176
  %178 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %179 unwind label %166

179:                                              ; preds = %177
  invoke void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48) %178, i32 noundef 2)
          to label %180 unwind label %166

180:                                              ; preds = %179
  %181 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %182 unwind label %166

182:                                              ; preds = %180
  %183 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %181)
          to label %184 unwind label %166

184:                                              ; preds = %182
  %185 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %186 unwind label %166

186:                                              ; preds = %184
  %187 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %185)
          to label %188 unwind label %166

188:                                              ; preds = %186
  %189 = icmp eq i32 %183, %187
  br i1 %189, label %190, label %204

190:                                              ; preds = %188
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %191 unwind label %166

191:                                              ; preds = %190
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %192 unwind label %195

192:                                              ; preds = %191
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZL13sZoomVerticalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef %22, ptr noundef %23, ptr noundef nonnull align 4 dereferenceable(12) %193)
          to label %194 unwind label %199

194:                                              ; preds = %192
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  br label %424

195:                                              ; preds = %191
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %15, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %16, align 4
  br label %203

199:                                              ; preds = %192
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %15, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %16, align 4
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  br label %203

203:                                              ; preds = %199, %195
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  br label %452

204:                                              ; preds = %188
  %205 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %206 unwind label %166

206:                                              ; preds = %204
  %207 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %205)
          to label %208 unwind label %166

208:                                              ; preds = %206
  %209 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %210 unwind label %166

210:                                              ; preds = %208
  %211 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %209)
          to label %212 unwind label %166

212:                                              ; preds = %210
  %213 = icmp eq i32 %207, %211
  br i1 %213, label %214, label %228

214:                                              ; preds = %212
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %215 unwind label %166

215:                                              ; preds = %214
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %216 unwind label %219

216:                                              ; preds = %215
  %217 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZL15sZoomHorizontalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef %24, ptr noundef %25, ptr noundef nonnull align 4 dereferenceable(12) %217)
          to label %218 unwind label %223

218:                                              ; preds = %216
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  br label %423

219:                                              ; preds = %215
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %15, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %16, align 4
  br label %227

223:                                              ; preds = %216
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %15, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %16, align 4
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  br label %227

227:                                              ; preds = %223, %219
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  br label %452

228:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %229 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %230 unwind label %320

230:                                              ; preds = %228
  %231 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %229)
          to label %232 unwind label %320

232:                                              ; preds = %230
  %233 = sitofp i32 %231 to float
  %234 = load ptr, ptr %8, align 8, !tbaa !5
  %235 = load ptr, ptr %234, align 8, !tbaa !16
  %236 = getelementptr inbounds ptr, ptr %235, i64 2
  %237 = load ptr, ptr %236, align 8
  %238 = invoke noundef float %237(ptr noundef nonnull align 8 dereferenceable(8) %234)
          to label %239 unwind label %320

239:                                              ; preds = %232
  %240 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %241 unwind label %320

241:                                              ; preds = %239
  %242 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %240)
          to label %243 unwind label %320

243:                                              ; preds = %241
  %244 = sitofp i32 %242 to float
  %245 = load ptr, ptr %8, align 8, !tbaa !5
  %246 = load ptr, ptr %245, align 8, !tbaa !16
  %247 = getelementptr inbounds ptr, ptr %246, i64 2
  %248 = load ptr, ptr %247, align 8
  %249 = invoke noundef float %248(ptr noundef nonnull align 8 dereferenceable(8) %245)
          to label %250 unwind label %320

250:                                              ; preds = %243
  %251 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %252 unwind label %320

252:                                              ; preds = %250
  %253 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %251)
          to label %254 unwind label %320

254:                                              ; preds = %252
  %255 = sitofp i32 %253 to float
  %256 = fmul float %249, %255
  %257 = call float @llvm.fmuladd.f32(float %238, float %244, float %256)
  %258 = fmul float %233, %257
  store float %258, ptr %26, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %259 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %260 unwind label %324

260:                                              ; preds = %254
  %261 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %259)
          to label %262 unwind label %324

262:                                              ; preds = %260
  %263 = sitofp i32 %261 to float
  %264 = load ptr, ptr %8, align 8, !tbaa !5
  %265 = load ptr, ptr %264, align 8, !tbaa !16
  %266 = getelementptr inbounds ptr, ptr %265, i64 2
  %267 = load ptr, ptr %266, align 8
  %268 = invoke noundef float %267(ptr noundef nonnull align 8 dereferenceable(8) %264)
          to label %269 unwind label %324

269:                                              ; preds = %262
  %270 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %271 unwind label %324

271:                                              ; preds = %269
  %272 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %270)
          to label %273 unwind label %324

273:                                              ; preds = %271
  %274 = sitofp i32 %272 to float
  %275 = load ptr, ptr %8, align 8, !tbaa !5
  %276 = load ptr, ptr %275, align 8, !tbaa !16
  %277 = getelementptr inbounds ptr, ptr %276, i64 2
  %278 = load ptr, ptr %277, align 8
  %279 = invoke noundef float %278(ptr noundef nonnull align 8 dereferenceable(8) %275)
          to label %280 unwind label %324

280:                                              ; preds = %273
  %281 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %282 unwind label %324

282:                                              ; preds = %280
  %283 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %281)
          to label %284 unwind label %324

284:                                              ; preds = %282
  %285 = sitofp i32 %283 to float
  %286 = fmul float %279, %285
  %287 = call float @llvm.fmuladd.f32(float %268, float %274, float %286)
  %288 = fmul float %263, %287
  store float %288, ptr %27, align 4, !tbaa !18
  %289 = load float, ptr %26, align 4, !tbaa !18
  %290 = load float, ptr %27, align 4, !tbaa !18
  %291 = fcmp olt float %289, %290
  br i1 %291, label %292, label %360

292:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %293 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #10
          to label %294 unwind label %328

294:                                              ; preds = %292
  %295 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %296 unwind label %332

296:                                              ; preds = %294
  %297 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %295)
          to label %298 unwind label %332

298:                                              ; preds = %296
  %299 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %300 unwind label %332

300:                                              ; preds = %298
  %301 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %299)
          to label %302 unwind label %332

302:                                              ; preds = %300
  %303 = load i32, ptr %9, align 4, !tbaa !14
  invoke void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64) %293, i32 noundef %297, i32 noundef %301, i32 noundef %303, i32 noundef 0)
          to label %304 unwind label %332

304:                                              ; preds = %302
  invoke void @_ZN3JPH3RefI7SurfaceEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef %293)
          to label %305 unwind label %328

305:                                              ; preds = %304
  %306 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %307 unwind label %336

307:                                              ; preds = %305
  invoke void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48) %306, i32 noundef 3)
          to label %308 unwind label %336

308:                                              ; preds = %307
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %309 unwind label %336

309:                                              ; preds = %308
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %310 unwind label %340

310:                                              ; preds = %309
  %311 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZL13sZoomVerticalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef %29, ptr noundef %30, ptr noundef nonnull align 4 dereferenceable(12) %311)
          to label %312 unwind label %344

312:                                              ; preds = %310
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %29) #9
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %313 unwind label %336

313:                                              ; preds = %312
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %314 unwind label %349

314:                                              ; preds = %313
  %315 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZL15sZoomHorizontalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef %31, ptr noundef %32, ptr noundef nonnull align 4 dereferenceable(12) %315)
          to label %316 unwind label %353

316:                                              ; preds = %314
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %32) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %31) #9
  %317 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %318 unwind label %336

318:                                              ; preds = %316
  invoke void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48) %317)
          to label %319 unwind label %336

319:                                              ; preds = %318
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %420

320:                                              ; preds = %252, %250, %243, %241, %239, %232, %230, %228
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %15, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %16, align 4
  br label %422

324:                                              ; preds = %282, %280, %273, %271, %269, %262, %260, %254
  %325 = landingpad { ptr, i32 }
          cleanup
  %326 = extractvalue { ptr, i32 } %325, 0
  store ptr %326, ptr %15, align 8
  %327 = extractvalue { ptr, i32 } %325, 1
  store i32 %327, ptr %16, align 4
  br label %421

328:                                              ; preds = %304, %292
  %329 = landingpad { ptr, i32 }
          cleanup
  %330 = extractvalue { ptr, i32 } %329, 0
  store ptr %330, ptr %15, align 8
  %331 = extractvalue { ptr, i32 } %329, 1
  store i32 %331, ptr %16, align 4
  br label %359

332:                                              ; preds = %302, %300, %298, %296, %294
  %333 = landingpad { ptr, i32 }
          cleanup
  %334 = extractvalue { ptr, i32 } %333, 0
  store ptr %334, ptr %15, align 8
  %335 = extractvalue { ptr, i32 } %333, 1
  store i32 %335, ptr %16, align 4
  call void @_ZdlPvm(ptr noundef %293, i64 noundef 64) #11
  br label %359

336:                                              ; preds = %318, %316, %312, %308, %307, %305
  %337 = landingpad { ptr, i32 }
          cleanup
  %338 = extractvalue { ptr, i32 } %337, 0
  store ptr %338, ptr %15, align 8
  %339 = extractvalue { ptr, i32 } %337, 1
  store i32 %339, ptr %16, align 4
  br label %358

340:                                              ; preds = %309
  %341 = landingpad { ptr, i32 }
          cleanup
  %342 = extractvalue { ptr, i32 } %341, 0
  store ptr %342, ptr %15, align 8
  %343 = extractvalue { ptr, i32 } %341, 1
  store i32 %343, ptr %16, align 4
  br label %348

344:                                              ; preds = %310
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %15, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %16, align 4
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  br label %348

348:                                              ; preds = %344, %340
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %29) #9
  br label %358

349:                                              ; preds = %313
  %350 = landingpad { ptr, i32 }
          cleanup
  %351 = extractvalue { ptr, i32 } %350, 0
  store ptr %351, ptr %15, align 8
  %352 = extractvalue { ptr, i32 } %350, 1
  store i32 %352, ptr %16, align 4
  br label %357

353:                                              ; preds = %314
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %15, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %16, align 4
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %32) #9
  br label %357

357:                                              ; preds = %353, %349
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %31) #9
  br label %358

358:                                              ; preds = %357, %348, %336
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #9
  br label %359

359:                                              ; preds = %358, %332, %328
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %421

360:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  %361 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #10
          to label %362 unwind label %388

362:                                              ; preds = %360
  %363 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %364 unwind label %392

364:                                              ; preds = %362
  %365 = invoke noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %363)
          to label %366 unwind label %392

366:                                              ; preds = %364
  %367 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %368 unwind label %392

368:                                              ; preds = %366
  %369 = invoke noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %367)
          to label %370 unwind label %392

370:                                              ; preds = %368
  %371 = load i32, ptr %9, align 4, !tbaa !14
  invoke void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64) %361, i32 noundef %365, i32 noundef %369, i32 noundef %371, i32 noundef 0)
          to label %372 unwind label %392

372:                                              ; preds = %370
  invoke void @_ZN3JPH3RefI7SurfaceEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef %361)
          to label %373 unwind label %388

373:                                              ; preds = %372
  %374 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %375 unwind label %396

375:                                              ; preds = %373
  invoke void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48) %374, i32 noundef 3)
          to label %376 unwind label %396

376:                                              ; preds = %375
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %377 unwind label %396

377:                                              ; preds = %376
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %378 unwind label %400

378:                                              ; preds = %377
  %379 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZL15sZoomHorizontalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef %34, ptr noundef %35, ptr noundef nonnull align 4 dereferenceable(12) %379)
          to label %380 unwind label %404

380:                                              ; preds = %378
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %35) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %34) #9
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %381 unwind label %396

381:                                              ; preds = %380
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %382 unwind label %409

382:                                              ; preds = %381
  %383 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZL13sZoomVerticalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef %36, ptr noundef %37, ptr noundef nonnull align 4 dereferenceable(12) %383)
          to label %384 unwind label %413

384:                                              ; preds = %382
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #9
  %385 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %386 unwind label %396

386:                                              ; preds = %384
  invoke void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48) %385)
          to label %387 unwind label %396

387:                                              ; preds = %386
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  br label %420

388:                                              ; preds = %372, %360
  %389 = landingpad { ptr, i32 }
          cleanup
  %390 = extractvalue { ptr, i32 } %389, 0
  store ptr %390, ptr %15, align 8
  %391 = extractvalue { ptr, i32 } %389, 1
  store i32 %391, ptr %16, align 4
  br label %419

392:                                              ; preds = %370, %368, %366, %364, %362
  %393 = landingpad { ptr, i32 }
          cleanup
  %394 = extractvalue { ptr, i32 } %393, 0
  store ptr %394, ptr %15, align 8
  %395 = extractvalue { ptr, i32 } %393, 1
  store i32 %395, ptr %16, align 4
  call void @_ZdlPvm(ptr noundef %361, i64 noundef 64) #11
  br label %419

396:                                              ; preds = %386, %384, %380, %376, %375, %373
  %397 = landingpad { ptr, i32 }
          cleanup
  %398 = extractvalue { ptr, i32 } %397, 0
  store ptr %398, ptr %15, align 8
  %399 = extractvalue { ptr, i32 } %397, 1
  store i32 %399, ptr %16, align 4
  br label %418

400:                                              ; preds = %377
  %401 = landingpad { ptr, i32 }
          cleanup
  %402 = extractvalue { ptr, i32 } %401, 0
  store ptr %402, ptr %15, align 8
  %403 = extractvalue { ptr, i32 } %401, 1
  store i32 %403, ptr %16, align 4
  br label %408

404:                                              ; preds = %378
  %405 = landingpad { ptr, i32 }
          cleanup
  %406 = extractvalue { ptr, i32 } %405, 0
  store ptr %406, ptr %15, align 8
  %407 = extractvalue { ptr, i32 } %405, 1
  store i32 %407, ptr %16, align 4
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %35) #9
  br label %408

408:                                              ; preds = %404, %400
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %34) #9
  br label %418

409:                                              ; preds = %381
  %410 = landingpad { ptr, i32 }
          cleanup
  %411 = extractvalue { ptr, i32 } %410, 0
  store ptr %411, ptr %15, align 8
  %412 = extractvalue { ptr, i32 } %410, 1
  store i32 %412, ptr %16, align 4
  br label %417

413:                                              ; preds = %382
  %414 = landingpad { ptr, i32 }
          cleanup
  %415 = extractvalue { ptr, i32 } %414, 0
  store ptr %415, ptr %15, align 8
  %416 = extractvalue { ptr, i32 } %414, 1
  store i32 %416, ptr %16, align 4
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  br label %417

417:                                              ; preds = %413, %409
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #9
  br label %418

418:                                              ; preds = %417, %408, %396
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  br label %419

419:                                              ; preds = %418, %392, %388
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  br label %421

420:                                              ; preds = %387, %319
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %423

421:                                              ; preds = %419, %359, %324
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %422

422:                                              ; preds = %421, %320
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %452

423:                                              ; preds = %420, %218
  br label %424

424:                                              ; preds = %423, %194
  %425 = invoke noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %426 unwind label %166

426:                                              ; preds = %424
  invoke void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48) %425)
          to label %427 unwind label %166

427:                                              ; preds = %426
  %428 = invoke noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %429 unwind label %166

429:                                              ; preds = %427
  invoke void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48) %428)
          to label %430 unwind label %166

430:                                              ; preds = %429
  %431 = invoke noundef zeroext i1 @_ZNK3JPH3RefI7SurfaceEneERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %432 unwind label %166

432:                                              ; preds = %430
  br i1 %431, label %433, label %450

433:                                              ; preds = %432
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %434 unwind label %166

434:                                              ; preds = %433
  invoke void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %435 unwind label %440

435:                                              ; preds = %434
  %436 = invoke noundef zeroext i1 @_Z11BlitSurfaceN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12BlitSettings(ptr noundef %38, ptr noundef %39, ptr noundef nonnull align 4 dereferenceable(28) @_ZN12BlitSettings8sDefaultE)
          to label %437 unwind label %444

437:                                              ; preds = %435
  %438 = xor i1 %436, true
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %39) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  br i1 %438, label %439, label %449

439:                                              ; preds = %437
  store i1 false, ptr %4, align 1
  store i32 1, ptr %20, align 4
  br label %451

440:                                              ; preds = %434
  %441 = landingpad { ptr, i32 }
          cleanup
  %442 = extractvalue { ptr, i32 } %441, 0
  store ptr %442, ptr %15, align 8
  %443 = extractvalue { ptr, i32 } %441, 1
  store i32 %443, ptr %16, align 4
  br label %448

444:                                              ; preds = %435
  %445 = landingpad { ptr, i32 }
          cleanup
  %446 = extractvalue { ptr, i32 } %445, 0
  store ptr %446, ptr %15, align 8
  %447 = extractvalue { ptr, i32 } %445, 1
  store i32 %447, ptr %16, align 4
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %39) #9
  br label %448

448:                                              ; preds = %444, %440
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  br label %452

449:                                              ; preds = %437
  br label %450

450:                                              ; preds = %449, %432
  store i1 true, ptr %4, align 1
  store i32 1, ptr %20, align 4
  br label %451

451:                                              ; preds = %450, %439
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %454

452:                                              ; preds = %448, %422, %227, %203, %170, %166
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  br label %453

453:                                              ; preds = %452, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %456

454:                                              ; preds = %451, %134
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  %455 = load i1, ptr %4, align 1
  ret i1 %455

456:                                              ; preds = %453, %138, %106
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %457

457:                                              ; preds = %456
  %458 = load ptr, ptr %15, align 8
  %459 = load i32, ptr %16, align 4
  %460 = insertvalue { ptr, i32 } poison, ptr %458, 0
  %461 = insertvalue { ptr, i32 } %460, i32 %459, 1
  resume { ptr, i32 } %461
}

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZL9GetFilter7EFilter(i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Surface20GetClosest8BitFormatEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_Z20GetFormatDescription14ESurfaceFormat(i32 noundef) #3

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

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

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

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

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

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

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

declare void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #3

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

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

declare noundef zeroext i1 @_Z11BlitSurfaceN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12BlitSettings(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(28)) #3

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

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

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

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

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

declare void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13sZoomVerticalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15sZoomHorizontalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #8

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

declare void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48)) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { inlinehint 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS12ZoomSettings", !11, i64 0, !12, i64 4, !13, i64 8}
!11 = !{!"_ZTS7EFilter", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS14ESurfaceFormat", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = !{!13, !13, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.BlitSettings = type { i8, i8, i8, i8, i8, %"class.JPH::Color", %"class.JPH::Color", %class.ZoomSettings }
%"class.JPH::Color" = type { %union.anon }
%union.anon = type { i32 }
%class.ZoomSettings = type { i32, i8, float }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Ref" = type { ptr }

@_ZN12BlitSettings8sDefaultE = external global %class.BlitSettings, align 4

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9ZoomImageN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(12) %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.JPH::RefConst", align 8
  %5 = alloca %"class.JPH::Ref", align 8
  %6 = alloca %"class.JPH::RefConst", align 8
  %7 = alloca %"class.JPH::Ref", align 8
  %8 = alloca %"class.JPH::Ref", align 8
  %9 = alloca %"class.JPH::RefConst", align 8
  %10 = alloca %"class.JPH::Ref", align 8
  %11 = alloca %"class.JPH::RefConst", align 8
  %12 = alloca %"class.JPH::Ref", align 8
  %13 = alloca %"class.JPH::Ref", align 8
  %14 = alloca %"class.JPH::RefConst", align 8
  %15 = alloca %"class.JPH::Ref", align 8
  %16 = alloca %"class.JPH::RefConst", align 8
  %17 = alloca %"class.JPH::Ref", align 8
  %18 = alloca %"class.JPH::Ref", align 8
  %19 = alloca %"class.JPH::RefConst", align 8
  %20 = alloca %"class.JPH::Ref", align 8
  %21 = alloca %"class.JPH::RefConst", align 8
  %22 = alloca %"class.JPH::Ref", align 8
  %23 = alloca %"class.JPH::RefConst", align 8
  %24 = alloca %"class.JPH::Ref", align 8
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZL9GetFilter7EFilter(i32 noundef %25)
  %27 = tail call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %28 = tail call noundef i32 @_ZNK7Surface20GetClosest8BitFormatEv(ptr noundef nonnull align 8 dereferenceable(48) %27)
  %29 = tail call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %30 = tail call noundef i32 @_ZNK7Surface20GetClosest8BitFormatEv(ptr noundef nonnull align 8 dereferenceable(48) %29)
  %31 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_Z20GetFormatDescription14ESurfaceFormat(i32 noundef %28)
  %32 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_Z20GetFormatDescription14ESurfaceFormat(i32 noundef %30)
  %33 = tail call noundef i32 @_ZNK17FormatDescription21GetNumberOfComponentsEv(ptr noundef nonnull align 8 dereferenceable(48) %31)
  %34 = tail call noundef i32 @_ZNK17FormatDescription21GetNumberOfComponentsEv(ptr noundef nonnull align 8 dereferenceable(48) %32)
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %44, label %36

36:                                               ; preds = %3
  %37 = tail call noundef i32 @_ZNK17FormatDescription21GetNumberOfComponentsEv(ptr noundef nonnull align 8 dereferenceable(48) %31)
  %38 = tail call noundef i32 @_ZNK17FormatDescription21GetNumberOfComponentsEv(ptr noundef nonnull align 8 dereferenceable(48) %32)
  %39 = icmp sgt i32 %37, %38
  br i1 %39, label %44, label %40

40:                                               ; preds = %36
  %41 = tail call noundef i32 @_ZNK17FormatDescription16GetBytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(48) %31)
  %42 = tail call noundef i32 @_ZNK17FormatDescription16GetBytesPerPixelEv(ptr noundef nonnull align 8 dereferenceable(48) %32)
  %43 = icmp slt i32 %41, %42
  %. = select i1 %43, i32 %28, i32 %30
  br label %44

44:                                               ; preds = %40, %36, %3
  %.034 = phi i32 [ %28, %3 ], [ %30, %36 ], [ %., %40 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  call void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %0)
  %45 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %46 = call noundef i32 @_ZNK7Surface9GetFormatEv(ptr noundef nonnull align 8 dereferenceable(48) %45)
  %.not = icmp eq i32 %46, %.034
  br i1 %.not, label %72, label %47

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %48 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #10
          to label %49 unwind label %59

49:                                               ; preds = %47
  %50 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %51 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %50)
  %52 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %53 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %52)
  invoke void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64) %48, i32 noundef %51, i32 noundef %53, i32 noundef %.034, i32 noundef 0)
          to label %54 unwind label %61

54:                                               ; preds = %49
  invoke void @_ZN3JPH3RefI7SurfaceEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %48)
          to label %55 unwind label %59

55:                                               ; preds = %54
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %56 unwind label %63

56:                                               ; preds = %55
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %57 = invoke noundef zeroext i1 @_Z11BlitSurfaceN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12BlitSettings(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(28) @_ZN12BlitSettings8sDefaultE)
          to label %58 unwind label %65

58:                                               ; preds = %56
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  br i1 %57, label %67, label %.critedge

59:                                               ; preds = %54, %47
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %71

61:                                               ; preds = %49
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %48, i64 noundef 64) #11
  br label %71

63:                                               ; preds = %67, %55
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %70

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

67:                                               ; preds = %58
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstI7SurfaceEaSERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %69 unwind label %63

69:                                               ; preds = %67
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %72

70:                                               ; preds = %65, %63
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %66, %65 ]
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  br label %71

71:                                               ; preds = %70, %61, %59
  %.pn.pn = phi { ptr, i32 } [ %.pn, %70 ], [ %60, %59 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %238

72:                                               ; preds = %69, %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %73 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %74 = call noundef i32 @_ZNK7Surface9GetFormatEv(ptr noundef nonnull align 8 dereferenceable(48) %73)
  %.not51 = icmp eq i32 %74, %.034
  br i1 %.not51, label %88, label %75

75:                                               ; preds = %72
  %76 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #10
          to label %77 unwind label %84

77:                                               ; preds = %75
  %78 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %79 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %78)
  %80 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %81 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %80)
  invoke void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64) %76, i32 noundef %79, i32 noundef %81, i32 noundef %.034, i32 noundef 0)
          to label %82 unwind label %86

82:                                               ; preds = %77
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH3RefI7SurfaceEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %76)
  br label %88

84:                                               ; preds = %228, %224, %222, %109, %98, %90, %88, %75
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %236

86:                                               ; preds = %77
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %76, i64 noundef 64) #11
  br label %236

88:                                               ; preds = %82, %72
  %89 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48) %89, i32 noundef 1)
          to label %90 unwind label %84

90:                                               ; preds = %88
  %91 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48) %91, i32 noundef 2)
          to label %92 unwind label %84

92:                                               ; preds = %90
  %93 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %94 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %93)
  %95 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %96 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %95)
  %97 = icmp eq i32 %94, %96
  br i1 %97, label %98, label %103

98:                                               ; preds = %92
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %99 unwind label %84

99:                                               ; preds = %98
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @_ZL13sZoomVerticalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %100 unwind label %101

100:                                              ; preds = %99
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  br label %222

101:                                              ; preds = %99
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  br label %236

103:                                              ; preds = %92
  %104 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %105 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %104)
  %106 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %107 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %106)
  %108 = icmp eq i32 %105, %107
  br i1 %108, label %109, label %114

109:                                              ; preds = %103
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %110 unwind label %84

110:                                              ; preds = %109
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @_ZL15sZoomHorizontalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %111 unwind label %112

111:                                              ; preds = %110
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  br label %222

112:                                              ; preds = %110
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  br label %236

114:                                              ; preds = %103
  %115 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %116 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %115)
  %117 = sitofp i32 %116 to float
  %118 = load ptr, ptr %26, align 8, !tbaa !12
  %119 = getelementptr inbounds i8, ptr %118, i64 16
  %120 = load ptr, ptr %119, align 8
  %121 = invoke noundef float %120(ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %122 unwind label %177

122:                                              ; preds = %114
  %123 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %124 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %123)
  %125 = load ptr, ptr %26, align 8, !tbaa !12
  %126 = getelementptr inbounds i8, ptr %125, i64 16
  %127 = load ptr, ptr %126, align 8
  %128 = invoke noundef float %127(ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %129 unwind label %177

129:                                              ; preds = %122
  %130 = sitofp i32 %124 to float
  %131 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %132 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %131)
  %133 = sitofp i32 %132 to float
  %134 = fmul float %128, %133
  %135 = call float @llvm.fmuladd.f32(float %121, float %130, float %134)
  %136 = fmul float %135, %117
  %137 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %138 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %137)
  %139 = sitofp i32 %138 to float
  %140 = load ptr, ptr %26, align 8, !tbaa !12
  %141 = getelementptr inbounds i8, ptr %140, i64 16
  %142 = load ptr, ptr %141, align 8
  %143 = invoke noundef float %142(ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %144 unwind label %179

144:                                              ; preds = %129
  %145 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %146 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %145)
  %147 = load ptr, ptr %26, align 8, !tbaa !12
  %148 = getelementptr inbounds i8, ptr %147, i64 16
  %149 = load ptr, ptr %148, align 8
  %150 = invoke noundef float %149(ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %151 unwind label %179

151:                                              ; preds = %144
  %152 = sitofp i32 %146 to float
  %153 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %154 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %153)
  %155 = sitofp i32 %154 to float
  %156 = fmul float %150, %155
  %157 = call float @llvm.fmuladd.f32(float %143, float %152, float %156)
  %158 = fmul float %157, %139
  %159 = fcmp olt float %136, %158
  br i1 %159, label %160, label %193

160:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %161 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #10
          to label %162 unwind label %181

162:                                              ; preds = %160
  %163 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %164 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %163)
  %165 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %166 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %165)
  invoke void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64) %161, i32 noundef %164, i32 noundef %166, i32 noundef %.034, i32 noundef 0)
          to label %167 unwind label %183

167:                                              ; preds = %162
  invoke void @_ZN3JPH3RefI7SurfaceEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull %161)
          to label %168 unwind label %181

168:                                              ; preds = %167
  %169 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  invoke void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48) %169, i32 noundef 3)
          to label %170 unwind label %185

170:                                              ; preds = %168
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %171 unwind label %185

171:                                              ; preds = %170
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %13)
  invoke void @_ZL13sZoomVerticalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %172 unwind label %187

172:                                              ; preds = %171
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %173 unwind label %185

173:                                              ; preds = %172
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @_ZL15sZoomHorizontalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %174 unwind label %189

174:                                              ; preds = %173
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  %175 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  invoke void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48) %175)
          to label %176 unwind label %185

176:                                              ; preds = %174
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  br label %222

177:                                              ; preds = %122, %114
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %236

179:                                              ; preds = %144, %129
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %236

181:                                              ; preds = %167, %160
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %192

183:                                              ; preds = %162
  %184 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %161, i64 noundef 64) #11
  br label %192

185:                                              ; preds = %174, %172, %170, %168
  %186 = landingpad { ptr, i32 }
          cleanup
  br label %191

187:                                              ; preds = %171
  %188 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  br label %191

189:                                              ; preds = %173
  %190 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  br label %191

191:                                              ; preds = %189, %187, %185
  %.pn55 = phi { ptr, i32 } [ %186, %185 ], [ %190, %189 ], [ %188, %187 ]
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %192

192:                                              ; preds = %191, %183, %181
  %.pn55.pn = phi { ptr, i32 } [ %.pn55, %191 ], [ %182, %181 ], [ %184, %183 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  br label %236

193:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  %194 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #10
          to label %195 unwind label %210

195:                                              ; preds = %193
  %196 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %197 = call noundef i32 @_ZNK7Surface8GetWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %196)
  %198 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %199 = call noundef i32 @_ZNK7Surface9GetHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %198)
  invoke void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64) %194, i32 noundef %197, i32 noundef %199, i32 noundef %.034, i32 noundef 0)
          to label %200 unwind label %212

200:                                              ; preds = %195
  invoke void @_ZN3JPH3RefI7SurfaceEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull %194)
          to label %201 unwind label %210

201:                                              ; preds = %200
  %202 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
  invoke void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48) %202, i32 noundef 3)
          to label %203 unwind label %214

203:                                              ; preds = %201
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %204 unwind label %214

204:                                              ; preds = %203
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %18)
  invoke void @_ZL15sZoomHorizontalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef nonnull %19, ptr noundef nonnull %20, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %205 unwind label %216

205:                                              ; preds = %204
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %206 unwind label %214

206:                                              ; preds = %205
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @_ZL13sZoomVerticalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %207 unwind label %218

207:                                              ; preds = %206
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  %208 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
  invoke void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48) %208)
          to label %209 unwind label %214

209:                                              ; preds = %207
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  br label %222

210:                                              ; preds = %200, %193
  %211 = landingpad { ptr, i32 }
          cleanup
  br label %221

212:                                              ; preds = %195
  %213 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %194, i64 noundef 64) #11
  br label %221

214:                                              ; preds = %207, %205, %203, %201
  %215 = landingpad { ptr, i32 }
          cleanup
  br label %220

216:                                              ; preds = %204
  %217 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  br label %220

218:                                              ; preds = %206
  %219 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  br label %220

220:                                              ; preds = %218, %216, %214
  %.pn52 = phi { ptr, i32 } [ %215, %214 ], [ %219, %218 ], [ %217, %216 ]
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br label %221

221:                                              ; preds = %220, %212, %210
  %.pn52.pn = phi { ptr, i32 } [ %.pn52, %220 ], [ %211, %210 ], [ %213, %212 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  br label %236

222:                                              ; preds = %176, %209, %111, %100
  %223 = call noundef ptr @_ZNK3JPH8RefConstI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48) %223)
          to label %224 unwind label %84

224:                                              ; preds = %222
  %225 = call noundef ptr @_ZNK3JPH3RefI7SurfaceEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48) %225)
          to label %226 unwind label %84

226:                                              ; preds = %224
  %227 = call noundef zeroext i1 @_ZNK3JPH3RefI7SurfaceEneERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %227, label %228, label %234

228:                                              ; preds = %226
  invoke void @_ZN3JPH8RefConstI7SurfaceEC2ERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %229 unwind label %84

229:                                              ; preds = %228
  call void @_ZN3JPH3RefI7SurfaceEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %230 = invoke noundef zeroext i1 @_Z11BlitSurfaceN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12BlitSettings(ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull align 4 dereferenceable(28) @_ZN12BlitSettings8sDefaultE)
          to label %231 unwind label %232

231:                                              ; preds = %229
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  br i1 %230, label %234, label %235

232:                                              ; preds = %229
  %233 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  br label %236

234:                                              ; preds = %231, %226
  br label %235

235:                                              ; preds = %231, %234
  %.1 = phi i1 [ true, %234 ], [ false, %231 ]
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %237

236:                                              ; preds = %177, %221, %192, %179, %232, %112, %101, %86, %84
  %.pn60 = phi { ptr, i32 } [ %233, %232 ], [ %85, %84 ], [ %102, %101 ], [ %113, %112 ], [ %87, %86 ], [ %178, %177 ], [ %.pn55.pn, %192 ], [ %.pn52.pn, %221 ], [ %180, %179 ]
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %238

.critedge:                                        ; preds = %58
  call void @_ZN3JPH3RefI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %237

237:                                              ; preds = %.critedge, %235
  %.2 = phi i1 [ %.1, %235 ], [ false, %.critedge ]
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  ret i1 %.2

238:                                              ; preds = %236, %71
  %.pn60.pn = phi { ptr, i32 } [ %.pn60, %236 ], [ %.pn.pn, %71 ]
  call void @_ZN3JPH8RefConstI7SurfaceED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  resume { ptr, i32 } %.pn60.pn
}

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZL9GetFilter7EFilter(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Surface20GetClosest8BitFormatEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_Z20GetFormatDescription14ESurfaceFormat(i32 noundef) local_unnamed_addr #3

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

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

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

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

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

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

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

declare void @_ZN15SoftwareSurfaceC1Eii14ESurfaceFormati(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #3

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

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

declare noundef zeroext i1 @_Z11BlitSurfaceN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12BlitSettings(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #3

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

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

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

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

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

declare void @_ZNK7Surface4LockE16ESurfaceLockMode(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13sZoomVerticalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15sZoomHorizontalN3JPH8RefConstI7SurfaceEENS_3RefIS1_EERK12ZoomSettings(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #8

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

declare void @_ZNK7Surface6UnLockEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { inlinehint 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS12ZoomSettings", !7, i64 0, !10, i64 4, !11, i64 8}
!7 = !{!"_ZTS7EFilter", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !9, i64 0}


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