; LLVM IR from Optiroc/SuperFamiconv :: src/Image.ll (ZNK3sfc5Image4cropEjjjjNS_4ModeE)

; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sfc::Image" = type { i32, i32, i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.0", %"class.std::set" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(136)) #2 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3sfc5Image4cropEjjjjNS_4ModeE(ptr dead_on_unwind noalias writable sret(%"struct.sfc::Image") align 8 %0, ptr noundef nonnull align 8 dereferenceable(136) %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i1, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::vector.0", align 8
  %27 = alloca %"class.std::set", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %8, align 8
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store i32 %6, ptr %14, align 4, !tbaa !11
  %30 = load ptr, ptr %9, align 8
  store i1 false, ptr %15, align 1
  call void @_ZN3sfc5ImageC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0)
  %31 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 6
  %32 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 6
  %33 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %34 unwind label %61

34:                                               ; preds = %7
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 0
  store i32 %35, ptr %36, align 8, !tbaa !13
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 1
  store i32 %37, ptr %38, align 4, !tbaa !32
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 2
  store i32 %39, ptr %40, align 8, !tbaa !33
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 3
  store i32 %41, ptr %42, align 4, !tbaa !34
  %43 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 4
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = mul i32 %44, %45
  %47 = mul i32 %46, 4
  %48 = zext i32 %47 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %48)
          to label %49 unwind label %61

49:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %50 = load i32, ptr %14, align 4, !tbaa !11
  %51 = icmp eq i32 %50, 3
  %52 = zext i1 %51 to i64
  %53 = select i1 %51, i32 -16777216, i32 0
  store i32 %53, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %54 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 4
  %55 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #5
  store i64 %55, ptr %19, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 0, ptr %20, align 8, !tbaa !35
  br label %56

56:                                               ; preds = %70, %49
  %57 = load i64, ptr %20, align 8, !tbaa !35
  %58 = load i64, ptr %19, align 8, !tbaa !35
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %65, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %73

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

65:                                               ; preds = %56
  %66 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 4
  %67 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #5
  %68 = load i64, ptr %20, align 8, !tbaa !35
  %69 = getelementptr inbounds i8, ptr %67, i64 %68
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %69, ptr align 4 %18, i64 4, i1 false)
  br label %70

70:                                               ; preds = %65
  %71 = load i64, ptr %20, align 8, !tbaa !35
  %72 = add i64 %71, 4
  store i64 %72, ptr %20, align 8, !tbaa !35
  br label %56, !llvm.loop !36

73:                                               ; preds = %60
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !13
  %77 = icmp ugt i32 %74, %76
  br i1 %77, label %83, label %78

78:                                               ; preds = %73
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !32
  %82 = icmp ugt i32 %79, %81
  br i1 %82, label %83, label %99

83:                                               ; preds = %78, %73
  %84 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 5
  %85 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #5
  %86 = icmp ne i64 %85, 0
  br i1 %86, label %87, label %98

87:                                               ; preds = %83
  %88 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 5
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = mul i32 %89, %90
  %92 = zext i32 %91 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %92)
          to label %93 unwind label %94

93:                                               ; preds = %87
  br label %98

94:                                               ; preds = %87
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %16, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %17, align 4
  br label %233

98:                                               ; preds = %93, %83
  store i1 true, ptr %15, align 1
  store i32 1, ptr %21, align 4
  br label %231

99:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = add i32 %100, %101
  %103 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !13
  %105 = icmp ugt i32 %102, %104
  br i1 %105, label %106, label %111

106:                                              ; preds = %99
  %107 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 0
  %108 = load i32, ptr %107, align 8, !tbaa !13
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = sub i32 %108, %109
  br label %113

111:                                              ; preds = %99
  %112 = load i32, ptr %12, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %111, %106
  %114 = phi i32 [ %110, %106 ], [ %112, %111 ]
  store i32 %114, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = load i32, ptr %13, align 4, !tbaa !9
  %117 = add i32 %115, %116
  %118 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !32
  %120 = icmp ugt i32 %117, %119
  br i1 %120, label %121, label %126

121:                                              ; preds = %113
  %122 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !32
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = sub i32 %123, %124
  br label %128

126:                                              ; preds = %113
  %127 = load i32, ptr %13, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %126, %121
  %129 = phi i32 [ %125, %121 ], [ %127, %126 ]
  store i32 %129, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %160, %128
  %131 = load i32, ptr %24, align 4, !tbaa !9
  %132 = load i32, ptr %23, align 4, !tbaa !9
  %133 = icmp ult i32 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %163

135:                                              ; preds = %130
  %136 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 4
  %137 = load i32, ptr %24, align 4, !tbaa !9
  %138 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !13
  %140 = mul i32 %137, %139
  %141 = mul i32 %140, 4
  %142 = zext i32 %141 to i64
  %143 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %136, i64 noundef %142) #5
  %144 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 4
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = mul i32 %145, 4
  %147 = load i32, ptr %24, align 4, !tbaa !9
  %148 = load i32, ptr %11, align 4, !tbaa !9
  %149 = add i32 %147, %148
  %150 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 0
  %151 = load i32, ptr %150, align 8, !tbaa !13
  %152 = mul i32 %149, %151
  %153 = mul i32 %152, 4
  %154 = add i32 %146, %153
  %155 = zext i32 %154 to i64
  %156 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %155) #5
  %157 = load i32, ptr %22, align 4, !tbaa !9
  %158 = mul i32 %157, 4
  %159 = zext i32 %158 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %143, ptr align 1 %156, i64 %159, i1 false)
  br label %160

160:                                              ; preds = %135
  %161 = load i32, ptr %24, align 4, !tbaa !9
  %162 = add i32 %161, 1
  store i32 %162, ptr %24, align 4, !tbaa !9
  br label %130, !llvm.loop !38

163:                                              ; preds = %134
  %164 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 5
  %165 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %164) #5
  %166 = icmp ne i64 %165, 0
  br i1 %166, label %167, label %208

167:                                              ; preds = %163
  %168 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 5
  %169 = load i32, ptr %12, align 4, !tbaa !9
  %170 = load i32, ptr %13, align 4, !tbaa !9
  %171 = mul i32 %169, %170
  %172 = zext i32 %171 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef %172)
          to label %173 unwind label %179

173:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %204, %173
  %175 = load i32, ptr %25, align 4, !tbaa !9
  %176 = load i32, ptr %23, align 4, !tbaa !9
  %177 = icmp ult i32 %175, %176
  br i1 %177, label %183, label %178

178:                                              ; preds = %174
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %207

179:                                              ; preds = %167
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %16, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %17, align 4
  br label %230

183:                                              ; preds = %174
  %184 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 5
  %185 = load i32, ptr %25, align 4, !tbaa !9
  %186 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 0
  %187 = load i32, ptr %186, align 8, !tbaa !13
  %188 = mul i32 %185, %187
  %189 = zext i32 %188 to i64
  %190 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %189) #5
  %191 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 5
  %192 = load i32, ptr %10, align 4, !tbaa !9
  %193 = load i32, ptr %25, align 4, !tbaa !9
  %194 = load i32, ptr %11, align 4, !tbaa !9
  %195 = add i32 %193, %194
  %196 = getelementptr inbounds %"struct.sfc::Image", ptr %30, i32 0, i32 0
  %197 = load i32, ptr %196, align 8, !tbaa !13
  %198 = mul i32 %195, %197
  %199 = add i32 %192, %198
  %200 = zext i32 %199 to i64
  %201 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef %200) #5
  %202 = load i32, ptr %22, align 4, !tbaa !9
  %203 = zext i32 %202 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %190, ptr align 1 %201, i64 %203, i1 false)
  br label %204

204:                                              ; preds = %183
  %205 = load i32, ptr %25, align 4, !tbaa !9
  %206 = add i32 %205, 1
  store i32 %206, ptr %25, align 4, !tbaa !9
  br label %174, !llvm.loop !39

207:                                              ; preds = %178
  br label %208

208:                                              ; preds = %207, %163
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #5
  invoke void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %26, ptr noundef nonnull align 8 dereferenceable(136) %0)
          to label %209 unwind label %221

209:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 48, ptr %27) #5
  %210 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %211 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %210, ptr %211, align 8
  %212 = call ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %213 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %212, ptr %213, align 8
  %214 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  %215 = load ptr, ptr %214, align 8
  %216 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8
  invoke void @_ZNSt3setIjSt4lessIjESaIjEEC2IN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr %215, ptr %217)
          to label %218 unwind label %225

218:                                              ; preds = %209
  %219 = getelementptr inbounds %"struct.sfc::Image", ptr %0, i32 0, i32 7
  %220 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIjSt4lessIjESaIjEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %219, ptr noundef nonnull align 8 dereferenceable(48) %27) #5
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #5
  store i1 true, ptr %15, align 1
  store i32 1, ptr %21, align 4
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %231

221:                                              ; preds = %208
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %16, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %17, align 4
  br label %229

225:                                              ; preds = %209
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %16, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  br label %229

229:                                              ; preds = %225, %221
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  br label %230

230:                                              ; preds = %229, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %233

231:                                              ; preds = %218, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %232 = load i1, ptr %15, align 1
  br i1 %232, label %235, label %234

233:                                              ; preds = %230, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %236

234:                                              ; preds = %231
  call void @_ZN3sfc5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) #5
  br label %235

235:                                              ; preds = %234, %231
  ret void

236:                                              ; preds = %233, %61
  call void @_ZN3sfc5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) #5
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %16, align 8
  %239 = load i32, ptr %17, align 4
  %240 = insertvalue { ptr, i32 } poison, ptr %238, 0
  %241 = insertvalue { ptr, i32 } %240, i32 %239, 1
  resume { ptr, i32 } %241
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN3sfc4ModeE", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN3sfc5ImageE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !15, i64 16, !15, i64 40, !19, i64 64, !23, i64 88}
!15 = !{!"_ZTSSt6vectorIhSaIhEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIjSaIjEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt3setIjSt4lessIjESaIjEE", !24, i64 0}
!24 = !{!"_ZTSSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE", !25, i64 0}
!25 = !{!"_ZTSNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13_Rb_tree_implIS3_Lb1EEE", !26, i64 0, !28, i64 8}
!26 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !27, i64 0}
!27 = !{!"_ZTSSt4lessIjE"}
!28 = !{!"_ZTSSt15_Rb_tree_header", !29, i64 0, !31, i64 32}
!29 = !{!"_ZTSSt18_Rb_tree_node_base", !30, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!30 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!31 = !{!"long", !7, i64 0}
!32 = !{!14, !10, i64 4}
!33 = !{!14, !10, i64 8}
!34 = !{!14, !10, i64 12}
!35 = !{!31, !31, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}
!39 = distinct !{!39, !37}


; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sfc::Image" = type { i32, i32, i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.0", %"class.std::set" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3sfc5Image4cropEjjjjNS_4ModeE(ptr dead_on_unwind noalias nonnull writable sret(%"struct.sfc::Image") align 8 %0, ptr noundef nonnull align 8 dereferenceable(136) %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca %"class.std::set", align 8
  tail call void @_ZN3sfc5ImageC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0)
  %10 = getelementptr inbounds i8, ptr %1, i64 64
  %11 = getelementptr inbounds i8, ptr %0, i64 64
  %12 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %13 unwind label %27

13:                                               ; preds = %7
  store i32 %4, ptr %0, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %5, ptr %14, align 4, !tbaa !28
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %2, ptr %15, align 8, !tbaa !29
  %16 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %3, ptr %16, align 4, !tbaa !30
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = mul i32 %5, %4
  %19 = shl i32 %18, 2
  %20 = zext i32 %19 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %20)
          to label %21 unwind label %27

21:                                               ; preds = %13
  %22 = icmp eq i32 %6, 3
  %23 = select i1 %22, i32 -16777216, i32 0
  %24 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %.not70 = icmp eq i64 %24, 0
  br i1 %.not70, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %21
  %25 = load i32, ptr %1, align 8, !tbaa !5
  %26 = icmp ult i32 %25, %2
  br i1 %26, label %37, label %33

27:                                               ; preds = %13, %7
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %105

.lr.ph:                                           ; preds = %21, %.lr.ph
  %.05263 = phi i64 [ %31, %.lr.ph ], [ 0, %21 ]
  %29 = tail call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %30 = getelementptr inbounds i8, ptr %29, i64 %.05263
  store i32 %23, ptr %30, align 1
  %31 = add i64 %.05263, 4
  %32 = icmp ult i64 %31, %24
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !31

33:                                               ; preds = %._crit_edge
  %34 = getelementptr inbounds i8, ptr %1, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !28
  %36 = icmp ult i32 %35, %3
  br i1 %36, label %37, label %45

37:                                               ; preds = %33, %._crit_edge
  %38 = getelementptr inbounds i8, ptr %1, i64 40
  %39 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  %.not59 = icmp eq i64 %39, 0
  br i1 %.not59, label %104, label %40

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %0, i64 40
  %42 = zext i32 %18 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %42)
          to label %104 unwind label %43

43:                                               ; preds = %40
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %105

45:                                               ; preds = %33
  %46 = add i32 %4, %2
  %47 = icmp ugt i32 %46, %25
  %48 = sub i32 %25, %2
  %49 = select i1 %47, i32 %48, i32 %4
  %50 = add i32 %5, %3
  %51 = icmp ugt i32 %50, %35
  %52 = sub i32 %35, %3
  %53 = select i1 %51, i32 %52, i32 %5
  %.not71 = icmp eq i32 %53, 0
  br i1 %.not71, label %._crit_edge67, label %.lr.ph66

.lr.ph66:                                         ; preds = %45
  %54 = getelementptr inbounds i8, ptr %1, i64 16
  %55 = shl i32 %49, 2
  %56 = zext i32 %55 to i64
  br label %59

._crit_edge67:                                    ; preds = %59, %45
  %57 = getelementptr inbounds i8, ptr %1, i64 40
  %58 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #5
  %.not = icmp eq i64 %58, 0
  br i1 %.not, label %.loopexit, label %74

59:                                               ; preds = %.lr.ph66, %59
  %.04764 = phi i32 [ 0, %.lr.ph66 ], [ %72, %59 ]
  %60 = load i32, ptr %0, align 8, !tbaa !5
  %61 = shl i32 %.04764, 2
  %62 = mul i32 %61, %60
  %63 = zext i32 %62 to i64
  %64 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %63) #5
  %65 = add i32 %.04764, %3
  %66 = load i32, ptr %1, align 8, !tbaa !5
  %67 = mul i32 %66, %65
  %68 = add i32 %67, %2
  %69 = shl i32 %68, 2
  %70 = zext i32 %69 to i64
  %71 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %70) #5
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %64, ptr nonnull align 1 %71, i64 %56, i1 false)
  %72 = add nuw i32 %.04764, 1
  %73 = icmp ult i32 %72, %53
  br i1 %73, label %59, label %._crit_edge67, !llvm.loop !33

74:                                               ; preds = %._crit_edge67
  %75 = getelementptr inbounds i8, ptr %0, i64 40
  %76 = zext i32 %18 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %76)
          to label %.preheader unwind label %78

.preheader:                                       ; preds = %74
  br i1 %.not71, label %.loopexit, label %.lr.ph69

.lr.ph69:                                         ; preds = %.preheader
  %77 = zext i32 %49 to i64
  br label %80

78:                                               ; preds = %74
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %105

80:                                               ; preds = %.lr.ph69, %80
  %.04668 = phi i32 [ 0, %.lr.ph69 ], [ %91, %80 ]
  %81 = load i32, ptr %0, align 8, !tbaa !5
  %82 = mul i32 %81, %.04668
  %83 = zext i32 %82 to i64
  %84 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %83) #5
  %85 = add i32 %.04668, %3
  %86 = load i32, ptr %1, align 8, !tbaa !5
  %87 = mul i32 %86, %85
  %88 = add i32 %87, %2
  %89 = zext i32 %88 to i64
  %90 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %89) #5
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %84, ptr nonnull align 1 %90, i64 %77, i1 false)
  %91 = add nuw i32 %.04668, 1
  %92 = icmp ult i32 %91, %53
  br i1 %92, label %80, label %.loopexit, !llvm.loop !34

.loopexit:                                        ; preds = %80, %.preheader, %._crit_edge67
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  invoke void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %8, ptr noundef nonnull align 8 dereferenceable(136) %0)
          to label %93 unwind label %99

93:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #5
  %94 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %95 = call ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  invoke void @_ZNSt3setIjSt4lessIjESaIjEEC2IN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr %94, ptr %95)
          to label %96 unwind label %101

96:                                               ; preds = %93
  %97 = getelementptr inbounds i8, ptr %0, i64 88
  %98 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIjSt4lessIjESaIjEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %97, ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br label %104

99:                                               ; preds = %.loopexit
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %103

101:                                              ; preds = %93
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %103

103:                                              ; preds = %101, %99
  %.pn = phi { ptr, i32 } [ %102, %101 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br label %105

104:                                              ; preds = %96, %40, %37
  ret void

105:                                              ; preds = %43, %103, %78, %27
  %.pn60.pn = phi { ptr, i32 } [ %28, %27 ], [ %44, %43 ], [ %.pn, %103 ], [ %79, %78 ]
  call void @_ZN3sfc5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) #5
  resume { ptr, i32 } %.pn60.pn
}

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"_ZTSN3sfc5ImageE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 40, !15, i64 64, !19, i64 88}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIhSaIhEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIjSaIjEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"_ZTSSt3setIjSt4lessIjESaIjEE", !20, i64 0}
!20 = !{!"_ZTSSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE", !21, i64 0}
!21 = !{!"_ZTSNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13_Rb_tree_implIS3_Lb1EEE", !22, i64 0, !24, i64 8}
!22 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !23, i64 0}
!23 = !{!"_ZTSSt4lessIjE"}
!24 = !{!"_ZTSSt15_Rb_tree_header", !25, i64 0, !27, i64 32}
!25 = !{!"_ZTSSt18_Rb_tree_node_base", !26, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!26 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!27 = !{!"long", !8, i64 0}
!28 = !{!6, !7, i64 4}
!29 = !{!6, !7, i64 8}
!30 = !{!6, !7, i64 12}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = distinct !{!34, !32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass