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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.drflac_init_info = type { ptr, ptr, ptr, i32, ptr, ptr, i32, i8, i8, i64, i16, i64, i32, i32, %struct.drflac_bs, %struct.drflac_frame_header, i32, i64, %struct.drflac_ogg_page_header }
%struct.drflac_bs = type { ptr, ptr, ptr, i64, i64, i32, i32, [512 x i64], i64, i16, i64, i32 }
%struct.drflac_frame_header = type { i64, i32, i32, i16, i8, i8, i8 }
%struct.drflac_ogg_page_header = type { [4 x i8], i8, i8, i64, i32, i32, i32, i8, [255 x i8] }
%struct.drflac_oggbs = type { ptr, ptr, ptr, i64, i64, i32, %struct.drflac_ogg_page_header, %struct.drflac_ogg_page_header, i32, i32, [65307 x i8] }
%struct.drflac_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.drflac = type { ptr, ptr, %struct.drflac_allocation_callbacks, i32, i8, i8, i16, i64, i32, i32, %struct.drflac_frame, i64, i64, %struct.drflac__memory_stream, ptr, ptr, ptr, i8, %struct.drflac_bs, [1 x i8] }
%struct.drflac_frame = type { %struct.drflac_frame_header, i32, [8 x %struct.drflac_subframe] }
%struct.drflac_subframe = type { i8, i8, i8, ptr }
%struct.drflac__memory_stream = type { ptr, i64, i64 }
%struct.drflac_seekpoint = type <{ i64, i64, i16 }>

@.str.33 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._Z33drflac_open_with_metadata_privatePFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataE16drflac_containerS_S_PK27drflac_allocation_callbacks = external hidden unnamed_addr constant [167 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef i64 @_ZL18drflac__be2host_64m(i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z32drflac__read_and_decode_metadataPFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataES_S_PmS9_PjP27drflac_allocation_callbacks(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL29drflac__malloc_from_callbacksmPK27drflac_allocation_callbacks(i64 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL27drflac__free_from_callbacksPvPK27drflac_allocation_callbacks(ptr noundef, ptr noundef) #5

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL35drflac__read_next_flac_frame_headerP9drflac_bshP19drflac_frame_header(ptr noundef, i8 noundef zeroext, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL25drflac__decode_flac_frameP6drflac(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z20drflac__init_privateP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataE16drflac_containerS1_S1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z22drflac__init_from_infoP6drflacPK16drflac_init_info(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z33drflac_open_with_metadata_privatePFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataE16drflac_containerS_S_PK27drflac_allocation_callbacks(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #5 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.drflac_init_info, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct.drflac_oggbs, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca %struct.drflac_allocation_callbacks, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i32 %3, ptr %12, align 4, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4592, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 65944, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  call void @_ZL21drflac__init_cpu_capsv()
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = load i32, ptr %12, align 4, !tbaa !9
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  %39 = call noundef i32 @_Z20drflac__init_privateP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataE16drflac_containerS1_S1_(ptr noundef %16, ptr noundef %33, ptr noundef %34, ptr noundef %35, i32 noundef %36, ptr noundef %37, ptr noundef %38)
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %42, label %41

41:                                               ; preds = %7
  store ptr null, ptr %8, align 8
  store i32 1, ptr %26, align 4
  br label %412

42:                                               ; preds = %7
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %60

45:                                               ; preds = %42
  %46 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %46, i64 32, i1 false), !tbaa.struct !11
  %47 = getelementptr inbounds %struct.drflac_allocation_callbacks, ptr %24, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !12
  %49 = icmp eq ptr %48, null
  br i1 %49, label %58, label %50

50:                                               ; preds = %45
  %51 = getelementptr inbounds %struct.drflac_allocation_callbacks, ptr %24, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !14
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %59

54:                                               ; preds = %50
  %55 = getelementptr inbounds %struct.drflac_allocation_callbacks, ptr %24, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !15
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %59

58:                                               ; preds = %54, %45
  store ptr null, ptr %8, align 8
  store i32 1, ptr %26, align 4
  br label %412

59:                                               ; preds = %54, %50
  br label %65

60:                                               ; preds = %42
  %61 = getelementptr inbounds %struct.drflac_allocation_callbacks, ptr %24, i32 0, i32 0
  store ptr null, ptr %61, align 8, !tbaa !16
  %62 = getelementptr inbounds %struct.drflac_allocation_callbacks, ptr %24, i32 0, i32 1
  store ptr @_ZL22drflac__malloc_defaultmPv, ptr %62, align 8, !tbaa !14
  %63 = getelementptr inbounds %struct.drflac_allocation_callbacks, ptr %24, i32 0, i32 2
  store ptr @_ZL23drflac__realloc_defaultPvmS_, ptr %63, align 8, !tbaa !15
  %64 = getelementptr inbounds %struct.drflac_allocation_callbacks, ptr %24, i32 0, i32 3
  store ptr @_ZL20drflac__free_defaultPvS_, ptr %64, align 8, !tbaa !12
  br label %65

65:                                               ; preds = %60, %59
  store i32 4488, ptr %17, align 4, !tbaa !17
  %66 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 10
  %67 = load i16, ptr %66, align 8, !tbaa !19
  %68 = zext i16 %67 to i64
  %69 = urem i64 %68, 16
  %70 = icmp eq i64 %69, 0
  br i1 %70, label %71, label %77

71:                                               ; preds = %65
  %72 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 10
  %73 = load i16, ptr %72, align 8, !tbaa !19
  %74 = zext i16 %73 to i64
  %75 = udiv i64 %74, 16
  %76 = trunc i64 %75 to i32
  store i32 %76, ptr %18, align 4, !tbaa !17
  br label %84

77:                                               ; preds = %65
  %78 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 10
  %79 = load i16, ptr %78, align 8, !tbaa !19
  %80 = zext i16 %79 to i64
  %81 = udiv i64 %80, 16
  %82 = add i64 %81, 1
  %83 = trunc i64 %82 to i32
  store i32 %83, ptr %18, align 4, !tbaa !17
  br label %84

84:                                               ; preds = %77, %71
  %85 = load i32, ptr %18, align 4, !tbaa !17
  %86 = mul i32 %85, 64
  %87 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 7
  %88 = load i8, ptr %87, align 4, !tbaa !26
  %89 = zext i8 %88 to i32
  %90 = mul i32 %86, %89
  store i32 %90, ptr %19, align 4, !tbaa !17
  %91 = load i32, ptr %19, align 4, !tbaa !17
  %92 = load i32, ptr %17, align 4, !tbaa !17
  %93 = add i32 %92, %91
  store i32 %93, ptr %17, align 4, !tbaa !17
  %94 = load i32, ptr %17, align 4, !tbaa !17
  %95 = add i32 %94, 64
  store i32 %95, ptr %17, align 4, !tbaa !17
  %96 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 3
  %97 = load i32, ptr %96, align 8, !tbaa !27
  %98 = icmp eq i32 %97, 1
  br i1 %98, label %99, label %104

99:                                               ; preds = %84
  %100 = load i32, ptr %17, align 4, !tbaa !17
  %101 = zext i32 %100 to i64
  %102 = add i64 %101, 65944
  %103 = trunc i64 %102 to i32
  store i32 %103, ptr %17, align 4, !tbaa !17
  br label %104

104:                                              ; preds = %99, %84
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 65944, i1 false)
  %105 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 3
  %106 = load i32, ptr %105, align 8, !tbaa !27
  %107 = icmp eq i32 %106, 1
  br i1 %107, label %108, label %127

108:                                              ; preds = %104
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.drflac_oggbs, ptr %20, i32 0, i32 0
  store ptr %109, ptr %110, align 8, !tbaa !28
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.drflac_oggbs, ptr %20, i32 0, i32 1
  store ptr %111, ptr %112, align 8, !tbaa !30
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.drflac_oggbs, ptr %20, i32 0, i32 2
  store ptr %113, ptr %114, align 8, !tbaa !31
  %115 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 17
  %116 = load i64, ptr %115, align 8, !tbaa !32
  %117 = getelementptr inbounds %struct.drflac_oggbs, ptr %20, i32 0, i32 3
  store i64 %116, ptr %117, align 8, !tbaa !33
  %118 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 17
  %119 = load i64, ptr %118, align 8, !tbaa !32
  %120 = getelementptr inbounds %struct.drflac_oggbs, ptr %20, i32 0, i32 4
  store i64 %119, ptr %120, align 8, !tbaa !34
  %121 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 16
  %122 = load i32, ptr %121, align 8, !tbaa !35
  %123 = getelementptr inbounds %struct.drflac_oggbs, ptr %20, i32 0, i32 5
  store i32 %122, ptr %123, align 8, !tbaa !36
  %124 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 18
  %125 = getelementptr inbounds %struct.drflac_oggbs, ptr %20, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %125, ptr align 8 %124, i64 288, i1 false), !tbaa.struct !37
  %126 = getelementptr inbounds %struct.drflac_oggbs, ptr %20, i32 0, i32 8
  store i32 0, ptr %126, align 8, !tbaa !40
  br label %127

127:                                              ; preds = %108, %104
  store i64 42, ptr %21, align 8, !tbaa !39
  store i64 0, ptr %22, align 8, !tbaa !39
  store i32 0, ptr %23, align 4, !tbaa !17
  %128 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 13
  %129 = load i32, ptr %128, align 4, !tbaa !41
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %155

131:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %132, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %133, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %134, ptr %29, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 3
  %136 = load i32, ptr %135, align 8, !tbaa !27
  %137 = icmp eq i32 %136, 1
  br i1 %137, label %138, label %139

138:                                              ; preds = %131
  store ptr @_ZL19drflac__on_read_oggPvS_m, ptr %27, align 8, !tbaa !5
  store ptr @_ZL19drflac__on_seek_oggPvi18drflac_seek_origin, ptr %28, align 8, !tbaa !5
  store ptr %20, ptr %29, align 8, !tbaa !5
  br label %139

139:                                              ; preds = %138, %131
  %140 = load ptr, ptr %27, align 8, !tbaa !5
  %141 = load ptr, ptr %28, align 8, !tbaa !5
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = load ptr, ptr %29, align 8, !tbaa !5
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = call noundef i32 @_Z32drflac__read_and_decode_metadataPFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataES_S_PmS9_PjP27drflac_allocation_callbacks(ptr noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %143, ptr noundef %144, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %24)
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %148, label %147

147:                                              ; preds = %139
  store ptr null, ptr %8, align 8
  store i32 1, ptr %26, align 4
  br label %152

148:                                              ; preds = %139
  %149 = load i32, ptr %23, align 4, !tbaa !17
  %150 = load i32, ptr %17, align 4, !tbaa !17
  %151 = add i32 %150, %149
  store i32 %151, ptr %17, align 4, !tbaa !17
  store i32 0, ptr %26, align 4
  br label %152

152:                                              ; preds = %148, %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  %153 = load i32, ptr %26, align 4
  switch i32 %153, label %412 [
    i32 0, label %154
  ]

154:                                              ; preds = %152
  br label %155

155:                                              ; preds = %154, %127
  %156 = load i32, ptr %17, align 4, !tbaa !17
  %157 = zext i32 %156 to i64
  %158 = call noundef ptr @_ZL29drflac__malloc_from_callbacksmPK27drflac_allocation_callbacks(i64 noundef %157, ptr noundef %24)
  store ptr %158, ptr %25, align 8, !tbaa !5
  %159 = load ptr, ptr %25, align 8, !tbaa !5
  %160 = icmp eq ptr %159, null
  br i1 %160, label %161, label %162

161:                                              ; preds = %155
  store ptr null, ptr %8, align 8
  store i32 1, ptr %26, align 4
  br label %412

162:                                              ; preds = %155
  %163 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_Z22drflac__init_from_infoP6drflacPK16drflac_init_info(ptr noundef %163, ptr noundef %16)
  %164 = load ptr, ptr %25, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.drflac, ptr %164, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %165, ptr align 8 %24, i64 32, i1 false), !tbaa.struct !11
  %166 = load ptr, ptr %25, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.drflac, ptr %166, i32 0, i32 19
  %168 = getelementptr inbounds [1 x i8], ptr %167, i64 0, i64 0
  %169 = ptrtoint ptr %168 to i64
  %170 = add i64 %169, 64
  %171 = sub i64 %170, 1
  %172 = udiv i64 %171, 64
  %173 = mul i64 %172, 64
  %174 = inttoptr i64 %173 to ptr
  %175 = load ptr, ptr %25, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.drflac, ptr %175, i32 0, i32 14
  store ptr %174, ptr %176, align 8, !tbaa !42
  %177 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 3
  %178 = load i32, ptr %177, align 8, !tbaa !27
  %179 = icmp eq i32 %178, 1
  br i1 %179, label %180, label %204

180:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %181 = load ptr, ptr %25, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.drflac, ptr %181, i32 0, i32 14
  %183 = load ptr, ptr %182, align 8, !tbaa !42
  %184 = load i32, ptr %19, align 4, !tbaa !17
  %185 = zext i32 %184 to i64
  %186 = getelementptr inbounds i8, ptr %183, i64 %185
  %187 = load i32, ptr %23, align 4, !tbaa !17
  %188 = zext i32 %187 to i64
  %189 = getelementptr inbounds i8, ptr %186, i64 %188
  store ptr %189, ptr %30, align 8, !tbaa !5
  %190 = load ptr, ptr %30, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %190, ptr align 8 %20, i64 65944, i1 false), !tbaa.struct !46
  %191 = load ptr, ptr %25, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.drflac, ptr %191, i32 0, i32 18
  %193 = getelementptr inbounds %struct.drflac_bs, ptr %192, i32 0, i32 0
  store ptr @_ZL19drflac__on_read_oggPvS_m, ptr %193, align 8, !tbaa !47
  %194 = load ptr, ptr %25, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.drflac, ptr %194, i32 0, i32 18
  %196 = getelementptr inbounds %struct.drflac_bs, ptr %195, i32 0, i32 1
  store ptr @_ZL19drflac__on_seek_oggPvi18drflac_seek_origin, ptr %196, align 8, !tbaa !48
  %197 = load ptr, ptr %30, align 8, !tbaa !5
  %198 = load ptr, ptr %25, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.drflac, ptr %198, i32 0, i32 18
  %200 = getelementptr inbounds %struct.drflac_bs, ptr %199, i32 0, i32 2
  store ptr %197, ptr %200, align 8, !tbaa !49
  %201 = load ptr, ptr %30, align 8, !tbaa !5
  %202 = load ptr, ptr %25, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.drflac, ptr %202, i32 0, i32 16
  store ptr %201, ptr %203, align 8, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %204

204:                                              ; preds = %180, %162
  %205 = load i64, ptr %21, align 8, !tbaa !39
  %206 = load ptr, ptr %25, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.drflac, ptr %206, i32 0, i32 12
  store i64 %205, ptr %207, align 8, !tbaa !51
  %208 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 3
  %209 = load i32, ptr %208, align 8, !tbaa !27
  %210 = icmp eq i32 %209, 1
  br i1 %210, label %211, label %216

211:                                              ; preds = %204
  %212 = load ptr, ptr %25, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.drflac, ptr %212, i32 0, i32 15
  store ptr null, ptr %213, align 8, !tbaa !52
  %214 = load ptr, ptr %25, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.drflac, ptr %214, i32 0, i32 9
  store i32 0, ptr %215, align 4, !tbaa !53
  br label %372

216:                                              ; preds = %204
  %217 = load i64, ptr %22, align 8, !tbaa !39
  %218 = icmp ne i64 %217, 0
  br i1 %218, label %219, label %371

219:                                              ; preds = %216
  %220 = load i32, ptr %23, align 4, !tbaa !17
  %221 = zext i32 %220 to i64
  %222 = udiv i64 %221, 18
  %223 = trunc i64 %222 to i32
  %224 = load ptr, ptr %25, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.drflac, ptr %224, i32 0, i32 9
  store i32 %223, ptr %225, align 4, !tbaa !53
  %226 = load ptr, ptr %25, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.drflac, ptr %226, i32 0, i32 14
  %228 = load ptr, ptr %227, align 8, !tbaa !42
  %229 = load i32, ptr %19, align 4, !tbaa !17
  %230 = zext i32 %229 to i64
  %231 = getelementptr inbounds i8, ptr %228, i64 %230
  %232 = load ptr, ptr %25, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.drflac, ptr %232, i32 0, i32 15
  store ptr %231, ptr %233, align 8, !tbaa !52
  %234 = load ptr, ptr %25, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.drflac, ptr %234, i32 0, i32 18
  %236 = getelementptr inbounds %struct.drflac_bs, ptr %235, i32 0, i32 1
  %237 = load ptr, ptr %236, align 8, !tbaa !48
  %238 = icmp ne ptr %237, null
  br i1 %238, label %239, label %240

239:                                              ; preds = %219
  br label %242

240:                                              ; preds = %219
  call void @__assert_fail(ptr noundef @.str.37, ptr noundef @.str.33, i32 noundef 7336, ptr noundef @__PRETTY_FUNCTION__._Z33drflac_open_with_metadata_privatePFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataE16drflac_containerS_S_PK27drflac_allocation_callbacks) #8
  unreachable

241:                                              ; No predecessors!
  br label %242

242:                                              ; preds = %241, %239
  %243 = load ptr, ptr %25, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.drflac, ptr %243, i32 0, i32 18
  %245 = getelementptr inbounds %struct.drflac_bs, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !47
  %247 = icmp ne ptr %246, null
  br i1 %247, label %248, label %249

248:                                              ; preds = %242
  br label %251

249:                                              ; preds = %242
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str.33, i32 noundef 7337, ptr noundef @__PRETTY_FUNCTION__._Z33drflac_open_with_metadata_privatePFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataE16drflac_containerS_S_PK27drflac_allocation_callbacks) #8
  unreachable

250:                                              ; No predecessors!
  br label %251

251:                                              ; preds = %250, %248
  %252 = load ptr, ptr %25, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.drflac, ptr %252, i32 0, i32 18
  %254 = getelementptr inbounds %struct.drflac_bs, ptr %253, i32 0, i32 1
  %255 = load ptr, ptr %254, align 8, !tbaa !48
  %256 = load ptr, ptr %25, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.drflac, ptr %256, i32 0, i32 18
  %258 = getelementptr inbounds %struct.drflac_bs, ptr %257, i32 0, i32 2
  %259 = load ptr, ptr %258, align 8, !tbaa !49
  %260 = load i64, ptr %22, align 8, !tbaa !39
  %261 = trunc i64 %260 to i32
  %262 = call noundef i32 %255(ptr noundef %259, i32 noundef %261, i32 noundef 0)
  %263 = icmp ne i32 %262, 0
  br i1 %263, label %264, label %365

264:                                              ; preds = %251
  %265 = load ptr, ptr %25, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.drflac, ptr %265, i32 0, i32 18
  %267 = getelementptr inbounds %struct.drflac_bs, ptr %266, i32 0, i32 0
  %268 = load ptr, ptr %267, align 8, !tbaa !47
  %269 = load ptr, ptr %25, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.drflac, ptr %269, i32 0, i32 18
  %271 = getelementptr inbounds %struct.drflac_bs, ptr %270, i32 0, i32 2
  %272 = load ptr, ptr %271, align 8, !tbaa !49
  %273 = load ptr, ptr %25, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.drflac, ptr %273, i32 0, i32 15
  %275 = load ptr, ptr %274, align 8, !tbaa !52
  %276 = load i32, ptr %23, align 4, !tbaa !17
  %277 = zext i32 %276 to i64
  %278 = call noundef i64 %268(ptr noundef %272, ptr noundef %275, i64 noundef %277)
  %279 = load i32, ptr %23, align 4, !tbaa !17
  %280 = zext i32 %279 to i64
  %281 = icmp eq i64 %278, %280
  br i1 %281, label %282, label %342

282:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !17
  br label %283

283:                                              ; preds = %338, %282
  %284 = load i32, ptr %31, align 4, !tbaa !17
  %285 = load ptr, ptr %25, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.drflac, ptr %285, i32 0, i32 9
  %287 = load i32, ptr %286, align 4, !tbaa !53
  %288 = icmp ult i32 %284, %287
  br i1 %288, label %289, label %341

289:                                              ; preds = %283
  %290 = load ptr, ptr %25, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.drflac, ptr %290, i32 0, i32 15
  %292 = load ptr, ptr %291, align 8, !tbaa !52
  %293 = load i32, ptr %31, align 4, !tbaa !17
  %294 = zext i32 %293 to i64
  %295 = getelementptr inbounds %struct.drflac_seekpoint, ptr %292, i64 %294
  %296 = getelementptr inbounds %struct.drflac_seekpoint, ptr %295, i32 0, i32 0
  %297 = load i64, ptr %296, align 2, !tbaa !54
  %298 = call noundef i64 @_ZL18drflac__be2host_64m(i64 noundef %297)
  %299 = load ptr, ptr %25, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.drflac, ptr %299, i32 0, i32 15
  %301 = load ptr, ptr %300, align 8, !tbaa !52
  %302 = load i32, ptr %31, align 4, !tbaa !17
  %303 = zext i32 %302 to i64
  %304 = getelementptr inbounds %struct.drflac_seekpoint, ptr %301, i64 %303
  %305 = getelementptr inbounds %struct.drflac_seekpoint, ptr %304, i32 0, i32 0
  store i64 %298, ptr %305, align 2, !tbaa !54
  %306 = load ptr, ptr %25, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.drflac, ptr %306, i32 0, i32 15
  %308 = load ptr, ptr %307, align 8, !tbaa !52
  %309 = load i32, ptr %31, align 4, !tbaa !17
  %310 = zext i32 %309 to i64
  %311 = getelementptr inbounds %struct.drflac_seekpoint, ptr %308, i64 %310
  %312 = getelementptr inbounds %struct.drflac_seekpoint, ptr %311, i32 0, i32 1
  %313 = load i64, ptr %312, align 2, !tbaa !56
  %314 = call noundef i64 @_ZL18drflac__be2host_64m(i64 noundef %313)
  %315 = load ptr, ptr %25, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.drflac, ptr %315, i32 0, i32 15
  %317 = load ptr, ptr %316, align 8, !tbaa !52
  %318 = load i32, ptr %31, align 4, !tbaa !17
  %319 = zext i32 %318 to i64
  %320 = getelementptr inbounds %struct.drflac_seekpoint, ptr %317, i64 %319
  %321 = getelementptr inbounds %struct.drflac_seekpoint, ptr %320, i32 0, i32 1
  store i64 %314, ptr %321, align 2, !tbaa !56
  %322 = load ptr, ptr %25, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.drflac, ptr %322, i32 0, i32 15
  %324 = load ptr, ptr %323, align 8, !tbaa !52
  %325 = load i32, ptr %31, align 4, !tbaa !17
  %326 = zext i32 %325 to i64
  %327 = getelementptr inbounds %struct.drflac_seekpoint, ptr %324, i64 %326
  %328 = getelementptr inbounds %struct.drflac_seekpoint, ptr %327, i32 0, i32 2
  %329 = load i16, ptr %328, align 2, !tbaa !57
  %330 = call noundef zeroext i16 @_ZL18drflac__be2host_16t(i16 noundef zeroext %329)
  %331 = load ptr, ptr %25, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.drflac, ptr %331, i32 0, i32 15
  %333 = load ptr, ptr %332, align 8, !tbaa !52
  %334 = load i32, ptr %31, align 4, !tbaa !17
  %335 = zext i32 %334 to i64
  %336 = getelementptr inbounds %struct.drflac_seekpoint, ptr %333, i64 %335
  %337 = getelementptr inbounds %struct.drflac_seekpoint, ptr %336, i32 0, i32 2
  store i16 %330, ptr %337, align 2, !tbaa !57
  br label %338

338:                                              ; preds = %289
  %339 = load i32, ptr %31, align 4, !tbaa !17
  %340 = add i32 %339, 1
  store i32 %340, ptr %31, align 4, !tbaa !17
  br label %283, !llvm.loop !58

341:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %347

342:                                              ; preds = %264
  %343 = load ptr, ptr %25, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.drflac, ptr %343, i32 0, i32 15
  store ptr null, ptr %344, align 8, !tbaa !52
  %345 = load ptr, ptr %25, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.drflac, ptr %345, i32 0, i32 9
  store i32 0, ptr %346, align 4, !tbaa !53
  br label %347

347:                                              ; preds = %342, %341
  %348 = load ptr, ptr %25, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.drflac, ptr %348, i32 0, i32 18
  %350 = getelementptr inbounds %struct.drflac_bs, ptr %349, i32 0, i32 1
  %351 = load ptr, ptr %350, align 8, !tbaa !48
  %352 = load ptr, ptr %25, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.drflac, ptr %352, i32 0, i32 18
  %354 = getelementptr inbounds %struct.drflac_bs, ptr %353, i32 0, i32 2
  %355 = load ptr, ptr %354, align 8, !tbaa !49
  %356 = load ptr, ptr %25, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.drflac, ptr %356, i32 0, i32 12
  %358 = load i64, ptr %357, align 8, !tbaa !51
  %359 = trunc i64 %358 to i32
  %360 = call noundef i32 %351(ptr noundef %355, i32 noundef %359, i32 noundef 0)
  %361 = icmp ne i32 %360, 0
  br i1 %361, label %364, label %362

362:                                              ; preds = %347
  %363 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZL27drflac__free_from_callbacksPvPK27drflac_allocation_callbacks(ptr noundef %363, ptr noundef %24)
  store ptr null, ptr %8, align 8
  store i32 1, ptr %26, align 4
  br label %412

364:                                              ; preds = %347
  br label %370

365:                                              ; preds = %251
  %366 = load ptr, ptr %25, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.drflac, ptr %366, i32 0, i32 15
  store ptr null, ptr %367, align 8, !tbaa !52
  %368 = load ptr, ptr %25, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.drflac, ptr %368, i32 0, i32 9
  store i32 0, ptr %369, align 4, !tbaa !53
  br label %370

370:                                              ; preds = %365, %364
  br label %371

371:                                              ; preds = %370, %216
  br label %372

372:                                              ; preds = %371, %211
  %373 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 12
  %374 = load i32, ptr %373, align 8, !tbaa !60
  %375 = icmp ne i32 %374, 0
  br i1 %375, label %410, label %376

376:                                              ; preds = %372
  %377 = getelementptr inbounds %struct.drflac_init_info, ptr %16, i32 0, i32 15
  %378 = load ptr, ptr %25, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.drflac, ptr %378, i32 0, i32 10
  %380 = getelementptr inbounds %struct.drflac_frame, ptr %379, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %380, ptr align 8 %377, i64 24, i1 false), !tbaa.struct !61
  br label %381

381:                                              ; preds = %408, %376
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %382 = load ptr, ptr %25, align 8, !tbaa !5
  %383 = call noundef i32 @_ZL25drflac__decode_flac_frameP6drflac(ptr noundef %382)
  store i32 %383, ptr %32, align 4, !tbaa !17
  %384 = load i32, ptr %32, align 4, !tbaa !17
  %385 = icmp eq i32 %384, 0
  br i1 %385, label %386, label %387

386:                                              ; preds = %381
  store i32 5, ptr %26, align 4
  br label %406

387:                                              ; preds = %381
  %388 = load i32, ptr %32, align 4, !tbaa !17
  %389 = icmp eq i32 %388, -129
  br i1 %389, label %390, label %404

390:                                              ; preds = %387
  %391 = load ptr, ptr %25, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.drflac, ptr %391, i32 0, i32 18
  %393 = load ptr, ptr %25, align 8, !tbaa !5
  %394 = getelementptr inbounds %struct.drflac, ptr %393, i32 0, i32 5
  %395 = load i8, ptr %394, align 1, !tbaa !63
  %396 = load ptr, ptr %25, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.drflac, ptr %396, i32 0, i32 10
  %398 = getelementptr inbounds %struct.drflac_frame, ptr %397, i32 0, i32 0
  %399 = call noundef i32 @_ZL35drflac__read_next_flac_frame_headerP9drflac_bshP19drflac_frame_header(ptr noundef %392, i8 noundef zeroext %395, ptr noundef %398)
  %400 = icmp ne i32 %399, 0
  br i1 %400, label %403, label %401

401:                                              ; preds = %390
  %402 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZL27drflac__free_from_callbacksPvPK27drflac_allocation_callbacks(ptr noundef %402, ptr noundef %24)
  store ptr null, ptr %8, align 8
  store i32 1, ptr %26, align 4
  br label %406

403:                                              ; preds = %390
  store i32 6, ptr %26, align 4
  br label %406

404:                                              ; preds = %387
  %405 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZL27drflac__free_from_callbacksPvPK27drflac_allocation_callbacks(ptr noundef %405, ptr noundef %24)
  store ptr null, ptr %8, align 8
  store i32 1, ptr %26, align 4
  br label %406

406:                                              ; preds = %404, %403, %401, %386
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  %407 = load i32, ptr %26, align 4
  switch i32 %407, label %412 [
    i32 5, label %409
    i32 6, label %408
  ]

408:                                              ; preds = %406
  br i1 true, label %381, label %409, !llvm.loop !64

409:                                              ; preds = %408, %406
  br label %410

410:                                              ; preds = %409, %372
  %411 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %411, ptr %8, align 8
  store i32 1, ptr %26, align 4
  br label %412

412:                                              ; preds = %410, %406, %362, %161, %152, %58, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 65944, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4592, ptr %16) #7
  %413 = load ptr, ptr %8, align 8
  ret ptr %413
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL21drflac__init_cpu_capsv() #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL22drflac__malloc_defaultmPv(i64 noundef, ptr noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL23drflac__realloc_defaultPvmS_(ptr noundef, i64 noundef, ptr noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL20drflac__free_defaultPvS_(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZL19drflac__on_read_oggPvS_m(ptr noundef, ptr noundef, i64 noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19drflac__on_seek_oggPvi18drflac_seek_origin(ptr noundef, i32 noundef, i32 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { noreturn 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 #4 = { alwaysinline 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS16drflac_container", !7, i64 0}
!11 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!12 = !{!13, !6, i64 24}
!13 = !{!"_ZTS27drflac_allocation_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!13, !6, i64 8}
!15 = !{!13, !6, i64 16}
!16 = !{!13, !6, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!20, !22, i64 64}
!20 = !{!"_ZTS16drflac_init_info", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !18, i64 48, !7, i64 52, !7, i64 53, !21, i64 56, !22, i64 64, !21, i64 72, !18, i64 80, !18, i64 84, !23, i64 88, !24, i64 4264, !18, i64 4288, !21, i64 4296, !25, i64 4304}
!21 = !{!"long", !7, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = !{!"_ZTS9drflac_bs", !6, i64 0, !6, i64 8, !6, i64 16, !21, i64 24, !21, i64 32, !18, i64 40, !18, i64 44, !7, i64 48, !21, i64 4144, !22, i64 4152, !21, i64 4160, !18, i64 4168}
!24 = !{!"_ZTS19drflac_frame_header", !21, i64 0, !18, i64 8, !18, i64 12, !22, i64 16, !7, i64 18, !7, i64 19, !7, i64 20}
!25 = !{!"_ZTS22drflac_ogg_page_header", !7, i64 0, !7, i64 4, !7, i64 5, !21, i64 8, !18, i64 16, !18, i64 20, !18, i64 24, !7, i64 28, !7, i64 29}
!26 = !{!20, !7, i64 52}
!27 = !{!20, !10, i64 24}
!28 = !{!29, !6, i64 0}
!29 = !{!"_ZTS12drflac_oggbs", !6, i64 0, !6, i64 8, !6, i64 16, !21, i64 24, !21, i64 32, !18, i64 40, !25, i64 48, !25, i64 336, !18, i64 624, !18, i64 628, !7, i64 632}
!30 = !{!29, !6, i64 8}
!31 = !{!29, !6, i64 16}
!32 = !{!20, !21, i64 4296}
!33 = !{!29, !21, i64 24}
!34 = !{!29, !21, i64 32}
!35 = !{!20, !18, i64 4288}
!36 = !{!29, !18, i64 40}
!37 = !{i64 0, i64 4, !38, i64 4, i64 1, !38, i64 5, i64 1, !38, i64 8, i64 8, !39, i64 16, i64 4, !17, i64 20, i64 4, !17, i64 24, i64 4, !17, i64 28, i64 1, !38, i64 29, i64 255, !38}
!38 = !{!7, !7, i64 0}
!39 = !{!21, !21, i64 0}
!40 = !{!29, !18, i64 624}
!41 = !{!20, !18, i64 84}
!42 = !{!43, !6, i64 272}
!43 = !{!"_ZTS6drflac", !6, i64 0, !6, i64 8, !13, i64 16, !18, i64 48, !7, i64 52, !7, i64 53, !22, i64 54, !21, i64 56, !10, i64 64, !18, i64 68, !44, i64 72, !21, i64 232, !21, i64 240, !45, i64 248, !6, i64 272, !6, i64 280, !6, i64 288, !18, i64 296, !18, i64 296, !18, i64 296, !23, i64 304, !7, i64 4480}
!44 = !{!"_ZTS12drflac_frame", !24, i64 0, !18, i64 24, !7, i64 32}
!45 = !{!"_ZTS21drflac__memory_stream", !6, i64 0, !21, i64 8, !21, i64 16}
!46 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !39, i64 32, i64 8, !39, i64 40, i64 4, !17, i64 48, i64 4, !38, i64 52, i64 1, !38, i64 53, i64 1, !38, i64 56, i64 8, !39, i64 64, i64 4, !17, i64 68, i64 4, !17, i64 72, i64 4, !17, i64 76, i64 1, !38, i64 77, i64 255, !38, i64 336, i64 4, !38, i64 340, i64 1, !38, i64 341, i64 1, !38, i64 344, i64 8, !39, i64 352, i64 4, !17, i64 356, i64 4, !17, i64 360, i64 4, !17, i64 364, i64 1, !38, i64 365, i64 255, !38, i64 624, i64 4, !17, i64 628, i64 4, !17, i64 632, i64 65307, !38}
!47 = !{!43, !6, i64 304}
!48 = !{!43, !6, i64 312}
!49 = !{!43, !6, i64 320}
!50 = !{!43, !6, i64 288}
!51 = !{!43, !21, i64 240}
!52 = !{!43, !6, i64 280}
!53 = !{!43, !18, i64 68}
!54 = !{!55, !21, i64 0}
!55 = !{!"_ZTS16drflac_seekpoint", !21, i64 0, !21, i64 8, !22, i64 16}
!56 = !{!55, !21, i64 8}
!57 = !{!55, !22, i64 16}
!58 = distinct !{!58, !59}
!59 = !{!"llvm.loop.mustprogress"}
!60 = !{!20, !18, i64 80}
!61 = !{i64 0, i64 8, !39, i64 8, i64 4, !17, i64 12, i64 4, !17, i64 16, i64 2, !62, i64 18, i64 1, !38, i64 19, i64 1, !38, i64 20, i64 1, !38}
!62 = !{!22, !22, i64 0}
!63 = !{!43, !7, i64 53}
!64 = distinct !{!64, !59}


; 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.drflac_init_info = type { ptr, ptr, ptr, i32, ptr, ptr, i32, i8, i8, i64, i16, i64, i32, i32, %struct.drflac_bs, %struct.drflac_frame_header, i32, i64, %struct.drflac_ogg_page_header }
%struct.drflac_bs = type { ptr, ptr, ptr, i64, i64, i32, i32, [512 x i64], i64, i16, i64, i32 }
%struct.drflac_frame_header = type { i64, i32, i32, i16, i8, i8, i8 }
%struct.drflac_ogg_page_header = type { [4 x i8], i8, i8, i64, i32, i32, i32, i8, [255 x i8] }
%struct.drflac_oggbs = type { ptr, ptr, ptr, i64, i64, i32, %struct.drflac_ogg_page_header, %struct.drflac_ogg_page_header, i32, i32, [65307 x i8] }
%struct.drflac_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.drflac_seekpoint = type <{ i64, i64, i16 }>

@.str.33 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._Z33drflac_open_with_metadata_privatePFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataE16drflac_containerS_S_PK27drflac_allocation_callbacks = external hidden unnamed_addr constant [167 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef i64 @_ZL18drflac__be2host_64m(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z32drflac__read_and_decode_metadataPFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataES_S_PmS9_PjP27drflac_allocation_callbacks(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL29drflac__malloc_from_callbacksmPK27drflac_allocation_callbacks(i64 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL27drflac__free_from_callbacksPvPK27drflac_allocation_callbacks(ptr noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL35drflac__read_next_flac_frame_headerP9drflac_bshP19drflac_frame_header(ptr noundef, i8 noundef zeroext, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL25drflac__decode_flac_frameP6drflac(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z20drflac__init_privateP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataE16drflac_containerS1_S1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z22drflac__init_from_infoP6drflacPK16drflac_init_info(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z33drflac_open_with_metadata_privatePFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataE16drflac_containerS_S_PK27drflac_allocation_callbacks(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef readonly %6) local_unnamed_addr #5 {
  %8 = alloca %struct.drflac_init_info, align 8
  %9 = alloca %struct.drflac_oggbs, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.drflac_allocation_callbacks, align 8
  call void @llvm.lifetime.start.p0(i64 4592, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 65944, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #7
  tail call void @_ZL21drflac__init_cpu_capsv()
  %14 = call noundef i32 @_Z20drflac__init_privateP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataE16drflac_containerS1_S1_(ptr noundef nonnull %8, ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %.thread116, label %15

15:                                               ; preds = %7
  %.not104 = icmp eq ptr %6, null
  br i1 %.not104, label %27, label %16

16:                                               ; preds = %15
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %6, i64 32, i1 false), !tbaa.struct !5
  %17 = getelementptr inbounds i8, ptr %13, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !10
  %19 = icmp eq ptr %18, null
  br i1 %19, label %.thread116, label %20

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %13, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = icmp eq ptr %22, null
  %24 = getelementptr inbounds i8, ptr %13, i64 16
  %25 = load ptr, ptr %24, align 8
  %26 = icmp eq ptr %25, null
  %or.cond = select i1 %23, i1 %26, i1 false
  br i1 %or.cond, label %.thread116, label %31

27:                                               ; preds = %15
  store ptr null, ptr %13, align 8, !tbaa !13
  %28 = getelementptr inbounds i8, ptr %13, i64 8
  store ptr @_ZL22drflac__malloc_defaultmPv, ptr %28, align 8, !tbaa !12
  %29 = getelementptr inbounds i8, ptr %13, i64 16
  store ptr @_ZL23drflac__realloc_defaultPvmS_, ptr %29, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %13, i64 24
  store ptr @_ZL20drflac__free_defaultPvS_, ptr %30, align 8, !tbaa !10
  br label %31

31:                                               ; preds = %20, %27
  %32 = getelementptr inbounds i8, ptr %8, i64 64
  %33 = load i16, ptr %32, align 8, !tbaa !15
  %34 = zext i16 %33 to i64
  %35 = and i64 %34, 15
  %36 = icmp ne i64 %35, 0
  %37 = lshr i64 %34, 4
  %38 = trunc nuw nsw i64 %37 to i32
  %39 = zext i1 %36 to i32
  %.0100 = add nuw nsw i32 %39, %38
  %40 = shl nuw nsw i32 %.0100, 6
  %41 = getelementptr inbounds i8, ptr %8, i64 52
  %42 = load i8, ptr %41, align 4, !tbaa !24
  %43 = zext i8 %42 to i32
  %44 = mul nuw nsw i32 %40, %43
  %45 = getelementptr inbounds i8, ptr %8, i64 24
  %46 = load i32, ptr %45, align 8, !tbaa !25
  %47 = icmp eq i32 %46, 1
  %.092.v = select i1 %47, i32 70496, i32 4552
  %.092 = add nuw nsw i32 %44, %.092.v
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(65944) %9, i8 0, i64 65944, i1 false)
  br i1 %47, label %48, label %60

48:                                               ; preds = %31
  store ptr %0, ptr %9, align 8, !tbaa !26
  %49 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %1, ptr %49, align 8, !tbaa !28
  %50 = getelementptr inbounds i8, ptr %9, i64 16
  store ptr %4, ptr %50, align 8, !tbaa !29
  %51 = getelementptr inbounds i8, ptr %8, i64 4296
  %52 = load i64, ptr %51, align 8, !tbaa !30
  %53 = getelementptr inbounds i8, ptr %9, i64 24
  store i64 %52, ptr %53, align 8, !tbaa !31
  %54 = getelementptr inbounds i8, ptr %9, i64 32
  store i64 %52, ptr %54, align 8, !tbaa !32
  %55 = getelementptr inbounds i8, ptr %8, i64 4288
  %56 = load i32, ptr %55, align 8, !tbaa !33
  %57 = getelementptr inbounds i8, ptr %9, i64 40
  store i32 %56, ptr %57, align 8, !tbaa !34
  %58 = getelementptr inbounds i8, ptr %8, i64 4304
  %59 = getelementptr inbounds i8, ptr %9, i64 48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(288) %59, ptr noundef nonnull align 8 dereferenceable(288) %58, i64 288, i1 false), !tbaa.struct !35
  br label %60

60:                                               ; preds = %48, %31
  store i64 42, ptr %10, align 8, !tbaa !37
  store i64 0, ptr %11, align 8, !tbaa !37
  store i32 0, ptr %12, align 4, !tbaa !38
  %61 = getelementptr inbounds i8, ptr %8, i64 84
  %62 = load i32, ptr %61, align 4, !tbaa !39
  %.not105 = icmp eq i32 %62, 0
  br i1 %.not105, label %67, label %63

63:                                               ; preds = %60
  %.097 = select i1 %47, ptr @_ZL19drflac__on_read_oggPvS_m, ptr %0
  %.096 = select i1 %47, ptr @_ZL19drflac__on_seek_oggPvi18drflac_seek_origin, ptr %1
  %.095 = select i1 %47, ptr %9, ptr %4
  %64 = call noundef i32 @_Z32drflac__read_and_decode_metadataPFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataES_S_PmS9_PjP27drflac_allocation_callbacks(ptr noundef %.097, ptr noundef %.096, ptr noundef %2, ptr noundef %.095, ptr noundef %5, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %.not106.not = icmp eq i32 %64, 0
  %65 = load i32, ptr %12, align 4
  %66 = add i32 %65, %.092
  br i1 %.not106.not, label %.thread116, label %67

67:                                               ; preds = %63, %60
  %.294 = phi i32 [ %66, %63 ], [ %.092, %60 ]
  %68 = zext i32 %.294 to i64
  %69 = call noundef ptr @_ZL29drflac__malloc_from_callbacksmPK27drflac_allocation_callbacks(i64 noundef %68, ptr noundef nonnull %13)
  %70 = icmp eq ptr %69, null
  br i1 %70, label %.thread116, label %71

71:                                               ; preds = %67
  call void @_Z22drflac__init_from_infoP6drflacPK16drflac_init_info(ptr noundef nonnull %69, ptr noundef nonnull %8)
  %72 = getelementptr inbounds i8, ptr %69, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %72, ptr noundef nonnull align 8 dereferenceable(32) %13, i64 32, i1 false), !tbaa.struct !5
  %73 = getelementptr inbounds i8, ptr %69, i64 4480
  %74 = ptrtoint ptr %73 to i64
  %75 = add i64 %74, 63
  %76 = and i64 %75, -64
  %77 = inttoptr i64 %76 to ptr
  %78 = getelementptr inbounds i8, ptr %69, i64 272
  store ptr %77, ptr %78, align 8, !tbaa !40
  %79 = load i32, ptr %45, align 8, !tbaa !25
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %81, label %95

81:                                               ; preds = %71
  %82 = zext nneg i32 %44 to i64
  %83 = getelementptr inbounds i8, ptr %77, i64 %82
  %84 = load i32, ptr %12, align 4, !tbaa !38
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds i8, ptr %83, i64 %85
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(65944) %86, ptr noundef nonnull align 8 dereferenceable(65944) %9, i64 65944, i1 false), !tbaa.struct !44
  %87 = getelementptr inbounds i8, ptr %69, i64 304
  store ptr @_ZL19drflac__on_read_oggPvS_m, ptr %87, align 8, !tbaa !45
  %88 = getelementptr inbounds i8, ptr %69, i64 312
  store ptr @_ZL19drflac__on_seek_oggPvi18drflac_seek_origin, ptr %88, align 8, !tbaa !46
  %89 = getelementptr inbounds i8, ptr %69, i64 320
  store ptr %86, ptr %89, align 8, !tbaa !47
  %90 = getelementptr inbounds i8, ptr %69, i64 288
  store ptr %86, ptr %90, align 8, !tbaa !48
  %91 = load i64, ptr %10, align 8, !tbaa !37
  %92 = getelementptr inbounds i8, ptr %69, i64 240
  store i64 %91, ptr %92, align 8, !tbaa !49
  %93 = getelementptr inbounds i8, ptr %69, i64 280
  store ptr null, ptr %93, align 8, !tbaa !50
  %94 = getelementptr inbounds i8, ptr %69, i64 68
  br label %.sink.split

95:                                               ; preds = %71
  %96 = load i64, ptr %10, align 8, !tbaa !37
  %97 = getelementptr inbounds i8, ptr %69, i64 240
  store i64 %96, ptr %97, align 8, !tbaa !49
  %98 = load i64, ptr %11, align 8, !tbaa !37
  %.not107 = icmp eq i64 %98, 0
  br i1 %.not107, label %155, label %99

99:                                               ; preds = %95
  %100 = load i32, ptr %12, align 4, !tbaa !38
  %101 = udiv i32 %100, 18
  %102 = getelementptr inbounds i8, ptr %69, i64 68
  store i32 %101, ptr %102, align 4, !tbaa !51
  %103 = zext nneg i32 %44 to i64
  %104 = getelementptr inbounds i8, ptr %77, i64 %103
  %105 = getelementptr inbounds i8, ptr %69, i64 280
  store ptr %104, ptr %105, align 8, !tbaa !50
  %106 = getelementptr inbounds i8, ptr %69, i64 304
  %107 = getelementptr inbounds i8, ptr %69, i64 312
  %108 = load ptr, ptr %107, align 8, !tbaa !46
  %.not108 = icmp eq ptr %108, null
  br i1 %.not108, label %109, label %110

109:                                              ; preds = %99
  call void @__assert_fail(ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.33, i32 noundef 7336, ptr noundef nonnull @__PRETTY_FUNCTION__._Z33drflac_open_with_metadata_privatePFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataE16drflac_containerS_S_PK27drflac_allocation_callbacks) #8
  unreachable

110:                                              ; preds = %99
  %111 = load ptr, ptr %106, align 8, !tbaa !45
  %.not109 = icmp eq ptr %111, null
  br i1 %.not109, label %112, label %113

112:                                              ; preds = %110
  call void @__assert_fail(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.33, i32 noundef 7337, ptr noundef nonnull @__PRETTY_FUNCTION__._Z33drflac_open_with_metadata_privatePFmPvS_mEPFjS_i18drflac_seek_originEPFvS_P15drflac_metadataE16drflac_containerS_S_PK27drflac_allocation_callbacks) #8
  unreachable

113:                                              ; preds = %110
  %114 = getelementptr inbounds i8, ptr %69, i64 320
  %115 = load ptr, ptr %114, align 8, !tbaa !47
  %116 = trunc i64 %98 to i32
  %117 = call noundef i32 %108(ptr noundef %115, i32 noundef %116, i32 noundef 0)
  %.not110 = icmp eq i32 %117, 0
  br i1 %.not110, label %154, label %118

118:                                              ; preds = %113
  %119 = load ptr, ptr %106, align 8, !tbaa !45
  %120 = load ptr, ptr %114, align 8, !tbaa !47
  %121 = load ptr, ptr %105, align 8, !tbaa !50
  %122 = load i32, ptr %12, align 4, !tbaa !38
  %123 = zext i32 %122 to i64
  %124 = call noundef i64 %119(ptr noundef %120, ptr noundef %121, i64 noundef %123)
  %125 = load i32, ptr %12, align 4, !tbaa !38
  %126 = zext i32 %125 to i64
  %127 = icmp eq i64 %124, %126
  br i1 %127, label %.preheader, label %148

.preheader:                                       ; preds = %118
  %128 = load i32, ptr %102, align 4, !tbaa !51
  %.not119 = icmp eq i32 %128, 0
  br i1 %.not119, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %.pre = load ptr, ptr %105, align 8, !tbaa !50
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %129 = phi ptr [ %.pre, %.lr.ph.preheader ], [ %143, %.lr.ph ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %130 = getelementptr inbounds %struct.drflac_seekpoint, ptr %129, i64 %indvars.iv
  %131 = load i64, ptr %130, align 2, !tbaa !52
  %132 = call noundef i64 @_ZL18drflac__be2host_64m(i64 noundef %131)
  %133 = load ptr, ptr %105, align 8, !tbaa !50
  %134 = getelementptr inbounds %struct.drflac_seekpoint, ptr %133, i64 %indvars.iv
  store i64 %132, ptr %134, align 2, !tbaa !52
  %135 = getelementptr inbounds %struct.drflac_seekpoint, ptr %133, i64 %indvars.iv, i32 1
  %136 = load i64, ptr %135, align 2, !tbaa !54
  %137 = call noundef i64 @_ZL18drflac__be2host_64m(i64 noundef %136)
  %138 = load ptr, ptr %105, align 8, !tbaa !50
  %139 = getelementptr inbounds %struct.drflac_seekpoint, ptr %138, i64 %indvars.iv, i32 1
  store i64 %137, ptr %139, align 2, !tbaa !54
  %140 = getelementptr inbounds %struct.drflac_seekpoint, ptr %138, i64 %indvars.iv, i32 2
  %141 = load i16, ptr %140, align 2, !tbaa !55
  %142 = call noundef zeroext i16 @_ZL18drflac__be2host_16t(i16 noundef zeroext %141)
  %143 = load ptr, ptr %105, align 8, !tbaa !50
  %144 = getelementptr inbounds %struct.drflac_seekpoint, ptr %143, i64 %indvars.iv, i32 2
  store i16 %142, ptr %144, align 2, !tbaa !55
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %145 = load i32, ptr %102, align 4, !tbaa !51
  %146 = zext i32 %145 to i64
  %147 = icmp ult i64 %indvars.iv.next, %146
  br i1 %147, label %.lr.ph, label %.loopexit, !llvm.loop !56

148:                                              ; preds = %118
  store ptr null, ptr %105, align 8, !tbaa !50
  store i32 0, ptr %102, align 4, !tbaa !51
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %148
  %149 = load ptr, ptr %107, align 8, !tbaa !46
  %150 = load ptr, ptr %114, align 8, !tbaa !47
  %151 = load i64, ptr %97, align 8, !tbaa !49
  %152 = trunc i64 %151 to i32
  %153 = call noundef i32 %149(ptr noundef %150, i32 noundef %152, i32 noundef 0)
  %.not111 = icmp eq i32 %153, 0
  br i1 %.not111, label %.thread116.sink.split, label %155

154:                                              ; preds = %113
  store ptr null, ptr %105, align 8, !tbaa !50
  br label %.sink.split

.sink.split:                                      ; preds = %81, %154
  %.sink = phi ptr [ %102, %154 ], [ %94, %81 ]
  store i32 0, ptr %.sink, align 4, !tbaa !51
  br label %155

155:                                              ; preds = %.sink.split, %95, %.loopexit
  %156 = getelementptr inbounds i8, ptr %8, i64 80
  %157 = load i32, ptr %156, align 8, !tbaa !58
  %.not112 = icmp eq i32 %157, 0
  br i1 %.not112, label %158, label %.thread116

158:                                              ; preds = %155
  %159 = getelementptr inbounds i8, ptr %8, i64 4264
  %160 = getelementptr inbounds i8, ptr %69, i64 72
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %160, ptr noundef nonnull align 8 dereferenceable(24) %159, i64 24, i1 false), !tbaa.struct !59
  %161 = getelementptr inbounds i8, ptr %69, i64 304
  %162 = getelementptr inbounds i8, ptr %69, i64 53
  br label %163

163:                                              ; preds = %165, %158
  %164 = call noundef i32 @_ZL25drflac__decode_flac_frameP6drflac(ptr noundef nonnull %69)
  switch i32 %164, label %.thread116.sink.split [
    i32 0, label %.thread116
    i32 -129, label %165
  ]

165:                                              ; preds = %163
  %166 = load i8, ptr %162, align 1, !tbaa !61
  %167 = call noundef i32 @_ZL35drflac__read_next_flac_frame_headerP9drflac_bshP19drflac_frame_header(ptr noundef nonnull %161, i8 noundef zeroext %166, ptr noundef nonnull %160)
  %.not113 = icmp eq i32 %167, 0
  br i1 %.not113, label %.thread116.sink.split, label %163

.thread116.sink.split:                            ; preds = %163, %165, %.loopexit
  call void @_ZL27drflac__free_from_callbacksPvPK27drflac_allocation_callbacks(ptr noundef nonnull %69, ptr noundef nonnull %13)
  br label %.thread116

.thread116:                                       ; preds = %163, %.thread116.sink.split, %155, %67, %16, %20, %7, %63
  %.4 = phi ptr [ null, %63 ], [ null, %7 ], [ null, %20 ], [ null, %16 ], [ null, %67 ], [ %69, %155 ], [ null, %.thread116.sink.split ], [ %69, %163 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 65944, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4592, ptr nonnull %8) #7
  ret ptr %.4
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL21drflac__init_cpu_capsv() local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL22drflac__malloc_defaultmPv(i64 noundef, ptr noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL23drflac__realloc_defaultPvmS_(ptr noundef, i64 noundef, ptr noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL20drflac__free_defaultPvS_(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZL19drflac__on_read_oggPvS_m(ptr noundef, ptr noundef, i64 noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19drflac__on_seek_oggPvi18drflac_seek_origin(ptr noundef, i32 noundef, i32 noundef) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { noreturn 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 #4 = { alwaysinline 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn 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 = !{i64 0, i64 8, !6, i64 8, i64 8, !6, i64 16, i64 8, !6, i64 24, i64 8, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 24}
!11 = !{!"_ZTS27drflac_allocation_callbacks", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!12 = !{!11, !7, i64 8}
!13 = !{!11, !7, i64 0}
!14 = !{!11, !7, i64 16}
!15 = !{!16, !20, i64 64}
!16 = !{!"_ZTS16drflac_init_info", !7, i64 0, !7, i64 8, !7, i64 16, !17, i64 24, !7, i64 32, !7, i64 40, !18, i64 48, !8, i64 52, !8, i64 53, !19, i64 56, !20, i64 64, !19, i64 72, !18, i64 80, !18, i64 84, !21, i64 88, !22, i64 4264, !18, i64 4288, !19, i64 4296, !23, i64 4304}
!17 = !{!"_ZTS16drflac_container", !8, i64 0}
!18 = !{!"int", !8, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!"short", !8, i64 0}
!21 = !{!"_ZTS9drflac_bs", !7, i64 0, !7, i64 8, !7, i64 16, !19, i64 24, !19, i64 32, !18, i64 40, !18, i64 44, !8, i64 48, !19, i64 4144, !20, i64 4152, !19, i64 4160, !18, i64 4168}
!22 = !{!"_ZTS19drflac_frame_header", !19, i64 0, !18, i64 8, !18, i64 12, !20, i64 16, !8, i64 18, !8, i64 19, !8, i64 20}
!23 = !{!"_ZTS22drflac_ogg_page_header", !8, i64 0, !8, i64 4, !8, i64 5, !19, i64 8, !18, i64 16, !18, i64 20, !18, i64 24, !8, i64 28, !8, i64 29}
!24 = !{!16, !8, i64 52}
!25 = !{!16, !17, i64 24}
!26 = !{!27, !7, i64 0}
!27 = !{!"_ZTS12drflac_oggbs", !7, i64 0, !7, i64 8, !7, i64 16, !19, i64 24, !19, i64 32, !18, i64 40, !23, i64 48, !23, i64 336, !18, i64 624, !18, i64 628, !8, i64 632}
!28 = !{!27, !7, i64 8}
!29 = !{!27, !7, i64 16}
!30 = !{!16, !19, i64 4296}
!31 = !{!27, !19, i64 24}
!32 = !{!27, !19, i64 32}
!33 = !{!16, !18, i64 4288}
!34 = !{!27, !18, i64 40}
!35 = !{i64 0, i64 4, !36, i64 4, i64 1, !36, i64 5, i64 1, !36, i64 8, i64 8, !37, i64 16, i64 4, !38, i64 20, i64 4, !38, i64 24, i64 4, !38, i64 28, i64 1, !36, i64 29, i64 255, !36}
!36 = !{!8, !8, i64 0}
!37 = !{!19, !19, i64 0}
!38 = !{!18, !18, i64 0}
!39 = !{!16, !18, i64 84}
!40 = !{!41, !7, i64 272}
!41 = !{!"_ZTS6drflac", !7, i64 0, !7, i64 8, !11, i64 16, !18, i64 48, !8, i64 52, !8, i64 53, !20, i64 54, !19, i64 56, !17, i64 64, !18, i64 68, !42, i64 72, !19, i64 232, !19, i64 240, !43, i64 248, !7, i64 272, !7, i64 280, !7, i64 288, !18, i64 296, !18, i64 296, !18, i64 296, !21, i64 304, !8, i64 4480}
!42 = !{!"_ZTS12drflac_frame", !22, i64 0, !18, i64 24, !8, i64 32}
!43 = !{!"_ZTS21drflac__memory_stream", !7, i64 0, !19, i64 8, !19, i64 16}
!44 = !{i64 0, i64 8, !6, i64 8, i64 8, !6, i64 16, i64 8, !6, i64 24, i64 8, !37, i64 32, i64 8, !37, i64 40, i64 4, !38, i64 48, i64 4, !36, i64 52, i64 1, !36, i64 53, i64 1, !36, i64 56, i64 8, !37, i64 64, i64 4, !38, i64 68, i64 4, !38, i64 72, i64 4, !38, i64 76, i64 1, !36, i64 77, i64 255, !36, i64 336, i64 4, !36, i64 340, i64 1, !36, i64 341, i64 1, !36, i64 344, i64 8, !37, i64 352, i64 4, !38, i64 356, i64 4, !38, i64 360, i64 4, !38, i64 364, i64 1, !36, i64 365, i64 255, !36, i64 624, i64 4, !38, i64 628, i64 4, !38, i64 632, i64 65307, !36}
!45 = !{!41, !7, i64 304}
!46 = !{!41, !7, i64 312}
!47 = !{!41, !7, i64 320}
!48 = !{!41, !7, i64 288}
!49 = !{!41, !19, i64 240}
!50 = !{!41, !7, i64 280}
!51 = !{!41, !18, i64 68}
!52 = !{!53, !19, i64 0}
!53 = !{!"_ZTS16drflac_seekpoint", !19, i64 0, !19, i64 8, !20, i64 16}
!54 = !{!53, !19, i64 8}
!55 = !{!53, !20, i64 16}
!56 = distinct !{!56, !57}
!57 = !{!"llvm.loop.mustprogress"}
!58 = !{!16, !18, i64 80}
!59 = !{i64 0, i64 8, !37, i64 8, i64 4, !38, i64 12, i64 4, !38, i64 16, i64 2, !60, i64 18, i64 1, !36, i64 19, i64 1, !36, i64 20, i64 1, !36}
!60 = !{!20, !20, i64 0}
!61 = !{!41, !8, i64 53}


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