; 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_streaminfo = type { i16, i16, i32, i32, i32, i8, i8, i64, [16 x i8] }
%struct.drflac_metadata = type { i32, ptr, i32, %union.anon.5 }
%union.anon.5 = type { %struct.anon.10 }
%struct.anon.10 = type { [128 x i8], i64, i32, i8, ptr }
%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: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z28drflac__init_private__nativeP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6) #2 {
  %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 ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct.drflac_streaminfo, align 8
  %21 = alloca %struct.drflac_metadata, align 8
  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 ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i32 %6, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.drflac_init_info, ptr %22, i32 0, i32 3
  store i32 0, ptr %23, align 8, !tbaa !11
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = load ptr, ptr %13, align 8, !tbaa !5
  %26 = call noundef i32 @_ZL36drflac__read_and_decode_block_headerPFmPvS_mES_PhS2_Pj(ptr noundef %24, ptr noundef %25, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %7
  store i32 0, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %128

29:                                               ; preds = %7
  %30 = load i8, ptr %17, align 1, !tbaa !19
  %31 = zext i8 %30 to i32
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %36, label %33

33:                                               ; preds = %29
  %34 = load i32, ptr %18, align 4, !tbaa !9
  %35 = icmp ne i32 %34, 34
  br i1 %35, label %36, label %82

36:                                               ; preds = %33, %29
  %37 = load i32, ptr %15, align 4, !tbaa !9
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 0, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %128

40:                                               ; preds = %36
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.drflac_init_info, ptr %41, i32 0, i32 12
  store i32 0, ptr %42, align 8, !tbaa !20
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.drflac_init_info, ptr %43, i32 0, i32 13
  store i32 0, ptr %44, align 4, !tbaa !21
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.drflac_init_info, ptr %45, i32 0, i32 14
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.drflac_init_info, ptr %47, i32 0, i32 15
  %49 = call noundef i32 @_ZL35drflac__read_next_flac_frame_headerP9drflac_bshP19drflac_frame_header(ptr noundef %46, i8 noundef zeroext 0, ptr noundef %48)
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %52, label %51

51:                                               ; preds = %40
  store i32 0, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %128

52:                                               ; preds = %40
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.drflac_init_info, ptr %53, i32 0, i32 15
  %55 = getelementptr inbounds %struct.drflac_frame_header, ptr %54, i32 0, i32 5
  %56 = load i8, ptr %55, align 1, !tbaa !22
  %57 = zext i8 %56 to i32
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %60

59:                                               ; preds = %52
  store i32 0, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %128

60:                                               ; preds = %52
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.drflac_init_info, ptr %61, i32 0, i32 15
  %63 = getelementptr inbounds %struct.drflac_frame_header, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 4, !tbaa !23
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.drflac_init_info, ptr %65, i32 0, i32 6
  store i32 %64, ptr %66, align 8, !tbaa !24
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.drflac_init_info, ptr %67, i32 0, i32 15
  %69 = getelementptr inbounds %struct.drflac_frame_header, ptr %68, i32 0, i32 4
  %70 = load i8, ptr %69, align 2, !tbaa !25
  %71 = call noundef zeroext i8 @_ZL49drflac__get_channel_count_from_channel_assignmenta(i8 noundef signext %70)
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.drflac_init_info, ptr %72, i32 0, i32 7
  store i8 %71, ptr %73, align 4, !tbaa !26
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.drflac_init_info, ptr %74, i32 0, i32 15
  %76 = getelementptr inbounds %struct.drflac_frame_header, ptr %75, i32 0, i32 5
  %77 = load i8, ptr %76, align 1, !tbaa !22
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.drflac_init_info, ptr %78, i32 0, i32 8
  store i8 %77, ptr %79, align 1, !tbaa !27
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.drflac_init_info, ptr %80, i32 0, i32 10
  store i16 -1, ptr %81, align 8, !tbaa !28
  store i32 1, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %128

82:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 48, ptr %20) #5
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = call noundef i32 @_Z23drflac__read_streaminfoPFmPvS_mES_P17drflac_streaminfo(ptr noundef %83, ptr noundef %84, ptr noundef %20)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %88, label %87

87:                                               ; preds = %82
  store i32 0, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %127

