; LLVM IR from merpheus-dev/LavaEngine :: src/Utils/soloud/src/audiosource/wav (dr_impl)

; 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.drwav_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.drwav_data_format = type { i32, i32, i32, i32, i32 }
%struct.drwav = type { ptr, ptr, ptr, ptr, %struct.drwav_allocation_callbacks, i32, %struct.drwav_fmt, i32, i16, i16, i16, i64, i64, i64, i64, i64, i32, %struct.drwav_smpl, %struct.drwav__memory_stream, %struct.drwav__memory_stream_write, %struct.anon.1, %struct.anon.2, %struct.anon.3 }
%struct.drwav_fmt = type { i16, i16, i32, i32, i16, i16, i16, i16, i32, [16 x i8] }
%struct.drwav_smpl = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, [1 x %struct.drwav_smpl_loop] }
%struct.drwav_smpl_loop = type { i32, i32, i32, i32, i32, i32 }
%struct.drwav__memory_stream = type { ptr, i64, i64 }
%struct.drwav__memory_stream_write = type { ptr, ptr, i64, i64, i64 }
%struct.anon.1 = type { i64 }
%struct.anon.2 = type { i32, [2 x i16], [2 x i32], [4 x i32], i32, [2 x [2 x i32]] }
%struct.anon.3 = type { i32, [2 x i32], [2 x i32], [16 x i32], i32 }

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

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z43drwav_copy_allocation_callbacks_or_defaultsPK26drwav_allocation_callbacks(ptr dead_on_unwind noalias writable sret(%struct.drwav_allocation_callbacks) align 8, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z19drwav_preinit_writeP5drwavPK17drwav_data_formatjPFmPvPKvmEPFjS4_i17drwav_seek_originES4_PK26drwav_allocation_callbacks(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.drwav_allocation_callbacks, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i32 %2, ptr %11, align 4, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %22, label %19

19:                                               ; preds = %7
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %19, %7
  store i32 0, ptr %8, align 4
  br label %140

23:                                               ; preds = %19
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %30, label %26

26:                                               ; preds = %23
  %27 = load ptr, ptr %13, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  store i32 0, ptr %8, align 4
  br label %140

30:                                               ; preds = %26, %23
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.drwav_data_format, ptr %31, i32 0, i32 1
  %33 = load i32, ptr %32, align 4, !tbaa !11
  %34 = icmp eq i32 %33, 65534
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  store i32 0, ptr %8, align 4
  br label %140

36:                                               ; preds = %30
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.drwav_data_format, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = icmp eq i32 %39, 2
  br i1 %40, label %46, label %41

41:                                               ; preds = %36
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.drwav_data_format, ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = icmp eq i32 %44, 17
  br i1 %45, label %46, label %47

46:                                               ; preds = %41, %36
  store i32 0, ptr %8, align 4
  br label %140

47:                                               ; preds = %41
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %48, i8 0, i64 440, i1 false)
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.drwav, ptr %50, i32 0, i32 1
  store ptr %49, ptr %51, align 8, !tbaa !14
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.drwav, ptr %53, i32 0, i32 2
  store ptr %52, ptr %54, align 8, !tbaa !26
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.drwav, ptr %56, i32 0, i32 3
  store ptr %55, ptr %57, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #4
  %58 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_Z43drwav_copy_allocation_callbacks_or_defaultsPK26drwav_allocation_callbacks(ptr dead_on_unwind writable sret(%struct.drwav_allocation_callbacks) align 8 %16, ptr noundef %58)
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.drwav, ptr %59, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %60, ptr align 8 %16, i64 32, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.drwav, ptr %61, i32 0, i32 4
  %63 = getelementptr inbounds %struct.drwav_allocation_callbacks, ptr %62, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !29
  %65 = icmp eq ptr %64, null
  br i1 %65, label %78, label %66

66:                                               ; preds = %47
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.drwav, ptr %67, i32 0, i32 4
  %69 = getelementptr inbounds %struct.drwav_allocation_callbacks, ptr %68, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !30
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %79

72:                                               ; preds = %66
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.drwav, ptr %73, i32 0, i32 4
  %75 = getelementptr inbounds %struct.drwav_allocation_callbacks, ptr %74, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !31
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %79

78:                                               ; preds = %72, %47
  store i32 0, ptr %8, align 4
  br label %140

79:                                               ; preds = %72, %66
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.drwav_data_format, ptr %80, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !11
  %83 = trunc i32 %82 to i16
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.drwav, ptr %84, i32 0, i32 6
  %86 = getelementptr inbounds %struct.drwav_fmt, ptr %85, i32 0, i32 0
  store i16 %83, ptr %86, align 4, !tbaa !32
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.drwav_data_format, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !33
  %90 = trunc i32 %89 to i16
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.drwav, ptr %91, i32 0, i32 6
  %93 = getelementptr inbounds %struct.drwav_fmt, ptr %92, i32 0, i32 1
  store i16 %90, ptr %93, align 2, !tbaa !34
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.drwav_data_format, ptr %94, i32 0, i32 3
  %96 = load i32, ptr %95, align 4, !tbaa !35
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.drwav, ptr %97, i32 0, i32 6
  %99 = getelementptr inbounds %struct.drwav_fmt, ptr %98, i32 0, i32 2
  store i32 %96, ptr %99, align 4, !tbaa !36
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.drwav_data_format, ptr %100, i32 0, i32 4
  %102 = load i32, ptr %101, align 4, !tbaa !37
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.drwav_data_format, ptr %103, i32 0, i32 3
  %105 = load i32, ptr %104, align 4, !tbaa !35
  %106 = mul i32 %102, %105
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.drwav_data_format, ptr %107, i32 0, i32 2
  %109 = load i32, ptr %108, align 4, !tbaa !33
  %110 = mul i32 %106, %109
  %111 = udiv i32 %110, 8
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.drwav, ptr %112, i32 0, i32 6
  %114 = getelementptr inbounds %struct.drwav_fmt, ptr %113, i32 0, i32 3
  store i32 %111, ptr %114, align 4, !tbaa !38
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.drwav_data_format, ptr %115, i32 0, i32 2
  %117 = load i32, ptr %116, align 4, !tbaa !33
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.drwav_data_format, ptr %118, i32 0, i32 4
  %120 = load i32, ptr %119, align 4, !tbaa !37
  %121 = mul i32 %117, %120
  %122 = udiv i32 %121, 8
  %123 = trunc i32 %122 to i16
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.drwav, ptr %124, i32 0, i32 6
  %126 = getelementptr inbounds %struct.drwav_fmt, ptr %125, i32 0, i32 4
  store i16 %123, ptr %126, align 4, !tbaa !39
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.drwav_data_format, ptr %127, i32 0, i32 4
  %129 = load i32, ptr %128, align 4, !tbaa !37
  %130 = trunc i32 %129 to i16
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.drwav, ptr %131, i32 0, i32 6
  %133 = getelementptr inbounds %struct.drwav_fmt, ptr %132, i32 0, i32 5
  store i16 %130, ptr %133, align 2, !tbaa !40
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.drwav, ptr %134, i32 0, i32 6
  %136 = getelementptr inbounds %struct.drwav_fmt, ptr %135, i32 0, i32 6
  store i16 0, ptr %136, align 4, !tbaa !41
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.drwav, ptr %138, i32 0, i32 16
  store i32 %137, ptr %139, align 8, !tbaa !42
  store i32 1, ptr %8, align 4
  br label %140

140:                                              ; preds = %79, %78, %46, %35, %29, %22
  %141 = load i32, ptr %8, align 4
  ret i32 %141
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree 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 = { 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, !10, i64 4}
!12 = !{!"_ZTS17drwav_data_format", !13, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!13 = !{!"_ZTS15drwav_container", !7, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"_ZTS5drwav", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !16, i64 32, !13, i64 64, !17, i64 68, !10, i64 108, !18, i64 112, !18, i64 114, !18, i64 116, !19, i64 120, !19, i64 128, !19, i64 136, !19, i64 144, !19, i64 152, !10, i64 160, !20, i64 164, !21, i64 224, !22, i64 248, !23, i64 288, !24, i64 296, !25, i64 348}
!16 = !{!"_ZTS26drwav_allocation_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTS9drwav_fmt", !18, i64 0, !18, i64 2, !10, i64 4, !10, i64 8, !18, i64 12, !18, i64 14, !18, i64 16, !18, i64 18, !10, i64 20, !7, i64 24}
!18 = !{!"short", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTS10drwav_smpl", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 36}
!21 = !{!"_ZTS20drwav__memory_stream", !6, i64 0, !19, i64 8, !19, i64 16}
!22 = !{!"_ZTS26drwav__memory_stream_write", !6, i64 0, !6, i64 8, !19, i64 16, !19, i64 24, !19, i64 32}
!23 = !{!"_ZTSN5drwavUt_E", !19, i64 0}
!24 = !{!"_ZTSN5drwavUt0_E", !10, i64 0, !7, i64 4, !7, i64 8, !7, i64 16, !10, i64 32, !7, i64 36}
!25 = !{!"_ZTSN5drwavUt1_E", !10, i64 0, !7, i64 4, !7, i64 12, !7, i64 20, !10, i64 84}
!26 = !{!15, !6, i64 16}
!27 = !{!15, !6, i64 24}
!28 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!29 = !{!15, !6, i64 56}
!30 = !{!15, !6, i64 40}
!31 = !{!15, !6, i64 48}
!32 = !{!15, !18, i64 68}
!33 = !{!12, !10, i64 8}
!34 = !{!15, !18, i64 70}
!35 = !{!12, !10, i64 12}
!36 = !{!15, !10, i64 72}
!37 = !{!12, !10, i64 16}
!38 = !{!15, !10, i64 76}
!39 = !{!15, !18, i64 80}
!40 = !{!15, !18, i64 82}
!41 = !{!15, !18, i64 84}
!42 = !{!15, !10, i64 160}


; 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.drwav_allocation_callbacks = type { ptr, ptr, ptr, ptr }

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

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z43drwav_copy_allocation_callbacks_or_defaultsPK26drwav_allocation_callbacks(ptr dead_on_unwind noalias writable sret(%struct.drwav_allocation_callbacks) align 8, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef range(i32 0, 2) i32 @_Z19drwav_preinit_writeP5drwavPK17drwav_data_formatjPFmPvPKvmEPFjS4_i17drwav_seek_originES4_PK26drwav_allocation_callbacks(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #3 {
  %8 = alloca %struct.drwav_allocation_callbacks, align 8
  %9 = icmp eq ptr %0, null
  %10 = icmp eq ptr %3, null
  %or.cond = or i1 %9, %10
  br i1 %or.cond, label %57, label %11

11:                                               ; preds = %7
  %12 = icmp eq i32 %2, 0
  %13 = icmp eq ptr %4, null
  %or.cond3 = and i1 %12, %13
  br i1 %or.cond3, label %57, label %14

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %1, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !5
  switch i32 %16, label %17 [
    i32 65534, label %57
    i32 2, label %57
    i32 17, label %57
  ]

17:                                               ; preds = %14
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(440) %0, i8 0, i64 440, i1 false)
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %3, ptr %18, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %4, ptr %19, align 8, !tbaa !24
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %5, ptr %20, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @_Z43drwav_copy_allocation_callbacks_or_defaultsPK26drwav_allocation_callbacks(ptr dead_on_unwind nonnull writable sret(%struct.drwav_allocation_callbacks) align 8 %8, ptr noundef %6)
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  %22 = getelementptr inbounds i8, ptr %0, i64 56
  %23 = load ptr, ptr %22, align 8, !tbaa !28
  %24 = icmp eq ptr %23, null
  br i1 %24, label %57, label %25

25:                                               ; preds = %17
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = load ptr, ptr %26, align 8, !tbaa !29
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %33

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %0, i64 48
  %31 = load ptr, ptr %30, align 8, !tbaa !30
  %32 = icmp eq ptr %31, null
  br i1 %32, label %57, label %33

33:                                               ; preds = %29, %25
  %34 = load i32, ptr %15, align 4, !tbaa !5
  %35 = trunc i32 %34 to i16
  %36 = getelementptr inbounds i8, ptr %0, i64 68
  store i16 %35, ptr %36, align 4, !tbaa !31
  %37 = getelementptr inbounds i8, ptr %1, i64 8
  %38 = load i32, ptr %37, align 4, !tbaa !32
  %39 = trunc i32 %38 to i16
  %40 = getelementptr inbounds i8, ptr %0, i64 70
  store i16 %39, ptr %40, align 2, !tbaa !33
  %41 = getelementptr inbounds i8, ptr %1, i64 12
  %42 = load i32, ptr %41, align 4, !tbaa !34
  %43 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %42, ptr %43, align 4, !tbaa !35
  %44 = getelementptr inbounds i8, ptr %1, i64 16
  %45 = load i32, ptr %44, align 4, !tbaa !36
  %46 = mul i32 %45, %38
  %47 = mul i32 %46, %42
  %48 = lshr i32 %47, 3
  %49 = getelementptr inbounds i8, ptr %0, i64 76
  store i32 %48, ptr %49, align 4, !tbaa !37
  %50 = lshr i32 %46, 3
  %51 = trunc i32 %50 to i16
  %52 = getelementptr inbounds i8, ptr %0, i64 80
  store i16 %51, ptr %52, align 4, !tbaa !38
  %53 = trunc i32 %45 to i16
  %54 = getelementptr inbounds i8, ptr %0, i64 82
  store i16 %53, ptr %54, align 2, !tbaa !39
  %55 = getelementptr inbounds i8, ptr %0, i64 84
  store i16 0, ptr %55, align 4, !tbaa !40
  %56 = getelementptr inbounds i8, ptr %0, i64 160
  store i32 %2, ptr %56, align 8, !tbaa !41
  br label %57

57:                                               ; preds = %17, %29, %14, %14, %14, %11, %7, %33
  %.0 = phi i32 [ 1, %33 ], [ 0, %7 ], [ 0, %11 ], [ 0, %14 ], [ 0, %14 ], [ 0, %14 ], [ 0, %29 ], [ 0, %17 ]
  ret i32 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree 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 = { 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, !10, i64 4}
!6 = !{!"_ZTS17drwav_data_format", !7, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!7 = !{!"_ZTS15drwav_container", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTS5drwav", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !14, i64 32, !7, i64 64, !15, i64 68, !10, i64 108, !16, i64 112, !16, i64 114, !16, i64 116, !17, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !17, i64 152, !10, i64 160, !18, i64 164, !19, i64 224, !20, i64 248, !21, i64 288, !22, i64 296, !23, i64 348}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTS26drwav_allocation_callbacks", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!15 = !{!"_ZTS9drwav_fmt", !16, i64 0, !16, i64 2, !10, i64 4, !10, i64 8, !16, i64 12, !16, i64 14, !16, i64 16, !16, i64 18, !10, i64 20, !8, i64 24}
!16 = !{!"short", !8, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTS10drwav_smpl", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !8, i64 36}
!19 = !{!"_ZTS20drwav__memory_stream", !13, i64 0, !17, i64 8, !17, i64 16}
!20 = !{!"_ZTS26drwav__memory_stream_write", !13, i64 0, !13, i64 8, !17, i64 16, !17, i64 24, !17, i64 32}
!21 = !{!"_ZTSN5drwavUt_E", !17, i64 0}
!22 = !{!"_ZTSN5drwavUt0_E", !10, i64 0, !8, i64 4, !8, i64 8, !8, i64 16, !10, i64 32, !8, i64 36}
!23 = !{!"_ZTSN5drwavUt1_E", !10, i64 0, !8, i64 4, !8, i64 12, !8, i64 20, !10, i64 84}
!24 = !{!12, !13, i64 16}
!25 = !{!12, !13, i64 24}
!26 = !{i64 0, i64 8, !27, i64 8, i64 8, !27, i64 16, i64 8, !27, i64 24, i64 8, !27}
!27 = !{!13, !13, i64 0}
!28 = !{!12, !13, i64 56}
!29 = !{!12, !13, i64 40}
!30 = !{!12, !13, i64 48}
!31 = !{!12, !16, i64 68}
!32 = !{!6, !10, i64 8}
!33 = !{!12, !16, i64 70}
!34 = !{!6, !10, i64 12}
!35 = !{!12, !10, i64 72}
!36 = !{!6, !10, i64 16}
!37 = !{!12, !10, i64 76}
!38 = !{!12, !16, i64 80}
!39 = !{!12, !16, i64 82}
!40 = !{!12, !16, i64 84}
!41 = !{!12, !10, i64 160}


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