; LLVM IR from reworks-org/galaxy :: deps/sfml_deps/vorbis-src/test (write_read)

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

@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@stderr = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [53 x i8], align 1

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare void @vorbis_info_init(ptr noundef) #1

declare void @vorbis_comment_init(ptr noundef) #1

declare i32 @vorbis_block_init(ptr noundef, ptr noundef) #1

declare i32 @ogg_stream_init(ptr noundef, i32 noundef) #1

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

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

declare i32 @ogg_page_eos(ptr noundef) #1

declare i32 @ogg_stream_clear(ptr noundef) #1

declare i32 @vorbis_block_clear(ptr noundef) #1

declare void @vorbis_dsp_clear(ptr noundef) #1

declare void @vorbis_comment_clear(ptr noundef) #1

declare void @vorbis_info_clear(ptr noundef) #1

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @read_vorbis_data_or_die(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #6 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.ogg_sync_state, align 8
  %10 = alloca %struct.ogg_stream_state, align 8
  %11 = alloca %struct.ogg_page, align 8
  %12 = alloca %struct.ogg_packet, align 8
  %13 = alloca %struct.vorbis_info, align 8
  %14 = alloca %struct.vorbis_comment, align 8
  %15 = alloca %struct.vorbis_dsp_state, align 8
  %16 = alloca %struct.vorbis_block, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 408, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 192, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call noalias ptr @fopen(ptr noundef %29, ptr noundef @.str.5)
  store ptr %30, ptr %17, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %37

32:                                               ; preds = %4
  %33 = call ptr @__errno_location() #8
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %35 = call ptr @strerror(i32 noundef %34) #7
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %35)
  call void @exit(i32 noundef 1) #9
  unreachable

37:                                               ; preds = %4
  %38 = call i32 @ogg_sync_init(ptr noundef %9)
  %39 = call ptr @ogg_sync_buffer(ptr noundef %9, i64 noundef 8192)
  store ptr %39, ptr %18, align 8, !tbaa !5
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  %41 = load ptr, ptr %17, align 8, !tbaa !5
  %42 = call i64 @fread(ptr noundef %40, i64 noundef 1, i64 noundef 8192, ptr noundef %41)
  %43 = trunc i64 %42 to i32
  store i32 %43, ptr %19, align 4, !tbaa !9
  %44 = load i32, ptr %19, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = call i32 @ogg_sync_wrote(ptr noundef %9, i64 noundef %45)
  %47 = call i32 @ogg_sync_pageout(ptr noundef %9, ptr noundef %11)
  %48 = icmp ne i32 %47, 1
  br i1 %48, label %49, label %57

49:                                               ; preds = %37
  %50 = load i32, ptr %19, align 4, !tbaa !9
  %51 = icmp slt i32 %50, 8192
  br i1 %51, label %52, label %54

52:                                               ; preds = %49
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %267

54:                                               ; preds = %49
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.7) #7
  call void @exit(i32 noundef 1) #9
  unreachable

57:                                               ; preds = %37
  %58 = call i32 @ogg_page_serialno(ptr noundef %11)
  %59 = call i32 @ogg_stream_init(ptr noundef %10, i32 noundef %58)
  call void @vorbis_info_init(ptr noundef %13)
  call void @vorbis_comment_init(ptr noundef %14)
  %60 = call i32 @ogg_stream_pagein(ptr noundef %10, ptr noundef %11)
  %61 = icmp slt i32 %60, 0
  br i1 %61, label %62, label %65

62:                                               ; preds = %57
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.8) #7
  call void @exit(i32 noundef 1) #9
  unreachable

65:                                               ; preds = %57
  %66 = call i32 @ogg_stream_packetout(ptr noundef %10, ptr noundef %12)
  %67 = icmp ne i32 %66, 1
  br i1 %67, label %68, label %71

68:                                               ; preds = %65
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.9) #7
  call void @exit(i32 noundef 1) #9
  unreachable

71:                                               ; preds = %65
  %72 = call i32 @vorbis_synthesis_headerin(ptr noundef %13, ptr noundef %14, ptr noundef %12)
  %73 = icmp slt i32 %72, 0
  br i1 %73, label %74, label %77

74:                                               ; preds = %71
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.10) #7
  call void @exit(i32 noundef 1) #9
  unreachable

77:                                               ; preds = %71
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %132, %77
  %79 = load i32, ptr %21, align 4, !tbaa !9
  %80 = icmp slt i32 %79, 2
  br i1 %80, label %81, label %136

81:                                               ; preds = %78
  br label %82

82:                                               ; preds = %117, %81
  %83 = load i32, ptr %21, align 4, !tbaa !9
  %84 = icmp slt i32 %83, 2
  br i1 %84, label %85, label %118

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %86 = call i32 @ogg_sync_pageout(ptr noundef %9, ptr noundef %11)
  store i32 %86, ptr %23, align 4, !tbaa !9
  %87 = load i32, ptr %23, align 4, !tbaa !9
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %85
  store i32 6, ptr %24, align 4
  br label %115

90:                                               ; preds = %85
  %91 = load i32, ptr %23, align 4, !tbaa !9
  %92 = icmp eq i32 %91, 1
  br i1 %92, label %93, label %114

93:                                               ; preds = %90
  %94 = call i32 @ogg_stream_pagein(ptr noundef %10, ptr noundef %11)
  br label %95

95:                                               ; preds = %109, %93
  %96 = load i32, ptr %21, align 4, !tbaa !9
  %97 = icmp slt i32 %96, 2
  br i1 %97, label %98, label %113

98:                                               ; preds = %95
  %99 = call i32 @ogg_stream_packetout(ptr noundef %10, ptr noundef %12)
  store i32 %99, ptr %23, align 4, !tbaa !9
  %100 = load i32, ptr %23, align 4, !tbaa !9
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %98
  br label %113

103:                                              ; preds = %98
  %104 = load i32, ptr %23, align 4, !tbaa !9
  %105 = icmp slt i32 %104, 0
  br i1 %105, label %106, label %109

106:                                              ; preds = %103
  %107 = load ptr, ptr @stderr, align 8, !tbaa !5
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str.11) #7
  call void @exit(i32 noundef 1) #9
  unreachable

109:                                              ; preds = %103
  %110 = call i32 @vorbis_synthesis_headerin(ptr noundef %13, ptr noundef %14, ptr noundef %12)
  %111 = load i32, ptr %21, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %21, align 4, !tbaa !9
  br label %95, !llvm.loop !11

113:                                              ; preds = %102, %95
  br label %114

114:                                              ; preds = %113, %90
  store i32 0, ptr %24, align 4
  br label %115

115:                                              ; preds = %114, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  %116 = load i32, ptr %24, align 4
  switch i32 %116, label %271 [
    i32 0, label %117
    i32 6, label %118
  ]

117:                                              ; preds = %115
  br label %82, !llvm.loop !13

118:                                              ; preds = %115, %82
  %119 = call ptr @ogg_sync_buffer(ptr noundef %9, i64 noundef 4096)
  store ptr %119, ptr %18, align 8, !tbaa !5
  %120 = load ptr, ptr %18, align 8, !tbaa !5
  %121 = load ptr, ptr %17, align 8, !tbaa !5
  %122 = call i64 @fread(ptr noundef %120, i64 noundef 1, i64 noundef 4096, ptr noundef %121)
  %123 = trunc i64 %122 to i32
  store i32 %123, ptr %19, align 4, !tbaa !9
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %132

126:                                              ; preds = %118
  %127 = load i32, ptr %21, align 4, !tbaa !9
  %128 = icmp slt i32 %127, 2
  br i1 %128, label %129, label %132

129:                                              ; preds = %126
  %130 = load ptr, ptr @stderr, align 8, !tbaa !5
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef @.str.12) #7
  call void @exit(i32 noundef 1) #9
  unreachable

132:                                              ; preds = %126, %118
  %133 = load i32, ptr %19, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = call i32 @ogg_sync_wrote(ptr noundef %9, i64 noundef %134)
  br label %78, !llvm.loop !14

136:                                              ; preds = %78
  %137 = getelementptr inbounds %struct.vorbis_info, ptr %13, i32 0, i32 2
  %138 = load i64, ptr %137, align 8, !tbaa !15
  %139 = load i32, ptr %6, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = icmp ne i64 %138, %140
  br i1 %141, label %142, label %148

142:                                              ; preds = %136
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.vorbis_info, ptr %13, i32 0, i32 2
  %145 = load i64, ptr %144, align 8, !tbaa !15
  %146 = load i32, ptr %6, align 4, !tbaa !9
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, ptr noundef %143, i64 noundef %145, i32 noundef %146)
  call void @exit(i32 noundef 1) #9
  unreachable

148:                                              ; preds = %136
  %149 = call i32 @vorbis_synthesis_init(ptr noundef %15, ptr noundef %13)
  %150 = call i32 @vorbis_block_init(ptr noundef %15, ptr noundef %16)
  br label %151

151:                                              ; preds = %263, %148
  %152 = load i32, ptr %20, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  %154 = xor i1 %153, true
  br i1 %154, label %155, label %264

155:                                              ; preds = %151
  br label %156

156:                                              ; preds = %246, %155
  %157 = load i32, ptr %20, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  %159 = xor i1 %158, true
  br i1 %159, label %160, label %247

160:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %161 = call i32 @ogg_sync_pageout(ptr noundef %9, ptr noundef %11)
  store i32 %161, ptr %25, align 4, !tbaa !9
  %162 = load i32, ptr %25, align 4, !tbaa !9
  %163 = icmp eq i32 %162, 0
  br i1 %163, label %164, label %165

164:                                              ; preds = %160
  store i32 12, ptr %24, align 4
  br label %244

165:                                              ; preds = %160
  %166 = load i32, ptr %25, align 4, !tbaa !9
  %167 = icmp slt i32 %166, 0
  br i1 %167, label %168, label %171

168:                                              ; preds = %165
  %169 = load ptr, ptr @stderr, align 8, !tbaa !5
  %170 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.14) #7
  br label %243

171:                                              ; preds = %165
  %172 = call i32 @ogg_stream_pagein(ptr noundef %10, ptr noundef %11)
  br label %173

173:                                              ; preds = %237, %171
  br label %174

174:                                              ; preds = %173
  %175 = call i32 @ogg_stream_packetout(ptr noundef %10, ptr noundef %12)
  store i32 %175, ptr %25, align 4, !tbaa !9
  %176 = load i32, ptr %25, align 4, !tbaa !9
  %177 = icmp eq i32 %176, 0
  br i1 %177, label %178, label %179

178:                                              ; preds = %174
  br label %238

179:                                              ; preds = %174
  %180 = load i32, ptr %25, align 4, !tbaa !9
  %181 = icmp slt i32 %180, 0
  br i1 %181, label %182, label %183

182:                                              ; preds = %179
  br label %237

183:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %184 = call i32 @vorbis_synthesis(ptr noundef %16, ptr noundef %12)
  %185 = icmp eq i32 %184, 0
  br i1 %185, label %186, label %188

186:                                              ; preds = %183
  %187 = call i32 @vorbis_synthesis_blockin(ptr noundef %15, ptr noundef %16)
  br label %188

188:                                              ; preds = %186, %183
  br label %189

189:                                              ; preds = %219, %188
  %190 = call i32 @vorbis_synthesis_pcmout(ptr noundef %15, ptr noundef %26)
  store i32 %190, ptr %27, align 4, !tbaa !9
  %191 = icmp sgt i32 %190, 0
  br i1 %191, label %192, label %196

192:                                              ; preds = %189
  %193 = load i32, ptr %22, align 4, !tbaa !9
  %194 = load i32, ptr %8, align 4, !tbaa !9
  %195 = icmp slt i32 %193, %194
  br label %196

196:                                              ; preds = %192, %189
  %197 = phi i1 [ false, %189 ], [ %195, %192 ]
  br i1 %197, label %198, label %236

198:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %199 = load i32, ptr %27, align 4, !tbaa !9
  %200 = load i32, ptr %8, align 4, !tbaa !9
  %201 = icmp slt i32 %199, %200
  br i1 %201, label %202, label %204

202:                                              ; preds = %198
  %203 = load i32, ptr %27, align 4, !tbaa !9
  br label %206

204:                                              ; preds = %198
  %205 = load i32, ptr %8, align 4, !tbaa !9
  br label %206

206:                                              ; preds = %204, %202
  %207 = phi i32 [ %203, %202 ], [ %205, %204 ]
  store i32 %207, ptr %28, align 4, !tbaa !9
  %208 = load i32, ptr %22, align 4, !tbaa !9
  %209 = load i32, ptr %28, align 4, !tbaa !9
  %210 = add nsw i32 %208, %209
  %211 = load i32, ptr %8, align 4, !tbaa !9
  %212 = icmp sgt i32 %210, %211
  br i1 %212, label %213, label %217

213:                                              ; preds = %206
  %214 = load i32, ptr %8, align 4, !tbaa !9
  %215 = load i32, ptr %22, align 4, !tbaa !9
  %216 = sub nsw i32 %214, %215
  br label %219

217:                                              ; preds = %206
  %218 = load i32, ptr %28, align 4, !tbaa !9
  br label %219

219:                                              ; preds = %217, %213
  %220 = phi i32 [ %216, %213 ], [ %218, %217 ]
  store i32 %220, ptr %28, align 4, !tbaa !9
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = load i32, ptr %22, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds float, ptr %221, i64 %223
  %225 = load ptr, ptr %26, align 8, !tbaa !5
  %226 = getelementptr inbounds ptr, ptr %225, i64 0
  %227 = load ptr, ptr %226, align 8, !tbaa !5
  %228 = load i32, ptr %28, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = mul i64 %229, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %224, ptr align 4 %227, i64 %230, i1 false)
  %231 = load i32, ptr %28, align 4, !tbaa !9
  %232 = call i32 @vorbis_synthesis_read(ptr noundef %15, i32 noundef %231)
  %233 = load i32, ptr %28, align 4, !tbaa !9
  %234 = load i32, ptr %22, align 4, !tbaa !9
  %235 = add nsw i32 %234, %233
  store i32 %235, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %189, !llvm.loop !18

236:                                              ; preds = %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %237

237:                                              ; preds = %236, %182
  br label %173

238:                                              ; preds = %178
  %239 = call i32 @ogg_page_eos(ptr noundef %11)
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %241, label %242

241:                                              ; preds = %238
  store i32 1, ptr %20, align 4, !tbaa !9
  br label %242

242:                                              ; preds = %241, %238
  br label %243

243:                                              ; preds = %242, %168
  store i32 0, ptr %24, align 4
  br label %244

244:                                              ; preds = %243, %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  %245 = load i32, ptr %24, align 4
  switch i32 %245, label %271 [
    i32 0, label %246
    i32 12, label %247
  ]

246:                                              ; preds = %244
  br label %156, !llvm.loop !19

247:                                              ; preds = %244, %156
  %248 = load i32, ptr %20, align 4, !tbaa !9
  %249 = icmp ne i32 %248, 0
  br i1 %249, label %263, label %250

250:                                              ; preds = %247
  %251 = call ptr @ogg_sync_buffer(ptr noundef %9, i64 noundef 4096)
  store ptr %251, ptr %18, align 8, !tbaa !5
  %252 = load ptr, ptr %18, align 8, !tbaa !5
  %253 = load ptr, ptr %17, align 8, !tbaa !5
  %254 = call i64 @fread(ptr noundef %252, i64 noundef 1, i64 noundef 4096, ptr noundef %253)
  %255 = trunc i64 %254 to i32
  store i32 %255, ptr %19, align 4, !tbaa !9
  %256 = load i32, ptr %19, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = call i32 @ogg_sync_wrote(ptr noundef %9, i64 noundef %257)
  %259 = load i32, ptr %19, align 4, !tbaa !9
  %260 = icmp eq i32 %259, 0
  br i1 %260, label %261, label %262

261:                                              ; preds = %250
  store i32 1, ptr %20, align 4, !tbaa !9
  br label %262

262:                                              ; preds = %261, %250
  br label %263

263:                                              ; preds = %262, %247
  br label %151, !llvm.loop !20

264:                                              ; preds = %151
  %265 = call i32 @ogg_stream_clear(ptr noundef %10)
  %266 = call i32 @vorbis_block_clear(ptr noundef %16)
  call void @vorbis_dsp_clear(ptr noundef %15)
  call void @vorbis_comment_clear(ptr noundef %14)
  call void @vorbis_info_clear(ptr noundef %13)
  br label %267

267:                                              ; preds = %264, %52
  %268 = call i32 @ogg_sync_clear(ptr noundef %9)
  %269 = load ptr, ptr %17, align 8, !tbaa !5
  %270 = call i32 @fclose(ptr noundef %269)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 192, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 408, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  ret void

271:                                              ; preds = %244, %115
  unreachable
}

declare i32 @ogg_sync_init(ptr noundef) #1

declare ptr @ogg_sync_buffer(ptr noundef, i64 noundef) #1

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare i32 @ogg_sync_wrote(ptr noundef, i64 noundef) #1

declare i32 @ogg_sync_pageout(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

declare i32 @ogg_page_serialno(ptr noundef) #1

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

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

declare i32 @vorbis_synthesis_headerin(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @vorbis_synthesis_init(ptr noundef, ptr noundef) #1

declare i32 @vorbis_synthesis(ptr noundef, ptr noundef) #1

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

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

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

declare i32 @ogg_sync_clear(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 "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 willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !17, i64 8}
!16 = !{!"vorbis_info", !10, i64 0, !10, i64 4, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !6, i64 48}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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

@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [53 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

declare void @vorbis_info_init(ptr noundef) local_unnamed_addr #5

declare void @vorbis_comment_init(ptr noundef) local_unnamed_addr #5

declare i32 @vorbis_block_init(ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @ogg_stream_init(ptr noundef, i32 noundef) local_unnamed_addr #5

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

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

declare i32 @ogg_page_eos(ptr noundef) local_unnamed_addr #5

declare i32 @ogg_stream_clear(ptr noundef) local_unnamed_addr #5

declare i32 @vorbis_block_clear(ptr noundef) local_unnamed_addr #5

declare void @vorbis_dsp_clear(ptr noundef) local_unnamed_addr #5

declare void @vorbis_comment_clear(ptr noundef) local_unnamed_addr #5

declare void @vorbis_info_clear(ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @read_vorbis_data_or_die(ptr noundef %0, i32 noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) local_unnamed_addr #7 {
  %5 = alloca %struct.ogg_sync_state, align 8
  %6 = alloca %struct.ogg_stream_state, align 8
  %7 = alloca %struct.ogg_page, align 8
  %8 = alloca %struct.ogg_packet, align 8
  %9 = alloca %struct.vorbis_info, align 8
  %10 = alloca %struct.vorbis_comment, align 8
  %11 = alloca %struct.vorbis_dsp_state, align 8
  %12 = alloca %struct.vorbis_block, align 8
  %13 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 408, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %12) #9
  %14 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.5)
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %21

16:                                               ; preds = %4
  %17 = tail call ptr @__errno_location() #10
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = tail call ptr @strerror(i32 noundef %18) #9
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %19)
  tail call void @exit(i32 noundef 1) #11
  unreachable

21:                                               ; preds = %4
  %22 = call i32 @ogg_sync_init(ptr noundef nonnull %5) #9
  %23 = call ptr @ogg_sync_buffer(ptr noundef nonnull %5, i64 noundef 8192) #9
  %24 = call i64 @fread(ptr noundef %23, i64 noundef 1, i64 noundef 8192, ptr noundef nonnull %14)
  %sext = shl i64 %24, 32
  %25 = ashr exact i64 %sext, 32
  %26 = call i32 @ogg_sync_wrote(ptr noundef nonnull %5, i64 noundef %25) #9
  %27 = call i32 @ogg_sync_pageout(ptr noundef nonnull %5, ptr noundef nonnull %7) #9
  %.not = icmp eq i32 %27, 1
  br i1 %.not, label %36, label %28

28:                                               ; preds = %21
  %29 = trunc i64 %24 to i32
  %30 = icmp slt i32 %29, 8192
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %141

33:                                               ; preds = %28
  %34 = load ptr, ptr @stderr, align 8, !tbaa !9
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.7) #12
  call void @exit(i32 noundef 1) #11
  unreachable

36:                                               ; preds = %21
  %37 = call i32 @ogg_page_serialno(ptr noundef nonnull %7) #9
  %38 = call i32 @ogg_stream_init(ptr noundef nonnull %6, i32 noundef %37) #9
  call void @vorbis_info_init(ptr noundef nonnull %9) #9
  call void @vorbis_comment_init(ptr noundef nonnull %10) #9
  %39 = call i32 @ogg_stream_pagein(ptr noundef nonnull %6, ptr noundef nonnull %7) #9
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %41, label %44

41:                                               ; preds = %36
  %42 = load ptr, ptr @stderr, align 8, !tbaa !9
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.8) #12
  call void @exit(i32 noundef 1) #11
  unreachable

44:                                               ; preds = %36
  %45 = call i32 @ogg_stream_packetout(ptr noundef nonnull %6, ptr noundef nonnull %8) #9
  %.not75 = icmp eq i32 %45, 1
  br i1 %.not75, label %49, label %46

46:                                               ; preds = %44
  %47 = load ptr, ptr @stderr, align 8, !tbaa !9
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.9) #12
  call void @exit(i32 noundef 1) #11
  unreachable

49:                                               ; preds = %44
  %50 = call i32 @vorbis_synthesis_headerin(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %8) #9
  %51 = icmp slt i32 %50, 0
  br i1 %51, label %52, label %.preheader97

52:                                               ; preds = %49
  %53 = load ptr, ptr @stderr, align 8, !tbaa !9
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.10) #12
  call void @exit(i32 noundef 1) #11
  unreachable

.preheader97:                                     ; preds = %49, %.preheader97.backedge
  %.156106 = phi i32 [ %.156106.be, %.preheader97.backedge ], [ 0, %49 ]
  %55 = call i32 @ogg_sync_pageout(ptr noundef nonnull %5, ptr noundef nonnull %7) #9
  switch i32 %55, label %.loopexit96 [
    i32 0, label %.thread
    i32 1, label %.lr.ph.preheader
  ]

.lr.ph.preheader:                                 ; preds = %.preheader97
  %56 = call i32 @ogg_stream_pagein(ptr noundef nonnull %6, ptr noundef nonnull %7) #9
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %64
  %.257103 = phi i32 [ %66, %64 ], [ %.156106, %.lr.ph.preheader ]
  %57 = call i32 @ogg_stream_packetout(ptr noundef nonnull %6, ptr noundef nonnull %8) #9
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %.loopexit96, label %59

59:                                               ; preds = %.lr.ph
  %60 = icmp slt i32 %57, 0
  br i1 %60, label %61, label %64

61:                                               ; preds = %59
  %62 = load ptr, ptr @stderr, align 8, !tbaa !9
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.11) #12
  call void @exit(i32 noundef 1) #11
  unreachable

64:                                               ; preds = %59
  %65 = call i32 @vorbis_synthesis_headerin(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %8) #9
  %66 = add i32 %.257103, 1
  %exitcond.not = icmp eq i32 %66, 2
  br i1 %exitcond.not, label %.thread, label %.lr.ph, !llvm.loop !11

.loopexit96:                                      ; preds = %.lr.ph, %.preheader97
  %.459 = phi i32 [ %.156106, %.preheader97 ], [ %.257103, %.lr.ph ]
  %67 = icmp slt i32 %.459, 2
  br i1 %67, label %.preheader97.backedge, label %.thread

.preheader97.backedge:                            ; preds = %.loopexit96, %76
  %.156106.be = phi i32 [ %.459, %.loopexit96 ], [ %.156.lcssa, %76 ]
  br label %.preheader97, !llvm.loop !13

.thread:                                          ; preds = %64, %.preheader97, %.loopexit96
  %.156.lcssa = phi i32 [ %.156106, %.preheader97 ], [ %.459, %.loopexit96 ], [ 2, %64 ]
  %68 = call ptr @ogg_sync_buffer(ptr noundef nonnull %5, i64 noundef 4096) #9
  %69 = call i64 @fread(ptr noundef %68, i64 noundef 1, i64 noundef 4096, ptr noundef nonnull %14)
  %70 = and i64 %69, 4294967295
  %71 = icmp eq i64 %70, 0
  %72 = icmp slt i32 %.156.lcssa, 2
  %or.cond = and i1 %72, %71
  br i1 %or.cond, label %73, label %76

73:                                               ; preds = %.thread
  %74 = load ptr, ptr @stderr, align 8, !tbaa !9
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef nonnull @.str.12) #12
  call void @exit(i32 noundef 1) #11
  unreachable

76:                                               ; preds = %.thread
  %sext82 = shl i64 %69, 32
  %77 = ashr exact i64 %sext82, 32
  %78 = call i32 @ogg_sync_wrote(ptr noundef nonnull %5, i64 noundef %77) #9
  br i1 %72, label %.preheader97.backedge, label %79

79:                                               ; preds = %76
  %80 = getelementptr inbounds i8, ptr %9, i64 8
  %81 = load i64, ptr %80, align 8, !tbaa !14
  %82 = sext i32 %1 to i64
  %.not76 = icmp eq i64 %81, %82
  br i1 %.not76, label %85, label %83

83:                                               ; preds = %79
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, ptr noundef %0, i64 noundef %81, i32 noundef %1)
  call void @exit(i32 noundef 1) #11
  unreachable

85:                                               ; preds = %79
  %86 = call i32 @vorbis_synthesis_init(ptr noundef nonnull %11, ptr noundef nonnull %9) #9
  %87 = call i32 @vorbis_block_init(ptr noundef nonnull %11, ptr noundef nonnull %12) #9
  br label %.preheader.outer

.preheader.outer:                                 ; preds = %85, %133
  %.154117.ph = phi i32 [ 0, %85 ], [ %.6, %133 ]
  br label %.preheader

.preheader:                                       ; preds = %.preheader.outer, %.loopexit
  %88 = call i32 @ogg_sync_pageout(ptr noundef nonnull %5, ptr noundef nonnull %7) #9
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %.loopexit, label %90

90:                                               ; preds = %.preheader
  %91 = icmp slt i32 %88, 0
  br i1 %91, label %92, label %95

92:                                               ; preds = %90
  %93 = load ptr, ptr @stderr, align 8, !tbaa !9
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.14) #12
  br label %133

95:                                               ; preds = %90
  %96 = call i32 @ogg_stream_pagein(ptr noundef nonnull %6, ptr noundef nonnull %7) #9
  %97 = call i32 @ogg_stream_packetout(ptr noundef nonnull %6, ptr noundef nonnull %8) #9
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %._crit_edge114, label %.lr.ph113

.lr.ph113:                                        ; preds = %95, %129
  %99 = phi i32 [ %130, %129 ], [ %97, %95 ]
  %.2111 = phi i32 [ %.4, %129 ], [ %.154117.ph, %95 ]
  %100 = icmp slt i32 %99, 0
  br i1 %100, label %129, label %101

101:                                              ; preds = %.lr.ph113
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %102 = call i32 @vorbis_synthesis(ptr noundef nonnull %12, ptr noundef nonnull %8) #9
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %106

104:                                              ; preds = %101
  %105 = call i32 @vorbis_synthesis_blockin(ptr noundef nonnull %11, ptr noundef nonnull %12) #9
  br label %106

106:                                              ; preds = %104, %101
  %107 = call i32 @vorbis_synthesis_pcmout(ptr noundef nonnull %11, ptr noundef nonnull %13) #9
  %108 = icmp sgt i32 %107, 0
  %109 = icmp slt i32 %.2111, %3
  %110 = select i1 %108, i1 %109, i1 false
  br i1 %110, label %.lr.ph109, label %._crit_edge

.lr.ph109:                                        ; preds = %106, %.lr.ph109
  %111 = phi i32 [ %125, %.lr.ph109 ], [ %107, %106 ]
  %.3108 = phi i32 [ %124, %.lr.ph109 ], [ %.2111, %106 ]
  %112 = call i32 @llvm.smin.i32(i32 %111, i32 %3)
  %113 = add nsw i32 %112, %.3108
  %114 = icmp sgt i32 %113, %3
  %115 = sub nsw i32 %3, %.3108
  %116 = select i1 %114, i32 %115, i32 %112
  %117 = sext i32 %.3108 to i64
  %118 = getelementptr inbounds float, ptr %2, i64 %117
  %119 = load ptr, ptr %13, align 8, !tbaa !9
  %120 = load ptr, ptr %119, align 8, !tbaa !9
  %121 = sext i32 %116 to i64
  %122 = shl nsw i64 %121, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %118, ptr align 4 %120, i64 %122, i1 false)
  %123 = call i32 @vorbis_synthesis_read(ptr noundef nonnull %11, i32 noundef %116) #9
  %124 = add nsw i32 %116, %.3108
  %125 = call i32 @vorbis_synthesis_pcmout(ptr noundef nonnull %11, ptr noundef nonnull %13) #9
  %126 = icmp sgt i32 %125, 0
  %127 = icmp slt i32 %124, %3
  %128 = select i1 %126, i1 %127, i1 false
  br i1 %128, label %.lr.ph109, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph109, %106
  %.3.lcssa = phi i32 [ %.2111, %106 ], [ %124, %.lr.ph109 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  br label %129

129:                                              ; preds = %.lr.ph113, %._crit_edge
  %.4 = phi i32 [ %.2111, %.lr.ph113 ], [ %.3.lcssa, %._crit_edge ]
  %130 = call i32 @ogg_stream_packetout(ptr noundef nonnull %6, ptr noundef nonnull %8) #9
  %131 = icmp eq i32 %130, 0
  br i1 %131, label %._crit_edge114, label %.lr.ph113

._crit_edge114:                                   ; preds = %129, %95
  %.2.lcssa = phi i32 [ %.154117.ph, %95 ], [ %.4, %129 ]
  %132 = call i32 @ogg_page_eos(ptr noundef nonnull %7) #9
  %.not79 = icmp ne i32 %132, 0
  %spec.select = zext i1 %.not79 to i32
  br label %133

133:                                              ; preds = %._crit_edge114, %92
  %.364 = phi i32 [ 0, %92 ], [ %spec.select, %._crit_edge114 ]
  %.6 = phi i32 [ %.154117.ph, %92 ], [ %.2.lcssa, %._crit_edge114 ]
  %.not78 = icmp eq i32 %.364, 0
  br i1 %.not78, label %.preheader.outer, label %.loopexit.thread

.loopexit:                                        ; preds = %.preheader
  %134 = call ptr @ogg_sync_buffer(ptr noundef nonnull %5, i64 noundef 4096) #9
  %135 = call i64 @fread(ptr noundef %134, i64 noundef 1, i64 noundef 4096, ptr noundef nonnull %14)
  %sext81 = shl i64 %135, 32
  %136 = ashr exact i64 %sext81, 32
  %137 = call i32 @ogg_sync_wrote(ptr noundef nonnull %5, i64 noundef %136) #9
  %138 = and i64 %135, 4294967295
  %.not129 = icmp eq i64 %138, 0
  br i1 %.not129, label %.loopexit.thread, label %.preheader, !llvm.loop !18

.loopexit.thread:                                 ; preds = %133, %.loopexit
  %139 = call i32 @ogg_stream_clear(ptr noundef nonnull %6) #9
  %140 = call i32 @vorbis_block_clear(ptr noundef nonnull %12) #9
  call void @vorbis_dsp_clear(ptr noundef nonnull %11) #9
  call void @vorbis_comment_clear(ptr noundef nonnull %10) #9
  call void @vorbis_info_clear(ptr noundef nonnull %9) #9
  br label %141

141:                                              ; preds = %.loopexit.thread, %31
  %142 = call i32 @ogg_sync_clear(ptr noundef nonnull %5) #9
  %143 = call i32 @fclose(ptr noundef nonnull %14)
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  ret void
}

declare i32 @ogg_sync_init(ptr noundef) local_unnamed_addr #5

declare ptr @ogg_sync_buffer(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

declare i32 @ogg_sync_wrote(ptr noundef, i64 noundef) local_unnamed_addr #5

declare i32 @ogg_sync_pageout(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare i32 @ogg_page_serialno(ptr noundef) local_unnamed_addr #5

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

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

declare i32 @vorbis_synthesis_headerin(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @vorbis_synthesis_init(ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @vorbis_synthesis(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

declare i32 @ogg_sync_clear(ptr noundef) local_unnamed_addr #5

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(none) }
attributes #11 = { noreturn nounwind }
attributes #12 = { cold 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !16, i64 8}
!15 = !{!"vorbis_info", !6, i64 0, !6, i64 4, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !10, i64 48}
!16 = !{!"long", !7, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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