; LLVM IR from JayXon/Leanify :: formats/ico.ll (ZN3Ico7LeanifyEm)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<(anonymous namespace)::IconDirEntry, std::allocator<(anonymous namespace)::IconDirEntry>>::_Vector_impl" }
%"struct.std::_Vector_base<(anonymous namespace)::IconDirEntry, std::allocator<(anonymous namespace)::IconDirEntry>>::_Vector_impl" = type { %"struct.std::_Vector_base<(anonymous namespace)::IconDirEntry, std::allocator<(anonymous namespace)::IconDirEntry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<(anonymous namespace)::IconDirEntry, std::allocator<(anonymous namespace)::IconDirEntry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { i8 }
%class.Png = type { %class.Format }
%class.Format = type { ptr, ptr, i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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::allocator.2" = type { i8 }
%"struct.(anonymous namespace)::IconDirEntry" = type { i8, i8, i8, i8, i16, i16, i32, i32 }
%"struct.Bmp::BITMAPINFOHEADER" = type { i32, i32, i32, i16, i16, i32, i32, i32, i32, i32, i32 }

@_ZN3Ico12header_magicE = external dso_local constant [4 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@_ZN3Png12header_magicE = external constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN3Ico7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i16, align 2
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %class.anon, align 1
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca %class.Png, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %"class.std::vector.0", align 8
  %24 = alloca %"class.std::allocator.2", align 1
  %25 = alloca %"class.std::vector.0", align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca %class.Png, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %30 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #8
  %31 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds i8, ptr %32, i64 4
  %34 = load i16, ptr %33, align 2, !tbaa !13
  store i16 %34, ptr %6, align 2, !tbaa !13
  %35 = load i16, ptr %6, align 2, !tbaa !13
  %36 = zext i16 %35 to i32
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %46, label %38

38:                                               ; preds = %2
  %39 = load i16, ptr %6, align 2, !tbaa !13
  %40 = zext i16 %39 to i64
  %41 = mul i64 %40, 16
  %42 = add i64 6, %41
  %43 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 2
  %44 = load i64, ptr %43, align 8, !tbaa !15
  %45 = icmp uge i64 %42, %44
  br i1 %45, label %46, label %49

46:                                               ; preds = %38, %2
  %47 = load i64, ptr %5, align 8, !tbaa !9
  %48 = call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %47)
  store i64 %48, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %523

49:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %50 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = getelementptr inbounds i8, ptr %51, i64 6
  store ptr %52, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = load i16, ptr %6, align 2, !tbaa !13
  %56 = zext i16 %55 to i32
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %54, i64 %57
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  call void @_ZNSaIN12_GLOBAL__N_112IconDirEntryEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  invoke void @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEC2IPS1_vEET_S6_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef %53, ptr noundef %58, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %59 unwind label %74

59:                                               ; preds = %49
  call void @_ZNSt15__new_allocatorIN12_GLOBAL__N_112IconDirEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  %60 = call ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = call ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %63 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %62, ptr %63, align 8
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8
  %66 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8
  invoke void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN12_GLOBAL__N_112IconDirEntryESt6vectorIS3_SaIS3_EEEEZN3Ico7LeanifyEmE3$_0EvT_SB_T0_"(ptr %65, ptr %67)
          to label %68 unwind label %78

68:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 1, ptr %16, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %112, %68
  %70 = load i64, ptr %16, align 8, !tbaa !9
  %71 = call noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %72 = icmp ult i64 %70, %71
  br i1 %72, label %82, label %73

73:                                               ; preds = %69
  store i32 2, ptr %7, align 4
  br label %115

74:                                               ; preds = %49
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %11, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIN12_GLOBAL__N_112IconDirEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  br label %522

78:                                               ; preds = %130, %59
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %11, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %12, align 4
  br label %521

82:                                               ; preds = %69
  %83 = load i64, ptr %16, align 8, !tbaa !9
  %84 = sub i64 %83, 1
  %85 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %84) #8
  %86 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %85, i32 0, i32 7
  %87 = load i32, ptr %86, align 1, !tbaa !16
  %88 = load i64, ptr %16, align 8, !tbaa !9
  %89 = sub i64 %88, 1
  %90 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %89) #8
  %91 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %90, i32 0, i32 6
  %92 = load i32, ptr %91, align 1, !tbaa !19
  %93 = add i32 %87, %92
  %94 = load i64, ptr %16, align 8, !tbaa !9
  %95 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %94) #8
  %96 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %95, i32 0, i32 7
  %97 = load i32, ptr %96, align 1, !tbaa !16
  %98 = icmp ugt i32 %93, %97
  br i1 %98, label %99, label %111

99:                                               ; preds = %82
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
          to label %101 unwind label %107

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %103 unwind label %107

103:                                              ; preds = %101
  %104 = load i64, ptr %5, align 8, !tbaa !9
  %105 = invoke noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %104)
          to label %106 unwind label %107

106:                                              ; preds = %103
  store i64 %105, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %115

107:                                              ; preds = %103, %101, %99
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %11, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %521

111:                                              ; preds = %82
  br label %112

112:                                              ; preds = %111
  %113 = load i64, ptr %16, align 8, !tbaa !9
  %114 = add i64 %113, 1
  store i64 %114, ptr %16, align 8, !tbaa !9
  br label %69, !llvm.loop !20

115:                                              ; preds = %106, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %116 = load i32, ptr %7, align 4
  switch i32 %116, label %520 [
    i32 2, label %117
  ]

117:                                              ; preds = %115
  %118 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %119 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %118, i32 0, i32 7
  %120 = load i32, ptr %119, align 1, !tbaa !16
  %121 = zext i32 %120 to i64
  %122 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %123 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %122, i32 0, i32 6
  %124 = load i32, ptr %123, align 1, !tbaa !19
  %125 = zext i32 %124 to i64
  %126 = add i64 %121, %125
  %127 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 2
  %128 = load i64, ptr %127, align 8, !tbaa !15
  %129 = icmp ugt i64 %126, %128
  br i1 %129, label %130, label %134

130:                                              ; preds = %117
  %131 = load i64, ptr %5, align 8, !tbaa !9
  %132 = invoke noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %131)
          to label %133 unwind label %78

133:                                              ; preds = %130
  store i64 %132, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %520

134:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %135

135:                                              ; preds = %483, %134
  %136 = load i64, ptr %17, align 8, !tbaa !9
  %137 = call noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %138 = icmp ult i64 %136, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %135
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %487

140:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %141 = load i64, ptr %17, align 8, !tbaa !9
  %142 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %141) #8
  %143 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %142, i32 0, i32 7
  %144 = load i32, ptr %143, align 1, !tbaa !16
  store i32 %144, ptr %18, align 4, !tbaa !22
  %145 = load i64, ptr %17, align 8, !tbaa !9
  %146 = icmp ne i64 %145, 0
  br i1 %146, label %147, label %162

147:                                              ; preds = %140
  %148 = load i64, ptr %17, align 8, !tbaa !9
  %149 = sub i64 %148, 1
  %150 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %149) #8
  %151 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %150, i32 0, i32 7
  %152 = load i32, ptr %151, align 1, !tbaa !16
  %153 = load i64, ptr %17, align 8, !tbaa !9
  %154 = sub i64 %153, 1
  %155 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %154) #8
  %156 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %155, i32 0, i32 6
  %157 = load i32, ptr %156, align 1, !tbaa !19
  %158 = add i32 %152, %157
  %159 = load i64, ptr %17, align 8, !tbaa !9
  %160 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %159) #8
  %161 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %160, i32 0, i32 7
  store i32 %158, ptr %161, align 1, !tbaa !16
  br label %171

162:                                              ; preds = %140
  %163 = load i16, ptr %6, align 2, !tbaa !13
  %164 = zext i16 %163 to i64
  %165 = mul i64 %164, 16
  %166 = add i64 6, %165
  %167 = trunc i64 %166 to i32
  %168 = load i64, ptr %17, align 8, !tbaa !9
  %169 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %168) #8
  %170 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %169, i32 0, i32 7
  store i32 %167, ptr %170, align 1, !tbaa !16
  br label %171

171:                                              ; preds = %162, %147
  %172 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %173 = load ptr, ptr %172, align 8, !tbaa !11
  %174 = load i32, ptr %18, align 4, !tbaa !22
  %175 = zext i32 %174 to i64
  %176 = getelementptr inbounds i8, ptr %173, i64 %175
  %177 = call i32 @memcmp(ptr noundef %176, ptr noundef @_ZN3Png12header_magicE, i64 noundef 8) #9
  %178 = icmp eq i32 %177, 0
  br i1 %178, label %179, label %216

179:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  %180 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %181 = load ptr, ptr %180, align 8, !tbaa !11
  %182 = load i32, ptr %18, align 4, !tbaa !22
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds i8, ptr %181, i64 %183
  %185 = load i64, ptr %17, align 8, !tbaa !9
  %186 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %185) #8
  %187 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %186, i32 0, i32 6
  %188 = load i32, ptr %187, align 1, !tbaa !19
  %189 = zext i32 %188 to i64
  invoke void @_ZN3PngCI26FormatEPvm(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef %184, i64 noundef %189)
          to label %190 unwind label %207

190:                                              ; preds = %179
  %191 = load i64, ptr %5, align 8, !tbaa !9
  %192 = load i32, ptr %18, align 4, !tbaa !22
  %193 = zext i32 %192 to i64
  %194 = add i64 %191, %193
  %195 = load i64, ptr %17, align 8, !tbaa !9
  %196 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %195) #8
  %197 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %196, i32 0, i32 7
  %198 = load i32, ptr %197, align 1, !tbaa !16
  %199 = zext i32 %198 to i64
  %200 = sub i64 %194, %199
  %201 = invoke noundef i64 @_ZN3Png7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %200)
          to label %202 unwind label %211

202:                                              ; preds = %190
  %203 = trunc i64 %201 to i32
  %204 = load i64, ptr %17, align 8, !tbaa !9
  %205 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %204) #8
  %206 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %205, i32 0, i32 6
  store i32 %203, ptr %206, align 1, !tbaa !19
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  store i32 7, ptr %7, align 4
  br label %480

207:                                              ; preds = %179
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %11, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %12, align 4
  br label %215

211:                                              ; preds = %190
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %11, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %12, align 4
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  br label %215

215:                                              ; preds = %211, %207
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  br label %486

216:                                              ; preds = %171
  %217 = load i64, ptr %17, align 8, !tbaa !9
  %218 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %217) #8
  %219 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %218, i32 0, i32 0
  %220 = load i8, ptr %219, align 1, !tbaa !23
  %221 = zext i8 %220 to i32
  %222 = icmp eq i32 %221, 0
  br i1 %222, label %223, label %458

223:                                              ; preds = %216
  %224 = load i64, ptr %17, align 8, !tbaa !9
  %225 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %224) #8
  %226 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %225, i32 0, i32 1
  %227 = load i8, ptr %226, align 1, !tbaa !24
  %228 = zext i8 %227 to i32
  %229 = icmp eq i32 %228, 0
  br i1 %229, label %230, label %458

230:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %231 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8, !tbaa !11
  %233 = load i32, ptr %18, align 4, !tbaa !22
  %234 = zext i32 %233 to i64
  %235 = getelementptr inbounds i8, ptr %232, i64 %234
  store ptr %235, ptr %20, align 8, !tbaa !5
  %236 = load ptr, ptr %20, align 8, !tbaa !5
  %237 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %236, i32 0, i32 0
  %238 = load i32, ptr %237, align 1, !tbaa !25
  %239 = icmp uge i32 %238, 40
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  br i1 %239, label %240, label %297

240:                                              ; preds = %230
  %241 = load ptr, ptr %20, align 8, !tbaa !5
  %242 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %241, i32 0, i32 1
  %243 = load i32, ptr %242, align 1, !tbaa !27
  %244 = icmp eq i32 %243, 256
  br i1 %244, label %245, label %297

245:                                              ; preds = %240
  %246 = load ptr, ptr %20, align 8, !tbaa !5
  %247 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %246, i32 0, i32 2
  %248 = load i32, ptr %247, align 1, !tbaa !28
  %249 = icmp eq i32 %248, 512
  br i1 %249, label %250, label %297

250:                                              ; preds = %245
  %251 = load ptr, ptr %20, align 8, !tbaa !5
  %252 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %251, i32 0, i32 3
  %253 = load i16, ptr %252, align 1, !tbaa !29
  %254 = zext i16 %253 to i32
  %255 = icmp eq i32 %254, 1
  br i1 %255, label %256, label %297

256:                                              ; preds = %250
  %257 = load ptr, ptr %20, align 8, !tbaa !5
  %258 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %257, i32 0, i32 4
  %259 = load i16, ptr %258, align 1, !tbaa !30
  %260 = zext i16 %259 to i32
  %261 = icmp eq i32 %260, 32
  br i1 %261, label %262, label %297

262:                                              ; preds = %256
  %263 = load ptr, ptr %20, align 8, !tbaa !5
  %264 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %263, i32 0, i32 5
  %265 = load i32, ptr %264, align 1, !tbaa !31
  %266 = icmp eq i32 %265, 0
  br i1 %266, label %267, label %297

267:                                              ; preds = %262
  %268 = load ptr, ptr %20, align 8, !tbaa !5
  %269 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %268, i32 0, i32 0
  %270 = load i32, ptr %269, align 1, !tbaa !25
  %271 = load ptr, ptr %20, align 8, !tbaa !5
  %272 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %271, i32 0, i32 6
  store i32 262144, ptr %21, align 4, !tbaa !22
  %273 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %272, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %274 unwind label %317

274:                                              ; preds = %267
  %275 = load i32, ptr %273, align 4, !tbaa !22
  %276 = add i32 %270, %275
  %277 = load i64, ptr %17, align 8, !tbaa !9
  %278 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %277) #8
  %279 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %278, i32 0, i32 6
  %280 = load i32, ptr %279, align 1, !tbaa !19
  %281 = icmp ule i32 %276, %280
  br i1 %281, label %282, label %297

282:                                              ; preds = %274
  %283 = load ptr, ptr %20, align 8, !tbaa !5
  %284 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %283, i32 0, i32 6
  %285 = load i32, ptr %284, align 1, !tbaa !32
  %286 = icmp eq i32 %285, 0
  br i1 %286, label %292, label %287

287:                                              ; preds = %282
  %288 = load ptr, ptr %20, align 8, !tbaa !5
  %289 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %288, i32 0, i32 6
  %290 = load i32, ptr %289, align 1, !tbaa !32
  %291 = icmp uge i32 %290, 262144
  br i1 %291, label %292, label %297

292:                                              ; preds = %287, %282
  %293 = load ptr, ptr %20, align 8, !tbaa !5
  %294 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %293, i32 0, i32 9
  %295 = load i32, ptr %294, align 1, !tbaa !33
  %296 = icmp eq i32 %295, 0
  br label %297

297:                                              ; preds = %292, %287, %274, %262, %256, %250, %245, %240, %230
  %298 = phi i1 [ false, %287 ], [ false, %274 ], [ false, %262 ], [ false, %256 ], [ false, %250 ], [ false, %245 ], [ false, %240 ], [ false, %230 ], [ %296, %292 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br i1 %298, label %299, label %453

299:                                              ; preds = %297
  invoke void @_Z12VerbosePrintIA33_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(33) @.str.1)
          to label %300 unwind label %321

300:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %301 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %302 = load ptr, ptr %301, align 8, !tbaa !11
  %303 = load i32, ptr %18, align 4, !tbaa !22
  %304 = zext i32 %303 to i64
  %305 = getelementptr inbounds i8, ptr %302, i64 %304
  %306 = load ptr, ptr %20, align 8, !tbaa !5
  %307 = getelementptr inbounds %"struct.Bmp::BITMAPINFOHEADER", ptr %306, i32 0, i32 0
  %308 = load i32, ptr %307, align 1, !tbaa !25
  %309 = zext i32 %308 to i64
  %310 = getelementptr inbounds i8, ptr %305, i64 %309
  %311 = getelementptr inbounds i8, ptr %310, i64 262144
  store ptr %311, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #8
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef 262144, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %312 unwind label %325

312:                                              ; preds = %300
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #8
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %313

313:                                              ; preds = %393, %312
  %314 = load i64, ptr %26, align 8, !tbaa !9
  %315 = icmp ult i64 %314, 256
  br i1 %315, label %329, label %316

316:                                              ; preds = %313
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %396

317:                                              ; preds = %267
  %318 = landingpad { ptr, i32 }
          cleanup
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %11, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %457

321:                                              ; preds = %299
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %11, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %12, align 4
  br label %457

325:                                              ; preds = %300
  %326 = landingpad { ptr, i32 }
          cleanup
  %327 = extractvalue { ptr, i32 } %326, 0
  store ptr %327, ptr %11, align 8
  %328 = extractvalue { ptr, i32 } %326, 1
  store i32 %328, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #8
  br label %452

329:                                              ; preds = %313
  %330 = load ptr, ptr %22, align 8, !tbaa !5
  %331 = getelementptr inbounds i8, ptr %330, i64 -1024
  store ptr %331, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  store i64 0, ptr %27, align 8, !tbaa !9
  br label %332

332:                                              ; preds = %389, %329
  %333 = load i64, ptr %27, align 8, !tbaa !9
  %334 = icmp ult i64 %333, 256
  br i1 %334, label %336, label %335

335:                                              ; preds = %332
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %392

336:                                              ; preds = %332
  %337 = load ptr, ptr %22, align 8, !tbaa !5
  %338 = load i64, ptr %27, align 8, !tbaa !9
  %339 = mul i64 %338, 4
  %340 = add i64 %339, 2
  %341 = getelementptr inbounds i8, ptr %337, i64 %340
  %342 = load i8, ptr %341, align 1, !tbaa !34
  %343 = load i64, ptr %26, align 8, !tbaa !9
  %344 = mul i64 %343, 256
  %345 = load i64, ptr %27, align 8, !tbaa !9
  %346 = add i64 %344, %345
  %347 = mul i64 %346, 4
  %348 = add i64 %347, 0
  %349 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %348) #8
  store i8 %342, ptr %349, align 1, !tbaa !34
  %350 = load ptr, ptr %22, align 8, !tbaa !5
  %351 = load i64, ptr %27, align 8, !tbaa !9
  %352 = mul i64 %351, 4
  %353 = add i64 %352, 1
  %354 = getelementptr inbounds i8, ptr %350, i64 %353
  %355 = load i8, ptr %354, align 1, !tbaa !34
  %356 = load i64, ptr %26, align 8, !tbaa !9
  %357 = mul i64 %356, 256
  %358 = load i64, ptr %27, align 8, !tbaa !9
  %359 = add i64 %357, %358
  %360 = mul i64 %359, 4
  %361 = add i64 %360, 1
  %362 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %361) #8
  store i8 %355, ptr %362, align 1, !tbaa !34
  %363 = load ptr, ptr %22, align 8, !tbaa !5
  %364 = load i64, ptr %27, align 8, !tbaa !9
  %365 = mul i64 %364, 4
  %366 = add i64 %365, 0
  %367 = getelementptr inbounds i8, ptr %363, i64 %366
  %368 = load i8, ptr %367, align 1, !tbaa !34
  %369 = load i64, ptr %26, align 8, !tbaa !9
  %370 = mul i64 %369, 256
  %371 = load i64, ptr %27, align 8, !tbaa !9
  %372 = add i64 %370, %371
  %373 = mul i64 %372, 4
  %374 = add i64 %373, 2
  %375 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %374) #8
  store i8 %368, ptr %375, align 1, !tbaa !34
  %376 = load ptr, ptr %22, align 8, !tbaa !5
  %377 = load i64, ptr %27, align 8, !tbaa !9
  %378 = mul i64 %377, 4
  %379 = add i64 %378, 3
  %380 = getelementptr inbounds i8, ptr %376, i64 %379
  %381 = load i8, ptr %380, align 1, !tbaa !34
  %382 = load i64, ptr %26, align 8, !tbaa !9
  %383 = mul i64 %382, 256
  %384 = load i64, ptr %27, align 8, !tbaa !9
  %385 = add i64 %383, %384
  %386 = mul i64 %385, 4
  %387 = add i64 %386, 3
  %388 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %387) #8
  store i8 %381, ptr %388, align 1, !tbaa !34
  br label %389

389:                                              ; preds = %336
  %390 = load i64, ptr %27, align 8, !tbaa !9
  %391 = add i64 %390, 1
  store i64 %391, ptr %27, align 8, !tbaa !9
  br label %332, !llvm.loop !35

392:                                              ; preds = %335
  br label %393

393:                                              ; preds = %392
  %394 = load i64, ptr %26, align 8, !tbaa !9
  %395 = add i64 %394, 1
  store i64 %395, ptr %26, align 8, !tbaa !9
  br label %313, !llvm.loop !36

396:                                              ; preds = %316
  %397 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jj16LodePNGColorTypej(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef 256, i32 noundef 256, i32 noundef 6, i32 noundef 8)
          to label %398 unwind label %430

398:                                              ; preds = %396
  %399 = icmp eq i32 %397, 0
  br i1 %399, label %400, label %447

400:                                              ; preds = %398
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #8
  invoke void @_ZN3PngCI26FormatERSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %401 unwind label %434

401:                                              ; preds = %400
  %402 = invoke noundef i64 @_ZN3Png7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0)
          to label %403 unwind label %438

403:                                              ; preds = %401
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #8
  store i64 %402, ptr %28, align 8, !tbaa !9
  %404 = load i64, ptr %28, align 8, !tbaa !9
  %405 = load i64, ptr %17, align 8, !tbaa !9
  %406 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %405) #8
  %407 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %406, i32 0, i32 6
  %408 = load i32, ptr %407, align 1, !tbaa !19
  %409 = zext i32 %408 to i64
  %410 = icmp ult i64 %404, %409
  br i1 %410, label %411, label %443

411:                                              ; preds = %403
  %412 = load i64, ptr %28, align 8, !tbaa !9
  %413 = trunc i64 %412 to i32
  %414 = load i64, ptr %17, align 8, !tbaa !9
  %415 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %414) #8
  %416 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %415, i32 0, i32 6
  store i32 %413, ptr %416, align 1, !tbaa !19
  %417 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %418 = load ptr, ptr %417, align 8, !tbaa !11
  %419 = load i64, ptr %17, align 8, !tbaa !9
  %420 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %419) #8
  %421 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %420, i32 0, i32 7
  %422 = load i32, ptr %421, align 1, !tbaa !16
  %423 = zext i32 %422 to i64
  %424 = getelementptr inbounds i8, ptr %418, i64 %423
  %425 = load i64, ptr %5, align 8, !tbaa !9
  %426 = sub i64 0, %425
  %427 = getelementptr inbounds i8, ptr %424, i64 %426
  %428 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  %429 = load i64, ptr %28, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %427, ptr align 1 %428, i64 %429, i1 false)
  store i32 7, ptr %7, align 4
  br label %444

430:                                              ; preds = %396
  %431 = landingpad { ptr, i32 }
          cleanup
  %432 = extractvalue { ptr, i32 } %431, 0
  store ptr %432, ptr %11, align 8
  %433 = extractvalue { ptr, i32 } %431, 1
  store i32 %433, ptr %12, align 4
  br label %451

434:                                              ; preds = %400
  %435 = landingpad { ptr, i32 }
          cleanup
  %436 = extractvalue { ptr, i32 } %435, 0
  store ptr %436, ptr %11, align 8
  %437 = extractvalue { ptr, i32 } %435, 1
  store i32 %437, ptr %12, align 4
  br label %442

438:                                              ; preds = %401
  %439 = landingpad { ptr, i32 }
          cleanup
  %440 = extractvalue { ptr, i32 } %439, 0
  store ptr %440, ptr %11, align 8
  %441 = extractvalue { ptr, i32 } %439, 1
  store i32 %441, ptr %12, align 4
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #8
  br label %442

442:                                              ; preds = %438, %434
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %451

443:                                              ; preds = %403
  store i32 0, ptr %7, align 4
  br label %444

444:                                              ; preds = %443, %411
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  %445 = load i32, ptr %7, align 4
  switch i32 %445, label %448 [
    i32 0, label %446
  ]

446:                                              ; preds = %444
  br label %447

447:                                              ; preds = %446, %398
  store i32 0, ptr %7, align 4
  br label %448

448:                                              ; preds = %447, %444
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  %449 = load i32, ptr %7, align 4
  switch i32 %449, label %454 [
    i32 0, label %450
  ]

450:                                              ; preds = %448
  br label %453

451:                                              ; preds = %442, %430
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  br label %452

452:                                              ; preds = %451, %325
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %457

453:                                              ; preds = %450, %297
  store i32 0, ptr %7, align 4
  br label %454

454:                                              ; preds = %453, %448
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  %455 = load i32, ptr %7, align 4
  switch i32 %455, label %480 [
    i32 0, label %456
  ]

456:                                              ; preds = %454
  br label %458

457:                                              ; preds = %452, %321, %317
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %486

458:                                              ; preds = %456, %223, %216
  %459 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %460 = load ptr, ptr %459, align 8, !tbaa !11
  %461 = load i64, ptr %17, align 8, !tbaa !9
  %462 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %461) #8
  %463 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %462, i32 0, i32 7
  %464 = load i32, ptr %463, align 1, !tbaa !16
  %465 = zext i32 %464 to i64
  %466 = getelementptr inbounds i8, ptr %460, i64 %465
  %467 = load i64, ptr %5, align 8, !tbaa !9
  %468 = sub i64 0, %467
  %469 = getelementptr inbounds i8, ptr %466, i64 %468
  %470 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %471 = load ptr, ptr %470, align 8, !tbaa !11
  %472 = load i32, ptr %18, align 4, !tbaa !22
  %473 = zext i32 %472 to i64
  %474 = getelementptr inbounds i8, ptr %471, i64 %473
  %475 = load i64, ptr %17, align 8, !tbaa !9
  %476 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %475) #8
  %477 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %476, i32 0, i32 6
  %478 = load i32, ptr %477, align 1, !tbaa !19
  %479 = zext i32 %478 to i64
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %469, ptr align 1 %474, i64 %479, i1 false)
  store i32 0, ptr %7, align 4
  br label %480

480:                                              ; preds = %458, %454, %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  %481 = load i32, ptr %7, align 4
  switch i32 %481, label %530 [
    i32 0, label %482
    i32 7, label %483
  ]

482:                                              ; preds = %480
  br label %483

483:                                              ; preds = %482, %480
  %484 = load i64, ptr %17, align 8, !tbaa !9
  %485 = add i64 %484, 1
  store i64 %485, ptr %17, align 8, !tbaa !9
  br label %135, !llvm.loop !37

486:                                              ; preds = %457, %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %521

487:                                              ; preds = %139
  %488 = load i64, ptr %5, align 8, !tbaa !9
  %489 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %490 = load ptr, ptr %489, align 8, !tbaa !11
  %491 = sub i64 0, %488
  %492 = getelementptr inbounds i8, ptr %490, i64 %491
  store ptr %492, ptr %489, align 8, !tbaa !11
  %493 = load i64, ptr %5, align 8, !tbaa !9
  %494 = icmp ne i64 %493, 0
  br i1 %494, label %495, label %502

495:                                              ; preds = %487
  %496 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %497 = load ptr, ptr %496, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %497, ptr align 1 @_ZN3Ico12header_magicE, i64 4, i1 false)
  %498 = load i16, ptr %6, align 2, !tbaa !13
  %499 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %500 = load ptr, ptr %499, align 8, !tbaa !11
  %501 = getelementptr inbounds i8, ptr %500, i64 4
  store i16 %498, ptr %501, align 2, !tbaa !13
  br label %502

502:                                              ; preds = %495, %487
  %503 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 1
  %504 = load ptr, ptr %503, align 8, !tbaa !11
  %505 = getelementptr inbounds i8, ptr %504, i64 6
  %506 = call noundef ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %507 = call noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %508 = mul i64 %507, 16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %505, ptr align 1 %506, i64 %508, i1 false)
  %509 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %510 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %509, i32 0, i32 7
  %511 = load i32, ptr %510, align 1, !tbaa !16
  %512 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %513 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %512, i32 0, i32 6
  %514 = load i32, ptr %513, align 1, !tbaa !19
  %515 = add i32 %511, %514
  %516 = zext i32 %515 to i64
  %517 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 2
  store i64 %516, ptr %517, align 8, !tbaa !15
  %518 = getelementptr inbounds %class.Format, ptr %30, i32 0, i32 2
  %519 = load i64, ptr %518, align 8, !tbaa !15
  store i64 %519, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %520

520:                                              ; preds = %502, %133, %115
  call void @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %523

521:                                              ; preds = %486, %107, %78
  call void @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br label %522

522:                                              ; preds = %521, %74
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #8
  br label %525

523:                                              ; preds = %520, %46
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #8
  %524 = load i64, ptr %3, align 8
  ret i64 %524

525:                                              ; preds = %522
  %526 = load ptr, ptr %11, align 8
  %527 = load i32, ptr %12, align 4
  %528 = insertvalue { ptr, i32 } poison, ptr %526, 0
  %529 = insertvalue { ptr, i32 } %528, i32 %527, 1
  resume { ptr, i32 } %529

530:                                              ; preds = %480
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSaIN12_GLOBAL__N_112IconDirEntryEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEC2IPS1_vEET_S6_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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) #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN12_GLOBAL__N_112IconDirEntryESt6vectorIS3_SaIS3_EEEEZN3Ico7LeanifyEmE3$_0EvT_SB_T0_"(ptr, ptr) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #4

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

declare noundef i64 @_ZN3Png7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12VerbosePrintIA33_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(33)) #0

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

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

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

declare noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jj16LodePNGColorTypej(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #5

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSt15__new_allocatorIN12_GLOBAL__N_112IconDirEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS6Format", !6, i64 8, !10, i64 16}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!12, !10, i64 16}
!16 = !{!17, !18, i64 12}
!17 = !{!"_ZTSN12_GLOBAL__N_112IconDirEntryE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !14, i64 4, !14, i64 6, !18, i64 8, !18, i64 12}
!18 = !{!"int", !7, i64 0}
!19 = !{!17, !18, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!18, !18, i64 0}
!23 = !{!17, !7, i64 0}
!24 = !{!17, !7, i64 1}
!25 = !{!26, !18, i64 0}
!26 = !{!"_ZTSN3Bmp16BITMAPINFOHEADERE", !18, i64 0, !18, i64 4, !18, i64 8, !14, i64 12, !14, i64 14, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36}
!27 = !{!26, !18, i64 4}
!28 = !{!26, !18, i64 8}
!29 = !{!26, !14, i64 12}
!30 = !{!26, !14, i64 14}
!31 = !{!26, !18, i64 16}
!32 = !{!26, !18, i64 20}
!33 = !{!26, !18, i64 32}
!34 = !{!7, !7, i64 0}
!35 = distinct !{!35, !21}
!36 = distinct !{!36, !21}
!37 = distinct !{!37, !21}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<(anonymous namespace)::IconDirEntry, std::allocator<(anonymous namespace)::IconDirEntry>>::_Vector_impl" }
%"struct.std::_Vector_base<(anonymous namespace)::IconDirEntry, std::allocator<(anonymous namespace)::IconDirEntry>>::_Vector_impl" = type { %"struct.std::_Vector_base<(anonymous namespace)::IconDirEntry, std::allocator<(anonymous namespace)::IconDirEntry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<(anonymous namespace)::IconDirEntry, std::allocator<(anonymous namespace)::IconDirEntry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%class.Png = type { %class.Format }
%class.Format = type { ptr, ptr, i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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::allocator.2" = type { i8 }
%"struct.(anonymous namespace)::IconDirEntry" = type { i8, i8, i8, i8, i16, i16, i32, i32 }

@_ZN3Ico12header_magicE = external dso_local local_unnamed_addr constant [4 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@_ZN3Png12header_magicE = external constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN3Ico7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %class.Png, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.0", align 8
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %class.Png, align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 4
  %14 = load i16, ptr %13, align 2, !tbaa !11
  %15 = icmp eq i16 %14, 0
  br i1 %15, label %22, label %16

16:                                               ; preds = %2
  %17 = zext i16 %14 to i64
  %18 = shl nuw nsw i64 %17, 4
  %19 = or disjoint i64 %18, 6
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = load i64, ptr %20, align 8, !tbaa !13
  %.not = icmp ult i64 %19, %21
  br i1 %.not, label %24, label %22

22:                                               ; preds = %16, %2
  %23 = tail call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1)
  br label %277

24:                                               ; preds = %16
  %25 = getelementptr inbounds i8, ptr %12, i64 6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  %26 = getelementptr inbounds %"struct.(anonymous namespace)::IconDirEntry", ptr %25, i64 %17
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @_ZNSaIN12_GLOBAL__N_112IconDirEntryEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEC2IPS1_vEET_S6_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %27 unwind label %34

27:                                               ; preds = %24
  call void @_ZNSt15__new_allocatorIN12_GLOBAL__N_112IconDirEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  %28 = call ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %29 = call ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  invoke void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN12_GLOBAL__N_112IconDirEntryESt6vectorIS3_SaIS3_EEEEZN3Ico7LeanifyEmE3$_0EvT_SB_T0_"(ptr %28, ptr %29)
          to label %.preheader137 unwind label %36

.preheader137:                                    ; preds = %27
  %30 = call noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %.not116138 = icmp ugt i64 %30, 1
  br i1 %.not116138, label %.lr.ph, label %._crit_edge

31:                                               ; preds = %.lr.ph
  %32 = add nuw i64 %.0103139, 1
  %33 = call noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %.not116 = icmp ult i64 %32, %33
  br i1 %.not116, label %.lr.ph, label %._crit_edge, !llvm.loop !14

34:                                               ; preds = %24
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN12_GLOBAL__N_112IconDirEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  br label %276

36:                                               ; preds = %27
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %275

.lr.ph:                                           ; preds = %.preheader137, %31
  %.0103139 = phi i64 [ %32, %31 ], [ 1, %.preheader137 ]
  %38 = add i64 %.0103139, -1
  %39 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %38) #8
  %40 = getelementptr inbounds i8, ptr %39, i64 12
  %41 = load i32, ptr %40, align 1, !tbaa !16
  %42 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %38) #8
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = load i32, ptr %43, align 1, !tbaa !19
  %45 = add i32 %44, %41
  %46 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0103139) #8
  %47 = getelementptr inbounds i8, ptr %46, i64 12
  %48 = load i32, ptr %47, align 1, !tbaa !16
  %49 = icmp ugt i32 %45, %48
  br i1 %49, label %50, label %31

50:                                               ; preds = %.lr.ph
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
          to label %52 unwind label %55

52:                                               ; preds = %50
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.thread unwind label %55

.thread:                                          ; preds = %52
  %54 = call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1)
  br label %274

55:                                               ; preds = %52, %50
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %275

._crit_edge:                                      ; preds = %31, %.preheader137
  %57 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %58 = getelementptr inbounds i8, ptr %57, i64 12
  %59 = load i32, ptr %58, align 1, !tbaa !16
  %60 = zext i32 %59 to i64
  %61 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  %63 = load i32, ptr %62, align 1, !tbaa !19
  %64 = zext i32 %63 to i64
  %65 = add nuw nsw i64 %64, %60
  %66 = load i64, ptr %20, align 8, !tbaa !13
  %67 = icmp ugt i64 %65, %66
  br i1 %67, label %71, label %.preheader

.preheader:                                       ; preds = %._crit_edge
  %68 = call noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %.not146 = icmp eq i64 %68, 0
  br i1 %.not146, label %.preheader.._crit_edge145_crit_edge, label %.lr.ph144

.preheader.._crit_edge145_crit_edge:              ; preds = %.preheader
  %.pre = sub i64 0, %1
  br label %._crit_edge145

.lr.ph144:                                        ; preds = %.preheader
  %69 = trunc nuw nsw i64 %19 to i32
  %70 = sub i64 0, %1
  br label %75

71:                                               ; preds = %._crit_edge
  %72 = call noundef i64 @_ZN6Format7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1)
  br label %274

._crit_edge145:                                   ; preds = %252, %.preheader.._crit_edge145_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader.._crit_edge145_crit_edge ], [ %70, %252 ]
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 %.pre-phi
  store ptr %74, ptr %11, align 8, !tbaa !5
  %.not117 = icmp eq i64 %1, 0
  br i1 %.not117, label %260, label %256

75:                                               ; preds = %.lr.ph144, %252
  %.0102143 = phi i64 [ 0, %.lr.ph144 ], [ %253, %252 ]
  %76 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %77 = getelementptr inbounds i8, ptr %76, i64 12
  %78 = load i32, ptr %77, align 1, !tbaa !16
  %.not118 = icmp eq i64 %.0102143, 0
  br i1 %.not118, label %88, label %79

79:                                               ; preds = %75
  %80 = add i64 %.0102143, -1
  %81 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %80) #8
  %82 = getelementptr inbounds i8, ptr %81, i64 12
  %83 = load i32, ptr %82, align 1, !tbaa !16
  %84 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %80) #8
  %85 = getelementptr inbounds i8, ptr %84, i64 8
  %86 = load i32, ptr %85, align 1, !tbaa !19
  %87 = add i32 %86, %83
  br label %88

88:                                               ; preds = %75, %79
  %.sink150 = phi i64 [ %.0102143, %79 ], [ 0, %75 ]
  %.sink = phi i32 [ %87, %79 ], [ %69, %75 ]
  %89 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.sink150) #8
  %90 = getelementptr inbounds i8, ptr %89, i64 12
  store i32 %.sink, ptr %90, align 1, !tbaa !16
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = zext i32 %78 to i64
  %93 = getelementptr inbounds i8, ptr %91, i64 %92
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(8) %93, ptr noundef nonnull dereferenceable(8) @_ZN3Png12header_magicE, i64 8)
  %94 = icmp eq i32 %bcmp, 0
  br i1 %94, label %95, label %117

95:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  %96 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %97 = getelementptr inbounds i8, ptr %96, i64 8
  %98 = load i32, ptr %97, align 1, !tbaa !19
  %99 = zext i32 %98 to i64
  invoke void @_ZN3PngCI26FormatEPvm(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef %93, i64 noundef %99)
          to label %100 unwind label %112

100:                                              ; preds = %95
  %101 = add i64 %92, %1
  %102 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %103 = getelementptr inbounds i8, ptr %102, i64 12
  %104 = load i32, ptr %103, align 1, !tbaa !16
  %105 = zext i32 %104 to i64
  %106 = sub i64 %101, %105
  %107 = invoke noundef i64 @_ZN3Png7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %106)
          to label %108 unwind label %114

108:                                              ; preds = %100
  %109 = trunc i64 %107 to i32
  %110 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  store i32 %109, ptr %111, align 1, !tbaa !19
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %252

112:                                              ; preds = %95
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %116

114:                                              ; preds = %100
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  br label %116

116:                                              ; preds = %114, %112
  %.pn125 = phi { ptr, i32 } [ %115, %114 ], [ %113, %112 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %275

117:                                              ; preds = %88
  %118 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %119 = load i8, ptr %118, align 1, !tbaa !20
  %120 = icmp eq i8 %119, 0
  br i1 %120, label %121, label %.critedge131

121:                                              ; preds = %117
  %122 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %123 = getelementptr inbounds i8, ptr %122, i64 1
  %124 = load i8, ptr %123, align 1, !tbaa !21
  %125 = icmp eq i8 %124, 0
  br i1 %125, label %126, label %.critedge131

126:                                              ; preds = %121
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = getelementptr inbounds i8, ptr %127, i64 %92
  %129 = load i32, ptr %128, align 1, !tbaa !22
  %130 = icmp ugt i32 %129, 39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  br i1 %130, label %131, label %.critedge

131:                                              ; preds = %126
  %132 = getelementptr inbounds i8, ptr %128, i64 4
  %133 = load i32, ptr %132, align 1, !tbaa !24
  %134 = icmp eq i32 %133, 256
  br i1 %134, label %135, label %.critedge

135:                                              ; preds = %131
  %136 = getelementptr inbounds i8, ptr %128, i64 8
  %137 = load i32, ptr %136, align 1, !tbaa !25
  %138 = icmp eq i32 %137, 512
  br i1 %138, label %139, label %.critedge

139:                                              ; preds = %135
  %140 = getelementptr inbounds i8, ptr %128, i64 12
  %141 = load i16, ptr %140, align 1, !tbaa !26
  %142 = icmp eq i16 %141, 1
  br i1 %142, label %143, label %.critedge

143:                                              ; preds = %139
  %144 = getelementptr inbounds i8, ptr %128, i64 14
  %145 = load i16, ptr %144, align 1, !tbaa !27
  %146 = icmp eq i16 %145, 32
  br i1 %146, label %147, label %.critedge

147:                                              ; preds = %143
  %148 = getelementptr inbounds i8, ptr %128, i64 16
  %149 = load i32, ptr %148, align 1, !tbaa !28
  %150 = icmp eq i32 %149, 0
  br i1 %150, label %151, label %.critedge

151:                                              ; preds = %147
  %152 = getelementptr inbounds i8, ptr %128, i64 20
  store i32 262144, ptr %6, align 4, !tbaa !29
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %152, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %154 = load i32, ptr %153, align 4, !tbaa !29
  %155 = add i32 %154, %129
  %156 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %157 = getelementptr inbounds i8, ptr %156, i64 8
  %158 = load i32, ptr %157, align 1, !tbaa !19
  %.not119 = icmp ugt i32 %155, %158
  br i1 %.not119, label %.critedge, label %159

159:                                              ; preds = %151
  %160 = load i32, ptr %152, align 1, !tbaa !30
  %161 = add i32 %160, -262144
  %or.cond = icmp ult i32 %161, -262143
  br i1 %or.cond, label %162, label %.critedge

162:                                              ; preds = %159
  %163 = getelementptr inbounds i8, ptr %128, i64 32
  %164 = load i32, ptr %163, align 1, !tbaa !31
  %165 = icmp eq i32 %164, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br i1 %165, label %166, label %.critedge131

166:                                              ; preds = %162
  invoke void @_Z12VerbosePrintIA33_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(33) @.str.1)
          to label %167 unwind label %177

167:                                              ; preds = %166
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  %169 = load i32, ptr %128, align 1, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 262144, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %170 unwind label %179

170:                                              ; preds = %167
  %171 = getelementptr inbounds i8, ptr %168, i64 %92
  %172 = zext i32 %169 to i64
  %173 = getelementptr inbounds i8, ptr %171, i64 %172
  %174 = getelementptr inbounds i8, ptr %173, i64 262144
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br label %181

175:                                              ; preds = %184
  %176 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jj16LodePNGColorTypej(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 256, i32 noundef 256, i32 noundef 6, i32 noundef 8)
          to label %208 unwind label %229

177:                                              ; preds = %166
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %275

179:                                              ; preds = %167
  %180 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br label %238

181:                                              ; preds = %170, %184
  %.093142 = phi i64 [ 0, %170 ], [ %185, %184 ]
  %.094141 = phi ptr [ %174, %170 ], [ %182, %184 ]
  %182 = getelementptr inbounds i8, ptr %.094141, i64 -1024
  %183 = shl nuw nsw i64 %.093142, 10
  br label %186

184:                                              ; preds = %186
  %185 = add nuw nsw i64 %.093142, 1
  %exitcond147.not = icmp eq i64 %185, 256
  br i1 %exitcond147.not, label %175, label %181, !llvm.loop !32

186:                                              ; preds = %181, %186
  %.092140 = phi i64 [ 0, %181 ], [ %207, %186 ]
  %187 = shl nuw nsw i64 %.092140, 2
  %188 = or disjoint i64 %187, 2
  %189 = getelementptr inbounds i8, ptr %182, i64 %188
  %190 = load i8, ptr %189, align 1, !tbaa !33
  %191 = add nuw nsw i64 %187, %183
  %192 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %191) #8
  store i8 %190, ptr %192, align 1, !tbaa !33
  %193 = or disjoint i64 %187, 1
  %194 = getelementptr inbounds i8, ptr %182, i64 %193
  %195 = load i8, ptr %194, align 1, !tbaa !33
  %196 = or disjoint i64 %191, 1
  %197 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %196) #8
  store i8 %195, ptr %197, align 1, !tbaa !33
  %198 = getelementptr inbounds i8, ptr %182, i64 %187
  %199 = load i8, ptr %198, align 1, !tbaa !33
  %200 = or disjoint i64 %191, 2
  %201 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %200) #8
  store i8 %199, ptr %201, align 1, !tbaa !33
  %202 = or disjoint i64 %187, 3
  %203 = getelementptr inbounds i8, ptr %182, i64 %202
  %204 = load i8, ptr %203, align 1, !tbaa !33
  %205 = or disjoint i64 %191, 3
  %206 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %205) #8
  store i8 %204, ptr %206, align 1, !tbaa !33
  %207 = add nuw nsw i64 %.092140, 1
  %exitcond.not = icmp eq i64 %207, 256
  br i1 %exitcond.not, label %184, label %186, !llvm.loop !34

208:                                              ; preds = %175
  %209 = icmp eq i32 %176, 0
  br i1 %209, label %210, label %236

210:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  invoke void @_ZN3PngCI26FormatERSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %211 unwind label %231

211:                                              ; preds = %210
  %212 = invoke noundef i64 @_ZN3Png7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0)
          to label %213 unwind label %233

213:                                              ; preds = %211
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  %214 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %215 = getelementptr inbounds i8, ptr %214, i64 8
  %216 = load i32, ptr %215, align 1, !tbaa !19
  %217 = zext i32 %216 to i64
  %.not124 = icmp ult i64 %212, %217
  br i1 %.not124, label %.thread133, label %236

.thread133:                                       ; preds = %213
  %218 = trunc nuw i64 %212 to i32
  %219 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %220 = getelementptr inbounds i8, ptr %219, i64 8
  store i32 %218, ptr %220, align 1, !tbaa !19
  %221 = load ptr, ptr %11, align 8, !tbaa !5
  %222 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %223 = getelementptr inbounds i8, ptr %222, i64 12
  %224 = load i32, ptr %223, align 1, !tbaa !16
  %225 = zext i32 %224 to i64
  %226 = getelementptr inbounds i8, ptr %221, i64 %225
  %227 = getelementptr inbounds i8, ptr %226, i64 %70
  %228 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %227, ptr align 1 %228, i64 %212, i1 false)
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %252

229:                                              ; preds = %175
  %230 = landingpad { ptr, i32 }
          cleanup
  br label %237

231:                                              ; preds = %210
  %232 = landingpad { ptr, i32 }
          cleanup
  br label %235

233:                                              ; preds = %211
  %234 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  br label %235

235:                                              ; preds = %233, %231
  %.pn = phi { ptr, i32 } [ %234, %233 ], [ %232, %231 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  br label %237

236:                                              ; preds = %208, %213
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %.critedge131

237:                                              ; preds = %235, %229
  %.pn.pn = phi { ptr, i32 } [ %.pn, %235 ], [ %230, %229 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  br label %238

238:                                              ; preds = %237, %179
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %237 ], [ %180, %179 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %275

.critedge:                                        ; preds = %159, %126, %131, %135, %139, %143, %147, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %.critedge131

.critedge131:                                     ; preds = %236, %162, %.critedge, %121, %117
  %239 = load ptr, ptr %11, align 8, !tbaa !5
  %240 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %241 = getelementptr inbounds i8, ptr %240, i64 12
  %242 = load i32, ptr %241, align 1, !tbaa !16
  %243 = zext i32 %242 to i64
  %244 = getelementptr inbounds i8, ptr %239, i64 %243
  %245 = getelementptr inbounds i8, ptr %244, i64 %70
  %246 = load ptr, ptr %11, align 8, !tbaa !5
  %247 = getelementptr inbounds i8, ptr %246, i64 %92
  %248 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0102143) #8
  %249 = getelementptr inbounds i8, ptr %248, i64 8
  %250 = load i32, ptr %249, align 1, !tbaa !19
  %251 = zext i32 %250 to i64
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %245, ptr align 1 %247, i64 %251, i1 false)
  br label %252

252:                                              ; preds = %.thread133, %.critedge131, %108
  %253 = add nuw i64 %.0102143, 1
  %254 = call noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %255 = icmp ult i64 %253, %254
  br i1 %255, label %75, label %._crit_edge145, !llvm.loop !35

256:                                              ; preds = %._crit_edge145
  %257 = load i32, ptr @_ZN3Ico12header_magicE, align 1
  store i32 %257, ptr %74, align 1
  %258 = load ptr, ptr %11, align 8, !tbaa !5
  %259 = getelementptr inbounds i8, ptr %258, i64 4
  store i16 %14, ptr %259, align 2, !tbaa !11
  br label %260

260:                                              ; preds = %256, %._crit_edge145
  %261 = phi ptr [ %258, %256 ], [ %74, %._crit_edge145 ]
  %262 = getelementptr inbounds i8, ptr %261, i64 6
  %263 = call noundef ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %264 = call noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %265 = shl i64 %264, 4
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %262, ptr align 1 %263, i64 %265, i1 false)
  %266 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %267 = getelementptr inbounds i8, ptr %266, i64 12
  %268 = load i32, ptr %267, align 1, !tbaa !16
  %269 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %270 = getelementptr inbounds i8, ptr %269, i64 8
  %271 = load i32, ptr %270, align 1, !tbaa !19
  %272 = add i32 %271, %268
  %273 = zext i32 %272 to i64
  store i64 %273, ptr %20, align 8, !tbaa !13
  br label %274

274:                                              ; preds = %.thread, %260, %71
  %.1 = phi i64 [ %72, %71 ], [ %273, %260 ], [ %54, %.thread ]
  call void @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  br label %277

275:                                              ; preds = %116, %238, %177, %55, %36
  %.pn125.pn.pn = phi { ptr, i32 } [ %56, %55 ], [ %37, %36 ], [ %.pn125, %116 ], [ %.pn.pn.pn, %238 ], [ %178, %177 ]
  call void @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  br label %276

276:                                              ; preds = %275, %34
  %.pn125.pn.pn.pn = phi { ptr, i32 } [ %.pn125.pn.pn, %275 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn125.pn.pn.pn

277:                                              ; preds = %274, %22
  %.2 = phi i64 [ %23, %22 ], [ %.1, %274 ]
  ret i64 %.2
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSaIN12_GLOBAL__N_112IconDirEntryEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EEC2IPS1_vEET_S6_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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) #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN12_GLOBAL__N_112IconDirEntryESt6vectorIS3_SaIS3_EEEEZN3Ico7LeanifyEmE3$_0EvT_SB_T0_"(ptr, ptr) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i64 @_ZNKSt6vectorIN12_GLOBAL__N_112IconDirEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

declare noundef i64 @_ZN3Png7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12VerbosePrintIA33_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(33)) local_unnamed_addr #0

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

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

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

declare noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jj16LodePNGColorTypej(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSt15__new_allocatorIN12_GLOBAL__N_112IconDirEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nofree nounwind willreturn memory(argmem: read) }
attributes #8 = { 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 8}
!6 = !{!"_ZTS6Format", !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !10, i64 16}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !18, i64 12}
!17 = !{!"_ZTSN12_GLOBAL__N_112IconDirEntryE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !12, i64 4, !12, i64 6, !18, i64 8, !18, i64 12}
!18 = !{!"int", !8, i64 0}
!19 = !{!17, !18, i64 8}
!20 = !{!17, !8, i64 0}
!21 = !{!17, !8, i64 1}
!22 = !{!23, !18, i64 0}
!23 = !{!"_ZTSN3Bmp16BITMAPINFOHEADERE", !18, i64 0, !18, i64 4, !18, i64 8, !12, i64 12, !12, i64 14, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36}
!24 = !{!23, !18, i64 4}
!25 = !{!23, !18, i64 8}
!26 = !{!23, !12, i64 12}
!27 = !{!23, !12, i64 14}
!28 = !{!23, !18, i64 16}
!29 = !{!18, !18, i64 0}
!30 = !{!23, !18, i64 20}
!31 = !{!23, !18, i64 32}
!32 = distinct !{!32, !15}
!33 = !{!8, !8, i64 0}
!34 = distinct !{!34, !15}
!35 = distinct !{!35, !15}


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