; LLVM IR from reworks-org/galaxy :: deps/sfml_deps/flac-src/src/test_libFLAC++/decoders.ll (ZN11FileDecoder12test_respondEb)

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

%"class.FLAC::Decoder::Stream::State" = type { i32 }
%class.DecoderCommon = type <{ ptr, i32, i32, i8, i8, [6 x i8] }>

@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL4die_PKc(ptr noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL6die_s_PKcPKN4FLAC7Decoder6StreamE(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

declare i32 @_ZNK4FLAC7Decoder6Stream9get_stateEv(ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4FLAC7Decoder6Stream5Statecv24FLAC__StreamDecoderStateEv(ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4FLAC7Decoder6Stream5State10as_cstringEv(ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11FileDecoder12test_respondEb(ptr noundef nonnull align 8 dereferenceable(34) %0, i1 noundef zeroext %1) #1 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.FLAC::Decoder::Stream::State", align 4
  %10 = alloca %"class.FLAC::Decoder::Stream::State", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  %11 = zext i1 %1 to i8
  store i8 %11, ptr %5, align 1, !tbaa !9
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = getelementptr inbounds ptr, ptr %13, i64 4
  %15 = load ptr, ptr %14, align 8
  %16 = call noundef zeroext i1 %15(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true)
  br i1 %16, label %19, label %17

17:                                               ; preds = %2
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %130

19:                                               ; preds = %2
  %20 = getelementptr inbounds i8, ptr %12, i64 16
  %21 = getelementptr inbounds %class.DecoderCommon, ptr %20, i32 0, i32 1
  %22 = load i32, ptr %21, align 8, !tbaa !13
  switch i32 %22, label %92 [
    i32 2, label %23
    i32 3, label %66
  ]

23:                                               ; preds = %19
  %24 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %25 = trunc i8 %24 to i1
  %26 = zext i1 %25 to i64
  %27 = select i1 %25, ptr @.str.15, ptr @.str.8
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %29 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %30 = trunc i8 %29 to i1
  %31 = call noundef ptr @_ZL12flacfilenameb(i1 noundef zeroext %30)
  %32 = call noalias ptr @fopen(ptr noundef %31, ptr noundef @.str.16)
  store ptr %32, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = icmp eq ptr null, %33
  br i1 %34, label %35, label %40

35:                                               ; preds = %23
  %36 = call ptr @__errno_location() #8
  %37 = load i32, ptr %36, align 4, !tbaa !19
  %38 = call ptr @strerror(i32 noundef %37) #7
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, ptr noundef %38)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %63

40:                                               ; preds = %23
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %42 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %43 = trunc i8 %42 to i1
  %44 = zext i1 %43 to i64
  %45 = select i1 %43, ptr @.str.7, ptr @.str.8
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %45)
  %47 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %48 = trunc i8 %47 to i1
  br i1 %48, label %49, label %55

49:                                               ; preds = %40
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load ptr, ptr %12, align 8, !tbaa !11
  %52 = getelementptr inbounds ptr, ptr %51, i64 40
  %53 = load ptr, ptr %52, align 8
  %54 = call noundef i32 %53(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %50)
  br label %61

55:                                               ; preds = %40
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load ptr, ptr %12, align 8, !tbaa !11
  %58 = getelementptr inbounds ptr, ptr %57, i64 37
  %59 = load ptr, ptr %58, align 8
  %60 = call noundef i32 %59(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %56)
  br label %61

61:                                               ; preds = %55, %49
  %62 = phi i32 [ %54, %49 ], [ %60, %55 ]
  store i32 %62, ptr %6, align 4, !tbaa !20
  store i32 0, ptr %7, align 4
  br label %63

63:                                               ; preds = %61, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %64 = load i32, ptr %7, align 4
  switch i32 %64, label %130 [
    i32 0, label %65
  ]

65:                                               ; preds = %63
  br label %94

66:                                               ; preds = %19
  %67 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %68 = trunc i8 %67 to i1
  %69 = zext i1 %68 to i64
  %70 = select i1 %68, ptr @.str.7, ptr @.str.8
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %70)
  %72 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %82

74:                                               ; preds = %66
  %75 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %76 = trunc i8 %75 to i1
  %77 = call noundef ptr @_ZL12flacfilenameb(i1 noundef zeroext %76)
  %78 = load ptr, ptr %12, align 8, !tbaa !11
  %79 = getelementptr inbounds ptr, ptr %78, i64 41
  %80 = load ptr, ptr %79, align 8
  %81 = call noundef i32 %80(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %77)
  br label %90

82:                                               ; preds = %66
  %83 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %84 = trunc i8 %83 to i1
  %85 = call noundef ptr @_ZL12flacfilenameb(i1 noundef zeroext %84)
  %86 = load ptr, ptr %12, align 8, !tbaa !11
  %87 = getelementptr inbounds ptr, ptr %86, i64 38
  %88 = load ptr, ptr %87, align 8
  %89 = call noundef i32 %88(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %85)
  br label %90

90:                                               ; preds = %82, %74
  %91 = phi i32 [ %81, %74 ], [ %89, %82 ]
  store i32 %91, ptr %6, align 4, !tbaa !20
  br label %94

92:                                               ; preds = %19
  %93 = call noundef zeroext i1 @_ZL4die_PKc(ptr noundef @.str.18)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %130

94:                                               ; preds = %90, %65
  %95 = load i32, ptr %6, align 4, !tbaa !20
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %100

97:                                               ; preds = %94
  %98 = call noundef i32 @_ZL6die_s_PKcPKN4FLAC7Decoder6StreamE(ptr noundef null, ptr noundef %12)
  %99 = icmp ne i32 %98, 0
  store i1 %99, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %130

100:                                              ; preds = %94
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %102 = getelementptr inbounds i8, ptr %12, i64 16
  %103 = getelementptr inbounds %class.DecoderCommon, ptr %102, i32 0, i32 2
  store i32 0, ptr %103, align 4, !tbaa !22
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  %105 = load ptr, ptr %12, align 8, !tbaa !11
  %106 = getelementptr inbounds ptr, ptr %105, i64 26
  %107 = load ptr, ptr %106, align 8
  %108 = call noundef zeroext i1 %107(ptr noundef nonnull align 8 dereferenceable(16) %12)
  br i1 %108, label %115, label %109

109:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %110 = call i32 @_ZNK4FLAC7Decoder6Stream9get_stateEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %111 = getelementptr inbounds %"class.FLAC::Decoder::Stream::State", ptr %9, i32 0, i32 0
  store i32 %110, ptr %111, align 4
  %112 = call noundef i32 @_ZNK4FLAC7Decoder6Stream5Statecv24FLAC__StreamDecoderStateEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
  %113 = call noundef ptr @_ZNK4FLAC7Decoder6Stream5State10as_cstringEv(ptr noundef nonnull align 4 dereferenceable(4) %9)
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %112, ptr noundef %113)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %130

115:                                              ; preds = %100
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %118 = load ptr, ptr %12, align 8, !tbaa !11
  %119 = getelementptr inbounds ptr, ptr %118, i64 21
  %120 = load ptr, ptr %119, align 8
  %121 = call noundef zeroext i1 %120(ptr noundef nonnull align 8 dereferenceable(16) %12)
  br i1 %121, label %128, label %122

122:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %123 = call i32 @_ZNK4FLAC7Decoder6Stream9get_stateEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %124 = getelementptr inbounds %"class.FLAC::Decoder::Stream::State", ptr %10, i32 0, i32 0
  store i32 %123, ptr %124, align 4
  %125 = call noundef i32 @_ZNK4FLAC7Decoder6Stream5Statecv24FLAC__StreamDecoderStateEv(ptr noundef nonnull align 4 dereferenceable(4) %10)
  %126 = call noundef ptr @_ZNK4FLAC7Decoder6Stream5State10as_cstringEv(ptr noundef nonnull align 4 dereferenceable(4) %10)
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %125, ptr noundef %126)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %130

128:                                              ; preds = %115
  %129 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %130

130:                                              ; preds = %128, %122, %109, %97, %92, %63, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %131 = load i1, ptr %3, align 1
  ret i1 %131
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL12flacfilenameb(i1 noundef zeroext) #5

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #6

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

!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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !15, i64 8}
!14 = !{!"_ZTS13DecoderCommon", !15, i64 8, !16, i64 12, !10, i64 16, !10, i64 17}
!15 = !{!"_ZTS5Layer", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!16, !16, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS29FLAC__StreamDecoderInitStatus", !7, i64 0}
!22 = !{!14, !16, i64 12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.FLAC::Decoder::Stream::State" = type { i32 }

@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL4die_PKc(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL6die_s_PKcPKN4FLAC7Decoder6StreamE(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #3

declare i32 @_ZNK4FLAC7Decoder6Stream9get_stateEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4FLAC7Decoder6Stream5Statecv24FLAC__StreamDecoderStateEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4FLAC7Decoder6Stream5State10as_cstringEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11FileDecoder12test_respondEb(ptr noundef nonnull align 8 dereferenceable(34) %0, i1 noundef zeroext %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"class.FLAC::Decoder::Stream::State", align 4
  %4 = alloca %"class.FLAC::Decoder::Stream::State", align 4
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 32
  %7 = load ptr, ptr %6, align 8
  %8 = tail call noundef zeroext i1 %7(ptr noundef nonnull align 8 dereferenceable(16) %0, i1 noundef zeroext true)
  br i1 %8, label %11, label %9

9:                                                ; preds = %2
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %84

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = load i32, ptr %12, align 8, !tbaa !8
  switch i32 %13, label %52 [
    i32 2, label %14
    i32 3, label %37
  ]

14:                                               ; preds = %11
  %15 = select i1 %1, ptr @.str.15, ptr @.str.8
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef nonnull %15)
  %17 = tail call noundef ptr @_ZL12flacfilenameb(i1 noundef zeroext %1)
  %18 = tail call noalias ptr @fopen(ptr noundef %17, ptr noundef nonnull @.str.16)
  %.not = icmp eq ptr %18, null
  br i1 %.not, label %32, label %19

19:                                               ; preds = %14
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %21 = select i1 %1, ptr @.str.7, ptr @.str.8
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull %21)
  %23 = load ptr, ptr %0, align 8, !tbaa !5
  br i1 %1, label %24, label %28

24:                                               ; preds = %19
  %25 = getelementptr inbounds i8, ptr %23, i64 320
  %26 = load ptr, ptr %25, align 8
  %27 = tail call noundef i32 %26(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %18)
  br label %.thread

28:                                               ; preds = %19
  %29 = getelementptr inbounds i8, ptr %23, i64 296
  %30 = load ptr, ptr %29, align 8
  %31 = tail call noundef i32 %30(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %18)
  br label %.thread

32:                                               ; preds = %14
  %33 = tail call ptr @__errno_location() #8
  %34 = load i32, ptr %33, align 4, !tbaa !14
  %35 = tail call ptr @strerror(i32 noundef %34) #9
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef %35)
  br label %84

37:                                               ; preds = %11
  %38 = select i1 %1, ptr @.str.7, ptr @.str.8
  %39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull %38)
  br i1 %1, label %40, label %46

40:                                               ; preds = %37
  %41 = tail call noundef ptr @_ZL12flacfilenameb(i1 noundef zeroext true)
  %42 = load ptr, ptr %0, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 328
  %44 = load ptr, ptr %43, align 8
  %45 = tail call noundef i32 %44(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %41)
  br label %.thread

46:                                               ; preds = %37
  %47 = tail call noundef ptr @_ZL12flacfilenameb(i1 noundef zeroext false)
  %48 = load ptr, ptr %0, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 304
  %50 = load ptr, ptr %49, align 8
  %51 = tail call noundef i32 %50(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %47)
  br label %.thread

52:                                               ; preds = %11
  %53 = tail call noundef zeroext i1 @_ZL4die_PKc(ptr noundef nonnull @.str.18)
  br label %84

.thread:                                          ; preds = %28, %24, %40, %46
  %.116 = phi i32 [ %45, %40 ], [ %51, %46 ], [ %31, %28 ], [ %27, %24 ]
  %.not19 = icmp eq i32 %.116, 0
  br i1 %.not19, label %57, label %54

54:                                               ; preds = %.thread
  %55 = tail call noundef i32 @_ZL6die_s_PKcPKN4FLAC7Decoder6StreamE(ptr noundef null, ptr noundef nonnull %0)
  %56 = icmp ne i32 %55, 0
  br label %84

57:                                               ; preds = %.thread
  %58 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %59 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 0, ptr %59, align 4, !tbaa !15
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %61 = load ptr, ptr %0, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i64 208
  %63 = load ptr, ptr %62, align 8
  %64 = tail call noundef zeroext i1 %63(ptr noundef nonnull align 8 dereferenceable(16) %0)
  br i1 %64, label %70, label %65

65:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  %66 = tail call i32 @_ZNK4FLAC7Decoder6Stream9get_stateEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  store i32 %66, ptr %3, align 4
  %67 = call noundef i32 @_ZNK4FLAC7Decoder6Stream5Statecv24FLAC__StreamDecoderStateEv(ptr noundef nonnull align 4 dereferenceable(4) %3)
  %68 = call noundef ptr @_ZNK4FLAC7Decoder6Stream5State10as_cstringEv(ptr noundef nonnull align 4 dereferenceable(4) %3)
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %67, ptr noundef %68)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  br label %84

70:                                               ; preds = %57
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %73 = load ptr, ptr %0, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 168
  %75 = load ptr, ptr %74, align 8
  %76 = tail call noundef zeroext i1 %75(ptr noundef nonnull align 8 dereferenceable(16) %0)
  br i1 %76, label %82, label %77

77:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %78 = tail call i32 @_ZNK4FLAC7Decoder6Stream9get_stateEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  store i32 %78, ptr %4, align 4
  %79 = call noundef i32 @_ZNK4FLAC7Decoder6Stream5Statecv24FLAC__StreamDecoderStateEv(ptr noundef nonnull align 4 dereferenceable(4) %4)
  %80 = call noundef ptr @_ZNK4FLAC7Decoder6Stream5State10as_cstringEv(ptr noundef nonnull align 4 dereferenceable(4) %4)
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %79, ptr noundef %80)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  br label %84

82:                                               ; preds = %70
  %83 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %84

84:                                               ; preds = %32, %82, %77, %65, %54, %52, %9
  %.1 = phi i1 [ false, %52 ], [ %56, %54 ], [ true, %82 ], [ false, %77 ], [ false, %65 ], [ false, %32 ], [ false, %9 ]
  ret i1 %.1
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL12flacfilenameb(i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #7

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { inlinehint 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 = { 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 8}
!9 = !{!"_ZTS13DecoderCommon", !10, i64 8, !12, i64 12, !13, i64 16, !13, i64 17}
!10 = !{!"_ZTS5Layer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"int", !11, i64 0}
!13 = !{!"bool", !11, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!9, !12, i64 12}


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