; LLVM IR from team-charls/charls :: src/golomb_lut.ll (ZN6charls23golomb_code_match_tableC2Ei)

; 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::pair" = type { i32, i32 }
%"struct.charls::golomb_code_match" = type { i32, i32 }
%"class.charls::golomb_code_match_table" = type { %"struct.std::array" }
%"struct.std::array" = type { [256 x %"struct.charls::golomb_code_match"] }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6charls23golomb_code_match_tableC2Ei(ptr noundef nonnull align 4 dereferenceable(2048) %0, i32 noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i16, align 2
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.charls::golomb_code_match", align 4
  %12 = alloca %"struct.charls::golomb_code_match", align 4
  %13 = alloca i16, align 2
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.charls::golomb_code_match", align 4
  %19 = alloca %"struct.charls::golomb_code_match", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %20 = load ptr, ptr %3, align 8
  %21 = getelementptr inbounds %"class.charls::golomb_code_match_table", ptr %20, i32 0, i32 0
  %22 = getelementptr inbounds %"struct.std::array", ptr %21, i32 0, i32 0
  call void @llvm.memset.p0.i64(ptr align 4 %22, i8 0, i64 2048, i1 false)
  %23 = getelementptr inbounds %"struct.charls::golomb_code_match", ptr %22, i64 256
  br label %24

24:                                               ; preds = %24, %2
  %25 = phi ptr [ %22, %2 ], [ %28, %24 ]
  %26 = getelementptr inbounds %"struct.charls::golomb_code_match", ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds %"struct.charls::golomb_code_match", ptr %25, i32 0, i32 1
  %28 = getelementptr inbounds %"struct.charls::golomb_code_match", ptr %25, i64 1
  %29 = icmp eq ptr %28, %23
  br i1 %29, label %30, label %24

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #4
  store i16 0, ptr %5, align 2, !tbaa !11
  br label %31

31:                                               ; preds = %60, %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %32 = load i16, ptr %5, align 2, !tbaa !11
  %33 = sext i16 %32 to i32
  %34 = call noundef i32 @_ZN6charls15map_error_valueEi(i32 noundef %33) #4
  store i32 %34, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = call i64 @_ZN6charls12_GLOBAL__N_120create_encoded_valueEii(i32 noundef %35, i32 noundef %36) #4
  store i64 %37, ptr %7, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %7) #4
  store ptr %38, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %7) #4
  store ptr %39, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = icmp ugt i64 %42, 8
  br i1 %43, label %44, label %45

44:                                               ; preds = %31
  store i32 2, ptr %10, align 4
  br label %57

45:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %46 = getelementptr inbounds %"struct.charls::golomb_code_match", ptr %11, i32 0, i32 0
  %47 = load i16, ptr %5, align 2, !tbaa !11
  %48 = sext i16 %47 to i32
  store i32 %48, ptr %46, align 4, !tbaa !13
  %49 = getelementptr inbounds %"struct.charls::golomb_code_match", ptr %11, i32 0, i32 1
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = call noundef i32 @_ZN6charls23conditional_static_castIjiTnNSt9enable_ifIXntsr3stdE9is_same_vIT_T0_EEiE4typeELi0EEES2_S3_(i32 noundef %51) #4
  store i32 %52, ptr %49, align 4, !tbaa !15
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = trunc i32 %54 to i8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !16
  %56 = load i64, ptr %12, align 4
  call void @_ZN6charls23golomb_code_match_table9add_entryEhNS_17golomb_code_matchE(ptr noundef nonnull align 4 dereferenceable(2048) %20, i8 noundef zeroext %55, i64 %56) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  store i32 0, ptr %10, align 4
  br label %57

57:                                               ; preds = %45, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %58 = load i32, ptr %10, align 4
  switch i32 %58, label %63 [
    i32 0, label %59
  ]

59:                                               ; preds = %57
  br label %60

60:                                               ; preds = %59
  %61 = load i16, ptr %5, align 2, !tbaa !11
  %62 = add i16 %61, 1
  store i16 %62, ptr %5, align 2, !tbaa !11
  br label %31, !llvm.loop !17

63:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #4
  br label %64

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #4
  store i16 -1, ptr %13, align 2, !tbaa !11
  br label %65

65:                                               ; preds = %93, %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %66 = load i16, ptr %13, align 2, !tbaa !11
  %67 = sext i16 %66 to i32
  %68 = call noundef i32 @_ZN6charls15map_error_valueEi(i32 noundef %67) #4
  store i32 %68, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %69 = load i32, ptr %4, align 4, !tbaa !9
  %70 = load i32, ptr %14, align 4, !tbaa !9
  %71 = call i64 @_ZN6charls12_GLOBAL__N_120create_encoded_valueEii(i32 noundef %69, i32 noundef %70) #4
  store i64 %71, ptr %15, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %15) #4
  store ptr %72, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %15) #4
  store ptr %73, ptr %17, align 8, !tbaa !5
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = icmp ugt i64 %76, 8
  br i1 %77, label %78, label %79

78:                                               ; preds = %65
  store i32 5, ptr %10, align 4
  br label %90

79:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %80 = getelementptr inbounds %"struct.charls::golomb_code_match", ptr %18, i32 0, i32 0
  %81 = load i16, ptr %13, align 2, !tbaa !11
  %82 = sext i16 %81 to i32
  store i32 %82, ptr %80, align 4, !tbaa !13
  %83 = getelementptr inbounds %"struct.charls::golomb_code_match", ptr %18, i32 0, i32 1
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = load i32, ptr %84, align 4, !tbaa !9
  store i32 %85, ptr %83, align 4, !tbaa !15
  %86 = load ptr, ptr %17, align 8, !tbaa !5
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = trunc i32 %87 to i8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !16
  %89 = load i64, ptr %19, align 4
  call void @_ZN6charls23golomb_code_match_table9add_entryEhNS_17golomb_code_matchE(ptr noundef nonnull align 4 dereferenceable(2048) %20, i8 noundef zeroext %88, i64 %89) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  store i32 0, ptr %10, align 4
  br label %90

90:                                               ; preds = %79, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %91 = load i32, ptr %10, align 4
  switch i32 %91, label %96 [
    i32 0, label %92
  ]

92:                                               ; preds = %90
  br label %93

93:                                               ; preds = %92
  %94 = load i16, ptr %13, align 2, !tbaa !11
  %95 = add i16 %94, -1
  store i16 %95, ptr %13, align 2, !tbaa !11
  br label %65, !llvm.loop !19

96:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #4
  br label %97

97:                                               ; preds = %96
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6charls15map_error_valueEi(i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden i64 @_ZN6charls12_GLOBAL__N_120create_encoded_valueEii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6charls23conditional_static_castIjiTnNSt9enable_ifIXntsr3stdE9is_same_vIT_T0_EEiE4typeELi0EEES2_S3_(i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6charls23golomb_code_match_table9add_entryEhNS_17golomb_code_matchE(ptr noundef nonnull align 4 dereferenceable(2048), i8 noundef zeroext, i64) #0 align 2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN6charls17golomb_code_matchE", !10, i64 0, !10, i64 4}
!15 = !{!14, !10, i64 4}
!16 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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::pair" = type { i32, i32 }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6charls23golomb_code_match_tableC2Ei(ptr noundef nonnull align 4 dereferenceable(2048) %0, i32 noundef %1) unnamed_addr #0 align 2 {
.preheader:
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca %"struct.std::pair", align 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(2048) %0, i8 0, i64 2048, i1 false)
  %4 = tail call noundef i32 @_ZN6charls15map_error_valueEi(i32 noundef 0) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  %5 = tail call i64 @_ZN6charls12_GLOBAL__N_120create_encoded_valueEii(i32 noundef %1, i32 noundef %4) #3
  store i64 %5, ptr %2, align 8
  %6 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %2) #3
  %7 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %2) #3
  %8 = load i32, ptr %6, align 4, !tbaa !5
  %9 = icmp ult i32 %8, 9
  br i1 %9, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %10 = phi i32 [ %22, %.lr.ph ], [ %8, %.preheader ]
  %11 = phi ptr [ %21, %.lr.ph ], [ %7, %.preheader ]
  %12 = phi i32 [ %17, %.lr.ph ], [ 0, %.preheader ]
  %.028 = phi i16 [ %16, %.lr.ph ], [ 0, %.preheader ]
  %13 = call noundef i32 @_ZN6charls23conditional_static_castIjiTnNSt9enable_ifIXntsr3stdE9is_same_vIT_T0_EEiE4typeELi0EEES2_S3_(i32 noundef %10) #3
  %14 = load i32, ptr %11, align 4, !tbaa !5
  %15 = trunc i32 %14 to i8
  %.sroa.410.0.insert.ext = zext i32 %13 to i64
  %.sroa.410.0.insert.shift = shl nuw i64 %.sroa.410.0.insert.ext, 32
  %.sroa.09.0.insert.ext = zext i32 %12 to i64
  %.sroa.09.0.insert.insert = or disjoint i64 %.sroa.410.0.insert.shift, %.sroa.09.0.insert.ext
  call void @_ZN6charls23golomb_code_match_table9add_entryEhNS_17golomb_code_matchE(ptr noundef nonnull align 4 dereferenceable(2048) %0, i8 noundef zeroext %15, i64 %.sroa.09.0.insert.insert) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  %16 = add i16 %.028, 1
  %17 = sext i16 %16 to i32
  %18 = call noundef i32 @_ZN6charls15map_error_valueEi(i32 noundef %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  %19 = call i64 @_ZN6charls12_GLOBAL__N_120create_encoded_valueEii(i32 noundef %1, i32 noundef %18) #3
  store i64 %19, ptr %2, align 8
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %2) #3
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %2) #3
  %22 = load i32, ptr %20, align 4, !tbaa !5
  %23 = icmp ult i32 %22, 9
  br i1 %23, label %.lr.ph, label %.critedge, !llvm.loop !9

.critedge:                                        ; preds = %.lr.ph, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  %24 = call noundef i32 @_ZN6charls15map_error_valueEi(i32 noundef -1) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %25 = call i64 @_ZN6charls12_GLOBAL__N_120create_encoded_valueEii(i32 noundef %1, i32 noundef %24) #3
  store i64 %25, ptr %3, align 8
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %3) #3
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %3) #3
  %28 = load i32, ptr %26, align 4, !tbaa !5
  %29 = icmp ult i32 %28, 9
  br i1 %29, label %.lr.ph30, label %.critedge27

.lr.ph30:                                         ; preds = %.critedge, %.lr.ph30
  %30 = phi i32 [ %41, %.lr.ph30 ], [ %28, %.critedge ]
  %31 = phi ptr [ %40, %.lr.ph30 ], [ %27, %.critedge ]
  %32 = phi i32 [ %36, %.lr.ph30 ], [ -1, %.critedge ]
  %.02429 = phi i16 [ %35, %.lr.ph30 ], [ -1, %.critedge ]
  %33 = load i32, ptr %31, align 4, !tbaa !5
  %34 = trunc i32 %33 to i8
  %.sroa.4.0.insert.ext = zext nneg i32 %30 to i64
  %.sroa.4.0.insert.shift = shl nuw nsw i64 %.sroa.4.0.insert.ext, 32
  %.sroa.02.0.insert.ext = zext i32 %32 to i64
  %.sroa.02.0.insert.insert = or disjoint i64 %.sroa.4.0.insert.shift, %.sroa.02.0.insert.ext
  call void @_ZN6charls23golomb_code_match_table9add_entryEhNS_17golomb_code_matchE(ptr noundef nonnull align 4 dereferenceable(2048) %0, i8 noundef zeroext %34, i64 %.sroa.02.0.insert.insert) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  %35 = add i16 %.02429, -1
  %36 = sext i16 %35 to i32
  %37 = call noundef i32 @_ZN6charls15map_error_valueEi(i32 noundef %36) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %38 = call i64 @_ZN6charls12_GLOBAL__N_120create_encoded_valueEii(i32 noundef %1, i32 noundef %37) #3
  store i64 %38, ptr %3, align 8
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %3) #3
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8) %3) #3
  %41 = load i32, ptr %39, align 4, !tbaa !5
  %42 = icmp ult i32 %41, 9
  br i1 %42, label %.lr.ph30, label %.critedge27, !llvm.loop !11

.critedge27:                                      ; preds = %.lr.ph30, %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6charls15map_error_valueEi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden i64 @_ZN6charls12_GLOBAL__N_120create_encoded_valueEii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6charls23conditional_static_castIjiTnNSt9enable_ifIXntsr3stdE9is_same_vIT_T0_EEiE4typeELi0EEES2_S3_(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6charls23golomb_code_match_table9add_entryEhNS_17golomb_code_matchE(ptr noundef nonnull align 4 dereferenceable(2048), i8 noundef zeroext, i64) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass