; LLVM IR from glaretechnologies/substrata :: resonance-audio/resonance_audio/utils/wav_reader.ll (ZN7vraudio9WavReader11ParseHeaderEv)

; 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.vraudio::(anonymous namespace)::WavHeader" = type { %struct.anon, %"struct.vraudio::(anonymous namespace)::WavFormat", %struct.anon.0 }
%struct.anon = type { %"struct.vraudio::(anonymous namespace)::ChunkHeader", [4 x i8] }
%"struct.vraudio::(anonymous namespace)::ChunkHeader" = type { [4 x i8], i32 }
%"struct.vraudio::(anonymous namespace)::WavFormat" = type { %"struct.vraudio::(anonymous namespace)::ChunkHeader", i16, i16, i32, i32, i16, i16 }
%struct.anon.0 = type { %"struct.vraudio::(anonymous namespace)::ChunkHeader" }
%"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::allocator" = type { i8 }
%"class.std::fpos" = type { i64, %struct.__mbstate_t }
%struct.__mbstate_t = type { i32, %union.anon.1 }
%union.anon.1 = type { i32 }
%"class.vraudio::WavReader" = type { ptr, i8, i64, i32, i64, i64, i64, i64 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7vraudio9WavReader11ParseHeaderEv(ptr noundef nonnull align 8 dereferenceable(64) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"struct.vraudio::(anonymous namespace)::WavHeader", align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i16, align 2
  %8 = alloca i8, align 1
  %9 = alloca i64, align 8
  %10 = alloca %"struct.vraudio::(anonymous namespace)::ChunkHeader", align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca i1, align 1
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i1, align 1
  %22 = alloca i1, align 1
  %23 = alloca i1, align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca i1, align 1
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca i1, align 1
  %28 = alloca i1, align 1
  %29 = alloca i1, align 1
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca i1, align 1
  %32 = alloca %"class.std::allocator", align 1
  %33 = alloca i1, align 1
  %34 = alloca i1, align 1
  %35 = alloca i1, align 1
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca i1, align 1
  %38 = alloca %"class.std::allocator", align 1
  %39 = alloca i1, align 1
  %40 = alloca i1, align 1
  %41 = alloca i1, align 1
  %42 = alloca i64, align 8
  %43 = alloca %"class.std::fpos", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %44 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 44, ptr %4) #5
  %45 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %44, ptr noundef %4, i64 noundef 36)
  %46 = icmp ne i64 %45, 36
  br i1 %46, label %47, label %48

47:                                               ; preds = %1
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %393

48:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %49 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %50 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::ChunkHeader", ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !9
  store i32 %52, ptr %6, align 4, !tbaa !17
  %53 = load i32, ptr %6, align 4, !tbaa !17
  %54 = icmp ult i32 %53, 16
  br i1 %54, label %55, label %56

55:                                               ; preds = %48
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %391

56:                                               ; preds = %48
  %57 = load i32, ptr %6, align 4, !tbaa !17
  %58 = icmp ne i32 %57, 16
  br i1 %58, label %59, label %85

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 2, ptr %7) #5
  %60 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %44, ptr noundef %7, i64 noundef 2)
  %61 = icmp ne i64 %60, 2
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %82

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !18
  br label %64

64:                                               ; preds = %75, %63
  %65 = load i64, ptr %9, align 8, !tbaa !18
  %66 = load i16, ptr %7, align 2, !tbaa !20
  %67 = sext i16 %66 to i64
  %68 = icmp ult i64 %65, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %64
  store i32 2, ptr %5, align 4
  br label %78

70:                                               ; preds = %64
  %71 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %44, ptr noundef %8, i64 noundef 1)
  %72 = icmp ne i64 %71, 1
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %78

74:                                               ; preds = %70
  br label %75

75:                                               ; preds = %74
  %76 = load i64, ptr %9, align 8, !tbaa !18
  %77 = add i64 %76, 1
  store i64 %77, ptr %9, align 8, !tbaa !18
  br label %64, !llvm.loop !21

78:                                               ; preds = %73, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %79 = load i32, ptr %5, align 4
  switch i32 %79, label %81 [
    i32 2, label %80
  ]

80:                                               ; preds = %78
  store i32 0, ptr %5, align 4
  br label %81

81:                                               ; preds = %80, %78
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  br label %82

82:                                               ; preds = %81, %62
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #5
  %83 = load i32, ptr %5, align 4
  switch i32 %83, label %391 [
    i32 0, label %84
  ]

84:                                               ; preds = %82
  br label %85

85:                                               ; preds = %84, %56
  %86 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %87 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %86, i32 0, i32 1
  %88 = load i16, ptr %87, align 4, !tbaa !23
  %89 = zext i16 %88 to i32
  %90 = icmp eq i32 %89, 65534
  br i1 %90, label %91, label %134

91:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %92 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %44, ptr noundef %10, i64 noundef 8)
  %93 = icmp ne i64 %92, 8
  br i1 %93, label %94, label %95

94:                                               ; preds = %91
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %131

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  %96 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::ChunkHeader", ptr %10, i32 0, i32 0
  %97 = getelementptr inbounds [4 x i8], ptr %96, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef %97, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %98 unwind label %102

98:                                               ; preds = %95
  %99 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str)
          to label %100 unwind label %106

100:                                              ; preds = %98
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br i1 %99, label %101, label %111

101:                                              ; preds = %100
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %131

102:                                              ; preds = %95
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %13, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %14, align 4
  br label %110

106:                                              ; preds = %98
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %13, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %110

110:                                              ; preds = %106, %102
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %392

111:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !18
  br label %112

112:                                              ; preds = %124, %111
  %113 = load i64, ptr %16, align 8, !tbaa !18
  %114 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::ChunkHeader", ptr %10, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !24
  %116 = zext i32 %115 to i64
  %117 = icmp ult i64 %113, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %112
  store i32 5, ptr %5, align 4
  br label %127

119:                                              ; preds = %112
  %120 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %44, ptr noundef %15, i64 noundef 1)
  %121 = icmp ne i64 %120, 1
  br i1 %121, label %122, label %123

122:                                              ; preds = %119
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %127

123:                                              ; preds = %119
  br label %124

124:                                              ; preds = %123
  %125 = load i64, ptr %16, align 8, !tbaa !18
  %126 = add i64 %125, 1
  store i64 %126, ptr %16, align 8, !tbaa !18
  br label %112, !llvm.loop !25

127:                                              ; preds = %122, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %128 = load i32, ptr %5, align 4
  switch i32 %128, label %130 [
    i32 5, label %129
  ]

129:                                              ; preds = %127
  store i32 0, ptr %5, align 4
  br label %130

130:                                              ; preds = %129, %127
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %131

131:                                              ; preds = %130, %101, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %132 = load i32, ptr %5, align 4
  switch i32 %132, label %391 [
    i32 0, label %133
  ]

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %133, %85
  %135 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 2
  %136 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %44, ptr noundef %135, i64 noundef 8)
  %137 = icmp ne i64 %136, 8
  br i1 %137, label %138, label %139

138:                                              ; preds = %134
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %391

139:                                              ; preds = %134
  %140 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %141 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %140, i32 0, i32 2
  %142 = load i16, ptr %141, align 2, !tbaa !26
  %143 = zext i16 %142 to i64
  %144 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 2
  store i64 %143, ptr %144, align 8, !tbaa !27
  %145 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %146 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %145, i32 0, i32 3
  %147 = load i32, ptr %146, align 4, !tbaa !31
  %148 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 3
  store i32 %147, ptr %148, align 8, !tbaa !32
  %149 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %150 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %149, i32 0, i32 6
  %151 = load i16, ptr %150, align 2, !tbaa !33
  %152 = zext i16 %151 to i32
  %153 = sdiv i32 %152, 8
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 6
  store i64 %154, ptr %155, align 8, !tbaa !34
  %156 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 6
  %157 = load i64, ptr %156, align 8, !tbaa !34
  %158 = icmp eq i64 %157, 0
  br i1 %158, label %163, label %159

159:                                              ; preds = %139
  %160 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 6
  %161 = load i64, ptr %160, align 8, !tbaa !34
  %162 = icmp ne i64 %161, 2
  br i1 %162, label %163, label %164

163:                                              ; preds = %159, %139
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %391

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %165 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 2
  %166 = getelementptr inbounds %struct.anon.0, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::ChunkHeader", ptr %166, i32 0, i32 1
  %168 = load i32, ptr %167, align 4, !tbaa !35
  %169 = zext i32 %168 to i64
  store i64 %169, ptr %17, align 8, !tbaa !18
  %170 = load i64, ptr %17, align 8, !tbaa !18
  %171 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 6
  %172 = load i64, ptr %171, align 8, !tbaa !34
  %173 = udiv i64 %170, %172
  %174 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 4
  store i64 %173, ptr %174, align 8, !tbaa !36
  %175 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 4
  %176 = load i64, ptr %175, align 8, !tbaa !36
  %177 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 5
  store i64 %176, ptr %177, align 8, !tbaa !37
  %178 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %179 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %178, i32 0, i32 2
  %180 = load i16, ptr %179, align 2, !tbaa !26
  %181 = zext i16 %180 to i32
  %182 = icmp eq i32 %181, 0
  store i1 false, ptr %19, align 1
  store i1 false, ptr %21, align 1
  store i1 false, ptr %22, align 1
  store i1 false, ptr %23, align 1
  store i1 false, ptr %25, align 1
  store i1 false, ptr %27, align 1
  store i1 false, ptr %28, align 1
  store i1 false, ptr %29, align 1
  store i1 false, ptr %31, align 1
  store i1 false, ptr %33, align 1
  store i1 false, ptr %34, align 1
  store i1 false, ptr %35, align 1
  store i1 false, ptr %37, align 1
  store i1 false, ptr %39, align 1
  store i1 false, ptr %40, align 1
  store i1 false, ptr %41, align 1
  br i1 %182, label %236, label %183

183:                                              ; preds = %164
  %184 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 4
  %185 = load i64, ptr %184, align 8, !tbaa !36
  %186 = icmp eq i64 %185, 0
  br i1 %186, label %236, label %187

187:                                              ; preds = %183
  %188 = load i64, ptr %17, align 8, !tbaa !18
  %189 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 6
  %190 = load i64, ptr %189, align 8, !tbaa !34
  %191 = urem i64 %188, %190
  %192 = icmp ne i64 %191, 0
  br i1 %192, label %236, label %193

193:                                              ; preds = %187
  %194 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %195 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %194, i32 0, i32 1
  %196 = load i16, ptr %195, align 4, !tbaa !23
  %197 = zext i16 %196 to i32
  %198 = icmp ne i32 %197, 1
  br i1 %198, label %199, label %205

199:                                              ; preds = %193
  %200 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %201 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %200, i32 0, i32 1
  %202 = load i16, ptr %201, align 4, !tbaa !23
  %203 = zext i16 %202 to i32
  %204 = icmp ne i32 %203, 65534
  br i1 %204, label %236, label %205

205:                                              ; preds = %199, %193
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  store i1 true, ptr %19, align 1
  %206 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 0
  %207 = getelementptr inbounds %struct.anon, ptr %206, i32 0, i32 0
  %208 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::ChunkHeader", ptr %207, i32 0, i32 0
  %209 = getelementptr inbounds [4 x i8], ptr %208, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  store i1 true, ptr %21, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  store i1 true, ptr %22, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %209, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %210 unwind label %287

210:                                              ; preds = %205
  store i1 true, ptr %23, align 1
  %211 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.1)
          to label %212 unwind label %291

212:                                              ; preds = %210
  br i1 %211, label %236, label %213

213:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #5
  store i1 true, ptr %25, align 1
  %214 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 0
  %215 = getelementptr inbounds %struct.anon, ptr %214, i32 0, i32 1
  %216 = getelementptr inbounds [4 x i8], ptr %215, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #5
  store i1 true, ptr %27, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  store i1 true, ptr %28, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef %216, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %217 unwind label %295

217:                                              ; preds = %213
  store i1 true, ptr %29, align 1
  %218 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.2)
          to label %219 unwind label %299

219:                                              ; preds = %217
  br i1 %218, label %236, label %220

220:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #5
  store i1 true, ptr %31, align 1
  %221 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 1
  %222 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavFormat", ptr %221, i32 0, i32 0
  %223 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::ChunkHeader", ptr %222, i32 0, i32 0
  %224 = getelementptr inbounds [4 x i8], ptr %223, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #5
  store i1 true, ptr %33, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  store i1 true, ptr %34, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef %224, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %225 unwind label %303

225:                                              ; preds = %220
  store i1 true, ptr %35, align 1
  %226 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef @.str.3)
          to label %227 unwind label %307

227:                                              ; preds = %225
  br i1 %226, label %236, label %228

228:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #5
  store i1 true, ptr %37, align 1
  %229 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::WavHeader", ptr %4, i32 0, i32 2
  %230 = getelementptr inbounds %struct.anon.0, ptr %229, i32 0, i32 0
  %231 = getelementptr inbounds %"struct.vraudio::(anonymous namespace)::ChunkHeader", ptr %230, i32 0, i32 0
  %232 = getelementptr inbounds [4 x i8], ptr %231, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #5
  store i1 true, ptr %39, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #5
  store i1 true, ptr %40, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef %232, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %233 unwind label %311

233:                                              ; preds = %228
  store i1 true, ptr %41, align 1
  %234 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef @.str.4)
          to label %235 unwind label %315

235:                                              ; preds = %233
  br label %236

236:                                              ; preds = %235, %227, %219, %212, %199, %187, %183, %164
  %237 = phi i1 [ true, %227 ], [ true, %219 ], [ true, %212 ], [ true, %199 ], [ true, %187 ], [ true, %183 ], [ true, %164 ], [ %234, %235 ]
  %238 = load i1, ptr %41, align 1
  br i1 %238, label %239, label %240

239:                                              ; preds = %236
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  br label %240

240:                                              ; preds = %239, %236
  %241 = load i1, ptr %40, align 1
  br i1 %241, label %242, label %243

242:                                              ; preds = %240
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #5
  br label %243

243:                                              ; preds = %242, %240
  %244 = load i1, ptr %39, align 1
  br i1 %244, label %245, label %246

245:                                              ; preds = %243
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #5
  br label %246

246:                                              ; preds = %245, %243
  %247 = load i1, ptr %37, align 1
  br i1 %247, label %248, label %249

248:                                              ; preds = %246
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #5
  br label %249

249:                                              ; preds = %248, %246
  %250 = load i1, ptr %35, align 1
  br i1 %250, label %251, label %252

251:                                              ; preds = %249
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #5
  br label %252

252:                                              ; preds = %251, %249
  %253 = load i1, ptr %34, align 1
  br i1 %253, label %254, label %255

254:                                              ; preds = %252
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  br label %255

255:                                              ; preds = %254, %252
  %256 = load i1, ptr %33, align 1
  br i1 %256, label %257, label %258

257:                                              ; preds = %255
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #5
  br label %258

258:                                              ; preds = %257, %255
  %259 = load i1, ptr %31, align 1
  br i1 %259, label %260, label %261

260:                                              ; preds = %258
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #5
  br label %261

261:                                              ; preds = %260, %258
  %262 = load i1, ptr %29, align 1
  br i1 %262, label %263, label %264

263:                                              ; preds = %261
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  br label %264

264:                                              ; preds = %263, %261
  %265 = load i1, ptr %28, align 1
  br i1 %265, label %266, label %267

266:                                              ; preds = %264
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  br label %267

267:                                              ; preds = %266, %264
  %268 = load i1, ptr %27, align 1
  br i1 %268, label %269, label %270

269:                                              ; preds = %267
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  br label %270

270:                                              ; preds = %269, %267
  %271 = load i1, ptr %25, align 1
  br i1 %271, label %272, label %273

272:                                              ; preds = %270
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #5
  br label %273

273:                                              ; preds = %272, %270
  %274 = load i1, ptr %23, align 1
  br i1 %274, label %275, label %276

275:                                              ; preds = %273
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %276

276:                                              ; preds = %275, %273
  %277 = load i1, ptr %22, align 1
  br i1 %277, label %278, label %279

278:                                              ; preds = %276
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  br label %279

279:                                              ; preds = %278, %276
  %280 = load i1, ptr %21, align 1
  br i1 %280, label %281, label %282

281:                                              ; preds = %279
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  br label %282

282:                                              ; preds = %281, %279
  %283 = load i1, ptr %19, align 1
  br i1 %283, label %284, label %285

284:                                              ; preds = %282
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %285

285:                                              ; preds = %284, %282
  br i1 %237, label %286, label %374

286:                                              ; preds = %285
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %390

287:                                              ; preds = %205
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %13, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %14, align 4
  br label %364

291:                                              ; preds = %210
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %13, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %14, align 4
  br label %360

295:                                              ; preds = %213
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %13, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %14, align 4
  br label %350

299:                                              ; preds = %217
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %13, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %14, align 4
  br label %346

303:                                              ; preds = %220
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %13, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %14, align 4
  br label %336

307:                                              ; preds = %225
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %13, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %14, align 4
  br label %332

311:                                              ; preds = %228
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %13, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %14, align 4
  br label %322

315:                                              ; preds = %233
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %13, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %14, align 4
  %319 = load i1, ptr %41, align 1
  br i1 %319, label %320, label %321

320:                                              ; preds = %315
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  br label %321

321:                                              ; preds = %320, %315
  br label %322

322:                                              ; preds = %321, %311
  %323 = load i1, ptr %40, align 1
  br i1 %323, label %324, label %325

324:                                              ; preds = %322
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #5
  br label %325

325:                                              ; preds = %324, %322
  %326 = load i1, ptr %39, align 1
  br i1 %326, label %327, label %328

327:                                              ; preds = %325
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #5
  br label %328

328:                                              ; preds = %327, %325
  %329 = load i1, ptr %37, align 1
  br i1 %329, label %330, label %331

330:                                              ; preds = %328
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #5
  br label %331

331:                                              ; preds = %330, %328
  br label %332

332:                                              ; preds = %331, %307
  %333 = load i1, ptr %35, align 1
  br i1 %333, label %334, label %335

334:                                              ; preds = %332
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #5
  br label %335

335:                                              ; preds = %334, %332
  br label %336

336:                                              ; preds = %335, %303
  %337 = load i1, ptr %34, align 1
  br i1 %337, label %338, label %339

338:                                              ; preds = %336
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #5
  br label %339

339:                                              ; preds = %338, %336
  %340 = load i1, ptr %33, align 1
  br i1 %340, label %341, label %342

341:                                              ; preds = %339
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #5
  br label %342

342:                                              ; preds = %341, %339
  %343 = load i1, ptr %31, align 1
  br i1 %343, label %344, label %345

344:                                              ; preds = %342
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #5
  br label %345

345:                                              ; preds = %344, %342
  br label %346

346:                                              ; preds = %345, %299
  %347 = load i1, ptr %29, align 1
  br i1 %347, label %348, label %349

348:                                              ; preds = %346
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  br label %349

349:                                              ; preds = %348, %346
  br label %350

350:                                              ; preds = %349, %295
  %351 = load i1, ptr %28, align 1
  br i1 %351, label %352, label %353

352:                                              ; preds = %350
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  br label %353

353:                                              ; preds = %352, %350
  %354 = load i1, ptr %27, align 1
  br i1 %354, label %355, label %356

355:                                              ; preds = %353
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  br label %356

356:                                              ; preds = %355, %353
  %357 = load i1, ptr %25, align 1
  br i1 %357, label %358, label %359

358:                                              ; preds = %356
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #5
  br label %359

359:                                              ; preds = %358, %356
  br label %360

360:                                              ; preds = %359, %291
  %361 = load i1, ptr %23, align 1
  br i1 %361, label %362, label %363

362:                                              ; preds = %360
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %363

363:                                              ; preds = %362, %360
  br label %364

364:                                              ; preds = %363, %287
  %365 = load i1, ptr %22, align 1
  br i1 %365, label %366, label %367

366:                                              ; preds = %364
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  br label %367

367:                                              ; preds = %366, %364
  %368 = load i1, ptr %21, align 1
  br i1 %368, label %369, label %370

369:                                              ; preds = %367
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  br label %370

370:                                              ; preds = %369, %367
  %371 = load i1, ptr %19, align 1
  br i1 %371, label %372, label %373

372:                                              ; preds = %370
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %373

373:                                              ; preds = %372, %370
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %392

374:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #5
  %375 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 0
  %376 = load ptr, ptr %375, align 8, !tbaa !38
  %377 = call { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %376)
  %378 = getelementptr inbounds { i64, i64 }, ptr %43, i32 0, i32 0
  %379 = extractvalue { i64, i64 } %377, 0
  store i64 %379, ptr %378, align 8
  %380 = getelementptr inbounds { i64, i64 }, ptr %43, i32 0, i32 1
  %381 = extractvalue { i64, i64 } %377, 1
  store i64 %381, ptr %380, align 8
  %382 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %43)
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #5
  store i64 %382, ptr %42, align 8, !tbaa !39
  %383 = load i64, ptr %42, align 8, !tbaa !39
  %384 = icmp slt i64 %383, 0
  br i1 %384, label %385, label %386

385:                                              ; preds = %374
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %389

386:                                              ; preds = %374
  %387 = load i64, ptr %42, align 8, !tbaa !39
  %388 = getelementptr inbounds %"class.vraudio::WavReader", ptr %44, i32 0, i32 7
  store i64 %387, ptr %388, align 8, !tbaa !40
  store i1 true, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %389

389:                                              ; preds = %386, %385
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  br label %390

390:                                              ; preds = %389, %286
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %391

391:                                              ; preds = %390, %163, %138, %131, %82, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %393

392:                                              ; preds = %373, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 44, ptr %4) #5
  br label %395

393:                                              ; preds = %391, %47
  call void @llvm.lifetime.end.p0(i64 44, ptr %4) #5
  %394 = load i1, ptr %2, align 1
  ret i1 %394

395:                                              ; preds = %392
  %396 = load ptr, ptr %13, align 8
  %397 = load i32, ptr %14, align 4
  %398 = insertvalue { ptr, i32 } poison, ptr %396, 0
  %399 = insertvalue { ptr, i32 } %398, i32 %397, 1
  resume { ptr, i32 } %399
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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 #3 align 2

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) #4

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

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

!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, !13, i64 16}
!10 = !{!"_ZTSN7vraudio12_GLOBAL__N_19WavHeaderE", !11, i64 0, !14, i64 12, !16, i64 36}
!11 = !{!"_ZTSN7vraudio12_GLOBAL__N_19WavHeader3$_0E", !12, i64 0, !7, i64 8}
!12 = !{!"_ZTSN7vraudio12_GLOBAL__N_111ChunkHeaderE", !7, i64 0, !13, i64 4}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN7vraudio12_GLOBAL__N_19WavFormatE", !12, i64 0, !15, i64 8, !15, i64 10, !13, i64 12, !13, i64 16, !15, i64 20, !15, i64 22}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ZTSN7vraudio12_GLOBAL__N_19WavHeader3$_1E", !12, i64 0}
!17 = !{!13, !13, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!15, !15, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!10, !15, i64 20}
!24 = !{!12, !13, i64 4}
!25 = distinct !{!25, !22}
!26 = !{!10, !15, i64 22}
!27 = !{!28, !19, i64 16}
!28 = !{!"_ZTSN7vraudio9WavReaderE", !6, i64 0, !29, i64 8, !19, i64 16, !13, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !30, i64 56}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"long long", !7, i64 0}
!31 = !{!10, !13, i64 24}
!32 = !{!28, !13, i64 24}
!33 = !{!10, !15, i64 34}
!34 = !{!28, !19, i64 48}
!35 = !{!10, !13, i64 40}
!36 = !{!28, !19, i64 32}
!37 = !{!28, !19, i64 40}
!38 = !{!28, !6, i64 0}
!39 = !{!30, !30, i64 0}
!40 = !{!28, !30, i64 56}


; 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.vraudio::(anonymous namespace)::WavHeader" = type { %struct.anon, %"struct.vraudio::(anonymous namespace)::WavFormat", %struct.anon.0 }
%struct.anon = type { %"struct.vraudio::(anonymous namespace)::ChunkHeader", [4 x i8] }
%"struct.vraudio::(anonymous namespace)::ChunkHeader" = type { [4 x i8], i32 }
%"struct.vraudio::(anonymous namespace)::WavFormat" = type { %"struct.vraudio::(anonymous namespace)::ChunkHeader", i16, i16, i32, i32, i16, i16 }
%struct.anon.0 = type { %"struct.vraudio::(anonymous namespace)::ChunkHeader" }
%"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::allocator" = type { i8 }
%"class.std::fpos" = type { i64, %struct.__mbstate_t }
%struct.__mbstate_t = type { i32, %union.anon.1 }
%union.anon.1 = type { i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7vraudio9WavReader11ParseHeaderEv(ptr noundef nonnull align 8 dereferenceable(64) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.vraudio::(anonymous namespace)::WavHeader", align 4
  %3 = alloca i16, align 2
  %4 = alloca i8, align 1
  %5 = alloca %"struct.vraudio::(anonymous namespace)::ChunkHeader", align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca i8, align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::fpos", align 8
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %2) #5
  %18 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %2, i64 noundef 36)
  %.not = icmp eq i64 %18, 36
  br i1 %.not, label %19, label %.critedge135.thread

19:                                               ; preds = %1
  %20 = getelementptr inbounds i8, ptr %2, i64 12
  %21 = getelementptr inbounds i8, ptr %2, i64 16
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = icmp ult i32 %22, 16
  br i1 %23, label %.critedge135.thread, label %24

24:                                               ; preds = %19
  %.not99 = icmp eq i32 %22, 16
  br i1 %.not99, label %35, label %25

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #5
  %26 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %3, i64 noundef 2)
  %.not100 = icmp eq i64 %26, 2
  br i1 %.not100, label %27, label %.thread

.thread:                                          ; preds = %25
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #5
  br label %.critedge135.thread

27:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  %28 = load i16, ptr %3, align 2, !tbaa !15
  %.not102178.not = icmp eq i16 %28, 0
  br i1 %.not102178.not, label %.thread138, label %.lr.ph

29:                                               ; preds = %.lr.ph
  %30 = add nuw i64 %.096179, 1
  %31 = load i16, ptr %3, align 2, !tbaa !15
  %32 = sext i16 %31 to i64
  %.not102 = icmp ult i64 %30, %32
  br i1 %.not102, label %.lr.ph, label %.thread138, !llvm.loop !16

.thread138:                                       ; preds = %29, %27
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #5
  br label %35

.lr.ph:                                           ; preds = %27, %29
  %.096179 = phi i64 [ %30, %29 ], [ 0, %27 ]
  %33 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %4, i64 noundef 1)
  %.not101 = icmp eq i64 %33, 1
  br i1 %.not101, label %29, label %34

34:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #5
  br label %.critedge135.thread

35:                                               ; preds = %.thread138, %24
  %36 = getelementptr inbounds i8, ptr %2, i64 20
  %37 = load i16, ptr %36, align 4, !tbaa !18
  %38 = icmp eq i16 %37, -2
  br i1 %38, label %39, label %59

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %40 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %5, i64 noundef 8)
  %.not103 = icmp eq i64 %40, 8
  br i1 %.not103, label %41, label %.thread141

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %5, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %42 unwind label %45

42:                                               ; preds = %41
  %43 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str)
          to label %44 unwind label %47

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

45:                                               ; preds = %41
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %42
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %49

49:                                               ; preds = %47, %45
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %139

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  %51 = getelementptr inbounds i8, ptr %5, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !19
  %.not106180.not = icmp eq i32 %52, 0
  br i1 %.not106180.not, label %.thread144, label %.lr.ph182

53:                                               ; preds = %.lr.ph182
  %54 = add nuw nsw i64 %.077181, 1
  %55 = load i32, ptr %51, align 4, !tbaa !19
  %56 = zext i32 %55 to i64
  %.not106 = icmp ult i64 %54, %56
  br i1 %.not106, label %.lr.ph182, label %.thread144, !llvm.loop !20

.thread144:                                       ; preds = %53, %50
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %59

.lr.ph182:                                        ; preds = %50, %53
  %.077181 = phi i64 [ %54, %53 ], [ 0, %50 ]
  %57 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %8, i64 noundef 1)
  %.not105 = icmp eq i64 %57, 1
  br i1 %.not105, label %53, label %58

.thread141:                                       ; preds = %39, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %.critedge135.thread

58:                                               ; preds = %.lr.ph182
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %.critedge135.thread

59:                                               ; preds = %.thread144, %35
  %60 = getelementptr inbounds i8, ptr %2, i64 36
  %61 = call noundef i64 @_ZN7vraudio9WavReader24ReadBinaryDataFromStreamEPvm(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %60, i64 noundef 8)
  %.not107 = icmp eq i64 %61, 8
  br i1 %.not107, label %62, label %.critedge135.thread

62:                                               ; preds = %59
  %63 = getelementptr inbounds i8, ptr %2, i64 22
  %64 = load i16, ptr %63, align 2, !tbaa !21
  %65 = zext i16 %64 to i64
  %66 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %65, ptr %66, align 8, !tbaa !22
  %67 = getelementptr inbounds i8, ptr %2, i64 24
  %68 = load i32, ptr %67, align 4, !tbaa !28
  %69 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %68, ptr %69, align 8, !tbaa !29
  %70 = getelementptr inbounds i8, ptr %2, i64 34
  %71 = load i16, ptr %70, align 2, !tbaa !30
  %72 = lshr i16 %71, 3
  %73 = zext nneg i16 %72 to i64
  %74 = getelementptr inbounds i8, ptr %0, i64 48
  store i64 %73, ptr %74, align 8, !tbaa !31
  %75 = icmp ugt i16 %71, 7
  %.not108 = icmp eq i16 %72, 2
  %or.cond119 = and i1 %75, %.not108
  br i1 %or.cond119, label %76, label %.critedge135.thread

76:                                               ; preds = %62
  %77 = getelementptr inbounds i8, ptr %2, i64 40
  %78 = load i32, ptr %77, align 4, !tbaa !32
  %79 = lshr i32 %78, 1
  %80 = zext nneg i32 %79 to i64
  %81 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 %80, ptr %81, align 8, !tbaa !33
  %82 = getelementptr inbounds i8, ptr %0, i64 40
  store i64 %80, ptr %82, align 8, !tbaa !34
  %83 = icmp ne i16 %64, 0
  %84 = icmp ugt i32 %78, 1
  %85 = and i32 %78, 1
  %.not109 = icmp eq i32 %85, 0
  %86 = and i1 %84, %.not109
  %or.cond = select i1 %83, i1 %86, i1 false
  br i1 %or.cond, label %87, label %.critedge135.thread

87:                                               ; preds = %76
  %88 = load i16, ptr %36, align 4
  switch i16 %88, label %.critedge135.thread [
    i16 -2, label %89
    i16 1, label %89
  ]

89:                                               ; preds = %87, %87
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull %2, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %90 unwind label %106

90:                                               ; preds = %89
  %91 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.1)
          to label %92 unwind label %108

92:                                               ; preds = %90
  br i1 %91, label %.critedge135.thread.critedge, label %93

93:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #5
  %94 = getelementptr inbounds i8, ptr %2, i64 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull %94, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %95 unwind label %110

95:                                               ; preds = %93
  %96 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.2)
          to label %97 unwind label %112

97:                                               ; preds = %95
  br i1 %96, label %.critedge135.thread.critedge177, label %98

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull %20, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %99 unwind label %114

99:                                               ; preds = %98
  %100 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.3)
          to label %101 unwind label %116

101:                                              ; preds = %99
  br i1 %100, label %.critedge127.thread, label %102

102:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull %60, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %103 unwind label %118

103:                                              ; preds = %102
  %104 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.4)
          to label %.critedge123.thread unwind label %120

.critedge123.thread:                              ; preds = %103
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  br label %.critedge127.thread

.critedge127.thread:                              ; preds = %.critedge123.thread, %101
  %105 = phi i1 [ %104, %.critedge123.thread ], [ true, %101 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br i1 %105, label %.critedge135.thread, label %129

106:                                              ; preds = %89
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %128

108:                                              ; preds = %90
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %127

110:                                              ; preds = %93
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %126

112:                                              ; preds = %95
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %125

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

116:                                              ; preds = %99
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %123

118:                                              ; preds = %102
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %122

120:                                              ; preds = %103
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %122

122:                                              ; preds = %118, %120
  %.pn110 = phi { ptr, i32 } [ %121, %120 ], [ %119, %118 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  br label %123

123:                                              ; preds = %116, %122
  %.pn110.pn = phi { ptr, i32 } [ %.pn110, %122 ], [ %117, %116 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %124

124:                                              ; preds = %114, %123
  %.pn110.pn.pn = phi { ptr, i32 } [ %.pn110.pn, %123 ], [ %115, %114 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  br label %125

125:                                              ; preds = %112, %124
  %.pn110.pn.pn.pn = phi { ptr, i32 } [ %.pn110.pn.pn, %124 ], [ %113, %112 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %126

126:                                              ; preds = %110, %125
  %.pn110.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn110.pn.pn.pn, %125 ], [ %111, %110 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  br label %127

127:                                              ; preds = %108, %126
  %.pn110.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn110.pn.pn.pn.pn, %126 ], [ %109, %108 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %128

128:                                              ; preds = %106, %127
  %.pn110.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn110.pn.pn.pn.pn.pn, %127 ], [ %107, %106 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br label %139

129:                                              ; preds = %.critedge127.thread
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #5
  %130 = load ptr, ptr %0, align 8, !tbaa !35
  %131 = call { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %130)
  %132 = extractvalue { i64, i64 } %131, 0
  store i64 %132, ptr %17, align 8
  %133 = getelementptr inbounds i8, ptr %17, i64 8
  %134 = extractvalue { i64, i64 } %131, 1
  store i64 %134, ptr %133, align 8
  %135 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  %136 = icmp sgt i64 %135, -1
  br i1 %136, label %137, label %.critedge135.thread

137:                                              ; preds = %129
  %138 = getelementptr inbounds i8, ptr %0, i64 56
  store i64 %135, ptr %138, align 8, !tbaa !36
  br label %.critedge135.thread

139:                                              ; preds = %128, %49
  %.pn110.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn110.pn.pn.pn.pn.pn.pn, %128 ], [ %.pn, %49 ]
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn110.pn.pn.pn.pn.pn.pn.pn

.critedge135.thread.critedge:                     ; preds = %92
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br label %.critedge135.thread

.critedge135.thread.critedge177:                  ; preds = %97
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br label %.critedge135.thread

.critedge135.thread:                              ; preds = %.critedge135.thread.critedge177, %.critedge135.thread.critedge, %87, %76, %58, %.thread141, %34, %.thread, %19, %59, %62, %137, %129, %.critedge127.thread, %1
  %.8 = phi i1 [ false, %1 ], [ false, %58 ], [ false, %34 ], [ false, %19 ], [ false, %59 ], [ false, %62 ], [ false, %.critedge127.thread ], [ false, %129 ], [ true, %137 ], [ false, %.thread ], [ false, %.thread141 ], [ false, %76 ], [ false, %87 ], [ false, %.critedge135.thread.critedge ], [ false, %.critedge135.thread.critedge177 ]
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %2) #5
  ret i1 %.8
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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 #3 align 2

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

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

!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, !11, i64 16}
!6 = !{!"_ZTSN7vraudio12_GLOBAL__N_19WavHeaderE", !7, i64 0, !12, i64 12, !14, i64 36}
!7 = !{!"_ZTSN7vraudio12_GLOBAL__N_19WavHeader3$_0E", !8, i64 0, !9, i64 8}
!8 = !{!"_ZTSN7vraudio12_GLOBAL__N_111ChunkHeaderE", !9, i64 0, !11, i64 4}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTSN7vraudio12_GLOBAL__N_19WavFormatE", !8, i64 0, !13, i64 8, !13, i64 10, !11, i64 12, !11, i64 16, !13, i64 20, !13, i64 22}
!13 = !{!"short", !9, i64 0}
!14 = !{!"_ZTSN7vraudio12_GLOBAL__N_19WavHeader3$_1E", !8, i64 0}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!6, !13, i64 20}
!19 = !{!8, !11, i64 4}
!20 = distinct !{!20, !17}
!21 = !{!6, !13, i64 22}
!22 = !{!23, !26, i64 16}
!23 = !{!"_ZTSN7vraudio9WavReaderE", !24, i64 0, !25, i64 8, !26, i64 16, !11, i64 24, !26, i64 32, !26, i64 40, !26, i64 48, !27, i64 56}
!24 = !{!"any pointer", !9, i64 0}
!25 = !{!"bool", !9, i64 0}
!26 = !{!"long", !9, i64 0}
!27 = !{!"long long", !9, i64 0}
!28 = !{!6, !11, i64 24}
!29 = !{!23, !11, i64 24}
!30 = !{!6, !13, i64 34}
!31 = !{!23, !26, i64 48}
!32 = !{!6, !11, i64 40}
!33 = !{!23, !26, i64 32}
!34 = !{!23, !26, i64 40}
!35 = !{!23, !24, i64 0}
!36 = !{!23, !27, i64 56}


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