; LLVM IR from team-charls/charls :: src (jpeg_stream_reader)

; 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.std::array.12" = type { [4 x i8] }
%"class.charls::span" = type { ptr, i64 }
%"class.charls::jpeg_stream_reader" = type { ptr, ptr, %"class.charls::span", %struct.charls_frame_info, %"struct.charls::coding_parameters", %struct.charls_jpegls_pc_parameters, %"class.std::vector", %"class.std::vector.0", i32, i32, i32, i32, i8, i32, %"struct.charls::callback_function", %"struct.charls::callback_function.5" }
%struct.charls_frame_info = type { i32, i32, i32, i32 }
%"struct.charls::coding_parameters" = type { i32, i32, i32, i32 }
%struct.charls_jpegls_pc_parameters = type { i32, i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<charls::jpeg_stream_reader::component_info, std::allocator<charls::jpeg_stream_reader::component_info>>::_Vector_impl" }
%"struct.std::_Vector_base<charls::jpeg_stream_reader::component_info, std::allocator<charls::jpeg_stream_reader::component_info>>::_Vector_impl" = type { %"struct.std::_Vector_base<charls::jpeg_stream_reader::component_info, std::allocator<charls::jpeg_stream_reader::component_info>>::_Vector_impl_data" }
%"struct.std::_Vector_base<charls::jpeg_stream_reader::component_info, std::allocator<charls::jpeg_stream_reader::component_info>>::_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<charls::jpeg_stream_reader::mapping_table_entry, std::allocator<charls::jpeg_stream_reader::mapping_table_entry>>::_Vector_impl" }
%"struct.std::_Vector_base<charls::jpeg_stream_reader::mapping_table_entry, std::allocator<charls::jpeg_stream_reader::mapping_table_entry>>::_Vector_impl" = type { %"struct.std::_Vector_base<charls::jpeg_stream_reader::mapping_table_entry, std::allocator<charls::jpeg_stream_reader::mapping_table_entry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<charls::jpeg_stream_reader::mapping_table_entry, std::allocator<charls::jpeg_stream_reader::mapping_table_entry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.charls::callback_function" = type { ptr, ptr }
%"struct.charls::callback_function.5" = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [26 x i8], align 1
@__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv = external hidden unnamed_addr constant [71 x i8], align 1
@__const._ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv.mrfx_tag = external hidden unnamed_addr constant %"struct.std::array.12", align 1

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

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

; Function Attrs: mustprogress noinline noreturn uwtable
declare dso_local void @_ZN6charls4impl18throw_jpegls_errorENS_11jpegls_errcE(i32 noundef) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN6charls18jpeg_stream_reader10read_uint8Ev(ptr noundef nonnull align 8 dereferenceable(192)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZN6charls18jpeg_stream_reader10read_bytesEm(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv(ptr noundef nonnull align 8 dereferenceable(192) %0) #5 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.std::array.12", align 1
  %4 = alloca %"class.charls::span", align 8
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.charls::jpeg_stream_reader", ptr %7, i32 0, i32 2
  %9 = call noundef i64 @_ZNK6charls4spanIKSt4byteE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  %10 = icmp eq i64 %9, 5
  br i1 %10, label %11, label %12

11:                                               ; preds = %1
  br label %14

12:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 760, ptr noundef @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv) #9
  unreachable

13:                                               ; No predecessors!
  br label %14

14:                                               ; preds = %13, %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr align 1 @__const._ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv.mrfx_tag, i64 4, i1 false)
  %15 = call noundef ptr @_ZNKSt5arrayISt4byteLm4EE6cbeginEv(ptr noundef nonnull align 1 dereferenceable(4) %3) #8
  %16 = call noundef ptr @_ZNKSt5arrayISt4byteLm4EE4cendEv(ptr noundef nonnull align 1 dereferenceable(4) %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #8
  %17 = call noundef i64 @_ZNKSt5arrayISt4byteLm4EE4sizeEv(ptr noundef nonnull align 1 dereferenceable(4) %3) #10
  %18 = call { ptr, i64 } @_ZN6charls18jpeg_stream_reader10read_bytesEm(ptr noundef nonnull align 8 dereferenceable(192) %7, i64 noundef %17) #8
  %19 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %20 = extractvalue { ptr, i64 } %18, 0
  store ptr %20, ptr %19, align 8
  %21 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %22 = extractvalue { ptr, i64 } %18, 1
  store i64 %22, ptr %21, align 8
  %23 = call noundef ptr @_ZNK6charls4spanIKSt4byteE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  %24 = call noundef zeroext i1 @_ZSt5equalIPKSt4byteS2_EbT_S3_T0_(ptr noundef %15, ptr noundef %16, ptr noundef %23)
  %25 = xor i1 %24, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #8
  br i1 %25, label %26, label %27

26:                                               ; preds = %14
  store i32 1, ptr %5, align 4
  br label %28

27:                                               ; preds = %14
  store i32 0, ptr %5, align 4
  br label %28

28:                                               ; preds = %27, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  %29 = load i32, ptr %5, align 4
  switch i32 %29, label %42 [
    i32 0, label %30
    i32 1, label %41
  ]

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  %31 = call noundef zeroext i8 @_ZN6charls18jpeg_stream_reader10read_uint8Ev(ptr noundef nonnull align 8 dereferenceable(192) %7) #8
  store i8 %31, ptr %6, align 1, !tbaa !9
  %32 = load i8, ptr %6, align 1, !tbaa !9
  %33 = zext i8 %32 to i32
  switch i32 %33, label %40 [
    i32 0, label %34
    i32 1, label %34
    i32 2, label %34
    i32 3, label %34
    i32 4, label %39
    i32 5, label %39
  ]

34:                                               ; preds = %30, %30, %30, %30
  %35 = load i8, ptr %6, align 1, !tbaa !9
  %36 = zext i8 %35 to i32
  %37 = getelementptr inbounds %"class.charls::jpeg_stream_reader", ptr %7, i32 0, i32 4
  %38 = getelementptr inbounds %"struct.charls::coding_parameters", ptr %37, i32 0, i32 3
  store i32 %36, ptr %38, align 4, !tbaa !10
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  br label %41

39:                                               ; preds = %30, %30
  call void @_ZN6charls4impl18throw_jpegls_errorENS_11jpegls_errcE(i32 noundef 8) #11
  unreachable

40:                                               ; preds = %30
  call void @_ZN6charls4impl18throw_jpegls_errorENS_11jpegls_errcE(i32 noundef 36) #11
  unreachable

41:                                               ; preds = %34, %28
  ret void

42:                                               ; preds = %28
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt5equalIPKSt4byteS2_EbT_S3_T0_(ptr noundef, ptr noundef, ptr noundef) #6

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

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

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef i64 @_ZNKSt5arrayISt4byteLm4EE4sizeEv(ptr noundef nonnull align 1 dereferenceable(4)) #7 align 2

attributes #0 = { 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 #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 noinline noreturn 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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { inlinehint 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 #7 = { mustprogress nounwind willreturn memory(none) 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(none) }
attributes #11 = { noreturn }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !18, i64 60}
!11 = !{!"_ZTSN6charls18jpeg_stream_readerE", !6, i64 0, !6, i64 8, !12, i64 16, !14, i64 32, !16, i64 48, !19, i64 64, !20, i64 88, !24, i64 112, !28, i64 136, !15, i64 140, !15, i64 144, !17, i64 148, !29, i64 152, !30, i64 156, !31, i64 160, !32, i64 176}
!12 = !{!"_ZTSN6charls4spanIKSt4byteEE", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTS17charls_frame_info", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN6charls17coding_parametersE", !15, i64 0, !15, i64 4, !17, i64 8, !18, i64 12}
!17 = !{!"_ZTSN6charls15interleave_modeE", !7, i64 0}
!18 = !{!"_ZTSN6charls20color_transformationE", !7, i64 0}
!19 = !{!"_ZTS27charls_jpegls_pc_parameters", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16}
!20 = !{!"_ZTSSt6vectorIN6charls18jpeg_stream_reader14component_infoESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN6charls18jpeg_stream_reader14component_infoESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN6charls18jpeg_stream_reader14component_infoESaIS2_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN6charls18jpeg_stream_reader14component_infoESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIN6charls18jpeg_stream_reader19mapping_table_entryESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN6charls18jpeg_stream_reader19mapping_table_entryESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN6charls18jpeg_stream_reader19mapping_table_entryESaIS2_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN6charls18jpeg_stream_reader19mapping_table_entryESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSN6charls18jpeg_stream_reader5stateE", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTSN6charls22compressed_data_formatE", !7, i64 0}
!31 = !{!"_ZTSN6charls17callback_functionIPFiPKvmPvEEE", !6, i64 0, !6, i64 8}
!32 = !{!"_ZTSN6charls17callback_functionIPFiiPKvmPvEEE", !6, i64 0, !6, i64 8}


; 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.std::array.12" = type { [4 x i8] }
%"class.charls::span" = type { ptr, i64 }

@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [26 x i8], align 1
@__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv = external hidden unnamed_addr constant [71 x i8], align 1
@__const._ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv.mrfx_tag = external hidden unnamed_addr constant %"struct.std::array.12", align 1

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

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

; Function Attrs: mustprogress noinline noreturn uwtable
declare dso_local void @_ZN6charls4impl18throw_jpegls_errorENS_11jpegls_errcE(i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN6charls18jpeg_stream_reader10read_uint8Ev(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv(ptr noundef nonnull align 8 dereferenceable(192) %0) local_unnamed_addr #4 align 2 {
  %2 = alloca %"struct.std::array.12", align 4
  %3 = alloca %"class.charls::span", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = tail call noundef i64 @_ZNK6charls4spanIKSt4byteE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  %6 = icmp eq i64 %5, 5
  br i1 %6, label %8, label %7

7:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 760, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv) #8
  unreachable

8:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %9 = load i32, ptr @__const._ZN6charls18jpeg_stream_reader35try_read_hp_color_transform_segmentEv.mrfx_tag, align 1
  store i32 %9, ptr %2, align 4
  %10 = call noundef ptr @_ZNKSt5arrayISt4byteLm4EE6cbeginEv(ptr noundef nonnull align 1 dereferenceable(4) %2) #7
  %11 = call noundef ptr @_ZNKSt5arrayISt4byteLm4EE4cendEv(ptr noundef nonnull align 1 dereferenceable(4) %2) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %12 = call noundef i64 @_ZNKSt5arrayISt4byteLm4EE4sizeEv(ptr noundef nonnull align 1 dereferenceable(4) %2) #9
  %13 = call { ptr, i64 } @_ZN6charls18jpeg_stream_reader10read_bytesEm(ptr noundef nonnull align 8 dereferenceable(192) %0, i64 noundef %12) #7
  %14 = extractvalue { ptr, i64 } %13, 0
  store ptr %14, ptr %3, align 8
  %15 = getelementptr inbounds i8, ptr %3, i64 8
  %16 = extractvalue { ptr, i64 } %13, 1
  store i64 %16, ptr %15, align 8
  %17 = call noundef ptr @_ZNK6charls4spanIKSt4byteE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  %18 = call noundef zeroext i1 @_ZSt5equalIPKSt4byteS2_EbT_S3_T0_(ptr noundef %10, ptr noundef %11, ptr noundef %17)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  br i1 %18, label %19, label %26

19:                                               ; preds = %8
  %20 = call noundef zeroext i8 @_ZN6charls18jpeg_stream_reader10read_uint8Ev(ptr noundef nonnull align 8 dereferenceable(192) %0) #7
  switch i8 %20, label %25 [
    i8 0, label %21
    i8 1, label %21
    i8 2, label %21
    i8 3, label %21
    i8 4, label %24
    i8 5, label %24
  ]

21:                                               ; preds = %19, %19, %19, %19
  %22 = zext nneg i8 %20 to i32
  %23 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %22, ptr %23, align 4, !tbaa !5
  br label %26

24:                                               ; preds = %19, %19
  call void @_ZN6charls4impl18throw_jpegls_errorENS_11jpegls_errcE(i32 noundef 8) #10
  unreachable

25:                                               ; preds = %19
  call void @_ZN6charls4impl18throw_jpegls_errorENS_11jpegls_errcE(i32 noundef 36) #10
  unreachable

26:                                               ; preds = %8, %21
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt5equalIPKSt4byteS2_EbT_S3_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt5arrayISt4byteLm4EE6cbeginEv(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt5arrayISt4byteLm4EE4cendEv(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef i64 @_ZNKSt5arrayISt4byteLm4EE4sizeEv(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #6 align 2

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

!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, !16, i64 60}
!6 = !{!"_ZTSN6charls18jpeg_stream_readerE", !7, i64 0, !7, i64 8, !10, i64 16, !12, i64 32, !14, i64 48, !17, i64 64, !18, i64 88, !22, i64 112, !26, i64 136, !13, i64 140, !13, i64 144, !15, i64 148, !27, i64 152, !28, i64 156, !29, i64 160, !30, i64 176}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6charls4spanIKSt4byteEE", !7, i64 0, !11, i64 8}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTS17charls_frame_info", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSN6charls17coding_parametersE", !13, i64 0, !13, i64 4, !15, i64 8, !16, i64 12}
!15 = !{!"_ZTSN6charls15interleave_modeE", !8, i64 0}
!16 = !{!"_ZTSN6charls20color_transformationE", !8, i64 0}
!17 = !{!"_ZTS27charls_jpegls_pc_parameters", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16}
!18 = !{!"_ZTSSt6vectorIN6charls18jpeg_stream_reader14component_infoESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN6charls18jpeg_stream_reader14component_infoESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN6charls18jpeg_stream_reader14component_infoESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN6charls18jpeg_stream_reader14component_infoESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!22 = !{!"_ZTSSt6vectorIN6charls18jpeg_stream_reader19mapping_table_entryESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN6charls18jpeg_stream_reader19mapping_table_entryESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN6charls18jpeg_stream_reader19mapping_table_entryESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN6charls18jpeg_stream_reader19mapping_table_entryESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!26 = !{!"_ZTSN6charls18jpeg_stream_reader5stateE", !8, i64 0}
!27 = !{!"bool", !8, i64 0}
!28 = !{!"_ZTSN6charls22compressed_data_formatE", !8, i64 0}
!29 = !{!"_ZTSN6charls17callback_functionIPFiPKvmPvEEE", !7, i64 0, !7, i64 8}
!30 = !{!"_ZTSN6charls17callback_functionIPFiiPKvmPvEEE", !7, i64 0, !7, i64 8}


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