; LLVM IR from rolinh/dfc :: src/platform (services-linux)

; 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.statvfs = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, [6 x i32] }
%struct.fsmntinfo = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, i32, i64, i64, i64, i64, i64, i64, i64, i64, i32, ptr }
%struct.mntent = type { ptr, ptr, ptr, ptr, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@lflag = external global i32, align 4
@.str.5 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@g_unknown_str = external global [0 x i8], align 1
@Wflag = external global i32, align 4
@g_none_str = external global [0 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [27 x i8], align 1

declare i32 @is_remotefs(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @fetch_info(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.statvfs, align 8
  %7 = alloca %struct.fsmntinfo, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 112, ptr %6) #8
  %8 = call noalias ptr @malloc(i64 noundef 176) #9
  store ptr %8, ptr %3, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %13

10:                                               ; preds = %1
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = call i32 @fputs(ptr noundef @.str.1, ptr noundef %11)
  call void @exit(i32 noundef 1) #10
  unreachable

13:                                               ; preds = %1
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 176, ptr %7) #8
  call void @fmi_init(ptr dead_on_unwind writable sret(%struct.fsmntinfo) align 8 %7)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %7, i64 176, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 176, ptr %7) #8
  %15 = call noalias ptr @fopen(ptr noundef @.str.2, ptr noundef @.str.3)
  store ptr %15, ptr %4, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %13
  call void @perror(ptr noundef @.str.4)
  call void @exit(i32 noundef 1) #10
  unreachable

18:                                               ; preds = %13
  br label %19

19:                                               ; preds = %150, %44, %43, %32, %18
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call ptr @getmntent(ptr noundef %20) #8
  store ptr %21, ptr %5, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %190

23:                                               ; preds = %19
  %24 = load i32, ptr @lflag, align 4, !tbaa !12
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %33

26:                                               ; preds = %23
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.mntent, ptr %27, i32 0, i32 2
  %29 = load ptr, ptr %28, align 8, !tbaa !16
  %30 = call i32 @is_remotefs(ptr noundef %29)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %26
  br label %19, !llvm.loop !18

33:                                               ; preds = %26, %23
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.mntent, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %37 = call i32 @statvfs(ptr noundef %36, ptr noundef %6) #8
  %38 = icmp eq i32 %37, -1
  br i1 %38, label %39, label %50

39:                                               ; preds = %33
  %40 = call ptr @__errno_location() #11
  %41 = load i32, ptr %40, align 4, !tbaa !12
  %42 = icmp eq i32 %41, 13
  br i1 %42, label %43, label %44

43:                                               ; preds = %39
  br label %19, !llvm.loop !18

44:                                               ; preds = %39
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.mntent, ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !20
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str.5, ptr noundef %48) #8
  call void @perror(ptr noundef @.str.6)
  br label %19, !llvm.loop !18

50:                                               ; preds = %33
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.mntent, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !21
  %54 = call noalias ptr @strdup(ptr noundef %53) #8
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.fsmntinfo, ptr %55, i32 0, i32 1
  store ptr %54, ptr %56, align 8, !tbaa !22
  %57 = icmp eq ptr %54, null
  br i1 %57, label %58, label %61

58:                                               ; preds = %50
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.fsmntinfo, ptr %59, i32 0, i32 1
  store ptr @g_unknown_str, ptr %60, align 8, !tbaa !22
  br label %61

61:                                               ; preds = %58, %50
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.mntent, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !20
  %65 = call noalias ptr @strdup(ptr noundef %64) #8
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.fsmntinfo, ptr %66, i32 0, i32 5
  store ptr %65, ptr %67, align 8, !tbaa !24
  %68 = icmp eq ptr %65, null
  br i1 %68, label %69, label %72

69:                                               ; preds = %61
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.fsmntinfo, ptr %70, i32 0, i32 5
  store ptr @g_unknown_str, ptr %71, align 8, !tbaa !24
  br label %72

72:                                               ; preds = %69, %61
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.mntent, ptr %73, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !16
  %76 = call noalias ptr @strdup(ptr noundef %75) #8
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.fsmntinfo, ptr %77, i32 0, i32 3
  store ptr %76, ptr %78, align 8, !tbaa !25
  %79 = icmp eq ptr %76, null
  br i1 %79, label %80, label %83

80:                                               ; preds = %72
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.fsmntinfo, ptr %81, i32 0, i32 3
  store ptr @g_unknown_str, ptr %82, align 8, !tbaa !25
  br label %83

83:                                               ; preds = %80, %72
  %84 = load i32, ptr @Wflag, align 4, !tbaa !12
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %102

86:                                               ; preds = %83
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.fsmntinfo, ptr %87, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !22
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.fsmntinfo, ptr %90, i32 0, i32 0
  store ptr %89, ptr %91, align 8, !tbaa !26
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.fsmntinfo, ptr %92, i32 0, i32 5
  %94 = load ptr, ptr %93, align 8, !tbaa !24
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.fsmntinfo, ptr %95, i32 0, i32 4
  store ptr %94, ptr %96, align 8, !tbaa !27
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.fsmntinfo, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !25
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.fsmntinfo, ptr %100, i32 0, i32 2
  store ptr %99, ptr %101, align 8, !tbaa !28
  br label %139

102:                                              ; preds = %83
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.mntent, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %106 = call ptr @shortenstr(ptr noundef %105, i32 noundef 24)
  %107 = call noalias ptr @strdup(ptr noundef %106) #8
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.fsmntinfo, ptr %108, i32 0, i32 0
  store ptr %107, ptr %109, align 8, !tbaa !26
  %110 = icmp eq ptr %107, null
  br i1 %110, label %111, label %114

111:                                              ; preds = %102
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.fsmntinfo, ptr %112, i32 0, i32 0
  store ptr @g_unknown_str, ptr %113, align 8, !tbaa !26
  br label %114

114:                                              ; preds = %111, %102
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.mntent, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !20
  %118 = call ptr @shortenstr(ptr noundef %117, i32 noundef 24)
  %119 = call noalias ptr @strdup(ptr noundef %118) #8
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.fsmntinfo, ptr %120, i32 0, i32 4
  store ptr %119, ptr %121, align 8, !tbaa !27
  %122 = icmp eq ptr %119, null
  br i1 %122, label %123, label %126

123:                                              ; preds = %114
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.fsmntinfo, ptr %124, i32 0, i32 4
  store ptr @g_unknown_str, ptr %125, align 8, !tbaa !27
  br label %126

126:                                              ; preds = %123, %114
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.mntent, ptr %127, i32 0, i32 2
  %129 = load ptr, ptr %128, align 8, !tbaa !16
  %130 = call ptr @shortenstr(ptr noundef %129, i32 noundef 24)
  %131 = call noalias ptr @strdup(ptr noundef %130) #8
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.fsmntinfo, ptr %132, i32 0, i32 2
  store ptr %131, ptr %133, align 8, !tbaa !28
  %134 = icmp eq ptr %131, null
  br i1 %134, label %135, label %138

135:                                              ; preds = %126
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.fsmntinfo, ptr %136, i32 0, i32 2
  store ptr @g_unknown_str, ptr %137, align 8, !tbaa !28
  br label %138

138:                                              ; preds = %135, %126
  br label %139

139:                                              ; preds = %138, %86
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.mntent, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !29
  %143 = call noalias ptr @strdup(ptr noundef %142) #8
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.fsmntinfo, ptr %144, i32 0, i32 6
  store ptr %143, ptr %145, align 8, !tbaa !30
  %146 = icmp eq ptr %143, null
  br i1 %146, label %147, label %150

147:                                              ; preds = %139
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.fsmntinfo, ptr %148, i32 0, i32 6
  store ptr @g_none_str, ptr %149, align 8, !tbaa !30
  br label %150

150:                                              ; preds = %147, %139
  %151 = getelementptr inbounds %struct.statvfs, ptr %6, i32 0, i32 0
  %152 = load i64, ptr %151, align 8, !tbaa !31
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.fsmntinfo, ptr %153, i32 0, i32 12
  store i64 %152, ptr %154, align 8, !tbaa !33
  %155 = getelementptr inbounds %struct.statvfs, ptr %6, i32 0, i32 1
  %156 = load i64, ptr %155, align 8, !tbaa !34
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.fsmntinfo, ptr %157, i32 0, i32 13
  store i64 %156, ptr %158, align 8, !tbaa !35
  %159 = getelementptr inbounds %struct.statvfs, ptr %6, i32 0, i32 2
  %160 = load i64, ptr %159, align 8, !tbaa !36
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.fsmntinfo, ptr %161, i32 0, i32 14
  store i64 %160, ptr %162, align 8, !tbaa !37
  %163 = getelementptr inbounds %struct.statvfs, ptr %6, i32 0, i32 3
  %164 = load i64, ptr %163, align 8, !tbaa !38
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.fsmntinfo, ptr %165, i32 0, i32 15
  store i64 %164, ptr %166, align 8, !tbaa !39
  %167 = getelementptr inbounds %struct.statvfs, ptr %6, i32 0, i32 4
  %168 = load i64, ptr %167, align 8, !tbaa !40
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.fsmntinfo, ptr %169, i32 0, i32 16
  store i64 %168, ptr %170, align 8, !tbaa !41
  %171 = getelementptr inbounds %struct.statvfs, ptr %6, i32 0, i32 5
  %172 = load i64, ptr %171, align 8, !tbaa !42
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.fsmntinfo, ptr %173, i32 0, i32 17
  store i64 %172, ptr %174, align 8, !tbaa !43
  %175 = getelementptr inbounds %struct.statvfs, ptr %6, i32 0, i32 6
  %176 = load i64, ptr %175, align 8, !tbaa !44
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.fsmntinfo, ptr %177, i32 0, i32 18
  store i64 %176, ptr %178, align 8, !tbaa !45
  %179 = getelementptr inbounds %struct.statvfs, ptr %6, i32 0, i32 7
  %180 = load i64, ptr %179, align 8, !tbaa !46
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.fsmntinfo, ptr %181, i32 0, i32 19
  store i64 %180, ptr %182, align 8, !tbaa !47
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  call void @compute_fs_stats(ptr noundef %183)
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.fsmntinfo, ptr %184, i32 0, i32 21
  store ptr null, ptr %185, align 8, !tbaa !48
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = call i32 @enqueue(ptr noundef %186, ptr noundef byval(%struct.fsmntinfo) align 8 %187)
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  call void @update_maxwidth(ptr noundef %189)
  br label %19, !llvm.loop !18

190:                                              ; preds = %19
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = call i32 @fclose(ptr noundef %191)
  %193 = icmp eq i32 %192, -1
  br i1 %193, label %194, label %195

194:                                              ; preds = %190
  call void @perror(ptr noundef @.str.7)
  br label %195

195:                                              ; preds = %194, %190
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %196) #8
  call void @llvm.lifetime.end.p0(i64 112, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret void
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare i32 @fputs(ptr noundef, ptr noundef) #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare void @fmi_init(ptr dead_on_unwind writable sret(%struct.fsmntinfo) align 8) #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) #5

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

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

declare void @perror(ptr noundef) #0

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

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

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

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

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #6

declare ptr @shortenstr(ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @compute_fs_stats(ptr noundef) #1

declare i32 @enqueue(ptr noundef, ptr noundef byval(%struct.fsmntinfo) align 8) #0

declare void @update_maxwidth(ptr noundef) #0

declare i32 @fclose(ptr noundef) #0

; Function Attrs: nounwind
declare void @free(ptr 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind allocsize(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 = { noreturn 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 8, !10, i64 64, i64 8, !10, i64 72, i64 8, !10, i64 80, i64 8, !10, i64 88, i64 4, !12, i64 96, i64 8, !14, i64 104, i64 8, !14, i64 112, i64 8, !14, i64 120, i64 8, !14, i64 128, i64 8, !14, i64 136, i64 8, !14, i64 144, i64 8, !14, i64 152, i64 8, !14, i64 160, i64 4, !12, i64 168, i64 8, !5}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 16}
!17 = !{!"mntent", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!17, !6, i64 8}
!21 = !{!17, !6, i64 0}
!22 = !{!23, !6, i64 8}
!23 = !{!"fsmntinfo", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !13, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152, !13, i64 160, !6, i64 168}
!24 = !{!23, !6, i64 40}
!25 = !{!23, !6, i64 24}
!26 = !{!23, !6, i64 0}
!27 = !{!23, !6, i64 32}
!28 = !{!23, !6, i64 16}
!29 = !{!17, !6, i64 24}
!30 = !{!23, !6, i64 48}
!31 = !{!32, !15, i64 0}
!32 = !{!"statvfs", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !7, i64 88}
!33 = !{!23, !15, i64 96}
!34 = !{!32, !15, i64 8}
!35 = !{!23, !15, i64 104}
!36 = !{!32, !15, i64 16}
!37 = !{!23, !15, i64 112}
!38 = !{!32, !15, i64 24}
!39 = !{!23, !15, i64 120}
!40 = !{!32, !15, i64 32}
!41 = !{!23, !15, i64 128}
!42 = !{!32, !15, i64 40}
!43 = !{!23, !15, i64 136}
!44 = !{!32, !15, i64 48}
!45 = !{!23, !15, i64 144}
!46 = !{!32, !15, i64 56}
!47 = !{!23, !15, i64 152}
!48 = !{!23, !6, i64 168}


; 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.statvfs = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, [6 x i32] }
%struct.fsmntinfo = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, i32, i64, i64, i64, i64, i64, i64, i64, i64, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@lflag = external local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@g_unknown_str = external global [0 x i8], align 1
@Wflag = external local_unnamed_addr global i32, align 4
@g_none_str = external global [0 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [27 x i8], align 1

declare i32 @is_remotefs(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @fetch_info(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca %struct.statvfs, align 16
  %3 = alloca %struct.fsmntinfo, align 8
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %2) #11
  %4 = tail call noalias dereferenceable_or_null(176) ptr @malloc(i64 noundef 176) #12
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %9

6:                                                ; preds = %1
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 @fputs(ptr noundef nonnull @.str.1, ptr noundef %7) #13
  tail call void @exit(i32 noundef 1) #14
  unreachable

9:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %3) #11
  call void @fmi_init(ptr dead_on_unwind nonnull writable sret(%struct.fsmntinfo) align 8 %3) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(176) %4, ptr noundef nonnull align 8 dereferenceable(176) %3, i64 176, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %3) #11
  %10 = call noalias ptr @fopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3)
  %11 = icmp eq ptr %10, null
  br i1 %11, label %27, label %.preheader

.preheader:                                       ; preds = %9
  %12 = call ptr @getmntent(ptr noundef nonnull %10) #11
  %.not58 = icmp eq ptr %12, null
  br i1 %.not58, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %13 = getelementptr inbounds i8, ptr %4, i64 8
  %14 = getelementptr inbounds i8, ptr %4, i64 40
  %15 = getelementptr inbounds i8, ptr %4, i64 24
  %16 = getelementptr inbounds i8, ptr %4, i64 32
  %17 = getelementptr inbounds i8, ptr %4, i64 16
  %18 = getelementptr inbounds i8, ptr %4, i64 48
  %19 = getelementptr inbounds i8, ptr %4, i64 96
  %20 = getelementptr inbounds i8, ptr %2, i64 16
  %21 = getelementptr inbounds i8, ptr %4, i64 112
  %22 = getelementptr inbounds i8, ptr %2, i64 32
  %23 = getelementptr inbounds i8, ptr %4, i64 128
  %24 = getelementptr inbounds i8, ptr %2, i64 48
  %25 = getelementptr inbounds i8, ptr %4, i64 144
  %26 = getelementptr inbounds i8, ptr %4, i64 168
  br label %28

27:                                               ; preds = %9
  call void @perror(ptr noundef nonnull @.str.4) #13
  call void @exit(i32 noundef 1) #14
  unreachable

28:                                               ; preds = %.lr.ph, %.backedge
  %29 = phi ptr [ %12, %.lr.ph ], [ %48, %.backedge ]
  %30 = load i32, ptr @lflag, align 4, !tbaa !12
  %.not48 = icmp eq i32 %30, 0
  br i1 %.not48, label %35, label %31

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %29, i64 16
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  %34 = call i32 @is_remotefs(ptr noundef %33) #11
  %.not49 = icmp eq i32 %34, 0
  br i1 %.not49, label %35, label %.backedge

35:                                               ; preds = %31, %28
  %36 = getelementptr inbounds i8, ptr %29, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %38 = call i32 @statvfs(ptr noundef %37, ptr noundef nonnull %2) #11
  %39 = icmp eq i32 %38, -1
  br i1 %39, label %40, label %49

40:                                               ; preds = %35
  %41 = tail call ptr @__errno_location() #15
  %42 = load i32, ptr %41, align 4, !tbaa !12
  %43 = icmp eq i32 %42, 13
  br i1 %43, label %.backedge, label %44

44:                                               ; preds = %40
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = load ptr, ptr %36, align 8, !tbaa !18
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.5, ptr noundef %46) #16
  call void @perror(ptr noundef nonnull @.str.6) #13
  br label %.backedge

.backedge:                                        ; preds = %44, %74, %31, %40
  %48 = call ptr @getmntent(ptr noundef nonnull %10) #11
  %.not = icmp eq ptr %48, null
  br i1 %.not, label %._crit_edge, label %28, !llvm.loop !19

49:                                               ; preds = %35
  %50 = load ptr, ptr %29, align 8, !tbaa !21
  %51 = call noalias ptr @strdup(ptr noundef %50) #11
  %52 = icmp eq ptr %51, null
  %spec.select = select i1 %52, ptr @g_unknown_str, ptr %51
  store ptr %spec.select, ptr %13, align 8, !tbaa !22
  %53 = load ptr, ptr %36, align 8, !tbaa !18
  %54 = call noalias ptr @strdup(ptr noundef %53) #11
  %55 = icmp eq ptr %54, null
  %storemerge50 = select i1 %55, ptr @g_unknown_str, ptr %54
  store ptr %storemerge50, ptr %14, align 8, !tbaa !24
  %56 = getelementptr inbounds i8, ptr %29, i64 16
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  %58 = call noalias ptr @strdup(ptr noundef %57) #11
  %59 = icmp eq ptr %58, null
  %storemerge51 = select i1 %59, ptr @g_unknown_str, ptr %58
  store ptr %storemerge51, ptr %15, align 8, !tbaa !25
  %60 = load i32, ptr @Wflag, align 4, !tbaa !12
  %.not52 = icmp eq i32 %60, 0
  br i1 %.not52, label %62, label %61

61:                                               ; preds = %49
  store ptr %spec.select, ptr %4, align 8, !tbaa !26
  store ptr %storemerge50, ptr %16, align 8, !tbaa !27
  br label %74

62:                                               ; preds = %49
  %63 = call ptr @shortenstr(ptr noundef %50, i32 noundef 24) #11
  %64 = call noalias ptr @strdup(ptr noundef %63) #11
  %65 = icmp eq ptr %64, null
  %spec.select56 = select i1 %65, ptr @g_unknown_str, ptr %64
  store ptr %spec.select56, ptr %4, align 8, !tbaa !26
  %66 = load ptr, ptr %36, align 8, !tbaa !18
  %67 = call ptr @shortenstr(ptr noundef %66, i32 noundef 24) #11
  %68 = call noalias ptr @strdup(ptr noundef %67) #11
  %69 = icmp eq ptr %68, null
  %storemerge54 = select i1 %69, ptr @g_unknown_str, ptr %68
  store ptr %storemerge54, ptr %16, align 8, !tbaa !27
  %70 = load ptr, ptr %56, align 8, !tbaa !16
  %71 = call ptr @shortenstr(ptr noundef %70, i32 noundef 24) #11
  %72 = call noalias ptr @strdup(ptr noundef %71) #11
  %73 = icmp eq ptr %72, null
  %spec.store.select = select i1 %73, ptr @g_unknown_str, ptr %72
  br label %74

74:                                               ; preds = %62, %61
  %storemerge = phi ptr [ %storemerge51, %61 ], [ %spec.store.select, %62 ]
  store ptr %storemerge, ptr %17, align 8
  %75 = getelementptr inbounds i8, ptr %29, i64 24
  %76 = load ptr, ptr %75, align 8, !tbaa !28
  %77 = call noalias ptr @strdup(ptr noundef %76) #11
  %78 = icmp eq ptr %77, null
  %spec.select57 = select i1 %78, ptr @g_none_str, ptr %77
  store ptr %spec.select57, ptr %18, align 8, !tbaa !29
  %79 = load <2 x i64>, ptr %2, align 16, !tbaa !14
  store <2 x i64> %79, ptr %19, align 8, !tbaa !14
  %80 = load <2 x i64>, ptr %20, align 16, !tbaa !14
  store <2 x i64> %80, ptr %21, align 8, !tbaa !14
  %81 = load <2 x i64>, ptr %22, align 16, !tbaa !14
  store <2 x i64> %81, ptr %23, align 8, !tbaa !14
  %82 = load <2 x i64>, ptr %24, align 16, !tbaa !14
  store <2 x i64> %82, ptr %25, align 8, !tbaa !14
  call void @compute_fs_stats(ptr noundef nonnull %4)
  store ptr null, ptr %26, align 8, !tbaa !30
  %83 = call i32 @enqueue(ptr noundef %0, ptr noundef nonnull byval(%struct.fsmntinfo) align 8 %4) #11
  call void @update_maxwidth(ptr noundef nonnull %4) #11
  br label %.backedge

._crit_edge:                                      ; preds = %.backedge, %.preheader
  %84 = call i32 @fclose(ptr noundef nonnull %10)
  %85 = icmp eq i32 %84, -1
  br i1 %85, label %86, label %87

86:                                               ; preds = %._crit_edge
  call void @perror(ptr noundef nonnull @.str.7) #13
  br label %87

87:                                               ; preds = %86, %._crit_edge
  call void @free(ptr noundef %4) #11
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %2) #11
  ret void
}

; 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fputs(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

declare void @fmi_init(ptr dead_on_unwind writable sret(%struct.fsmntinfo) align 8) local_unnamed_addr #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) #6

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

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

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef i32 @statvfs(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #9

declare ptr @shortenstr(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @compute_fs_stats(ptr noundef) local_unnamed_addr #1

declare i32 @enqueue(ptr noundef, ptr noundef byval(%struct.fsmntinfo) align 8) local_unnamed_addr #0

declare void @update_maxwidth(ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #4

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { noreturn 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #9 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nounwind }
attributes #12 = { nounwind allocsize(0) }
attributes #13 = { cold }
attributes #14 = { noreturn nounwind }
attributes #15 = { nounwind willreturn memory(none) }
attributes #16 = { cold nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 8, !10, i64 64, i64 8, !10, i64 72, i64 8, !10, i64 80, i64 8, !10, i64 88, i64 4, !12, i64 96, i64 8, !14, i64 104, i64 8, !14, i64 112, i64 8, !14, i64 120, i64 8, !14, i64 128, i64 8, !14, i64 136, i64 8, !14, i64 144, i64 8, !14, i64 152, i64 8, !14, i64 160, i64 4, !12, i64 168, i64 8, !5}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 16}
!17 = !{!"mntent", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!17, !6, i64 0}
!22 = !{!23, !6, i64 8}
!23 = !{!"fsmntinfo", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !13, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152, !13, i64 160, !6, i64 168}
!24 = !{!23, !6, i64 40}
!25 = !{!23, !6, i64 24}
!26 = !{!23, !6, i64 0}
!27 = !{!23, !6, i64 32}
!28 = !{!17, !6, i64 24}
!29 = !{!23, !6, i64 48}
!30 = !{!23, !6, i64 168}


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