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

; 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 }

@convsize = external dso_local global i32, align 4
@stdin = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [47 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [53 x i8], align 1
@convbuffer = external dso_local global [4096 x i16], align 16
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@stdout = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.ogg_sync_state, align 8
  %3 = alloca %struct.ogg_stream_state, align 8
  %4 = alloca %struct.ogg_page, align 8
  %5 = alloca %struct.ogg_packet, align 8
  %6 = alloca %struct.vorbis_info, align 8
  %7 = alloca %struct.vorbis_comment, align 8
  %8 = alloca %struct.vorbis_dsp_state, align 8
  %9 = alloca %struct.vorbis_block, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %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 ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 408, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 144, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 192, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %26 = call i32 @ogg_sync_init(ptr noundef %2)
  br label %27

27:                                               ; preds = %321, %0
  br label %28

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %29 = call ptr @ogg_sync_buffer(ptr noundef %2, i64 noundef 4096)
  store ptr %29, ptr %10, align 8, !tbaa !9
  %30 = load ptr, ptr %10, align 8, !tbaa !9
  %31 = load ptr, ptr @stdin, align 8, !tbaa !9
  %32 = call i64 @fread(ptr noundef %30, i64 noundef 1, i64 noundef 4096, ptr noundef %31)
  %33 = trunc i64 %32 to i32
  store i32 %33, ptr %11, align 4, !tbaa !5
  %34 = load i32, ptr %11, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = call i32 @ogg_sync_wrote(ptr noundef %2, i64 noundef %35)
  %37 = call i32 @ogg_sync_pageout(ptr noundef %2, ptr noundef %4)
  %38 = icmp ne i32 %37, 1
  br i1 %38, label %39, label %46

39:                                               ; preds = %28
  %40 = load i32, ptr %11, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 4096
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store i32 3, ptr %14, align 4
  br label %319

43:                                               ; preds = %39
  %44 = load ptr, ptr @stderr, align 8, !tbaa !9
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef @.str) #6
  call void @exit(i32 noundef 1) #7
  unreachable

46:                                               ; preds = %28
  %47 = call i32 @ogg_page_serialno(ptr noundef %4)
  %48 = call i32 @ogg_stream_init(ptr noundef %3, i32 noundef %47)
  call void @vorbis_info_init(ptr noundef %6)
  call void @vorbis_comment_init(ptr noundef %7)
  %49 = call i32 @ogg_stream_pagein(ptr noundef %3, ptr noundef %4)
  %50 = icmp slt i32 %49, 0
  br i1 %50, label %51, label %54

51:                                               ; preds = %46
  %52 = load ptr, ptr @stderr, align 8, !tbaa !9
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.1) #6
  call void @exit(i32 noundef 1) #7
  unreachable

54:                                               ; preds = %46
  %55 = call i32 @ogg_stream_packetout(ptr noundef %3, ptr noundef %5)
  %56 = icmp ne i32 %55, 1
  br i1 %56, label %57, label %60

57:                                               ; preds = %54
  %58 = load ptr, ptr @stderr, align 8, !tbaa !9
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.2) #6
  call void @exit(i32 noundef 1) #7
  unreachable

60:                                               ; preds = %54
  %61 = call i32 @vorbis_synthesis_headerin(ptr noundef %6, ptr noundef %7, ptr noundef %5)
  %62 = icmp slt i32 %61, 0
  br i1 %62, label %63, label %66

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

66:                                               ; preds = %60
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %127, %66
  %68 = load i32, ptr %13, align 4, !tbaa !5
  %69 = icmp slt i32 %68, 2
  br i1 %69, label %70, label %131

70:                                               ; preds = %67
  br label %71

71:                                               ; preds = %112, %70
  %72 = load i32, ptr %13, align 4, !tbaa !5
  %73 = icmp slt i32 %72, 2
  br i1 %73, label %74, label %113

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %75 = call i32 @ogg_sync_pageout(ptr noundef %2, ptr noundef %4)
  store i32 %75, ptr %15, align 4, !tbaa !5
  %76 = load i32, ptr %15, align 4, !tbaa !5
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %74
  store i32 7, ptr %14, align 4
  br label %110

79:                                               ; preds = %74
  %80 = load i32, ptr %15, align 4, !tbaa !5
  %81 = icmp eq i32 %80, 1
  br i1 %81, label %82, label %109

82:                                               ; preds = %79
  %83 = call i32 @ogg_stream_pagein(ptr noundef %3, ptr noundef %4)
  br label %84

84:                                               ; preds = %105, %82
  %85 = load i32, ptr %13, align 4, !tbaa !5
  %86 = icmp slt i32 %85, 2
  br i1 %86, label %87, label %108

87:                                               ; preds = %84
  %88 = call i32 @ogg_stream_packetout(ptr noundef %3, ptr noundef %5)
  store i32 %88, ptr %15, align 4, !tbaa !5
  %89 = load i32, ptr %15, align 4, !tbaa !5
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %87
  br label %108

92:                                               ; preds = %87
  %93 = load i32, ptr %15, align 4, !tbaa !5
  %94 = icmp slt i32 %93, 0
  br i1 %94, label %95, label %98

95:                                               ; preds = %92
  %96 = load ptr, ptr @stderr, align 8, !tbaa !9
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.4) #6
  call void @exit(i32 noundef 1) #7
  unreachable

98:                                               ; preds = %92
  %99 = call i32 @vorbis_synthesis_headerin(ptr noundef %6, ptr noundef %7, ptr noundef %5)
  store i32 %99, ptr %15, align 4, !tbaa !5
  %100 = load i32, ptr %15, align 4, !tbaa !5
  %101 = icmp slt i32 %100, 0
  br i1 %101, label %102, label %105

102:                                              ; preds = %98
  %103 = load ptr, ptr @stderr, align 8, !tbaa !9
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.4) #6
  call void @exit(i32 noundef 1) #7
  unreachable

105:                                              ; preds = %98
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %13, align 4, !tbaa !5
  br label %84, !llvm.loop !11

108:                                              ; preds = %91, %84
  br label %109

109:                                              ; preds = %108, %79
  store i32 0, ptr %14, align 4
  br label %110

110:                                              ; preds = %109, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  %111 = load i32, ptr %14, align 4
  switch i32 %111, label %327 [
    i32 0, label %112
    i32 7, label %113
  ]

112:                                              ; preds = %110
  br label %71, !llvm.loop !13

113:                                              ; preds = %110, %71
  %114 = call ptr @ogg_sync_buffer(ptr noundef %2, i64 noundef 4096)
  store ptr %114, ptr %10, align 8, !tbaa !9
  %115 = load ptr, ptr %10, align 8, !tbaa !9
  %116 = load ptr, ptr @stdin, align 8, !tbaa !9
  %117 = call i64 @fread(ptr noundef %115, i64 noundef 1, i64 noundef 4096, ptr noundef %116)
  %118 = trunc i64 %117 to i32
  store i32 %118, ptr %11, align 4, !tbaa !5
  %119 = load i32, ptr %11, align 4, !tbaa !5
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %127

121:                                              ; preds = %113
  %122 = load i32, ptr %13, align 4, !tbaa !5
  %123 = icmp slt i32 %122, 2
  br i1 %123, label %124, label %127

124:                                              ; preds = %121
  %125 = load ptr, ptr @stderr, align 8, !tbaa !9
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.5) #6
  call void @exit(i32 noundef 1) #7
  unreachable

127:                                              ; preds = %121, %113
  %128 = load i32, ptr %11, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = call i32 @ogg_sync_wrote(ptr noundef %2, i64 noundef %129)
  br label %67, !llvm.loop !14

131:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %132 = getelementptr inbounds %struct.vorbis_comment, ptr %7, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !15
  store ptr %133, ptr %16, align 8, !tbaa !9
  br label %134

134:                                              ; preds = %138, %131
  %135 = load ptr, ptr %16, align 8, !tbaa !9
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %145

138:                                              ; preds = %134
  %139 = load ptr, ptr @stderr, align 8, !tbaa !9
  %140 = load ptr, ptr %16, align 8, !tbaa !9
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef @.str.6, ptr noundef %141) #6
  %143 = load ptr, ptr %16, align 8, !tbaa !9
  %144 = getelementptr inbounds ptr, ptr %143, i32 1
  store ptr %144, ptr %16, align 8, !tbaa !9
  br label %134, !llvm.loop !17

145:                                              ; preds = %134
  %146 = load ptr, ptr @stderr, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct.vorbis_info, ptr %6, i32 0, i32 1
  %148 = load i32, ptr %147, align 4, !tbaa !18
  %149 = getelementptr inbounds %struct.vorbis_info, ptr %6, i32 0, i32 2
  %150 = load i64, ptr %149, align 8, !tbaa !21
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %146, ptr noundef @.str.7, i32 noundef %148, i64 noundef %150) #6
  %152 = load ptr, ptr @stderr, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.vorbis_comment, ptr %7, i32 0, i32 3
  %154 = load ptr, ptr %153, align 8, !tbaa !22
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %152, ptr noundef @.str.8, ptr noundef %154) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %156 = getelementptr inbounds %struct.vorbis_info, ptr %6, i32 0, i32 1
  %157 = load i32, ptr %156, align 4, !tbaa !18
  %158 = sdiv i32 4096, %157
  store i32 %158, ptr @convsize, align 4, !tbaa !5
  %159 = call i32 @vorbis_synthesis_init(ptr noundef %8, ptr noundef %6)
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %314

161:                                              ; preds = %145
  %162 = call i32 @vorbis_block_init(ptr noundef %8, ptr noundef %9)
  br label %163

163:                                              ; preds = %311, %161
  %164 = load i32, ptr %12, align 4, !tbaa !5
  %165 = icmp ne i32 %164, 0
  %166 = xor i1 %165, true
  br i1 %166, label %167, label %312

167:                                              ; preds = %163
  br label %168

168:                                              ; preds = %294, %167
  %169 = load i32, ptr %12, align 4, !tbaa !5
  %170 = icmp ne i32 %169, 0
  %171 = xor i1 %170, true
  br i1 %171, label %172, label %295

172:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %173 = call i32 @ogg_sync_pageout(ptr noundef %2, ptr noundef %4)
  store i32 %173, ptr %17, align 4, !tbaa !5
  %174 = load i32, ptr %17, align 4, !tbaa !5
  %175 = icmp eq i32 %174, 0
  br i1 %175, label %176, label %177

176:                                              ; preds = %172
  store i32 15, ptr %14, align 4
  br label %292

177:                                              ; preds = %172
  %178 = load i32, ptr %17, align 4, !tbaa !5
  %179 = icmp slt i32 %178, 0
  br i1 %179, label %180, label %183

180:                                              ; preds = %177
  %181 = load ptr, ptr @stderr, align 8, !tbaa !9
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef @.str.9) #6
  br label %291

183:                                              ; preds = %177
  %184 = call i32 @ogg_stream_pagein(ptr noundef %3, ptr noundef %4)
  br label %185

185:                                              ; preds = %285, %183
  br label %186

186:                                              ; preds = %185
  %187 = call i32 @ogg_stream_packetout(ptr noundef %3, ptr noundef %5)
  store i32 %187, ptr %17, align 4, !tbaa !5
  %188 = load i32, ptr %17, align 4, !tbaa !5
  %189 = icmp eq i32 %188, 0
  br i1 %189, label %190, label %191

190:                                              ; preds = %186
  br label %286

191:                                              ; preds = %186
  %192 = load i32, ptr %17, align 4, !tbaa !5
  %193 = icmp slt i32 %192, 0
  br i1 %193, label %194, label %195

194:                                              ; preds = %191
  br label %285

195:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %196 = call i32 @vorbis_synthesis(ptr noundef %9, ptr noundef %5)
  %197 = icmp eq i32 %196, 0
  br i1 %197, label %198, label %200

198:                                              ; preds = %195
  %199 = call i32 @vorbis_synthesis_blockin(ptr noundef %8, ptr noundef %9)
  br label %200

200:                                              ; preds = %198, %195
  br label %201

201:                                              ; preds = %273, %200
  %202 = call i32 @vorbis_synthesis_pcmout(ptr noundef %8, ptr noundef %18)
  store i32 %202, ptr %19, align 4, !tbaa !5
  %203 = icmp sgt i32 %202, 0
  br i1 %203, label %204, label %284

204:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %205 = load i32, ptr %19, align 4, !tbaa !5
  %206 = load i32, ptr @convsize, align 4, !tbaa !5
  %207 = icmp slt i32 %205, %206
  br i1 %207, label %208, label %210

208:                                              ; preds = %204
  %209 = load i32, ptr %19, align 4, !tbaa !5
  br label %212

210:                                              ; preds = %204
  %211 = load i32, ptr @convsize, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %210, %208
  %213 = phi i32 [ %209, %208 ], [ %211, %210 ]
  store i32 %213, ptr %22, align 4, !tbaa !5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %214

214:                                              ; preds = %262, %212
  %215 = load i32, ptr %13, align 4, !tbaa !5
  %216 = getelementptr inbounds %struct.vorbis_info, ptr %6, i32 0, i32 1
  %217 = load i32, ptr %216, align 4, !tbaa !18
  %218 = icmp slt i32 %215, %217
  br i1 %218, label %219, label %265

219:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %220 = load i32, ptr %13, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds i16, ptr @convbuffer, i64 %221
  store ptr %222, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %223 = load ptr, ptr %18, align 8, !tbaa !9
  %224 = load i32, ptr %13, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds ptr, ptr %223, i64 %225
  %227 = load ptr, ptr %226, align 8, !tbaa !9
  store ptr %227, ptr %24, align 8, !tbaa !9
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %228

228:                                              ; preds = %258, %219
  %229 = load i32, ptr %20, align 4, !tbaa !5
  %230 = load i32, ptr %22, align 4, !tbaa !5
  %231 = icmp slt i32 %229, %230
  br i1 %231, label %232, label %261

232:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %233 = load ptr, ptr %24, align 8, !tbaa !9
  %234 = load i32, ptr %20, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds float, ptr %233, i64 %235
  %237 = load float, ptr %236, align 4, !tbaa !23
  %238 = call float @llvm.fmuladd.f32(float %237, float 3.276700e+04, float 5.000000e-01)
  %239 = fpext float %238 to double
  %240 = call double @llvm.floor.f64(double %239)
  %241 = fptosi double %240 to i32
  store i32 %241, ptr %25, align 4, !tbaa !5
  %242 = load i32, ptr %25, align 4, !tbaa !5
  %243 = icmp sgt i32 %242, 32767
  br i1 %243, label %244, label %245

244:                                              ; preds = %232
  store i32 32767, ptr %25, align 4, !tbaa !5
  store i32 1, ptr %21, align 4, !tbaa !5
  br label %245

245:                                              ; preds = %244, %232
  %246 = load i32, ptr %25, align 4, !tbaa !5
  %247 = icmp slt i32 %246, -32768
  br i1 %247, label %248, label %249

248:                                              ; preds = %245
  store i32 -32768, ptr %25, align 4, !tbaa !5
  store i32 1, ptr %21, align 4, !tbaa !5
  br label %249

249:                                              ; preds = %248, %245
  %250 = load i32, ptr %25, align 4, !tbaa !5
  %251 = trunc i32 %250 to i16
  %252 = load ptr, ptr %23, align 8, !tbaa !9
  store i16 %251, ptr %252, align 2, !tbaa !25
  %253 = getelementptr inbounds %struct.vorbis_info, ptr %6, i32 0, i32 1
  %254 = load i32, ptr %253, align 4, !tbaa !18
  %255 = load ptr, ptr %23, align 8, !tbaa !9
  %256 = sext i32 %254 to i64
  %257 = getelementptr inbounds i16, ptr %255, i64 %256
  store ptr %257, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %258

258:                                              ; preds = %249
  %259 = load i32, ptr %20, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %20, align 4, !tbaa !5
  br label %228, !llvm.loop !27

261:                                              ; preds = %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %262

262:                                              ; preds = %261
  %263 = load i32, ptr %13, align 4, !tbaa !5
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %13, align 4, !tbaa !5
  br label %214, !llvm.loop !28

265:                                              ; preds = %214
  %266 = load i32, ptr %21, align 4, !tbaa !5
  %267 = icmp ne i32 %266, 0
  br i1 %267, label %268, label %273

268:                                              ; preds = %265
  %269 = load ptr, ptr @stderr, align 8, !tbaa !9
  %270 = getelementptr inbounds %struct.vorbis_dsp_state, ptr %8, i32 0, i32 14
  %271 = load i64, ptr %270, align 8, !tbaa !29
  %272 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %269, ptr noundef @.str.10, i64 noundef %271) #6
  br label %273

273:                                              ; preds = %268, %265
  %274 = getelementptr inbounds %struct.vorbis_info, ptr %6, i32 0, i32 1
  %275 = load i32, ptr %274, align 4, !tbaa !18
  %276 = mul nsw i32 2, %275
  %277 = sext i32 %276 to i64
  %278 = load i32, ptr %22, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = load ptr, ptr @stdout, align 8, !tbaa !9
  %281 = call i64 @fwrite(ptr noundef @convbuffer, i64 noundef %277, i64 noundef %279, ptr noundef %280)
  %282 = load i32, ptr %22, align 4, !tbaa !5
  %283 = call i32 @vorbis_synthesis_read(ptr noundef %8, i32 noundef %282)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %201, !llvm.loop !31

284:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %285

285:                                              ; preds = %284, %194
  br label %185

286:                                              ; preds = %190
  %287 = call i32 @ogg_page_eos(ptr noundef %4)
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %289, label %290

289:                                              ; preds = %286
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %289, %286
  br label %291

291:                                              ; preds = %290, %180
  store i32 0, ptr %14, align 4
  br label %292

292:                                              ; preds = %291, %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  %293 = load i32, ptr %14, align 4
  switch i32 %293, label %327 [
    i32 0, label %294
    i32 15, label %295
  ]

294:                                              ; preds = %292
  br label %168, !llvm.loop !32

295:                                              ; preds = %292, %168
  %296 = load i32, ptr %12, align 4, !tbaa !5
  %297 = icmp ne i32 %296, 0
  br i1 %297, label %311, label %298

298:                                              ; preds = %295
  %299 = call ptr @ogg_sync_buffer(ptr noundef %2, i64 noundef 4096)
  store ptr %299, ptr %10, align 8, !tbaa !9
  %300 = load ptr, ptr %10, align 8, !tbaa !9
  %301 = load ptr, ptr @stdin, align 8, !tbaa !9
  %302 = call i64 @fread(ptr noundef %300, i64 noundef 1, i64 noundef 4096, ptr noundef %301)
  %303 = trunc i64 %302 to i32
  store i32 %303, ptr %11, align 4, !tbaa !5
  %304 = load i32, ptr %11, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = call i32 @ogg_sync_wrote(ptr noundef %2, i64 noundef %305)
  %307 = load i32, ptr %11, align 4, !tbaa !5
  %308 = icmp eq i32 %307, 0
  br i1 %308, label %309, label %310

309:                                              ; preds = %298
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %310

310:                                              ; preds = %309, %298
  br label %311

311:                                              ; preds = %310, %295
  br label %163, !llvm.loop !33

312:                                              ; preds = %163
  %313 = call i32 @vorbis_block_clear(ptr noundef %9)
  call void @vorbis_dsp_clear(ptr noundef %8)
  br label %317

314:                                              ; preds = %145
  %315 = load ptr, ptr @stderr, align 8, !tbaa !9
  %316 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %315, ptr noundef @.str.11) #6
  br label %317

317:                                              ; preds = %314, %312
  %318 = call i32 @ogg_stream_clear(ptr noundef %3)
  call void @vorbis_comment_clear(ptr noundef %7)
  call void @vorbis_info_clear(ptr noundef %6)
  store i32 0, ptr %14, align 4
  br label %319

319:                                              ; preds = %317, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %320 = load i32, ptr %14, align 4
  switch i32 %320, label %327 [
    i32 0, label %321
    i32 3, label %322
  ]

321:                                              ; preds = %319
  br label %27

322:                                              ; preds = %319
  %323 = call i32 @ogg_sync_clear(ptr noundef %2)
  %324 = load ptr, ptr @stderr, align 8, !tbaa !9
  %325 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %324, ptr noundef @.str.12) #6
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 192, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 144, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 408, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  %326 = load i32, ptr %1, align 4
  ret i32 %326

327:                                              ; preds = %319, %292, %110
  unreachable
}

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

declare i32 @ogg_sync_init(ptr noundef) #2

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

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

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

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

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

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

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

declare i32 @ogg_page_serialno(ptr noundef) #2

declare void @vorbis_info_init(ptr noundef) #2

declare void @vorbis_comment_init(ptr noundef) #2

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

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

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

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

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

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

declare i32 @vorbis_synthesis(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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #5

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

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

declare i32 @ogg_page_eos(ptr noundef) #2

declare i32 @vorbis_block_clear(ptr noundef) #2

declare void @vorbis_dsp_clear(ptr noundef) #2

declare i32 @ogg_stream_clear(ptr noundef) #2

declare void @vorbis_comment_clear(ptr noundef) #2

declare void @vorbis_info_clear(ptr noundef) #2

declare i32 @ogg_sync_clear(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"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 = distinct !{!14, !12}
!15 = !{!16, !10, i64 0}
!16 = !{!"vorbis_comment", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24}
!17 = distinct !{!17, !12}
!18 = !{!19, !6, i64 4}
!19 = !{!"vorbis_info", !6, i64 0, !6, i64 4, !20, i64 8, !20, i64 16, !20, i64 24, !20, i64 32, !20, i64 40, !10, i64 48}
!20 = !{!"long", !7, i64 0}
!21 = !{!19, !20, i64 8}
!22 = !{!16, !10, i64 24}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"short", !7, i64 0}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = !{!30, !20, i64 96}
!30 = !{!"vorbis_dsp_state", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !20, i64 56, !20, i64 64, !20, i64 72, !20, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !20, i64 128, !10, i64 136}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
!33 = distinct !{!33, !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 }

@convsize = external dso_local local_unnamed_addr global i32, align 4
@stdin = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [47 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [53 x i8], align 1
@convbuffer = external dso_local global [4096 x i16], align 16
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.ogg_sync_state, align 8
  %2 = alloca %struct.ogg_stream_state, align 8
  %3 = alloca %struct.ogg_page, align 8
  %4 = alloca %struct.ogg_packet, align 8
  %5 = alloca %struct.vorbis_info, align 8
  %6 = alloca %struct.vorbis_comment, align 8
  %7 = alloca %struct.vorbis_dsp_state, align 8
  %8 = alloca %struct.vorbis_block, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 408, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %8) #7
  %10 = call i32 @ogg_sync_init(ptr noundef nonnull %1) #7
  %11 = getelementptr inbounds i8, ptr %5, i64 4
  %12 = getelementptr inbounds i8, ptr %5, i64 8
  %13 = getelementptr inbounds i8, ptr %6, i64 24
  %14 = getelementptr inbounds i8, ptr %7, i64 96
  br label %15

15:                                               ; preds = %168, %0
  %16 = call ptr @ogg_sync_buffer(ptr noundef nonnull %1, i64 noundef 4096) #7
  %17 = load ptr, ptr @stdin, align 8, !tbaa !5
  %18 = call i64 @fread(ptr noundef %16, i64 noundef 1, i64 noundef 4096, ptr noundef %17)
  %sext = shl i64 %18, 32
  %19 = ashr exact i64 %sext, 32
  %20 = call i32 @ogg_sync_wrote(ptr noundef nonnull %1, i64 noundef %19) #7
  %21 = call i32 @ogg_sync_pageout(ptr noundef nonnull %1, ptr noundef nonnull %3) #7
  %.not = icmp eq i32 %21, 1
  br i1 %.not, label %28, label %22

22:                                               ; preds = %15
  %23 = trunc i64 %18 to i32
  %24 = icmp slt i32 %23, 4096
  br i1 %24, label %170, label %25

25:                                               ; preds = %22
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str) #8
  call void @exit(i32 noundef 1) #9
  unreachable

28:                                               ; preds = %15
  %29 = call i32 @ogg_page_serialno(ptr noundef nonnull %3) #7
  %30 = call i32 @ogg_stream_init(ptr noundef nonnull %2, i32 noundef %29) #7
  call void @vorbis_info_init(ptr noundef nonnull %5) #7
  call void @vorbis_comment_init(ptr noundef nonnull %6) #7
  %31 = call i32 @ogg_stream_pagein(ptr noundef nonnull %2, ptr noundef nonnull %3) #7
  %32 = icmp slt i32 %31, 0
  br i1 %32, label %33, label %36

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

36:                                               ; preds = %28
  %37 = call i32 @ogg_stream_packetout(ptr noundef nonnull %2, ptr noundef nonnull %4) #7
  %.not77 = icmp eq i32 %37, 1
  br i1 %.not77, label %41, label %38

38:                                               ; preds = %36
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.2) #8
  call void @exit(i32 noundef 1) #9
  unreachable

41:                                               ; preds = %36
  %42 = call i32 @vorbis_synthesis_headerin(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %4) #7
  %43 = icmp slt i32 %42, 0
  br i1 %43, label %44, label %.preheader106

44:                                               ; preds = %41
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.3) #8
  call void @exit(i32 noundef 1) #9
  unreachable

.preheader106:                                    ; preds = %41, %.preheader106.backedge
  %.161121 = phi i32 [ %.161121.be, %.preheader106.backedge ], [ 0, %41 ]
  %47 = call i32 @ogg_sync_pageout(ptr noundef nonnull %1, ptr noundef nonnull %3) #7
  switch i32 %47, label %.loopexit [
    i32 0, label %.thread
    i32 1, label %.lr.ph.preheader
  ]

.lr.ph.preheader:                                 ; preds = %.preheader106
  %48 = call i32 @ogg_stream_pagein(ptr noundef nonnull %2, ptr noundef nonnull %3) #7
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %62
  %.262118 = phi i32 [ %63, %62 ], [ %.161121, %.lr.ph.preheader ]
  %49 = call i32 @ogg_stream_packetout(ptr noundef nonnull %2, ptr noundef nonnull %4) #7
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %.loopexit, label %51

51:                                               ; preds = %.lr.ph
  %52 = icmp slt i32 %49, 0
  br i1 %52, label %53, label %56

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

56:                                               ; preds = %51
  %57 = call i32 @vorbis_synthesis_headerin(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %4) #7
  %58 = icmp slt i32 %57, 0
  br i1 %58, label %59, label %62

59:                                               ; preds = %56
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.4) #8
  call void @exit(i32 noundef 1) #9
  unreachable

62:                                               ; preds = %56
  %63 = add i32 %.262118, 1
  %exitcond.not = icmp eq i32 %63, 2
  br i1 %exitcond.not, label %.thread, label %.lr.ph, !llvm.loop !9

.loopexit:                                        ; preds = %.lr.ph, %.preheader106
  %.4 = phi i32 [ %.161121, %.preheader106 ], [ %.262118, %.lr.ph ]
  %64 = icmp slt i32 %.4, 2
  br i1 %64, label %.preheader106.backedge, label %.thread

.preheader106.backedge:                           ; preds = %.loopexit, %74
  %.161121.be = phi i32 [ %.4, %.loopexit ], [ %.161.lcssa, %74 ]
  br label %.preheader106, !llvm.loop !11

.thread:                                          ; preds = %62, %.preheader106, %.loopexit
  %.161.lcssa = phi i32 [ %.161121, %.preheader106 ], [ %.4, %.loopexit ], [ 2, %62 ]
  %65 = call ptr @ogg_sync_buffer(ptr noundef nonnull %1, i64 noundef 4096) #7
  %66 = load ptr, ptr @stdin, align 8, !tbaa !5
  %67 = call i64 @fread(ptr noundef %65, i64 noundef 1, i64 noundef 4096, ptr noundef %66)
  %68 = and i64 %67, 4294967295
  %69 = icmp eq i64 %68, 0
  %70 = icmp slt i32 %.161.lcssa, 2
  %or.cond = and i1 %70, %69
  br i1 %or.cond, label %71, label %74

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

74:                                               ; preds = %.thread
  %sext85 = shl i64 %67, 32
  %75 = ashr exact i64 %sext85, 32
  %76 = call i32 @ogg_sync_wrote(ptr noundef nonnull %1, i64 noundef %75) #7
  br i1 %70, label %.preheader106.backedge, label %77

77:                                               ; preds = %74
  %78 = load ptr, ptr %6, align 8, !tbaa !12
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %.not78123 = icmp eq ptr %79, null
  br i1 %.not78123, label %._crit_edge, label %.lr.ph125

.lr.ph125:                                        ; preds = %77, %.lr.ph125
  %80 = phi ptr [ %84, %.lr.ph125 ], [ %79, %77 ]
  %.056124 = phi ptr [ %83, %.lr.ph125 ], [ %78, %77 ]
  %81 = load ptr, ptr @stderr, align 8, !tbaa !5
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef nonnull @.str.6, ptr noundef nonnull %80) #8
  %83 = getelementptr inbounds i8, ptr %.056124, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %.not78 = icmp eq ptr %84, null
  br i1 %.not78, label %._crit_edge, label %.lr.ph125, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph125, %77
  %85 = load ptr, ptr @stderr, align 8, !tbaa !5
  %86 = load i32, ptr %11, align 4, !tbaa !16
  %87 = load i64, ptr %12, align 8, !tbaa !19
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef nonnull @.str.7, i32 noundef %86, i64 noundef %87) #8
  %89 = load ptr, ptr @stderr, align 8, !tbaa !5
  %90 = load ptr, ptr %13, align 8, !tbaa !20
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef nonnull @.str.8, ptr noundef %90) #8
  %92 = load i32, ptr %11, align 4, !tbaa !16
  %93 = sdiv i32 4096, %92
  store i32 %93, ptr @convsize, align 4, !tbaa !21
  %94 = call i32 @vorbis_synthesis_init(ptr noundef nonnull %7, ptr noundef nonnull %5) #7
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %96, label %165

96:                                               ; preds = %._crit_edge
  %97 = call i32 @vorbis_block_init(ptr noundef nonnull %7, ptr noundef nonnull %8) #7
  br label %.preheader

.preheader:                                       ; preds = %.preheader.backedge, %96
  %98 = call i32 @ogg_sync_pageout(ptr noundef nonnull %1, ptr noundef nonnull %3) #7
  %99 = icmp eq i32 %98, 0
  br i1 %99, label %.loopexit105, label %100

100:                                              ; preds = %.preheader
  %101 = icmp slt i32 %98, 0
  br i1 %101, label %102, label %105

102:                                              ; preds = %100
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull @.str.9) #8
  br label %157

105:                                              ; preds = %100
  %106 = call i32 @ogg_stream_pagein(ptr noundef nonnull %2, ptr noundef nonnull %3) #7
  %107 = call i32 @ogg_stream_packetout(ptr noundef nonnull %2, ptr noundef nonnull %4) #7
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %._crit_edge144, label %.lr.ph143

.lr.ph143:                                        ; preds = %105, %153
  %109 = phi i32 [ %154, %153 ], [ %107, %105 ]
  %110 = icmp slt i32 %109, 0
  br i1 %110, label %153, label %111

111:                                              ; preds = %.lr.ph143
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %112 = call i32 @vorbis_synthesis(ptr noundef nonnull %8, ptr noundef nonnull %4) #7
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %116

114:                                              ; preds = %111
  %115 = call i32 @vorbis_synthesis_blockin(ptr noundef nonnull %7, ptr noundef nonnull %8) #7
  br label %116

116:                                              ; preds = %114, %111
  %117 = call i32 @vorbis_synthesis_pcmout(ptr noundef nonnull %7, ptr noundef nonnull %9) #7
  %118 = icmp sgt i32 %117, 0
  br i1 %118, label %.lr.ph140, label %._crit_edge141

.lr.ph140:                                        ; preds = %116, %._crit_edge137.thread
  %119 = phi i32 [ %151, %._crit_edge137.thread ], [ %117, %116 ]
  %120 = load i32, ptr @convsize, align 4
  %121 = call i32 @llvm.smin.i32(i32 %119, i32 %120)
  %122 = load i32, ptr %11, align 4, !tbaa !16
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %.lr.ph136, label %._crit_edge137.thread

.lr.ph136:                                        ; preds = %.lr.ph140
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = icmp sgt i32 %120, 0
  %126 = zext nneg i32 %122 to i64
  br i1 %125, label %.lr.ph130.us.preheader, label %._crit_edge137.thread

.lr.ph130.us.preheader:                           ; preds = %.lr.ph136
  %smax = call i32 @llvm.smax.i32(i32 %121, i32 1)
  %wide.trip.count = zext nneg i32 %smax to i64
  br label %.lr.ph130.us

.lr.ph130.us:                                     ; preds = %.lr.ph130.us.preheader, %._crit_edge131.us
  %indvars.iv155 = phi i64 [ 0, %.lr.ph130.us.preheader ], [ %indvars.iv.next156, %._crit_edge131.us ]
  %.053134.us = phi i32 [ 0, %.lr.ph130.us.preheader ], [ %.3.us, %._crit_edge131.us ]
  %127 = getelementptr inbounds i16, ptr @convbuffer, i64 %indvars.iv155
  %128 = getelementptr inbounds ptr, ptr %124, i64 %indvars.iv155
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %.lr.ph130.us, %130
  %indvars.iv = phi i64 [ 0, %.lr.ph130.us ], [ %indvars.iv.next, %130 ]
  %.052128.us = phi ptr [ %127, %.lr.ph130.us ], [ %139, %130 ]
  %.154127.us = phi i32 [ %.053134.us, %.lr.ph130.us ], [ %.3.us, %130 ]
  %131 = getelementptr inbounds float, ptr %129, i64 %indvars.iv
  %132 = load float, ptr %131, align 4, !tbaa !22
  %133 = call float @llvm.fmuladd.f32(float %132, float 3.276700e+04, float 5.000000e-01)
  %134 = call float @llvm.floor.f32(float %133)
  %135 = fptosi float %134 to i32
  %spec.select86.us = call i32 @llvm.smin.i32(i32 %135, i32 32767)
  %136 = add i32 %135, -32768
  %137 = icmp ult i32 %136, -65536
  %.3.us = select i1 %137, i32 1, i32 %.154127.us
  %.1.us = call i32 @llvm.smax.i32(i32 %spec.select86.us, i32 -32768)
  %138 = trunc nsw i32 %.1.us to i16
  store i16 %138, ptr %.052128.us, align 2, !tbaa !24
  %139 = getelementptr inbounds i16, ptr %.052128.us, i64 %126
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond154.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond154.not, label %._crit_edge131.us, label %130, !llvm.loop !26

._crit_edge131.us:                                ; preds = %130
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %exitcond159.not = icmp eq i64 %indvars.iv.next156, %126
  br i1 %exitcond159.not, label %._crit_edge137, label %.lr.ph130.us, !llvm.loop !27

._crit_edge137:                                   ; preds = %._crit_edge131.us
  %.not81 = icmp eq i32 %.3.us, 0
  br i1 %.not81, label %._crit_edge137.thread, label %140

140:                                              ; preds = %._crit_edge137
  %141 = load ptr, ptr @stderr, align 8, !tbaa !5
  %142 = load i64, ptr %14, align 8, !tbaa !28
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef nonnull @.str.10, i64 noundef %142) #8
  %.pre = load i32, ptr %11, align 4, !tbaa !16
  br label %._crit_edge137.thread

._crit_edge137.thread:                            ; preds = %.lr.ph136, %.lr.ph140, %140, %._crit_edge137
  %144 = phi i32 [ %.pre, %140 ], [ %122, %._crit_edge137 ], [ %122, %.lr.ph140 ], [ %122, %.lr.ph136 ]
  %145 = shl nsw i32 %144, 1
  %146 = sext i32 %145 to i64
  %147 = sext i32 %121 to i64
  %148 = load ptr, ptr @stdout, align 8, !tbaa !5
  %149 = call i64 @fwrite(ptr noundef nonnull @convbuffer, i64 noundef %146, i64 noundef %147, ptr noundef %148)
  %150 = call i32 @vorbis_synthesis_read(ptr noundef nonnull %7, i32 noundef %121) #7
  %151 = call i32 @vorbis_synthesis_pcmout(ptr noundef nonnull %7, ptr noundef nonnull %9) #7
  %152 = icmp sgt i32 %151, 0
  br i1 %152, label %.lr.ph140, label %._crit_edge141, !llvm.loop !30

._crit_edge141:                                   ; preds = %._crit_edge137.thread, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %153

153:                                              ; preds = %.lr.ph143, %._crit_edge141
  %154 = call i32 @ogg_stream_packetout(ptr noundef nonnull %2, ptr noundef nonnull %4) #7
  %155 = icmp eq i32 %154, 0
  br i1 %155, label %._crit_edge144, label %.lr.ph143

._crit_edge144:                                   ; preds = %153, %105
  %156 = call i32 @ogg_page_eos(ptr noundef nonnull %3) #7
  %.not82 = icmp ne i32 %156, 0
  %spec.select87 = zext i1 %.not82 to i32
  br label %157

157:                                              ; preds = %._crit_edge144, %102
  %.367 = phi i32 [ 0, %102 ], [ %spec.select87, %._crit_edge144 ]
  %.not80 = icmp eq i32 %.367, 0
  br i1 %.not80, label %.preheader.backedge, label %.loopexit105.thread

.preheader.backedge:                              ; preds = %157, %.loopexit105
  br label %.preheader, !llvm.loop !31

.loopexit105:                                     ; preds = %.preheader
  %158 = call ptr @ogg_sync_buffer(ptr noundef nonnull %1, i64 noundef 4096) #7
  %159 = load ptr, ptr @stdin, align 8, !tbaa !5
  %160 = call i64 @fread(ptr noundef %158, i64 noundef 1, i64 noundef 4096, ptr noundef %159)
  %sext84 = shl i64 %160, 32
  %161 = ashr exact i64 %sext84, 32
  %162 = call i32 @ogg_sync_wrote(ptr noundef nonnull %1, i64 noundef %161) #7
  %163 = and i64 %160, 4294967295
  %.not176 = icmp eq i64 %163, 0
  br i1 %.not176, label %.loopexit105.thread, label %.preheader.backedge

.loopexit105.thread:                              ; preds = %.loopexit105, %157
  %164 = call i32 @vorbis_block_clear(ptr noundef nonnull %8) #7
  call void @vorbis_dsp_clear(ptr noundef nonnull %7) #7
  br label %168

165:                                              ; preds = %._crit_edge
  %166 = load ptr, ptr @stderr, align 8, !tbaa !5
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %166, ptr noundef nonnull @.str.11) #8
  br label %168

168:                                              ; preds = %.loopexit105.thread, %165
  %169 = call i32 @ogg_stream_clear(ptr noundef nonnull %2) #7
  call void @vorbis_comment_clear(ptr noundef nonnull %6) #7
  call void @vorbis_info_clear(ptr noundef nonnull %5) #7
  br label %15

170:                                              ; preds = %22
  %171 = call i32 @ogg_sync_clear(ptr noundef nonnull %1) #7
  %172 = load ptr, ptr @stderr, align 8, !tbaa !5
  %173 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef nonnull @.str.12) #8
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  ret i32 0
}

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

declare i32 @ogg_sync_init(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

declare i32 @ogg_page_serialno(ptr noundef) local_unnamed_addr #2

declare void @vorbis_info_init(ptr noundef) local_unnamed_addr #2

declare void @vorbis_comment_init(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

declare i32 @vorbis_synthesis(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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

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

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

declare i32 @ogg_page_eos(ptr noundef) local_unnamed_addr #2

declare i32 @vorbis_block_clear(ptr noundef) local_unnamed_addr #2

declare void @vorbis_dsp_clear(ptr noundef) local_unnamed_addr #2

declare i32 @ogg_stream_clear(ptr noundef) local_unnamed_addr #2

declare void @vorbis_comment_clear(ptr noundef) local_unnamed_addr #2

declare void @vorbis_info_clear(ptr noundef) local_unnamed_addr #2

declare i32 @ogg_sync_clear(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.floor.f32(float) #6

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { cold nounwind }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"vorbis_comment", !6, i64 0, !6, i64 8, !14, i64 16, !6, i64 24}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = !{!17, !14, i64 4}
!17 = !{!"vorbis_info", !14, i64 0, !14, i64 4, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !18, i64 40, !6, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!17, !18, i64 8}
!20 = !{!13, !6, i64 24}
!21 = !{!14, !14, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"short", !7, i64 0}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = !{!29, !18, i64 96}
!29 = !{!"vorbis_dsp_state", !14, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !18, i64 56, !18, i64 64, !18, i64 72, !18, i64 80, !18, i64 88, !18, i64 96, !18, i64 104, !18, i64 112, !18, i64 120, !18, i64 128, !6, i64 136}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}


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