; LLVM IR from Overload-Technologies/Overload :: Dependencies/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 = 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_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.drflac_frame = type { %struct.drflac_frame_header, i32, [8 x %struct.drflac_subframe] }
%struct.drflac_frame_header = type { i64, i32, i32, i16, i8, i8, i8 }
%struct.drflac_subframe = type { i8, i8, i8, ptr }
%struct.drflac__memory_stream = type { ptr, i64, i64 }
%struct.drflac_bs = type { ptr, ptr, ptr, i64, i64, i32, i32, [512 x i64], i64, i16, i64, i32 }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local i32 @drflac_seek_to_pcm_frame(ptr noundef %0, i64 noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  br label %174

16:                                               ; preds = %2
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.drflac, ptr %17, i32 0, i32 11
  %19 = load i64, ptr %18, align 8, !tbaa !11
  %20 = load i64, ptr %5, align 8, !tbaa !9
  %21 = icmp eq i64 %19, %20
  br i1 %21, label %22, label %23

22:                                               ; preds = %16
  store i32 1, ptr %3, align 4
  br label %174

23:                                               ; preds = %16
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.drflac, ptr %24, i32 0, i32 12
  %26 = load i64, ptr %25, align 8, !tbaa !22
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %23
  store i32 0, ptr %3, align 4
  br label %174

29:                                               ; preds = %23
  %30 = load i64, ptr %5, align 8, !tbaa !9
  %31 = icmp eq i64 %30, 0
  br i1 %31, label %32, label %37

32:                                               ; preds = %29
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.drflac, ptr %33, i32 0, i32 11
  store i64 0, ptr %34, align 8, !tbaa !11
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call noundef i32 @_ZL27drflac__seek_to_first_frameP6drflac(ptr noundef %35)
  store i32 %36, ptr %3, align 4
  br label %174

37:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  store i32 0, ptr %6, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.drflac, ptr %38, i32 0, i32 11
  %40 = load i64, ptr %39, align 8, !tbaa !11
  store i64 %40, ptr %7, align 8, !tbaa !9
  %41 = load i64, ptr %5, align 8, !tbaa !9
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.drflac, ptr %42, i32 0, i32 7
  %44 = load i64, ptr %43, align 8, !tbaa !24
  %45 = icmp ugt i64 %41, %44
  br i1 %45, label %46, label %50

46:                                               ; preds = %37
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.drflac, ptr %47, i32 0, i32 7
  %49 = load i64, ptr %48, align 8, !tbaa !24
  store i64 %49, ptr %5, align 8, !tbaa !9
  br label %50

50:                                               ; preds = %46, %37
  %51 = load i64, ptr %5, align 8, !tbaa !9
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.drflac, ptr %52, i32 0, i32 11
  %54 = load i64, ptr %53, align 8, !tbaa !11
  %55 = icmp ugt i64 %51, %54
  br i1 %55, label %56, label %83

56:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  %57 = load i64, ptr %5, align 8, !tbaa !9
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.drflac, ptr %58, i32 0, i32 11
  %60 = load i64, ptr %59, align 8, !tbaa !11
  %61 = sub i64 %57, %60
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %8, align 4, !tbaa !23
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.drflac, ptr %63, i32 0, i32 10
  %65 = getelementptr inbounds %struct.drflac_frame, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 8, !tbaa !25
  %67 = load i32, ptr %8, align 4, !tbaa !23
  %68 = icmp ugt i32 %66, %67
  br i1 %68, label %69, label %79

69:                                               ; preds = %56
  %70 = load i32, ptr %8, align 4, !tbaa !23
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.drflac, ptr %71, i32 0, i32 10
  %73 = getelementptr inbounds %struct.drflac_frame, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 8, !tbaa !25
  %75 = sub i32 %74, %70
  store i32 %75, ptr %73, align 8, !tbaa !25
  %76 = load i64, ptr %5, align 8, !tbaa !9
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.drflac, ptr %77, i32 0, i32 11
  store i64 %76, ptr %78, align 8, !tbaa !11
  store i32 1, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %80

79:                                               ; preds = %56
  store i32 0, ptr %9, align 4
  br label %80

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

82:                                               ; preds = %80
  br label %119

83:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.drflac, ptr %84, i32 0, i32 11
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = load i64, ptr %5, align 8, !tbaa !9
  %88 = sub i64 %86, %87
  %89 = trunc i64 %88 to i32
  store i32 %89, ptr %10, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.drflac, ptr %90, i32 0, i32 10
  %92 = getelementptr inbounds %struct.drflac_frame, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.drflac_frame_header, ptr %92, i32 0, i32 3
  %94 = load i16, ptr %93, align 8, !tbaa !26
  %95 = zext i16 %94 to i32
  store i32 %95, ptr %11, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  %96 = load i32, ptr %11, align 4, !tbaa !23
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.drflac, ptr %97, i32 0, i32 10
  %99 = getelementptr inbounds %struct.drflac_frame, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 8, !tbaa !25
  %101 = sub i32 %96, %100
  store i32 %101, ptr %12, align 4, !tbaa !23
  %102 = load i32, ptr %12, align 4, !tbaa !23
  %103 = load i32, ptr %10, align 4, !tbaa !23
  %104 = icmp ugt i32 %102, %103
  br i1 %104, label %105, label %115

105:                                              ; preds = %83
  %106 = load i32, ptr %10, align 4, !tbaa !23
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.drflac, ptr %107, i32 0, i32 10
  %109 = getelementptr inbounds %struct.drflac_frame, ptr %108, i32 0, i32 1
  %110 = load i32, ptr %109, align 8, !tbaa !25
  %111 = add i32 %110, %106
  store i32 %111, ptr %109, align 8, !tbaa !25
  %112 = load i64, ptr %5, align 8, !tbaa !9
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.drflac, ptr %113, i32 0, i32 11
  store i64 %112, ptr %114, align 8, !tbaa !11
  store i32 1, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %116

115:                                              ; preds = %83
  store i32 0, ptr %9, align 4
  br label %116

116:                                              ; preds = %115, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  %117 = load i32, ptr %9, align 4
  switch i32 %117, label %173 [
    i32 0, label %118
  ]

118:                                              ; preds = %116
  br label %119

119:                                              ; preds = %118, %82
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.drflac, ptr %120, i32 0, i32 8
  %122 = load i32, ptr %121, align 8, !tbaa !27
  %123 = icmp eq i32 %122, 1
  br i1 %123, label %124, label %128

124:                                              ; preds = %119
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load i64, ptr %5, align 8, !tbaa !9
  %127 = call noundef i32 @_ZL29drflac_ogg__seek_to_pcm_frameP6drflacy(ptr noundef %125, i64 noundef %126)
  store i32 %127, ptr %6, align 4, !tbaa !23
  br label %155

128:                                              ; preds = %119
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.drflac, ptr %129, i32 0, i32 17
  %131 = load i8, ptr %130, align 8
  %132 = and i8 %131, 1
  %133 = zext i8 %132 to i32
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %139, label %135

135:                                              ; preds = %128
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = load i64, ptr %5, align 8, !tbaa !9
  %138 = call noundef i32 @_ZL37drflac__seek_to_pcm_frame__seek_tableP6drflacy(ptr noundef %136, i64 noundef %137)
  store i32 %138, ptr %6, align 4, !tbaa !23
  br label %139

139:                                              ; preds = %135, %128
  %140 = load i32, ptr %6, align 4, !tbaa !23
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %154, label %142

142:                                              ; preds = %139
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.drflac, ptr %143, i32 0, i32 17
  %145 = load i8, ptr %144, align 8
  %146 = lshr i8 %145, 2
  %147 = and i8 %146, 1
  %148 = zext i8 %147 to i32
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %154, label %150

150:                                              ; preds = %142
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = load i64, ptr %5, align 8, !tbaa !9
  %153 = call noundef i32 @_ZL38drflac__seek_to_pcm_frame__brute_forceP6drflacy(ptr noundef %151, i64 noundef %152)
  store i32 %153, ptr %6, align 4, !tbaa !23
  br label %154

154:                                              ; preds = %150, %142, %139
  br label %155

155:                                              ; preds = %154, %124
  %156 = load i32, ptr %6, align 4, !tbaa !23
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %162

158:                                              ; preds = %155
  %159 = load i64, ptr %5, align 8, !tbaa !9
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.drflac, ptr %160, i32 0, i32 11
  store i64 %159, ptr %161, align 8, !tbaa !11
  br label %171

162:                                              ; preds = %155
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = load i64, ptr %7, align 8, !tbaa !9
  %165 = call i32 @drflac_seek_to_pcm_frame(ptr noundef %163, i64 noundef %164)
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %167, label %170

167:                                              ; preds = %162
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = call i32 @drflac_seek_to_pcm_frame(ptr noundef %168, i64 noundef 0)
  br label %170

170:                                              ; preds = %167, %162
  br label %171

171:                                              ; preds = %170, %158
  %172 = load i32, ptr %6, align 4, !tbaa !23
  store i32 %172, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %173

173:                                              ; preds = %171, %116, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  br label %174

174:                                              ; preds = %173, %32, %28, %22, %15
  %175 = load i32, ptr %3, align 4
  ret i32 %175
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL27drflac__seek_to_first_frameP6drflac(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL29drflac_ogg__seek_to_pcm_frameP6drflacy(ptr noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL37drflac__seek_to_pcm_frame__seek_tableP6drflacy(ptr noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL38drflac__seek_to_pcm_frame__brute_forceP6drflacy(ptr noundef, i64 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = !{!"long long", !7, i64 0}
!11 = !{!12, !10, i64 232}
!12 = !{!"_ZTS6drflac", !6, i64 0, !6, i64 8, !13, i64 16, !14, i64 48, !7, i64 52, !7, i64 53, !15, i64 54, !10, i64 56, !16, i64 64, !14, i64 68, !17, i64 72, !10, i64 232, !10, i64 240, !19, i64 248, !6, i64 272, !6, i64 280, !6, i64 288, !14, i64 296, !14, i64 296, !14, i64 296, !21, i64 304, !7, i64 4480}
!13 = !{!"_ZTS27drflac_allocation_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!"int", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ZTS16drflac_container", !7, i64 0}
!17 = !{!"_ZTS12drflac_frame", !18, i64 0, !14, i64 24, !7, i64 32}
!18 = !{!"_ZTS19drflac_frame_header", !10, i64 0, !14, i64 8, !14, i64 12, !15, i64 16, !7, i64 18, !7, i64 19, !7, i64 20}
!19 = !{!"_ZTS21drflac__memory_stream", !6, i64 0, !20, i64 8, !20, i64 16}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTS9drflac_bs", !6, i64 0, !6, i64 8, !6, i64 16, !20, i64 24, !10, i64 32, !14, i64 40, !14, i64 44, !7, i64 48, !10, i64 4144, !15, i64 4152, !10, i64 4160, !14, i64 4168}
!22 = !{!12, !10, i64 240}
!23 = !{!14, !14, i64 0}
!24 = !{!12, !10, i64 56}
!25 = !{!12, !14, i64 96}
!26 = !{!12, !15, i64 88}
!27 = !{!12, !16, i64 64}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @drflac_seek_to_pcm_frame(ptr noundef %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %drflac_seek_to_pcm_frame.exit, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 232
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i64 %6, %1
  br i1 %7, label %drflac_seek_to_pcm_frame.exit, label %8

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 240
  %10 = load i64, ptr %9, align 8, !tbaa !20
  %11 = icmp eq i64 %10, 0
  br i1 %11, label %drflac_seek_to_pcm_frame.exit, label %12

12:                                               ; preds = %8
  %13 = icmp eq i64 %1, 0
  br i1 %13, label %14, label %16

14:                                               ; preds = %12
  store i64 0, ptr %5, align 8, !tbaa !5
  %15 = tail call noundef i32 @_ZL27drflac__seek_to_first_frameP6drflac(ptr noundef nonnull %0)
  br label %drflac_seek_to_pcm_frame.exit

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load i64, ptr %17, align 8, !tbaa !21
  %spec.select = tail call i64 @llvm.umin.i64(i64 %18, i64 %1)
  %19 = icmp ugt i64 %spec.select, %6
  br i1 %19, label %20, label %27

20:                                               ; preds = %16
  %21 = sub i64 %spec.select, %6
  %22 = trunc i64 %21 to i32
  %23 = getelementptr inbounds i8, ptr %0, i64 96
  %24 = load i32, ptr %23, align 8, !tbaa !22
  %.not64 = icmp ugt i32 %24, %22
  br i1 %.not64, label %25, label %.critedge

25:                                               ; preds = %20
  %26 = sub i32 %24, %22
  store i32 %26, ptr %23, align 8, !tbaa !22
  store i64 %spec.select, ptr %5, align 8, !tbaa !5
  br label %drflac_seek_to_pcm_frame.exit

27:                                               ; preds = %16
  %28 = sub i64 %6, %spec.select
  %29 = trunc i64 %28 to i32
  %30 = getelementptr inbounds i8, ptr %0, i64 88
  %31 = load i16, ptr %30, align 8, !tbaa !23
  %32 = zext i16 %31 to i32
  %33 = getelementptr inbounds i8, ptr %0, i64 96
  %34 = load i32, ptr %33, align 8, !tbaa !22
  %35 = sub i32 %32, %34
  %.not = icmp ugt i32 %35, %29
  br i1 %.not, label %36, label %.critedge

36:                                               ; preds = %27
  %37 = add i32 %34, %29
  store i32 %37, ptr %33, align 8, !tbaa !22
  store i64 %spec.select, ptr %5, align 8, !tbaa !5
  br label %drflac_seek_to_pcm_frame.exit

.critedge:                                        ; preds = %27, %20
  %38 = getelementptr inbounds i8, ptr %0, i64 64
  %39 = load i32, ptr %38, align 8, !tbaa !24
  %40 = icmp eq i32 %39, 1
  br i1 %40, label %41, label %43

41:                                               ; preds = %.critedge
  %42 = tail call noundef i32 @_ZL29drflac_ogg__seek_to_pcm_frameP6drflacy(ptr noundef nonnull %0, i64 noundef %spec.select)
  br label %53

43:                                               ; preds = %.critedge
  %44 = getelementptr inbounds i8, ptr %0, i64 296
  %45 = load i8, ptr %44, align 8
  %46 = and i8 %45, 1
  %.not65 = icmp eq i8 %46, 0
  br i1 %.not65, label %47, label %.thread

47:                                               ; preds = %43
  %48 = tail call noundef i32 @_ZL37drflac__seek_to_pcm_frame__seek_tableP6drflacy(ptr noundef nonnull %0, i64 noundef %spec.select)
  %.not66 = icmp eq i32 %48, 0
  br i1 %.not66, label %..thread_crit_edge, label %.thread77

..thread_crit_edge:                               ; preds = %47
  %.pre = load i8, ptr %44, align 8
  br label %.thread

.thread:                                          ; preds = %..thread_crit_edge, %43
  %49 = phi i8 [ %.pre, %..thread_crit_edge ], [ %45, %43 ]
  %50 = and i8 %49, 4
  %.not67 = icmp eq i8 %50, 0
  br i1 %.not67, label %51, label %.thread73

51:                                               ; preds = %.thread
  %52 = tail call noundef i32 @_ZL38drflac__seek_to_pcm_frame__brute_forceP6drflacy(ptr noundef nonnull %0, i64 noundef %spec.select)
  br label %53

53:                                               ; preds = %51, %41
  %.154 = phi i32 [ %42, %41 ], [ %52, %51 ]
  %.not68 = icmp eq i32 %.154, 0
  br i1 %.not68, label %.thread73, label %.thread77

.thread77:                                        ; preds = %47, %53
  %.15480 = phi i32 [ %.154, %53 ], [ %48, %47 ]
  store i64 %spec.select, ptr %5, align 8, !tbaa !5
  br label %drflac_seek_to_pcm_frame.exit

.thread73:                                        ; preds = %.thread, %53
  %54 = tail call i32 @drflac_seek_to_pcm_frame(ptr noundef nonnull %0, i64 noundef %6)
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %drflac_seek_to_pcm_frame.exit

56:                                               ; preds = %.thread73
  %57 = load i64, ptr %5, align 8, !tbaa !5
  %58 = icmp eq i64 %57, 0
  br i1 %58, label %drflac_seek_to_pcm_frame.exit, label %59

59:                                               ; preds = %56
  %60 = load i64, ptr %9, align 8, !tbaa !20
  %61 = icmp eq i64 %60, 0
  br i1 %61, label %drflac_seek_to_pcm_frame.exit, label %62

62:                                               ; preds = %59
  store i64 0, ptr %5, align 8, !tbaa !5
  %63 = tail call noundef i32 @_ZL27drflac__seek_to_first_frameP6drflac(ptr noundef nonnull %0)
  br label %drflac_seek_to_pcm_frame.exit

drflac_seek_to_pcm_frame.exit:                    ; preds = %62, %59, %56, %36, %25, %.thread73, %.thread77, %8, %4, %2, %14
  %.3 = phi i32 [ %15, %14 ], [ 0, %2 ], [ 1, %4 ], [ 0, %8 ], [ 1, %25 ], [ 1, %36 ], [ 0, %.thread73 ], [ %.15480, %.thread77 ], [ 0, %56 ], [ 0, %59 ], [ 0, %62 ]
  ret i32 %.3
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL29drflac_ogg__seek_to_pcm_frameP6drflacy(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL37drflac__seek_to_pcm_frame__seek_tableP6drflacy(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL38drflac__seek_to_pcm_frame__brute_forceP6drflacy(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #1

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 speculatable willreturn memory(none) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 232}
!6 = !{!"_ZTS6drflac", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 48, !8, i64 52, !8, i64 53, !12, i64 54, !13, i64 56, !14, i64 64, !11, i64 68, !15, i64 72, !13, i64 232, !13, i64 240, !17, i64 248, !7, i64 272, !7, i64 280, !7, i64 288, !11, i64 296, !11, i64 296, !11, i64 296, !19, i64 304, !8, i64 4480}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS27drflac_allocation_callbacks", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!11 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"_ZTS16drflac_container", !8, i64 0}
!15 = !{!"_ZTS12drflac_frame", !16, i64 0, !11, i64 24, !8, i64 32}
!16 = !{!"_ZTS19drflac_frame_header", !13, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !8, i64 18, !8, i64 19, !8, i64 20}
!17 = !{!"_ZTS21drflac__memory_stream", !7, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"long", !8, i64 0}
!19 = !{!"_ZTS9drflac_bs", !7, i64 0, !7, i64 8, !7, i64 16, !18, i64 24, !13, i64 32, !11, i64 40, !11, i64 44, !8, i64 48, !13, i64 4144, !12, i64 4152, !13, i64 4160, !11, i64 4168}
!20 = !{!6, !13, i64 240}
!21 = !{!6, !13, i64 56}
!22 = !{!6, !11, i64 96}
!23 = !{!6, !12, i64 88}
!24 = !{!6, !14, i64 64}


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