; LLVM IR from Razakhel/RaZ :: extern/fastgltf/src (base64)

; 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" = type { [32 x i8] }
%"class.std::basic_string_view" = type { i64, ptr }

@_ZZN8fastgltf6base6419avx2_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhmE11shuffleData = external hidden constant %"struct.std::array", align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8fastgltf6base6419avx2_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhm(i64 %0, ptr %1, ptr noundef %2, i64 noundef %3) #0 {
  %5 = alloca %"class.std::basic_string_view", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::basic_string_view", align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca <4 x i64>, align 32
  %16 = alloca i64, align 8
  %17 = alloca <4 x i64>, align 32
  %18 = alloca <4 x i64>, align 32
  %19 = alloca <4 x i64>, align 32
  %20 = alloca <4 x i64>, align 32
  %21 = alloca <4 x i64>, align 32
  %22 = alloca <4 x i64>, align 32
  %23 = alloca <4 x i64>, align 32
  %24 = alloca <4 x i64>, align 32
  %25 = alloca <4 x i64>, align 32
  %26 = alloca %"class.std::basic_string_view", align 8
  %27 = getelementptr inbounds { i64, ptr }, ptr %5, i32 0, i32 0
  store i64 %0, ptr %27, align 8
  %28 = getelementptr inbounds { i64, ptr }, ptr %5, i32 0, i32 1
  store ptr %1, ptr %28, align 8
  store ptr %2, ptr %6, align 8, !tbaa !5
  store i64 %3, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  store i32 32, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 24, ptr %9, align 4, !tbaa !11
  %29 = call noundef i64 @_ZNKSt17basic_string_viewIcSt11char_traitsIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #10
  %30 = icmp ult i64 %29, 32
  br i1 %30, label %31, label %38

31:                                               ; preds = %4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %5, i64 16, i1 false), !tbaa.struct !13
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i64, ptr %7, align 8, !tbaa !9
  %34 = getelementptr inbounds { i64, ptr }, ptr %10, i32 0, i32 0
  %35 = load i64, ptr %34, align 8
  %36 = getelementptr inbounds { i64, ptr }, ptr %10, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8
  call void @_ZN8fastgltf6base6423fallback_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhm(i64 %35, ptr %37, ptr noundef %32, i64 noundef %33)
  store i32 1, ptr %11, align 4
  br label %90

38:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %39 = call noundef i64 @_ZNKSt17basic_string_viewIcSt11char_traitsIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #10
  store i64 %39, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %40 = load i64, ptr %12, align 8, !tbaa !9
  %41 = load i64, ptr %12, align 8, !tbaa !9
  %42 = urem i64 %41, 24
  %43 = sub i64 %40, %42
  store i64 %43, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %44, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #10
  %45 = call noundef ptr @_ZNKSt5arrayIhLm32EE4dataEv(ptr noundef nonnull align 1 dereferenceable(32) @_ZZN8fastgltf6base6419avx2_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhmE11shuffleData) #10
  %46 = call noundef i64 @_ZNKSt5arrayIhLm32EE4sizeEv(ptr noundef nonnull align 1 dereferenceable(32) @_ZZN8fastgltf6base6419avx2_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhmE11shuffleData) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 32 %15, ptr align 1 %45, i64 %46, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %52, %38
  %48 = load i64, ptr %16, align 8, !tbaa !9
  %49 = add i64 %48, 32
  %50 = load i64, ptr %13, align 8, !tbaa !9
  %51 = icmp ult i64 %49, %50
  br i1 %51, label %52, label %74

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #10
  %53 = load i64, ptr %16, align 8, !tbaa !9
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt17basic_string_viewIcSt11char_traitsIcEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %53) #10
  %55 = call noundef <4 x i64> @_ZL18_mm256_loadu_si256PKDv4_x(ptr noundef %54)
  store <4 x i64> %55, ptr %17, align 32, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #10
  %56 = load <4 x i64>, ptr %17, align 32, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #10
  store <4 x i64> %56, ptr %19, align 32, !tbaa !14
  %57 = call noundef <4 x i64> @_Z26avx2_lookup_pshufb_bitmaskDv4_x(ptr noundef byval(<4 x i64>) align 32 %19)
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #10
  store <4 x i64> %57, ptr %18, align 32, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #10
  %58 = load <4 x i64>, ptr %18, align 32, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #10
  store <4 x i64> %58, ptr %21, align 32, !tbaa !14
  %59 = call noundef <4 x i64> @_Z14avx2_pack_intsDv4_x(ptr noundef byval(<4 x i64>) align 32 %21)
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #10
  store <4 x i64> %59, ptr %20, align 32, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #10
  %60 = load <4 x i64>, ptr %20, align 32, !tbaa !14
  %61 = load <4 x i64>, ptr %15, align 32, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #10
  store <4 x i64> %60, ptr %23, align 32, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #10
  store <4 x i64> %61, ptr %24, align 32, !tbaa !14
  %62 = call noundef <4 x i64> @_ZL19_mm256_shuffle_epi8Dv4_xS_(ptr noundef byval(<4 x i64>) align 32 %23, ptr noundef byval(<4 x i64>) align 32 %24)
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #10
  store <4 x i64> %62, ptr %22, align 32, !tbaa !14
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = load <4 x i64>, ptr %22, align 32, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #10
  store <4 x i64> %64, ptr %25, align 32, !tbaa !14
  %65 = call noundef <2 x i64> @_ZL22_mm256_castsi256_si128Dv4_x(ptr noundef byval(<4 x i64>) align 32 %25)
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #10
  call void @_ZL16_mm_storeu_si128PDv2_xS_(ptr noundef %63, <2 x i64> noundef %65)
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i64 12
  %68 = load <4 x i64>, ptr %22, align 32, !tbaa !14
  %69 = shufflevector <4 x i64> %68, <4 x i64> poison, <2 x i32> <i32 2, i32 3>
  call void @_ZL16_mm_storeu_si128PDv2_xS_(ptr noundef %67, <2 x i64> noundef %69)
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 24
  store ptr %71, ptr %14, align 8, !tbaa !5
  %72 = load i64, ptr %16, align 8, !tbaa !9
  %73 = add i64 %72, 32
  store i64 %73, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #10
  br label %47, !llvm.loop !15

74:                                               ; preds = %47
  %75 = load i64, ptr %16, align 8, !tbaa !9
  %76 = load i64, ptr %12, align 8, !tbaa !9
  %77 = load i64, ptr %16, align 8, !tbaa !9
  %78 = sub i64 %76, %77
  %79 = call { i64, ptr } @_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %75, i64 noundef %78)
  %80 = getelementptr inbounds { i64, ptr }, ptr %26, i32 0, i32 0
  %81 = extractvalue { i64, ptr } %79, 0
  store i64 %81, ptr %80, align 8
  %82 = getelementptr inbounds { i64, ptr }, ptr %26, i32 0, i32 1
  %83 = extractvalue { i64, ptr } %79, 1
  store ptr %83, ptr %82, align 8
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = load i64, ptr %7, align 8, !tbaa !9
  %86 = getelementptr inbounds { i64, ptr }, ptr %26, i32 0, i32 0
  %87 = load i64, ptr %86, align 8
  %88 = getelementptr inbounds { i64, ptr }, ptr %26, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8
  call void @_ZN8fastgltf6base6423fallback_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhm(i64 %87, ptr %89, ptr noundef %84, i64 noundef %85)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  store i32 0, ptr %11, align 4
  br label %90

90:                                               ; preds = %74, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  %91 = load i32, ptr %11, align 4
  switch i32 %91, label %93 [
    i32 0, label %92
    i32 1, label %92
  ]

92:                                               ; preds = %90, %90
  ret void

93:                                               ; preds = %90
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8fastgltf6base6423fallback_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhm(i64, ptr, ptr noundef, i64 noundef) #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 ptr @_ZNKSt5arrayIhLm32EE4dataEv(ptr noundef nonnull align 1 dereferenceable(32)) #2 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x i64> @_ZL18_mm256_loadu_si256PKDv4_x(ptr noundef) #6

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef <4 x i64> @_Z26avx2_lookup_pshufb_bitmaskDv4_x(ptr noundef byval(<4 x i64>) align 32) #7

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef <4 x i64> @_Z14avx2_pack_intsDv4_x(ptr noundef byval(<4 x i64>) align 32) #7

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x i64> @_ZL19_mm256_shuffle_epi8Dv4_xS_(ptr noundef byval(<4 x i64>) align 32, ptr noundef byval(<4 x i64>) align 32) #8

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden void @_ZL16_mm_storeu_si128PDv2_xS_(ptr noundef, <2 x i64> noundef) #9

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <2 x i64> @_ZL22_mm256_castsi256_si128Dv4_x(ptr noundef byval(<4 x i64>) align 32) #6

; Function Attrs: mustprogress uwtable
declare dso_local { i64, ptr } @_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) #3 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="256" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="256" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" }
attributes #7 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="256" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" }
attributes #8 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="256" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" }
attributes #9 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 #10 = { nounwind }
attributes #11 = { nounwind willreturn memory(none) }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 8, !9, i64 8, i64 8, !5}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; 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" = type { [32 x i8] }
%"class.std::basic_string_view" = type { i64, ptr }

@_ZZN8fastgltf6base6419avx2_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhmE11shuffleData = external hidden constant %"struct.std::array", align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8fastgltf6base6419avx2_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhm(i64 %0, ptr %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #0 {
  %5 = alloca %"class.std::basic_string_view", align 8
  %6 = alloca <4 x i64>, align 32
  %7 = alloca <4 x i64>, align 32
  %8 = alloca <4 x i64>, align 32
  %9 = alloca <4 x i64>, align 32
  %10 = alloca <4 x i64>, align 32
  %11 = alloca <4 x i64>, align 32
  store i64 %0, ptr %5, align 8
  %12 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %1, ptr %12, align 8
  %13 = call noundef i64 @_ZNKSt17basic_string_viewIcSt11char_traitsIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #10
  %14 = icmp ult i64 %13, 32
  br i1 %14, label %15, label %16

15:                                               ; preds = %4
  %.sroa.018.0.copyload = load i64, ptr %5, align 8, !tbaa !5
  %.sroa.219.0.copyload = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN8fastgltf6base6423fallback_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhm(i64 %.sroa.018.0.copyload, ptr %.sroa.219.0.copyload, ptr noundef %2, i64 noundef %3)
  br label %39

16:                                               ; preds = %4
  %17 = call noundef i64 @_ZNKSt17basic_string_viewIcSt11char_traitsIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #10
  %18 = urem i64 %17, 24
  %19 = sub nuw i64 %17, %18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6)
  %20 = call noundef ptr @_ZNKSt5arrayIhLm32EE4dataEv(ptr noundef nonnull align 1 dereferenceable(32) @_ZZN8fastgltf6base6419avx2_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhmE11shuffleData) #10
  %21 = call noundef i64 @_ZNKSt5arrayIhLm32EE4sizeEv(ptr noundef nonnull align 1 dereferenceable(32) @_ZZN8fastgltf6base6419avx2_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhmE11shuffleData) #11
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 32 %6, ptr align 1 %20, i64 %21, i1 false)
  %22 = icmp ugt i64 %19, 32
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %16, %.lr.ph
  %23 = phi i64 [ %33, %.lr.ph ], [ 32, %16 ]
  %.027 = phi ptr [ %32, %.lr.ph ], [ %2, %16 ]
  %.02426 = phi i64 [ %23, %.lr.ph ], [ 0, %16 ]
  %24 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt17basic_string_viewIcSt11char_traitsIcEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %.02426) #10
  %25 = call noundef <4 x i64> @_ZL18_mm256_loadu_si256PKDv4_x(ptr noundef nonnull %24)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #10
  store <4 x i64> %25, ptr %7, align 32, !tbaa !11
  %26 = call noundef <4 x i64> @_Z26avx2_lookup_pshufb_bitmaskDv4_x(ptr noundef nonnull byval(<4 x i64>) align 32 %7)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #10
  store <4 x i64> %26, ptr %8, align 32, !tbaa !11
  %27 = call noundef <4 x i64> @_Z14avx2_pack_intsDv4_x(ptr noundef nonnull byval(<4 x i64>) align 32 %8)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  %.0..0..0..0. = load <4 x i64>, ptr %6, align 32, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #10
  store <4 x i64> %27, ptr %9, align 32, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  store <4 x i64> %.0..0..0..0., ptr %10, align 32, !tbaa !11
  %28 = call noundef <4 x i64> @_ZL19_mm256_shuffle_epi8Dv4_xS_(ptr noundef nonnull byval(<4 x i64>) align 32 %9, ptr noundef nonnull byval(<4 x i64>) align 32 %10)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #10
  store <4 x i64> %28, ptr %11, align 32, !tbaa !11
  %29 = call noundef <2 x i64> @_ZL22_mm256_castsi256_si128Dv4_x(ptr noundef nonnull byval(<4 x i64>) align 32 %11)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #10
  call void @_ZL16_mm_storeu_si128PDv2_xS_(ptr noundef %.027, <2 x i64> noundef %29)
  %30 = getelementptr inbounds i8, ptr %.027, i64 12
  %31 = shufflevector <4 x i64> %28, <4 x i64> poison, <2 x i32> <i32 2, i32 3>
  call void @_ZL16_mm_storeu_si128PDv2_xS_(ptr noundef nonnull %30, <2 x i64> noundef %31)
  %32 = getelementptr inbounds i8, ptr %.027, i64 24
  %33 = add i64 %23, 32
  %34 = icmp ult i64 %33, %19
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %16
  %.024.lcssa = phi i64 [ 0, %16 ], [ %23, %.lr.ph ]
  %.0.lcssa = phi ptr [ %2, %16 ], [ %32, %.lr.ph ]
  %35 = sub i64 %17, %.024.lcssa
  %36 = call { i64, ptr } @_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %.024.lcssa, i64 noundef %35)
  %37 = extractvalue { i64, ptr } %36, 0
  %38 = extractvalue { i64, ptr } %36, 1
  call void @_ZN8fastgltf6base6423fallback_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhm(i64 %37, ptr %38, ptr noundef %.0.lcssa, i64 noundef %3)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6)
  br label %39

39:                                               ; preds = %._crit_edge, %15
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8fastgltf6base6423fallback_decode_inplaceESt17basic_string_viewIcSt11char_traitsIcEEPhm(i64, ptr, ptr noundef, i64 noundef) local_unnamed_addr #3

; 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 noundef ptr @_ZNKSt5arrayIhLm32EE4dataEv(ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x i64> @_ZL18_mm256_loadu_si256PKDv4_x(ptr noundef) local_unnamed_addr #6

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef <4 x i64> @_Z26avx2_lookup_pshufb_bitmaskDv4_x(ptr noundef byval(<4 x i64>) align 32) local_unnamed_addr #7

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef <4 x i64> @_Z14avx2_pack_intsDv4_x(ptr noundef byval(<4 x i64>) align 32) local_unnamed_addr #7

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <4 x i64> @_ZL19_mm256_shuffle_epi8Dv4_xS_(ptr noundef byval(<4 x i64>) align 32, ptr noundef byval(<4 x i64>) align 32) local_unnamed_addr #8

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden void @_ZL16_mm_storeu_si128PDv2_xS_(ptr noundef, <2 x i64> noundef) local_unnamed_addr #9

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef <2 x i64> @_ZL22_mm256_castsi256_si128Dv4_x(ptr noundef byval(<4 x i64>) align 32) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local { i64, ptr } @_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="256" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="256" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" }
attributes #7 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="256" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" }
attributes #8 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="256" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" }
attributes #9 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 #10 = { nounwind }
attributes #11 = { nounwind willreturn memory(none) }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass