; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/tiny_audio/b3WriteWavFile.ll (ZN14b3WriteWavFile12closeWavFileEv)

; 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.b3WriteWavFile = type { ptr, ptr }
%struct.b3WriteWavFileInternalData = type { ptr, i32, i32, i32, i8, i32, i32, i32, i8, i8, %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14b3WriteWavFile12closeWavFileEv(ptr noundef nonnull align 8 dereferenceable(16) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  %9 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %10, i32 0, i32 0
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %1
  br label %128

15:                                               ; preds = %1
  call void @_ZN14b3WriteWavFile9flushDataEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 1, ptr %3, align 4, !tbaa !23
  %16 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %17, i32 0, i32 3
  %19 = load i32, ptr %18, align 8, !tbaa !24
  %20 = icmp eq i32 %19, 32
  br i1 %20, label %21, label %22

21:                                               ; preds = %15
  store i32 4, ptr %3, align 4, !tbaa !23
  br label %30

22:                                               ; preds = %15
  %23 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %24, i32 0, i32 3
  %26 = load i32, ptr %25, align 8, !tbaa !24
  %27 = icmp eq i32 %26, 64
  br i1 %27, label %28, label %29

28:                                               ; preds = %22
  store i32 8, ptr %3, align 4, !tbaa !23
  br label %29

29:                                               ; preds = %28, %22
  br label %30

30:                                               ; preds = %29, %21
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #3
  store i8 0, ptr %4, align 1, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 40, ptr %5, align 4, !tbaa !23
  %31 = load i32, ptr %3, align 4, !tbaa !23
  %32 = icmp sgt i32 %31, 2
  br i1 %32, label %39, label %33

33:                                               ; preds = %30
  %34 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !26
  %38 = icmp sgt i32 %37, 2
  br i1 %38, label %39, label %40

39:                                               ; preds = %33, %30
  store i8 1, ptr %4, align 1, !tbaa !25
  store i32 76, ptr %5, align 4, !tbaa !23
  br label %40

40:                                               ; preds = %39, %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %41 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %42, i32 0, i32 5
  %44 = load i32, ptr %43, align 8, !tbaa !27
  %45 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 8, !tbaa !26
  %49 = mul nsw i32 %44, %48
  %50 = load i32, ptr %3, align 4, !tbaa !23
  %51 = mul nsw i32 %49, %50
  store i32 %51, ptr %6, align 4, !tbaa !23
  %52 = load i32, ptr %6, align 4, !tbaa !23
  %53 = srem i32 %52, 2
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  store i8 0, ptr %7, align 1, !tbaa !28
  %56 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !11
  %60 = call i64 @fwrite(ptr noundef %7, i64 noundef 1, i64 noundef 1, ptr noundef %59)
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  br label %61

61:                                               ; preds = %55, %40
  %62 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = load i32, ptr %5, align 4, !tbaa !23
  %67 = sext i32 %66 to i64
  %68 = call i32 @fseek(ptr noundef %65, i64 noundef %67, i32 noundef 0)
  %69 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = call i64 @fwrite(ptr noundef %6, i64 noundef 4, i64 noundef 1, ptr noundef %72)
  %74 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %75, i32 0, i32 5
  %77 = load i32, ptr %76, align 8, !tbaa !27
  %78 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 8, !tbaa !26
  %82 = mul nsw i32 %77, %81
  %83 = load i32, ptr %3, align 4, !tbaa !23
  %84 = mul nsw i32 %82, %83
  %85 = add nsw i32 %84, 44
  store i32 %85, ptr %6, align 4, !tbaa !23
  %86 = load i8, ptr %4, align 1, !tbaa !25, !range !29, !noundef !30
  %87 = trunc i8 %86 to i1
  br i1 %87, label %88, label %91

88:                                               ; preds = %61
  %89 = load i32, ptr %6, align 4, !tbaa !23
  %90 = add nsw i32 %89, 36
  store i32 %90, ptr %6, align 4, !tbaa !23
  br label %91

91:                                               ; preds = %88, %61
  %92 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !11
  %96 = call i32 @fseek(ptr noundef %95, i64 noundef 4, i32 noundef 0)
  %97 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !11
  %101 = call i64 @fwrite(ptr noundef %6, i64 noundef 4, i64 noundef 1, ptr noundef %100)
  %102 = load i8, ptr %4, align 1, !tbaa !25, !range !29, !noundef !30
  %103 = trunc i8 %102 to i1
  br i1 %103, label %104, label %119

104:                                              ; preds = %91
  %105 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %106, i32 0, i32 5
  %108 = load i32, ptr %107, align 8, !tbaa !27
  store i32 %108, ptr %6, align 4, !tbaa !23
  %109 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !11
  %113 = call i32 @fseek(ptr noundef %112, i64 noundef 68, i32 noundef 0)
  %114 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = call i64 @fwrite(ptr noundef %6, i64 noundef 4, i64 noundef 1, ptr noundef %117)
  br label %119

119:                                              ; preds = %104, %91
  %120 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !11
  %124 = call i32 @fclose(ptr noundef %123)
  %125 = getelementptr inbounds %class.b3WriteWavFile, ptr %8, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.b3WriteWavFileInternalData, ptr %126, i32 0, i32 0
  store ptr null, ptr %127, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %128

128:                                              ; preds = %119, %14
  ret void
}

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

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

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14b3WriteWavFile9flushDataEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #0 align 2

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #2

declare i32 @fclose(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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, !6, i64 8}
!10 = !{!"_ZTS14b3WriteWavFile", !6, i64 8}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS26b3WriteWavFileInternalData", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !14, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !14, i64 36, !14, i64 37, !15, i64 40, !19, i64 64}
!13 = !{!"int", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIfSaIfEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!13, !13, i64 0}
!24 = !{!12, !13, i64 16}
!25 = !{!14, !14, i64 0}
!26 = !{!12, !13, i64 8}
!27 = !{!12, !13, i64 24}
!28 = !{!7, !7, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}


; 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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14b3WriteWavFile12closeWavFileEv(ptr noundef nonnull align 8 dereferenceable(16) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca i32, align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = load ptr, ptr %4, align 8, !tbaa !10
  %6 = icmp eq ptr %5, null
  br i1 %6, label %58, label %7

7:                                                ; preds = %1
  tail call void @_ZN14b3WriteWavFile9flushDataEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef 1)
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  %10 = load i32, ptr %9, align 8, !tbaa !22
  switch i32 %10, label %12 [
    i32 32, label %.thread
    i32 64, label %11
  ]

11:                                               ; preds = %7
  br label %.thread

12:                                               ; preds = %7
  %13 = getelementptr inbounds i8, ptr %8, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !23
  %15 = icmp sgt i32 %14, 2
  %spec.select13 = select i1 %15, i64 76, i64 40
  br label %.thread

.thread:                                          ; preds = %12, %7, %11
  %.0710 = phi i32 [ 4, %7 ], [ 8, %11 ], [ 1, %12 ]
  %.06 = phi i1 [ true, %7 ], [ true, %11 ], [ %15, %12 ]
  %.0 = phi i64 [ 76, %7 ], [ 76, %11 ], [ %spec.select13, %12 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %16 = getelementptr inbounds i8, ptr %8, i64 24
  %17 = load i32, ptr %16, align 8, !tbaa !24
  %18 = getelementptr inbounds i8, ptr %8, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !23
  %20 = mul i32 %17, %.0710
  %21 = mul i32 %20, %19
  store i32 %21, ptr %2, align 4, !tbaa !25
  %22 = and i32 %21, 1
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %25, label %23

23:                                               ; preds = %.thread
  %24 = load ptr, ptr %8, align 8, !tbaa !10
  %fputc = tail call i32 @fputc(i32 0, ptr %24)
  %.pre = load ptr, ptr %3, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %23, %.thread
  %26 = phi ptr [ %.pre, %23 ], [ %8, %.thread ]
  %27 = load ptr, ptr %26, align 8, !tbaa !10
  %28 = tail call i32 @fseek(ptr noundef %27, i64 noundef %.0, i32 noundef 0)
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = load ptr, ptr %29, align 8, !tbaa !10
  %31 = call i64 @fwrite(ptr noundef nonnull %2, i64 noundef 4, i64 noundef 1, ptr noundef %30)
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 24
  %34 = load i32, ptr %33, align 8, !tbaa !24
  %35 = getelementptr inbounds i8, ptr %32, i64 8
  %36 = load i32, ptr %35, align 8, !tbaa !23
  %37 = mul i32 %34, %.0710
  %38 = mul i32 %37, %36
  %spec.select.v = select i1 %.06, i32 80, i32 44
  %spec.select = add nsw i32 %38, %spec.select.v
  store i32 %spec.select, ptr %2, align 4, !tbaa !25
  %39 = load ptr, ptr %32, align 8, !tbaa !10
  %40 = tail call i32 @fseek(ptr noundef %39, i64 noundef 4, i32 noundef 0)
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = load ptr, ptr %41, align 8, !tbaa !10
  %43 = call i64 @fwrite(ptr noundef nonnull %2, i64 noundef 4, i64 noundef 1, ptr noundef %42)
  br i1 %.06, label %44, label %53

44:                                               ; preds = %25
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 24
  %47 = load i32, ptr %46, align 8, !tbaa !24
  store i32 %47, ptr %2, align 4, !tbaa !25
  %48 = load ptr, ptr %45, align 8, !tbaa !10
  %49 = tail call i32 @fseek(ptr noundef %48, i64 noundef 68, i32 noundef 0)
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = load ptr, ptr %50, align 8, !tbaa !10
  %52 = call i64 @fwrite(ptr noundef nonnull %2, i64 noundef 4, i64 noundef 1, ptr noundef %51)
  br label %53

53:                                               ; preds = %44, %25
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load ptr, ptr %54, align 8, !tbaa !10
  %56 = tail call i32 @fclose(ptr noundef %55)
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr null, ptr %57, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  br label %58

58:                                               ; preds = %1, %53
  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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14b3WriteWavFile9flushDataEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fputc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree 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 #3 = { nofree nounwind }
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, !7, i64 8}
!6 = !{!"_ZTS14b3WriteWavFile", !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"_ZTS26b3WriteWavFileInternalData", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !13, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !13, i64 36, !13, i64 37, !14, i64 40, !18, i64 64}
!12 = !{!"int", !8, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!"_ZTSSt6vectorIfSaIfEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!22 = !{!11, !12, i64 16}
!23 = !{!11, !12, i64 8}
!24 = !{!11, !12, i64 24}
!25 = !{!12, !12, i64 0}


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