; LLVM IR from ermig1979/Simd :: src/Simd/SimdBaseImageSavePng.ll (ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.Simd::ImageSaver" = type { ptr, %"struct.Simd::ImageSaverParam", %"class.Simd::OutputMemoryStream" }
%"struct.Simd::ImageSaverParam" = type { i64, i64, i32, i32, i32, i32 }
%"class.Simd::OutputMemoryStream" = type { i64, ptr, i64, i64, i64, i64, i64 }
%"class.Simd::Base::ImagePngSaver" = type { %"class.Simd::ImageSaver", ptr, [7 x ptr], ptr, i64, i64, %"struct.Simd::Array.0", %"struct.Simd::Array.0", %"struct.Simd::Array.1" }
%"struct.Simd::Array.0" = type { ptr, i64 }
%"struct.Simd::Array.1" = type { ptr, i64 }

@__const._ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm.SIGNATURE = external hidden unnamed_addr constant [8 x i8], align 1
@__const._ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm.CTYPE = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1

; 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1, i64 noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca [8 x i8], align 1
  %8 = alloca [5 x i8], align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  %14 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %7, ptr align 1 @__const._ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm.SIGNATURE, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %8) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %8, ptr align 1 @__const._ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm.CTYPE, i64 5, i1 false)
  %15 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  %16 = load i64, ptr %6, align 8, !tbaa !9
  %17 = add i64 45, %16
  %18 = add i64 %17, 12
  call void @_ZN4Simd18OutputMemoryStream7ReserveEm(ptr noundef nonnull align 8 dereferenceable(56) %15, i64 noundef %18)
  %19 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  %20 = getelementptr inbounds [8 x i8], ptr %7, i64 0, i64 0
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %19, ptr noundef %20, i64 noundef 8)
  %21 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 13, ptr %9, align 4, !tbaa !11
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %22 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef @.str.3, i64 noundef 4)
  %23 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %24 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 1
  %25 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %24, i32 0, i32 0
  %26 = load i64, ptr %25, align 8, !tbaa !13
  %27 = trunc i64 %26 to i32
  store i32 %27, ptr %10, align 4, !tbaa !11
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %28 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %29 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 1
  %30 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %29, i32 0, i32 1
  %31 = load i64, ptr %30, align 8, !tbaa !20
  %32 = trunc i64 %31 to i32
  store i32 %32, ptr %11, align 4, !tbaa !11
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %28, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %33 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %33, i8 noundef zeroext 8)
  %34 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  %35 = getelementptr inbounds %"class.Simd::Base::ImagePngSaver", ptr %14, i32 0, i32 4
  %36 = load i64, ptr %35, align 8, !tbaa !21
  %37 = getelementptr inbounds [5 x i8], ptr %8, i64 0, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !25
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %34, i8 noundef zeroext %38)
  %39 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %39, i8 noundef zeroext 0)
  %40 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %40, i8 noundef zeroext 0)
  %41 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %41, i8 noundef zeroext 0)
  %42 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd4Base10WriteCrc32ERNS_18OutputMemoryStreamEm(ptr noundef nonnull align 8 dereferenceable(56) %42, i64 noundef 13)
  %43 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %44 = load i64, ptr %6, align 8, !tbaa !9
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %12, align 4, !tbaa !11
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %46 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef @.str.4, i64 noundef 4)
  %47 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %47, ptr noundef %48, i64 noundef %49)
  %50 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  %51 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN4Simd4Base10WriteCrc32ERNS_18OutputMemoryStreamEm(ptr noundef nonnull align 8 dereferenceable(56) %50, i64 noundef %51)
  %52 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !11
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %52, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %53 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %53, ptr noundef @.str.5, i64 noundef 4)
  %54 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %14, i32 0, i32 2
  call void @_ZN4Simd4Base10WriteCrc32ERNS_18OutputMemoryStreamEm(ptr noundef nonnull align 8 dereferenceable(56) %54, i64 noundef 0)
  call void @llvm.lifetime.end.p0(i64 5, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret void
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd18OutputMemoryStream7ReserveEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i64 noundef) #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56), i8 noundef zeroext) #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4Base10WriteCrc32ERNS_18OutputMemoryStreamEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #2

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

!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, !10, i64 8}
!14 = !{!"_ZTSN4Simd10ImageSaverE", !15, i64 8, !19, i64 40}
!15 = !{!"_ZTSN4Simd15ImageSaverParamE", !10, i64 0, !10, i64 8, !16, i64 16, !17, i64 20, !12, i64 24, !18, i64 28}
!16 = !{!"_ZTS19SimdPixelFormatType", !7, i64 0}
!17 = !{!"_ZTS17SimdImageFileType", !7, i64 0}
!18 = !{!"_ZTS11SimdYuvType", !7, i64 0}
!19 = !{!"_ZTSN4Simd18OutputMemoryStreamE", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!20 = !{!14, !10, i64 16}
!21 = !{!22, !10, i64 168}
!22 = !{!"_ZTSN4Simd4Base13ImagePngSaverE", !14, i64 0, !6, i64 96, !7, i64 104, !6, i64 160, !10, i64 168, !10, i64 176, !23, i64 184, !23, i64 200, !24, i64 216}
!23 = !{!"_ZTSN4Simd5ArrayIhEE", !6, i64 0, !10, i64 8}
!24 = !{!"_ZTSN4Simd5ArrayIaEE", !6, i64 0, !10, i64 8}
!25 = !{!7, !7, i64 0}


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

@__const._ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm.SIGNATURE = external hidden unnamed_addr constant [8 x i8], align 1
@__const._ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm.CTYPE = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #2 align 2 {
  %4 = alloca [8 x i8], align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %10 = load i64, ptr @__const._ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm.SIGNATURE, align 1
  store i64 %10, ptr %4, align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  %12 = add i64 %2, 57
  tail call void @_ZN4Simd18OutputMemoryStream7ReserveEm(ptr noundef nonnull align 8 dereferenceable(56) %11, i64 noundef %12)
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull %4, i64 noundef 8)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  store i32 13, ptr %5, align 4, !tbaa !5
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull @.str.3, i64 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i64, ptr %13, align 8, !tbaa !9
  %15 = trunc i64 %14 to i32
  store i32 %15, ptr %6, align 4, !tbaa !5
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load i64, ptr %16, align 8, !tbaa !18
  %18 = trunc i64 %17 to i32
  store i32 %18, ptr %7, align 4, !tbaa !5
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %11, i8 noundef zeroext 8)
  %19 = getelementptr inbounds i8, ptr %0, i64 168
  %20 = load i64, ptr %19, align 8, !tbaa !19
  %21 = getelementptr inbounds [5 x i8], ptr @__const._ZN4Simd4Base13ImagePngSaver13WriteToStreamEPKhm.CTYPE, i64 0, i64 %20
  %22 = load i8, ptr %21, align 1, !tbaa !23
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %11, i8 noundef zeroext %22)
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %11, i8 noundef zeroext 0)
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %11, i8 noundef zeroext 0)
  call void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56) %11, i8 noundef zeroext 0)
  call void @_ZN4Simd4Base10WriteCrc32ERNS_18OutputMemoryStreamEm(ptr noundef nonnull align 8 dereferenceable(56) %11, i64 noundef 13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  %23 = trunc i64 %2 to i32
  store i32 %23, ptr %8, align 4, !tbaa !5
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull @.str.4, i64 noundef 4)
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef %1, i64 noundef %2)
  call void @_ZN4Simd4Base10WriteCrc32ERNS_18OutputMemoryStreamEm(ptr noundef nonnull align 8 dereferenceable(56) %11, i64 noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @_ZN4Simd18OutputMemoryStream10WriteBe32uERKj(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  call void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull @.str.5, i64 noundef 4)
  call void @_ZN4Simd4Base10WriteCrc32ERNS_18OutputMemoryStreamEm(ptr noundef nonnull align 8 dereferenceable(56) %11, i64 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret void
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd18OutputMemoryStream7ReserveEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd18OutputMemoryStream5WriteEPKvm(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd18OutputMemoryStream7Write8uEh(ptr noundef nonnull align 8 dereferenceable(56), i8 noundef zeroext) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4Base10WriteCrc32ERNS_18OutputMemoryStreamEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline 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 #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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTSN4Simd10ImageSaverE", !11, i64 8, !16, i64 40}
!11 = !{!"_ZTSN4Simd15ImageSaverParamE", !12, i64 0, !12, i64 8, !13, i64 16, !14, i64 20, !6, i64 24, !15, i64 28}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTS19SimdPixelFormatType", !7, i64 0}
!14 = !{!"_ZTS17SimdImageFileType", !7, i64 0}
!15 = !{!"_ZTS11SimdYuvType", !7, i64 0}
!16 = !{!"_ZTSN4Simd18OutputMemoryStreamE", !12, i64 0, !17, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!10, !12, i64 16}
!19 = !{!20, !12, i64 168}
!20 = !{!"_ZTSN4Simd4Base13ImagePngSaverE", !10, i64 0, !17, i64 96, !7, i64 104, !17, i64 160, !12, i64 168, !12, i64 176, !21, i64 184, !21, i64 200, !22, i64 216}
!21 = !{!"_ZTSN4Simd5ArrayIhEE", !17, i64 0, !12, i64 8}
!22 = !{!"_ZTSN4Simd5ArrayIaEE", !17, i64 0, !12, i64 8}
!23 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass