; 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 hidden i32 @error(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @stb_vorbis_get_file_offset(ptr noundef) #1

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

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

17:                                               ; preds = %1
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call i32 @error(ptr noundef %18, i32 noundef 2)
  store i32 %19, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %146

20:                                               ; preds = %1
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.stb_vorbis, ptr %21, i32 0, i32 36
  %23 = load i32, ptr %22, align 4, !tbaa !14
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %134, label %25

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 6, ptr %12) #2
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call i32 @stb_vorbis_get_file_offset(ptr noundef %26)
  store i32 %27, ptr %4, align 4, !tbaa !15
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.stb_vorbis, ptr %28, i32 0, i32 11
  %30 = load i32, ptr %29, align 8, !tbaa !16
  %31 = icmp uge i32 %30, 65536
  br i1 %31, label %32, label %46

32:                                               ; preds = %25
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.stb_vorbis, ptr %33, i32 0, i32 11
  %35 = load i32, ptr %34, align 8, !tbaa !16
  %36 = sub i32 %35, 65536
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.stb_vorbis, ptr %37, i32 0, i32 13
  %39 = load i32, ptr %38, align 8, !tbaa !17
  %40 = icmp uge i32 %36, %39
  br i1 %40, label %41, label %46

41:                                               ; preds = %32
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.stb_vorbis, ptr %42, i32 0, i32 11
  %44 = load i32, ptr %43, align 8, !tbaa !16
  %45 = sub i32 %44, 65536
  store i32 %45, ptr %5, align 4, !tbaa !15
  br label %50

46:                                               ; preds = %32, %25
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.stb_vorbis, ptr %47, i32 0, i32 13
  %49 = load i32, ptr %48, align 8, !tbaa !17
  store i32 %49, ptr %5, align 4, !tbaa !15
  br label %50

50:                                               ; preds = %46, %41
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load i32, ptr %5, align 4, !tbaa !15
  %53 = call i32 @set_file_offset(ptr noundef %51, i32 noundef %52)
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = call i32 @vorbis_find_page(ptr noundef %54, ptr noundef %6, ptr noundef %9)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %62, label %57

57:                                               ; preds = %50
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.stb_vorbis, ptr %58, i32 0, i32 20
  store i32 36, ptr %59, align 4, !tbaa !18
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.stb_vorbis, ptr %60, i32 0, i32 36
  store i32 -1, ptr %61, align 4, !tbaa !14
  br label %130

62:                                               ; preds = %50
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = call i32 @stb_vorbis_get_file_offset(ptr noundef %63)
  store i32 %64, ptr %7, align 4, !tbaa !15
  br label %65

65:                                               ; preds = %77, %62
  %66 = load i32, ptr %9, align 4, !tbaa !15
  %67 = icmp ne i32 %66, 0
  %68 = xor i1 %67, true
  br i1 %68, label %69, label %82

69:                                               ; preds = %65
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = load i32, ptr %6, align 4, !tbaa !15
  %72 = call i32 @set_file_offset(ptr noundef %70, i32 noundef %71)
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = call i32 @vorbis_find_page(ptr noundef %73, ptr noundef %6, ptr noundef %9)
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %77, label %76

76:                                               ; preds = %69
  br label %82

77:                                               ; preds = %69
  %78 = load i32, ptr %7, align 4, !tbaa !15
  %79 = add i32 %78, 1
  store i32 %79, ptr %5, align 4, !tbaa !15
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = call i32 @stb_vorbis_get_file_offset(ptr noundef %80)
  store i32 %81, ptr %7, align 4, !tbaa !15
  br label %65, !llvm.loop !19

82:                                               ; preds = %76, %65
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = load i32, ptr %7, align 4, !tbaa !15
  %85 = call i32 @set_file_offset(ptr noundef %83, i32 noundef %84)
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 0
  %88 = call i32 @getn(ptr noundef %86, ptr noundef %87, i32 noundef 6)
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = call i32 @get32(ptr noundef %89)
  store i32 %90, ptr %10, align 4, !tbaa !15
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = call i32 @get32(ptr noundef %91)
  store i32 %92, ptr %11, align 4, !tbaa !15
  %93 = load i32, ptr %10, align 4, !tbaa !15
  %94 = icmp eq i32 %93, -1
  br i1 %94, label %95, label %103

95:                                               ; preds = %82
  %96 = load i32, ptr %11, align 4, !tbaa !15
  %97 = icmp eq i32 %96, -1
  br i1 %97, label %98, label %103

98:                                               ; preds = %95
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.stb_vorbis, ptr %99, i32 0, i32 20
  store i32 36, ptr %100, align 4, !tbaa !18
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.stb_vorbis, ptr %101, i32 0, i32 36
  store i32 -1, ptr %102, align 4, !tbaa !14
  br label %130

103:                                              ; preds = %95, %82
  %104 = load i32, ptr %11, align 4, !tbaa !15
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %103
  store i32 -2, ptr %10, align 4, !tbaa !15
  br label %107

107:                                              ; preds = %106, %103
  %108 = load i32, ptr %10, align 4, !tbaa !15
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.stb_vorbis, ptr %109, i32 0, i32 36
  store i32 %108, ptr %110, align 4, !tbaa !14
  %111 = load i32, ptr %7, align 4, !tbaa !15
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.stb_vorbis, ptr %112, i32 0, i32 15
  %114 = getelementptr inbounds %struct.ProbedPage, ptr %113, i32 0, i32 0
  store i32 %111, ptr %114, align 8, !tbaa !21
  %115 = load i32, ptr %6, align 4, !tbaa !15
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.stb_vorbis, ptr %116, i32 0, i32 15
  %118 = getelementptr inbounds %struct.ProbedPage, ptr %117, i32 0, i32 1
  store i32 %115, ptr %118, align 4, !tbaa !22
  %119 = load i32, ptr %10, align 4, !tbaa !15
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.stb_vorbis, ptr %120, i32 0, i32 15
  %122 = getelementptr inbounds %struct.ProbedPage, ptr %121, i32 0, i32 4
  store i32 %119, ptr %122, align 8, !tbaa !23
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.stb_vorbis, ptr %123, i32 0, i32 15
  %125 = getelementptr inbounds %struct.ProbedPage, ptr %124, i32 0, i32 3
  store i32 -1, ptr %125, align 4, !tbaa !24
  %126 = load i32, ptr %5, align 4, !tbaa !15
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.stb_vorbis, ptr %127, i32 0, i32 15
  %129 = getelementptr inbounds %struct.ProbedPage, ptr %128, i32 0, i32 2
  store i32 %126, ptr %129, align 8, !tbaa !25
  br label %130

130:                                              ; preds = %107, %98, %57
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = load i32, ptr %4, align 4, !tbaa !15
  %133 = call i32 @set_file_offset(ptr noundef %131, i32 noundef %132)
  call void @llvm.lifetime.end.p0(i64 6, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  br label %134

134:                                              ; preds = %130, %20
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.stb_vorbis, ptr %135, i32 0, i32 36
  %137 = load i32, ptr %136, align 4, !tbaa !14
  %138 = icmp eq i32 %137, -1
  br i1 %138, label %139, label %140

139:                                              ; preds = %134
  br label %144

140:                                              ; preds = %134
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.stb_vorbis, ptr %141, i32 0, i32 36
  %143 = load i32, ptr %142, align 4, !tbaa !14
  br label %144

144:                                              ; preds = %140, %139
  %145 = phi i32 [ 0, %139 ], [ %143, %140 ]
  store i32 %145, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %146

146:                                              ; preds = %144, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  %147 = load i32, ptr %2, align 4
  ret i32 %147
}

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @get32(ptr 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, !7, i64 68}
!10 = !{!"stb_vorbis", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !7, i64 68, !11, i64 72, !12, i64 76, !12, i64 96, !13, i64 120, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !7, i64 152, !11, i64 160, !11, i64 164, !11, i64 168, !6, i64 176, !11, i64 184, !7, i64 188, !6, i64 320, !11, i64 328, !7, i64 332, !6, i64 464, !11, i64 472, !6, i64 480, !11, i64 488, !7, i64 492, !11, i64 876, !7, i64 880, !7, i64 1008, !7, i64 1136, !11, i64 1264, !7, i64 1272, !11, i64 1400, !11, i64 1404, !7, i64 1408, !7, i64 1424, !7, i64 1440, !7, i64 1456, !7, i64 1472, !11, i64 1488, !11, i64 1492, !11, i64 1496, !7, i64 1500, !7, i64 1755, !7, i64 1756, !7, i64 1757, !11, i64 1760, !11, i64 1764, !11, i64 1768, !11, i64 1772, !11, i64 1776, !11, i64 1780, !11, i64 1784, !11, i64 1788, !11, i64 1792, !11, i64 1796, !11, i64 1800, !7, i64 1804, !11, i64 1884, !11, i64 1888}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!13 = !{!"", !6, i64 0, !11, i64 8}
!14 = !{!10, !11, i64 876}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !11, i64 64}
!17 = !{!10, !11, i64 72}
!18 = !{!10, !11, i64 148}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !11, i64 96}
!22 = !{!10, !11, i64 100}
!23 = !{!10, !11, i64 112}
!24 = !{!10, !11, i64 108}
!25 = !{!10, !11, i64 104}


; 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 hidden i32 @error(ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

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

7:                                                ; preds = %1
  %8 = tail call i32 @error(ptr noundef nonnull %0, i32 noundef 2)
  br label %58

9:                                                ; preds = %1
  %10 = getelementptr inbounds i8, ptr %0, i64 876
  %11 = load i32, ptr %10, align 4, !tbaa !13
  %.not50 = icmp eq i32 %11, 0
  br i1 %.not50, label %12, label %55

12:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %4) #3
  %13 = tail call i32 @stb_vorbis_get_file_offset(ptr noundef nonnull %0)
  %14 = getelementptr inbounds i8, ptr %0, i64 64
  %15 = load i32, ptr %14, align 8, !tbaa !14
  %16 = icmp ugt i32 %15, 65535
  br i1 %16, label %17, label %._crit_edge64

._crit_edge64:                                    ; preds = %12
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 72
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !15
  br label %21

17:                                               ; preds = %12
  %18 = add i32 %15, -65536
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = load i32, ptr %19, align 8, !tbaa !15
  %spec.select66 = tail call i32 @llvm.umax.i32(i32 %18, i32 %20)
  br label %21

21:                                               ; preds = %17, %._crit_edge64
  %.046 = phi i32 [ %.pre, %._crit_edge64 ], [ %spec.select66, %17 ]
  %22 = tail call i32 @set_file_offset(ptr noundef nonnull %0, i32 noundef %.046)
  %23 = call i32 @vorbis_find_page(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %.not52 = icmp eq i32 %23, 0
  br i1 %.not52, label %24, label %26

24:                                               ; preds = %21
  %25 = getelementptr inbounds i8, ptr %0, i64 148
  store i32 36, ptr %25, align 4, !tbaa !16
  store i32 -1, ptr %10, align 4, !tbaa !13
  br label %53

26:                                               ; preds = %21
  %27 = call i32 @stb_vorbis_get_file_offset(ptr noundef nonnull %0)
  %28 = load i32, ptr %3, align 4, !tbaa !17
  %.not5357 = icmp eq i32 %28, 0
  br i1 %.not5357, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %26
  %29 = load i32, ptr %2, align 4, !tbaa !17
  %30 = call i32 @set_file_offset(ptr noundef %0, i32 noundef %29)
  %31 = call i32 @vorbis_find_page(ptr noundef %0, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %.not5467 = icmp eq i32 %31, 0
  br i1 %.not5467, label %._crit_edge, label %.lr.ph69

.lr.ph:                                           ; preds = %.lr.ph69
  %32 = load i32, ptr %2, align 4, !tbaa !17
  %33 = call i32 @set_file_offset(ptr noundef %0, i32 noundef %32)
  %34 = call i32 @vorbis_find_page(ptr noundef %0, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %.not54 = icmp eq i32 %34, 0
  br i1 %.not54, label %._crit_edge.loopexit, label %.lr.ph69, !llvm.loop !18

.lr.ph69:                                         ; preds = %.lr.ph.preheader, %.lr.ph
  %.0455968 = phi i32 [ %35, %.lr.ph ], [ %27, %.lr.ph.preheader ]
  %35 = call i32 @stb_vorbis_get_file_offset(ptr noundef %0)
  %36 = load i32, ptr %3, align 4, !tbaa !17
  %.not53 = icmp eq i32 %36, 0
  br i1 %.not53, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !18

._crit_edge.loopexit:                             ; preds = %.lr.ph69, %.lr.ph
  %37 = add i32 %.0455968, 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph.preheader, %26
  %.1.lcssa = phi i32 [ %.046, %26 ], [ %.046, %.lr.ph.preheader ], [ %37, %._crit_edge.loopexit ]
  %.045.lcssa = phi i32 [ %27, %26 ], [ %27, %.lr.ph.preheader ], [ %35, %._crit_edge.loopexit ]
  %38 = call i32 @set_file_offset(ptr noundef %0, i32 noundef %.045.lcssa)
  %39 = call i32 @getn(ptr noundef %0, ptr noundef nonnull %4, i32 noundef 6)
  %40 = call i32 @get32(ptr noundef %0)
  %41 = call i32 @get32(ptr noundef %0)
  %42 = icmp eq i32 %40, -1
  %43 = icmp eq i32 %41, -1
  %or.cond = select i1 %42, i1 %43, i1 false
  br i1 %or.cond, label %44, label %46

44:                                               ; preds = %._crit_edge
  %45 = getelementptr inbounds i8, ptr %0, i64 148
  store i32 36, ptr %45, align 4, !tbaa !16
  store i32 -1, ptr %10, align 4, !tbaa !13
  br label %53

46:                                               ; preds = %._crit_edge
  %.not55 = icmp eq i32 %41, 0
  %spec.select = select i1 %.not55, i32 %40, i32 -2
  store i32 %spec.select, ptr %10, align 4, !tbaa !13
  %47 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 %.045.lcssa, ptr %47, align 8, !tbaa !20
  %48 = load i32, ptr %2, align 4, !tbaa !17
  %49 = getelementptr inbounds i8, ptr %0, i64 100
  store i32 %48, ptr %49, align 4, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 %spec.select, ptr %50, align 8, !tbaa !22
  %51 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 -1, ptr %51, align 4, !tbaa !23
  %52 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %.1.lcssa, ptr %52, align 8, !tbaa !24
  br label %53

53:                                               ; preds = %46, %44, %24
  %54 = call i32 @set_file_offset(ptr noundef nonnull %0, i32 noundef %13)
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  %.pre65 = load i32, ptr %10, align 4, !tbaa !13
  br label %55

55:                                               ; preds = %53, %9
  %56 = phi i32 [ %.pre65, %53 ], [ %11, %9 ]
  %57 = icmp eq i32 %56, -1
  %spec.select56 = select i1 %57, i32 0, i32 %56
  br label %58

58:                                               ; preds = %55, %7
  %.0 = phi i32 [ %8, %7 ], [ %spec.select56, %55 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  ret i32 %.0
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #2

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 876}
!14 = !{!6, !7, i64 64}
!15 = !{!6, !7, i64 72}
!16 = !{!6, !7, i64 148}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!6, !7, i64 96}
!21 = !{!6, !7, i64 100}
!22 = !{!6, !7, i64 112}
!23 = !{!6, !7, i64 108}
!24 = !{!6, !7, i64 104}


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