; LLVM IR from balintbalazs/B3D :: source/src/B3D_cudaCompress/B3D (B3DcompressFunctions)

; 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.cudaCompress::BitStreamReadOnly" = type <{ ptr, ptr, i32, i32, i32, [4 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN12cudaCompress20decompressImageLLCPUERSt6vectorIjSaIjEEPsS4_S4_Ptiiimi = external hidden unnamed_addr constant [134 x i8], align 1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12cudaCompress17BitStreamReadOnlyD2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z14__cudaCheckMsgPKcS0_i(ptr noundef, ptr noundef, i32 noundef) #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12cudaCompress17BitStreamReadOnlyC2EPKjj(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef, i32 noundef) unnamed_addr #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) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12cudaCompress20decompressImageLLCPUERSt6vectorIjSaIjEEPsS4_S4_Ptiiimi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i64 noundef %8, i32 noundef %9) #5 personality ptr @__gxx_personality_v0 {
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.cudaCompress::BitStreamReadOnly", align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.std::vector.0", align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store i32 %5, ptr %16, align 4, !tbaa !9
  store i32 %6, ptr %17, align 4, !tbaa !9
  store i32 %7, ptr %18, align 4, !tbaa !9
  store i64 %8, ptr %19, align 8, !tbaa !11
  store i32 %9, ptr %20, align 4, !tbaa !9
  %27 = load i32, ptr %17, align 4, !tbaa !9
  %28 = load i32, ptr %18, align 4, !tbaa !9
  %29 = mul nsw i32 %27, %28
  store i32 %29, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #8
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = call noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #8
  %34 = mul i64 %33, 4
  %35 = mul i64 %34, 8
  %36 = trunc i64 %35 to i32
  call void @_ZN12cudaCompress17BitStreamReadOnlyC2EPKjj(ptr noundef nonnull align 8 dereferenceable(28) %21, ptr noundef %31, i32 noundef %36)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store ptr %21, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #8
  call void @_ZNSt6vectorItSaItEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store ptr %23, ptr %24, align 8, !tbaa !5
  %37 = load i32, ptr %16, align 4, !tbaa !9
  %38 = load i32, ptr %17, align 4, !tbaa !9
  %39 = mul nsw i32 %37, %38
  %40 = invoke noundef zeroext i1 @_ZN12cudaCompress15decodeRLHuffCPUEPPNS_17BitStreamReadOnlyEPPSt6vectorItSaItEEjjjb(ptr noundef %22, ptr noundef %24, i32 noundef %39, i32 noundef 1, i32 noundef 128, i1 noundef zeroext true)
          to label %41 unwind label %50

41:                                               ; preds = %10
  %42 = call noundef i64 @_ZNKSt6vectorItSaItEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %43 = load i32, ptr %16, align 4, !tbaa !9
  %44 = load i32, ptr %17, align 4, !tbaa !9
  %45 = mul nsw i32 %43, %44
  %46 = sext i32 %45 to i64
  %47 = icmp eq i64 %42, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %41
  br label %55

49:                                               ; preds = %41
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 444, ptr noundef @__PRETTY_FUNCTION__._ZN12cudaCompress20decompressImageLLCPUERSt6vectorIjSaIjEEPsS4_S4_Ptiiimi) #9
  unreachable

50:                                               ; preds = %88, %76, %55, %10
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %25, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @_ZN12cudaCompress17BitStreamReadOnlyD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #8
  br label %90

54:                                               ; No predecessors!
  br label %55

55:                                               ; preds = %54, %48
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = call noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %58 = load i32, ptr %16, align 4, !tbaa !9
  %59 = load i32, ptr %17, align 4, !tbaa !9
  %60 = mul nsw i32 %58, %59
  %61 = sext i32 %60 to i64
  %62 = mul i64 %61, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %56, ptr align 2 %57, i64 %62, i1 false)
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = load ptr, ptr %15, align 8, !tbaa !5
  %65 = load i32, ptr %16, align 4, !tbaa !9
  %66 = load i32, ptr %17, align 4, !tbaa !9
  invoke void @_ZN12cudaCompress4util14unsymbolizeCPUEPsPKtjjjjj(ptr noundef %63, ptr noundef %64, i32 noundef %65, i32 noundef %66, i32 noundef 1, i32 noundef 0, i32 noundef 0)
          to label %67 unwind label %50

67:                                               ; preds = %55
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = load i32, ptr %16, align 4, !tbaa !9
  %71 = load i32, ptr %17, align 4, !tbaa !9
  %72 = mul nsw i32 %70, %71
  %73 = sext i32 %72 to i64
  %74 = mul i64 %73, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %68, ptr align 2 %69, i64 %74, i1 false)
  %75 = load i64, ptr %19, align 8, !tbaa !11
  switch i64 %75, label %87 [
    i64 1, label %76
    i64 2, label %76
    i64 7, label %76
  ]

76:                                               ; preds = %67, %67, %67
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = load i32, ptr %16, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = mul i64 %80, 2
  %82 = trunc i64 %81 to i32
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = load i32, ptr %17, align 4, !tbaa !9
  %85 = load i32, ptr %20, align 4, !tbaa !9
  invoke void @_ZN12cudaCompress4util21unPredictor7_tilesCPUEPKsPsiiii(ptr noundef %77, ptr noundef %78, i32 noundef %82, i32 noundef %83, i32 noundef %84, i32 noundef %85)
          to label %86 unwind label %50

86:                                               ; preds = %76
  br label %88

87:                                               ; preds = %67
  br label %88

88:                                               ; preds = %87, %86
  invoke void @_Z14__cudaCheckMsgPKcS0_i(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 461)
          to label %89 unwind label %50

89:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @_ZN12cudaCompress17BitStreamReadOnlyD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #8
  ret void

90:                                               ; preds = %50
  %91 = load ptr, ptr %25, align 8
  %92 = load i32, ptr %26, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorItSaItEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZN12cudaCompress15decodeRLHuffCPUEPPNS_17BitStreamReadOnlyEPPSt6vectorItSaItEEjjjb(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorItSaItEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

declare void @_ZN12cudaCompress4util14unsymbolizeCPUEPsPKtjjjjj(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #6

declare void @_ZN12cudaCompress4util21unPredictor7_tilesCPUEPKsPsiiii(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #6

attributes #0 = { inlinehint 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { "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 = { 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 #8 = { nounwind }
attributes #9 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.cudaCompress::BitStreamReadOnly" = type <{ ptr, ptr, i32, i32, i32, [4 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN12cudaCompress20decompressImageLLCPUERSt6vectorIjSaIjEEPsS4_S4_Ptiiimi = external hidden unnamed_addr constant [134 x i8], align 1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12cudaCompress17BitStreamReadOnlyD2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z14__cudaCheckMsgPKcS0_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12cudaCompress17BitStreamReadOnlyC2EPKjj(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress 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 void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12cudaCompress20decompressImageLLCPUERSt6vectorIjSaIjEEPsS4_S4_Ptiiimi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readnone %3, ptr noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i64 noundef %8, i32 noundef %9) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %11 = alloca %"class.cudaCompress::BitStreamReadOnly", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.std::vector.0", align 8
  %14 = alloca ptr, align 8
  %15 = mul nsw i32 %7, %6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #8
  %16 = tail call noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %17 = tail call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %.tr = trunc i64 %17 to i32
  %18 = shl i32 %.tr, 5
  call void @_ZN12cudaCompress17BitStreamReadOnlyC2EPKjj(ptr noundef nonnull align 8 dereferenceable(28) %11, ptr noundef %16, i32 noundef %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  store ptr %11, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  call void @_ZNSt6vectorItSaItEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  store ptr %13, ptr %14, align 8, !tbaa !5
  %19 = mul nsw i32 %15, %5
  %20 = invoke noundef zeroext i1 @_ZN12cudaCompress15decodeRLHuffCPUEPPNS_17BitStreamReadOnlyEPPSt6vectorItSaItEEjjjb(ptr noundef nonnull %12, ptr noundef nonnull %14, i32 noundef %19, i32 noundef 1, i32 noundef 128, i1 noundef zeroext true)
          to label %21 unwind label %26

21:                                               ; preds = %10
  %22 = call noundef i64 @_ZNKSt6vectorItSaItEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %23 = sext i32 %19 to i64
  %24 = icmp eq i64 %22, %23
  br i1 %24, label %28, label %25

25:                                               ; preds = %21
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 444, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12cudaCompress20decompressImageLLCPUERSt6vectorIjSaIjEEPsS4_S4_Ptiiimi) #9
  unreachable

26:                                               ; preds = %34, %32, %28, %10
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @_ZN12cudaCompress17BitStreamReadOnlyD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %11) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  resume { ptr, i32 } %27

28:                                               ; preds = %21
  %29 = call noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %30 = shl nsw i64 %22, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %4, ptr align 2 %29, i64 %30, i1 false)
  invoke void @_ZN12cudaCompress4util14unsymbolizeCPUEPsPKtjjjjj(ptr noundef %2, ptr noundef %4, i32 noundef %5, i32 noundef %15, i32 noundef 1, i32 noundef 0, i32 noundef 0)
          to label %31 unwind label %26

31:                                               ; preds = %28
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %1, ptr align 2 %2, i64 %30, i1 false)
  switch i64 %8, label %34 [
    i64 1, label %32
    i64 2, label %32
    i64 7, label %32
  ]

32:                                               ; preds = %31, %31, %31
  %33 = shl i32 %5, 1
  invoke void @_ZN12cudaCompress4util21unPredictor7_tilesCPUEPKsPsiiii(ptr noundef %2, ptr noundef %1, i32 noundef %33, i32 noundef %5, i32 noundef %15, i32 noundef %9)
          to label %34 unwind label %26

34:                                               ; preds = %31, %32
  invoke void @_Z14__cudaCheckMsgPKcS0_i(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 461)
          to label %35 unwind label %26

35:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @_ZNSt6vectorItSaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @_ZN12cudaCompress17BitStreamReadOnlyD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %11) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorItSaItEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZN12cudaCompress15decodeRLHuffCPUEPPNS_17BitStreamReadOnlyEPPSt6vectorItSaItEEjjjb(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorItSaItEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorItSaItEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

declare void @_ZN12cudaCompress4util14unsymbolizeCPUEPsPKtjjjjj(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

declare void @_ZN12cudaCompress4util21unPredictor7_tilesCPUEPKsPsiiii(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

attributes #0 = { inlinehint 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress 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 = { "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 = { 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 #8 = { nounwind }
attributes #9 = { 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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass