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

; 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.ZopfliPNGOptions = type { i8, i8, i8, %"class.std::vector", i8, %"class.std::vector.0", i8, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl" }
%"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl" = type { %"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<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.18" = type { i8 }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.10" = type { i8 }
%struct.CZopfliPNGOptions = type { i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32 }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z17ZopfliPNGOptimizeRKSt6vectorIhSaIhEERK16ZopfliPNGOptionsbPS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext, ptr noundef) #2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @CZopfliPNGOptimize(ptr noundef %0, i64 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5) #2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.ZopfliPNGOptions, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.18", align 1
  %21 = alloca %"class.std::vector.8", align 8
  %22 = alloca %"class.std::allocator.10", align 1
  %23 = alloca %"class.std::vector.8", align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !11
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #6
  call void @_ZN16ZopfliPNGOptionsC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %14)
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = icmp ne i32 %28, 0
  %30 = xor i1 %29, true
  %31 = xor i1 %30, true
  %32 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 1
  %33 = zext i1 %31 to i8
  store i8 %33, ptr %32, align 1, !tbaa !15
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !26
  %37 = icmp ne i32 %36, 0
  %38 = xor i1 %37, true
  %39 = xor i1 %38, true
  %40 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 2
  %41 = zext i1 %39 to i8
  store i8 %41, ptr %40, align 2, !tbaa !27
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %42, i32 0, i32 4
  %44 = load i32, ptr %43, align 4, !tbaa !28
  %45 = icmp ne i32 %44, 0
  %46 = xor i1 %45, true
  %47 = xor i1 %46, true
  %48 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 4
  %49 = zext i1 %47 to i8
  store i8 %49, ptr %48, align 8, !tbaa !29
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %50, i32 0, i32 7
  %52 = load i32, ptr %51, align 4, !tbaa !30
  %53 = icmp ne i32 %52, 0
  %54 = xor i1 %53, true
  %55 = xor i1 %54, true
  %56 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 6
  %57 = zext i1 %55 to i8
  store i8 %57, ptr %56, align 8, !tbaa !31
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %58, i32 0, i32 8
  %60 = load i32, ptr %59, align 8, !tbaa !32
  %61 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 7
  store i32 %60, ptr %61, align 4, !tbaa !33
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %62, i32 0, i32 9
  %64 = load i32, ptr %63, align 4, !tbaa !34
  %65 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 8
  store i32 %64, ptr %65, align 8, !tbaa !35
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %66, i32 0, i32 10
  %68 = load i32, ptr %67, align 8, !tbaa !36
  %69 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 9
  store i32 %68, ptr %69, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %70

70:                                               ; preds = %86, %6
  %71 = load i32, ptr %15, align 4, !tbaa !11
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %72, i32 0, i32 3
  %74 = load i32, ptr %73, align 8, !tbaa !38
  %75 = icmp slt i32 %71, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %93

77:                                               ; preds = %70
  %78 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 3
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !39
  %82 = load i32, ptr %15, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %81, i64 %83
  invoke void @_ZNSt6vectorI23ZopfliPNGFilterStrategySaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %78, ptr noundef nonnull align 4 dereferenceable(4) %84)
          to label %85 unwind label %89

85:                                               ; preds = %77
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %15, align 4, !tbaa !11
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %15, align 4, !tbaa !11
  br label %70, !llvm.loop !40

89:                                               ; preds = %77
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %16, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %166

93:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %94

94:                                               ; preds = %112, %93
  %95 = load i32, ptr %18, align 4, !tbaa !11
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %96, i32 0, i32 6
  %98 = load i32, ptr %97, align 8, !tbaa !42
  %99 = icmp slt i32 %95, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %124

101:                                              ; preds = %94
  %102 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %14, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.CZopfliPNGOptions, ptr %103, i32 0, i32 5
  %105 = load ptr, ptr %104, align 8, !tbaa !43
  %106 = load i32, ptr %18, align 4, !tbaa !11
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds ptr, ptr %105, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  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 %109, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %110 unwind label %115

110:                                              ; preds = %101
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %102, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %111 unwind label %119

111:                                              ; preds = %110
  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 label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %18, align 4, !tbaa !11
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %18, align 4, !tbaa !11
  br label %94, !llvm.loop !44

115:                                              ; preds = %101
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %16, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %17, align 4
  br label %123

119:                                              ; preds = %110
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %16, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %123

123:                                              ; preds = %119, %115
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %166

124:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = load i64, ptr %9, align 8, !tbaa !9
  %128 = getelementptr inbounds i8, ptr %126, i64 %127
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  invoke void @_ZNSt6vectorIhSaIhEEC2IPKhvEET_S5_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef %125, ptr noundef %128, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %129 unwind label %140

129:                                              ; preds = %124
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %130 = load i32, ptr %11, align 4, !tbaa !11
  %131 = icmp ne i32 %130, 0
  %132 = xor i1 %131, true
  %133 = xor i1 %132, true
  %134 = invoke noundef i32 @_Z17ZopfliPNGOptimizeRKSt6vectorIhSaIhEERK16ZopfliPNGOptionsbPS1_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(80) %14, i1 noundef zeroext %133, ptr noundef %23)
          to label %135 unwind label %144

135:                                              ; preds = %129
  store i32 %134, ptr %24, align 4, !tbaa !11
  %136 = load i32, ptr %24, align 4, !tbaa !11
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %148

138:                                              ; preds = %135
  %139 = load i32, ptr %24, align 4, !tbaa !11
  store i32 %139, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %163

140:                                              ; preds = %124
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %16, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %17, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  br label %165

144:                                              ; preds = %129
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %16, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  br label %165

148:                                              ; preds = %135
  %149 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 %149, ptr %150, align 8, !tbaa !9
  %151 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %152 = call noalias ptr @malloc(i64 noundef %151) #7
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %152, ptr %153, align 8, !tbaa !5
  %154 = load ptr, ptr %12, align 8, !tbaa !5
  %155 = load ptr, ptr %154, align 8, !tbaa !5
  %156 = icmp ne ptr %155, null
  br i1 %156, label %158, label %157

157:                                              ; preds = %148
  store i32 12, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %163

158:                                              ; preds = %148
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  %160 = load ptr, ptr %159, align 8, !tbaa !5
  %161 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef 0) #6
  %162 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %160, ptr align 1 %161, i64 %162, i1 false)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %25, align 4
  br label %163

163:                                              ; preds = %158, %157, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  call void @_ZN16ZopfliPNGOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #6
  %164 = load i32, ptr %7, align 4
  ret i32 %164

165:                                              ; preds = %144, %140
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %166

166:                                              ; preds = %165, %123, %89
  call void @_ZN16ZopfliPNGOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #6
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %16, align 8
  %169 = load i32, ptr %17, align 4
  %170 = insertvalue { ptr, i32 } poison, ptr %168, 0
  %171 = insertvalue { ptr, i32 } %170, i32 %169, 1
  resume { ptr, i32 } %171
}

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

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

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

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

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

declare void @_ZN16ZopfliPNGOptionsC1Ev(ptr)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTS17CZopfliPNGOptions", !12, i64 0, !12, i64 4, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48}
!15 = !{!16, !17, i64 1}
!16 = !{!"_ZTS16ZopfliPNGOptions", !17, i64 0, !17, i64 1, !17, i64 2, !18, i64 8, !17, i64 32, !22, i64 40, !17, i64 64, !12, i64 68, !12, i64 72, !12, i64 76}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSSt6vectorI23ZopfliPNGFilterStrategySaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!14, !12, i64 4}
!27 = !{!16, !17, i64 2}
!28 = !{!14, !12, i64 20}
!29 = !{!16, !17, i64 32}
!30 = !{!14, !12, i64 36}
!31 = !{!16, !17, i64 64}
!32 = !{!14, !12, i64 40}
!33 = !{!16, !12, i64 68}
!34 = !{!14, !12, i64 44}
!35 = !{!16, !12, i64 72}
!36 = !{!14, !12, i64 48}
!37 = !{!16, !12, i64 76}
!38 = !{!14, !12, i64 16}
!39 = !{!14, !6, i64 8}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!14, !12, i64 32}
!43 = !{!14, !6, i64 24}
!44 = distinct !{!44, !41}


; 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.ZopfliPNGOptions = type { i8, i8, i8, %"class.std::vector", i8, %"class.std::vector.0", i8, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl" }
%"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl" = type { %"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<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.18" = type { i8 }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.10" = type { i8 }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z17ZopfliPNGOptimizeRKSt6vectorIhSaIhEERK16ZopfliPNGOptionsbPS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext, ptr noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @CZopfliPNGOptimize(ptr noundef %0, i64 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %struct.ZopfliPNGOptions, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.18", align 1
  %10 = alloca %"class.std::vector.8", align 8
  %11 = alloca %"class.std::allocator.10", align 1
  %12 = alloca %"class.std::vector.8", align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #6
  call void @_ZN16ZopfliPNGOptionsC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %7)
  %13 = load i32, ptr %2, align 8, !tbaa !5
  %14 = icmp ne i32 %13, 0
  %15 = getelementptr inbounds i8, ptr %7, i64 1
  %16 = zext i1 %14 to i8
  store i8 %16, ptr %15, align 1, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %2, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !22
  %19 = icmp ne i32 %18, 0
  %20 = getelementptr inbounds i8, ptr %7, i64 2
  %21 = zext i1 %19 to i8
  store i8 %21, ptr %20, align 2, !tbaa !23
  %22 = getelementptr inbounds i8, ptr %2, i64 20
  %23 = load i32, ptr %22, align 4, !tbaa !24
  %24 = icmp ne i32 %23, 0
  %25 = getelementptr inbounds i8, ptr %7, i64 32
  %26 = zext i1 %24 to i8
  store i8 %26, ptr %25, align 8, !tbaa !25
  %27 = getelementptr inbounds i8, ptr %2, i64 36
  %28 = load i32, ptr %27, align 4, !tbaa !26
  %29 = icmp ne i32 %28, 0
  %30 = getelementptr inbounds i8, ptr %7, i64 64
  %31 = zext i1 %29 to i8
  store i8 %31, ptr %30, align 8, !tbaa !27
  %32 = getelementptr inbounds i8, ptr %2, i64 40
  %33 = getelementptr inbounds i8, ptr %7, i64 68
  %34 = load <2 x i32>, ptr %32, align 8, !tbaa !28
  store <2 x i32> %34, ptr %33, align 4, !tbaa !28
  %35 = getelementptr inbounds i8, ptr %2, i64 48
  %36 = load i32, ptr %35, align 8, !tbaa !29
  %37 = getelementptr inbounds i8, ptr %7, i64 76
  store i32 %36, ptr %37, align 4, !tbaa !30
  %38 = getelementptr inbounds i8, ptr %2, i64 16
  %39 = load i32, ptr %38, align 8, !tbaa !31
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %6
  %41 = getelementptr inbounds i8, ptr %7, i64 8
  %42 = getelementptr inbounds i8, ptr %2, i64 8
  br label %48

.preheader:                                       ; preds = %51, %6
  %43 = getelementptr inbounds i8, ptr %2, i64 32
  %44 = load i32, ptr %43, align 8, !tbaa !32
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph45, label %._crit_edge

.lr.ph45:                                         ; preds = %.preheader
  %46 = getelementptr inbounds i8, ptr %2, i64 24
  %47 = getelementptr inbounds i8, ptr %7, i64 40
  br label %58

48:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %49 = load ptr, ptr %42, align 8, !tbaa !33
  %50 = getelementptr inbounds i32, ptr %49, i64 %indvars.iv
  invoke void @_ZNSt6vectorI23ZopfliPNGFilterStrategySaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %51 unwind label %55

51:                                               ; preds = %48
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = load i32, ptr %38, align 8, !tbaa !31
  %53 = sext i32 %52 to i64
  %54 = icmp slt i64 %indvars.iv.next, %53
  br i1 %54, label %48, label %.preheader, !llvm.loop !34

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

._crit_edge:                                      ; preds = %63, %.preheader
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %57 = getelementptr inbounds i8, ptr %0, i64 %1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt6vectorIhSaIhEEC2IPKhvEET_S5_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef %0, ptr noundef %57, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %72 unwind label %76

58:                                               ; preds = %.lr.ph45, %63
  %indvars.iv47 = phi i64 [ 0, %.lr.ph45 ], [ %indvars.iv.next48, %63 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %59 = load ptr, ptr %46, align 8, !tbaa !36
  %60 = getelementptr inbounds ptr, ptr %59, i64 %indvars.iv47
  %61 = load ptr, ptr %60, align 8, !tbaa !37
  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 %61, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %62 unwind label %67

62:                                               ; preds = %58
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %63 unwind label %69

63:                                               ; preds = %62
  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
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %64 = load i32, ptr %43, align 8, !tbaa !32
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %indvars.iv.next48, %65
  br i1 %66, label %58, label %._crit_edge, !llvm.loop !38

67:                                               ; preds = %58
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %62
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %71

71:                                               ; preds = %69, %67
  %.pn39 = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ]
  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 %89

72:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIhED2Ev(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.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %73 = icmp ne i32 %3, 0
  %74 = invoke noundef i32 @_Z17ZopfliPNGOptimizeRKSt6vectorIhSaIhEERK16ZopfliPNGOptionsbPS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(80) %7, i1 noundef zeroext %73, ptr noundef nonnull %12)
          to label %75 unwind label %78

75:                                               ; preds = %72
  %.not = icmp eq i32 %74, 0
  br i1 %.not, label %80, label %87

76:                                               ; preds = %._crit_edge
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br label %88

78:                                               ; preds = %72
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %88

80:                                               ; preds = %75
  %81 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  store i64 %81, ptr %5, align 8, !tbaa !39
  %82 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %83 = call noalias ptr @malloc(i64 noundef %82) #7
  store ptr %83, ptr %4, align 8, !tbaa !37
  %.not38 = icmp eq ptr %83, null
  br i1 %.not38, label %87, label %84

84:                                               ; preds = %80
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #6
  %86 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %83, ptr nonnull align 1 %85, i64 %86, i1 false)
  br label %87

87:                                               ; preds = %80, %75, %84
  %.0 = phi i32 [ 0, %84 ], [ %74, %75 ], [ 12, %80 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZN16ZopfliPNGOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #6
  ret i32 %.0

88:                                               ; preds = %78, %76
  %.pn = phi { ptr, i32 } [ %79, %78 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %89

89:                                               ; preds = %88, %71, %55
  %.pn41 = phi { ptr, i32 } [ %56, %55 ], [ %.pn39, %71 ], [ %.pn, %88 ]
  call void @_ZN16ZopfliPNGOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #6
  resume { ptr, i32 } %.pn41
}

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5

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

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

declare void @_ZN16ZopfliPNGOptionsC1Ev(ptr) local_unnamed_addr

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS17CZopfliPNGOptions", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16, !7, i64 20, !10, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !13, i64 1}
!12 = !{!"_ZTS16ZopfliPNGOptions", !13, i64 0, !13, i64 1, !13, i64 2, !14, i64 8, !13, i64 32, !18, i64 40, !13, i64 64, !7, i64 68, !7, i64 72, !7, i64 76}
!13 = !{!"bool", !8, i64 0}
!14 = !{!"_ZTSSt6vectorI23ZopfliPNGFilterStrategySaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!18 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!6, !7, i64 4}
!23 = !{!12, !13, i64 2}
!24 = !{!6, !7, i64 20}
!25 = !{!12, !13, i64 32}
!26 = !{!6, !7, i64 36}
!27 = !{!12, !13, i64 64}
!28 = !{!7, !7, i64 0}
!29 = !{!6, !7, i64 48}
!30 = !{!12, !7, i64 76}
!31 = !{!6, !7, i64 16}
!32 = !{!6, !7, i64 32}
!33 = !{!6, !10, i64 8}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!6, !10, i64 24}
!37 = !{!10, !10, i64 0}
!38 = distinct !{!38, !35}
!39 = !{!40, !40, i64 0}
!40 = !{!"long", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass