; LLVM IR from venumb/ZSPACE :: cpp/depends/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, ptr, ptr, ptr }
%"class.lodepng::State" = type { %struct.LodePNGState.base, [4 x i8] }
%struct.LodePNGState.base = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }>
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32 }
%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 }
%struct.LodePNGState = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32, [4 x 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(508)) 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(508)) 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_constPKh(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 ptr, align 8
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca [5 x i8], align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.0", align 1
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.0", align 1
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::vector", align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i64, align 8
  %34 = 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 512, ptr %6) #6
  call void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508) %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
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef 0) #6
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  %39 = invoke noundef i32 @_Z15lodepng_inspectPjS_P12LodePNGStatePKhm(ptr noundef %7, ptr noundef %8, ptr noundef %6, ptr noundef %36, i64 noundef %38)
          to label %40 unwind label %44

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

43:                                               ; preds = %40
  store i32 1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %318

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

48:                                               ; preds = %40
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #6
  %51 = getelementptr inbounds i8, ptr %50, i64 1
  store ptr %51, ptr %15, align 8, !tbaa !5
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #6
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  store ptr %54, ptr %13, align 8, !tbaa !5
  store ptr %54, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  br label %55

55:                                               ; preds = %171, %48
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  %58 = load ptr, ptr %15, align 8, !tbaa !5
  %59 = icmp ult ptr %57, %58
  br i1 %59, label %60, label %64

60:                                               ; preds = %55
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = icmp uge ptr %61, %62
  br label %64

64:                                               ; preds = %60, %55
  %65 = phi i1 [ false, %55 ], [ %63, %60 ]
  br i1 %65, label %66, label %173

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

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

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

74:                                               ; preds = %71
  store i32 3, ptr %12, align 4
  br label %169

75:                                               ; preds = %159, %66
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  br label %172

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

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

85:                                               ; preds = %83
  %86 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.2)
          to label %87 unwind label %121

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

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

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

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

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

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

116:                                              ; preds = %108, %102, %94
  store i32 1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %154

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

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

125:                                              ; preds = %121, %117
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  br label %172

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

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

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

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

139:                                              ; preds = %135
  store i32 4, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %153

140:                                              ; preds = %135
  %141 = load ptr, ptr %23, align 8, !tbaa !5
  %142 = load i32, ptr %25, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds i8, ptr %141, i64 %143
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 1 dereferenceable(1) %144)
          to label %145 unwind label %149

145:                                              ; preds = %140
  br label %146

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

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

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

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

156:                                              ; preds = %154
  br label %159

157:                                              ; preds = %149, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %158

158:                                              ; preds = %157, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %172

159:                                              ; preds = %156, %87
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  %161 = invoke noundef ptr @_Z24lodepng_chunk_next_constPKh(ptr noundef %160)
          to label %162 unwind label %75

162:                                              ; preds = %159
  store ptr %161, ptr %16, align 8, !tbaa !5
  %163 = load ptr, ptr %16, align 8, !tbaa !5
  %164 = load ptr, ptr %13, align 8, !tbaa !5
  %165 = icmp ule ptr %163, %164
  br i1 %165, label %166, label %167

166:                                              ; preds = %162
  store i32 3, ptr %12, align 4
  br label %169

167:                                              ; preds = %162
  %168 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %168, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %12, align 4
  br label %169

169:                                              ; preds = %167, %166, %154, %74
  call void @llvm.lifetime.end.p0(i64 5, ptr %18) #6
  %170 = load i32, ptr %12, align 4
  switch i32 %170, label %316 [
    i32 0, label %171
    i32 3, label %173
  ]

171:                                              ; preds = %169
  br label %55, !llvm.loop !13

172:                                              ; preds = %158, %125, %79, %75
  call void @llvm.lifetime.end.p0(i64 5, ptr %18) #6
  br label %317

173:                                              ; preds = %169, %64
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  %174 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef 0) #6
  %175 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %176 = invoke noundef i32 @_ZN7lodepng10decompressERSt6vectorIhSaIhEEPKhmRK25LodePNGDecompressSettings(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef %174, i64 noundef %175, ptr noundef nonnull align 8 dereferenceable(32) @lodepng_default_decompress_settings)
          to label %177 unwind label %181

177:                                              ; preds = %173
  store i32 %176, ptr %9, align 4, !tbaa !9
  %178 = load i32, ptr %9, align 4, !tbaa !9
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %185

180:                                              ; preds = %177
  store i32 1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %314

181:                                              ; preds = %224, %190, %173
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %10, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %11, align 4
  br label %315

185:                                              ; preds = %177
  %186 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 4
  %187 = getelementptr inbounds %struct.LodePNGInfo, ptr %186, i32 0, i32 2
  %188 = load i32, ptr %187, align 8, !tbaa !14
  %189 = icmp eq i32 %188, 0
  br i1 %189, label %190, label %224

190:                                              ; preds = %185
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IhSaIhEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef 1)
          to label %192 unwind label %181

192:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %193 = load i32, ptr %7, align 4, !tbaa !9
  %194 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 4
  %195 = getelementptr inbounds %struct.LodePNGInfo, ptr %194, i32 0, i32 3
  %196 = invoke noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %193, i32 noundef 1, ptr noundef %195)
          to label %197 unwind label %204

197:                                              ; preds = %192
  %198 = add i64 1, %196
  store i64 %198, ptr %27, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  store i64 0, ptr %28, align 8, !tbaa !26
  br label %199

199:                                              ; preds = %214, %197
  %200 = load i64, ptr %28, align 8, !tbaa !26
  %201 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  %202 = icmp ult i64 %200, %201
  br i1 %202, label %208, label %203

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

204:                                              ; preds = %192
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %10, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %11, align 4
  br label %223

208:                                              ; preds = %199
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IhSaIhEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %209, i64 noundef 0) #6
  %211 = load i64, ptr %28, align 8, !tbaa !26
  %212 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %211) #6
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %210, ptr noundef nonnull align 1 dereferenceable(1) %212)
          to label %213 unwind label %218

213:                                              ; preds = %208
  br label %214

214:                                              ; preds = %213
  %215 = load i64, ptr %27, align 8, !tbaa !26
  %216 = load i64, ptr %28, align 8, !tbaa !26
  %217 = add i64 %216, %215
  store i64 %217, ptr %28, align 8, !tbaa !26
  br label %199, !llvm.loop !27

218:                                              ; preds = %208
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %10, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %223

222:                                              ; preds = %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %313

223:                                              ; preds = %218, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %315

224:                                              ; preds = %185
  %225 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IhSaIhEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %225, i64 noundef 7)
          to label %226 unwind label %181

226:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  store i64 0, ptr %29, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  store i64 0, ptr %30, align 8, !tbaa !26
  br label %227

227:                                              ; preds = %308, %226
  %228 = load i64, ptr %30, align 8, !tbaa !26
  %229 = icmp ult i64 %228, 7
  br i1 %229, label %231, label %230

230:                                              ; preds = %227
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %312

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

265:                                              ; preds = %231
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %266

266:                                              ; preds = %265, %231
  %267 = load i64, ptr %30, align 8, !tbaa !26
  %268 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IY, i64 0, i64 %267
  %269 = load i32, ptr %268, align 4, !tbaa !9
  %270 = load i32, ptr %8, align 4, !tbaa !9
  %271 = icmp uge i32 %269, %270
  br i1 %271, label %272, label %273

272:                                              ; preds = %266
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %273

273:                                              ; preds = %272, %266
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %274 = load i32, ptr %31, align 4, !tbaa !9
  %275 = getelementptr inbounds %struct.LodePNGState, ptr %6, i32 0, i32 4
  %276 = getelementptr inbounds %struct.LodePNGInfo, ptr %275, i32 0, i32 3
  %277 = invoke noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %274, i32 noundef 1, ptr noundef %276)
          to label %278 unwind label %286

278:                                              ; preds = %273
  %279 = add i64 1, %277
  store i64 %279, ptr %33, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  store i64 0, ptr %34, align 8, !tbaa !26
  br label %280

280:                                              ; preds = %300, %278
  %281 = load i64, ptr %34, align 8, !tbaa !26
  %282 = load i32, ptr %32, align 4, !tbaa !9
  %283 = zext i32 %282 to i64
  %284 = icmp ult i64 %281, %283
  br i1 %284, label %290, label %285

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

286:                                              ; preds = %273
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %10, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %11, align 4
  br label %311

290:                                              ; preds = %280
  %291 = load ptr, ptr %4, align 8, !tbaa !5
  %292 = load i64, ptr %30, align 8, !tbaa !26
  %293 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IhSaIhEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %291, i64 noundef %292) #6
  %294 = load i64, ptr %29, align 8, !tbaa !26
  %295 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %294) #6
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %293, ptr noundef nonnull align 1 dereferenceable(1) %295)
          to label %296 unwind label %303

296:                                              ; preds = %290
  %297 = load i64, ptr %33, align 8, !tbaa !26
  %298 = load i64, ptr %29, align 8, !tbaa !26
  %299 = add i64 %298, %297
  store i64 %299, ptr %29, align 8, !tbaa !26
  br label %300

300:                                              ; preds = %296
  %301 = load i64, ptr %34, align 8, !tbaa !26
  %302 = add i64 %301, 1
  store i64 %302, ptr %34, align 8, !tbaa !26
  br label %280, !llvm.loop !28

303:                                              ; preds = %290
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %10, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  br label %311

307:                                              ; preds = %285
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %308

308:                                              ; preds = %307
  %309 = load i64, ptr %30, align 8, !tbaa !26
  %310 = add i64 %309, 1
  store i64 %310, ptr %30, align 8, !tbaa !26
  br label %227, !llvm.loop !29

311:                                              ; preds = %303, %286
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %315

312:                                              ; preds = %230
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %313

313:                                              ; preds = %312, %222
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %314

314:                                              ; preds = %313, %180
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  br label %316

315:                                              ; preds = %311, %223, %181
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  br label %317

316:                                              ; preds = %314, %169
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, 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

317:                                              ; preds = %315, %172
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, 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 %320

318:                                              ; preds = %316, %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(508) %6) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %6) #6
  %319 = load i32, ptr %3, align 4
  ret i32 %319

320:                                              ; preds = %317, %44
  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(508) %6) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %6) #6
  br label %321

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

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(32)) #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 200}
!15 = !{!"_ZTS12LodePNGState", !16, i64 8, !18, i64 64, !21, i64 152, !24, i64 192, !10, i64 504}
!16 = !{!"_ZTS22LodePNGDecoderSettings", !17, i64 0, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52}
!17 = !{!"_ZTS25LodePNGDecompressSettings", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_ZTS22LodePNGEncoderSettings", !19, i64 0, !10, i64 48, !10, i64 52, !20, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80}
!19 = !{!"_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}
!20 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!21 = !{!"_ZTS16LodePNGColorMode", !22, i64 0, !10, i64 4, !6, i64 8, !23, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!22 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTS11LodePNGInfo", !10, i64 0, !10, i64 4, !10, i64 8, !21, i64 16, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !23, i64 72, !6, i64 80, !6, i64 88, !23, 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 = !{!23, !23, 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, ptr, ptr, ptr }
%"class.lodepng::State" = type { %struct.LodePNGState.base, [4 x i8] }
%struct.LodePNGState.base = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }>
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32 }
%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(508)) 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(508)) 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_constPKh(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 512, ptr nonnull %3) #6
  call void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508) %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 %131

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

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 = getelementptr inbounds i8, ptr %22, i64 16
  %25 = icmp ult ptr %24, %21
  br i1 %25, label %.lr.ph121, label %.loopexit117

.lr.ph121:                                        ; preds = %19, %.critedge
  %.085120 = phi ptr [ %58, %.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 nonnull %.085120)
          to label %26 unwind label %29

26:                                               ; preds = %.lr.ph121
  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 %27 unwind label %31

27:                                               ; preds = %26
  %28 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  %.not91 = icmp eq i64 %28, 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 %.not91, label %33, label %.critedge.thread110

29:                                               ; preds = %.loopexit116, %.lr.ph121
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %64

31:                                               ; preds = %26
  %32 = 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 %64

33:                                               ; preds = %27
  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 %34 unwind label %48

34:                                               ; preds = %33
  %35 = 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 %35, label %36, label %.loopexit116

36:                                               ; preds = %34
  %37 = invoke noundef ptr @_Z24lodepng_chunk_data_constPKh(ptr noundef nonnull %.085120)
          to label %38 unwind label %50

38:                                               ; preds = %36
  %39 = invoke noundef i32 @_Z20lodepng_chunk_lengthPKh(ptr noundef nonnull %.085120)
          to label %40 unwind label %52

40:                                               ; preds = %38
  %41 = zext i32 %39 to i64
  %42 = getelementptr inbounds i8, ptr %.085120, i64 %41
  %43 = getelementptr inbounds i8, ptr %42, i64 12
  %44 = icmp ugt ptr %43, %21
  br i1 %44, label %.critedge.thread, label %45

45:                                               ; preds = %40
  %46 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %47 = icmp ult i64 %46, %41
  br i1 %47, label %.critedge.thread, label %.preheader115

.preheader115:                                    ; preds = %45
  %.not130 = icmp eq i32 %39, 0
  br i1 %.not130, label %.loopexit116, label %.lr.ph

48:                                               ; preds = %33
  %49 = 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 %64

50:                                               ; preds = %36
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %64

52:                                               ; preds = %38
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %64

.lr.ph:                                           ; preds = %.preheader115, %55
  %indvars.iv = phi i64 [ %indvars.iv.next, %55 ], [ 0, %.preheader115 ]
  %54 = getelementptr inbounds i8, ptr %37, i64 %indvars.iv
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 1 dereferenceable(1) %54)
          to label %55 unwind label %56

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

56:                                               ; preds = %.lr.ph
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %64

.loopexit116:                                     ; preds = %55, %.preheader115, %34
  %58 = invoke noundef ptr @_Z24lodepng_chunk_next_constPKh(ptr noundef nonnull %.085120)
          to label %59 unwind label %29

59:                                               ; preds = %.loopexit116
  %.not96 = icmp ugt ptr %58, %.085120
  br i1 %.not96, label %.critedge, label %.critedge.thread110

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

.critedge.thread110:                              ; preds = %27, %59
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #6
  br label %.loopexit117

.critedge:                                        ; preds = %59
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #6
  %60 = getelementptr inbounds i8, ptr %58, i64 8
  %61 = icmp ult ptr %60, %21
  %62 = icmp uge ptr %58, %23
  %63 = select i1 %61, i1 %62, i1 false
  br i1 %63, label %.lr.ph121, label %.loopexit117

64:                                               ; preds = %50, %56, %52, %48, %31, %29
  %.pn94 = phi { ptr, i32 } [ %30, %29 ], [ %49, %48 ], [ %32, %31 ], [ %51, %50 ], [ %57, %56 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #6
  br label %130

.loopexit117:                                     ; preds = %.critedge, %19, %.critedge.thread110
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  %66 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %67 = invoke noundef i32 @_ZN7lodepng10decompressERSt6vectorIhSaIhEEPKhmRK25LodePNGDecompressSettings(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull %65, i64 noundef %66, ptr noundef nonnull align 8 dereferenceable(32) @lodepng_default_decompress_settings)
          to label %68 unwind label %69

68:                                               ; preds = %.loopexit117
  %.not97 = icmp eq i32 %67, 0
  br i1 %.not97, label %71, label %.loopexit

69:                                               ; preds = %93, %75, %.loopexit117
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %128

71:                                               ; preds = %68
  %72 = getelementptr inbounds i8, ptr %3, i64 200
  %73 = load i32, ptr %72, align 8, !tbaa !7
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %93

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

76:                                               ; preds = %75
  %77 = load i32, ptr %4, align 4, !tbaa !23
  %78 = getelementptr inbounds i8, ptr %3, i64 208
  %79 = invoke noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %77, i32 noundef 1, ptr noundef nonnull %78)
          to label %80 unwind label %83

80:                                               ; preds = %76
  %81 = add i64 %79, 1
  %82 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %.not132 = icmp eq i64 %82, 0
  br i1 %.not132, label %.loopexit, label %.lr.ph129

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

.lr.ph129:                                        ; preds = %80, %87
  %.066127 = phi i64 [ %88, %87 ], [ 0, %80 ]
  %85 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IhSaIhEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  %86 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.066127) #6
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %85, ptr noundef nonnull align 1 dereferenceable(1) %86)
          to label %87 unwind label %91

87:                                               ; preds = %.lr.ph129
  %88 = add i64 %81, %.066127
  %89 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %90 = icmp ult i64 %88, %89
  br i1 %90, label %.lr.ph129, label %.loopexit, !llvm.loop !24

91:                                               ; preds = %.lr.ph129
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %128

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

.preheader:                                       ; preds = %93
  %94 = getelementptr inbounds i8, ptr %3, i64 208
  br label %95

95:                                               ; preds = %.preheader, %._crit_edge
  %.063126 = phi i64 [ 0, %.preheader ], [ %118, %._crit_edge ]
  %.064125 = phi i64 [ 0, %.preheader ], [ %.165.lcssa, %._crit_edge ]
  %96 = load i32, ptr %4, align 4, !tbaa !23
  %97 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IX, i64 0, i64 %.063126
  %98 = load i32, ptr %97, align 4, !tbaa !23
  %99 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DX, i64 0, i64 %.063126
  %100 = load i32, ptr %99, align 4, !tbaa !23
  %101 = xor i32 %98, -1
  %102 = add i32 %96, %101
  %103 = add i32 %102, %100
  %104 = udiv i32 %103, %100
  %105 = load i32, ptr %5, align 4, !tbaa !23
  %106 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_IY, i64 0, i64 %.063126
  %107 = load i32, ptr %106, align 4, !tbaa !23
  %108 = getelementptr inbounds [7 x i32], ptr @_ZZN7lodepng24getFilterTypesInterlacedERSt6vectorIS0_IhSaIhEESaIS2_EERKS2_E8ADAM7_DY, i64 0, i64 %.063126
  %109 = load i32, ptr %108, align 4, !tbaa !23
  %.not98 = icmp ult i32 %98, %96
  %spec.select = select i1 %.not98, i32 %104, i32 0
  %110 = invoke noundef i64 @_Z20lodepng_get_raw_sizejjPK16LodePNGColorMode(i32 noundef %spec.select, i32 noundef 1, ptr noundef nonnull %94)
          to label %111 unwind label %119

111:                                              ; preds = %95
  %.not99 = icmp ult i32 %107, %105
  %112 = xor i32 %107, -1
  %113 = add i32 %105, %112
  %114 = add i32 %113, %109
  %115 = udiv i32 %114, %109
  %.061 = select i1 %.not99, i32 %115, i32 0
  %116 = add i64 %110, 1
  %117 = zext i32 %.061 to i64
  %.not131 = icmp eq i32 %.061, 0
  br i1 %.not131, label %._crit_edge, label %.lr.ph124

._crit_edge:                                      ; preds = %123, %111
  %.165.lcssa = phi i64 [ %.064125, %111 ], [ %124, %123 ]
  %118 = add nuw nsw i64 %.063126, 1
  %exitcond136.not = icmp eq i64 %118, 7
  br i1 %exitcond136.not, label %.loopexit, label %95, !llvm.loop !25

119:                                              ; preds = %95
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %128

.lr.ph124:                                        ; preds = %111, %123
  %.0123 = phi i64 [ %125, %123 ], [ 0, %111 ]
  %.165122 = phi i64 [ %124, %123 ], [ %.064125, %111 ]
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IhSaIhEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.063126) #6
  %122 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.165122) #6
  invoke void @_ZNSt6vectorIhSaIhEE9push_backERKh(ptr noundef nonnull align 8 dereferenceable(24) %121, ptr noundef nonnull align 1 dereferenceable(1) %122)
          to label %123 unwind label %126

123:                                              ; preds = %.lr.ph124
  %124 = add i64 %116, %.165122
  %125 = add nuw nsw i64 %.0123, 1
  %exitcond135.not = icmp eq i64 %125, %117
  br i1 %exitcond135.not, label %._crit_edge, label %.lr.ph124, !llvm.loop !26

126:                                              ; preds = %.lr.ph124
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %128

.loopexit:                                        ; preds = %._crit_edge, %87, %80, %68
  %.4 = phi i32 [ 1, %68 ], [ 0, %80 ], [ 0, %87 ], [ 0, %._crit_edge ]
  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 %129

128:                                              ; preds = %119, %126, %83, %91, %69
  %.pn102.pn = phi { ptr, i32 } [ %70, %69 ], [ %92, %91 ], [ %84, %83 ], [ %127, %126 ], [ %120, %119 ]
  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 %130

129:                                              ; 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 %131

130:                                              ; preds = %128, %64
  %.pn102.pn.pn = phi { ptr, i32 } [ %.pn102.pn, %128 ], [ %.pn94, %64 ]
  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 %132

131:                                              ; preds = %16, %129
  %.6 = phi i32 [ %.5, %129 ], [ 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(508) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #6
  ret i32 %.6

132:                                              ; preds = %130, %17
  %.pn102.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn, %130 ], [ %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(508) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn102.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(32)) 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 200}
!8 = !{!"_ZTS12LodePNGState", !9, i64 8, !15, i64 64, !18, i64 152, !21, i64 192, !11, i64 504}
!9 = !{!"_ZTS22LodePNGDecoderSettings", !10, i64 0, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52}
!10 = !{!"_ZTS25LodePNGDecompressSettings", !11, i64 0, !11, i64 4, !14, i64 8, !14, i64 16, !14, i64 24}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"any pointer", !12, i64 0}
!15 = !{!"_ZTS22LodePNGEncoderSettings", !16, i64 0, !11, i64 48, !11, i64 52, !17, i64 56, !14, i64 64, !11, i64 72, !11, i64 76, !11, i64 80}
!16 = !{!"_ZTS23LodePNGCompressSettings", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !14, i64 24, !14, i64 32, !14, i64 40}
!17 = !{!"_ZTS21LodePNGFilterStrategy", !12, i64 0}
!18 = !{!"_ZTS16LodePNGColorMode", !19, i64 0, !11, i64 4, !14, i64 8, !20, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36}
!19 = !{!"_ZTS16LodePNGColorType", !12, i64 0}
!20 = !{!"long", !12, i64 0}
!21 = !{!"_ZTS11LodePNGInfo", !11, i64 0, !11, i64 4, !11, i64 8, !18, i64 16, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !20, i64 72, !14, i64 80, !14, i64 88, !20, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !14, 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, !14, i64 240, !14, 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: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass