; LLVM IR from merpheus-dev/LavaEngine :: src/Utils/soloud/src/audiosource/wav (dr_impl)

; 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.drflac_init_info = type { ptr, ptr, ptr, i32, ptr, ptr, i32, i8, i8, i64, i16, i64, i32, i32, %struct.drflac_bs, %struct.drflac_frame_header, i32, i64, %struct.drflac_ogg_page_header }
%struct.drflac_bs = type { ptr, ptr, ptr, i64, i64, i32, i32, [512 x i64], i64, i16, i64, i32 }
%struct.drflac_frame_header = type { i64, i32, i32, i16, i8, i8, i8 }
%struct.drflac_ogg_page_header = type { [4 x i8], i8, i8, i64, i32, i32, i32, i8, [255 x i8] }

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef i32 @_ZL18drflac__be2host_32j(i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z28drflac__init_private__nativeP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z25drflac__init_private__oggP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z20drflac__init_privateP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataE16drflac_containerS1_S1_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6) #4 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca [4 x i8], align 1
  %18 = alloca i32, align 4
  %19 = alloca [6 x i8], align 1
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i32 %4, ptr %13, align 4, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %30, label %24

24:                                               ; preds = %7
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %30, label %27

27:                                               ; preds = %24
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %27, %24, %7
  store i32 0, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %226

31:                                               ; preds = %27
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %32, i8 0, i64 4592, i1 false)
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.drflac_init_info, ptr %34, i32 0, i32 0
  store ptr %33, ptr %35, align 8, !tbaa !11
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.drflac_init_info, ptr %37, i32 0, i32 1
  store ptr %36, ptr %38, align 8, !tbaa !19
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.drflac_init_info, ptr %40, i32 0, i32 2
  store ptr %39, ptr %41, align 8, !tbaa !20
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.drflac_init_info, ptr %43, i32 0, i32 3
  store i32 %42, ptr %44, align 8, !tbaa !21
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.drflac_init_info, ptr %46, i32 0, i32 4
  store ptr %45, ptr %47, align 8, !tbaa !22
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.drflac_init_info, ptr %49, i32 0, i32 5
  store ptr %48, ptr %50, align 8, !tbaa !23
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.drflac_init_info, ptr %52, i32 0, i32 14
  %54 = getelementptr inbounds %struct.drflac_bs, ptr %53, i32 0, i32 0
  store ptr %51, ptr %54, align 8, !tbaa !24
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.drflac_init_info, ptr %56, i32 0, i32 14
  %58 = getelementptr inbounds %struct.drflac_bs, ptr %57, i32 0, i32 1
  store ptr %55, ptr %58, align 8, !tbaa !25
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.drflac_init_info, ptr %60, i32 0, i32 14
  %62 = getelementptr inbounds %struct.drflac_bs, ptr %61, i32 0, i32 2
  store ptr %59, ptr %62, align 8, !tbaa !26
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.drflac_init_info, ptr %63, i32 0, i32 14
  call void @_ZL19drflac__reset_cacheP9drflac_bs(ptr noundef %64)
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 2
  %67 = zext i1 %66 to i32
  store i32 %67, ptr %16, align 4, !tbaa !27
  br label %68

68:                                               ; preds = %138, %31
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 0
  %72 = call noundef i64 %69(ptr noundef %70, ptr noundef %71, i64 noundef 4)
  %73 = icmp ne i64 %72, 4
  br i1 %73, label %74, label %75

74:                                               ; preds = %68
  store i32 0, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %226

75:                                               ; preds = %68
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.drflac_init_info, ptr %76, i32 0, i32 11
  %78 = load i64, ptr %77, align 8, !tbaa !28
  %79 = add i64 %78, 4
  store i64 %79, ptr %77, align 8, !tbaa !28
  %80 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 0
  %81 = load i8, ptr %80, align 1, !tbaa !29
  %82 = zext i8 %81 to i32
  %83 = icmp eq i32 %82, 73
  br i1 %83, label %84, label %137

84:                                               ; preds = %75
  %85 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 1
  %86 = load i8, ptr %85, align 1, !tbaa !29
  %87 = zext i8 %86 to i32
  %88 = icmp eq i32 %87, 68
  br i1 %88, label %89, label %137

89:                                               ; preds = %84
  %90 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 2
  %91 = load i8, ptr %90, align 1, !tbaa !29
  %92 = zext i8 %91 to i32
  %93 = icmp eq i32 %92, 51
  br i1 %93, label %94, label %137

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 6, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  %97 = getelementptr inbounds [6 x i8], ptr %19, i64 0, i64 0
  %98 = call noundef i64 %95(ptr noundef %96, ptr noundef %97, i64 noundef 6)
  %99 = icmp ne i64 %98, 6
  br i1 %99, label %100, label %101

100:                                              ; preds = %94
  store i32 0, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %134

101:                                              ; preds = %94
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.drflac_init_info, ptr %102, i32 0, i32 11
  %104 = load i64, ptr %103, align 8, !tbaa !28
  %105 = add i64 %104, 6
  store i64 %105, ptr %103, align 8, !tbaa !28
  %106 = getelementptr inbounds [6 x i8], ptr %19, i64 0, i64 1
  %107 = load i8, ptr %106, align 1, !tbaa !29
  store i8 %107, ptr %20, align 1, !tbaa !29
  %108 = getelementptr inbounds [6 x i8], ptr %19, i64 0, i64 0
  %109 = getelementptr inbounds i8, ptr %108, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 1 %109, i64 4, i1 false)
  %110 = load i32, ptr %21, align 4, !tbaa !27
  %111 = call noundef i32 @_ZL18drflac__be2host_32j(i32 noundef %110)
  %112 = call noundef i32 @_ZL22drflac__unsynchsafe_32j(i32 noundef %111)
  store i32 %112, ptr %21, align 4, !tbaa !27
  %113 = load i8, ptr %20, align 1, !tbaa !29
  %114 = zext i8 %113 to i32
  %115 = and i32 %114, 16
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %120

117:                                              ; preds = %101
  %118 = load i32, ptr %21, align 4, !tbaa !27
  %119 = add i32 %118, 10
  store i32 %119, ptr %21, align 4, !tbaa !27
  br label %120

120:                                              ; preds = %117, %101
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = load i32, ptr %21, align 4, !tbaa !27
  %124 = call noundef i32 %121(ptr noundef %122, i32 noundef %123, i32 noundef 1)
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %127, label %126

126:                                              ; preds = %120
  store i32 0, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %134

127:                                              ; preds = %120
  %128 = load i32, ptr %21, align 4, !tbaa !27
  %129 = zext i32 %128 to i64
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.drflac_init_info, ptr %130, i32 0, i32 11
  %132 = load i64, ptr %131, align 8, !tbaa !28
  %133 = add i64 %132, %129
  store i64 %133, ptr %131, align 8, !tbaa !28
  store i32 0, ptr %18, align 4
  br label %134

134:                                              ; preds = %127, %126, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 6, ptr %19) #7
  %135 = load i32, ptr %18, align 4
  switch i32 %135, label %226 [
    i32 0, label %136
  ]

136:                                              ; preds = %134
  br label %138

137:                                              ; preds = %89, %84, %75
  br label %139

138:                                              ; preds = %136
  br label %68, !llvm.loop !30

139:                                              ; preds = %137
  %140 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 0
  %141 = load i8, ptr %140, align 1, !tbaa !29
  %142 = zext i8 %141 to i32
  %143 = icmp eq i32 %142, 102
  br i1 %143, label %144, label %168

144:                                              ; preds = %139
  %145 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 1
  %146 = load i8, ptr %145, align 1, !tbaa !29
  %147 = zext i8 %146 to i32
  %148 = icmp eq i32 %147, 76
  br i1 %148, label %149, label %168

149:                                              ; preds = %144
  %150 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 2
  %151 = load i8, ptr %150, align 1, !tbaa !29
  %152 = zext i8 %151 to i32
  %153 = icmp eq i32 %152, 97
  br i1 %153, label %154, label %168

154:                                              ; preds = %149
  %155 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 3
  %156 = load i8, ptr %155, align 1, !tbaa !29
  %157 = zext i8 %156 to i32
  %158 = icmp eq i32 %157, 67
  br i1 %158, label %159, label %168

159:                                              ; preds = %154
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = load ptr, ptr %12, align 8, !tbaa !5
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  %165 = load ptr, ptr %15, align 8, !tbaa !5
  %166 = load i32, ptr %16, align 4, !tbaa !27
  %167 = call noundef i32 @_Z28drflac__init_private__nativeP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef %160, ptr noundef %161, ptr noundef %162, ptr noundef %163, ptr noundef %164, ptr noundef %165, i32 noundef %166)
  store i32 %167, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %226

168:                                              ; preds = %154, %149, %144, %139
  %169 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 0
  %170 = load i8, ptr %169, align 1, !tbaa !29
  %171 = zext i8 %170 to i32
  %172 = icmp eq i32 %171, 79
  br i1 %172, label %173, label %197

173:                                              ; preds = %168
  %174 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 1
  %175 = load i8, ptr %174, align 1, !tbaa !29
  %176 = zext i8 %175 to i32
  %177 = icmp eq i32 %176, 103
  br i1 %177, label %178, label %197

178:                                              ; preds = %173
  %179 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 2
  %180 = load i8, ptr %179, align 1, !tbaa !29
  %181 = zext i8 %180 to i32
  %182 = icmp eq i32 %181, 103
  br i1 %182, label %183, label %197

183:                                              ; preds = %178
  %184 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 3
  %185 = load i8, ptr %184, align 1, !tbaa !29
  %186 = zext i8 %185 to i32
  %187 = icmp eq i32 %186, 83
  br i1 %187, label %188, label %197

188:                                              ; preds = %183
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = load ptr, ptr %10, align 8, !tbaa !5
  %191 = load ptr, ptr %11, align 8, !tbaa !5
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  %193 = load ptr, ptr %14, align 8, !tbaa !5
  %194 = load ptr, ptr %15, align 8, !tbaa !5
  %195 = load i32, ptr %16, align 4, !tbaa !27
  %196 = call noundef i32 @_Z25drflac__init_private__oggP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef %189, ptr noundef %190, ptr noundef %191, ptr noundef %192, ptr noundef %193, ptr noundef %194, i32 noundef %195)
  store i32 %196, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %226

197:                                              ; preds = %183, %178, %173, %168
  %198 = load i32, ptr %16, align 4, !tbaa !27
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %225

200:                                              ; preds = %197
  %201 = load i32, ptr %13, align 4, !tbaa !9
  %202 = icmp eq i32 %201, 0
  br i1 %202, label %203, label %212

203:                                              ; preds = %200
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = load ptr, ptr %11, align 8, !tbaa !5
  %207 = load ptr, ptr %12, align 8, !tbaa !5
  %208 = load ptr, ptr %14, align 8, !tbaa !5
  %209 = load ptr, ptr %15, align 8, !tbaa !5
  %210 = load i32, ptr %16, align 4, !tbaa !27
  %211 = call noundef i32 @_Z28drflac__init_private__nativeP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef %204, ptr noundef %205, ptr noundef %206, ptr noundef %207, ptr noundef %208, ptr noundef %209, i32 noundef %210)
  store i32 %211, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %226

212:                                              ; preds = %200
  %213 = load i32, ptr %13, align 4, !tbaa !9
  %214 = icmp eq i32 %213, 1
  br i1 %214, label %215, label %224

215:                                              ; preds = %212
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  %217 = load ptr, ptr %10, align 8, !tbaa !5
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = load ptr, ptr %12, align 8, !tbaa !5
  %220 = load ptr, ptr %14, align 8, !tbaa !5
  %221 = load ptr, ptr %15, align 8, !tbaa !5
  %222 = load i32, ptr %16, align 4, !tbaa !27
  %223 = call noundef i32 @_Z25drflac__init_private__oggP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef %216, ptr noundef %217, ptr noundef %218, ptr noundef %219, ptr noundef %220, ptr noundef %221, i32 noundef %222)
  store i32 %223, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %226

224:                                              ; preds = %212
  br label %225

225:                                              ; preds = %224, %197
  store i32 0, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %226

226:                                              ; preds = %225, %215, %203, %188, %159, %134, %74, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %227 = load i32, ptr %8, align 4
  ret i32 %227
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL19drflac__reset_cacheP9drflac_bs(ptr noundef) #5

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL22drflac__unsynchsafe_32j(i32 noundef) #6

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

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS16drflac_container", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS16drflac_init_info", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !7, i64 52, !7, i64 53, !14, i64 56, !15, i64 64, !14, i64 72, !13, i64 80, !13, i64 84, !16, i64 88, !17, i64 4264, !13, i64 4288, !14, i64 4296, !18, i64 4304}
!13 = !{!"int", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ZTS9drflac_bs", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !14, i64 32, !13, i64 40, !13, i64 44, !7, i64 48, !14, i64 4144, !15, i64 4152, !14, i64 4160, !13, i64 4168}
!17 = !{!"_ZTS19drflac_frame_header", !14, i64 0, !13, i64 8, !13, i64 12, !15, i64 16, !7, i64 18, !7, i64 19, !7, i64 20}
!18 = !{!"_ZTS22drflac_ogg_page_header", !7, i64 0, !7, i64 4, !7, i64 5, !14, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !7, i64 28, !7, i64 29}
!19 = !{!12, !6, i64 8}
!20 = !{!12, !6, i64 16}
!21 = !{!12, !10, i64 24}
!22 = !{!12, !6, i64 32}
!23 = !{!12, !6, i64 40}
!24 = !{!12, !6, i64 88}
!25 = !{!12, !6, i64 96}
!26 = !{!12, !6, i64 104}
!27 = !{!13, !13, i64 0}
!28 = !{!12, !14, i64 72}
!29 = !{!7, !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef i32 @_ZL18drflac__be2host_32j(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z28drflac__init_private__nativeP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z25drflac__init_private__oggP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z20drflac__init_privateP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataE16drflac_containerS1_S1_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #3 {
  %8 = alloca [4 x i8], align 1
  %9 = alloca [6 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %10 = icmp eq ptr %0, null
  %11 = icmp eq ptr %1, null
  %or.cond = or i1 %10, %11
  %12 = icmp eq ptr %2, null
  %or.cond3 = or i1 %or.cond, %12
  br i1 %or.cond3, label %.loopexit, label %13

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(4592) %14, i8 0, i64 4568, i1 false)
  store ptr %1, ptr %0, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %2, ptr %15, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %16, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %4, ptr %17, align 8, !tbaa !19
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %5, ptr %18, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %6, ptr %19, align 8, !tbaa !21
  %20 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %1, ptr %20, align 8, !tbaa !22
  %21 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %2, ptr %21, align 8, !tbaa !23
  %22 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %5, ptr %22, align 8, !tbaa !24
  tail call void @_ZL19drflac__reset_cacheP9drflac_bs(ptr noundef nonnull %20)
  %23 = icmp ne i32 %4, 2
  %24 = zext i1 %23 to i32
  %25 = call noundef i64 %1(ptr noundef %5, ptr noundef nonnull %8, i64 noundef 4)
  %.not119 = icmp eq i64 %25, 4
  br i1 %.not119, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %13
  %26 = getelementptr inbounds i8, ptr %0, i64 72
  %27 = getelementptr inbounds i8, ptr %8, i64 1
  %28 = getelementptr inbounds i8, ptr %8, i64 2
  %29 = getelementptr inbounds i8, ptr %9, i64 1
  %30 = getelementptr inbounds i8, ptr %9, i64 2
  br label %31

31:                                               ; preds = %.lr.ph, %.critedge
  %32 = load i64, ptr %26, align 8, !tbaa !25
  %33 = add i64 %32, 4
  store i64 %33, ptr %26, align 8, !tbaa !25
  %34 = load i8, ptr %8, align 1, !tbaa !26
  %35 = icmp eq i8 %34, 73
  %36 = load i8, ptr %27, align 1
  %37 = icmp eq i8 %36, 68
  %or.cond7 = select i1 %35, i1 %37, i1 false
  %38 = load i8, ptr %28, align 1
  %39 = icmp eq i8 %38, 51
  %or.cond11 = select i1 %or.cond7, i1 %39, i1 false
  br i1 %or.cond11, label %40, label %56

40:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %9) #6
  %41 = call noundef i64 %1(ptr noundef %5, ptr noundef nonnull %9, i64 noundef 6)
  %.not111 = icmp eq i64 %41, 6
  br i1 %.not111, label %42, label %55

42:                                               ; preds = %40
  %43 = load i64, ptr %26, align 8, !tbaa !25
  %44 = add i64 %43, 6
  store i64 %44, ptr %26, align 8, !tbaa !25
  %45 = load i8, ptr %29, align 1, !tbaa !26
  %.0.copyload = load i32, ptr %30, align 1
  %46 = call noundef i32 @_ZL18drflac__be2host_32j(i32 noundef %.0.copyload)
  %47 = call noundef i32 @_ZL22drflac__unsynchsafe_32j(i32 noundef %46)
  %48 = and i8 %45, 16
  %.not112 = icmp eq i8 %48, 0
  %49 = add i32 %47, 10
  %spec.select = select i1 %.not112, i32 %47, i32 %49
  %50 = call noundef i32 %2(ptr noundef %5, i32 noundef %spec.select, i32 noundef 1)
  %.not113 = icmp eq i32 %50, 0
  br i1 %.not113, label %55, label %.critedge

.critedge:                                        ; preds = %42
  %51 = zext i32 %spec.select to i64
  %52 = load i64, ptr %26, align 8, !tbaa !25
  %53 = add i64 %52, %51
  store i64 %53, ptr %26, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %9) #6
  %54 = call noundef i64 %1(ptr noundef %5, ptr noundef nonnull %8, i64 noundef 4)
  %.not = icmp eq i64 %54, 4
  br i1 %.not, label %31, label %.loopexit

55:                                               ; preds = %42, %40
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %9) #6
  br label %.loopexit, !llvm.loop !27

56:                                               ; preds = %31
  %57 = icmp eq i8 %34, 102
  %58 = icmp eq i8 %36, 76
  %or.cond15 = select i1 %57, i1 %58, i1 false
  %59 = icmp eq i8 %38, 97
  %or.cond19 = select i1 %or.cond15, i1 %59, i1 false
  %60 = getelementptr inbounds i8, ptr %8, i64 3
  %61 = load i8, ptr %60, align 1
  %62 = icmp eq i8 %61, 67
  %or.cond23 = select i1 %or.cond19, i1 %62, i1 false
  br i1 %or.cond23, label %63, label %65

63:                                               ; preds = %56
  %64 = call noundef i32 @_Z28drflac__init_private__nativeP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %5, ptr noundef %6, i32 noundef %24)
  br label %.loopexit

65:                                               ; preds = %56
  %66 = icmp eq i8 %34, 79
  %67 = icmp eq i8 %36, 103
  %or.cond27 = select i1 %66, i1 %67, i1 false
  %68 = icmp eq i8 %38, 103
  %or.cond31 = select i1 %or.cond27, i1 %68, i1 false
  %69 = icmp eq i8 %61, 83
  %or.cond35 = select i1 %or.cond31, i1 %69, i1 false
  br i1 %or.cond35, label %70, label %72

70:                                               ; preds = %65
  %71 = call noundef i32 @_Z25drflac__init_private__oggP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %5, ptr noundef %6, i32 noundef %24)
  br label %.loopexit

72:                                               ; preds = %65
  br i1 %23, label %73, label %.loopexit

73:                                               ; preds = %72
  switch i32 %4, label %.loopexit [
    i32 0, label %74
    i32 1, label %76
  ]

74:                                               ; preds = %73
  %75 = call noundef i32 @_Z28drflac__init_private__nativeP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %5, ptr noundef %6, i32 noundef %24)
  br label %.loopexit

76:                                               ; preds = %73
  %77 = call noundef i32 @_Z25drflac__init_private__oggP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %5, ptr noundef %6, i32 noundef %24)
  br label %.loopexit

.loopexit:                                        ; preds = %.critedge, %13, %72, %73, %55, %7, %76, %74, %70, %63
  %.2 = phi i32 [ 0, %55 ], [ %64, %63 ], [ %71, %70 ], [ %75, %74 ], [ %77, %76 ], [ 0, %7 ], [ 0, %73 ], [ 0, %72 ], [ 0, %13 ], [ 0, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  ret i32 %.2
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL19drflac__reset_cacheP9drflac_bs(ptr noundef) local_unnamed_addr #4

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL22drflac__unsynchsafe_32j(i32 noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { alwaysinline mustprogress 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 = { mustprogress 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 = { mustprogress 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 #5 = { alwaysinline mustprogress 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS16drflac_init_info", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !8, i64 52, !8, i64 53, !12, i64 56, !13, i64 64, !12, i64 72, !11, i64 80, !11, i64 84, !14, i64 88, !15, i64 4264, !11, i64 4288, !12, i64 4296, !16, i64 4304}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS16drflac_container", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!"short", !8, i64 0}
!14 = !{!"_ZTS9drflac_bs", !7, i64 0, !7, i64 8, !7, i64 16, !12, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !8, i64 48, !12, i64 4144, !13, i64 4152, !12, i64 4160, !11, i64 4168}
!15 = !{!"_ZTS19drflac_frame_header", !12, i64 0, !11, i64 8, !11, i64 12, !13, i64 16, !8, i64 18, !8, i64 19, !8, i64 20}
!16 = !{!"_ZTS22drflac_ogg_page_header", !8, i64 0, !8, i64 4, !8, i64 5, !12, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !8, i64 28, !8, i64 29}
!17 = !{!6, !7, i64 8}
!18 = !{!6, !7, i64 16}
!19 = !{!6, !10, i64 24}
!20 = !{!6, !7, i64 32}
!21 = !{!6, !7, i64 40}
!22 = !{!6, !7, i64 88}
!23 = !{!6, !7, i64 96}
!24 = !{!6, !7, i64 104}
!25 = !{!6, !12, i64 72}
!26 = !{!8, !8, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass