; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode/modules/juce_audio_formats/codecs/oggvorbis (seek)

; 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.ogg_packet = type { ptr, i64, i64, i64, i64, i64 }
%struct.ogg_page = type { ptr, i64, ptr, i64 }
%struct.OggVorbis_File = type { ptr, i32, i64, i64, %struct.ogg_sync_state, i32, ptr, ptr, ptr, ptr, ptr, ptr, i64, i32, i64, i32, double, double, %struct.ogg_stream_state, %struct.vorbis_dsp_state, %struct.vorbis_block, %struct.ov_callbacks }
%struct.ogg_sync_state = type { ptr, i32, i32, i32, i32, i32, i32 }
%struct.ogg_stream_state = type { ptr, i64, i64, i64, ptr, ptr, i64, i64, i64, i64, [282 x i8], i32, i32, i32, i64, i64, i64, i64 }
%struct.vorbis_dsp_state = type { i32, ptr, ptr, ptr, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, ptr }
%struct.vorbis_block = type { ptr, %struct.oggpack_buffer, i64, i64, i64, i32, i32, i32, i64, i64, ptr, ptr, i64, i64, i64, ptr, i64, i64, i64, i64, ptr }
%struct.oggpack_buffer = type { i64, i32, ptr, ptr, i64 }
%struct.ov_callbacks = type { ptr, ptr, ptr, ptr }
%struct.vorbis_info = type { i32, i32, i64, i64, i64, i64, i64, ptr }

; 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
define dso_local i32 @ov_pcm_seek(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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.ogg_packet, align 8
  %11 = alloca %struct.ogg_page, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load i64, ptr %5, align 8, !tbaa !9
  %21 = call i32 @ov_pcm_seek_page(ptr noundef %19, i64 noundef %20)
  store i32 %21, ptr %8, align 4, !tbaa !11
  %22 = load i32, ptr %8, align 4, !tbaa !11
  %23 = icmp slt i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %2
  %25 = load i32, ptr %8, align 4, !tbaa !11
  store i32 %25, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %305

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call i32 @_make_decode_ready(ptr noundef %27)
  store i32 %28, ptr %8, align 4, !tbaa !11
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %32

30:                                               ; preds = %26
  %31 = load i32, ptr %8, align 4, !tbaa !11
  store i32 %31, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %305

32:                                               ; preds = %26
  br label %33

33:                                               ; preds = %236, %234, %32
  br label %34

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.OggVorbis_File, ptr %35, i32 0, i32 18
  %37 = call i32 @ogg_stream_packetpeek(ptr noundef %36, ptr noundef %10)
  store i32 %37, ptr %12, align 4, !tbaa !11
  %38 = load i32, ptr %12, align 4, !tbaa !11
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %40, label %151

40:                                               ; preds = %34
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.OggVorbis_File, ptr %41, i32 0, i32 10
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.OggVorbis_File, ptr %44, i32 0, i32 15
  %46 = load i32, ptr %45, align 8, !tbaa !22
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct.vorbis_info, ptr %43, i64 %47
  %49 = call i64 @vorbis_packet_blocksize(ptr noundef %48, ptr noundef %10)
  %50 = trunc i64 %49 to i32
  store i32 %50, ptr %6, align 4, !tbaa !11
  %51 = load i32, ptr %6, align 4, !tbaa !11
  %52 = icmp slt i32 %51, 0
  br i1 %52, label %53, label %57

53:                                               ; preds = %40
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.OggVorbis_File, ptr %54, i32 0, i32 18
  %56 = call i32 @ogg_stream_packetout(ptr noundef %55, ptr noundef null)
  store i32 2, ptr %9, align 4
  br label %234

57:                                               ; preds = %40
  %58 = load i32, ptr %7, align 4, !tbaa !11
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %70

60:                                               ; preds = %57
  %61 = load i32, ptr %7, align 4, !tbaa !11
  %62 = load i32, ptr %6, align 4, !tbaa !11
  %63 = add nsw i32 %61, %62
  %64 = ashr i32 %63, 2
  %65 = sext i32 %64 to i64
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.OggVorbis_File, ptr %66, i32 0, i32 12
  %68 = load i64, ptr %67, align 8, !tbaa !23
  %69 = add nsw i64 %68, %65
  store i64 %69, ptr %67, align 8, !tbaa !23
  br label %70

70:                                               ; preds = %60, %57
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.OggVorbis_File, ptr %71, i32 0, i32 12
  %73 = load i64, ptr %72, align 8, !tbaa !23
  %74 = load i32, ptr %6, align 4, !tbaa !11
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.OggVorbis_File, ptr %75, i32 0, i32 10
  %77 = load ptr, ptr %76, align 8, !tbaa !13
  %78 = call i32 @vorbis_info_blocksize(ptr noundef %77, i32 noundef 1)
  %79 = add nsw i32 %74, %78
  %80 = ashr i32 %79, 2
  %81 = sext i32 %80 to i64
  %82 = add nsw i64 %73, %81
  %83 = load i64, ptr %5, align 8, !tbaa !9
  %84 = icmp sge i64 %82, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %70
  store i32 3, ptr %9, align 4
  br label %234

86:                                               ; preds = %70
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.OggVorbis_File, ptr %87, i32 0, i32 18
  %89 = call i32 @ogg_stream_packetout(ptr noundef %88, ptr noundef null)
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.OggVorbis_File, ptr %90, i32 0, i32 20
  %92 = call i32 @vorbis_synthesis_trackonly(ptr noundef %91, ptr noundef %10)
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.OggVorbis_File, ptr %93, i32 0, i32 19
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.OggVorbis_File, ptr %95, i32 0, i32 20
  %97 = call i32 @vorbis_synthesis_blockin(ptr noundef %94, ptr noundef %96)
  %98 = getelementptr inbounds %struct.ogg_packet, ptr %10, i32 0, i32 4
  %99 = load i64, ptr %98, align 8, !tbaa !24
  %100 = icmp sgt i64 %99, -1
  br i1 %100, label %101, label %149

101:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %102 = getelementptr inbounds %struct.ogg_packet, ptr %10, i32 0, i32 4
  %103 = load i64, ptr %102, align 8, !tbaa !24
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.OggVorbis_File, ptr %104, i32 0, i32 9
  %106 = load ptr, ptr %105, align 8, !tbaa !26
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.OggVorbis_File, ptr %107, i32 0, i32 15
  %109 = load i32, ptr %108, align 8, !tbaa !22
  %110 = mul nsw i32 %109, 2
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i64, ptr %106, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !9
  %114 = sub nsw i64 %103, %113
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.OggVorbis_File, ptr %115, i32 0, i32 12
  store i64 %114, ptr %116, align 8, !tbaa !23
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.OggVorbis_File, ptr %117, i32 0, i32 12
  %119 = load i64, ptr %118, align 8, !tbaa !23
  %120 = icmp slt i64 %119, 0
  br i1 %120, label %121, label %124

121:                                              ; preds = %101
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.OggVorbis_File, ptr %122, i32 0, i32 12
  store i64 0, ptr %123, align 8, !tbaa !23
  br label %124

124:                                              ; preds = %121, %101
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %125

125:                                              ; preds = %145, %124
  %126 = load i32, ptr %13, align 4, !tbaa !11
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.OggVorbis_File, ptr %127, i32 0, i32 15
  %129 = load i32, ptr %128, align 8, !tbaa !22
  %130 = icmp slt i32 %126, %129
  br i1 %130, label %131, label %148

131:                                              ; preds = %125
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.OggVorbis_File, ptr %132, i32 0, i32 9
  %134 = load ptr, ptr %133, align 8, !tbaa !26
  %135 = load i32, ptr %13, align 4, !tbaa !11
  %136 = mul nsw i32 %135, 2
  %137 = add nsw i32 %136, 1
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i64, ptr %134, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !9
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.OggVorbis_File, ptr %141, i32 0, i32 12
  %143 = load i64, ptr %142, align 8, !tbaa !23
  %144 = add nsw i64 %143, %140
  store i64 %144, ptr %142, align 8, !tbaa !23
  br label %145

145:                                              ; preds = %131
  %146 = load i32, ptr %13, align 4, !tbaa !11
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %13, align 4, !tbaa !11
  br label %125, !llvm.loop !27

148:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %149

149:                                              ; preds = %148, %86
  %150 = load i32, ptr %6, align 4, !tbaa !11
  store i32 %150, ptr %7, align 4, !tbaa !11
  br label %233

151:                                              ; preds = %34
  %152 = load i32, ptr %12, align 4, !tbaa !11
  %153 = icmp slt i32 %152, 0
  br i1 %153, label %154, label %158

154:                                              ; preds = %151
  %155 = load i32, ptr %12, align 4, !tbaa !11
  %156 = icmp ne i32 %155, -3
  br i1 %156, label %157, label %158

157:                                              ; preds = %154
  store i32 3, ptr %9, align 4
  br label %234

158:                                              ; preds = %154, %151
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = call i64 @_get_next_page(ptr noundef %159, ptr noundef %11, i64 noundef -1)
  %161 = icmp slt i64 %160, 0
  br i1 %161, label %162, label %163

162:                                              ; preds = %158
  store i32 3, ptr %9, align 4
  br label %234

163:                                              ; preds = %158
  %164 = call i32 @ogg_page_bos(ptr noundef %11)
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %168

166:                                              ; preds = %163
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_decode_clear(ptr noundef %167)
  br label %168

168:                                              ; preds = %166, %163
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.OggVorbis_File, ptr %169, i32 0, i32 13
  %171 = load i32, ptr %170, align 8, !tbaa !29
  %172 = icmp slt i32 %171, 3
  br i1 %172, label %173, label %229

173:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %174 = call i32 @ogg_page_serialno(ptr noundef %11)
  %175 = sext i32 %174 to i64
  store i64 %175, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %176

176:                                              ; preds = %194, %173
  %177 = load i32, ptr %15, align 4, !tbaa !11
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.OggVorbis_File, ptr %178, i32 0, i32 5
  %180 = load i32, ptr %179, align 8, !tbaa !30
  %181 = icmp slt i32 %177, %180
  br i1 %181, label %182, label %197

182:                                              ; preds = %176
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.OggVorbis_File, ptr %183, i32 0, i32 8
  %185 = load ptr, ptr %184, align 8, !tbaa !31
  %186 = load i32, ptr %15, align 4, !tbaa !11
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i64, ptr %185, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !9
  %190 = load i64, ptr %14, align 8, !tbaa !9
  %191 = icmp eq i64 %189, %190
  br i1 %191, label %192, label %193

192:                                              ; preds = %182
  br label %197

193:                                              ; preds = %182
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %15, align 4, !tbaa !11
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %15, align 4, !tbaa !11
  br label %176, !llvm.loop !32

197:                                              ; preds = %192, %176
  %198 = load i32, ptr %15, align 4, !tbaa !11
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.OggVorbis_File, ptr %199, i32 0, i32 5
  %201 = load i32, ptr %200, align 8, !tbaa !30
  %202 = icmp eq i32 %198, %201
  br i1 %202, label %203, label %204

203:                                              ; preds = %197
  store i32 2, ptr %9, align 4
  br label %226

204:                                              ; preds = %197
  %205 = load i32, ptr %15, align 4, !tbaa !11
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.OggVorbis_File, ptr %206, i32 0, i32 15
  store i32 %205, ptr %207, align 8, !tbaa !22
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.OggVorbis_File, ptr %208, i32 0, i32 13
  store i32 3, ptr %209, align 8, !tbaa !29
  %210 = call i32 @ogg_page_serialno(ptr noundef %11)
  %211 = sext i32 %210 to i64
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.OggVorbis_File, ptr %212, i32 0, i32 14
  store i64 %211, ptr %213, align 8, !tbaa !33
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.OggVorbis_File, ptr %214, i32 0, i32 18
  %216 = load i64, ptr %14, align 8, !tbaa !9
  %217 = trunc i64 %216 to i32
  %218 = call i32 @ogg_stream_reset_serialno(ptr noundef %215, i32 noundef %217)
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = call i32 @_make_decode_ready(ptr noundef %219)
  store i32 %220, ptr %12, align 4, !tbaa !11
  %221 = load i32, ptr %12, align 4, !tbaa !11
  %222 = icmp ne i32 %221, 0
  br i1 %222, label %223, label %225

223:                                              ; preds = %204
  %224 = load i32, ptr %12, align 4, !tbaa !11
  store i32 %224, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %226

225:                                              ; preds = %204
  store i32 0, ptr %7, align 4, !tbaa !11
  store i32 0, ptr %9, align 4
  br label %226

226:                                              ; preds = %225, %223, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %227 = load i32, ptr %9, align 4
  switch i32 %227, label %234 [
    i32 0, label %228
  ]

228:                                              ; preds = %226
  br label %229

229:                                              ; preds = %228, %168
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.OggVorbis_File, ptr %230, i32 0, i32 18
  %232 = call i32 @ogg_stream_pagein(ptr noundef %231, ptr noundef %11)
  br label %233

233:                                              ; preds = %229, %149
  store i32 0, ptr %9, align 4
  br label %234

234:                                              ; preds = %233, %226, %162, %157, %85, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #3
  %235 = load i32, ptr %9, align 4
  switch i32 %235, label %305 [
    i32 0, label %236
    i32 2, label %33
    i32 3, label %237
  ]

236:                                              ; preds = %234
  br label %33

237:                                              ; preds = %234
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.OggVorbis_File, ptr %238, i32 0, i32 16
  store double 0.000000e+00, ptr %239, align 8, !tbaa !34
  %240 = load ptr, ptr %4, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.OggVorbis_File, ptr %240, i32 0, i32 17
  store double 0.000000e+00, ptr %241, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.OggVorbis_File, ptr %242, i32 0, i32 10
  %244 = load ptr, ptr %243, align 8, !tbaa !13
  %245 = call i32 @vorbis_synthesis_halfrate_p(ptr noundef %244)
  store i32 %245, ptr %16, align 4, !tbaa !11
  br label %246

246:                                              ; preds = %303, %237
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.OggVorbis_File, ptr %247, i32 0, i32 12
  %249 = load i64, ptr %248, align 8, !tbaa !23
  %250 = load i64, ptr %5, align 8, !tbaa !9
  %251 = load i32, ptr %16, align 4, !tbaa !11
  %252 = zext i32 %251 to i64
  %253 = ashr i64 %250, %252
  %254 = load i32, ptr %16, align 4, !tbaa !11
  %255 = zext i32 %254 to i64
  %256 = shl i64 %253, %255
  %257 = icmp slt i64 %249, %256
  br i1 %257, label %258, label %304

258:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %259 = load i64, ptr %5, align 8, !tbaa !9
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.OggVorbis_File, ptr %260, i32 0, i32 12
  %262 = load i64, ptr %261, align 8, !tbaa !23
  %263 = sub nsw i64 %259, %262
  %264 = load i32, ptr %16, align 4, !tbaa !11
  %265 = zext i32 %264 to i64
  %266 = ashr i64 %263, %265
  store i64 %266, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %267 = load ptr, ptr %4, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.OggVorbis_File, ptr %267, i32 0, i32 19
  %269 = call i32 @vorbis_synthesis_pcmout(ptr noundef %268, ptr noundef null)
  %270 = sext i32 %269 to i64
  store i64 %270, ptr %18, align 8, !tbaa !9
  %271 = load i64, ptr %18, align 8, !tbaa !9
  %272 = load i64, ptr %17, align 8, !tbaa !9
  %273 = icmp sgt i64 %271, %272
  br i1 %273, label %274, label %276

274:                                              ; preds = %258
  %275 = load i64, ptr %17, align 8, !tbaa !9
  store i64 %275, ptr %18, align 8, !tbaa !9
  br label %276

276:                                              ; preds = %274, %258
  %277 = load ptr, ptr %4, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.OggVorbis_File, ptr %277, i32 0, i32 19
  %279 = load i64, ptr %18, align 8, !tbaa !9
  %280 = trunc i64 %279 to i32
  %281 = call i32 @vorbis_synthesis_read(ptr noundef %278, i32 noundef %280)
  %282 = load i64, ptr %18, align 8, !tbaa !9
  %283 = load i32, ptr %16, align 4, !tbaa !11
  %284 = zext i32 %283 to i64
  %285 = shl i64 %282, %284
  %286 = load ptr, ptr %4, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.OggVorbis_File, ptr %286, i32 0, i32 12
  %288 = load i64, ptr %287, align 8, !tbaa !23
  %289 = add nsw i64 %288, %285
  store i64 %289, ptr %287, align 8, !tbaa !23
  %290 = load i64, ptr %18, align 8, !tbaa !9
  %291 = load i64, ptr %17, align 8, !tbaa !9
  %292 = icmp slt i64 %290, %291
  br i1 %292, label %293, label %303

293:                                              ; preds = %276
  %294 = load ptr, ptr %4, align 8, !tbaa !5
  %295 = call i32 @_fetch_and_process_packet(ptr noundef %294, ptr noundef null, i32 noundef 1, i32 noundef 1)
  %296 = icmp sle i32 %295, 0
  br i1 %296, label %297, label %302

297:                                              ; preds = %293
  %298 = load ptr, ptr %4, align 8, !tbaa !5
  %299 = call i64 @ov_pcm_total(ptr noundef %298, i32 noundef -1)
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.OggVorbis_File, ptr %300, i32 0, i32 12
  store i64 %299, ptr %301, align 8, !tbaa !23
  br label %302

302:                                              ; preds = %297, %293
  br label %303

303:                                              ; preds = %302, %276
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br label %246, !llvm.loop !36

304:                                              ; preds = %246
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %305

305:                                              ; preds = %304, %234, %30, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  %306 = load i32, ptr %3, align 4
  ret i32 %306
}

declare i32 @vorbis_synthesis_halfrate_p(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden void @_decode_clear(ptr noundef) #1

declare i32 @ogg_stream_reset_serialno(ptr noundef, i32 noundef) #2

declare i32 @ogg_stream_packetout(ptr noundef, ptr noundef) #2

declare i64 @vorbis_packet_blocksize(ptr noundef, ptr noundef) #2

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

declare i32 @ogg_page_serialno(ptr noundef) #2

declare i32 @ogg_page_bos(ptr noundef) #2

declare i32 @ogg_stream_pagein(ptr noundef, ptr noundef) #2

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

declare i32 @ogg_stream_packetpeek(ptr noundef, ptr noundef) #2

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

declare i32 @vorbis_info_blocksize(ptr noundef, i32 noundef) #2

declare i32 @vorbis_synthesis_trackonly(ptr noundef, ptr noundef) #2

declare i32 @vorbis_synthesis_blockin(ptr noundef, ptr noundef) #2

declare i32 @vorbis_synthesis_pcmout(ptr noundef, ptr noundef) #2

declare i32 @vorbis_synthesis_read(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @_fetch_and_process_packet(ptr noundef, ptr 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 104}
!14 = !{!"OggVorbis_File", !6, i64 0, !12, i64 8, !10, i64 16, !10, i64 24, !15, i64 32, !12, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !12, i64 128, !10, i64 136, !12, i64 144, !16, i64 152, !16, i64 160, !17, i64 168, !18, i64 576, !19, i64 720, !21, i64 912}
!15 = !{!"", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!16 = !{!"double", !7, i64 0}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !7, i64 80, !12, i64 364, !12, i64 368, !12, i64 372, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400}
!18 = !{!"vorbis_dsp_state", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !6, i64 136}
!19 = !{!"vorbis_block", !6, i64 0, !20, i64 8, !10, i64 48, !10, i64 56, !10, i64 64, !12, i64 72, !12, i64 76, !12, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !6, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !6, i64 184}
!20 = !{!"", !10, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !10, i64 32}
!21 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!14, !12, i64 144}
!23 = !{!14, !10, i64 120}
!24 = !{!25, !10, i64 32}
!25 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!26 = !{!14, !6, i64 96}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!14, !12, i64 128}
!30 = !{!14, !12, i64 64}
!31 = !{!14, !6, i64 88}
!32 = distinct !{!32, !28}
!33 = !{!14, !10, i64 136}
!34 = !{!14, !16, i64 152}
!35 = !{!14, !16, i64 160}
!36 = distinct !{!36, !28}


; 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.ogg_packet = type { ptr, i64, i64, i64, i64, i64 }
%struct.ogg_page = type { ptr, i64, ptr, i64 }
%struct.vorbis_info = type { i32, i32, i64, i64, i64, i64, i64, ptr }

; 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
define dso_local i32 @ov_pcm_seek(ptr noundef %0, i64 noundef %1) local_unnamed_addr #1 {
  %3 = alloca %struct.ogg_packet, align 8
  %4 = alloca %struct.ogg_page, align 8
  %5 = tail call i32 @ov_pcm_seek_page(ptr noundef %0, i64 noundef %1)
  %6 = icmp slt i32 %5, 0
  br i1 %6, label %.loopexit, label %7

7:                                                ; preds = %2
  %8 = tail call i32 @_make_decode_ready(ptr noundef %0)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %7
  %9 = getelementptr inbounds i8, ptr %0, i64 168
  %10 = getelementptr inbounds i8, ptr %0, i64 128
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  %12 = getelementptr inbounds i8, ptr %0, i64 64
  %13 = getelementptr inbounds i8, ptr %0, i64 144
  %14 = getelementptr inbounds i8, ptr %0, i64 136
  %15 = getelementptr inbounds i8, ptr %0, i64 104
  %16 = getelementptr i8, ptr %0, i64 120
  %17 = getelementptr inbounds i8, ptr %0, i64 720
  %18 = getelementptr inbounds i8, ptr %0, i64 576
  %19 = getelementptr inbounds i8, ptr %3, i64 32
  %20 = getelementptr inbounds i8, ptr %0, i64 96
  %scevgep = getelementptr i8, ptr %0, i64 128
  br label %21

21:                                               ; preds = %.backedge, %.preheader
  %.087 = phi i32 [ 0, %.preheader ], [ %.491.ph, %.backedge ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %22 = call i32 @ogg_stream_packetpeek(ptr noundef nonnull %9, ptr noundef nonnull %3) #5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %24, label %98

24:                                               ; preds = %21
  %25 = load ptr, ptr %15, align 8, !tbaa !5
  %26 = load i32, ptr %13, align 8, !tbaa !19
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds %struct.vorbis_info, ptr %25, i64 %27
  %29 = call i64 @vorbis_packet_blocksize(ptr noundef %28, ptr noundef nonnull %3) #5
  %30 = trunc i64 %29 to i32
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %32, label %34

32:                                               ; preds = %24
  %33 = call i32 @ogg_stream_packetout(ptr noundef nonnull %9, ptr noundef null) #5
  br label %.backedge

34:                                               ; preds = %24
  %.not107 = icmp eq i32 %.087, 0
  %.pre = load i64, ptr %16, align 8, !tbaa !20
  br i1 %.not107, label %40, label %35

35:                                               ; preds = %34
  %36 = add nuw nsw i32 %.087, %30
  %37 = lshr i32 %36, 2
  %38 = zext nneg i32 %37 to i64
  %39 = add nsw i64 %.pre, %38
  store i64 %39, ptr %16, align 8, !tbaa !20
  br label %40

40:                                               ; preds = %35, %34
  %41 = phi i64 [ %39, %35 ], [ %.pre, %34 ]
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  %43 = call i32 @vorbis_info_blocksize(ptr noundef %42, i32 noundef 1) #5
  %44 = add nsw i32 %43, %30
  %45 = ashr i32 %44, 2
  %46 = sext i32 %45 to i64
  %47 = add nsw i64 %41, %46
  %.not108 = icmp slt i64 %47, %1
  br i1 %.not108, label %48, label %.thread115

48:                                               ; preds = %40
  %49 = call i32 @ogg_stream_packetout(ptr noundef nonnull %9, ptr noundef null) #5
  %50 = call i32 @vorbis_synthesis_trackonly(ptr noundef nonnull %17, ptr noundef nonnull %3) #5
  %51 = call i32 @vorbis_synthesis_blockin(ptr noundef nonnull %18, ptr noundef nonnull %17) #5
  %52 = load i64, ptr %19, align 8, !tbaa !21
  %53 = icmp sgt i64 %52, -1
  br i1 %53, label %54, label %.backedge

54:                                               ; preds = %48
  %55 = load ptr, ptr %20, align 8, !tbaa !23
  %56 = load i32, ptr %13, align 8, !tbaa !19
  %57 = shl nsw i32 %56, 1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i64, ptr %55, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !24
  %61 = sub nsw i64 %52, %60
  %spec.select = call i64 @llvm.smax.i64(i64 %61, i64 0)
  store i64 %spec.select, ptr %16, align 8, !tbaa !20
  %62 = icmp sgt i32 %56, 0
  br i1 %62, label %.lr.ph127, label %.backedge

.lr.ph127:                                        ; preds = %54
  %wide.trip.count134 = zext nneg i32 %56 to i64
  %min.iters.check = icmp ult i32 %56, 5
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph127
  %scevgep149 = getelementptr i8, ptr %55, i64 8
  %63 = shl nuw nsw i64 %wide.trip.count134, 4
  %scevgep150 = getelementptr i8, ptr %55, i64 %63
  %bound0 = icmp ult ptr %16, %scevgep150
  %bound1 = icmp ult ptr %scevgep149, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.mod.vf = and i64 %wide.trip.count134, 3
  %64 = icmp eq i64 %n.mod.vf, 0
  %65 = select i1 %64, i64 4, i64 %n.mod.vf
  %n.vec = sub nsw i64 %wide.trip.count134, %65
  %66 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %spec.select, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ %66, %vector.ph ], [ %73, %vector.body ]
  %vec.phi151 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %74, %vector.body ]
  %67 = shl nuw nsw i64 %index, 1
  %68 = shl i64 %index, 1
  %69 = or disjoint i64 %67, 1
  %70 = or disjoint i64 %68, 5
  %71 = getelementptr inbounds i64, ptr %55, i64 %69
  %72 = getelementptr inbounds i64, ptr %55, i64 %70
  %wide.vec = load <4 x i64>, ptr %71, align 8, !tbaa !24
  %wide.vec152 = load <4 x i64>, ptr %72, align 8, !tbaa !24
  %strided.vec = shufflevector <4 x i64> %wide.vec, <4 x i64> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec153 = shufflevector <4 x i64> %wide.vec152, <4 x i64> poison, <2 x i32> <i32 0, i32 2>
  %73 = add <2 x i64> %vec.phi, %strided.vec
  %74 = add <2 x i64> %vec.phi151, %strided.vec153
  %index.next = add nuw i64 %index, 4
  %75 = icmp eq i64 %index.next, %n.vec
  br i1 %75, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %74, %73
  %76 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  store i64 %76, ptr %16, align 8, !tbaa !20
  br label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph127
  %indvars.iv131.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph127 ], [ %n.vec, %middle.block ]
  %.ph = phi i64 [ %spec.select, %vector.memcheck ], [ %spec.select, %.lr.ph127 ], [ %76, %middle.block ]
  %77 = sub nsw i64 %wide.trip.count134, %indvars.iv131.ph
  %xtraiter = and i64 %77, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv131.prol = phi i64 [ %indvars.iv.next132.prol, %scalar.ph.prol ], [ %indvars.iv131.ph, %scalar.ph.preheader ]
  %78 = phi i64 [ %83, %scalar.ph.prol ], [ %.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %79 = shl nuw nsw i64 %indvars.iv131.prol, 1
  %80 = or disjoint i64 %79, 1
  %81 = getelementptr inbounds i64, ptr %55, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !24
  %83 = add nsw i64 %78, %82
  store i64 %83, ptr %16, align 8, !tbaa !20
  %indvars.iv.next132.prol = add nuw nsw i64 %indvars.iv131.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !29

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv131.unr = phi i64 [ %indvars.iv131.ph, %scalar.ph.preheader ], [ %indvars.iv.next132.prol, %scalar.ph.prol ]
  %.unr = phi i64 [ %.ph, %scalar.ph.preheader ], [ %83, %scalar.ph.prol ]
  %84 = sub nsw i64 %indvars.iv131.ph, %wide.trip.count134
  %85 = icmp ugt i64 %84, -4
  br i1 %85, label %.backedge, label %scalar.ph.preheader.new

scalar.ph.preheader.new:                          ; preds = %scalar.ph.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %55, i64 24
  %invariant.gep164 = getelementptr i8, ptr %55, i64 40
  %invariant.gep166 = getelementptr i8, ptr %55, i64 56
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph, %scalar.ph.preheader.new
  %indvars.iv131 = phi i64 [ %indvars.iv131.unr, %scalar.ph.preheader.new ], [ %indvars.iv.next132.3, %scalar.ph ]
  %86 = phi i64 [ %.unr, %scalar.ph.preheader.new ], [ %97, %scalar.ph ]
  %87 = shl nuw nsw i64 %indvars.iv131, 1
  %88 = or disjoint i64 %87, 1
  %89 = getelementptr inbounds i64, ptr %55, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !24
  %91 = add nsw i64 %86, %90
  store i64 %91, ptr %16, align 8, !tbaa !20
  %.idx = shl i64 %indvars.iv131, 4
  %gep = getelementptr i8, ptr %invariant.gep, i64 %.idx
  %92 = load i64, ptr %gep, align 8, !tbaa !24
  %93 = add nsw i64 %91, %92
  store i64 %93, ptr %16, align 8, !tbaa !20
  %.idx158 = shl i64 %indvars.iv131, 4
  %gep165 = getelementptr i8, ptr %invariant.gep164, i64 %.idx158
  %94 = load i64, ptr %gep165, align 8, !tbaa !24
  %95 = add nsw i64 %93, %94
  store i64 %95, ptr %16, align 8, !tbaa !20
  %.idx159 = shl i64 %indvars.iv131, 4
  %gep167 = getelementptr i8, ptr %invariant.gep166, i64 %.idx159
  %96 = load i64, ptr %gep167, align 8, !tbaa !24
  %97 = add nsw i64 %95, %96
  store i64 %97, ptr %16, align 8, !tbaa !20
  %indvars.iv.next132.3 = add nuw nsw i64 %indvars.iv131, 4
  %exitcond135.not.3 = icmp eq i64 %indvars.iv.next132.3, %wide.trip.count134
  br i1 %exitcond135.not.3, label %.backedge, label %scalar.ph, !llvm.loop !31

98:                                               ; preds = %21
  switch i32 %22, label %.thread115 [
    i32 -3, label %99
    i32 0, label %99
  ]

99:                                               ; preds = %98, %98
  %100 = call i64 @_get_next_page(ptr noundef %0, ptr noundef nonnull %4, i64 noundef -1)
  %101 = icmp slt i64 %100, 0
  br i1 %101, label %.thread115, label %102

102:                                              ; preds = %99
  %103 = call i32 @ogg_page_bos(ptr noundef nonnull %4) #5
  %.not105 = icmp eq i32 %103, 0
  br i1 %.not105, label %105, label %104

104:                                              ; preds = %102
  call void @_decode_clear(ptr noundef %0)
  br label %105

105:                                              ; preds = %104, %102
  %106 = load i32, ptr %10, align 8, !tbaa !32
  %107 = icmp slt i32 %106, 3
  br i1 %107, label %108, label %126

108:                                              ; preds = %105
  %109 = call i32 @ogg_page_serialno(ptr noundef nonnull %4) #5
  %110 = sext i32 %109 to i64
  %111 = load i32, ptr %12, align 8, !tbaa !33
  %112 = icmp sgt i32 %111, 0
  br i1 %112, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %108
  %113 = load ptr, ptr %11, align 8, !tbaa !34
  %wide.trip.count = zext nneg i32 %111 to i64
  br label %114

114:                                              ; preds = %.lr.ph, %118
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %118 ]
  %115 = getelementptr inbounds i64, ptr %113, i64 %indvars.iv
  %116 = load i64, ptr %115, align 8, !tbaa !24
  %117 = icmp eq i64 %116, %110
  br i1 %117, label %._crit_edge.loopexit, label %118

118:                                              ; preds = %114
  %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 %.backedge, label %114, !llvm.loop !35

._crit_edge.loopexit:                             ; preds = %114
  %119 = trunc nuw nsw i64 %indvars.iv to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %108
  %.092.lcssa = phi i32 [ 0, %108 ], [ %119, %._crit_edge.loopexit ]
  %120 = icmp eq i32 %.092.lcssa, %111
  br i1 %120, label %.backedge, label %121

121:                                              ; preds = %._crit_edge
  store i32 %.092.lcssa, ptr %13, align 8, !tbaa !19
  store i32 3, ptr %10, align 8, !tbaa !32
  %122 = call i32 @ogg_page_serialno(ptr noundef nonnull %4) #5
  %123 = sext i32 %122 to i64
  store i64 %123, ptr %14, align 8, !tbaa !36
  %124 = call i32 @ogg_stream_reset_serialno(ptr noundef nonnull %9, i32 noundef %109) #5
  %125 = call i32 @_make_decode_ready(ptr noundef nonnull %0)
  %.not106 = icmp eq i32 %125, 0
  br i1 %.not106, label %126, label %.loopexit.loopexit129

126:                                              ; preds = %121, %105
  %.289 = phi i32 [ 0, %121 ], [ %.087, %105 ]
  %127 = call i32 @ogg_stream_pagein(ptr noundef nonnull %9, ptr noundef nonnull %4) #5
  br label %.backedge

.thread115:                                       ; preds = %40, %98, %99
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  %128 = getelementptr inbounds i8, ptr %0, i64 152
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %128, i8 0, i64 16, i1 false)
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = call i32 @vorbis_synthesis_halfrate_p(ptr noundef %129) #5
  %131 = zext i32 %130 to i64
  %132 = shl nsw i64 -1, %131
  %133 = and i64 %132, %1
  %134 = load i64, ptr %16, align 8, !tbaa !20
  %135 = icmp slt i64 %134, %133
  br i1 %135, label %.lr.ph128, label %.loopexit

.backedge:                                        ; preds = %118, %scalar.ph.prol.loopexit, %scalar.ph, %32, %48, %126, %._crit_edge, %54
  %.491.ph = phi i32 [ %30, %54 ], [ %.087, %._crit_edge ], [ %.289, %126 ], [ %30, %48 ], [ %.087, %32 ], [ %30, %scalar.ph ], [ %30, %scalar.ph.prol.loopexit ], [ %.087, %118 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  br label %21

.lr.ph128:                                        ; preds = %.thread115, %152
  %136 = phi i64 [ %153, %152 ], [ %134, %.thread115 ]
  %137 = sub nsw i64 %1, %136
  %138 = ashr i64 %137, %131
  %139 = call i32 @vorbis_synthesis_pcmout(ptr noundef nonnull %18, ptr noundef null) #5
  %140 = sext i32 %139 to i64
  %spec.select110 = call i64 @llvm.smin.i64(i64 %138, i64 %140)
  %141 = trunc i64 %spec.select110 to i32
  %142 = call i32 @vorbis_synthesis_read(ptr noundef nonnull %18, i32 noundef %141) #5
  %143 = shl i64 %spec.select110, %131
  %144 = load i64, ptr %16, align 8, !tbaa !20
  %145 = add nsw i64 %143, %144
  store i64 %145, ptr %16, align 8, !tbaa !20
  %146 = icmp sgt i64 %138, %140
  br i1 %146, label %147, label %152

147:                                              ; preds = %.lr.ph128
  %148 = call i32 @_fetch_and_process_packet(ptr noundef nonnull %0, ptr noundef null, i32 noundef 1, i32 noundef 1)
  %149 = icmp slt i32 %148, 1
  br i1 %149, label %150, label %._crit_edge136

._crit_edge136:                                   ; preds = %147
  %.pre137 = load i64, ptr %16, align 8, !tbaa !20
  br label %152

150:                                              ; preds = %147
  %151 = call i64 @ov_pcm_total(ptr noundef nonnull %0, i32 noundef -1)
  store i64 %151, ptr %16, align 8, !tbaa !20
  br label %152

152:                                              ; preds = %._crit_edge136, %150, %.lr.ph128
  %153 = phi i64 [ %.pre137, %._crit_edge136 ], [ %151, %150 ], [ %145, %.lr.ph128 ]
  %154 = icmp slt i64 %153, %133
  br i1 %154, label %.lr.ph128, label %.loopexit, !llvm.loop !37

.loopexit.loopexit129:                            ; preds = %121
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  br label %.loopexit

.loopexit:                                        ; preds = %152, %.loopexit.loopexit129, %.thread115, %7, %2
  %.5 = phi i32 [ %5, %2 ], [ %8, %7 ], [ 0, %.thread115 ], [ %125, %.loopexit.loopexit129 ], [ 0, %152 ]
  ret i32 %.5
}

declare i32 @vorbis_synthesis_halfrate_p(ptr noundef) local_unnamed_addr #2

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

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

declare i32 @ogg_stream_reset_serialno(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @ogg_stream_packetout(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i64 @vorbis_packet_blocksize(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @ogg_page_serialno(ptr noundef) local_unnamed_addr #2

declare i32 @ogg_page_bos(ptr noundef) local_unnamed_addr #2

declare i32 @ogg_stream_pagein(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @ogg_stream_packetpeek(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @vorbis_info_blocksize(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @vorbis_synthesis_trackonly(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @vorbis_synthesis_blockin(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @vorbis_synthesis_pcmout(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @vorbis_synthesis_read(ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #3

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 104}
!6 = !{!"OggVorbis_File", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !10, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !11, i64 120, !10, i64 128, !11, i64 136, !10, i64 144, !13, i64 152, !13, i64 160, !14, i64 168, !15, i64 576, !16, i64 720, !18, i64 912}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!"double", !8, i64 0}
!14 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !8, i64 80, !10, i64 364, !10, i64 368, !10, i64 372, !11, i64 376, !11, i64 384, !11, i64 392, !11, i64 400}
!15 = !{!"vorbis_dsp_state", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !7, i64 136}
!16 = !{!"vorbis_block", !7, i64 0, !17, i64 8, !11, i64 48, !11, i64 56, !11, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !7, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !7, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !7, i64 184}
!17 = !{!"", !11, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !11, i64 32}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!19 = !{!6, !10, i64 144}
!20 = !{!6, !11, i64 120}
!21 = !{!22, !11, i64 32}
!22 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40}
!23 = !{!6, !7, i64 96}
!24 = !{!11, !11, i64 0}
!25 = distinct !{!25, !26, !27, !28}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.isvectorized", i32 1}
!28 = !{!"llvm.loop.unroll.runtime.disable"}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.unroll.disable"}
!31 = distinct !{!31, !26, !27}
!32 = !{!6, !10, i64 128}
!33 = !{!6, !10, i64 64}
!34 = !{!6, !7, i64 88}
!35 = distinct !{!35, !26}
!36 = !{!6, !11, i64 136}
!37 = distinct !{!37, !26}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass