; LLVM IR from reworks-org/galaxy :: deps/sfml_deps/vorbis-src/examples (encoder_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_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 }

@readbuffer = external dso_local global [4140 x i8], align 16
@stdin = external global ptr, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@stdout = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.3 = 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_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 i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.ogg_packet, align 8
  %14 = alloca %struct.ogg_packet, align 8
  %15 = alloca %struct.ogg_packet, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 408, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 144, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 192, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i8 0, ptr @readbuffer, align 16, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %45, %0
  %23 = load i32, ptr %11, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 30
  br i1 %24, label %25, label %34

25:                                               ; preds = %22
  %26 = load ptr, ptr @stdin, align 8, !tbaa !10
  %27 = call i32 @feof(ptr noundef %26) #6
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %34, label %29

29:                                               ; preds = %25
  %30 = load ptr, ptr @stdin, align 8, !tbaa !10
  %31 = call i32 @ferror(ptr noundef %30) #6
  %32 = icmp ne i32 %31, 0
  %33 = xor i1 %32, true
  br label %34

34:                                               ; preds = %29, %25, %22
  %35 = phi i1 [ false, %25 ], [ false, %22 ], [ %33, %29 ]
  br i1 %35, label %36, label %48

36:                                               ; preds = %34
  %37 = load ptr, ptr @stdin, align 8, !tbaa !10
  %38 = call i64 @fread(ptr noundef @readbuffer, i64 noundef 1, i64 noundef 2, ptr noundef %37)
  %39 = call i32 @strncmp(ptr noundef @readbuffer, ptr noundef @.str, i64 noundef 2) #7
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %44, label %41

41:                                               ; preds = %36
  store i32 1, ptr %12, align 4, !tbaa !5
  %42 = load ptr, ptr @stdin, align 8, !tbaa !10
  %43 = call i64 @fread(ptr noundef @readbuffer, i64 noundef 1, i64 noundef 6, ptr noundef %42)
  br label %48

44:                                               ; preds = %36
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %11, align 4, !tbaa !5
  br label %22, !llvm.loop !12

48:                                               ; preds = %41, %34
  call void @vorbis_info_init(ptr noundef %5)
  %49 = call i32 @vorbis_encode_init_vbr(ptr noundef %5, i64 noundef 2, i64 noundef 44100, float noundef 0x3FB99999A0000000)
  store i32 %49, ptr %10, align 4, !tbaa !5
  %50 = load i32, ptr %10, align 4, !tbaa !5
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %48
  call void @exit(i32 noundef 1) #8
  unreachable

53:                                               ; preds = %48
  call void @vorbis_comment_init(ptr noundef %6)
  call void @vorbis_comment_add_tag(ptr noundef %6, ptr noundef @.str.1, ptr noundef @.str.2)
  %54 = call i32 @vorbis_analysis_init(ptr noundef %7, ptr noundef %5)
  %55 = call i32 @vorbis_block_init(ptr noundef %7, ptr noundef %8)
  %56 = call i64 @time(ptr noundef null) #6
  %57 = trunc i64 %56 to i32
  call void @srand(i32 noundef %57) #6
  %58 = call i32 @rand() #6
  %59 = call i32 @ogg_stream_init(ptr noundef %2, i32 noundef %58)
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #6
  %60 = call i32 @vorbis_analysis_headerout(ptr noundef %7, ptr noundef %6, ptr noundef %13, ptr noundef %14, ptr noundef %15)
  %61 = call i32 @ogg_stream_packetin(ptr noundef %2, ptr noundef %13)
  %62 = call i32 @ogg_stream_packetin(ptr noundef %2, ptr noundef %14)
  %63 = call i32 @ogg_stream_packetin(ptr noundef %2, ptr noundef %15)
  br label %64

64:                                               ; preds = %88, %53
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = icmp ne i32 %65, 0
  %67 = xor i1 %66, true
  br i1 %67, label %68, label %89

68:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %69 = call i32 @ogg_stream_flush(ptr noundef %2, ptr noundef %3)
  store i32 %69, ptr %16, align 4, !tbaa !5
  %70 = load i32, ptr %16, align 4, !tbaa !5
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %68
  store i32 6, ptr %17, align 4
  br label %86

73:                                               ; preds = %68
  %74 = getelementptr inbounds %struct.ogg_page, ptr %3, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  %76 = getelementptr inbounds %struct.ogg_page, ptr %3, i32 0, i32 1
  %77 = load i64, ptr %76, align 8, !tbaa !17
  %78 = load ptr, ptr @stdout, align 8, !tbaa !10
  %79 = call i64 @fwrite(ptr noundef %75, i64 noundef 1, i64 noundef %77, ptr noundef %78)
  %80 = getelementptr inbounds %struct.ogg_page, ptr %3, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !18
  %82 = getelementptr inbounds %struct.ogg_page, ptr %3, i32 0, i32 3
  %83 = load i64, ptr %82, align 8, !tbaa !19
  %84 = load ptr, ptr @stdout, align 8, !tbaa !10
  %85 = call i64 @fwrite(ptr noundef %81, i64 noundef 1, i64 noundef %83, ptr noundef %84)
  store i32 0, ptr %17, align 4
  br label %86

86:                                               ; preds = %73, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  %87 = load i32, ptr %17, align 4
  switch i32 %87, label %209 [
    i32 0, label %88
    i32 6, label %89
  ]

88:                                               ; preds = %86
  br label %64, !llvm.loop !20

89:                                               ; preds = %86, %64
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #6
  br label %90

90:                                               ; preds = %202, %89
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = icmp ne i32 %91, 0
  %93 = xor i1 %92, true
  br i1 %93, label %94, label %203

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %95 = load ptr, ptr @stdin, align 8, !tbaa !10
  %96 = call i64 @fread(ptr noundef @readbuffer, i64 noundef 1, i64 noundef 4096, ptr noundef %95)
  store i64 %96, ptr %19, align 8, !tbaa !21
  %97 = load i64, ptr %19, align 8, !tbaa !21
  %98 = icmp eq i64 %97, 0
  br i1 %98, label %99, label %101

99:                                               ; preds = %94
  %100 = call i32 @vorbis_analysis_wrote(ptr noundef %7, i32 noundef 0)
  br label %159

101:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %102 = call ptr @vorbis_analysis_buffer(ptr noundef %7, i32 noundef 1024)
  store ptr %102, ptr %20, align 8, !tbaa !10
  store i64 0, ptr %18, align 8, !tbaa !21
  br label %103

103:                                              ; preds = %152, %101
  %104 = load i64, ptr %18, align 8, !tbaa !21
  %105 = load i64, ptr %19, align 8, !tbaa !21
  %106 = sdiv i64 %105, 4
  %107 = icmp slt i64 %104, %106
  br i1 %107, label %108, label %155

108:                                              ; preds = %103
  %109 = load i64, ptr %18, align 8, !tbaa !21
  %110 = mul nsw i64 %109, 4
  %111 = add nsw i64 %110, 1
  %112 = getelementptr inbounds [4140 x i8], ptr @readbuffer, i64 0, i64 %111
  %113 = load i8, ptr %112, align 1, !tbaa !9
  %114 = sext i8 %113 to i32
  %115 = shl i32 %114, 8
  %116 = load i64, ptr %18, align 8, !tbaa !21
  %117 = mul nsw i64 %116, 4
  %118 = getelementptr inbounds [4140 x i8], ptr @readbuffer, i64 0, i64 %117
  %119 = load i8, ptr %118, align 1, !tbaa !9
  %120 = sext i8 %119 to i32
  %121 = and i32 255, %120
  %122 = or i32 %115, %121
  %123 = sitofp i32 %122 to float
  %124 = fdiv float %123, 3.276800e+04
  %125 = load ptr, ptr %20, align 8, !tbaa !10
  %126 = getelementptr inbounds ptr, ptr %125, i64 0
  %127 = load ptr, ptr %126, align 8, !tbaa !10
  %128 = load i64, ptr %18, align 8, !tbaa !21
  %129 = getelementptr inbounds float, ptr %127, i64 %128
  store float %124, ptr %129, align 4, !tbaa !22
  %130 = load i64, ptr %18, align 8, !tbaa !21
  %131 = mul nsw i64 %130, 4
  %132 = add nsw i64 %131, 3
  %133 = getelementptr inbounds [4140 x i8], ptr @readbuffer, i64 0, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !9
  %135 = sext i8 %134 to i32
  %136 = shl i32 %135, 8
  %137 = load i64, ptr %18, align 8, !tbaa !21
  %138 = mul nsw i64 %137, 4
  %139 = add nsw i64 %138, 2
  %140 = getelementptr inbounds [4140 x i8], ptr @readbuffer, i64 0, i64 %139
  %141 = load i8, ptr %140, align 1, !tbaa !9
  %142 = sext i8 %141 to i32
  %143 = and i32 255, %142
  %144 = or i32 %136, %143
  %145 = sitofp i32 %144 to float
  %146 = fdiv float %145, 3.276800e+04
  %147 = load ptr, ptr %20, align 8, !tbaa !10
  %148 = getelementptr inbounds ptr, ptr %147, i64 1
  %149 = load ptr, ptr %148, align 8, !tbaa !10
  %150 = load i64, ptr %18, align 8, !tbaa !21
  %151 = getelementptr inbounds float, ptr %149, i64 %150
  store float %146, ptr %151, align 4, !tbaa !22
  br label %152

152:                                              ; preds = %108
  %153 = load i64, ptr %18, align 8, !tbaa !21
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %18, align 8, !tbaa !21
  br label %103, !llvm.loop !24

155:                                              ; preds = %103
  %156 = load i64, ptr %18, align 8, !tbaa !21
  %157 = trunc i64 %156 to i32
  %158 = call i32 @vorbis_analysis_wrote(ptr noundef %7, i32 noundef %157)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %159

159:                                              ; preds = %155, %99
  br label %160

160:                                              ; preds = %201, %159
  %161 = call i32 @vorbis_analysis_blockout(ptr noundef %7, ptr noundef %8)
  %162 = icmp eq i32 %161, 1
  br i1 %162, label %163, label %202

163:                                              ; preds = %160
  %164 = call i32 @vorbis_analysis(ptr noundef %8, ptr noundef null)
  %165 = call i32 @vorbis_bitrate_addblock(ptr noundef %8)
  br label %166

166:                                              ; preds = %200, %163
  %167 = call i32 @vorbis_bitrate_flushpacket(ptr noundef %7, ptr noundef %4)
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %201

169:                                              ; preds = %166
  %170 = call i32 @ogg_stream_packetin(ptr noundef %2, ptr noundef %4)
  br label %171

171:                                              ; preds = %199, %169
  %172 = load i32, ptr %9, align 4, !tbaa !5
  %173 = icmp ne i32 %172, 0
  %174 = xor i1 %173, true
  br i1 %174, label %175, label %200

175:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %176 = call i32 @ogg_stream_pageout(ptr noundef %2, ptr noundef %3)
  store i32 %176, ptr %21, align 4, !tbaa !5
  %177 = load i32, ptr %21, align 4, !tbaa !5
  %178 = icmp eq i32 %177, 0
  br i1 %178, label %179, label %180

179:                                              ; preds = %175
  store i32 17, ptr %17, align 4
  br label %197

180:                                              ; preds = %175
  %181 = getelementptr inbounds %struct.ogg_page, ptr %3, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8, !tbaa !14
  %183 = getelementptr inbounds %struct.ogg_page, ptr %3, i32 0, i32 1
  %184 = load i64, ptr %183, align 8, !tbaa !17
  %185 = load ptr, ptr @stdout, align 8, !tbaa !10
  %186 = call i64 @fwrite(ptr noundef %182, i64 noundef 1, i64 noundef %184, ptr noundef %185)
  %187 = getelementptr inbounds %struct.ogg_page, ptr %3, i32 0, i32 2
  %188 = load ptr, ptr %187, align 8, !tbaa !18
  %189 = getelementptr inbounds %struct.ogg_page, ptr %3, i32 0, i32 3
  %190 = load i64, ptr %189, align 8, !tbaa !19
  %191 = load ptr, ptr @stdout, align 8, !tbaa !10
  %192 = call i64 @fwrite(ptr noundef %188, i64 noundef 1, i64 noundef %190, ptr noundef %191)
  %193 = call i32 @ogg_page_eos(ptr noundef %3)
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %196

195:                                              ; preds = %180
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %196

196:                                              ; preds = %195, %180
  store i32 0, ptr %17, align 4
  br label %197

197:                                              ; preds = %196, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  %198 = load i32, ptr %17, align 4
  switch i32 %198, label %209 [
    i32 0, label %199
    i32 17, label %200
  ]

199:                                              ; preds = %197
  br label %171, !llvm.loop !25

200:                                              ; preds = %197, %171
  br label %166, !llvm.loop !26

201:                                              ; preds = %166
  br label %160, !llvm.loop !27

202:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %90, !llvm.loop !28

203:                                              ; preds = %90
  %204 = call i32 @ogg_stream_clear(ptr noundef %2)
  %205 = call i32 @vorbis_block_clear(ptr noundef %8)
  call void @vorbis_dsp_clear(ptr noundef %7)
  call void @vorbis_comment_clear(ptr noundef %6)
  call void @vorbis_info_clear(ptr noundef %5)
  %206 = load ptr, ptr @stderr, align 8, !tbaa !10
  %207 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef @.str.3) #6
  store i32 0, ptr %1, align 4
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 192, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 144, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 408, ptr %2) #6
  %208 = load i32, ptr %1, align 4
  ret i32 %208

209:                                              ; preds = %197, %86
  unreachable
}

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #4

declare void @vorbis_info_init(ptr noundef) #3

declare i32 @vorbis_encode_init_vbr(ptr noundef, i64 noundef, i64 noundef, float noundef) #3

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

declare void @vorbis_comment_init(ptr noundef) #3

declare void @vorbis_comment_add_tag(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @vorbis_analysis_init(ptr noundef, ptr noundef) #3

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #2

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

; Function Attrs: nounwind
declare i32 @rand() #2

declare i32 @vorbis_analysis_headerout(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @ogg_stream_packetin(ptr noundef, ptr noundef) #3

declare i32 @ogg_stream_flush(ptr noundef, ptr noundef) #3

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

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

declare i32 @vorbis_analysis_wrote(ptr noundef, i32 noundef) #3

declare ptr @vorbis_analysis_buffer(ptr noundef, i32 noundef) #3

declare i32 @vorbis_analysis_blockout(ptr noundef, ptr noundef) #3

declare i32 @vorbis_analysis(ptr noundef, ptr noundef) #3

declare i32 @vorbis_bitrate_addblock(ptr noundef) #3

declare i32 @vorbis_bitrate_flushpacket(ptr noundef, ptr noundef) #3

declare i32 @ogg_stream_pageout(ptr noundef, ptr noundef) #3

declare i32 @ogg_page_eos(ptr noundef) #3

declare i32 @ogg_stream_clear(ptr noundef) #3

declare i32 @vorbis_block_clear(ptr noundef) #3

declare void @vorbis_dsp_clear(ptr noundef) #3

declare void @vorbis_comment_clear(ptr noundef) #3

declare void @vorbis_info_clear(ptr noundef) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, 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 = { 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 = { "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 = { nounwind willreturn memory(read) "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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !11, i64 0}
!15 = !{!"", !11, i64 0, !16, i64 8, !11, i64 16, !16, i64 24}
!16 = !{!"long", !7, i64 0}
!17 = !{!15, !16, i64 8}
!18 = !{!15, !11, i64 16}
!19 = !{!15, !16, i64 24}
!20 = distinct !{!20, !13}
!21 = !{!16, !16, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = distinct !{!24, !13}
!25 = distinct !{!25, !13}
!26 = distinct !{!26, !13}
!27 = distinct !{!27, !13}
!28 = distinct !{!28, !13}


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

@readbuffer = external dso_local global [4140 x i8], align 16
@stdin = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = 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_stream_state, align 8
  %2 = alloca %struct.ogg_page, align 8
  %3 = alloca %struct.ogg_packet, align 8
  %4 = alloca %struct.vorbis_info, align 8
  %5 = alloca %struct.vorbis_comment, align 8
  %6 = alloca %struct.vorbis_dsp_state, align 8
  %7 = alloca %struct.vorbis_block, align 8
  %8 = alloca %struct.ogg_packet, align 8
  %9 = alloca %struct.ogg_packet, align 8
  %10 = alloca %struct.ogg_packet, align 8
  call void @llvm.lifetime.start.p0(i64 408, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %7) #8
  store i8 0, ptr @readbuffer, align 16, !tbaa !5
  br label %13

11:                                               ; preds = %19
  %12 = add nuw nsw i32 %.02344, 1
  %exitcond.not = icmp eq i32 %12, 30
  br i1 %exitcond.not, label %.critedge, label %13, !llvm.loop !8

13:                                               ; preds = %0, %11
  %.02344 = phi i32 [ 0, %0 ], [ %12, %11 ]
  %14 = load ptr, ptr @stdin, align 8, !tbaa !10
  %15 = tail call i32 @feof(ptr noundef %14) #8
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %16, label %.critedge

16:                                               ; preds = %13
  %17 = load ptr, ptr @stdin, align 8, !tbaa !10
  %18 = tail call i32 @ferror(ptr noundef %17) #8
  %.not28 = icmp eq i32 %18, 0
  br i1 %.not28, label %19, label %.critedge

19:                                               ; preds = %16
  %20 = tail call i64 @fread(ptr noundef nonnull @readbuffer, i64 noundef 1, i64 noundef 2, ptr noundef %17)
  %21 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) @readbuffer, ptr noundef nonnull dereferenceable(1) @.str, i64 noundef 2) #9
  %.not29 = icmp eq i32 %21, 0
  br i1 %.not29, label %22, label %11

22:                                               ; preds = %19
  %23 = load ptr, ptr @stdin, align 8, !tbaa !10
  %24 = tail call i64 @fread(ptr noundef nonnull @readbuffer, i64 noundef 1, i64 noundef 6, ptr noundef %23)
  br label %.critedge

.critedge:                                        ; preds = %13, %11, %16, %22
  call void @vorbis_info_init(ptr noundef nonnull %4) #8
  %25 = call i32 @vorbis_encode_init_vbr(ptr noundef nonnull %4, i64 noundef 2, i64 noundef 44100, float noundef 0x3FB99999A0000000) #8
  %.not30 = icmp eq i32 %25, 0
  br i1 %.not30, label %27, label %26

26:                                               ; preds = %.critedge
  call void @exit(i32 noundef 1) #10
  unreachable

27:                                               ; preds = %.critedge
  call void @vorbis_comment_init(ptr noundef nonnull %5) #8
  call void @vorbis_comment_add_tag(ptr noundef nonnull %5, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2) #8
  %28 = call i32 @vorbis_analysis_init(ptr noundef nonnull %6, ptr noundef nonnull %4) #8
  %29 = call i32 @vorbis_block_init(ptr noundef nonnull %6, ptr noundef nonnull %7) #8
  %30 = call i64 @time(ptr noundef null) #8
  %31 = trunc i64 %30 to i32
  call void @srand(i32 noundef %31) #8
  %32 = call i32 @rand() #8
  %33 = call i32 @ogg_stream_init(ptr noundef nonnull %1, i32 noundef %32) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #8
  %34 = call i32 @vorbis_analysis_headerout(ptr noundef nonnull %6, ptr noundef nonnull %5, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10) #8
  %35 = call i32 @ogg_stream_packetin(ptr noundef nonnull %1, ptr noundef nonnull %8) #8
  %36 = call i32 @ogg_stream_packetin(ptr noundef nonnull %1, ptr noundef nonnull %9) #8
  %37 = call i32 @ogg_stream_packetin(ptr noundef nonnull %1, ptr noundef nonnull %10) #8
  %38 = call i32 @ogg_stream_flush(ptr noundef nonnull %1, ptr noundef nonnull %2) #8
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %27
  %40 = getelementptr inbounds i8, ptr %2, i64 8
  %41 = getelementptr inbounds i8, ptr %2, i64 16
  %42 = getelementptr inbounds i8, ptr %2, i64 24
  br label %43

43:                                               ; preds = %.lr.ph, %43
  %44 = load ptr, ptr %2, align 8, !tbaa !12
  %45 = load i64, ptr %40, align 8, !tbaa !15
  %46 = load ptr, ptr @stdout, align 8, !tbaa !10
  %47 = call i64 @fwrite(ptr noundef %44, i64 noundef 1, i64 noundef %45, ptr noundef %46)
  %48 = load ptr, ptr %41, align 8, !tbaa !16
  %49 = load i64, ptr %42, align 8, !tbaa !17
  %50 = load ptr, ptr @stdout, align 8, !tbaa !10
  %51 = call i64 @fwrite(ptr noundef %48, i64 noundef 1, i64 noundef %49, ptr noundef %50)
  %52 = call i32 @ogg_stream_flush(ptr noundef nonnull %1, ptr noundef nonnull %2) #8
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %._crit_edge, label %43

._crit_edge:                                      ; preds = %43, %27
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #8
  %54 = getelementptr inbounds i8, ptr %2, i64 8
  %55 = getelementptr inbounds i8, ptr %2, i64 16
  %56 = getelementptr inbounds i8, ptr %2, i64 24
  br label %57

.loopexit43:                                      ; preds = %.loopexit, %114
  %.1.lcssa = phi i32 [ 0, %114 ], [ %.2.lcssa, %.loopexit ]
  %.not31 = icmp eq i32 %.1.lcssa, 0
  br i1 %.not31, label %57, label %136, !llvm.loop !18

57:                                               ; preds = %._crit_edge, %.loopexit43
  %58 = load ptr, ptr @stdin, align 8, !tbaa !10
  %59 = call i64 @fread(ptr noundef nonnull @readbuffer, i64 noundef 1, i64 noundef 4096, ptr noundef %58)
  %60 = icmp eq i64 %59, 0
  br i1 %60, label %114, label %61

61:                                               ; preds = %57
  %62 = call ptr @vorbis_analysis_buffer(ptr noundef nonnull %6, i32 noundef 1024) #8
  %63 = sdiv i64 %59, 4
  %64 = icmp sgt i64 %59, 3
  br i1 %64, label %.lr.ph47, label %._crit_edge48

.lr.ph47:                                         ; preds = %61
  %65 = load ptr, ptr %62, align 8, !tbaa !10
  %66 = getelementptr inbounds i8, ptr %62, i64 8
  %67 = load ptr, ptr %66, align 8, !tbaa !10
  %min.iters.check = icmp ult i64 %63, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph47
  %68 = shl nuw nsw i64 %63, 2
  %scevgep = getelementptr i8, ptr %65, i64 %68
  %scevgep66 = getelementptr i8, ptr %67, i64 %68
  %scevgep67 = getelementptr i8, ptr @readbuffer, i64 %68
  %bound0 = icmp ult ptr %65, %scevgep66
  %bound1 = icmp ult ptr %67, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound068 = icmp ult ptr %65, %scevgep67
  %bound169 = icmp ugt ptr %scevgep, @readbuffer
  %found.conflict70 = and i1 %bound068, %bound169
  %conflict.rdx = or i1 %found.conflict, %found.conflict70
  %bound071 = icmp ult ptr %67, %scevgep67
  %bound172 = icmp ugt ptr %scevgep66, @readbuffer
  %found.conflict73 = and i1 %bound071, %bound172
  %conflict.rdx74 = or i1 %conflict.rdx, %found.conflict73
  br i1 %conflict.rdx74, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %63, 2305843009213693948
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %69 = shl nsw i64 %index, 2
  %70 = or disjoint i64 %69, 1
  %gep = getelementptr [4140 x i8], ptr getelementptr (i8, ptr @readbuffer, i64 -1), i64 0, i64 %70
  %wide.vec = load <16 x i8>, ptr %gep, align 16, !tbaa !5
  %strided.vec = shufflevector <16 x i8> %wide.vec, <16 x i8> poison, <4 x i32> <i32 0, i32 4, i32 8, i32 12>
  %strided.vec75 = shufflevector <16 x i8> %wide.vec, <16 x i8> poison, <4 x i32> <i32 1, i32 5, i32 9, i32 13>
  %strided.vec76 = shufflevector <16 x i8> %wide.vec, <16 x i8> poison, <4 x i32> <i32 2, i32 6, i32 10, i32 14>
  %strided.vec77 = shufflevector <16 x i8> %wide.vec, <16 x i8> poison, <4 x i32> <i32 3, i32 7, i32 11, i32 15>
  %71 = sext <4 x i8> %strided.vec75 to <4 x i32>
  %72 = shl nsw <4 x i32> %71, <i32 8, i32 8, i32 8, i32 8>
  %73 = zext <4 x i8> %strided.vec to <4 x i32>
  %74 = or disjoint <4 x i32> %72, %73
  %75 = sitofp <4 x i32> %74 to <4 x float>
  %76 = fmul <4 x float> %75, <float 0x3F00000000000000, float 0x3F00000000000000, float 0x3F00000000000000, float 0x3F00000000000000>
  %77 = getelementptr inbounds float, ptr %65, i64 %index
  store <4 x float> %76, ptr %77, align 4, !tbaa !19, !alias.scope !21, !noalias !24
  %78 = sext <4 x i8> %strided.vec77 to <4 x i32>
  %79 = shl nsw <4 x i32> %78, <i32 8, i32 8, i32 8, i32 8>
  %80 = zext <4 x i8> %strided.vec76 to <4 x i32>
  %81 = or disjoint <4 x i32> %79, %80
  %82 = sitofp <4 x i32> %81 to <4 x float>
  %83 = fmul <4 x float> %82, <float 0x3F00000000000000, float 0x3F00000000000000, float 0x3F00000000000000, float 0x3F00000000000000>
  %84 = getelementptr inbounds float, ptr %67, i64 %index
  store <4 x float> %83, ptr %84, align 4, !tbaa !19, !alias.scope !27, !noalias !28
  %index.next = add nuw i64 %index, 4
  %85 = icmp eq i64 %index.next, %n.vec
  br i1 %85, label %middle.block, label %vector.body, !llvm.loop !29

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %63, %n.vec
  br i1 %cmp.n, label %._crit_edge48, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph47
  %.02445.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph47 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.02445 = phi i64 [ %112, %scalar.ph ], [ %.02445.ph, %scalar.ph.preheader ]
  %86 = shl nsw i64 %.02445, 2
  %87 = or disjoint i64 %86, 1
  %88 = getelementptr inbounds [4140 x i8], ptr @readbuffer, i64 0, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !5
  %90 = sext i8 %89 to i32
  %91 = shl nsw i32 %90, 8
  %92 = getelementptr inbounds [4140 x i8], ptr @readbuffer, i64 0, i64 %86
  %93 = load i8, ptr %92, align 4, !tbaa !5
  %94 = zext i8 %93 to i32
  %95 = or disjoint i32 %91, %94
  %96 = sitofp i32 %95 to float
  %97 = fmul float %96, 0x3F00000000000000
  %98 = getelementptr inbounds float, ptr %65, i64 %.02445
  store float %97, ptr %98, align 4, !tbaa !19
  %99 = or disjoint i64 %86, 3
  %100 = getelementptr inbounds [4140 x i8], ptr @readbuffer, i64 0, i64 %99
  %101 = load i8, ptr %100, align 1, !tbaa !5
  %102 = sext i8 %101 to i32
  %103 = shl nsw i32 %102, 8
  %104 = or disjoint i64 %86, 2
  %105 = getelementptr inbounds [4140 x i8], ptr @readbuffer, i64 0, i64 %104
  %106 = load i8, ptr %105, align 2, !tbaa !5
  %107 = zext i8 %106 to i32
  %108 = or disjoint i32 %103, %107
  %109 = sitofp i32 %108 to float
  %110 = fmul float %109, 0x3F00000000000000
  %111 = getelementptr inbounds float, ptr %67, i64 %.02445
  store float %110, ptr %111, align 4, !tbaa !19
  %112 = add nuw nsw i64 %.02445, 1
  %exitcond65.not = icmp eq i64 %112, %63
  br i1 %exitcond65.not, label %._crit_edge48, label %scalar.ph, !llvm.loop !32

._crit_edge48:                                    ; preds = %scalar.ph, %middle.block, %61
  %.024.lcssa = phi i64 [ 0, %61 ], [ %63, %middle.block ], [ %63, %scalar.ph ]
  %113 = trunc i64 %.024.lcssa to i32
  br label %114

114:                                              ; preds = %57, %._crit_edge48
  %.sink = phi i32 [ %113, %._crit_edge48 ], [ 0, %57 ]
  %115 = call i32 @vorbis_analysis_wrote(ptr noundef nonnull %6, i32 noundef %.sink) #8
  %116 = call i32 @vorbis_analysis_blockout(ptr noundef nonnull %6, ptr noundef nonnull %7) #8
  %117 = icmp eq i32 %116, 1
  br i1 %117, label %.lr.ph62, label %.loopexit43

.loopexit:                                        ; preds = %.thread39, %.lr.ph62
  %.2.lcssa = phi i32 [ %.160, %.lr.ph62 ], [ %.3.lcssa, %.thread39 ]
  %118 = call i32 @vorbis_analysis_blockout(ptr noundef nonnull %6, ptr noundef nonnull %7) #8
  %119 = icmp eq i32 %118, 1
  br i1 %119, label %.lr.ph62, label %.loopexit43, !llvm.loop !33

.lr.ph62:                                         ; preds = %114, %.loopexit
  %.160 = phi i32 [ %.2.lcssa, %.loopexit ], [ 0, %114 ]
  %120 = call i32 @vorbis_analysis(ptr noundef nonnull %7, ptr noundef null) #8
  %121 = call i32 @vorbis_bitrate_addblock(ptr noundef nonnull %7) #8
  %122 = call i32 @vorbis_bitrate_flushpacket(ptr noundef nonnull %6, ptr noundef nonnull %3) #8
  %.not3255 = icmp eq i32 %122, 0
  br i1 %.not3255, label %.loopexit, label %.lr.ph58

.lr.ph58:                                         ; preds = %.lr.ph62, %.thread39
  %.256 = phi i32 [ %.3.lcssa, %.thread39 ], [ %.160, %.lr.ph62 ]
  %123 = call i32 @ogg_stream_packetin(ptr noundef nonnull %1, ptr noundef nonnull %3) #8
  %.not3349 = icmp eq i32 %.256, 0
  br i1 %.not3349, label %.lr.ph52, label %.thread39

.lr.ph52:                                         ; preds = %.lr.ph58, %select.unfold
  %124 = call i32 @ogg_stream_pageout(ptr noundef nonnull %1, ptr noundef nonnull %2) #8
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %.thread39, label %select.unfold

select.unfold:                                    ; preds = %.lr.ph52
  %126 = load ptr, ptr %2, align 8, !tbaa !12
  %127 = load i64, ptr %54, align 8, !tbaa !15
  %128 = load ptr, ptr @stdout, align 8, !tbaa !10
  %129 = call i64 @fwrite(ptr noundef %126, i64 noundef 1, i64 noundef %127, ptr noundef %128)
  %130 = load ptr, ptr %55, align 8, !tbaa !16
  %131 = load i64, ptr %56, align 8, !tbaa !17
  %132 = load ptr, ptr @stdout, align 8, !tbaa !10
  %133 = call i64 @fwrite(ptr noundef %130, i64 noundef 1, i64 noundef %131, ptr noundef %132)
  %134 = call i32 @ogg_page_eos(ptr noundef nonnull %2) #8
  %.not34.not = icmp eq i32 %134, 0
  br i1 %.not34.not, label %.lr.ph52, label %.thread39

.thread39:                                        ; preds = %select.unfold, %.lr.ph52, %.lr.ph58
  %.3.lcssa = phi i32 [ %.256, %.lr.ph58 ], [ 0, %.lr.ph52 ], [ 1, %select.unfold ]
  %135 = call i32 @vorbis_bitrate_flushpacket(ptr noundef nonnull %6, ptr noundef nonnull %3) #8
  %.not32 = icmp eq i32 %135, 0
  br i1 %.not32, label %.loopexit, label %.lr.ph58, !llvm.loop !34

136:                                              ; preds = %.loopexit43
  %137 = call i32 @ogg_stream_clear(ptr noundef nonnull %1) #8
  %138 = call i32 @vorbis_block_clear(ptr noundef nonnull %7) #8
  call void @vorbis_dsp_clear(ptr noundef nonnull %6) #8
  call void @vorbis_comment_clear(ptr noundef nonnull %5) #8
  call void @vorbis_info_clear(ptr noundef nonnull %4) #8
  %139 = load ptr, ptr @stderr, align 8, !tbaa !10
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef nonnull @.str.3) #11
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %1) #8
  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

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

; Function Attrs: nofree nounwind memory(read)
declare noundef i32 @ferror(ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #4

declare void @vorbis_info_init(ptr noundef) local_unnamed_addr #5

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

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

declare void @vorbis_comment_init(ptr noundef) local_unnamed_addr #5

declare void @vorbis_comment_add_tag(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #7

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #7

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #7

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

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

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

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture 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_analysis_wrote(ptr noundef, i32 noundef) local_unnamed_addr #5

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

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

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

declare i32 @vorbis_bitrate_addblock(ptr noundef) local_unnamed_addr #5

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

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

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 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nofree nounwind memory(read) "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"", !11, i64 0, !14, i64 8, !11, i64 16, !14, i64 24}
!14 = !{!"long", !6, i64 0}
!15 = !{!13, !14, i64 8}
!16 = !{!13, !11, i64 16}
!17 = !{!13, !14, i64 24}
!18 = distinct !{!18, !9}
!19 = !{!20, !20, i64 0}
!20 = !{!"float", !6, i64 0}
!21 = !{!22}
!22 = distinct !{!22, !23}
!23 = distinct !{!23, !"LVerDomain"}
!24 = !{!25, !26}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = !{!25}
!28 = !{!26}
!29 = distinct !{!29, !9, !30, !31}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = distinct !{!32, !9, !30}
!33 = distinct !{!33, !9}
!34 = distinct !{!34, !9}


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