; LLVM IR from Natrox/RaptorAudio :: RaptorAudio/src (stb_vorbis)

; 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.stb_vorbis = type { i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, ptr, i32, i8, i32, %struct.ProbedPage, %struct.ProbedPage, %struct.stb_vorbis_alloc, i32, i32, i32, i32, [2 x i32], i32, i32, i32, ptr, i32, [64 x i16], ptr, i32, [64 x i16], ptr, i32, ptr, i32, [64 x %struct.Mode], i32, [16 x ptr], [16 x ptr], [16 x ptr], i32, [16 x ptr], i32, i32, [2 x ptr], [2 x ptr], [2 x ptr], [2 x ptr], [2 x ptr], i32, i32, i32, [255 x i8], i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x %struct.CRCscan], i32, i32 }
%struct.ProbedPage = type { i32, i32, i32, i32, i32 }
%struct.stb_vorbis_alloc = type { ptr, i32 }
%struct.Mode = type { i8, i8, i16, i16 }
%struct.CRCscan = type { i32, i32, i32, i32, 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: nounwind uwtable
declare dso_local void @stb_vorbis_flush_pushdata(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @stb_vorbis_decode_frame_pushdata(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #1 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.stb_vorbis, ptr %20, i32 0, i32 12
  %22 = load i8, ptr %21, align 4, !tbaa !11
  %23 = icmp ne i8 %22, 0
  br i1 %23, label %27, label %24

24:                                               ; preds = %6
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = call i32 @error(ptr noundef %25, i32 noundef 2)
  store i32 %26, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %182

27:                                               ; preds = %6
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.stb_vorbis, ptr %28, i32 0, i32 66
  %30 = load i32, ptr %29, align 8, !tbaa !15
  %31 = icmp sge i32 %30, 0
  br i1 %31, label %32, label %38

32:                                               ; preds = %27
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %33, align 4, !tbaa !9
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = call i32 @vorbis_search_for_page_pushdata(ptr noundef %34, ptr noundef %35, i32 noundef %36)
  store i32 %37, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %182

38:                                               ; preds = %27
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.stb_vorbis, ptr %40, i32 0, i32 8
  store ptr %39, ptr %41, align 8, !tbaa !16
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i8, ptr %42, i64 %44
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.stb_vorbis, ptr %46, i32 0, i32 10
  store ptr %45, ptr %47, align 8, !tbaa !17
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.stb_vorbis, ptr %48, i32 0, i32 20
  store i32 0, ptr %49, align 4, !tbaa !18
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = call i32 @is_whole_packet_present(ptr noundef %50, i32 noundef 0)
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %55, label %53

53:                                               ; preds = %38
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %54, align 4, !tbaa !9
  store i32 0, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %182

55:                                               ; preds = %38
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = call i32 @vorbis_decode_packet(ptr noundef %56, ptr noundef %15, ptr noundef %17, ptr noundef %16)
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %129, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #2
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.stb_vorbis, ptr %60, i32 0, i32 20
  %62 = load i32, ptr %61, align 4, !tbaa !18
  store i32 %62, ptr %19, align 4, !tbaa !9
  %63 = load i32, ptr %19, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 35
  br i1 %64, label %65, label %89

65:                                               ; preds = %59
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.stb_vorbis, ptr %66, i32 0, i32 20
  store i32 0, ptr %67, align 4, !tbaa !18
  br label %68

68:                                               ; preds = %78, %65
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = call i32 @get8_packet(ptr noundef %69)
  %71 = icmp ne i32 %70, -1
  br i1 %71, label %72, label %79

72:                                               ; preds = %68
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.stb_vorbis, ptr %73, i32 0, i32 19
  %75 = load i32, ptr %74, align 8, !tbaa !19
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %72
  br label %79

78:                                               ; preds = %72
  br label %68, !llvm.loop !20

79:                                               ; preds = %77, %68
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %80, align 4, !tbaa !9
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.stb_vorbis, ptr %81, i32 0, i32 8
  %83 = load ptr, ptr %82, align 8, !tbaa !16
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = ptrtoint ptr %83 to i64
  %86 = ptrtoint ptr %84 to i64
  %87 = sub i64 %85, %86
  %88 = trunc i64 %87 to i32
  store i32 %88, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %128

89:                                               ; preds = %59
  %90 = load i32, ptr %19, align 4, !tbaa !9
  %91 = icmp eq i32 %90, 32
  br i1 %91, label %92, label %122

92:                                               ; preds = %89
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.stb_vorbis, ptr %93, i32 0, i32 40
  %95 = load i32, ptr %94, align 8, !tbaa !22
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %121

97:                                               ; preds = %92
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.stb_vorbis, ptr %98, i32 0, i32 20
  store i32 0, ptr %99, align 4, !tbaa !18
  br label %100

100:                                              ; preds = %110, %97
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call i32 @get8_packet(ptr noundef %101)
  %103 = icmp ne i32 %102, -1
  br i1 %103, label %104, label %111

104:                                              ; preds = %100
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.stb_vorbis, ptr %105, i32 0, i32 19
  %107 = load i32, ptr %106, align 8, !tbaa !19
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %104
  br label %111

110:                                              ; preds = %104
  br label %100, !llvm.loop !23

111:                                              ; preds = %109, %100
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %112, align 4, !tbaa !9
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.stb_vorbis, ptr %113, i32 0, i32 8
  %115 = load ptr, ptr %114, align 8, !tbaa !16
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = ptrtoint ptr %115 to i64
  %118 = ptrtoint ptr %116 to i64
  %119 = sub i64 %117, %118
  %120 = trunc i64 %119 to i32
  store i32 %120, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %128

121:                                              ; preds = %92
  br label %122

122:                                              ; preds = %121, %89
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  call void @stb_vorbis_flush_pushdata(ptr noundef %123)
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.stb_vorbis, ptr %125, i32 0, i32 20
  store i32 %124, ptr %126, align 4, !tbaa !18
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %127, align 4, !tbaa !9
  store i32 1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %128

128:                                              ; preds = %122, %111, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #2
  br label %182

129:                                              ; preds = %55
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i32, ptr %15, align 4, !tbaa !9
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = load i32, ptr %16, align 4, !tbaa !9
  %134 = call i32 @vorbis_finish_frame(ptr noundef %130, i32 noundef %131, i32 noundef %132, i32 noundef %133)
  store i32 %134, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %156, %129
  %136 = load i32, ptr %14, align 4, !tbaa !9
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.stb_vorbis, ptr %137, i32 0, i32 1
  %139 = load i32, ptr %138, align 4, !tbaa !24
  %140 = icmp slt i32 %136, %139
  br i1 %140, label %141, label %159

141:                                              ; preds = %135
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.stb_vorbis, ptr %142, i32 0, i32 37
  %144 = load i32, ptr %14, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [16 x ptr], ptr %143, i64 0, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = load i32, ptr %17, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds float, ptr %147, i64 %149
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.stb_vorbis, ptr %151, i32 0, i32 38
  %153 = load i32, ptr %14, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [16 x ptr], ptr %152, i64 0, i64 %154
  store ptr %150, ptr %155, align 8, !tbaa !5
  br label %156

156:                                              ; preds = %141
  %157 = load i32, ptr %14, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %14, align 4, !tbaa !9
  br label %135, !llvm.loop !25

159:                                              ; preds = %135
  %160 = load ptr, ptr %11, align 8, !tbaa !5
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %167

162:                                              ; preds = %159
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.stb_vorbis, ptr %163, i32 0, i32 1
  %165 = load i32, ptr %164, align 4, !tbaa !24
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %165, ptr %166, align 4, !tbaa !9
  br label %167

167:                                              ; preds = %162, %159
  %168 = load i32, ptr %15, align 4, !tbaa !9
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 %168, ptr %169, align 4, !tbaa !9
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.stb_vorbis, ptr %170, i32 0, i32 38
  %172 = getelementptr inbounds [16 x ptr], ptr %171, i64 0, i64 0
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %172, ptr %173, align 8, !tbaa !5
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.stb_vorbis, ptr %174, i32 0, i32 8
  %176 = load ptr, ptr %175, align 8, !tbaa !16
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = ptrtoint ptr %176 to i64
  %179 = ptrtoint ptr %177 to i64
  %180 = sub i64 %178, %179
  %181 = trunc i64 %180 to i32
  store i32 %181, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %182

182:                                              ; preds = %167, %128, %53, %32, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  %183 = load i32, ptr %7, align 4
  ret i32 %183
}

; Function Attrs: nounwind uwtable
declare hidden i32 @error(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @vorbis_search_for_page_pushdata(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @is_whole_packet_present(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @vorbis_decode_packet(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @get8_packet(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @vorbis_finish_frame(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 68}
!12 = !{!"stb_vorbis", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !7, i64 68, !10, i64 72, !13, i64 76, !13, i64 96, !14, i64 120, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !7, i64 152, !10, i64 160, !10, i64 164, !10, i64 168, !6, i64 176, !10, i64 184, !7, i64 188, !6, i64 320, !10, i64 328, !7, i64 332, !6, i64 464, !10, i64 472, !6, i64 480, !10, i64 488, !7, i64 492, !10, i64 876, !7, i64 880, !7, i64 1008, !7, i64 1136, !10, i64 1264, !7, i64 1272, !10, i64 1400, !10, i64 1404, !7, i64 1408, !7, i64 1424, !7, i64 1440, !7, i64 1456, !7, i64 1472, !10, i64 1488, !10, i64 1492, !10, i64 1496, !7, i64 1500, !7, i64 1755, !7, i64 1756, !7, i64 1757, !10, i64 1760, !10, i64 1764, !10, i64 1768, !10, i64 1772, !10, i64 1776, !10, i64 1780, !10, i64 1784, !10, i64 1788, !10, i64 1792, !10, i64 1796, !10, i64 1800, !7, i64 1804, !10, i64 1884, !10, i64 1888}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!14 = !{!"", !6, i64 0, !10, i64 8}
!15 = !{!12, !10, i64 1800}
!16 = !{!12, !6, i64 40}
!17 = !{!12, !6, i64 56}
!18 = !{!12, !10, i64 148}
!19 = !{!12, !10, i64 144}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!12, !10, i64 1264}
!23 = distinct !{!23, !21}
!24 = !{!12, !10, i64 4}
!25 = distinct !{!25, !21}


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

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

; Function Attrs: nounwind uwtable
declare dso_local void @stb_vorbis_flush_pushdata(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @stb_vorbis_decode_frame_pushdata(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #1 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #2
  %10 = getelementptr inbounds i8, ptr %0, i64 68
  %11 = load i8, ptr %10, align 4, !tbaa !5
  %.not = icmp eq i8 %11, 0
  br i1 %.not, label %12, label %14

12:                                               ; preds = %6
  %13 = tail call i32 @error(ptr noundef nonnull %0, i32 noundef 2)
  br label %89

14:                                               ; preds = %6
  %15 = getelementptr inbounds i8, ptr %0, i64 1800
  %16 = load i32, ptr %15, align 8, !tbaa !13
  %17 = icmp sgt i32 %16, -1
  br i1 %17, label %18, label %20

18:                                               ; preds = %14
  store i32 0, ptr %5, align 4, !tbaa !14
  %19 = tail call i32 @vorbis_search_for_page_pushdata(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %2)
  br label %89

20:                                               ; preds = %14
  %21 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %1, ptr %21, align 8, !tbaa !15
  %22 = sext i32 %2 to i64
  %23 = getelementptr inbounds i8, ptr %1, i64 %22
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %23, ptr %24, align 8, !tbaa !16
  %25 = getelementptr inbounds i8, ptr %0, i64 148
  store i32 0, ptr %25, align 4, !tbaa !17
  %26 = tail call i32 @is_whole_packet_present(ptr noundef nonnull %0, i32 noundef 0)
  %.not56 = icmp eq i32 %26, 0
  br i1 %.not56, label %27, label %28

27:                                               ; preds = %20
  store i32 0, ptr %5, align 4, !tbaa !14
  br label %89

28:                                               ; preds = %20
  %29 = call i32 @vorbis_decode_packet(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %8)
  %.not57 = icmp eq i32 %29, 0
  br i1 %.not57, label %30, label %61

30:                                               ; preds = %28
  %31 = load i32, ptr %25, align 4, !tbaa !17
  switch i32 %31, label %60 [
    i32 35, label %32
    i32 32, label %44
  ]

32:                                               ; preds = %30
  store i32 0, ptr %25, align 4, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %0, i64 144
  br label %34

34:                                               ; preds = %36, %32
  %35 = call i32 @get8_packet(ptr noundef nonnull %0)
  %.not60 = icmp eq i32 %35, -1
  br i1 %.not60, label %38, label %36

36:                                               ; preds = %34
  %37 = load i32, ptr %33, align 8, !tbaa !18
  %.not61 = icmp eq i32 %37, 0
  br i1 %.not61, label %34, label %38, !llvm.loop !19

38:                                               ; preds = %36, %34
  store i32 0, ptr %5, align 4, !tbaa !14
  %39 = load ptr, ptr %21, align 8, !tbaa !15
  %40 = ptrtoint ptr %39 to i64
  %41 = ptrtoint ptr %1 to i64
  %42 = sub i64 %40, %41
  %43 = trunc i64 %42 to i32
  br label %89

44:                                               ; preds = %30
  %45 = getelementptr inbounds i8, ptr %0, i64 1264
  %46 = load i32, ptr %45, align 8, !tbaa !21
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %60

48:                                               ; preds = %44
  store i32 0, ptr %25, align 4, !tbaa !17
  %49 = getelementptr inbounds i8, ptr %0, i64 144
  br label %50

50:                                               ; preds = %52, %48
  %51 = call i32 @get8_packet(ptr noundef nonnull %0)
  %.not58 = icmp eq i32 %51, -1
  br i1 %.not58, label %54, label %52

52:                                               ; preds = %50
  %53 = load i32, ptr %49, align 8, !tbaa !18
  %.not59 = icmp eq i32 %53, 0
  br i1 %.not59, label %50, label %54, !llvm.loop !22

54:                                               ; preds = %52, %50
  store i32 0, ptr %5, align 4, !tbaa !14
  %55 = load ptr, ptr %21, align 8, !tbaa !15
  %56 = ptrtoint ptr %55 to i64
  %57 = ptrtoint ptr %1 to i64
  %58 = sub i64 %56, %57
  %59 = trunc i64 %58 to i32
  br label %89

60:                                               ; preds = %30, %44
  call void @stb_vorbis_flush_pushdata(ptr noundef nonnull %0)
  store i32 %31, ptr %25, align 4, !tbaa !17
  store i32 0, ptr %5, align 4, !tbaa !14
  br label %89

61:                                               ; preds = %28
  %62 = load i32, ptr %7, align 4, !tbaa !14
  %63 = load i32, ptr %9, align 4, !tbaa !14
  %64 = load i32, ptr %8, align 4, !tbaa !14
  %65 = call i32 @vorbis_finish_frame(ptr noundef nonnull %0, i32 noundef %62, i32 noundef %63, i32 noundef %64)
  %66 = getelementptr inbounds i8, ptr %0, i64 4
  %67 = load i32, ptr %66, align 4, !tbaa !23
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %61
  %69 = getelementptr inbounds i8, ptr %0, i64 880
  %70 = load i32, ptr %9, align 4, !tbaa !14
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %0, i64 1008
  %wide.trip.count = zext nneg i32 %67 to i64
  %min.iters.check = icmp eq i32 %67, 1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483646
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %73 = getelementptr inbounds [16 x ptr], ptr %69, i64 0, i64 %index
  %wide.load = load <2 x ptr>, ptr %73, align 8, !tbaa !24
  %74 = getelementptr inbounds float, <2 x ptr> %wide.load, i64 %71
  %75 = getelementptr inbounds [16 x ptr], ptr %72, i64 0, i64 %index
  store <2 x ptr> %74, ptr %75, align 8, !tbaa !24
  %index.next = add nuw i64 %index, 2
  %76 = icmp eq i64 %index.next, %n.vec
  br i1 %76, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %77 = getelementptr inbounds [16 x ptr], ptr %69, i64 0, i64 %indvars.iv
  %78 = load ptr, ptr %77, align 8, !tbaa !24
  %79 = getelementptr inbounds float, ptr %78, i64 %71
  %80 = getelementptr inbounds [16 x ptr], ptr %72, i64 0, i64 %indvars.iv
  store ptr %79, ptr %80, align 8, !tbaa !24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !28

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %61
  %.not62 = icmp eq ptr %3, null
  br i1 %.not62, label %82, label %81

81:                                               ; preds = %._crit_edge
  store i32 %67, ptr %3, align 4, !tbaa !14
  br label %82

82:                                               ; preds = %81, %._crit_edge
  store i32 %65, ptr %5, align 4, !tbaa !14
  %83 = getelementptr inbounds i8, ptr %0, i64 1008
  store ptr %83, ptr %4, align 8, !tbaa !24
  %84 = load ptr, ptr %21, align 8, !tbaa !15
  %85 = ptrtoint ptr %84 to i64
  %86 = ptrtoint ptr %1 to i64
  %87 = sub i64 %85, %86
  %88 = trunc i64 %87 to i32
  br label %89

89:                                               ; preds = %38, %54, %60, %82, %27, %18, %12
  %.1 = phi i32 [ %19, %18 ], [ %88, %82 ], [ 0, %27 ], [ %13, %12 ], [ %43, %38 ], [ %59, %54 ], [ 1, %60 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #2
  ret i32 %.1
}

; Function Attrs: nounwind uwtable
declare hidden i32 @error(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @vorbis_search_for_page_pushdata(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @is_whole_packet_present(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @vorbis_decode_packet(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @get8_packet(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @vorbis_finish_frame(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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, !8, i64 68}
!6 = !{!"stb_vorbis", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 36, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !8, i64 68, !7, i64 72, !11, i64 76, !11, i64 96, !12, i64 120, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !8, i64 152, !7, i64 160, !7, i64 164, !7, i64 168, !10, i64 176, !7, i64 184, !8, i64 188, !10, i64 320, !7, i64 328, !8, i64 332, !10, i64 464, !7, i64 472, !10, i64 480, !7, i64 488, !8, i64 492, !7, i64 876, !8, i64 880, !8, i64 1008, !8, i64 1136, !7, i64 1264, !8, i64 1272, !7, i64 1400, !7, i64 1404, !8, i64 1408, !8, i64 1424, !8, i64 1440, !8, i64 1456, !8, i64 1472, !7, i64 1488, !7, i64 1492, !7, i64 1496, !8, i64 1500, !8, i64 1755, !8, i64 1756, !8, i64 1757, !7, i64 1760, !7, i64 1764, !7, i64 1768, !7, i64 1772, !7, i64 1776, !7, i64 1780, !7, i64 1784, !7, i64 1788, !7, i64 1792, !7, i64 1796, !7, i64 1800, !8, i64 1804, !7, i64 1884, !7, i64 1888}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!12 = !{!"", !10, i64 0, !7, i64 8}
!13 = !{!6, !7, i64 1800}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !10, i64 56}
!17 = !{!6, !7, i64 148}
!18 = !{!6, !7, i64 144}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !7, i64 1264}
!22 = distinct !{!22, !20}
!23 = !{!6, !7, i64 4}
!24 = !{!10, !10, i64 0}
!25 = distinct !{!25, !20, !26, !27}
!26 = !{!"llvm.loop.isvectorized", i32 1}
!27 = !{!"llvm.loop.unroll.runtime.disable"}
!28 = distinct !{!28, !20, !27, !26}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass