; LLVM IR from Razakhel/RaZ :: src/RaZ/Data/WavLoad.ll (ZN3Raz9WavFormat4loadERKNS_8FilePathE)

; 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.Raz::AudioData" = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.3 }
%union.anon.3 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<Raz::WavFormat::(anonymous namespace)::WavInfo>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::WavFormat::(anonymous namespace)::WavInfo>::_Storage" = type { %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo" }
%"struct.Raz::WavFormat::(anonymous namespace)::WavInfo" = type { i32, i32, i16, i16, i32, i32, i16, i16, i32 }
%"struct.std::nullopt_t" = type { i8 }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz9WavFormat4loadERKNS_8FilePathE(ptr dead_on_unwind noalias writable sret(%"struct.Raz::AudioData") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::basic_ifstream", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i1, align 1
  %13 = alloca %"class.std::optional", align 4
  %14 = alloca %"struct.std::nullopt_t", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i1, align 1
  %18 = alloca i1, align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca i1, align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #8
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3RazplB5cxx11EPKcRKNS_8FilePathE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef @.str, ptr noundef nonnull align 8 dereferenceable(32) %23)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.1)
          to label %24 unwind label %40

24:                                               ; preds = %2
  invoke void @_ZN3Raz6Logger5debugERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %25 unwind label %44

25:                                               ; preds = %24
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 520, ptr %9) #8
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNK3Raz8FilePathcvPKcEv(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %9, ptr noundef %27, i32 noundef 4)
  %28 = load ptr, ptr %9, align 8, !tbaa !9
  %29 = getelementptr i8, ptr %28, i64 -24
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr %9, i64 %30
  %32 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %31)
          to label %33 unwind label %49

33:                                               ; preds = %25
  br i1 %32, label %34, label %70

34:                                               ; preds = %33
  store i1 true, ptr %12, align 1
  %35 = call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #8
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3RazplB5cxx11EPKcRKNS_8FilePathE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef @.str.2, ptr noundef nonnull align 8 dereferenceable(32) %36)
          to label %37 unwind label %53

37:                                               ; preds = %34
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.3)
          to label %38 unwind label %57

38:                                               ; preds = %37
  invoke void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %39 unwind label %61

39:                                               ; preds = %38
  store i1 false, ptr %12, align 1
  invoke void @__cxa_throw(ptr %35, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #9
          to label %250 unwind label %61

40:                                               ; preds = %2
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  br label %48

44:                                               ; preds = %24
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %48

48:                                               ; preds = %44, %40
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #8
  br label %245

49:                                               ; preds = %25
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %7, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %8, align 4
  br label %244

53:                                               ; preds = %34
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %7, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %8, align 4
  br label %66

57:                                               ; preds = %37
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %7, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %8, align 4
  br label %65

61:                                               ; preds = %39, %38
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %7, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %65

65:                                               ; preds = %61, %57
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %66

66:                                               ; preds = %65, %53
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  %67 = load i1, ptr %12, align 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  call void @__cxa_free_exception(ptr %35) #8
  br label %69

69:                                               ; preds = %68, %66
  br label %244

70:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #8
  invoke void @_ZN3Raz9WavFormat12_GLOBAL__N_111validateWavERSt14basic_ifstreamIcSt11char_traitsIcEE(ptr dead_on_unwind writable sret(%"class.std::optional") align 4 %13, ptr noundef nonnull align 8 dereferenceable(256) %9)
          to label %71 unwind label %79

71:                                               ; preds = %70
  %72 = call noundef zeroext i1 @_ZSteqIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEbRKSt8optionalIT_ESt9nullopt_t(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  br i1 %72, label %73, label %100

73:                                               ; preds = %71
  store i1 true, ptr %17, align 1
  %74 = call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #8
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3RazplB5cxx11EPKcRKNS_8FilePathE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef @.str.4, ptr noundef nonnull align 8 dereferenceable(32) %75)
          to label %76 unwind label %83

76:                                               ; preds = %73
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.5)
          to label %77 unwind label %87

77:                                               ; preds = %76
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %78 unwind label %91

78:                                               ; preds = %77
  store i1 false, ptr %17, align 1
  invoke void @__cxa_throw(ptr %74, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #9
          to label %250 unwind label %91

79:                                               ; preds = %70
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %7, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %8, align 4
  br label %243

83:                                               ; preds = %73
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %7, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %8, align 4
  br label %96

87:                                               ; preds = %76
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %7, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %8, align 4
  br label %95

91:                                               ; preds = %78, %77
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %7, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  br label %95

95:                                               ; preds = %91, %87
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  br label %96

96:                                               ; preds = %95, %83
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #8
  %97 = load i1, ptr %17, align 1
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  call void @__cxa_free_exception(ptr %74) #8
  br label %99

99:                                               ; preds = %98, %96
  br label %243

100:                                              ; preds = %71
  store i1 false, ptr %18, align 1
  %101 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 0, ptr %101, align 8, !tbaa !11
  %102 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 1
  store i32 0, ptr %102, align 4, !tbaa !19
  %103 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 8 %103, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %103) #8
  %104 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %105 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %104, i32 0, i32 7
  %106 = load i16, ptr %105, align 2, !tbaa !20
  %107 = zext i16 %106 to i32
  switch i32 %107, label %180 [
    i32 8, label %108
    i32 16, label %126
    i32 32, label %144
    i32 64, label %162
  ]

108:                                              ; preds = %100
  %109 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %110 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %109, i32 0, i32 3
  %111 = load i16, ptr %110, align 2, !tbaa !23
  %112 = zext i16 %111 to i32
  %113 = icmp eq i32 %112, 1
  br i1 %113, label %114, label %116

114:                                              ; preds = %108
  %115 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 4352, ptr %115, align 8, !tbaa !11
  br label %125

116:                                              ; preds = %108
  %117 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %118 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %117, i32 0, i32 3
  %119 = load i16, ptr %118, align 2, !tbaa !23
  %120 = zext i16 %119 to i32
  %121 = icmp eq i32 %120, 2
  br i1 %121, label %122, label %124

122:                                              ; preds = %116
  %123 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 4354, ptr %123, align 8, !tbaa !11
  br label %124

124:                                              ; preds = %122, %116
  br label %125

125:                                              ; preds = %124, %114
  br label %206

126:                                              ; preds = %100
  %127 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %128 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %127, i32 0, i32 3
  %129 = load i16, ptr %128, align 2, !tbaa !23
  %130 = zext i16 %129 to i32
  %131 = icmp eq i32 %130, 1
  br i1 %131, label %132, label %134

132:                                              ; preds = %126
  %133 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 4353, ptr %133, align 8, !tbaa !11
  br label %143

134:                                              ; preds = %126
  %135 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %136 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %135, i32 0, i32 3
  %137 = load i16, ptr %136, align 2, !tbaa !23
  %138 = zext i16 %137 to i32
  %139 = icmp eq i32 %138, 2
  br i1 %139, label %140, label %142

140:                                              ; preds = %134
  %141 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 4355, ptr %141, align 8, !tbaa !11
  br label %142

142:                                              ; preds = %140, %134
  br label %143

143:                                              ; preds = %142, %132
  br label %206

144:                                              ; preds = %100
  %145 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %146 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %145, i32 0, i32 3
  %147 = load i16, ptr %146, align 2, !tbaa !23
  %148 = zext i16 %147 to i32
  %149 = icmp eq i32 %148, 1
  br i1 %149, label %150, label %152

150:                                              ; preds = %144
  %151 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 65552, ptr %151, align 8, !tbaa !11
  br label %161

152:                                              ; preds = %144
  %153 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %154 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %153, i32 0, i32 3
  %155 = load i16, ptr %154, align 2, !tbaa !23
  %156 = zext i16 %155 to i32
  %157 = icmp eq i32 %156, 2
  br i1 %157, label %158, label %160

158:                                              ; preds = %152
  %159 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 65553, ptr %159, align 8, !tbaa !11
  br label %160

160:                                              ; preds = %158, %152
  br label %161

161:                                              ; preds = %160, %150
  br label %206

162:                                              ; preds = %100
  %163 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %164 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %163, i32 0, i32 3
  %165 = load i16, ptr %164, align 2, !tbaa !23
  %166 = zext i16 %165 to i32
  %167 = icmp eq i32 %166, 1
  br i1 %167, label %168, label %170

168:                                              ; preds = %162
  %169 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 65554, ptr %169, align 8, !tbaa !11
  br label %179

170:                                              ; preds = %162
  %171 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %172 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %171, i32 0, i32 3
  %173 = load i16, ptr %172, align 2, !tbaa !23
  %174 = zext i16 %173 to i32
  %175 = icmp eq i32 %174, 2
  br i1 %175, label %176, label %178

176:                                              ; preds = %170
  %177 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  store i32 65555, ptr %177, align 8, !tbaa !11
  br label %178

178:                                              ; preds = %176, %170
  br label %179

179:                                              ; preds = %178, %168
  br label %206

180:                                              ; preds = %100
  store i1 true, ptr %22, align 1
  %181 = call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #8
  %182 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %183 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %182, i32 0, i32 7
  %184 = load i16, ptr %183, align 2, !tbaa !20
  %185 = zext i16 %184 to i32
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21, i32 noundef %185) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef @.str.6, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %186 unwind label %189

186:                                              ; preds = %180
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.7)
          to label %187 unwind label %193

187:                                              ; preds = %186
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %181, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %188 unwind label %197

188:                                              ; preds = %187
  store i1 false, ptr %22, align 1
  invoke void @__cxa_throw(ptr %181, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #9
          to label %250 unwind label %197

189:                                              ; preds = %180
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %7, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %8, align 4
  br label %202

193:                                              ; preds = %186
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %7, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %8, align 4
  br label %201

197:                                              ; preds = %188, %187
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %7, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  br label %201

201:                                              ; preds = %197, %193
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  br label %202

202:                                              ; preds = %201, %189
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #8
  %203 = load i1, ptr %22, align 1
  br i1 %203, label %204, label %205

204:                                              ; preds = %202
  call void @__cxa_free_exception(ptr %181) #8
  br label %205

205:                                              ; preds = %204, %202
  br label %242

206:                                              ; preds = %179, %161, %143, %125
  %207 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 0
  %208 = load i32, ptr %207, align 8, !tbaa !11
  %209 = icmp eq i32 %208, 0
  br i1 %209, label %210, label %221

210:                                              ; preds = %206
  %211 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %211, ptr noundef @.str.8)
          to label %212 unwind label %213

212:                                              ; preds = %210
  invoke void @__cxa_throw(ptr %211, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #9
          to label %250 unwind label %217

213:                                              ; preds = %210
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %7, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %8, align 4
  call void @__cxa_free_exception(ptr %211) #8
  br label %242

217:                                              ; preds = %237, %231, %221, %212
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %7, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %8, align 4
  br label %242

221:                                              ; preds = %206
  %222 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %223 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %222, i32 0, i32 4
  %224 = load i32, ptr %223, align 4, !tbaa !24
  %225 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 1
  store i32 %224, ptr %225, align 4, !tbaa !19
  %226 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 2
  %227 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %13) #8
  %228 = getelementptr inbounds %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo", ptr %227, i32 0, i32 8
  %229 = load i32, ptr %228, align 4, !tbaa !25
  %230 = zext i32 %229 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %226, i64 noundef %230)
          to label %231 unwind label %217

231:                                              ; preds = %221
  %232 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 2
  %233 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %232) #8
  %234 = getelementptr inbounds %"struct.Raz::AudioData", ptr %0, i32 0, i32 2
  %235 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %234) #8
  %236 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %233, i64 noundef %235)
          to label %237 unwind label %217

237:                                              ; preds = %231
  invoke void @_ZN3Raz6Logger5debugEPKc(ptr noundef @.str.9)
          to label %238 unwind label %217

238:                                              ; preds = %237
  store i1 true, ptr %18, align 1
  %239 = load i1, ptr %18, align 1
  br i1 %239, label %241, label %240

240:                                              ; preds = %238
  call void @_ZN3Raz9AudioDataD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #8
  br label %241

241:                                              ; preds = %240, %238
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %9) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr %9) #8
  ret void

242:                                              ; preds = %217, %213, %205
  call void @_ZN3Raz9AudioDataD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #8
  br label %243

243:                                              ; preds = %242, %99, %79
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  br label %244

244:                                              ; preds = %243, %69, %49
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %9) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr %9) #8
  br label %245

245:                                              ; preds = %244, %48
  %246 = load ptr, ptr %7, align 8
  %247 = load i32, ptr %8, align 4
  %248 = insertvalue { ptr, i32 } poison, ptr %246, 0
  %249 = insertvalue { ptr, i32 } %248, i32 %247, 1
  resume { ptr, i32 } %249

250:                                              ; preds = %212, %188, %78, %39
  unreachable
}

declare void @_ZN3Raz6Logger5debugERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3RazplB5cxx11EPKcRKNS_8FilePathE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #0 align 2

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3Raz9WavFormat12_GLOBAL__N_111validateWavERSt14basic_ifstreamIcSt11char_traitsIcEE(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 4, ptr noundef nonnull align 8 dereferenceable(256)) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZSteqIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEbRKSt8optionalIT_ESt9nullopt_t(ptr noundef nonnull align 4 dereferenceable(32)) #4

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #7

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz6Logger5debugEPKc(ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz9AudioDataD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 align 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 = { "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 = { 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 #4 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn }

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN3Raz9AudioDataE", !13, i64 0, !14, i64 4, !15, i64 8}
!13 = !{!"_ZTSN3Raz11AudioFormatE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIhSaIhEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!12, !14, i64 4}
!20 = !{!21, !22, i64 22}
!21 = !{!"_ZTSN3Raz9WavFormat12_GLOBAL__N_17WavInfoE", !14, i64 0, !14, i64 4, !22, i64 8, !22, i64 10, !14, i64 12, !14, i64 16, !22, i64 20, !22, i64 22, !14, i64 24}
!22 = !{!"short", !7, i64 0}
!23 = !{!21, !22, i64 10}
!24 = !{!21, !14, i64 12}
!25 = !{!21, !14, i64 24}


; 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.Raz::AudioData" = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.3 }
%union.anon.3 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<Raz::WavFormat::(anonymous namespace)::WavInfo>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::WavFormat::(anonymous namespace)::WavInfo>::_Storage" = type { %"struct.Raz::WavFormat::(anonymous namespace)::WavInfo" }
%"struct.Raz::WavFormat::(anonymous namespace)::WavInfo" = type { i32, i32, i16, i16, i32, i32, i16, i16, i32 }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz9WavFormat4loadERKNS_8FilePathE(ptr dead_on_unwind noalias writable sret(%"struct.Raz::AudioData") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::basic_ifstream", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::optional", align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #9
  call void @_ZN3RazplB5cxx11EPKcRKNS_8FilePathE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull @.str, ptr noundef nonnull align 8 dereferenceable(32) %1)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.1)
          to label %14 unwind label %28

14:                                               ; preds = %2
  invoke void @_ZN3Raz6Logger5debugERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %15 unwind label %30

15:                                               ; preds = %14
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %5) #9
  %16 = call noundef ptr @_ZNK3Raz8FilePathcvPKcEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %5, ptr noundef %16, i32 noundef 4)
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr %5, i64 %19
  %21 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %20)
          to label %22 unwind label %33

22:                                               ; preds = %15
  br i1 %21, label %23, label %40

23:                                               ; preds = %22
  %24 = call ptr @__cxa_allocate_exception(i64 16) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  invoke void @_ZN3RazplB5cxx11EPKcRKNS_8FilePathE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull @.str.2, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %25 unwind label %.thread

25:                                               ; preds = %23
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.3)
          to label %26 unwind label %.thread46

26:                                               ; preds = %25
  invoke void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %27 unwind label %37

27:                                               ; preds = %26
  invoke void @__cxa_throw(ptr nonnull %24, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #10
          to label %146 unwind label %37

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %14
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  br label %32

32:                                               ; preds = %30, %28
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  br label %145

33:                                               ; preds = %15
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %144

.thread:                                          ; preds = %23
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  br label %39

.thread46:                                        ; preds = %25
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  br label %39

37:                                               ; preds = %26, %27
  %.012 = phi i1 [ false, %27 ], [ true, %26 ]
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  br i1 %.012, label %39, label %144

39:                                               ; preds = %.thread46, %.thread, %37
  %.pn38.pn45 = phi { ptr, i32 } [ %35, %.thread ], [ %38, %37 ], [ %36, %.thread46 ]
  call void @__cxa_free_exception(ptr %24) #9
  br label %144

40:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #9
  invoke void @_ZN3Raz9WavFormat12_GLOBAL__N_111validateWavERSt14basic_ifstreamIcSt11char_traitsIcEE(ptr dead_on_unwind nonnull writable sret(%"class.std::optional") align 4 %8, ptr noundef nonnull align 8 dereferenceable(256) %5)
          to label %41 unwind label %48

41:                                               ; preds = %40
  %42 = call noundef zeroext i1 @_ZSteqIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEbRKSt8optionalIT_ESt9nullopt_t(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  br i1 %42, label %43, label %55

43:                                               ; preds = %41
  %44 = call ptr @__cxa_allocate_exception(i64 16) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #9
  invoke void @_ZN3RazplB5cxx11EPKcRKNS_8FilePathE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull @.str.4, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %45 unwind label %.thread49

45:                                               ; preds = %43
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.5)
          to label %46 unwind label %.thread53

46:                                               ; preds = %45
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %47 unwind label %52

47:                                               ; preds = %46
  invoke void @__cxa_throw(ptr nonnull %44, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #10
          to label %146 unwind label %52

48:                                               ; preds = %40
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %143

.thread49:                                        ; preds = %43
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  br label %54

.thread53:                                        ; preds = %45
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  br label %54

52:                                               ; preds = %46, %47
  %.09 = phi i1 [ false, %47 ], [ true, %46 ]
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  br i1 %.09, label %54, label %143

54:                                               ; preds = %.thread53, %.thread49, %52
  %.pn34.pn52 = phi { ptr, i32 } [ %50, %.thread49 ], [ %53, %52 ], [ %51, %.thread53 ]
  call void @__cxa_free_exception(ptr %44) #9
  br label %143

55:                                               ; preds = %41
  %56 = getelementptr inbounds i8, ptr %0, i64 4
  %57 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 0, i64 32, i1 false)
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %57) #9
  %58 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %59 = getelementptr inbounds i8, ptr %58, i64 22
  %60 = load i16, ptr %59, align 2, !tbaa !8
  %61 = zext i16 %60 to i32
  %62 = add nsw i32 %61, -8
  %63 = call i32 @llvm.fshl.i32(i32 %62, i32 %62, i32 29)
  switch i32 %63, label %104 [
    i32 0, label %64
    i32 1, label %74
    i32 3, label %84
    i32 7, label %94
  ]

64:                                               ; preds = %55
  %65 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %66 = getelementptr inbounds i8, ptr %65, i64 10
  %67 = load i16, ptr %66, align 2, !tbaa !13
  %68 = icmp eq i16 %67, 1
  br i1 %68, label %.thread60.sink.split, label %69

69:                                               ; preds = %64
  %70 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %71 = getelementptr inbounds i8, ptr %70, i64 10
  %72 = load i16, ptr %71, align 2, !tbaa !13
  %73 = icmp eq i16 %72, 2
  br i1 %73, label %.thread60.sink.split, label %120

74:                                               ; preds = %55
  %75 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %76 = getelementptr inbounds i8, ptr %75, i64 10
  %77 = load i16, ptr %76, align 2, !tbaa !13
  %78 = icmp eq i16 %77, 1
  br i1 %78, label %.thread60.sink.split, label %79

79:                                               ; preds = %74
  %80 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %81 = getelementptr inbounds i8, ptr %80, i64 10
  %82 = load i16, ptr %81, align 2, !tbaa !13
  %83 = icmp eq i16 %82, 2
  br i1 %83, label %.thread60.sink.split, label %120

84:                                               ; preds = %55
  %85 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %86 = getelementptr inbounds i8, ptr %85, i64 10
  %87 = load i16, ptr %86, align 2, !tbaa !13
  %88 = icmp eq i16 %87, 1
  br i1 %88, label %.thread60.sink.split, label %89

89:                                               ; preds = %84
  %90 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %91 = getelementptr inbounds i8, ptr %90, i64 10
  %92 = load i16, ptr %91, align 2, !tbaa !13
  %93 = icmp eq i16 %92, 2
  br i1 %93, label %.thread60.sink.split, label %120

94:                                               ; preds = %55
  %95 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %96 = getelementptr inbounds i8, ptr %95, i64 10
  %97 = load i16, ptr %96, align 2, !tbaa !13
  %98 = icmp eq i16 %97, 1
  br i1 %98, label %.thread60.sink.split, label %99

99:                                               ; preds = %94
  %100 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %101 = getelementptr inbounds i8, ptr %100, i64 10
  %102 = load i16, ptr %101, align 2, !tbaa !13
  %103 = icmp eq i16 %102, 2
  br i1 %103, label %.thread60.sink.split, label %120

104:                                              ; preds = %55
  %105 = call ptr @__cxa_allocate_exception(i64 16) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #9
  %106 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %107 = getelementptr inbounds i8, ptr %106, i64 22
  %108 = load i16, ptr %107, align 2, !tbaa !8
  %109 = zext i16 %108 to i32
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, i32 noundef %109) #9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull @.str.6, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %110 unwind label %.thread56

110:                                              ; preds = %104
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.7)
          to label %111 unwind label %114

111:                                              ; preds = %110
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %105, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %112 unwind label %116

112:                                              ; preds = %111
  invoke void @__cxa_throw(ptr nonnull %105, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #10
          to label %146 unwind label %116

.thread56:                                        ; preds = %104
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  br label %119

114:                                              ; preds = %110
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %118

116:                                              ; preds = %112, %111
  %.0 = phi i1 [ false, %112 ], [ true, %111 ]
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  br label %118

118:                                              ; preds = %114, %116
  %.pn30 = phi { ptr, i32 } [ %117, %116 ], [ %115, %114 ]
  %.1 = phi i1 [ %.0, %116 ], [ true, %114 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  br i1 %.1, label %119, label %142

119:                                              ; preds = %.thread56, %118
  %.pn30.pn59 = phi { ptr, i32 } [ %113, %.thread56 ], [ %.pn30, %118 ]
  call void @__cxa_free_exception(ptr %105) #9
  br label %142

120:                                              ; preds = %99, %89, %79, %69
  %.pr = load i32, ptr %0, align 8, !tbaa !14
  %121 = icmp eq i32 %.pr, 0
  br i1 %121, label %122, label %.thread60

122:                                              ; preds = %120
  %123 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull @.str.8)
          to label %124 unwind label %125

124:                                              ; preds = %122
  invoke void @__cxa_throw(ptr nonnull %123, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #10
          to label %146 unwind label %127

125:                                              ; preds = %122
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %123) #9
  br label %142

127:                                              ; preds = %140, %136, %.thread60, %124
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %142

.thread60.sink.split:                             ; preds = %99, %94, %89, %84, %79, %74, %69, %64
  %.sink = phi i32 [ 4352, %64 ], [ 4354, %69 ], [ 4353, %74 ], [ 4355, %79 ], [ 65552, %84 ], [ 65553, %89 ], [ 65554, %94 ], [ 65555, %99 ]
  store i32 %.sink, ptr %0, align 8, !tbaa !14
  br label %.thread60

.thread60:                                        ; preds = %.thread60.sink.split, %120
  %129 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %130 = getelementptr inbounds i8, ptr %129, i64 12
  %131 = load i32, ptr %130, align 4, !tbaa !22
  store i32 %131, ptr %56, align 4, !tbaa !23
  %132 = call noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32) %8) #9
  %133 = getelementptr inbounds i8, ptr %132, i64 24
  %134 = load i32, ptr %133, align 4, !tbaa !24
  %135 = zext i32 %134 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %135)
          to label %136 unwind label %127

136:                                              ; preds = %.thread60
  %137 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #9
  %138 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #9
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %137, i64 noundef %138)
          to label %140 unwind label %127

140:                                              ; preds = %136
  invoke void @_ZN3Raz6Logger5debugEPKc(ptr noundef nonnull @.str.9)
          to label %141 unwind label %127

141:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #9
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #9
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %5) #9
  ret void

142:                                              ; preds = %118, %119, %127, %125
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn59, %119 ], [ %.pn30, %118 ], [ %128, %127 ], [ %126, %125 ]
  call void @_ZN3Raz9AudioDataD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #9
  br label %143

143:                                              ; preds = %52, %54, %142, %48
  %.pn34.pn.pn = phi { ptr, i32 } [ %.pn34.pn52, %54 ], [ %53, %52 ], [ %.pn30.pn.pn, %142 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #9
  br label %144

144:                                              ; preds = %37, %39, %143, %33
  %.pn38.pn.pn = phi { ptr, i32 } [ %.pn38.pn45, %39 ], [ %38, %37 ], [ %.pn34.pn.pn, %143 ], [ %34, %33 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #9
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %5) #9
  br label %145

145:                                              ; preds = %144, %32
  %.pn38.pn.pn.pn = phi { ptr, i32 } [ %.pn38.pn.pn, %144 ], [ %.pn, %32 ]
  resume { ptr, i32 } %.pn38.pn.pn.pn

146:                                              ; preds = %124, %112, %47, %27
  unreachable
}

declare void @_ZN3Raz6Logger5debugERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) 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: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3RazplB5cxx11EPKcRKNS_8FilePathE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #0 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3Raz9WavFormat12_GLOBAL__N_111validateWavERSt14basic_ifstreamIcSt11char_traitsIcEE(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 4, ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZSteqIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEbRKSt8optionalIT_ESt9nullopt_t(ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #4

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZNKSt8optionalIN3Raz9WavFormat12_GLOBAL__N_17WavInfoEEptEv(ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #7

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz6Logger5debugEPKc(ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz9AudioDataD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.fshl.i32(i32, i32, i32) #8

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 = { "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 = { 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 #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { noreturn }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !12, i64 22}
!9 = !{!"_ZTSN3Raz9WavFormat12_GLOBAL__N_17WavInfoE", !10, i64 0, !10, i64 4, !12, i64 8, !12, i64 10, !10, i64 12, !10, i64 16, !12, i64 20, !12, i64 22, !10, i64 24}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"short", !11, i64 0}
!13 = !{!9, !12, i64 10}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTSN3Raz9AudioDataE", !16, i64 0, !10, i64 4, !17, i64 8}
!16 = !{!"_ZTSN3Raz11AudioFormatE", !11, i64 0}
!17 = !{!"_ZTSSt6vectorIhSaIhEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !21, i64 0, !21, i64 8, !21, i64 16}
!21 = !{!"any pointer", !11, i64 0}
!22 = !{!9, !10, i64 12}
!23 = !{!15, !10, i64 4}
!24 = !{!9, !10, i64 24}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,SROAPass,SimplifyCFGPass