88:                                               ; preds = %82
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.drflac_init_info, ptr %89, i32 0, i32 12
  store i32 1, ptr %90, align 8, !tbaa !20
  %91 = getelementptr inbounds %struct.drflac_streaminfo, ptr %20, i32 0, i32 4
  %92 = load i32, ptr %91, align 4, !tbaa !29
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.drflac_init_info, ptr %93, i32 0, i32 6
  store i32 %92, ptr %94, align 8, !tbaa !24
  %95 = getelementptr inbounds %struct.drflac_streaminfo, ptr %20, i32 0, i32 5
  %96 = load i8, ptr %95, align 8, !tbaa !31
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.drflac_init_info, ptr %97, i32 0, i32 7
  store i8 %96, ptr %98, align 4, !tbaa !26
  %99 = getelementptr inbounds %struct.drflac_streaminfo, ptr %20, i32 0, i32 6
  %100 = load i8, ptr %99, align 1, !tbaa !32
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.drflac_init_info, ptr %101, i32 0, i32 8
  store i8 %100, ptr %102, align 1, !tbaa !27
  %103 = getelementptr inbounds %struct.drflac_streaminfo, ptr %20, i32 0, i32 7
  %104 = load i64, ptr %103, align 8, !tbaa !33
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.drflac_init_info, ptr %105, i32 0, i32 9
  store i64 %104, ptr %106, align 8, !tbaa !34
  %107 = getelementptr inbounds %struct.drflac_streaminfo, ptr %20, i32 0, i32 1
  %108 = load i16, ptr %107, align 2, !tbaa !35
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.drflac_init_info, ptr %109, i32 0, i32 10
  store i16 %108, ptr %110, align 8, !tbaa !28
  %111 = load i8, ptr %16, align 1, !tbaa !19
  %112 = icmp ne i8 %111, 0
  %113 = xor i1 %112, true
  %114 = zext i1 %113 to i32
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.drflac_init_info, ptr %115, i32 0, i32 13
  store i32 %114, ptr %116, align 4, !tbaa !21
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %126

119:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 176, ptr %21) #5
  %120 = getelementptr inbounds %struct.drflac_metadata, ptr %21, i32 0, i32 0
  store i32 0, ptr %120, align 8, !tbaa !36
  %121 = getelementptr inbounds %struct.drflac_metadata, ptr %21, i32 0, i32 1
  store ptr null, ptr %121, align 8, !tbaa !38
  %122 = getelementptr inbounds %struct.drflac_metadata, ptr %21, i32 0, i32 2
  store i32 0, ptr %122, align 8, !tbaa !39
  %123 = getelementptr inbounds %struct.drflac_metadata, ptr %21, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %123, ptr align 8 %20, i64 48, i1 false), !tbaa.struct !40
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = load ptr, ptr %14, align 8, !tbaa !5
  call void %124(ptr noundef %125, ptr noundef %21)
  call void @llvm.lifetime.end.p0(i64 176, ptr %21) #5
  br label %126

126:                                              ; preds = %119, %88
  store i32 1, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %127

127:                                              ; preds = %126, %87
  call void @llvm.lifetime.end.p0(i64 48, ptr %20) #5
  br label %128

128:                                              ; preds = %127, %60, %59, %51, %39, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  %129 = load i32, ptr %8, align 4
  ret i32 %129
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL35drflac__read_next_flac_frame_headerP9drflac_bshP19drflac_frame_header(ptr noundef, i8 noundef zeroext, ptr noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef zeroext i8 @_ZL49drflac__get_channel_count_from_channel_assignmenta(i8 noundef signext) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 24}
!12 = !{!"_ZTS16drflac_init_info", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !7, i64 52, !7, i64 53, !14, i64 56, !15, i64 64, !14, i64 72, !10, i64 80, !10, i64 84, !16, i64 88, !17, i64 4264, !10, i64 4288, !14, i64 4296, !18, i64 4304}
!13 = !{!"_ZTS16drflac_container", !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, !10, i64 40, !10, i64 44, !7, i64 48, !14, i64 4144, !15, i64 4152, !14, i64 4160, !10, i64 4168}
!17 = !{!"_ZTS19drflac_frame_header", !14, i64 0, !10, i64 8, !10, 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, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 28, !7, i64 29}
!19 = !{!7, !7, i64 0}
!20 = !{!12, !10, i64 80}
!21 = !{!12, !10, i64 84}
!22 = !{!12, !7, i64 4283}
!23 = !{!12, !10, i64 4276}
!24 = !{!12, !10, i64 48}
!25 = !{!12, !7, i64 4282}
!26 = !{!12, !7, i64 52}
!27 = !{!12, !7, i64 53}
!28 = !{!12, !15, i64 64}
!29 = !{!30, !10, i64 12}
!30 = !{!"_ZTS17drflac_streaminfo", !15, i64 0, !15, i64 2, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 17, !14, i64 24, !7, i64 32}
!31 = !{!30, !7, i64 16}
!32 = !{!30, !7, i64 17}
!33 = !{!30, !14, i64 24}
!34 = !{!12, !14, i64 56}
!35 = !{!30, !15, i64 2}
!36 = !{!37, !10, i64 0}
!37 = !{!"_ZTS15drflac_metadata", !10, i64 0, !6, i64 8, !10, i64 16, !7, i64 24}
!38 = !{!37, !6, i64 8}
!39 = !{!37, !10, i64 16}
!40 = !{i64 0, i64 2, !41, i64 2, i64 2, !41, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 1, !19, i64 17, i64 1, !19, i64 24, i64 8, !42, i64 32, i64 16, !19}
!41 = !{!15, !15, i64 0}
!42 = !{!14, !14, i64 0}


; 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.drflac_streaminfo = type { i16, i16, i32, i32, i32, i8, i8, i64, [16 x i8] }
%struct.drflac_metadata = type { i32, ptr, i32, %union.anon.5 }
%union.anon.5 = type { %struct.anon.10 }
%struct.anon.10 = type { [128 x i8], i64, i32, i8, ptr }

; 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: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, 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: mustprogress uwtable
declare dso_local noundef i32 @_Z23drflac__read_streaminfoPFmPvS_mES_P17drflac_streaminfo(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef i32 @_ZL36drflac__read_and_decode_block_headerPFmPvS_mES_PhS2_Pj(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_Z28drflac__init_private__nativeP16drflac_init_infoPFmPvS1_mEPFjS1_i18drflac_seek_originEPFvS1_P15drflac_metadataES1_S1_j(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readnone %2, ptr noundef readonly %3, ptr noundef %4, ptr noundef %5, i32 noundef %6) local_unnamed_addr #2 {
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca %struct.drflac_streaminfo, align 8
  %12 = alloca %struct.drflac_metadata, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %13, align 8, !tbaa !5
  %14 = call noundef i32 @_ZL36drflac__read_and_decode_block_headerPFmPvS_mES_PhS2_Pj(ptr noundef %1, ptr noundef %4, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %69, label %15

15:                                               ; preds = %7
  %16 = load i8, ptr %9, align 1, !tbaa !17
  %17 = icmp ne i8 %16, 0
  %18 = load i32, ptr %10, align 4
  %19 = icmp ne i32 %18, 34
  %or.cond = select i1 %17, i1 true, i1 %19
  br i1 %or.cond, label %20, label %42

20:                                               ; preds = %15
  %.not33 = icmp eq i32 %6, 0
  br i1 %.not33, label %69, label %21

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 0, ptr %22, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 0, ptr %23, align 4, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  %25 = getelementptr inbounds i8, ptr %0, i64 4264
  %26 = call noundef i32 @_ZL35drflac__read_next_flac_frame_headerP9drflac_bshP19drflac_frame_header(ptr noundef nonnull %24, i8 noundef zeroext 0, ptr noundef nonnull %25)
  %.not34 = icmp eq i32 %26, 0
  br i1 %.not34, label %69, label %27

27:                                               ; preds = %21
  %28 = getelementptr inbounds i8, ptr %0, i64 4283
  %29 = load i8, ptr %28, align 1, !tbaa !20
  %30 = icmp eq i8 %29, 0
  br i1 %30, label %69, label %31

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %0, i64 4276
  %33 = load i32, ptr %32, align 4, !tbaa !21
  %34 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %33, ptr %34, align 8, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %0, i64 4282
  %36 = load i8, ptr %35, align 2, !tbaa !23
  %37 = call noundef zeroext i8 @_ZL49drflac__get_channel_count_from_channel_assignmenta(i8 noundef signext %36)
  %38 = getelementptr inbounds i8, ptr %0, i64 52
  store i8 %37, ptr %38, align 4, !tbaa !24
  %39 = load i8, ptr %28, align 1, !tbaa !20
  %40 = getelementptr inbounds i8, ptr %0, i64 53
  store i8 %39, ptr %40, align 1, !tbaa !25
  %41 = getelementptr inbounds i8, ptr %0, i64 64
  store i16 -1, ptr %41, align 8, !tbaa !26
  br label %69

42:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #5
  %43 = call noundef i32 @_Z23drflac__read_streaminfoPFmPvS_mES_P17drflac_streaminfo(ptr noundef %1, ptr noundef %4, ptr noundef nonnull %11)
  %.not30 = icmp eq i32 %43, 0
  br i1 %.not30, label %68, label %44

44:                                               ; preds = %42
  %45 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 1, ptr %45, align 8, !tbaa !18
  %46 = getelementptr inbounds i8, ptr %11, i64 12
  %47 = load i32, ptr %46, align 4, !tbaa !27
  %48 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %47, ptr %48, align 8, !tbaa !22
  %49 = getelementptr inbounds i8, ptr %11, i64 16
  %50 = load i8, ptr %49, align 8, !tbaa !29
  %51 = getelementptr inbounds i8, ptr %0, i64 52
  store i8 %50, ptr %51, align 4, !tbaa !24
  %52 = getelementptr inbounds i8, ptr %11, i64 17
  %53 = load i8, ptr %52, align 1, !tbaa !30
  %54 = getelementptr inbounds i8, ptr %0, i64 53
  store i8 %53, ptr %54, align 1, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %11, i64 24
  %56 = load i64, ptr %55, align 8, !tbaa !31
  %57 = getelementptr inbounds i8, ptr %0, i64 56
  store i64 %56, ptr %57, align 8, !tbaa !32
  %58 = getelementptr inbounds i8, ptr %11, i64 2
  %59 = load i16, ptr %58, align 2, !tbaa !33
  %60 = getelementptr inbounds i8, ptr %0, i64 64
  store i16 %59, ptr %60, align 8, !tbaa !26
  %61 = load i8, ptr %8, align 1, !tbaa !17
  %.not31 = icmp eq i8 %61, 0
  %62 = zext i1 %.not31 to i32
  %63 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 %62, ptr %63, align 4, !tbaa !19
  %.not32 = icmp eq ptr %3, null
  br i1 %.not32, label %68, label %64

64:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %12) #5
  store i32 0, ptr %12, align 8, !tbaa !34
  %65 = getelementptr inbounds i8, ptr %12, i64 8
  store ptr null, ptr %65, align 8, !tbaa !36
  %66 = getelementptr inbounds i8, ptr %12, i64 16
  store i32 0, ptr %66, align 8, !tbaa !37
  %67 = getelementptr inbounds i8, ptr %12, i64 24
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %67, ptr noundef nonnull align 8 dereferenceable(48) %11, i64 48, i1 false), !tbaa.struct !38
  call void %3(ptr noundef %5, ptr noundef nonnull %12)
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %12) #5
  br label %68

68:                                               ; preds = %44, %64, %42
  %.0 = phi i32 [ 0, %42 ], [ 1, %64 ], [ 1, %44 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #5
  br label %69

69:                                               ; preds = %27, %21, %20, %7, %68, %31
  %.1 = phi i32 [ 1, %31 ], [ %.0, %68 ], [ 0, %7 ], [ 0, %20 ], [ 0, %21 ], [ 0, %27 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  ret i32 %.1
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL35drflac__read_next_flac_frame_headerP9drflac_bshP19drflac_frame_header(ptr noundef, i8 noundef zeroext, ptr noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef zeroext i8 @_ZL49drflac__get_channel_count_from_channel_assignmenta(i8 noundef signext) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { 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 #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, !10, i64 24}
!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 = !{!8, !8, i64 0}
!18 = !{!6, !11, i64 80}
!19 = !{!6, !11, i64 84}
!20 = !{!6, !8, i64 4283}
!21 = !{!6, !11, i64 4276}
!22 = !{!6, !11, i64 48}
!23 = !{!6, !8, i64 4282}
!24 = !{!6, !8, i64 52}
!25 = !{!6, !8, i64 53}
!26 = !{!6, !13, i64 64}
!27 = !{!28, !11, i64 12}
!28 = !{!"_ZTS17drflac_streaminfo", !13, i64 0, !13, i64 2, !11, i64 4, !11, i64 8, !11, i64 12, !8, i64 16, !8, i64 17, !12, i64 24, !8, i64 32}
!29 = !{!28, !8, i64 16}
!30 = !{!28, !8, i64 17}
!31 = !{!28, !12, i64 24}
!32 = !{!6, !12, i64 56}
!33 = !{!28, !13, i64 2}
!34 = !{!35, !11, i64 0}
!35 = !{!"_ZTS15drflac_metadata", !11, i64 0, !7, i64 8, !11, i64 16, !8, i64 24}
!36 = !{!35, !7, i64 8}
!37 = !{!35, !11, i64 16}
!38 = !{i64 0, i64 2, !39, i64 2, i64 2, !39, i64 4, i64 4, !40, i64 8, i64 4, !40, i64 12, i64 4, !40, i64 16, i64 1, !17, i64 17, i64 1, !17, i64 24, i64 8, !41, i64 32, i64 16, !17}
!39 = !{!13, !13, i64 0}
!40 = !{!11, !11, i64 0}
!41 = !{!12, !12, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass