; LLVM IR from JayXon/Leanify :: lib/zopflipng/lodepng (lodepng_util)

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

%struct.LodePNGDecompressSettings = type { i32, i32, i64, ptr, ptr, ptr }
%"class.lodepng::State" = type { %struct.LodePNGState }
%struct.LodePNGState = type { %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32, i64, i64 }
%struct.LodePNGEncoderSettings = type { %struct.LodePNGCompressSettings, i32, i32, i32, ptr, i32, i32, i32 }
%struct.LodePNGCompressSettings = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%struct.LodePNGInfo = type { i32, i32, i32, %struct.LodePNGColorMode, i32, i32, i32, i32, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, %struct.LodePNGTime, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@lodepng_default_decompress_settings = external global %struct.LodePNGDecompressSettings, align 8
@_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IX = external hidden constant [7 x i32], align 16
@_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IY = external hidden constant [7 x i32], align 16
@_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DX = external hidden constant [7 x i32], align 16
@_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DY = external hidden constant [7 x i32], align 16

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

declare void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(528)) unnamed_addr #1

declare noundef i32 @_Z15lodepng_inspectPjS_P12LodePNGStatePKhm(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528)) unnamed_addr #3

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

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

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

declare void @_Z18lodepng_chunk_typePcPKh(ptr noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

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

declare noundef i32 @_Z20lodepng_chunk_lengthPKh(ptr noundef) #1

declare noundef ptr @_Z24lodepng_chunk_next_constPKhS0_(ptr noundef, ptr noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.lodepng::State", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca [5 x i8], align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.0", align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.0", align 1
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"class.std::vector", align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 528, ptr %6) #6
  call void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(528) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef 0) #6
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #6
  %38 = invoke noundef i32 @_Z15lodepng_inspectPjS_P12LodePNGStatePKhm(ptr noundef %7, ptr noundef %8, ptr noundef %6, ptr noundef %35, i64 noundef %37)
          to label %39 unwind label %43

39:                                               ; preds = %2
  store i32 %38, ptr %9, align 4, !tbaa !9
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %39
  store i32 1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %316

43:                                               ; preds = %2
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %10, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %11, align 4
  br label %318

47:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #6
  %50 = getelementptr inbounds i8, ptr %49, i64 1
  store ptr %50, ptr %15, align 8, !tbaa !5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #6
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  store ptr %53, ptr %13, align 8, !tbaa !5
  store ptr %53, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %54

54:                                               ; preds = %167, %47
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = icmp ult ptr %55, %56
  br i1 %57, label %58, label %65

58:                                               ; preds = %54
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = ptrtoint ptr %59 to i64
  %62 = ptrtoint ptr %60 to i64
  %63 = sub i64 %61, %62
  %64 = icmp sge i64 %63, 8
  br label %65

65:                                               ; preds = %58, %54
  %66 = phi i1 [ false, %54 ], [ %64, %58 ]
  br i1 %66, label %67, label %169

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 5, ptr %17) #6
  %68 = getelementptr inbounds [5 x i8], ptr %17, i64 0, i64 0
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_Z18lodepng_chunk_typePcPKh(ptr noundef %68, ptr noundef %69)
          to label %70 unwind label %76

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  %71 = getelementptr inbounds [5 x i8], ptr %17, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %71, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %72 unwind label %80

72:                                               ; preds = %70
  %73 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  %74 = icmp ne i64 %73, 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br i1 %74, label %75, label %84

75:                                               ; preds = %72
  store i32 3, ptr %12, align 4
  br label %165

76:                                               ; preds = %160, %67
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %10, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %11, align 4
  br label %168

80:                                               ; preds = %70
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %10, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br label %168

84:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  %85 = getelementptr inbounds [5 x i8], ptr %17, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %85, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %86 unwind label %118

86:                                               ; preds = %84
  %87 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.2)
          to label %88 unwind label %122

88:                                               ; preds = %86
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  br i1 %87, label %89, label %160

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = invoke noundef ptr @_Z24lodepng_chunk_data_constPKh(ptr noundef %90)
          to label %92 unwind label %127

92:                                               ; preds = %89
  store ptr %91, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = invoke noundef i32 @_Z20lodepng_chunk_lengthPKh(ptr noundef %93)
          to label %95 unwind label %131

95:                                               ; preds = %92
  store i32 %94, ptr %23, align 4, !tbaa !9
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = load i32, ptr %23, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds i8, ptr %96, i64 %98
  %100 = getelementptr inbounds i8, ptr %99, i64 12
  %101 = load ptr, ptr %15, align 8, !tbaa !5
  %102 = icmp ugt ptr %100, %101
  br i1 %102, label %117, label %103

103:                                              ; preds = %95
  %104 = load i32, ptr %23, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #6
  %108 = icmp ugt i64 %105, %107
  br i1 %108, label %117, label %109

109:                                              ; preds = %103
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = load i32, ptr %23, align 4, !tbaa !9
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds i8, ptr %110, i64 %112
  %114 = getelementptr inbounds i8, ptr %113, i64 12
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = icmp ult ptr %114, %115
  br i1 %116, label %117, label %135

117:                                              ; preds = %109, %103, %95
  store i32 1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %155

118:                                              ; preds = %84
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %10, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %11, align 4
  br label %126

122:                                              ; preds = %86
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %10, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  br label %126

126:                                              ; preds = %122, %118
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  br label %168

127:                                              ; preds = %89
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %10, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %11, align 4
  br label %159

131:                                              ; preds = %92
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %10, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %11, align 4
  br label %158

135:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %147, %135
  %137 = load i32, ptr %24, align 4, !tbaa !9
  %138 = load i32, ptr %23, align 4, !tbaa !9
  %139 = icmp ult i32 %137, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  store i32 4, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %154

141:                                              ; preds = %136
  %142 = load ptr, ptr %22, align 8, !tbaa !5
  %143 = load i32, ptr %24, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds i8, ptr %142, i64 %144
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 1 dereferenceable(1) %145)
          to label %146 unwind label %150

146:                                              ; preds = %141
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %24, align 4, !tbaa !9
  %149 = add i32 %148, 1
  store i32 %149, ptr %24, align 4, !tbaa !9
  br label %136, !llvm.loop !11

150:                                              ; preds = %141
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %10, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %158

154:                                              ; preds = %140
  store i32 0, ptr %12, align 4
  br label %155

155:                                              ; preds = %154, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  %156 = load i32, ptr %12, align 4
  switch i32 %156, label %165 [
    i32 0, label %157
  ]

157:                                              ; preds = %155
  br label %160

158:                                              ; preds = %150, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %159

159:                                              ; preds = %158, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %168

160:                                              ; preds = %157, %88
  %161 = load ptr, ptr %13, align 8, !tbaa !5
  %162 = load ptr, ptr %15, align 8, !tbaa !5
  %163 = invoke noundef ptr @_Z24lodepng_chunk_next_constPKhS0_(ptr noundef %161, ptr noundef %162)
          to label %164 unwind label %76

164:                                              ; preds = %160
  store ptr %163, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %12, align 4
  br label %165

165:                                              ; preds = %164, %155, %75
  call void @llvm.lifetime.end.p0(i64 5, ptr %17) #6
  %166 = load i32, ptr %12, align 4
  switch i32 %166, label %314 [
    i32 0, label %167
    i32 3, label %169
  ]

167:                                              ; preds = %165
  br label %54, !llvm.loop !13

168:                                              ; preds = %159, %126, %80, %76
  call void @llvm.lifetime.end.p0(i64 5, ptr %17) #6
  br label %315

169:                                              ; preds = %165, %65
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  %170 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 0) #6
  %171 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  %172 = invoke noundef i32 @_ZN7lodepng10decompressERSt6vectorIhSaIhEEPKhmRK25LodePNGDecompressSettings(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef %170, i64 noundef %171, ptr noundef nonnull align 8 dereferenceable(40) @lodepng_default_decompress_settings)
          to label %173 unwind label %177

173:                                              ; preds = %169
  store i32 %172, ptr %9, align 4, !tbaa !9
  %174 = load i32, ptr %9, align 4, !tbaa !9
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %181

176:                                              ; preds = %173
  store i32 1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %312

177:                                              ; preds = %220, %186, %169
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %10, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %11, align 4
  br label %313

181:                                              ; preds = %173
  %182 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 3
  %183 = getelementptr inbounds %struct.LodePNGInfo, ptr %182, i32 0, i32 2
  %184 = load i32, ptr %183, align 8, !tbaa !14
  %185 = icmp eq i32 %184, 0
  br i1 %185, label %186, label %220

186:                                              ; preds = %181
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IhSaIhEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef 1)
          to label %188 unwind label %177

188:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %189 = load i32, ptr %7, align 4, !tbaa !9
  %190 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 3
  %191 = getelementptr inbounds %struct.LodePNGInfo, ptr %190, i32 0, i32 3
  %192 = invoke noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %189, i32 noundef 1, ptr noundef %191)
          to label %193 unwind label %200

193:                                              ; preds = %188
  %194 = add i64 1, %192
  store i64 %194, ptr %26, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  store i64 0, ptr %27, align 8, !tbaa !26
  br label %195

195:                                              ; preds = %210, %193
  %196 = load i64, ptr %27, align 8, !tbaa !26
  %197 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  %198 = icmp ult i64 %196, %197
  br i1 %198, label %204, label %199

199:                                              ; preds = %195
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %218

200:                                              ; preds = %188
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %10, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %11, align 4
  br label %219

204:                                              ; preds = %195
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IhSaIhEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %205, i64 noundef 0) #6
  %207 = load i64, ptr %27, align 8, !tbaa !26
  %208 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %207) #6
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %206, ptr noundef nonnull align 1 dereferenceable(1) %208)
          to label %209 unwind label %214

209:                                              ; preds = %204
  br label %210

210:                                              ; preds = %209
  %211 = load i64, ptr %26, align 8, !tbaa !26
  %212 = load i64, ptr %27, align 8, !tbaa !26
  %213 = add i64 %212, %211
  store i64 %213, ptr %27, align 8, !tbaa !26
  br label %195, !llvm.loop !27

214:                                              ; preds = %204
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %10, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %219

218:                                              ; preds = %199
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %311

219:                                              ; preds = %214, %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %313

220:                                              ; preds = %181
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IhSaIhEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef 7)
          to label %222 unwind label %177

222:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  store i64 0, ptr %28, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  store i64 0, ptr %29, align 8, !tbaa !26
  br label %223

223:                                              ; preds = %306, %222
  %224 = load i64, ptr %29, align 8, !tbaa !26
  %225 = icmp ult i64 %224, 7
  br i1 %225, label %227, label %226

226:                                              ; preds = %223
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %310

227:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %228 = load i32, ptr %7, align 4, !tbaa !9
  %229 = load i64, ptr %29, align 8, !tbaa !26
  %230 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IX, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !9
  %232 = sub i32 %228, %231
  %233 = load i64, ptr %29, align 8, !tbaa !26
  %234 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DX, i64 0, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !9
  %236 = add i32 %232, %235
  %237 = sub i32 %236, 1
  %238 = load i64, ptr %29, align 8, !tbaa !26
  %239 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DX, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !9
  %241 = udiv i32 %237, %240
  store i32 %241, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %242 = load i32, ptr %8, align 4, !tbaa !9
  %243 = load i64, ptr %29, align 8, !tbaa !26
  %244 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IY, i64 0, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !9
  %246 = sub i32 %242, %245
  %247 = load i64, ptr %29, align 8, !tbaa !26
  %248 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DY, i64 0, i64 %247
  %249 = load i32, ptr %248, align 4, !tbaa !9
  %250 = add i32 %246, %249
  %251 = sub i32 %250, 1
  %252 = load i64, ptr %29, align 8, !tbaa !26
  %253 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DY, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !9
  %255 = udiv i32 %251, %254
  store i32 %255, ptr %31, align 4, !tbaa !9
  %256 = load i64, ptr %29, align 8, !tbaa !26
  %257 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IX, i64 0, i64 %256
  %258 = load i32, ptr %257, align 4, !tbaa !9
  %259 = load i32, ptr %7, align 4, !tbaa !9
  %260 = icmp uge i32 %258, %259
  br i1 %260, label %267, label %261

261:                                              ; preds = %227
  %262 = load i64, ptr %29, align 8, !tbaa !26
  %263 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IY, i64 0, i64 %262
  %264 = load i32, ptr %263, align 4, !tbaa !9
  %265 = load i32, ptr %8, align 4, !tbaa !9
  %266 = icmp uge i32 %264, %265
  br i1 %266, label %267, label %268

267:                                              ; preds = %261, %227
  store i32 12, ptr %12, align 4
  br label %303

268:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %269 = load i32, ptr %30, align 4, !tbaa !9
  %270 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 3
  %271 = getelementptr inbounds %struct.LodePNGInfo, ptr %270, i32 0, i32 3
  %272 = invoke noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %269, i32 noundef 1, ptr noundef %271)
          to label %273 unwind label %281

273:                                              ; preds = %268
  %274 = add i64 1, %272
  store i64 %274, ptr %32, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  store i64 0, ptr %33, align 8, !tbaa !26
  br label %275

275:                                              ; preds = %295, %273
  %276 = load i64, ptr %33, align 8, !tbaa !26
  %277 = load i32, ptr %31, align 4, !tbaa !9
  %278 = zext i32 %277 to i64
  %279 = icmp ult i64 %276, %278
  br i1 %279, label %285, label %280

280:                                              ; preds = %275
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %302

281:                                              ; preds = %268
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %10, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %11, align 4
  br label %309

285:                                              ; preds = %275
  %286 = load ptr, ptr %4, align 8, !tbaa !5
  %287 = load i64, ptr %29, align 8, !tbaa !26
  %288 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IhSaIhEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %286, i64 noundef %287) #6
  %289 = load i64, ptr %28, align 8, !tbaa !26
  %290 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %289) #6
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %288, ptr noundef nonnull align 1 dereferenceable(1) %290)
          to label %291 unwind label %298

291:                                              ; preds = %285
  %292 = load i64, ptr %32, align 8, !tbaa !26
  %293 = load i64, ptr %28, align 8, !tbaa !26
  %294 = add i64 %293, %292
  store i64 %294, ptr %28, align 8, !tbaa !26
  br label %295

295:                                              ; preds = %291
  %296 = load i64, ptr %33, align 8, !tbaa !26
  %297 = add i64 %296, 1
  store i64 %297, ptr %33, align 8, !tbaa !26
  br label %275, !llvm.loop !28

298:                                              ; preds = %285
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %10, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %309

302:                                              ; preds = %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  store i32 0, ptr %12, align 4
  br label %303

303:                                              ; preds = %302, %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  %304 = load i32, ptr %12, align 4
  switch i32 %304, label %324 [
    i32 0, label %305
    i32 12, label %306
  ]

305:                                              ; preds = %303
  br label %306

306:                                              ; preds = %305, %303
  %307 = load i64, ptr %29, align 8, !tbaa !26
  %308 = add i64 %307, 1
  store i64 %308, ptr %29, align 8, !tbaa !26
  br label %223, !llvm.loop !29

309:                                              ; preds = %298, %281
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %313

310:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %311

311:                                              ; preds = %310, %218
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %312

312:                                              ; preds = %311, %176
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #6
  br label %314

313:                                              ; preds = %309, %219, %177
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #6
  br label %315

314:                                              ; preds = %312, %165
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %316

315:                                              ; preds = %313, %168
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %318

316:                                              ; preds = %314, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %6) #6
  call void @llvm.lifetime.end.p0(i64 528, ptr %6) #6
  %317 = load i32, ptr %3, align 4
  ret i32 %317

318:                                              ; preds = %315, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %6) #6
  call void @llvm.lifetime.end.p0(i64 528, ptr %6) #6
  br label %319

319:                                              ; preds = %318
  %320 = load ptr, ptr %10, align 8
  %321 = load i32, ptr %11, align 4
  %322 = insertvalue { ptr, i32 } poison, ptr %320, 0
  %323 = insertvalue { ptr, i32 } %322, i32 %321, 1
  resume { ptr, i32 } %323

324:                                              ; preds = %303
  unreachable
}

declare noundef ptr @_Z24lodepng_chunk_data_constPKh(ptr noundef) #1

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

declare noundef i32 @_ZN7lodepng10decompressERSt6vectorIhSaIhEEPKhmRK25LodePNGDecompressSettings(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(40)) #1

; 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

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

declare noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef, i32 noundef, ptr noundef) #1

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !10, i64 216}
!15 = !{!"_ZTS12LodePNGState", !16, i64 0, !19, i64 80, !22, i64 168, !24, i64 208, !10, i64 520}
!16 = !{!"_ZTS22LodePNGDecoderSettings", !17, i64 0, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !18, i64 64, !18, i64 72}
!17 = !{!"_ZTS25LodePNGDecompressSettings", !10, i64 0, !10, i64 4, !18, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTS22LodePNGEncoderSettings", !20, i64 0, !10, i64 48, !10, i64 52, !21, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80}
!20 = !{!"_ZTS23LodePNGCompressSettings", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!21 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!22 = !{!"_ZTS16LodePNGColorMode", !23, i64 0, !10, i64 4, !6, i64 8, !18, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!23 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!24 = !{!"_ZTS11LodePNGInfo", !10, i64 0, !10, i64 4, !10, i64 8, !22, i64 16, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !18, i64 72, !6, i64 80, !6, i64 88, !18, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !10, i64 136, !25, i64 140, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !6, i64 240, !6, i64 248, !10, i64 256, !7, i64 264, !7, i64 288}
!25 = !{!"_ZTS11LodePNGTime", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!26 = !{!18, !18, i64 0}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}


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

%struct.LodePNGDecompressSettings = type { i32, i32, i64, ptr, ptr, ptr }
%"class.lodepng::State" = type { %struct.LodePNGState }
%struct.LodePNGState = type { %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32, i64, i64 }
%struct.LodePNGEncoderSettings = type { %struct.LodePNGCompressSettings, i32, i32, i32, ptr, i32, i32, i32 }
%struct.LodePNGCompressSettings = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%struct.LodePNGInfo = type { i32, i32, i32, %struct.LodePNGColorMode, i32, i32, i32, i32, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, %struct.LodePNGTime, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@lodepng_default_decompress_settings = external global %struct.LodePNGDecompressSettings, align 8
@_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IX = external hidden local_unnamed_addr constant [7 x i32], align 16
@_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IY = external hidden local_unnamed_addr constant [7 x i32], align 16
@_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DX = external hidden local_unnamed_addr constant [7 x i32], align 16
@_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DY = external hidden local_unnamed_addr constant [7 x i32], align 16

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

declare void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(528)) unnamed_addr #1

declare noundef i32 @_Z15lodepng_inspectPjS_P12LodePNGStatePKhm(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528)) unnamed_addr #3

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

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

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

declare void @_Z18lodepng_chunk_typePcPKh(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

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

declare noundef i32 @_Z20lodepng_chunk_lengthPKh(ptr noundef) local_unnamed_addr #1

declare noundef ptr @_Z24lodepng_chunk_next_constPKhS0_(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.lodepng::State", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca [5 x i8], align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 528, ptr nonnull %3) #6
  call void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(528) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %13 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %14 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %15 = invoke noundef i32 @_Z15lodepng_inspectPjS_P12LodePNGStatePKhm(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %3, ptr noundef nonnull %13, i64 noundef %14)
          to label %16 unwind label %17

16:                                               ; preds = %2
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %19, label %138

17:                                               ; preds = %2
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %139

19:                                               ; preds = %16
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %21 = getelementptr inbounds i8, ptr %20, i64 1
  %22 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %24 = ptrtoint ptr %21 to i64
  %25 = icmp ult ptr %23, %21
  %26 = ptrtoint ptr %23 to i64
  %27 = sub i64 %24, %26
  %28 = icmp sgt i64 %27, 7
  %29 = select i1 %25, i1 %28, i1 false
  br i1 %29, label %.lr.ph116, label %.loopexit112

.lr.ph116:                                        ; preds = %19, %.critedge
  %.082115 = phi ptr [ %63, %.critedge ], [ %23, %19 ]
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %7) #6
  invoke void @_Z18lodepng_chunk_typePcPKh(ptr noundef nonnull %7, ptr noundef %.082115)
          to label %30 unwind label %33

30:                                               ; preds = %.lr.ph116
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull %7, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %31 unwind label %35

31:                                               ; preds = %30
  %32 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  %.not86 = icmp eq i64 %32, 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br i1 %.not86, label %37, label %.critedge.thread104

.critedge.thread104:                              ; preds = %31
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #6
  br label %.loopexit112

33:                                               ; preds = %.loopexit111, %.lr.ph116
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %69

35:                                               ; preds = %30
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %69

37:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull %7, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %38 unwind label %53

38:                                               ; preds = %37
  %39 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.2)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br i1 %39, label %40, label %.loopexit111

40:                                               ; preds = %38
  %41 = invoke noundef ptr @_Z24lodepng_chunk_data_constPKh(ptr noundef %.082115)
          to label %42 unwind label %55

42:                                               ; preds = %40
  %43 = invoke noundef i32 @_Z20lodepng_chunk_lengthPKh(ptr noundef %.082115)
          to label %44 unwind label %57

44:                                               ; preds = %42
  %45 = zext i32 %43 to i64
  %46 = getelementptr inbounds i8, ptr %.082115, i64 %45
  %47 = getelementptr inbounds i8, ptr %46, i64 12
  %48 = icmp ugt ptr %47, %21
  br i1 %48, label %.critedge.thread, label %49

49:                                               ; preds = %44
  %50 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %51 = icmp ult i64 %50, %45
  %52 = icmp ult ptr %47, %23
  %or.cond = select i1 %51, i1 true, i1 %52
  br i1 %or.cond, label %.critedge.thread, label %.preheader110

.preheader110:                                    ; preds = %49
  %.not124 = icmp eq i32 %43, 0
  br i1 %.not124, label %.loopexit111, label %.lr.ph

53:                                               ; preds = %37
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %69

55:                                               ; preds = %40
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %69

57:                                               ; preds = %42
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %69

.lr.ph:                                           ; preds = %.preheader110, %60
  %indvars.iv = phi i64 [ %indvars.iv.next, %60 ], [ 0, %.preheader110 ]
  %59 = getelementptr inbounds i8, ptr %41, i64 %indvars.iv
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 1 dereferenceable(1) %59)
          to label %60 unwind label %61

60:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %45
  br i1 %exitcond.not, label %.loopexit111, label %.lr.ph, !llvm.loop !5

61:                                               ; preds = %.lr.ph
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %69

.loopexit111:                                     ; preds = %60, %.preheader110, %38
  %63 = invoke noundef ptr @_Z24lodepng_chunk_next_constPKhS0_(ptr noundef %.082115, ptr noundef nonnull %21)
          to label %.critedge unwind label %33

.critedge.thread:                                 ; preds = %44, %49
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #6
  br label %136

.critedge:                                        ; preds = %.loopexit111
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #6
  %64 = icmp ult ptr %63, %21
  %65 = ptrtoint ptr %63 to i64
  %66 = sub i64 %24, %65
  %67 = icmp sgt i64 %66, 7
  %68 = select i1 %64, i1 %67, i1 false
  br i1 %68, label %.lr.ph116, label %.loopexit112

69:                                               ; preds = %55, %61, %57, %53, %35, %33
  %.pn89 = phi { ptr, i32 } [ %34, %33 ], [ %54, %53 ], [ %36, %35 ], [ %56, %55 ], [ %62, %61 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #6
  br label %137

.loopexit112:                                     ; preds = %.critedge, %19, %.critedge.thread104
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %70 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  %71 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %72 = invoke noundef i32 @_ZN7lodepng10decompressERSt6vectorIhSaIhEEPKhmRK25LodePNGDecompressSettings(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull %70, i64 noundef %71, ptr noundef nonnull align 8 dereferenceable(40) @lodepng_default_decompress_settings)
          to label %73 unwind label %74

73:                                               ; preds = %.loopexit112
  %.not91 = icmp eq i32 %72, 0
  br i1 %.not91, label %76, label %.loopexit

74:                                               ; preds = %98, %80, %.loopexit112
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %135

76:                                               ; preds = %73
  %77 = getelementptr inbounds i8, ptr %3, i64 216
  %78 = load i32, ptr %77, align 8, !tbaa !7
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %98

80:                                               ; preds = %76
  invoke void @_ZNSt6vectorIS_IhSaIhEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1)
          to label %81 unwind label %74

81:                                               ; preds = %80
  %82 = load i32, ptr %4, align 4, !tbaa !23
  %83 = getelementptr inbounds i8, ptr %3, i64 224
  %84 = invoke noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %82, i32 noundef 1, ptr noundef nonnull %83)
          to label %85 unwind label %88

85:                                               ; preds = %81
  %86 = add i64 %84, 1
  %87 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %.not126 = icmp eq i64 %87, 0
  br i1 %.not126, label %.loopexit, label %.lr.ph123

88:                                               ; preds = %81
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %135

.lr.ph123:                                        ; preds = %85, %92
  %.070122 = phi i64 [ %93, %92 ], [ 0, %85 ]
  %90 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IhSaIhEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.070122) #6
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 1 dereferenceable(1) %91)
          to label %92 unwind label %96

92:                                               ; preds = %.lr.ph123
  %93 = add i64 %86, %.070122
  %94 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %95 = icmp ult i64 %93, %94
  br i1 %95, label %.lr.ph123, label %.loopexit, !llvm.loop !24

96:                                               ; preds = %.lr.ph123
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %135

98:                                               ; preds = %76
  invoke void @_ZNSt6vectorIS_IhSaIhEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 7)
          to label %.preheader unwind label %74

.preheader:                                       ; preds = %98
  %99 = getelementptr inbounds i8, ptr %3, i64 224
  br label %100

100:                                              ; preds = %.preheader, %.loopexit108
  %.066121 = phi i64 [ 0, %.preheader ], [ %134, %.loopexit108 ]
  %.067120 = phi i64 [ 0, %.preheader ], [ %.269, %.loopexit108 ]
  %101 = load i32, ptr %4, align 4, !tbaa !23
  %102 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IX, i64 0, i64 %.066121
  %103 = load i32, ptr %102, align 4, !tbaa !23
  %104 = load i32, ptr %5, align 4, !tbaa !23
  %105 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IY, i64 0, i64 %.066121
  %106 = load i32, ptr %105, align 4, !tbaa !23
  %107 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DY, i64 0, i64 %.066121
  %108 = load i32, ptr %107, align 4, !tbaa !23
  %109 = xor i32 %106, -1
  %110 = add i32 %104, %109
  %111 = add i32 %110, %108
  %112 = udiv i32 %111, %108
  %.not92 = icmp ult i32 %103, %101
  %.not93 = icmp ult i32 %106, %104
  %or.cond101 = select i1 %.not92, i1 %.not93, i1 false
  br i1 %or.cond101, label %113, label %.loopexit108

113:                                              ; preds = %100
  %114 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DX, i64 0, i64 %.066121
  %115 = load i32, ptr %114, align 4, !tbaa !23
  %116 = xor i32 %103, -1
  %117 = add i32 %101, %116
  %118 = add i32 %117, %115
  %119 = udiv i32 %118, %115
  %120 = invoke noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %119, i32 noundef 1, ptr noundef nonnull %99)
          to label %121 unwind label %124

121:                                              ; preds = %113
  %122 = add i64 %120, 1
  %123 = zext i32 %112 to i64
  %.not125 = icmp ugt i32 %108, %111
  br i1 %.not125, label %.loopexit108, label %.lr.ph119

124:                                              ; preds = %113
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %135

.lr.ph119:                                        ; preds = %121, %128
  %.0118 = phi i64 [ %130, %128 ], [ 0, %121 ]
  %.168117 = phi i64 [ %129, %128 ], [ %.067120, %121 ]
  %126 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IhSaIhEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.066121) #6
  %127 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.168117) #6
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %126, ptr noundef nonnull align 1 dereferenceable(1) %127)
          to label %128 unwind label %132

128:                                              ; preds = %.lr.ph119
  %129 = add i64 %122, %.168117
  %130 = add nuw nsw i64 %.0118, 1
  %131 = icmp ult i64 %130, %123
  br i1 %131, label %.lr.ph119, label %.loopexit108, !llvm.loop !25

132:                                              ; preds = %.lr.ph119
  %133 = landingpad { ptr, i32 }
          cleanup
  br label %135

.loopexit108:                                     ; preds = %128, %121, %100
  %.269 = phi i64 [ %.067120, %100 ], [ %.067120, %121 ], [ %129, %128 ]
  %134 = add nuw nsw i64 %.066121, 1
  %exitcond129.not = icmp eq i64 %134, 7
  br i1 %exitcond129.not, label %.loopexit, label %100, !llvm.loop !26

.loopexit:                                        ; preds = %.loopexit108, %92, %85, %73
  %.4 = phi i32 [ 1, %73 ], [ 0, %85 ], [ 0, %92 ], [ 0, %.loopexit108 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br label %136

135:                                              ; preds = %124, %132, %88, %96, %74
  %.pn96.pn = phi { ptr, i32 } [ %75, %74 ], [ %97, %96 ], [ %89, %88 ], [ %133, %132 ], [ %125, %124 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br label %137

136:                                              ; preds = %.critedge.thread, %.loopexit
  %.5 = phi i32 [ %.4, %.loopexit ], [ 1, %.critedge.thread ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %138

137:                                              ; preds = %135, %69
  %.pn96.pn.pn = phi { ptr, i32 } [ %.pn96.pn, %135 ], [ %.pn89, %69 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %139

138:                                              ; preds = %16, %136
  %.6 = phi i32 [ %.5, %136 ], [ 1, %16 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %3) #6
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %3) #6
  ret i32 %.6

139:                                              ; preds = %137, %17
  %.pn96.pn.pn.pn = phi { ptr, i32 } [ %.pn96.pn.pn, %137 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %3) #6
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn96.pn.pn.pn
}

declare noundef ptr @_Z24lodepng_chunk_data_constPKh(ptr noundef) local_unnamed_addr #1

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

declare noundef i32 @_ZN7lodepng10decompressERSt6vectorIhSaIhEEPKhmRK25LodePNGDecompressSettings(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

; 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

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

declare noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !11, i64 216}
!8 = !{!"_ZTS12LodePNGState", !9, i64 0, !16, i64 80, !19, i64 168, !21, i64 208, !11, i64 520}
!9 = !{!"_ZTS22LodePNGDecoderSettings", !10, i64 0, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !14, i64 64, !14, i64 72}
!10 = !{!"_ZTS25LodePNGDecompressSettings", !11, i64 0, !11, i64 4, !14, i64 8, !15, i64 16, !15, i64 24, !15, i64 32}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"long", !12, i64 0}
!15 = !{!"any pointer", !12, i64 0}
!16 = !{!"_ZTS22LodePNGEncoderSettings", !17, i64 0, !11, i64 48, !11, i64 52, !18, i64 56, !15, i64 64, !11, i64 72, !11, i64 76, !11, i64 80}
!17 = !{!"_ZTS23LodePNGCompressSettings", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !15, i64 24, !15, i64 32, !15, i64 40}
!18 = !{!"_ZTS21LodePNGFilterStrategy", !12, i64 0}
!19 = !{!"_ZTS16LodePNGColorMode", !20, i64 0, !11, i64 4, !15, i64 8, !14, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36}
!20 = !{!"_ZTS16LodePNGColorType", !12, i64 0}
!21 = !{!"_ZTS11LodePNGInfo", !11, i64 0, !11, i64 4, !11, i64 8, !19, i64 16, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !14, i64 72, !15, i64 80, !15, i64 88, !14, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !11, i64 136, !22, i64 140, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !15, i64 240, !15, i64 248, !11, i64 256, !12, i64 264, !12, i64 288}
!22 = !{!"_ZTS11LodePNGTime", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !6}
!25 = distinct !{!25, !6}
!26 = distinct !{!26, !6}


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