; LLVM IR from kmxz/overlayfs-tools :: logic (list_deleted_files)

; 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._ftsent = type { ptr, ptr, ptr, i64, ptr, ptr, ptr, i32, i32, i16, i16, i64, i64, i64, i16, i16, i16, i16, ptr, [1 x i8] }

@stderr = external global ptr, align 8
@brief = external global i8, align 1
@verbose = external global i8, align 1
@.str.25 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [32 x i8], align 1

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

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
declare dso_local void @print_removed(ptr noundef, i64 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @list_deleted_files(ptr noundef %0, i64 noundef %1, i32 noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca [2 x ptr], align 16
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  %14 = load i8, ptr @brief, align 1, !tbaa !13, !range !15, !noundef !16
  %15 = trunc i8 %14 to i1
  br i1 %15, label %16, label %19

16:                                               ; preds = %3
  %17 = load i32, ptr %7, align 4, !tbaa !11
  %18 = icmp eq i32 %17, 16384
  br label %19

19:                                               ; preds = %16, %3
  %20 = phi i1 [ false, %3 ], [ %18, %16 ]
  %21 = zext i1 %20 to i8
  store i8 %21, ptr %8, align 1, !tbaa !13
  %22 = load i8, ptr @verbose, align 1, !tbaa !13, !range !15, !noundef !16
  %23 = trunc i8 %22 to i1
  br i1 %23, label %37, label %24

24:                                               ; preds = %19
  %25 = load i8, ptr %8, align 1, !tbaa !13, !range !15, !noundef !16
  %26 = trunc i8 %25 to i1
  br i1 %26, label %37, label %27

27:                                               ; preds = %24
  %28 = load i8, ptr @brief, align 1, !tbaa !13, !range !15, !noundef !16
  %29 = trunc i8 %28 to i1
  br i1 %29, label %30, label %33

30:                                               ; preds = %27
  %31 = load i32, ptr %7, align 4, !tbaa !11
  %32 = icmp eq i32 %31, 8192
  br i1 %32, label %33, label %36

33:                                               ; preds = %30, %27
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i64, ptr %6, align 8, !tbaa !9
  call void @print_removed(ptr noundef %34, i64 noundef %35, i32 noundef 16384)
  br label %36

36:                                               ; preds = %33, %30
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %126

37:                                               ; preds = %24, %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %38, ptr %11, align 8, !tbaa !5
  %39 = getelementptr inbounds ptr, ptr %11, i64 1
  store ptr null, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %40 = getelementptr inbounds [2 x ptr], ptr %11, i64 0, i64 0
  %41 = call ptr @fts_open(ptr noundef %40, i32 noundef 20, ptr noundef null)
  store ptr %41, ptr %12, align 8, !tbaa !5
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %45

44:                                               ; preds = %37
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %125

45:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %46

46:                                               ; preds = %109, %45
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = call ptr @fts_read(ptr noundef %47)
  store ptr %48, ptr %10, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %53

50:                                               ; preds = %46
  %51 = load i32, ptr %13, align 4, !tbaa !11
  %52 = icmp eq i32 %51, 0
  br label %53

53:                                               ; preds = %50, %46
  %54 = phi i1 [ false, %46 ], [ %52, %50 ]
  br i1 %54, label %55, label %110

55:                                               ; preds = %53
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct._ftsent, ptr %56, i32 0, i32 15
  %58 = load i16, ptr %57, align 2, !tbaa !17
  %59 = zext i16 %58 to i32
  switch i32 %59, label %103 [
    i32 1, label %60
    i32 6, label %78
    i32 8, label %87
    i32 12, label %92
    i32 3, label %97
  ]

60:                                               ; preds = %55
  %61 = load i8, ptr %8, align 1, !tbaa !13, !range !15, !noundef !16
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %77

63:                                               ; preds = %60
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._ftsent, ptr %64, i32 0, i32 14
  %66 = load i16, ptr %65, align 8, !tbaa !20
  %67 = sext i16 %66 to i32
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %69, label %77

69:                                               ; preds = %63
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._ftsent, ptr %70, i32 0, i32 6
  %72 = load ptr, ptr %71, align 8, !tbaa !21
  %73 = load i64, ptr %6, align 8, !tbaa !9
  call void @print_removed(ptr noundef %72, i64 noundef %73, i32 noundef 16384)
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = call i32 @fts_set(ptr noundef %74, ptr noundef %75, i32 noundef 4) #5
  br label %77

77:                                               ; preds = %69, %63, %60
  br label %109

78:                                               ; preds = %55
  %79 = load i8, ptr %8, align 1, !tbaa !13, !range !15, !noundef !16
  %80 = trunc i8 %79 to i1
  br i1 %80, label %86, label %81

81:                                               ; preds = %78
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._ftsent, ptr %82, i32 0, i32 6
  %84 = load ptr, ptr %83, align 8, !tbaa !21
  %85 = load i64, ptr %6, align 8, !tbaa !9
  call void @print_removed(ptr noundef %84, i64 noundef %85, i32 noundef 16384)
  br label %86

86:                                               ; preds = %81, %78
  br label %109

87:                                               ; preds = %55
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._ftsent, ptr %88, i32 0, i32 6
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  %91 = load i64, ptr %6, align 8, !tbaa !9
  call void @print_removed(ptr noundef %90, i64 noundef %91, i32 noundef 32768)
  br label %109

92:                                               ; preds = %55
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._ftsent, ptr %93, i32 0, i32 6
  %95 = load ptr, ptr %94, align 8, !tbaa !21
  %96 = load i64, ptr %6, align 8, !tbaa !9
  call void @print_removed(ptr noundef %95, i64 noundef %96, i32 noundef 40960)
  br label %109

97:                                               ; preds = %55
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._ftsent, ptr %99, i32 0, i32 6
  %101 = load ptr, ptr %100, align 8, !tbaa !21
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.25, ptr noundef %101) #5
  store i32 -1, ptr %13, align 4, !tbaa !11
  br label %109

103:                                              ; preds = %55
  %104 = load ptr, ptr @stderr, align 8, !tbaa !5
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._ftsent, ptr %105, i32 0, i32 6
  %107 = load ptr, ptr %106, align 8, !tbaa !21
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef @.str.26, ptr noundef %107) #5
  store i32 -1, ptr %13, align 4, !tbaa !11
  br label %109

109:                                              ; preds = %103, %97, %92, %87, %86, %77
  br label %46, !llvm.loop !22

110:                                              ; preds = %53
  %111 = call ptr @__errno_location() #6
  %112 = load i32, ptr %111, align 4, !tbaa !11
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %110
  store i32 -1, ptr %13, align 4, !tbaa !11
  br label %115

115:                                              ; preds = %114, %110
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = call i32 @fts_close(ptr noundef %116)
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %122, label %119

119:                                              ; preds = %115
  %120 = load i32, ptr %13, align 4, !tbaa !11
  %121 = icmp ne i32 %120, 0
  br label %122

122:                                              ; preds = %119, %115
  %123 = phi i1 [ true, %115 ], [ %121, %119 ]
  %124 = zext i1 %123 to i32
  store i32 %124, ptr %4, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %125

125:                                              ; preds = %122, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %126

126:                                              ; preds = %125, %36
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  %127 = load i32, ptr %4, align 4
  ret i32 %127
}

declare ptr @fts_open(ptr noundef, i32 noundef, ptr noundef) #4

declare ptr @fts_read(ptr noundef) #4

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

declare i32 @fts_close(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 }
attributes #6 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !19, i64 98}
!18 = !{!"_ftsent", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 60, !19, i64 64, !19, i64 66, !10, i64 72, !10, i64 80, !10, i64 88, !19, i64 96, !19, i64 98, !19, i64 100, !19, i64 102, !6, i64 104, !7, i64 112}
!19 = !{!"short", !7, i64 0}
!20 = !{!18, !19, i64 96}
!21 = !{!18, !6, i64 48}
!22 = distinct !{!22, !23}
!23 = !{!"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"

@stderr = external local_unnamed_addr global ptr, align 8
@brief = external local_unnamed_addr global i8, align 1
@verbose = external local_unnamed_addr global i8, align 1
@.str.25 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [32 x i8], align 1

; 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 nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @print_removed(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 2) i32 @list_deleted_files(ptr noundef %0, i64 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = alloca [2 x ptr], align 16
  %5 = load i8, ptr @brief, align 1, !tbaa !5, !range !9, !noundef !10
  %6 = trunc nuw i8 %5 to i1
  %7 = icmp eq i32 %2, 16384
  %8 = and i1 %7, %6
  %9 = load i8, ptr @verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %10 = trunc nuw i8 %9 to i1
  %brmerge = select i1 %10, i1 true, i1 %8
  br i1 %brmerge, label %14, label %11

11:                                               ; preds = %3
  %12 = icmp ne i32 %2, 8192
  %or.cond.not = and i1 %12, %6
  br i1 %or.cond.not, label %59, label %13

13:                                               ; preds = %11
  tail call void @print_removed(ptr noundef %0, i64 noundef %1, i32 noundef 16384)
  br label %59

14:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  store ptr %0, ptr %4, align 16, !tbaa !11
  %15 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr null, ptr %15, align 8, !tbaa !11
  %16 = call ptr @fts_open(ptr noundef nonnull %4, i32 noundef 20, ptr noundef null) #6
  %17 = icmp eq ptr %16, null
  br i1 %17, label %58, label %.preheader

.preheader:                                       ; preds = %14
  %18 = call ptr @fts_read(ptr noundef nonnull %16) #6
  %.not33 = icmp eq ptr %18, null
  br i1 %.not33, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  br i1 %8, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %36
  %19 = phi ptr [ %37, %36 ], [ %18, %.lr.ph ]
  %20 = getelementptr inbounds i8, ptr %19, i64 98
  %21 = load i16, ptr %20, align 2, !tbaa !13
  switch i16 %21, label %._crit_edge.sink.split.loopexit66 [
    i16 1, label %28
    i16 6, label %36
    i16 8, label %25
    i16 12, label %22
    i16 3, label %._crit_edge.sink.split
  ]

22:                                               ; preds = %.lr.ph.split.us
  %23 = getelementptr inbounds i8, ptr %19, i64 48
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  call void @print_removed(ptr noundef %24, i64 noundef %1, i32 noundef 40960)
  br label %36

25:                                               ; preds = %.lr.ph.split.us
  %26 = getelementptr inbounds i8, ptr %19, i64 48
  %27 = load ptr, ptr %26, align 8, !tbaa !18
  call void @print_removed(ptr noundef %27, i64 noundef %1, i32 noundef 32768)
  br label %36

28:                                               ; preds = %.lr.ph.split.us
  %29 = getelementptr inbounds i8, ptr %19, i64 96
  %30 = load i16, ptr %29, align 8, !tbaa !19
  %31 = icmp sgt i16 %30, 0
  br i1 %31, label %32, label %36

32:                                               ; preds = %28
  %33 = getelementptr inbounds i8, ptr %19, i64 48
  %34 = load ptr, ptr %33, align 8, !tbaa !18
  call void @print_removed(ptr noundef %34, i64 noundef %1, i32 noundef 16384)
  %35 = call i32 @fts_set(ptr noundef nonnull %16, ptr noundef nonnull %19, i32 noundef 4) #6
  br label %36

36:                                               ; preds = %.lr.ph.split.us, %32, %28, %25, %22
  %37 = call ptr @fts_read(ptr noundef nonnull %16) #6
  %.not58 = icmp eq ptr %37, null
  br i1 %.not58, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !20

.lr.ph.split:                                     ; preds = %.lr.ph, %45
  %38 = phi ptr [ %46, %45 ], [ %18, %.lr.ph ]
  %39 = getelementptr inbounds i8, ptr %38, i64 98
  %40 = load i16, ptr %39, align 2, !tbaa !13
  switch i16 %40, label %._crit_edge.sink.split.loopexit69 [
    i16 1, label %45
    i16 6, label %.sink.split
    i16 8, label %41
    i16 12, label %42
    i16 3, label %._crit_edge.sink.split
  ]

41:                                               ; preds = %.lr.ph.split
  br label %.sink.split

42:                                               ; preds = %.lr.ph.split
  br label %.sink.split

.sink.split:                                      ; preds = %.lr.ph.split, %41, %42
  %.sink53 = phi i32 [ 40960, %42 ], [ 32768, %41 ], [ 16384, %.lr.ph.split ]
  %43 = getelementptr inbounds i8, ptr %38, i64 48
  %44 = load ptr, ptr %43, align 8, !tbaa !18
  call void @print_removed(ptr noundef %44, i64 noundef %1, i32 noundef %.sink53)
  br label %45

45:                                               ; preds = %.sink.split, %.lr.ph.split
  %46 = call ptr @fts_read(ptr noundef nonnull %16) #6
  %.not57 = icmp eq ptr %46, null
  br i1 %.not57, label %._crit_edge, label %.lr.ph.split, !llvm.loop !20

._crit_edge.sink.split.loopexit66:                ; preds = %.lr.ph.split.us
  br label %._crit_edge.sink.split

._crit_edge.sink.split.loopexit69:                ; preds = %.lr.ph.split
  br label %._crit_edge.sink.split

._crit_edge.sink.split:                           ; preds = %.lr.ph.split, %.lr.ph.split.us, %._crit_edge.sink.split.loopexit69, %._crit_edge.sink.split.loopexit66
  %.lcssa45.sink.sink = phi ptr [ %19, %._crit_edge.sink.split.loopexit66 ], [ %38, %._crit_edge.sink.split.loopexit69 ], [ %19, %.lr.ph.split.us ], [ %38, %.lr.ph.split ]
  %.str.26.sink50.sink = phi ptr [ @.str.26, %._crit_edge.sink.split.loopexit66 ], [ @.str.26, %._crit_edge.sink.split.loopexit69 ], [ @.str.25, %.lr.ph.split.us ], [ @.str.25, %.lr.ph.split ]
  %47 = load ptr, ptr @stderr, align 8, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %.lcssa45.sink.sink, i64 48
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull %.str.26.sink50.sink, ptr noundef %49) #7
  %51 = call ptr @fts_read(ptr noundef nonnull %16) #6
  br label %._crit_edge

._crit_edge:                                      ; preds = %45, %36, %._crit_edge.sink.split, %.preheader
  %.0.lcssa = phi i32 [ 0, %.preheader ], [ -1, %._crit_edge.sink.split ], [ 0, %36 ], [ 0, %45 ]
  %52 = tail call ptr @__errno_location() #8
  %53 = load i32, ptr %52, align 4, !tbaa !22
  %.not = icmp eq i32 %53, 0
  %spec.select = select i1 %.not, i32 %.0.lcssa, i32 -1
  %54 = call i32 @fts_close(ptr noundef nonnull %16) #6
  %55 = or i32 %spec.select, %54
  %56 = icmp ne i32 %55, 0
  %57 = zext i1 %56 to i32
  br label %58

58:                                               ; preds = %14, %._crit_edge
  %.028 = phi i32 [ %57, %._crit_edge ], [ -1, %14 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %59

59:                                               ; preds = %13, %11, %58
  %.129 = phi i32 [ %.028, %58 ], [ 0, %11 ], [ 0, %13 ]
  ret i32 %.129
}

declare ptr @fts_open(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare ptr @fts_read(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @fts_set(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare i32 @fts_close(ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { cold 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 = !{!"_Bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !17, i64 98}
!14 = !{!"_ftsent", !12, i64 0, !12, i64 8, !12, i64 16, !15, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !16, i64 56, !16, i64 60, !17, i64 64, !17, i64 66, !15, i64 72, !15, i64 80, !15, i64 88, !17, i64 96, !17, i64 98, !17, i64 100, !17, i64 102, !12, i64 104, !7, i64 112}
!15 = !{!"long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!14, !12, i64 48}
!19 = !{!14, !17, i64 96}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!16, !16, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass