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

; 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 }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<sfc::Tile, std::allocator<sfc::Tile>>::_Vector_impl" }
%"struct.std::_Vector_base<sfc::Tile, std::allocator<sfc::Tile>>::_Vector_impl" = type { %"struct.std::_Vector_base<sfc::Tile, std::allocator<sfc::Tile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sfc::Tile, std::allocator<sfc::Tile>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.22" = type { ptr }
%"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 }
%"struct.sfc::Image" = type { i32, i32, i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.0", %"class.std::set" }

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; 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)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 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)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPhSt6vectorIhSaIhEEEEiEvT_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sfc5ImageC2ERKNS_7TilesetEj(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.23", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.22", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.22", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.22", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.22", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::vector.0", align 8
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca %"class.std::vector.0", align 8
  %25 = alloca %"class.std::set", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %28 = load ptr, ptr %4, align 8
  %29 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 4
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  %30 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %31 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 6
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  %32 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 7
  call void @_ZNSt3setIjSt4lessIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #5
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %36, label %35

35:                                               ; preds = %3
  store i32 128, ptr %6, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %35, %3
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc7Tileset5tilesEv(ptr noundef nonnull align 8 dereferenceable(56) %37)
          to label %39 unwind label %107

39:                                               ; preds = %36
  invoke void @_ZNSt6vectorIN3sfc4TileESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %38)
          to label %40 unwind label %107

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = invoke noundef i32 @_ZNK3sfc7Tileset10tile_widthEv(ptr noundef nonnull align 8 dereferenceable(56) %41)
          to label %43 unwind label %111

43:                                               ; preds = %40
  store i32 %42, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = invoke noundef i32 @_ZNK3sfc7Tileset11tile_heightEv(ptr noundef nonnull align 8 dereferenceable(56) %44)
          to label %46 unwind label %115

46:                                               ; preds = %43
  store i32 %45, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = invoke noundef i32 @_ZN3sfc8div_ceilEii(i32 noundef %47, i32 noundef %48)
          to label %50 unwind label %119

50:                                               ; preds = %46
  store i32 %49, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = invoke noundef i32 @_ZNK3sfc7Tileset4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %51)
          to label %53 unwind label %123

53:                                               ; preds = %50
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = invoke noundef i32 @_ZN3sfc8div_ceilEii(i32 noundef %52, i32 noundef %54)
          to label %56 unwind label %123

56:                                               ; preds = %53
  store i32 %55, ptr %13, align 4, !tbaa !9
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 0
  store i32 %57, ptr %58, align 8, !tbaa !11
  %59 = load i32, ptr %13, align 4, !tbaa !9
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = invoke noundef i32 @_ZNK3sfc7Tileset11tile_heightEv(ptr noundef nonnull align 8 dereferenceable(56) %60)
          to label %62 unwind label %123

62:                                               ; preds = %56
  %63 = mul i32 %59, %61
  %64 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 1
  store i32 %63, ptr %64, align 4, !tbaa !30
  %65 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 4
  %66 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !30
  %70 = mul i32 %67, %69
  %71 = mul i32 %70, 4
  %72 = zext i32 %71 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %72)
          to label %73 unwind label %123

73:                                               ; preds = %62
  %74 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 4
  %75 = call ptr @_ZNSt6vectorIhSaIhEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #5
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %14, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  %77 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 4
  %78 = call ptr @_ZNSt6vectorIhSaIhEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #5
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %15, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  %80 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %14, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8
  %82 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %15, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8
  invoke void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPhSt6vectorIhSaIhEEEEiEvT_S7_RKT0_(ptr %81, ptr %83, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %84 unwind label %127

84:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %85 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 5
  %86 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !11
  %88 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !30
  %90 = mul i32 %87, %89
  %91 = zext i32 %90 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %91)
          to label %92 unwind label %123

92:                                               ; preds = %84
  %93 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 5
  %94 = call ptr @_ZNSt6vectorIhSaIhEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %93) #5
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %17, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  %96 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 5
  %97 = call ptr @_ZNSt6vectorIhSaIhEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #5
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %18, i32 0, i32 0
  store ptr %97, ptr %98, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %17, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %18, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8
  invoke void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPhSt6vectorIhSaIhEEEEiEvT_S7_RKT0_(ptr %100, ptr %102, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %103 unwind label %131

103:                                              ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  %104 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 4
  %105 = call noundef zeroext i1 @_ZNKSt6vectorIhSaIhEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #5
  br i1 %105, label %106, label %135

106:                                              ; preds = %103
  store i32 1, ptr %20, align 4
  br label %223

107:                                              ; preds = %39, %36
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %8, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %9, align 4
  br label %239

111:                                              ; preds = %40
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %8, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %9, align 4
  br label %238

115:                                              ; preds = %43
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %8, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %9, align 4
  br label %237

119:                                              ; preds = %46
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %8, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %9, align 4
  br label %236

123:                                              ; preds = %141, %138, %135, %84, %62, %56, %53, %50
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %8, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %9, align 4
  br label %235

127:                                              ; preds = %73
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %8, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %235

131:                                              ; preds = %92
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %8, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %235

135:                                              ; preds = %103
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc7Tileset5tilesEv(ptr noundef nonnull align 8 dereferenceable(56) %136)
          to label %138 unwind label %123

138:                                              ; preds = %135
  %139 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3sfc4TileESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef 0) #5
  %140 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc4Tile7paletteEv(ptr noundef nonnull align 8 dereferenceable(88) %139)
          to label %141 unwind label %123

141:                                              ; preds = %138
  %142 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 6
  %143 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %142, ptr noundef nonnull align 8 dereferenceable(24) %140)
          to label %144 unwind label %123

144:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %186, %144
  %146 = load i32, ptr %21, align 4, !tbaa !9
  %147 = zext i32 %146 to i64
  %148 = call noundef i64 @_ZNKSt6vectorIN3sfc4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %149 = icmp ult i64 %147, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %145
  store i32 2, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %208

151:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #5
  %152 = load i32, ptr %21, align 4, !tbaa !9
  %153 = zext i32 %152 to i64
  %154 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3sfc4TileESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %153) #5
  invoke void @_ZNK3sfc4Tile9rgba_dataEv(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %22, ptr noundef nonnull align 8 dereferenceable(88) %154)
          to label %155 unwind label %189

155:                                              ; preds = %151
  %156 = load i32, ptr %21, align 4, !tbaa !9
  %157 = load i32, ptr %12, align 4, !tbaa !9
  %158 = urem i32 %156, %157
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = mul i32 %158, %159
  %161 = load i32, ptr %21, align 4, !tbaa !9
  %162 = load i32, ptr %12, align 4, !tbaa !9
  %163 = udiv i32 %161, %162
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = mul i32 %163, %164
  %166 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN3sfc5Image4blitERKSt6vectorIjSaIjEEjjj(ptr noundef nonnull align 8 dereferenceable(136) %28, ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef %160, i32 noundef %165, i32 noundef %166)
          to label %167 unwind label %193

167:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #5
  %168 = load i32, ptr %21, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3sfc4TileESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %169) #5
  %171 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc4Tile4dataEv(ptr noundef nonnull align 8 dereferenceable(88) %170)
          to label %172 unwind label %197

172:                                              ; preds = %167
  invoke void @_ZNSt6vectorIhSaIhEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %171)
          to label %173 unwind label %197

173:                                              ; preds = %172
  %174 = load i32, ptr %21, align 4, !tbaa !9
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = urem i32 %174, %175
  %177 = load i32, ptr %10, align 4, !tbaa !9
  %178 = mul i32 %176, %177
  %179 = load i32, ptr %21, align 4, !tbaa !9
  %180 = load i32, ptr %12, align 4, !tbaa !9
  %181 = udiv i32 %179, %180
  %182 = load i32, ptr %11, align 4, !tbaa !9
  %183 = mul i32 %181, %182
  %184 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN3sfc5Image12blit_indexedERKSt6vectorIhSaIhEEjjj(ptr noundef nonnull align 8 dereferenceable(136) %28, ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %178, i32 noundef %183, i32 noundef %184)
          to label %185 unwind label %201

185:                                              ; preds = %173
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %21, align 4, !tbaa !9
  %188 = add i32 %187, 1
  store i32 %188, ptr %21, align 4, !tbaa !9
  br label %145, !llvm.loop !31

189:                                              ; preds = %151
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %8, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %9, align 4
  br label %207

193:                                              ; preds = %155
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %8, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %9, align 4
  br label %206

197:                                              ; preds = %172, %167
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %8, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %9, align 4
  br label %205

201:                                              ; preds = %173
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %8, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %9, align 4
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  br label %205

205:                                              ; preds = %201, %197
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  br label %206

206:                                              ; preds = %205, %193
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  br label %207

207:                                              ; preds = %206, %189
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %235

208:                                              ; preds = %150
  %209 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 3
  store i32 0, ptr %209, align 4, !tbaa !33
  %210 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 2
  store i32 0, ptr %210, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #5
  invoke void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %24, ptr noundef nonnull align 8 dereferenceable(136) %28)
          to label %211 unwind label %226

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

220:                                              ; preds = %211
  %221 = getelementptr inbounds %"struct.sfc::Image", ptr %28, i32 0, i32 7
  %222 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIjSt4lessIjESaIjEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %221, ptr noundef nonnull align 8 dereferenceable(48) %25) #5
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %25) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #5
  store i32 0, ptr %20, align 4
  br label %223

223:                                              ; preds = %220, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZNSt6vectorIN3sfc4TileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  %224 = load i32, ptr %20, align 4
  switch i32 %224, label %245 [
    i32 0, label %225
    i32 1, label %225
  ]

225:                                              ; preds = %223, %223
  ret void

226:                                              ; preds = %208
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %8, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %9, align 4
  br label %234

230:                                              ; preds = %211
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %8, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  br label %234

234:                                              ; preds = %230, %226
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #5
  br label %235

235:                                              ; preds = %234, %207, %131, %127, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %236

236:                                              ; preds = %235, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %237

237:                                              ; preds = %236, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %238

238:                                              ; preds = %237, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZNSt6vectorIN3sfc4TileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %239

239:                                              ; preds = %238, %107
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  br label %240

240:                                              ; preds = %239
  %241 = load ptr, ptr %8, align 8
  %242 = load i32, ptr %9, align 4
  %243 = insertvalue { ptr, i32 } poison, ptr %241, 0
  %244 = insertvalue { ptr, i32 } %243, i32 %242, 1
  resume { ptr, i32 } %244

245:                                              ; preds = %223
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3sfc7Tileset10tile_widthEv(ptr noundef nonnull align 8 dereferenceable(56)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3sfc7Tileset11tile_heightEv(ptr noundef nonnull align 8 dereferenceable(56)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3sfc7Tileset4sizeEv(ptr noundef nonnull align 8 dereferenceable(56)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIhSaIhEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc4Tile7paletteEv(ptr noundef nonnull align 8 dereferenceable(88)) #0 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3sfc4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

declare void @_ZNK3sfc4Tile9rgba_dataEv(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(88)) #4

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

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

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

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

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

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


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

%"class.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 }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<sfc::Tile, std::allocator<sfc::Tile>>::_Vector_impl" }
%"struct.std::_Vector_base<sfc::Tile, std::allocator<sfc::Tile>>::_Vector_impl" = type { %"struct.std::_Vector_base<sfc::Tile, std::allocator<sfc::Tile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sfc::Tile, std::allocator<sfc::Tile>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; 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 #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 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 #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPhSt6vectorIhSaIhEEEEiEvT_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sfc5ImageC2ERKNS_7TilesetEj(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.23", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.0", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::set", align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  tail call void @_ZNSt3setIjSt4lessIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  %15 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc7Tileset5tilesEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  invoke void @_ZNSt6vectorIN3sfc4TileESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %16 unwind label %42

16:                                               ; preds = %3
  %.not = icmp eq i32 %2, 0
  %spec.store.select = select i1 %.not, i32 128, i32 %2
  %17 = call noundef i32 @_ZNK3sfc7Tileset10tile_widthEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %18 = call noundef i32 @_ZNK3sfc7Tileset11tile_heightEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %19 = call noundef i32 @_ZN3sfc8div_ceilEii(i32 noundef %spec.store.select, i32 noundef %17)
  %20 = call noundef i32 @_ZNK3sfc7Tileset4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %21 = call noundef i32 @_ZN3sfc8div_ceilEii(i32 noundef %20, i32 noundef %19)
  store i32 %spec.store.select, ptr %0, align 8, !tbaa !5
  %22 = call noundef i32 @_ZNK3sfc7Tileset11tile_heightEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %23 = mul i32 %22, %21
  %24 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %23, ptr %24, align 4, !tbaa !28
  %25 = load i32, ptr %0, align 8, !tbaa !5
  %26 = shl i32 %23, 2
  %27 = mul i32 %26, %25
  %28 = zext i32 %27 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %28)
          to label %29 unwind label %44

29:                                               ; preds = %16
  %30 = call ptr @_ZNSt6vectorIhSaIhEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %31 = call ptr @_ZNSt6vectorIhSaIhEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !29
  invoke void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPhSt6vectorIhSaIhEEEEiEvT_S7_RKT0_(ptr %30, ptr %31, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %32 unwind label %46

32:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %33 = load i32, ptr %0, align 8, !tbaa !5
  %34 = load i32, ptr %24, align 4, !tbaa !28
  %35 = mul i32 %34, %33
  %36 = zext i32 %35 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %36)
          to label %37 unwind label %44

37:                                               ; preds = %32
  %38 = call ptr @_ZNSt6vectorIhSaIhEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  %39 = call ptr @_ZNSt6vectorIhSaIhEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !29
  invoke void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPhSt6vectorIhSaIhEEEEiEvT_S7_RKT0_(ptr %38, ptr %39, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %40 unwind label %48

40:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %41 = call noundef zeroext i1 @_ZNKSt6vectorIhSaIhEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br i1 %41, label %90, label %50

42:                                               ; preds = %3
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %97

44:                                               ; preds = %50, %32, %16
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %96

46:                                               ; preds = %29
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %96

48:                                               ; preds = %37
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %96

50:                                               ; preds = %40
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc7Tileset5tilesEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %52 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3sfc4TileESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 0) #5
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc4Tile7paletteEv(ptr noundef nonnull align 8 dereferenceable(88) %52)
  %54 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %53)
          to label %.preheader unwind label %44

.preheader:                                       ; preds = %50
  %55 = call noundef i64 @_ZNKSt6vectorIN3sfc4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %.not53 = icmp eq i64 %55, 0
  br i1 %.not53, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %69, %.preheader
  %56 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 0, ptr %56, align 4, !tbaa !30
  %57 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 0, ptr %57, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  invoke void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %9, ptr noundef nonnull align 8 dereferenceable(136) %0)
          to label %85 unwind label %91

.lr.ph:                                           ; preds = %.preheader, %69
  %58 = phi i64 [ %71, %69 ], [ 0, %.preheader ]
  %.03752 = phi i32 [ %70, %69 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  %59 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3sfc4TileESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %58) #5
  invoke void @_ZNK3sfc4Tile9rgba_dataEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %7, ptr noundef nonnull align 8 dereferenceable(88) %59)
          to label %60 unwind label %74

60:                                               ; preds = %.lr.ph
  %61 = urem i32 %.03752, %19
  %62 = mul i32 %61, %17
  %63 = udiv i32 %.03752, %19
  %64 = mul i32 %63, %18
  invoke void @_ZN3sfc5Image4blitERKSt6vectorIjSaIjEEjjj(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %62, i32 noundef %64, i32 noundef %17)
          to label %65 unwind label %76

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  %66 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3sfc4TileESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %58) #5
  %67 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc4Tile4dataEv(ptr noundef nonnull align 8 dereferenceable(88) %66)
  invoke void @_ZNSt6vectorIhSaIhEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %67)
          to label %68 unwind label %78

68:                                               ; preds = %65
  invoke void @_ZN3sfc5Image12blit_indexedERKSt6vectorIhSaIhEEjjj(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %62, i32 noundef %64, i32 noundef %17)
          to label %69 unwind label %80

69:                                               ; preds = %68
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  %70 = add i32 %.03752, 1
  %71 = zext i32 %70 to i64
  %72 = call noundef i64 @_ZNKSt6vectorIN3sfc4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %73 = icmp ugt i64 %72, %71
  br i1 %73, label %.lr.ph, label %._crit_edge, !llvm.loop !32

74:                                               ; preds = %.lr.ph
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %84

76:                                               ; preds = %60
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %83

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

80:                                               ; preds = %68
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %82

82:                                               ; preds = %80, %78
  %.pn46 = phi { ptr, i32 } [ %81, %80 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br label %83

83:                                               ; preds = %82, %76
  %.pn46.pn = phi { ptr, i32 } [ %.pn46, %82 ], [ %77, %76 ]
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %84

84:                                               ; preds = %83, %74
  %.pn46.pn.pn = phi { ptr, i32 } [ %.pn46.pn, %83 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %96

85:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #5
  %86 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %87 = call ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  invoke void @_ZNSt3setIjSt4lessIjESaIjEEC2IN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr %86, ptr %87)
          to label %88 unwind label %93

88:                                               ; preds = %85
  %89 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIjSt4lessIjESaIjEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  br label %90

90:                                               ; preds = %40, %88
  call void @_ZNSt6vectorIN3sfc4TileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  ret void

91:                                               ; preds = %._crit_edge
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %95

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

95:                                               ; preds = %93, %91
  %.pn = phi { ptr, i32 } [ %94, %93 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  br label %96

96:                                               ; preds = %95, %84, %48, %46, %44
  %.pn46.pn.pn.pn = phi { ptr, i32 } [ %.pn46.pn.pn, %84 ], [ %.pn, %95 ], [ %45, %44 ], [ %49, %48 ], [ %47, %46 ]
  call void @_ZNSt6vectorIN3sfc4TileESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %97

97:                                               ; preds = %96, %42
  %.pn46.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn46.pn.pn.pn, %96 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  resume { ptr, i32 } %.pn46.pn.pn.pn.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3sfc7Tileset10tile_widthEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3sfc7Tileset11tile_heightEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3sfc7Tileset4sizeEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIhSaIhEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3sfc4Tile7paletteEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #0 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3sfc4TileESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

declare void @_ZNK3sfc4Tile9rgba_dataEv(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #4

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass