; LLVM IR from ermig1979/Simd :: src/Simd (SimdBaseImageLoadJpeg)

; 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::ImageJpegLoader" = type { %"class.Simd::ImageLoader", ptr }
%"class.Simd::ImageLoader" = type { ptr, %"struct.Simd::ImageLoaderParam", %"class.Simd::InputMemoryStream", %"struct.Simd::View" }
%"struct.Simd::ImageLoaderParam" = type { ptr, i64, i32, i32 }
%"class.Simd::InputMemoryStream" = type { ptr, i64, i64, i64, i64 }
%"struct.Simd::View" = type <{ i64, i64, i64, i32, [4 x i8], ptr, i8, [7 x i8] }>
%"struct.Simd::Base::JpegContext" = type { ptr, i32, i32, i32, i32, [4 x %"struct.Simd::Base::JpegHuffman"], [4 x %"struct.Simd::Base::JpegHuffman"], [4 x [64 x i16]], i32, i32, i32, i32, i32, i32, [4 x %"struct.Simd::Base::JpegImgComp"], i32, i32, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i32], i32, i32, %"struct.Simd::Array", ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.Simd::Base::JpegHuffman" = type { [512 x i8], [256 x i16], [256 x i8], [257 x i8], [18 x i32], [17 x i32], [512 x i16] }
%"struct.Simd::Base::JpegImgComp" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %"struct.Simd::Array", %"struct.Simd::Array", ptr, %"struct.Simd::Array.0", ptr, i32, i32 }
%"struct.Simd::Array.0" = type { ptr, i64 }
%"struct.Simd::Array" = type { ptr, i64 }

@_ZTVN4Simd4Base15ImageJpegLoaderE = external dso_local unnamed_addr constant { [5 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd4Base16JpegYuv420pToBgrEPKhmS2_mS2_mmmPhm11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN4Simd4BaseL18JpegResampleRowHv2EPhPKhS3_ii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd4Base16JpegYuv420pToRgbEPKhmS2_mS2_mmmPhm11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd4Base17JpegYuv420pToBgraEPKhmS2_mS2_mmmPhmh11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd4Base17JpegYuv420pToRgbaEPKhmS2_mS2_mmmPhmh11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext, i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base15ImageJpegLoaderC2ERKNS_16ImageLoaderParamE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(24) %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 @_ZN4Simd11ImageLoaderC2ERKNS_16ImageLoaderParamE(ptr noundef nonnull align 8 dereferenceable(120) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
  store ptr getelementptr inbounds inrange(-16, 24) ({ [5 x ptr] }, ptr @_ZTVN4Simd4Base15ImageJpegLoaderE, i32 0, i32 0, i32 2), ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %10 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 22832) #5
          to label %11 unwind label %30

11:                                               ; preds = %2
  %12 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %7, i32 0, i32 2
  invoke void @_ZN4Simd4Base11JpegContextC1EPNS_17InputMemoryStreamE(ptr noundef nonnull align 8 dereferenceable(22832) %10, ptr noundef %12)
          to label %13 unwind label %34

13:                                               ; preds = %11
  store ptr %10, ptr %9, align 8, !tbaa !11
  %14 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %15, i32 0, i32 33
  store ptr @_ZN4Simd4BaseL13JpegIdctBlockEPKsPhi, ptr %16, align 8, !tbaa !22
  %17 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %18, i32 0, i32 34
  store ptr @_ZN4Simd4BaseL18JpegResampleRowHv2EPhPKhS3_ii, ptr %19, align 8, !tbaa !26
  %20 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %21, i32 0, i32 35
  store ptr @_ZN4Simd4BaseL15JpegYuvToRgbRowEPhPKhS3_S3_ii, ptr %22, align 8, !tbaa !27
  %23 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %7, i32 0, i32 1
  %24 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %23, i32 0, i32 3
  %25 = load i32, ptr %24, align 4, !tbaa !28
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %38

27:                                               ; preds = %13
  %28 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %7, i32 0, i32 1
  %29 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %28, i32 0, i32 3
  store i32 16, ptr %29, align 4, !tbaa !28
  br label %38

30:                                               ; preds = %2
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %5, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %6, align 4
  br label %105

34:                                               ; preds = %11
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %5, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %10, i64 noundef 22832) #6
  br label %105

38:                                               ; preds = %27, %13
  %39 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %7, i32 0, i32 1
  %40 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %39, i32 0, i32 3
  %41 = load i32, ptr %40, align 4, !tbaa !28
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %43, label %47

43:                                               ; preds = %38
  %44 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %45, i32 0, i32 40
  store ptr @_ZN4Simd4Base10RgbaToGrayEPKhmmmPhm, ptr %46, align 8, !tbaa !29
  br label %47

47:                                               ; preds = %43, %38
  %48 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %7, i32 0, i32 1
  %49 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %48, i32 0, i32 3
  %50 = load i32, ptr %49, align 4, !tbaa !28
  %51 = icmp eq i32 %50, 3
  br i1 %51, label %52, label %62

52:                                               ; preds = %47
  %53 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %54, i32 0, i32 36
  store ptr @_ZN4Simd4Base14Yuv444pToBgrV2EPKhmS2_mS2_mmmPhm11SimdYuvType, ptr %55, align 8, !tbaa !30
  %56 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !11
  %58 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %57, i32 0, i32 37
  store ptr @_ZN4Simd4Base16JpegYuv420pToBgrEPKhmS2_mS2_mmmPhm11SimdYuvType, ptr %58, align 8, !tbaa !31
  %59 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %60, i32 0, i32 40
  store ptr @_ZN4Simd4Base9BgraToRgbEPKhmmmPhm, ptr %61, align 8, !tbaa !29
  br label %62

62:                                               ; preds = %52, %47
  %63 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %7, i32 0, i32 1
  %64 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %63, i32 0, i32 3
  %65 = load i32, ptr %64, align 4, !tbaa !28
  %66 = icmp eq i32 %65, 4
  br i1 %66, label %67, label %77

67:                                               ; preds = %62
  %68 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %69, i32 0, i32 38
  store ptr @_ZN4Simd4Base15Yuv444pToBgraV2EPKhmS2_mS2_mmmPhmh11SimdYuvType, ptr %70, align 8, !tbaa !32
  %71 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %72, i32 0, i32 39
  store ptr @_ZN4Simd4Base17JpegYuv420pToBgraEPKhmS2_mS2_mmmPhmh11SimdYuvType, ptr %73, align 8, !tbaa !33
  %74 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %75, i32 0, i32 40
  store ptr @_ZN4Simd4Base10BgraToRgbaEPKhmmmPhm, ptr %76, align 8, !tbaa !29
  br label %77

77:                                               ; preds = %67, %62
  %78 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %7, i32 0, i32 1
  %79 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %78, i32 0, i32 3
  %80 = load i32, ptr %79, align 4, !tbaa !28
  %81 = icmp eq i32 %80, 16
  br i1 %81, label %82, label %92

82:                                               ; preds = %77
  %83 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %84, i32 0, i32 36
  store ptr @_ZN4Simd4Base14Yuv444pToRgbV2EPKhmS2_mS2_mmmPhm11SimdYuvType, ptr %85, align 8, !tbaa !30
  %86 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  %88 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %87, i32 0, i32 37
  store ptr @_ZN4Simd4Base16JpegYuv420pToRgbEPKhmS2_mS2_mmmPhm11SimdYuvType, ptr %88, align 8, !tbaa !31
  %89 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !11
  %91 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %90, i32 0, i32 40
  store ptr @_ZN4Simd4Base9BgraToBgrEPKhmmmPhm, ptr %91, align 8, !tbaa !29
  br label %92

92:                                               ; preds = %82, %77
  %93 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %7, i32 0, i32 1
  %94 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %93, i32 0, i32 3
  %95 = load i32, ptr %94, align 4, !tbaa !28
  %96 = icmp eq i32 %95, 17
  br i1 %96, label %97, label %104

97:                                               ; preds = %92
  %98 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %99, i32 0, i32 38
  store ptr @_ZN4Simd4Base15Yuv444pToRgbaV2EPKhmS2_mS2_mmmPhmh11SimdYuvType, ptr %100, align 8, !tbaa !32
  %101 = getelementptr inbounds %"class.Simd::Base::ImageJpegLoader", ptr %7, i32 0, i32 1
  %102 = load ptr, ptr %101, align 8, !tbaa !11
  %103 = getelementptr inbounds %"struct.Simd::Base::JpegContext", ptr %102, i32 0, i32 39
  store ptr @_ZN4Simd4Base17JpegYuv420pToRgbaEPKhmS2_mS2_mmmPhmh11SimdYuvType, ptr %103, align 8, !tbaa !33
  br label %104

104:                                              ; preds = %97, %92
  ret void

105:                                              ; preds = %34, %30
  call void @_ZN4Simd11ImageLoaderD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %7) #7
  br label %106

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4Simd4BaseL13JpegIdctBlockEPKsPhi(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4Simd4BaseL15JpegYuvToRgbRowEPhPKhS3_S3_ii(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #0

declare void @_ZN4Simd4Base10RgbaToGrayEPKhmmmPhm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #4

declare void @_ZN4Simd4Base14Yuv444pToBgrV2EPKhmS2_mS2_mmmPhm11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #4

declare void @_ZN4Simd4Base9BgraToRgbEPKhmmmPhm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #4

declare void @_ZN4Simd4Base15Yuv444pToBgraV2EPKhmS2_mS2_mmmPhmh11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext, i32 noundef) #4

declare void @_ZN4Simd4Base10BgraToRgbaEPKhmmmPhm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #4

declare void @_ZN4Simd4Base14Yuv444pToRgbV2EPKhmS2_mS2_mmmPhm11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #4

declare void @_ZN4Simd4Base9BgraToBgrEPKhmmmPhm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #4

declare void @_ZN4Simd4Base15Yuv444pToRgbaV2EPKhmS2_mS2_mmmPhmh11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext, i32 noundef) #4

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

declare void @_ZN4Simd4Base11JpegContextC1EPNS_17InputMemoryStreamE(ptr, ptr)

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 = { 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 = { nobuiltin 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 #3 = { nobuiltin 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 = { "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 = { builtin allocsize(0) }
attributes #6 = { builtin nounwind }
attributes #7 = { 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 120}
!12 = !{!"_ZTSN4Simd4Base15ImageJpegLoaderE", !13, i64 0, !6, i64 120}
!13 = !{!"_ZTSN4Simd11ImageLoaderE", !14, i64 8, !18, i64 32, !19, i64 72}
!14 = !{!"_ZTSN4Simd16ImageLoaderParamE", !6, i64 0, !15, i64 8, !16, i64 16, !17, i64 20}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTS17SimdImageFileType", !7, i64 0}
!17 = !{!"_ZTS19SimdPixelFormatType", !7, i64 0}
!18 = !{!"_ZTSN4Simd17InputMemoryStreamE", !6, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32}
!19 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEEE", !15, i64 0, !15, i64 8, !15, i64 16, !20, i64 24, !6, i64 32, !21, i64 40}
!20 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEE6FormatE", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!23, !6, i64 22768}
!23 = !{!"_ZTSN4Simd4Base11JpegContextE", !6, i64 0, !24, i64 8, !24, i64 12, !24, i64 16, !24, i64 20, !7, i64 24, !7, i64 10840, !7, i64 21656, !24, i64 22168, !24, i64 22172, !24, i64 22176, !24, i64 22180, !24, i64 22184, !24, i64 22188, !7, i64 22192, !24, i64 22672, !24, i64 22676, !7, i64 22680, !24, i64 22684, !24, i64 22688, !24, i64 22692, !24, i64 22696, !24, i64 22700, !24, i64 22704, !24, i64 22708, !24, i64 22712, !24, i64 22716, !24, i64 22720, !24, i64 22724, !7, i64 22728, !24, i64 22744, !24, i64 22748, !25, i64 22752, !6, i64 22768, !6, i64 22776, !6, i64 22784, !6, i64 22792, !6, i64 22800, !6, i64 22808, !6, i64 22816, !6, i64 22824}
!24 = !{!"int", !7, i64 0}
!25 = !{!"_ZTSN4Simd5ArrayIhEE", !6, i64 0, !15, i64 8}
!26 = !{!23, !6, i64 22776}
!27 = !{!23, !6, i64 22784}
!28 = !{!13, !17, i64 28}
!29 = !{!23, !6, i64 22824}
!30 = !{!23, !6, i64 22792}
!31 = !{!23, !6, i64 22800}
!32 = !{!23, !6, i64 22808}
!33 = !{!23, !6, i64 22816}


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

@_ZTVN4Simd4Base15ImageJpegLoaderE = external dso_local unnamed_addr constant { [5 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd4Base16JpegYuv420pToBgrEPKhmS2_mS2_mmmPhm11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN4Simd4BaseL18JpegResampleRowHv2EPhPKhS3_ii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd4Base16JpegYuv420pToRgbEPKhmS2_mS2_mmmPhm11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd4Base17JpegYuv420pToBgraEPKhmS2_mS2_mmmPhmh11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Simd4Base17JpegYuv420pToRgbaEPKhmS2_mS2_mmmPhmh11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext, i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base15ImageJpegLoaderC2ERKNS_16ImageLoaderParamE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN4Simd11ImageLoaderC2ERKNS_16ImageLoaderParamE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(24) %1)
  store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTVN4Simd4Base15ImageJpegLoaderE, i64 16), ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 120
  %4 = invoke noalias noundef nonnull dereferenceable(22832) ptr @_Znwm(i64 noundef 22832) #5
          to label %5 unwind label %13

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  invoke void @_ZN4Simd4Base11JpegContextC1EPNS_17InputMemoryStreamE(ptr noundef nonnull align 8 dereferenceable(22832) %4, ptr noundef nonnull %6)
          to label %7 unwind label %15

7:                                                ; preds = %5
  store ptr %4, ptr %3, align 8, !tbaa !8
  %8 = getelementptr inbounds i8, ptr %4, i64 22768
  store ptr @_ZN4Simd4BaseL13JpegIdctBlockEPKsPhi, ptr %8, align 8, !tbaa !21
  %9 = getelementptr inbounds i8, ptr %4, i64 22776
  store ptr @_ZN4Simd4BaseL18JpegResampleRowHv2EPhPKhS3_ii, ptr %9, align 8, !tbaa !25
  %10 = getelementptr inbounds i8, ptr %4, i64 22784
  store ptr @_ZN4Simd4BaseL15JpegYuvToRgbRowEPhPKhS3_S3_ii, ptr %10, align 8, !tbaa !26
  %11 = getelementptr inbounds i8, ptr %0, i64 28
  %12 = load i32, ptr %11, align 4, !tbaa !27
  switch i32 %12, label %.thread12 [
    i32 0, label %.thread8.thread13
    i32 1, label %.thread12.sink.split
    i32 3, label %.thread12.sink.split.sink.split.sink.split
    i32 4, label %.thread9
    i32 16, label %17
    i32 17, label %.thread12.sink.split.sink.split
  ]

.thread8.thread13:                                ; preds = %7
  store i32 16, ptr %11, align 4, !tbaa !27
  br label %17

13:                                               ; preds = %2
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %21

15:                                               ; preds = %5
  %16 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %4, i64 noundef 22832) #6
  br label %21

.thread9:                                         ; preds = %7
  br label %.thread12.sink.split.sink.split.sink.split

17:                                               ; preds = %7, %.thread8.thread13
  br label %.thread12.sink.split.sink.split.sink.split

.thread12.sink.split.sink.split.sink.split:       ; preds = %7, %.thread9, %17
  %.sink17 = phi i64 [ 22792, %17 ], [ 22808, %.thread9 ], [ 22792, %7 ]
  %_ZN4Simd4Base14Yuv444pToBgrV2EPKhmS2_mS2_mmmPhm11SimdYuvType.sink = phi ptr [ @_ZN4Simd4Base14Yuv444pToRgbV2EPKhmS2_mS2_mmmPhm11SimdYuvType, %17 ], [ @_ZN4Simd4Base15Yuv444pToBgraV2EPKhmS2_mS2_mmmPhmh11SimdYuvType, %.thread9 ], [ @_ZN4Simd4Base14Yuv444pToBgrV2EPKhmS2_mS2_mmmPhm11SimdYuvType, %7 ]
  %.sink16.ph = phi i64 [ 22800, %17 ], [ 22816, %.thread9 ], [ 22800, %7 ]
  %_ZN4Simd4Base15Yuv444pToRgbaV2EPKhmS2_mS2_mmmPhmh11SimdYuvType.sink.ph = phi ptr [ @_ZN4Simd4Base16JpegYuv420pToRgbEPKhmS2_mS2_mmmPhm11SimdYuvType, %17 ], [ @_ZN4Simd4Base17JpegYuv420pToBgraEPKhmS2_mS2_mmmPhmh11SimdYuvType, %.thread9 ], [ @_ZN4Simd4Base16JpegYuv420pToBgrEPKhmS2_mS2_mmmPhm11SimdYuvType, %7 ]
  %_ZN4Simd4Base9BgraToRgbEPKhmmmPhm.sink.ph.ph = phi ptr [ @_ZN4Simd4Base9BgraToBgrEPKhmmmPhm, %17 ], [ @_ZN4Simd4Base10BgraToRgbaEPKhmmmPhm, %.thread9 ], [ @_ZN4Simd4Base9BgraToRgbEPKhmmmPhm, %7 ]
  %18 = getelementptr inbounds i8, ptr %4, i64 %.sink17
  store ptr %_ZN4Simd4Base14Yuv444pToBgrV2EPKhmS2_mS2_mmmPhm11SimdYuvType.sink, ptr %18, align 8, !tbaa !28
  br label %.thread12.sink.split.sink.split

.thread12.sink.split.sink.split:                  ; preds = %.thread12.sink.split.sink.split.sink.split, %7
  %.sink16 = phi i64 [ 22808, %7 ], [ %.sink16.ph, %.thread12.sink.split.sink.split.sink.split ]
  %_ZN4Simd4Base15Yuv444pToRgbaV2EPKhmS2_mS2_mmmPhmh11SimdYuvType.sink = phi ptr [ @_ZN4Simd4Base15Yuv444pToRgbaV2EPKhmS2_mS2_mmmPhmh11SimdYuvType, %7 ], [ %_ZN4Simd4Base15Yuv444pToRgbaV2EPKhmS2_mS2_mmmPhmh11SimdYuvType.sink.ph, %.thread12.sink.split.sink.split.sink.split ]
  %.sink15.ph = phi i64 [ 22816, %7 ], [ 22824, %.thread12.sink.split.sink.split.sink.split ]
  %_ZN4Simd4Base9BgraToRgbEPKhmmmPhm.sink.ph = phi ptr [ @_ZN4Simd4Base17JpegYuv420pToRgbaEPKhmS2_mS2_mmmPhmh11SimdYuvType, %7 ], [ %_ZN4Simd4Base9BgraToRgbEPKhmmmPhm.sink.ph.ph, %.thread12.sink.split.sink.split.sink.split ]
  %19 = getelementptr inbounds i8, ptr %4, i64 %.sink16
  store ptr %_ZN4Simd4Base15Yuv444pToRgbaV2EPKhmS2_mS2_mmmPhmh11SimdYuvType.sink, ptr %19, align 8, !tbaa !28
  br label %.thread12.sink.split

.thread12.sink.split:                             ; preds = %.thread12.sink.split.sink.split, %7
  %.sink15 = phi i64 [ 22824, %7 ], [ %.sink15.ph, %.thread12.sink.split.sink.split ]
  %_ZN4Simd4Base9BgraToRgbEPKhmmmPhm.sink = phi ptr [ @_ZN4Simd4Base10RgbaToGrayEPKhmmmPhm, %7 ], [ %_ZN4Simd4Base9BgraToRgbEPKhmmmPhm.sink.ph, %.thread12.sink.split.sink.split ]
  %20 = getelementptr inbounds i8, ptr %4, i64 %.sink15
  store ptr %_ZN4Simd4Base9BgraToRgbEPKhmmmPhm.sink, ptr %20, align 8, !tbaa !28
  br label %.thread12

.thread12:                                        ; preds = %.thread12.sink.split, %7
  ret void

21:                                               ; preds = %15, %13
  %.pn = phi { ptr, i32 } [ %16, %15 ], [ %14, %13 ]
  tail call void @_ZN4Simd11ImageLoaderD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #7
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4Simd4BaseL13JpegIdctBlockEPKsPhi(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4Simd4BaseL15JpegYuvToRgbRowEPhPKhS3_S3_ii(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #0

declare void @_ZN4Simd4Base10RgbaToGrayEPKhmmmPhm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #4

declare void @_ZN4Simd4Base14Yuv444pToBgrV2EPKhmS2_mS2_mmmPhm11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #4

declare void @_ZN4Simd4Base9BgraToRgbEPKhmmmPhm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #4

declare void @_ZN4Simd4Base15Yuv444pToBgraV2EPKhmS2_mS2_mmmPhmh11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext, i32 noundef) #4

declare void @_ZN4Simd4Base10BgraToRgbaEPKhmmmPhm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #4

declare void @_ZN4Simd4Base14Yuv444pToRgbV2EPKhmS2_mS2_mmmPhm11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #4

declare void @_ZN4Simd4Base9BgraToBgrEPKhmmmPhm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #4

declare void @_ZN4Simd4Base15Yuv444pToRgbaV2EPKhmS2_mS2_mmmPhmh11SimdYuvType(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext, i32 noundef) #4

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

declare void @_ZN4Simd4Base11JpegContextC1EPNS_17InputMemoryStreamE(ptr, ptr) local_unnamed_addr

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 = { 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 = { nobuiltin 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 #3 = { nobuiltin 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 = { "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 = { builtin allocsize(0) }
attributes #6 = { builtin nounwind }
attributes #7 = { 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, !12, i64 120}
!9 = !{!"_ZTSN4Simd4Base15ImageJpegLoaderE", !10, i64 0, !12, i64 120}
!10 = !{!"_ZTSN4Simd11ImageLoaderE", !11, i64 8, !17, i64 32, !18, i64 72}
!11 = !{!"_ZTSN4Simd16ImageLoaderParamE", !12, i64 0, !14, i64 8, !15, i64 16, !16, i64 20}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"long", !13, i64 0}
!15 = !{!"_ZTS17SimdImageFileType", !13, i64 0}
!16 = !{!"_ZTS19SimdPixelFormatType", !13, i64 0}
!17 = !{!"_ZTSN4Simd17InputMemoryStreamE", !12, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32}
!18 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEEE", !14, i64 0, !14, i64 8, !14, i64 16, !19, i64 24, !12, i64 32, !20, i64 40}
!19 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEE6FormatE", !13, i64 0}
!20 = !{!"bool", !13, i64 0}
!21 = !{!22, !12, i64 22768}
!22 = !{!"_ZTSN4Simd4Base11JpegContextE", !12, i64 0, !23, i64 8, !23, i64 12, !23, i64 16, !23, i64 20, !13, i64 24, !13, i64 10840, !13, i64 21656, !23, i64 22168, !23, i64 22172, !23, i64 22176, !23, i64 22180, !23, i64 22184, !23, i64 22188, !13, i64 22192, !23, i64 22672, !23, i64 22676, !13, i64 22680, !23, i64 22684, !23, i64 22688, !23, i64 22692, !23, i64 22696, !23, i64 22700, !23, i64 22704, !23, i64 22708, !23, i64 22712, !23, i64 22716, !23, i64 22720, !23, i64 22724, !13, i64 22728, !23, i64 22744, !23, i64 22748, !24, i64 22752, !12, i64 22768, !12, i64 22776, !12, i64 22784, !12, i64 22792, !12, i64 22800, !12, i64 22808, !12, i64 22816, !12, i64 22824}
!23 = !{!"int", !13, i64 0}
!24 = !{!"_ZTSN4Simd5ArrayIhEE", !12, i64 0, !14, i64 8}
!25 = !{!22, !12, i64 22776}
!26 = !{!22, !12, i64 22784}
!27 = !{!10, !16, i64 28}
!28 = !{!12, !12, i64 0}


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