; LLVM IR from Razakhel/RaZ :: src/RaZ/Data/WavSave.ll (ZN3Raz9WavFormat4saveERKNS_8FilePathERKNS_9AudioDataE)

; 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.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_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"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.0 }
%union.anon.0 = 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 }
%"struct.std::array" = type { [4 x i8] }
%"struct.std::array.5" = type { [2 x i8] }
%"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 }

@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz9WavFormat4saveERKNS_8FilePathERKNS_9AudioDataE(ptr noundef nonnull align 8 dereferenceable(32) %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_ofstream", 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 %"struct.std::array", align 1
  %14 = alloca %"struct.std::array", align 1
  %15 = alloca i8, align 1
  %16 = alloca %"struct.std::array.5", align 1
  %17 = alloca i16, align 2
  %18 = alloca %"struct.std::array.5", align 1
  %19 = alloca %"struct.std::array", align 1
  %20 = alloca i16, align 2
  %21 = alloca %"struct.std::array", align 1
  %22 = alloca %"struct.std::array.5", align 1
  %23 = alloca %"struct.std::array.5", align 1
  %24 = alloca %"struct.std::array", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #7
  %25 = load ptr, ptr %3, 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) %25)
  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 %26 unwind label %42

26:                                               ; preds = %2
  invoke void @_ZN3Raz6Logger5debugERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %27 unwind label %46

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

35:                                               ; preds = %27
  br i1 %34, label %36, label %72

36:                                               ; preds = %35
  store i1 true, ptr %12, align 1
  %37 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  %38 = load ptr, ptr %3, 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) %38)
          to label %39 unwind label %55

39:                                               ; preds = %36
  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 %40 unwind label %59

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

41:                                               ; preds = %40
  store i1 false, ptr %12, align 1
  invoke void @__cxa_throw(ptr %37, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #8
          to label %264 unwind label %63

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

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

50:                                               ; preds = %46, %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  br label %259

51:                                               ; preds = %87, %85, %72, %27
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  br label %258

55:                                               ; preds = %36
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %7, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %8, align 4
  br label %68

59:                                               ; preds = %39
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %7, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %8, align 4
  br label %67

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

67:                                               ; preds = %63, %59
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %68

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

70:                                               ; preds = %68
  call void @__cxa_free_exception(ptr %37) #7
  br label %71

71:                                               ; preds = %70, %68
  br label %258

72:                                               ; preds = %35
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @.str.4)
          to label %74 unwind label %51

74:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.Raz::AudioData", ptr %75, i32 0, i32 2
  %77 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #7
  %78 = trunc i64 %77 to i32
  %79 = add i32 %78, 36
  %80 = invoke i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef %79)
          to label %81 unwind label %99

81:                                               ; preds = %74
  %82 = getelementptr inbounds %"struct.std::array", ptr %13, i32 0, i32 0
  store i32 %80, ptr %82, align 1
  %83 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %13) #9
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %83, i64 noundef 4)
          to label %85 unwind label %99

85:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @.str.5)
          to label %87 unwind label %51

87:                                               ; preds = %85
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @.str.6)
          to label %89 unwind label %51

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %90 = invoke i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef 16)
          to label %91 unwind label %103

91:                                               ; preds = %89
  %92 = getelementptr inbounds %"struct.std::array", ptr %14, i32 0, i32 0
  store i32 %90, ptr %92, align 1
  %93 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %14) #9
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %93, i64 noundef 4)
          to label %95 unwind label %103

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 0, ptr %15, align 1, !tbaa !11
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.Raz::AudioData", ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !12
  switch i32 %98, label %111 [
    i32 4352, label %107
    i32 4354, label %107
    i32 4353, label %108
    i32 4355, label %108
    i32 65552, label %109
    i32 65553, label %109
    i32 65554, label %110
    i32 65555, label %110
  ]

99:                                               ; preds = %81, %74
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %7, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %258

103:                                              ; preds = %91, %89
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %258

107:                                              ; preds = %95, %95
  store i8 8, ptr %15, align 1, !tbaa !11
  br label %122

108:                                              ; preds = %95, %95
  store i8 16, ptr %15, align 1, !tbaa !11
  br label %122

109:                                              ; preds = %95, %95
  store i8 32, ptr %15, align 1, !tbaa !11
  br label %122

110:                                              ; preds = %95, %95
  store i8 64, ptr %15, align 1, !tbaa !11
  br label %122

111:                                              ; preds = %95
  %112 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %112, ptr noundef @.str.7)
          to label %113 unwind label %114

113:                                              ; preds = %111
  invoke void @__cxa_throw(ptr %112, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #8
          to label %264 unwind label %118

114:                                              ; preds = %111
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %7, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %8, align 4
  call void @__cxa_free_exception(ptr %112) #7
  br label %257

118:                                              ; preds = %113
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %7, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %8, align 4
  br label %257

122:                                              ; preds = %110, %109, %108, %107
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #7
  %123 = load i8, ptr %15, align 1, !tbaa !11
  %124 = zext i8 %123 to i32
  %125 = icmp sge i32 %124, 32
  %126 = zext i1 %125 to i64
  %127 = select i1 %125, i32 3, i32 1
  %128 = trunc i32 %127 to i16
  %129 = invoke i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext %128)
          to label %130 unwind label %138

130:                                              ; preds = %122
  %131 = getelementptr inbounds %"struct.std::array.5", ptr %16, i32 0, i32 0
  store i16 %129, ptr %131, align 1
  %132 = call noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2) %16) #9
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %132, i64 noundef 2)
          to label %134 unwind label %138

134:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #7
  store i16 0, ptr %17, align 2, !tbaa !20
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.Raz::AudioData", ptr %135, i32 0, i32 0
  %137 = load i32, ptr %136, align 8, !tbaa !12
  switch i32 %137, label %144 [
    i32 4352, label %142
    i32 4353, label %142
    i32 65552, label %142
    i32 65554, label %142
    i32 4354, label %143
    i32 4355, label %143
    i32 65553, label %143
    i32 65555, label %143
  ]

138:                                              ; preds = %130, %122
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %7, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #7
  br label %257

142:                                              ; preds = %134, %134, %134, %134
  store i16 1, ptr %17, align 2, !tbaa !20
  br label %155

143:                                              ; preds = %134, %134, %134, %134
  store i16 2, ptr %17, align 2, !tbaa !20
  br label %155

144:                                              ; preds = %134
  %145 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %145, ptr noundef @.str.7)
          to label %146 unwind label %147

146:                                              ; preds = %144
  invoke void @__cxa_throw(ptr %145, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #8
          to label %264 unwind label %151

147:                                              ; preds = %144
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %7, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %8, align 4
  call void @__cxa_free_exception(ptr %145) #7
  br label %256

151:                                              ; preds = %146
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %7, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %8, align 4
  br label %256

155:                                              ; preds = %143, %142
  call void @llvm.lifetime.start.p0(i64 2, ptr %18) #7
  %156 = load i16, ptr %17, align 2, !tbaa !20
  %157 = invoke i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext %156)
          to label %158 unwind label %227

158:                                              ; preds = %155
  %159 = getelementptr inbounds %"struct.std::array.5", ptr %18, i32 0, i32 0
  store i16 %157, ptr %159, align 1
  %160 = call noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2) %18) #9
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %160, i64 noundef 2)
          to label %162 unwind label %227

162:                                              ; preds = %158
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = getelementptr inbounds %"struct.Raz::AudioData", ptr %163, i32 0, i32 1
  %165 = load i32, ptr %164, align 4, !tbaa !22
  %166 = invoke i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef %165)
          to label %167 unwind label %231

167:                                              ; preds = %162
  %168 = getelementptr inbounds %"struct.std::array", ptr %19, i32 0, i32 0
  store i32 %166, ptr %168, align 1
  %169 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %19) #9
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %169, i64 noundef 4)
          to label %171 unwind label %231

171:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr %20) #7
  %172 = load i8, ptr %15, align 1, !tbaa !11
  %173 = zext i8 %172 to i32
  %174 = sdiv i32 %173, 8
  %175 = load i16, ptr %17, align 2, !tbaa !20
  %176 = zext i16 %175 to i32
  %177 = mul nsw i32 %174, %176
  %178 = trunc i32 %177 to i16
  store i16 %178, ptr %20, align 2, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.Raz::AudioData", ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !22
  %182 = load i16, ptr %20, align 2, !tbaa !20
  %183 = zext i16 %182 to i32
  %184 = mul i32 %181, %183
  %185 = invoke i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef %184)
          to label %186 unwind label %235

186:                                              ; preds = %171
  %187 = getelementptr inbounds %"struct.std::array", ptr %21, i32 0, i32 0
  store i32 %185, ptr %187, align 1
  %188 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %21) #9
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %188, i64 noundef 4)
          to label %190 unwind label %235

190:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr %22) #7
  %191 = load i16, ptr %20, align 2, !tbaa !20
  %192 = invoke i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext %191)
          to label %193 unwind label %239

193:                                              ; preds = %190
  %194 = getelementptr inbounds %"struct.std::array.5", ptr %22, i32 0, i32 0
  store i16 %192, ptr %194, align 1
  %195 = call noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2) %22) #9
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %195, i64 noundef 2)
          to label %197 unwind label %239

197:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 2, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr %23) #7
  %198 = load i8, ptr %15, align 1, !tbaa !11
  %199 = zext i8 %198 to i16
  %200 = invoke i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext %199)
          to label %201 unwind label %243

201:                                              ; preds = %197
  %202 = getelementptr inbounds %"struct.std::array.5", ptr %23, i32 0, i32 0
  store i16 %200, ptr %202, align 1
  %203 = call noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2) %23) #9
  %204 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %203, i64 noundef 2)
          to label %205 unwind label %243

205:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 2, ptr %23) #7
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @.str.8)
          to label %207 unwind label %247

207:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.Raz::AudioData", ptr %208, i32 0, i32 2
  %210 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %209) #7
  %211 = trunc i64 %210 to i32
  %212 = invoke i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef %211)
          to label %213 unwind label %251

213:                                              ; preds = %207
  %214 = getelementptr inbounds %"struct.std::array", ptr %24, i32 0, i32 0
  store i32 %212, ptr %214, align 1
  %215 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %24) #9
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %215, i64 noundef 4)
          to label %217 unwind label %251

217:                                              ; preds = %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.Raz::AudioData", ptr %218, i32 0, i32 2
  %220 = call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %219) #7
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.Raz::AudioData", ptr %221, i32 0, i32 2
  %223 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %222) #7
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %220, i64 noundef %223)
          to label %225 unwind label %247

225:                                              ; preds = %217
  invoke void @_ZN3Raz6Logger5debugEPKc(ptr noundef @.str.9)
          to label %226 unwind label %247

226:                                              ; preds = %225
  call void @llvm.lifetime.end.p0(i64 2, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %9) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %9) #7
  ret void

227:                                              ; preds = %158, %155
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %7, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #7
  br label %256

231:                                              ; preds = %167, %162
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %7, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %256

235:                                              ; preds = %186, %171
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %7, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %255

239:                                              ; preds = %193, %190
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %7, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %22) #7
  br label %255

243:                                              ; preds = %201, %197
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %7, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %23) #7
  br label %255

247:                                              ; preds = %225, %217, %205
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %7, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %8, align 4
  br label %255

251:                                              ; preds = %213, %207
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %7, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %255

255:                                              ; preds = %251, %247, %243, %239, %235
  call void @llvm.lifetime.end.p0(i64 2, ptr %20) #7
  br label %256

256:                                              ; preds = %255, %231, %227, %151, %147
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #7
  br label %257

257:                                              ; preds = %256, %138, %118, %114
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  br label %258

258:                                              ; preds = %257, %103, %99, %71, %51
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %9) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %9) #7
  br label %259

259:                                              ; preds = %258, %50
  %260 = load ptr, ptr %7, align 8
  %261 = load i32, ptr %8, align 4
  %262 = insertvalue { ptr, i32 } poison, ptr %260, 0
  %263 = insertvalue { ptr, i32 } %262, i32 %261, 1
  resume { ptr, i32 } %263

264:                                              ; preds = %146, %113, %41
  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_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef) #4

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

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4)) #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext) #4

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(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: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) 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 = { mustprogress nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { nounwind willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ZTSN3Raz9AudioDataE", !14, i64 0, !15, i64 4, !16, i64 8}
!14 = !{!"_ZTSN3Raz11AudioFormatE", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIhSaIhEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!21, !21, i64 0}
!21 = !{!"short", !7, i64 0}
!22 = !{!13, !15, i64 4}


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

%"class.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_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"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.0 }
%union.anon.0 = 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 }
%"struct.std::array" = type { [4 x i8] }
%"struct.std::array.5" = type { [2 x i8] }

@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz9WavFormat4saveERKNS_8FilePathERKNS_9AudioDataE(ptr noundef nonnull align 8 dereferenceable(32) %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_ofstream", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"struct.std::array", align 4
  %9 = alloca %"struct.std::array", align 4
  %10 = alloca %"struct.std::array.5", align 2
  %11 = alloca %"struct.std::array.5", align 2
  %12 = alloca %"struct.std::array", align 4
  %13 = alloca %"struct.std::array", align 4
  %14 = alloca %"struct.std::array.5", align 2
  %15 = alloca %"struct.std::array.5", align 2
  %16 = alloca %"struct.std::array", align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  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) %0)
  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 %17 unwind label %31

17:                                               ; preds = %2
  invoke void @_ZN3Raz6Logger5debugERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %18 unwind label %33

18:                                               ; preds = %17
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %5) #7
  %19 = call noundef ptr @_ZNK3Raz8FilePathcvPKcEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef %19, i32 noundef 4)
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %5, i64 %22
  %24 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %23)
          to label %25 unwind label %36

25:                                               ; preds = %18
  br i1 %24, label %26, label %43

26:                                               ; preds = %25
  %27 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  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) %0)
          to label %28 unwind label %.thread

28:                                               ; preds = %26
  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 %29 unwind label %.thread48

29:                                               ; preds = %28
  invoke void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %30 unwind label %40

30:                                               ; preds = %29
  invoke void @__cxa_throw(ptr nonnull %27, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #8
          to label %153 unwind label %40

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

33:                                               ; preds = %17
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br label %35

35:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %152

36:                                               ; preds = %55, %53, %43, %18
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %151

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

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

40:                                               ; preds = %29, %30
  %.022 = phi i1 [ false, %30 ], [ true, %29 ]
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br i1 %.022, label %42, label %151

42:                                               ; preds = %.thread48, %.thread, %40
  %.pn40.pn47 = phi { ptr, i32 } [ %38, %.thread ], [ %41, %40 ], [ %39, %.thread48 ]
  call void @__cxa_free_exception(ptr %27) #7
  br label %151

43:                                               ; preds = %25
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.4)
          to label %45 unwind label %36

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %46 = getelementptr inbounds i8, ptr %1, i64 8
  %47 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #7
  %48 = trunc i64 %47 to i32
  %49 = add i32 %48, 36
  %50 = call i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef %49)
  store i32 %50, ptr %8, align 4
  %51 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %8) #9
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %51, i64 noundef 4)
          to label %53 unwind label %63

53:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.5)
          to label %55 unwind label %36

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.6)
          to label %57 unwind label %36

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %58 = call i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef 16)
  store i32 %58, ptr %9, align 4
  %59 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %9) #9
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %59, i64 noundef 4)
          to label %61 unwind label %65

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  %62 = load i32, ptr %1, align 8, !tbaa !8
  switch i32 %62, label %70 [
    i32 4352, label %77
    i32 4354, label %77
    i32 4353, label %67
    i32 4355, label %67
    i32 65552, label %68
    i32 65553, label %68
    i32 65554, label %69
    i32 65555, label %69
  ]

63:                                               ; preds = %45
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %151

65:                                               ; preds = %57
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %151

67:                                               ; preds = %61, %61
  br label %77

68:                                               ; preds = %61, %61
  br label %77

69:                                               ; preds = %61, %61
  br label %77

70:                                               ; preds = %61
  %71 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull @.str.7)
          to label %72 unwind label %73

72:                                               ; preds = %70
  invoke void @__cxa_throw(ptr nonnull %71, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #8
          to label %153 unwind label %75

73:                                               ; preds = %70
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %71) #7
  br label %151

75:                                               ; preds = %72
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %151

77:                                               ; preds = %61, %61, %69, %68, %67
  %78 = phi i16 [ 3, %69 ], [ 3, %68 ], [ 1, %67 ], [ 1, %61 ], [ 1, %61 ]
  %.021 = phi i8 [ 64, %69 ], [ 32, %68 ], [ 16, %67 ], [ 8, %61 ], [ 8, %61 ]
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %10) #7
  %79 = call i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext %78)
  store i16 %79, ptr %10, align 2
  %80 = call noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2) %10) #9
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %80, i64 noundef 2)
          to label %82 unwind label %84

82:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #7
  %83 = load i32, ptr %1, align 8, !tbaa !8
  switch i32 %83, label %87 [
    i32 4352, label %94
    i32 4353, label %94
    i32 65552, label %94
    i32 65554, label %94
    i32 4354, label %86
    i32 4355, label %86
    i32 65553, label %86
    i32 65555, label %86
  ]

84:                                               ; preds = %77
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #7
  br label %151

86:                                               ; preds = %82, %82, %82, %82
  br label %94

87:                                               ; preds = %82
  %88 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %88, ptr noundef nonnull @.str.7)
          to label %89 unwind label %90

89:                                               ; preds = %87
  invoke void @__cxa_throw(ptr nonnull %88, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #8
          to label %153 unwind label %92

90:                                               ; preds = %87
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %88) #7
  br label %151

92:                                               ; preds = %89
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %151

94:                                               ; preds = %82, %82, %82, %82, %86
  %.020 = phi i16 [ 2, %86 ], [ 1, %82 ], [ 1, %82 ], [ 1, %82 ], [ 1, %82 ]
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %11) #7
  %95 = call i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext %.020)
  store i16 %95, ptr %11, align 2
  %96 = call noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2) %11) #9
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %96, i64 noundef 2)
          to label %98 unwind label %137

98:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %99 = getelementptr inbounds i8, ptr %1, i64 4
  %100 = load i32, ptr %99, align 4, !tbaa !18
  %101 = call i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef %100)
  store i32 %101, ptr %12, align 4
  %102 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %12) #9
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %102, i64 noundef 4)
          to label %104 unwind label %139

104:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  %105 = lshr exact i8 %.021, 3
  %106 = zext nneg i8 %105 to i16
  %107 = mul nuw nsw i16 %.020, %106
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %108 = load i32, ptr %99, align 4, !tbaa !18
  %109 = zext nneg i16 %107 to i32
  %110 = mul i32 %108, %109
  %111 = call i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef %110)
  store i32 %111, ptr %13, align 4
  %112 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %13) #9
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %112, i64 noundef 4)
          to label %114 unwind label %141

114:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %14) #7
  %115 = call i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext %107)
  store i16 %115, ptr %14, align 2
  %116 = call noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2) %14) #9
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %116, i64 noundef 2)
          to label %118 unwind label %143

118:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %15) #7
  %119 = zext nneg i8 %.021 to i16
  %120 = call i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext %119)
  store i16 %120, ptr %15, align 2
  %121 = call noundef ptr @_ZNSt5arrayIcLm2EE4dataEv(ptr noundef nonnull align 1 dereferenceable(2) %15) #9
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %121, i64 noundef 2)
          to label %123 unwind label %145

123:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %15) #7
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.8)
          to label %125 unwind label %147

125:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  %126 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #7
  %127 = trunc i64 %126 to i32
  %128 = call i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef %127)
  store i32 %128, ptr %16, align 4
  %129 = call noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4) %16) #9
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %129, i64 noundef 4)
          to label %131 unwind label %149

131:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  %132 = call noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #7
  %133 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #7
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %132, i64 noundef %133)
          to label %135 unwind label %147

135:                                              ; preds = %131
  invoke void @_ZN3Raz6Logger5debugEPKc(ptr noundef nonnull @.str.9)
          to label %136 unwind label %147

136:                                              ; preds = %135
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %5) #7
  ret void

137:                                              ; preds = %94
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %11) #7
  br label %151

139:                                              ; preds = %98
  %140 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %151

141:                                              ; preds = %104
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  br label %151

143:                                              ; preds = %114
  %144 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %14) #7
  br label %151

145:                                              ; preds = %118
  %146 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %15) #7
  br label %151

147:                                              ; preds = %135, %131, %123
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %151

149:                                              ; preds = %125
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %151

151:                                              ; preds = %73, %75, %84, %141, %143, %145, %147, %149, %139, %137, %92, %90, %40, %42, %65, %63, %36
  %.pn40.pn.pn = phi { ptr, i32 } [ %.pn40.pn47, %42 ], [ %41, %40 ], [ %66, %65 ], [ %37, %36 ], [ %64, %63 ], [ %76, %75 ], [ %74, %73 ], [ %85, %84 ], [ %93, %92 ], [ %91, %90 ], [ %140, %139 ], [ %138, %137 ], [ %148, %147 ], [ %150, %149 ], [ %146, %145 ], [ %144, %143 ], [ %142, %141 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %5) #7
  br label %152

152:                                              ; preds = %151, %35
  %.pn40.pn.pn.pn = phi { ptr, i32 } [ %.pn40.pn.pn, %151 ], [ %.pn, %35 ]
  resume { ptr, i32 } %.pn40.pn.pn.pn

153:                                              ; preds = %89, %72, %30
  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_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden i32 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian32Ej(i32 noundef) local_unnamed_addr #4

; 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 nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm4EE4dataEv(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden i16 @_ZN3Raz9WavFormat12_GLOBAL__N_116toLittleEndian16Et(i16 noundef zeroext) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt6vectorIhSaIhEE4dataEv(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: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) 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 = { 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 nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { nounwind willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"_ZTSN3Raz9AudioDataE", !10, i64 0, !12, i64 4, !13, i64 8}
!10 = !{!"_ZTSN3Raz11AudioFormatE", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"int", !11, i64 0}
!13 = !{!"_ZTSSt6vectorIhSaIhEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !11, i64 0}
!18 = !{!9, !12, i64 4}


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