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

; 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.vorbis_info = type { i32, i32, i64, i64, i64, i64, i64, ptr }
%struct.codec_setup_info = type { [2 x i64], i32, i32, i32, i32, i32, i32, [64 x ptr], [64 x i32], [64 x ptr], [64 x i32], [64 x ptr], [64 x i32], [64 x ptr], [256 x ptr], ptr, [4 x ptr], %struct.vorbis_info_psy_global, %struct.bitrate_manager_info, %struct.highlevel_encode_setup, i32 }
%struct.vorbis_info_psy_global = type { i32, [7 x float], [7 x float], float, float, float, [15 x i32], [2 x [15 x i32]], [15 x i32], [15 x i32], [2 x [15 x i32]] }
%struct.bitrate_manager_info = type { i64, i64, i64, i64, double, double }
%struct.highlevel_encode_setup = type { i32, ptr, double, double, float, i32, i64, i64, double, i64, i64, double, i32, i32, i32, double, double, i32, double, double, double, double, [4 x %struct.highlevel_byblocktype] }
%struct.highlevel_byblocktype = type { double, double, double, double }
%struct.vorbis_func_mapping = type { ptr, ptr, ptr, ptr, ptr }
%struct.vorbis_func_floor = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.vorbis_func_residue = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.codebook = type { i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32 }

@_mapping_P = external constant [0 x ptr], align 8
@_floor_P = external constant [0 x ptr], align 8
@_residue_P = external constant [0 x ptr], align 8

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

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @vorbis_info_clear(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.vorbis_info, ptr %5, i32 0, i32 7
  %7 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %7, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %213

10:                                               ; preds = %1
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %11

11:                                               ; preds = %33, %10
  %12 = load i32, ptr %4, align 4, !tbaa !13
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.codec_setup_info, ptr %13, i32 0, i32 1
  %15 = load i32, ptr %14, align 8, !tbaa !14
  %16 = icmp slt i32 %12, %15
  br i1 %16, label %17, label %36

17:                                               ; preds = %11
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.codec_setup_info, ptr %18, i32 0, i32 7
  %20 = load i32, ptr %4, align 4, !tbaa !13
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [64 x ptr], ptr %19, i64 0, i64 %21
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %32

25:                                               ; preds = %17
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.codec_setup_info, ptr %26, i32 0, i32 7
  %28 = load i32, ptr %4, align 4, !tbaa !13
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [64 x ptr], ptr %27, i64 0, i64 %29
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  call void @free(ptr noundef %31) #5
  br label %32

32:                                               ; preds = %25, %17
  br label %33

33:                                               ; preds = %32
  %34 = load i32, ptr %4, align 4, !tbaa !13
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %4, align 4, !tbaa !13
  br label %11, !llvm.loop !21

36:                                               ; preds = %11
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %37

37:                                               ; preds = %70, %36
  %38 = load i32, ptr %4, align 4, !tbaa !13
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.codec_setup_info, ptr %39, i32 0, i32 2
  %41 = load i32, ptr %40, align 4, !tbaa !23
  %42 = icmp slt i32 %38, %41
  br i1 %42, label %43, label %73

43:                                               ; preds = %37
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.codec_setup_info, ptr %44, i32 0, i32 9
  %46 = load i32, ptr %4, align 4, !tbaa !13
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [64 x ptr], ptr %45, i64 0, i64 %47
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %69

51:                                               ; preds = %43
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.codec_setup_info, ptr %52, i32 0, i32 8
  %54 = load i32, ptr %4, align 4, !tbaa !13
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [64 x i32], ptr %53, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !13
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [0 x ptr], ptr @_mapping_P, i64 0, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.vorbis_func_mapping, ptr %60, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !24
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.codec_setup_info, ptr %63, i32 0, i32 9
  %65 = load i32, ptr %4, align 4, !tbaa !13
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [64 x ptr], ptr %64, i64 0, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  call void %62(ptr noundef %68)
  br label %69

69:                                               ; preds = %51, %43
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %4, align 4, !tbaa !13
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %4, align 4, !tbaa !13
  br label %37, !llvm.loop !26

73:                                               ; preds = %37
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %74

74:                                               ; preds = %107, %73
  %75 = load i32, ptr %4, align 4, !tbaa !13
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.codec_setup_info, ptr %76, i32 0, i32 3
  %78 = load i32, ptr %77, align 8, !tbaa !27
  %79 = icmp slt i32 %75, %78
  br i1 %79, label %80, label %110

80:                                               ; preds = %74
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.codec_setup_info, ptr %81, i32 0, i32 11
  %83 = load i32, ptr %4, align 4, !tbaa !13
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [64 x ptr], ptr %82, i64 0, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %88, label %106

88:                                               ; preds = %80
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.codec_setup_info, ptr %89, i32 0, i32 10
  %91 = load i32, ptr %4, align 4, !tbaa !13
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [64 x i32], ptr %90, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !13
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [0 x ptr], ptr @_floor_P, i64 0, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.vorbis_func_floor, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !28
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.codec_setup_info, ptr %100, i32 0, i32 11
  %102 = load i32, ptr %4, align 4, !tbaa !13
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [64 x ptr], ptr %101, i64 0, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  call void %99(ptr noundef %105)
  br label %106

106:                                              ; preds = %88, %80
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %4, align 4, !tbaa !13
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %4, align 4, !tbaa !13
  br label %74, !llvm.loop !30

110:                                              ; preds = %74
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %111

111:                                              ; preds = %144, %110
  %112 = load i32, ptr %4, align 4, !tbaa !13
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.codec_setup_info, ptr %113, i32 0, i32 4
  %115 = load i32, ptr %114, align 4, !tbaa !31
  %116 = icmp slt i32 %112, %115
  br i1 %116, label %117, label %147

117:                                              ; preds = %111
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.codec_setup_info, ptr %118, i32 0, i32 13
  %120 = load i32, ptr %4, align 4, !tbaa !13
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [64 x ptr], ptr %119, i64 0, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = icmp ne ptr %123, null
  br i1 %124, label %125, label %143

125:                                              ; preds = %117
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.codec_setup_info, ptr %126, i32 0, i32 12
  %128 = load i32, ptr %4, align 4, !tbaa !13
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [64 x i32], ptr %127, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !13
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [0 x ptr], ptr @_residue_P, i64 0, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.vorbis_func_residue, ptr %134, i32 0, i32 3
  %136 = load ptr, ptr %135, align 8, !tbaa !32
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.codec_setup_info, ptr %137, i32 0, i32 13
  %139 = load i32, ptr %4, align 4, !tbaa !13
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [64 x ptr], ptr %138, i64 0, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  call void %136(ptr noundef %142)
  br label %143

143:                                              ; preds = %125, %117
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %4, align 4, !tbaa !13
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %4, align 4, !tbaa !13
  br label %111, !llvm.loop !34

147:                                              ; preds = %111
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %148

148:                                              ; preds = %182, %147
  %149 = load i32, ptr %4, align 4, !tbaa !13
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.codec_setup_info, ptr %150, i32 0, i32 5
  %152 = load i32, ptr %151, align 8, !tbaa !35
  %153 = icmp slt i32 %149, %152
  br i1 %153, label %154, label %185

154:                                              ; preds = %148
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.codec_setup_info, ptr %155, i32 0, i32 14
  %157 = load i32, ptr %4, align 4, !tbaa !13
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [256 x ptr], ptr %156, i64 0, i64 %158
  %160 = load ptr, ptr %159, align 8, !tbaa !5
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %169

162:                                              ; preds = %154
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.codec_setup_info, ptr %163, i32 0, i32 14
  %165 = load i32, ptr %4, align 4, !tbaa !13
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [256 x ptr], ptr %164, i64 0, i64 %166
  %168 = load ptr, ptr %167, align 8, !tbaa !5
  call void @vorbis_staticbook_destroy(ptr noundef %168)
  br label %169

169:                                              ; preds = %162, %154
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.codec_setup_info, ptr %170, i32 0, i32 15
  %172 = load ptr, ptr %171, align 8, !tbaa !36
  %173 = icmp ne ptr %172, null
  br i1 %173, label %174, label %181

174:                                              ; preds = %169
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.codec_setup_info, ptr %175, i32 0, i32 15
  %177 = load ptr, ptr %176, align 8, !tbaa !36
  %178 = load i32, ptr %4, align 4, !tbaa !13
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds %struct.codebook, ptr %177, i64 %179
  call void @vorbis_book_clear(ptr noundef %180)
  br label %181

181:                                              ; preds = %174, %169
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %4, align 4, !tbaa !13
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %4, align 4, !tbaa !13
  br label %148, !llvm.loop !37

185:                                              ; preds = %148
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.codec_setup_info, ptr %186, i32 0, i32 15
  %188 = load ptr, ptr %187, align 8, !tbaa !36
  %189 = icmp ne ptr %188, null
  br i1 %189, label %190, label %194

190:                                              ; preds = %185
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.codec_setup_info, ptr %191, i32 0, i32 15
  %193 = load ptr, ptr %192, align 8, !tbaa !36
  call void @free(ptr noundef %193) #5
  br label %194

194:                                              ; preds = %190, %185
  store i32 0, ptr %4, align 4, !tbaa !13
  br label %195

195:                                              ; preds = %208, %194
  %196 = load i32, ptr %4, align 4, !tbaa !13
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.codec_setup_info, ptr %197, i32 0, i32 6
  %199 = load i32, ptr %198, align 4, !tbaa !38
  %200 = icmp slt i32 %196, %199
  br i1 %200, label %201, label %211

201:                                              ; preds = %195
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.codec_setup_info, ptr %202, i32 0, i32 16
  %204 = load i32, ptr %4, align 4, !tbaa !13
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [4 x ptr], ptr %203, i64 0, i64 %205
  %207 = load ptr, ptr %206, align 8, !tbaa !5
  call void @_vi_psy_free(ptr noundef %207)
  br label %208

208:                                              ; preds = %201
  %209 = load i32, ptr %4, align 4, !tbaa !13
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %4, align 4, !tbaa !13
  br label %195, !llvm.loop !39

211:                                              ; preds = %195
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %212) #5
  br label %213

213:                                              ; preds = %211, %1
  %214 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %214, i8 0, i64 56, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

declare void @vorbis_staticbook_destroy(ptr noundef) #4

declare void @vorbis_book_clear(ptr noundef) #4

declare void @_vi_psy_free(ptr noundef) #4

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #4 = { "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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 48}
!10 = !{!"vorbis_info", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !6, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 16}
!15 = !{!"codec_setup_info", !7, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !7, i64 552, !7, i64 808, !7, i64 1320, !7, i64 1576, !7, i64 2088, !7, i64 2344, !7, i64 2856, !6, i64 4904, !7, i64 4912, !16, i64 4944, !18, i64 5440, !20, i64 5488, !11, i64 5776}
!16 = !{!"", !11, i64 0, !7, i64 4, !7, i64 32, !17, i64 60, !17, i64 64, !17, i64 68, !7, i64 72, !7, i64 132, !7, i64 252, !7, i64 312, !7, i64 372}
!17 = !{!"float", !7, i64 0}
!18 = !{!"bitrate_manager_info", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !19, i64 32, !19, i64 40}
!19 = !{!"double", !7, i64 0}
!20 = !{!"highlevel_encode_setup", !11, i64 0, !6, i64 8, !19, i64 16, !19, i64 24, !17, i64 32, !11, i64 36, !12, i64 40, !12, i64 48, !19, i64 56, !12, i64 64, !12, i64 72, !19, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !19, i64 104, !19, i64 112, !11, i64 120, !19, i64 128, !19, i64 136, !19, i64 144, !19, i64 152, !7, i64 160}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!15, !11, i64 20}
!24 = !{!25, !6, i64 16}
!25 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!26 = distinct !{!26, !22}
!27 = !{!15, !11, i64 24}
!28 = !{!29, !6, i64 24}
!29 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!30 = distinct !{!30, !22}
!31 = !{!15, !11, i64 28}
!32 = !{!33, !6, i64 24}
!33 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!34 = distinct !{!34, !22}
!35 = !{!15, !11, i64 32}
!36 = !{!15, !6, i64 4904}
!37 = distinct !{!37, !22}
!38 = !{!15, !11, i64 36}
!39 = distinct !{!39, !22}


; 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.codebook = type { i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32 }

@_mapping_P = external local_unnamed_addr constant [0 x ptr], align 8
@_floor_P = external local_unnamed_addr constant [0 x ptr], align 8
@_residue_P = external local_unnamed_addr constant [0 x ptr], align 8

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @vorbis_info_clear(ptr nocapture noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 48
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %111, label %.preheader72

.preheader72:                                     ; preds = %1
  %4 = getelementptr inbounds i8, ptr %3, i64 16
  %5 = load i32, ptr %4, align 8, !tbaa !12
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.preheader71

.lr.ph:                                           ; preds = %.preheader72
  %7 = getelementptr inbounds i8, ptr %3, i64 40
  br label %13

.preheader71:                                     ; preds = %18, %.preheader72
  %8 = getelementptr inbounds i8, ptr %3, i64 20
  %9 = load i32, ptr %8, align 4, !tbaa !19
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph75, label %.preheader70

.lr.ph75:                                         ; preds = %.preheader71
  %11 = getelementptr inbounds i8, ptr %3, i64 808
  %12 = getelementptr inbounds i8, ptr %3, i64 552
  br label %27

13:                                               ; preds = %.lr.ph, %18
  %14 = phi i32 [ %5, %.lr.ph ], [ %19, %18 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %18 ]
  %15 = getelementptr inbounds [64 x ptr], ptr %7, i64 0, i64 %indvars.iv
  %16 = load ptr, ptr %15, align 8, !tbaa !20
  %.not68 = icmp eq ptr %16, null
  br i1 %.not68, label %18, label %17

17:                                               ; preds = %13
  tail call void @free(ptr noundef nonnull %16) #4
  %.pre = load i32, ptr %4, align 8, !tbaa !12
  br label %18

18:                                               ; preds = %13, %17
  %19 = phi i32 [ %14, %13 ], [ %.pre, %17 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = sext i32 %19 to i64
  %21 = icmp slt i64 %indvars.iv.next, %20
  br i1 %21, label %13, label %.preheader71, !llvm.loop !21

.preheader70:                                     ; preds = %39, %.preheader71
  %22 = getelementptr inbounds i8, ptr %3, i64 24
  %23 = load i32, ptr %22, align 8, !tbaa !23
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph77, label %.preheader69

.lr.ph77:                                         ; preds = %.preheader70
  %25 = getelementptr inbounds i8, ptr %3, i64 1576
  %26 = getelementptr inbounds i8, ptr %3, i64 1320
  br label %48

27:                                               ; preds = %.lr.ph75, %39
  %28 = phi i32 [ %9, %.lr.ph75 ], [ %40, %39 ]
  %indvars.iv87 = phi i64 [ 0, %.lr.ph75 ], [ %indvars.iv.next88, %39 ]
  %29 = getelementptr inbounds [64 x ptr], ptr %11, i64 0, i64 %indvars.iv87
  %30 = load ptr, ptr %29, align 8, !tbaa !20
  %.not67 = icmp eq ptr %30, null
  br i1 %.not67, label %39, label %31

31:                                               ; preds = %27
  %32 = getelementptr inbounds [64 x i32], ptr %12, i64 0, i64 %indvars.iv87
  %33 = load i32, ptr %32, align 4, !tbaa !24
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [0 x ptr], ptr @_mapping_P, i64 0, i64 %34
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !25
  tail call void %38(ptr noundef nonnull %30) #4
  %.pre102 = load i32, ptr %8, align 4, !tbaa !19
  br label %39

39:                                               ; preds = %27, %31
  %40 = phi i32 [ %28, %27 ], [ %.pre102, %31 ]
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next88, %41
  br i1 %42, label %27, label %.preheader70, !llvm.loop !27

.preheader69:                                     ; preds = %60, %.preheader70
  %43 = getelementptr inbounds i8, ptr %3, i64 28
  %44 = load i32, ptr %43, align 4, !tbaa !28
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph79, label %.preheader

.lr.ph79:                                         ; preds = %.preheader69
  %46 = getelementptr inbounds i8, ptr %3, i64 2344
  %47 = getelementptr inbounds i8, ptr %3, i64 2088
  br label %69

48:                                               ; preds = %.lr.ph77, %60
  %49 = phi i32 [ %23, %.lr.ph77 ], [ %61, %60 ]
  %indvars.iv90 = phi i64 [ 0, %.lr.ph77 ], [ %indvars.iv.next91, %60 ]
  %50 = getelementptr inbounds [64 x ptr], ptr %25, i64 0, i64 %indvars.iv90
  %51 = load ptr, ptr %50, align 8, !tbaa !20
  %.not66 = icmp eq ptr %51, null
  br i1 %.not66, label %60, label %52

52:                                               ; preds = %48
  %53 = getelementptr inbounds [64 x i32], ptr %26, i64 0, i64 %indvars.iv90
  %54 = load i32, ptr %53, align 4, !tbaa !24
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [0 x ptr], ptr @_floor_P, i64 0, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  %58 = getelementptr inbounds i8, ptr %57, i64 24
  %59 = load ptr, ptr %58, align 8, !tbaa !29
  tail call void %59(ptr noundef nonnull %51) #4
  %.pre103 = load i32, ptr %22, align 8, !tbaa !23
  br label %60

60:                                               ; preds = %48, %52
  %61 = phi i32 [ %49, %48 ], [ %.pre103, %52 ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %indvars.iv.next91, %62
  br i1 %63, label %48, label %.preheader69, !llvm.loop !31

.preheader:                                       ; preds = %81, %.preheader69
  %64 = getelementptr inbounds i8, ptr %3, i64 32
  %65 = load i32, ptr %64, align 8, !tbaa !32
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %.lr.ph81, label %._crit_edge

.lr.ph81:                                         ; preds = %.preheader
  %67 = getelementptr inbounds i8, ptr %3, i64 2856
  %68 = getelementptr inbounds i8, ptr %3, i64 4904
  br label %85

69:                                               ; preds = %.lr.ph79, %81
  %70 = phi i32 [ %44, %.lr.ph79 ], [ %82, %81 ]
  %indvars.iv93 = phi i64 [ 0, %.lr.ph79 ], [ %indvars.iv.next94, %81 ]
  %71 = getelementptr inbounds [64 x ptr], ptr %46, i64 0, i64 %indvars.iv93
  %72 = load ptr, ptr %71, align 8, !tbaa !20
  %.not65 = icmp eq ptr %72, null
  br i1 %.not65, label %81, label %73

73:                                               ; preds = %69
  %74 = getelementptr inbounds [64 x i32], ptr %47, i64 0, i64 %indvars.iv93
  %75 = load i32, ptr %74, align 4, !tbaa !24
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [0 x ptr], ptr @_residue_P, i64 0, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !20
  %79 = getelementptr inbounds i8, ptr %78, i64 24
  %80 = load ptr, ptr %79, align 8, !tbaa !33
  tail call void %80(ptr noundef nonnull %72) #4
  %.pre104 = load i32, ptr %43, align 4, !tbaa !28
  br label %81

81:                                               ; preds = %69, %73
  %82 = phi i32 [ %70, %69 ], [ %.pre104, %73 ]
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %83 = sext i32 %82 to i64
  %84 = icmp slt i64 %indvars.iv.next94, %83
  br i1 %84, label %69, label %.preheader, !llvm.loop !35

85:                                               ; preds = %.lr.ph81, %93
  %indvars.iv96 = phi i64 [ 0, %.lr.ph81 ], [ %indvars.iv.next97, %93 ]
  %86 = getelementptr inbounds [256 x ptr], ptr %67, i64 0, i64 %indvars.iv96
  %87 = load ptr, ptr %86, align 8, !tbaa !20
  %.not63 = icmp eq ptr %87, null
  br i1 %.not63, label %89, label %88

88:                                               ; preds = %85
  tail call void @vorbis_staticbook_destroy(ptr noundef nonnull %87) #4
  br label %89

89:                                               ; preds = %88, %85
  %90 = load ptr, ptr %68, align 8, !tbaa !36
  %.not64 = icmp eq ptr %90, null
  br i1 %.not64, label %93, label %91

91:                                               ; preds = %89
  %92 = getelementptr inbounds %struct.codebook, ptr %90, i64 %indvars.iv96
  tail call void @vorbis_book_clear(ptr noundef nonnull %92) #4
  br label %93

93:                                               ; preds = %89, %91
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %94 = load i32, ptr %64, align 8, !tbaa !32
  %95 = sext i32 %94 to i64
  %96 = icmp slt i64 %indvars.iv.next97, %95
  br i1 %96, label %85, label %._crit_edge, !llvm.loop !37

._crit_edge:                                      ; preds = %93, %.preheader
  %97 = getelementptr inbounds i8, ptr %3, i64 4904
  %98 = load ptr, ptr %97, align 8, !tbaa !36
  %.not62 = icmp eq ptr %98, null
  br i1 %.not62, label %100, label %99

99:                                               ; preds = %._crit_edge
  tail call void @free(ptr noundef nonnull %98) #4
  br label %100

100:                                              ; preds = %99, %._crit_edge
  %101 = getelementptr inbounds i8, ptr %3, i64 36
  %102 = load i32, ptr %101, align 4, !tbaa !38
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %.lr.ph84, label %._crit_edge85

.lr.ph84:                                         ; preds = %100
  %104 = getelementptr inbounds i8, ptr %3, i64 4912
  br label %105

105:                                              ; preds = %.lr.ph84, %105
  %indvars.iv99 = phi i64 [ 0, %.lr.ph84 ], [ %indvars.iv.next100, %105 ]
  %106 = getelementptr inbounds [4 x ptr], ptr %104, i64 0, i64 %indvars.iv99
  %107 = load ptr, ptr %106, align 8, !tbaa !20
  tail call void @_vi_psy_free(ptr noundef %107) #4
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %108 = load i32, ptr %101, align 4, !tbaa !38
  %109 = sext i32 %108 to i64
  %110 = icmp slt i64 %indvars.iv.next100, %109
  br i1 %110, label %105, label %._crit_edge85, !llvm.loop !39

._crit_edge85:                                    ; preds = %105, %100
  tail call void @free(ptr noundef nonnull %3) #4
  br label %111

111:                                              ; preds = %._crit_edge85, %1
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %0, i8 0, i64 56, i1 false)
  ret void
}

declare void @vorbis_staticbook_destroy(ptr noundef) local_unnamed_addr #3

declare void @vorbis_book_clear(ptr noundef) local_unnamed_addr #3

declare void @_vi_psy_free(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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 #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 }

!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, !11, i64 48}
!6 = !{!"vorbis_info", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !11, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !7, i64 16}
!13 = !{!"codec_setup_info", !8, i64 0, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !8, i64 552, !8, i64 808, !8, i64 1320, !8, i64 1576, !8, i64 2088, !8, i64 2344, !8, i64 2856, !11, i64 4904, !8, i64 4912, !14, i64 4944, !16, i64 5440, !18, i64 5488, !7, i64 5776}
!14 = !{!"", !7, i64 0, !8, i64 4, !8, i64 32, !15, i64 60, !15, i64 64, !15, i64 68, !8, i64 72, !8, i64 132, !8, i64 252, !8, i64 312, !8, i64 372}
!15 = !{!"float", !8, i64 0}
!16 = !{!"bitrate_manager_info", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !17, i64 32, !17, i64 40}
!17 = !{!"double", !8, i64 0}
!18 = !{!"highlevel_encode_setup", !7, i64 0, !11, i64 8, !17, i64 16, !17, i64 24, !15, i64 32, !7, i64 36, !10, i64 40, !10, i64 48, !17, i64 56, !10, i64 64, !10, i64 72, !17, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !17, i64 104, !17, i64 112, !7, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !17, i64 152, !8, i64 160}
!19 = !{!13, !7, i64 20}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!13, !7, i64 24}
!24 = !{!7, !7, i64 0}
!25 = !{!26, !11, i64 16}
!26 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!27 = distinct !{!27, !22}
!28 = !{!13, !7, i64 28}
!29 = !{!30, !11, i64 24}
!30 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48}
!31 = distinct !{!31, !22}
!32 = !{!13, !7, i64 32}
!33 = !{!34, !11, i64 24}
!34 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!35 = distinct !{!35, !22}
!36 = !{!13, !11, i64 4904}
!37 = distinct !{!37, !22}
!38 = !{!13, !7, i64 36}
!39 = distinct !{!39, !22}


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