; LLVM IR from ermig1979/Simd :: src/Simd/SimdBaseImageSavePpm.ll (ZN4Simd4Base13ImagePxmSaverC2ERKNS_15ImageSaverParamE)

; 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::Base::ImagePxmSaver" = type { %"class.Simd::ImageSaver", ptr, %"struct.Simd::Array", i64, i64 }
%"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 }
%"struct.Simd::Array" = type { ptr, i64 }

@_ZTVN4Simd4Base13ImagePxmSaverE = external dso_local unnamed_addr constant { [5 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__._ZN4Simd4Base13ImagePxmSaverC2ERKNS_15ImageSaverParamE = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base13ImagePxmSaverC2ERKNS_15ImageSaverParamE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %7 = load ptr, ptr %3, align 8
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4Simd10ImageSaverC2ERKNS_15ImageSaverParamE(ptr noundef nonnull align 8 dereferenceable(96) %7, ptr noundef nonnull align 8 dereferenceable(32) %8)
  store ptr getelementptr inbounds inrange(-16, 24) ({ [5 x ptr] }, ptr @_ZTVN4Simd4Base13ImagePxmSaverE, i32 0, i32 0, i32 2), ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 1
  store ptr null, ptr %9, align 8, !tbaa !11
  %10 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 2
  invoke void @_ZN4Simd5ArrayIhEC2Embm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef 0, i1 noundef zeroext false, i64 noundef 8)
          to label %11 unwind label %54

11:                                               ; preds = %2
  %12 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %13 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %12, i32 0, i32 1
  %14 = load i64, ptr %13, align 8, !tbaa !22
  %15 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 3
  store i64 %14, ptr %15, align 8, !tbaa !23
  %16 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %17 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %16, i32 0, i32 3
  %18 = load i32, ptr %17, align 4, !tbaa !24
  %19 = icmp eq i32 %18, 1
  br i1 %19, label %25, label %20

20:                                               ; preds = %11
  %21 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %22 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %21, i32 0, i32 3
  %23 = load i32, ptr %22, align 4, !tbaa !24
  %24 = icmp eq i32 %23, 2
  br i1 %24, label %25, label %63

25:                                               ; preds = %20, %11
  %26 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %27 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %26, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !25
  %29 = mul i64 %28, 1
  %30 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 4
  store i64 %29, ptr %30, align 8, !tbaa !26
  %31 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %32 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %31, i32 0, i32 2
  %33 = load i32, ptr %32, align 8, !tbaa !27
  %34 = icmp ne i32 %33, 1
  br i1 %34, label %35, label %62

35:                                               ; preds = %25
  %36 = invoke noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev()
          to label %37 unwind label %58

37:                                               ; preds = %35
  %38 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 4
  %39 = load i64, ptr %38, align 8, !tbaa !26
  %40 = udiv i64 %36, %39
  %41 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %42 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %41, i32 0, i32 1
  %43 = load i64, ptr %42, align 8, !tbaa !22
  %44 = invoke noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef %40, i64 noundef 1, i64 noundef %43)
          to label %45 unwind label %58

45:                                               ; preds = %37
  %46 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 3
  store i64 %44, ptr %46, align 8, !tbaa !23
  %47 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 2
  %48 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 3
  %49 = load i64, ptr %48, align 8, !tbaa !23
  %50 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 4
  %51 = load i64, ptr %50, align 8, !tbaa !26
  %52 = mul i64 %49, %51
  invoke void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16) %47, i64 noundef %52, i1 noundef zeroext false, i64 noundef 8)
          to label %53 unwind label %58

53:                                               ; preds = %45
  br label %62

54:                                               ; preds = %2
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %5, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %6, align 4
  br label %106

58:                                               ; preds = %93, %85, %83, %45, %37, %35
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %5, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %6, align 4
  call void @_ZN4Simd5ArrayIhED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  br label %106

62:                                               ; preds = %53, %25
  br label %105

63:                                               ; preds = %20
  %64 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %65 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %64, i32 0, i32 3
  %66 = load i32, ptr %65, align 4, !tbaa !24
  %67 = icmp eq i32 %66, 3
  br i1 %67, label %73, label %68

68:                                               ; preds = %63
  %69 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %70 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %69, i32 0, i32 3
  %71 = load i32, ptr %70, align 4, !tbaa !24
  %72 = icmp eq i32 %71, 4
  br i1 %72, label %73, label %103

73:                                               ; preds = %68, %63
  %74 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %75 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %74, i32 0, i32 0
  %76 = load i64, ptr %75, align 8, !tbaa !25
  %77 = mul i64 %76, 3
  %78 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 4
  store i64 %77, ptr %78, align 8, !tbaa !26
  %79 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %80 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %79, i32 0, i32 2
  %81 = load i32, ptr %80, align 8, !tbaa !27
  %82 = icmp ne i32 %81, 16
  br i1 %82, label %83, label %102

83:                                               ; preds = %73
  %84 = invoke noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev()
          to label %85 unwind label %58

85:                                               ; preds = %83
  %86 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 4
  %87 = load i64, ptr %86, align 8, !tbaa !26
  %88 = udiv i64 %84, %87
  %89 = getelementptr inbounds %"class.Simd::ImageSaver", ptr %7, i32 0, i32 1
  %90 = getelementptr inbounds %"struct.Simd::ImageSaverParam", ptr %89, i32 0, i32 1
  %91 = load i64, ptr %90, align 8, !tbaa !22
  %92 = invoke noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef %88, i64 noundef 1, i64 noundef %91)
          to label %93 unwind label %58

93:                                               ; preds = %85
  %94 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 3
  store i64 %92, ptr %94, align 8, !tbaa !23
  %95 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 2
  %96 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 3
  %97 = load i64, ptr %96, align 8, !tbaa !23
  %98 = getelementptr inbounds %"class.Simd::Base::ImagePxmSaver", ptr %7, i32 0, i32 4
  %99 = load i64, ptr %98, align 8, !tbaa !26
  %100 = mul i64 %97, %99
  invoke void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16) %95, i64 noundef %100, i1 noundef zeroext false, i64 noundef 8)
          to label %101 unwind label %58

101:                                              ; preds = %93
  br label %102

102:                                              ; preds = %101, %73
  br label %104

103:                                              ; preds = %68
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 57, ptr noundef @__PRETTY_FUNCTION__._ZN4Simd4Base13ImagePxmSaverC2ERKNS_15ImageSaverParamE) #6
  unreachable

104:                                              ; preds = %102
  br label %105

105:                                              ; preds = %104, %62
  ret void

106:                                              ; preds = %58, %54
  call void @_ZN4Simd10ImageSaverD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %7) #5
  br label %107

107:                                              ; preds = %106
  %108 = load ptr, ptr %5, align 8
  %109 = load i32, ptr %6, align 4
  %110 = insertvalue { ptr, i32 } poison, ptr %108, 0
  %111 = insertvalue { ptr, i32 } %110, i32 %109, 1
  resume { ptr, i32 } %111
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd10ImageSaverC2ERKNS_15ImageSaverParamE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd5ArrayIhEC2Embm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext, i64 noundef) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef, i64 noundef, i64 noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev() #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext, i64 noundef) #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { alwaysinline 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 = { noreturn 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 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 }
attributes #6 = { noreturn 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 96}
!12 = !{!"_ZTSN4Simd4Base13ImagePxmSaverE", !13, i64 0, !6, i64 96, !21, i64 104, !15, i64 120, !15, i64 128}
!13 = !{!"_ZTSN4Simd10ImageSaverE", !14, i64 8, !20, i64 40}
!14 = !{!"_ZTSN4Simd15ImageSaverParamE", !15, i64 0, !15, i64 8, !16, i64 16, !17, i64 20, !18, i64 24, !19, i64 28}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTS19SimdPixelFormatType", !7, i64 0}
!17 = !{!"_ZTS17SimdImageFileType", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTS11SimdYuvType", !7, i64 0}
!20 = !{!"_ZTSN4Simd18OutputMemoryStreamE", !15, i64 0, !6, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48}
!21 = !{!"_ZTSN4Simd5ArrayIhEE", !6, i64 0, !15, i64 8}
!22 = !{!13, !15, i64 16}
!23 = !{!12, !15, i64 120}
!24 = !{!13, !17, i64 28}
!25 = !{!13, !15, i64 8}
!26 = !{!12, !15, i64 128}
!27 = !{!13, !16, i64 24}


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

@_ZTVN4Simd4Base13ImagePxmSaverE = external dso_local unnamed_addr constant { [5 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__._ZN4Simd4Base13ImagePxmSaverC2ERKNS_15ImageSaverParamE = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base13ImagePxmSaverC2ERKNS_15ImageSaverParamE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN4Simd10ImageSaverC2ERKNS_15ImageSaverParamE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
  store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTVN4Simd4Base13ImagePxmSaverE, i64 16), ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr null, ptr %3, align 8, !tbaa !8
  %4 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN4Simd5ArrayIhEC2Embm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef 0, i1 noundef zeroext false, i64 noundef 8)
          to label %5 unwind label %17

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i64, ptr %7, align 8, !tbaa !21
  %9 = getelementptr inbounds i8, ptr %0, i64 120
  store i64 %8, ptr %9, align 8, !tbaa !22
  %10 = getelementptr inbounds i8, ptr %0, i64 28
  %11 = load i32, ptr %10, align 4, !tbaa !23
  switch i32 %11, label %34 [
    i32 1, label %12
    i32 2, label %12
    i32 3, label %21
    i32 4, label %21
  ]

12:                                               ; preds = %5, %5
  %13 = load i64, ptr %6, align 8, !tbaa !24
  %14 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 %13, ptr %14, align 8, !tbaa !25
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load i32, ptr %15, align 8, !tbaa !26
  %.not5 = icmp eq i32 %16, 1
  br i1 %.not5, label %35, label %.invoke

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

19:                                               ; preds = %.invoke
  %20 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN4Simd5ArrayIhED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %36

21:                                               ; preds = %5, %5
  %22 = load i64, ptr %6, align 8, !tbaa !24
  %23 = mul i64 %22, 3
  %24 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 %23, ptr %24, align 8, !tbaa !25
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  %26 = load i32, ptr %25, align 8, !tbaa !26
  %.not = icmp eq i32 %26, 16
  br i1 %.not, label %35, label %.invoke

.invoke:                                          ; preds = %21, %12
  %.sink12 = phi ptr [ %14, %12 ], [ %24, %21 ]
  %27 = tail call noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev()
  %28 = load i64, ptr %.sink12, align 8, !tbaa !25
  %29 = udiv i64 %27, %28
  %30 = load i64, ptr %7, align 8, !tbaa !21
  %31 = tail call noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef %29, i64 noundef 1, i64 noundef %30)
  store i64 %31, ptr %9, align 8, !tbaa !22
  %32 = load i64, ptr %.sink12, align 8, !tbaa !25
  %33 = mul i64 %32, %31
  invoke void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %33, i1 noundef zeroext false, i64 noundef 8)
          to label %35 unwind label %19

34:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 57, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4Simd4Base13ImagePxmSaverC2ERKNS_15ImageSaverParamE) #6
  unreachable

35:                                               ; preds = %.invoke, %21, %12
  ret void

36:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  tail call void @_ZN4Simd10ImageSaverD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %0) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd10ImageSaverC2ERKNS_15ImageSaverParamE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd5ArrayIhEC2Embm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext, i64 noundef) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev() local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { alwaysinline 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 = { noreturn 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 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 }
attributes #6 = { noreturn 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !19, i64 96}
!9 = !{!"_ZTSN4Simd4Base13ImagePxmSaverE", !10, i64 0, !19, i64 96, !20, i64 104, !12, i64 120, !12, i64 128}
!10 = !{!"_ZTSN4Simd10ImageSaverE", !11, i64 8, !18, i64 40}
!11 = !{!"_ZTSN4Simd15ImageSaverParamE", !12, i64 0, !12, i64 8, !14, i64 16, !15, i64 20, !16, i64 24, !17, i64 28}
!12 = !{!"long", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"_ZTS19SimdPixelFormatType", !13, i64 0}
!15 = !{!"_ZTS17SimdImageFileType", !13, i64 0}
!16 = !{!"int", !13, i64 0}
!17 = !{!"_ZTS11SimdYuvType", !13, i64 0}
!18 = !{!"_ZTSN4Simd18OutputMemoryStreamE", !12, i64 0, !19, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48}
!19 = !{!"any pointer", !13, i64 0}
!20 = !{!"_ZTSN4Simd5ArrayIhEE", !19, i64 0, !12, i64 8}
!21 = !{!10, !12, i64 16}
!22 = !{!9, !12, i64 120}
!23 = !{!10, !15, i64 28}
!24 = !{!10, !12, i64 8}
!25 = !{!9, !12, i64 128}
!26 = !{!10, !14, i64 24}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass