; LLVM IR from jspd-group/pegit :: src (stage)

; 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.stage_stats = type { i64, i64, i64, i64, i64 }
%struct.stage_options = type { i32, i32, i32, i32, i64, i8, i8, i32, ptr, ptr, ptr, %struct.pack_file_cache }
%struct.pack_file_cache = type { ptr, %struct.strbuf }
%struct.strbuf = type { i64, i64, ptr }
%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }
%struct.node = type { ptr, i32, ptr }
%struct.file_list = type { %struct.strbuf, %struct.strbuf, [20 x i16], i8, i32, %struct.stat, ptr }

@stats = external dso_local global %struct.stage_stats, align 8
@opts = external dso_local global %struct.stage_options, align 8
@stdout = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [3 x i8], align 1
@count = external global i64, align 8
@root = external global ptr, align 8
@.str.32 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [9 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

declare void @strbuf_init(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @file_list_add(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @is_marked_as_ignored(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @strbuf_addstr(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i32 @stat(ptr noundef, ptr noundef) #3

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

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

declare void @print_humanised_bytes(i64 noundef) #1

declare i32 @set_timer(i32 noundef) #1

declare i32 @got_signal(...) #1

declare i32 @fflush(ptr noundef) #1

declare void @reset_signal(...) #1

declare void @stop_timer(...) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @detect_and_add_files(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.stat, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = call i32 @status(ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %12 = load ptr, ptr @root, align 8, !tbaa !5
  store ptr %12, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 144, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store i64 0, ptr %9, align 8, !tbaa !9
  %13 = call i32 @set_timer(i32 noundef 300)
  br label %14

14:                                               ; preds = %238, %59, %1
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %242

17:                                               ; preds = %14
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.node, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 8, !tbaa !13
  %21 = icmp eq i32 %20, 2048
  br i1 %21, label %32, label %22

22:                                               ; preds = %17
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 1
  %25 = load i32, ptr %24, align 8, !tbaa !13
  %26 = icmp eq i32 %25, 256
  br i1 %26, label %32, label %27

27:                                               ; preds = %22
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.node, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !13
  %31 = icmp eq i32 %30, 512
  br i1 %31, label %32, label %238

32:                                               ; preds = %27, %22, %17
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.node, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  %36 = call zeroext i1 @is_marked_as_ignored(ptr noundef %35)
  br i1 %36, label %238, label %37

37:                                               ; preds = %32
  %38 = call noalias ptr @malloc(i64 noundef 248) #9
  store ptr %38, ptr %3, align 8, !tbaa !5
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.file_list, ptr %39, i32 0, i32 0
  call void @strbuf_init(ptr noundef %40, i64 noundef 0)
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.file_list, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.node, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !15
  call void @strbuf_addstr(ptr noundef %42, ptr noundef %45)
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.file_list, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds %struct.strbuf, ptr %47, i32 0, i32 2
  %49 = load ptr, ptr %48, align 8, !tbaa !16
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.file_list, ptr %50, i32 0, i32 5
  %52 = call i32 @stat(ptr noundef %49, ptr noundef %51) #8
  %53 = icmp slt i32 %52, 0
  br i1 %53, label %54, label %91

54:                                               ; preds = %37
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.node, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 8, !tbaa !13
  %58 = icmp eq i32 %57, 2048
  br i1 %58, label %59, label %70

59:                                               ; preds = %54
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.file_list, ptr %60, i32 0, i32 4
  store i32 2048, ptr %61, align 4, !tbaa !22
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.file_list, ptr %62, i32 0, i32 6
  store ptr null, ptr %63, align 8, !tbaa !23
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.file_list, ptr %64, i32 0, i32 1
  call void @strbuf_init(ptr noundef %65, i64 noundef 0)
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  call void @file_list_add(ptr noundef %66)
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.node, ptr %67, i32 0, i32 2
  %69 = load ptr, ptr %68, align 8, !tbaa !24
  store ptr %69, ptr %4, align 8, !tbaa !5
  br label %14, !llvm.loop !25

70:                                               ; preds = %54
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.20) #8
  %74 = load ptr, ptr @stderr, align 8, !tbaa !5
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.21) #8
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.22) #8
  %78 = load ptr, ptr @stderr, align 8, !tbaa !5
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef @.str.23) #8
  %80 = load ptr, ptr @stderr, align 8, !tbaa !5
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.file_list, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds %struct.strbuf, ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !16
  %85 = call ptr @__errno_location() #10
  %86 = load i32, ptr %85, align 4, !tbaa !11
  %87 = call ptr @strerror(i32 noundef %86) #8
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef @.str.32, ptr noundef %84, ptr noundef %87) #8
  call void @exit(i32 noundef 1) #11
  unreachable

89:                                               ; No predecessors!
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90, %37
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.file_list, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.strbuf, ptr %93, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !16
  %96 = call i32 (ptr, i32, ...) @open(ptr noundef %95, i32 noundef 0)
  store i32 %96, ptr %7, align 4, !tbaa !11
  %97 = load i32, ptr %7, align 4, !tbaa !11
  %98 = icmp slt i32 %97, 0
  br i1 %98, label %99, label %120

99:                                               ; preds = %91
  br label %100

100:                                              ; preds = %99
  %101 = load ptr, ptr @stderr, align 8, !tbaa !5
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.20) #8
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.21) #8
  %105 = load ptr, ptr @stderr, align 8, !tbaa !5
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str.22) #8
  %107 = load ptr, ptr @stderr, align 8, !tbaa !5
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str.23) #8
  %109 = load ptr, ptr @stderr, align 8, !tbaa !5
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.file_list, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %struct.strbuf, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !16
  %114 = call ptr @__errno_location() #10
  %115 = load i32, ptr %114, align 4, !tbaa !11
  %116 = call ptr @strerror(i32 noundef %115) #8
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef @.str.33, ptr noundef %113, ptr noundef %116) #8
  call void @exit(i32 noundef 1) #11
  unreachable

118:                                              ; No predecessors!
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119, %91
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.file_list, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.file_list, ptr %123, i32 0, i32 5
  %125 = getelementptr inbounds %struct.stat, ptr %124, i32 0, i32 8
  %126 = load i64, ptr %125, align 8, !tbaa !27
  call void @strbuf_init(ptr noundef %122, i64 noundef %126)
  %127 = load i32, ptr %7, align 4, !tbaa !11
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.file_list, ptr %128, i32 0, i32 1
  %130 = getelementptr inbounds %struct.strbuf, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %130, align 8, !tbaa !28
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.file_list, ptr %132, i32 0, i32 5
  %134 = getelementptr inbounds %struct.stat, ptr %133, i32 0, i32 8
  %135 = load i64, ptr %134, align 8, !tbaa !27
  %136 = call i64 @read(i32 noundef %127, ptr noundef %131, i64 noundef %135)
  store i64 %136, ptr %9, align 8, !tbaa !9
  %137 = load i64, ptr %9, align 8, !tbaa !9
  %138 = icmp slt i64 %137, 0
  br i1 %138, label %139, label %154

139:                                              ; preds = %120
  br label %140

140:                                              ; preds = %139
  %141 = load ptr, ptr @stderr, align 8, !tbaa !5
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef @.str.20) #8
  %143 = load ptr, ptr @stderr, align 8, !tbaa !5
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str.21) #8
  %145 = load ptr, ptr @stderr, align 8, !tbaa !5
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %145, ptr noundef @.str.22) #8
  %147 = load ptr, ptr @stderr, align 8, !tbaa !5
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef @.str.23) #8
  %149 = load ptr, ptr @stderr, align 8, !tbaa !5
  %150 = load i64, ptr %9, align 8, !tbaa !9
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef @.str.34, i64 noundef %150) #8
  call void @exit(i32 noundef 1) #11
  unreachable

152:                                              ; No predecessors!
  br label %153

153:                                              ; preds = %152
  br label %154

154:                                              ; preds = %153, %120
  %155 = load i64, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 4), align 8, !tbaa !29
  store i64 %155, ptr %6, align 8, !tbaa !9
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.file_list, ptr %156, i32 0, i32 5
  %158 = getelementptr inbounds %struct.stat, ptr %157, i32 0, i32 8
  %159 = load i64, ptr %158, align 8, !tbaa !27
  %160 = load i64, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 4), align 8, !tbaa !29
  %161 = add i64 %160, %159
  store i64 %161, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 4), align 8, !tbaa !29
  %162 = load i64, ptr getelementptr inbounds (%struct.stage_stats, ptr @stats, i32 0, i32 4), align 8, !tbaa !32
  %163 = add i64 %162, 1
  store i64 %163, ptr getelementptr inbounds (%struct.stage_stats, ptr @stats, i32 0, i32 4), align 8, !tbaa !32
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.file_list, ptr %164, i32 0, i32 4
  %166 = load i32, ptr %165, align 4, !tbaa !22
  %167 = icmp eq i32 %166, 256
  br i1 %167, label %168, label %171

168:                                              ; preds = %154
  %169 = load i64, ptr @stats, align 8, !tbaa !34
  %170 = add i64 %169, 1
  store i64 %170, ptr @stats, align 8, !tbaa !34
  br label %174

171:                                              ; preds = %154
  %172 = load i64, ptr getelementptr inbounds (%struct.stage_stats, ptr @stats, i32 0, i32 1), align 8, !tbaa !35
  %173 = add i64 %172, 1
  store i64 %173, ptr getelementptr inbounds (%struct.stage_stats, ptr @stats, i32 0, i32 1), align 8, !tbaa !35
  br label %174

174:                                              ; preds = %171, %168
  %175 = load i64, ptr %9, align 8, !tbaa !9
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.file_list, ptr %176, i32 0, i32 1
  %178 = getelementptr inbounds %struct.strbuf, ptr %177, i32 0, i32 1
  store i64 %175, ptr %178, align 8, !tbaa !36
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.node, ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 8, !tbaa !13
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.file_list, ptr %182, i32 0, i32 4
  store i32 %181, ptr %183, align 4, !tbaa !22
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.file_list, ptr %184, i32 0, i32 6
  store ptr null, ptr %185, align 8, !tbaa !23
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  call void @file_list_add(ptr noundef %186)
  %187 = load i32, ptr %7, align 4, !tbaa !11
  %188 = call i32 @close(i32 noundef %187)
  %189 = icmp slt i32 %188, 0
  br i1 %189, label %190, label %211

190:                                              ; preds = %174
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr @stderr, align 8, !tbaa !5
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef @.str.20) #8
  %194 = load ptr, ptr @stderr, align 8, !tbaa !5
  %195 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.21) #8
  %196 = load ptr, ptr @stderr, align 8, !tbaa !5
  %197 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %196, ptr noundef @.str.22) #8
  %198 = load ptr, ptr @stderr, align 8, !tbaa !5
  %199 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %198, ptr noundef @.str.23) #8
  %200 = load ptr, ptr @stderr, align 8, !tbaa !5
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.file_list, ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds %struct.strbuf, ptr %202, i32 0, i32 2
  %204 = load ptr, ptr %203, align 8, !tbaa !16
  %205 = call ptr @__errno_location() #10
  %206 = load i32, ptr %205, align 4, !tbaa !11
  %207 = call ptr @strerror(i32 noundef %206) #8
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.35, ptr noundef %204, ptr noundef %207) #8
  call void @exit(i32 noundef 1) #11
  unreachable

209:                                              ; No predecessors!
  br label %210

210:                                              ; preds = %209
  br label %211

211:                                              ; preds = %210, %174
  %212 = load i32, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 7), align 4, !tbaa !37
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %228

214:                                              ; preds = %211
  %215 = call i32 (...) @got_signal()
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %217, label %228

217:                                              ; preds = %214
  %218 = load i32, ptr %8, align 4, !tbaa !11
  %219 = icmp ne i32 %218, 0
  br i1 %219, label %220, label %228

220:                                              ; preds = %217
  %221 = load i64, ptr getelementptr inbounds (%struct.stage_stats, ptr @stats, i32 0, i32 4), align 8, !tbaa !32
  %222 = load i64, ptr @count, align 8, !tbaa !9
  %223 = call i32 (ptr, ...) @printf(ptr noundef @.str.36, i64 noundef %221, i64 noundef %222)
  %224 = load i64, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 4), align 8, !tbaa !29
  call void @print_humanised_bytes(i64 noundef %224)
  %225 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %226 = load ptr, ptr @stdout, align 8, !tbaa !5
  %227 = call i32 @fflush(ptr noundef %226)
  call void (...) @reset_signal()
  br label %228

228:                                              ; preds = %220, %217, %214, %211
  %229 = load i32, ptr %8, align 4, !tbaa !11
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %237, label %231

231:                                              ; preds = %228
  %232 = call i32 (...) @got_signal()
  %233 = icmp ne i32 %232, 0
  br i1 %233, label %234, label %237

234:                                              ; preds = %231
  %235 = load i32, ptr %8, align 4, !tbaa !11
  %236 = add i32 %235, 1
  store i32 %236, ptr %8, align 4, !tbaa !11
  store i32 1, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 7), align 4, !tbaa !37
  br label %237

237:                                              ; preds = %234, %231, %228
  br label %238

238:                                              ; preds = %237, %32, %27
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.node, ptr %239, i32 0, i32 2
  %241 = load ptr, ptr %240, align 8, !tbaa !24
  store ptr %241, ptr %4, align 8, !tbaa !5
  br label %14, !llvm.loop !25

242:                                              ; preds = %14
  %243 = load i32, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 7), align 4, !tbaa !37
  %244 = icmp ne i32 %243, 0
  br i1 %244, label %245, label %256

245:                                              ; preds = %242
  %246 = load i32, ptr %8, align 4, !tbaa !11
  %247 = icmp ne i32 %246, 0
  br i1 %247, label %248, label %256

248:                                              ; preds = %245
  %249 = load i64, ptr getelementptr inbounds (%struct.stage_stats, ptr @stats, i32 0, i32 4), align 8, !tbaa !32
  %250 = load i64, ptr @count, align 8, !tbaa !9
  %251 = call i32 (ptr, ...) @printf(ptr noundef @.str.36, i64 noundef %249, i64 noundef %250)
  %252 = load i64, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 4), align 8, !tbaa !29
  call void @print_humanised_bytes(i64 noundef %252)
  %253 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %254 = load ptr, ptr @stdout, align 8, !tbaa !5
  %255 = call i32 @fflush(ptr noundef %254)
  call void (...) @reset_signal()
  br label %256

256:                                              ; preds = %248, %245, %242
  call void (...) @stop_timer()
  %257 = load i32, ptr getelementptr inbounds (%struct.stage_options, ptr @opts, i32 0, i32 7), align 4, !tbaa !37
  %258 = icmp ne i32 %257, 0
  br i1 %258, label %259, label %264

259:                                              ; preds = %256
  %260 = load i32, ptr %8, align 4, !tbaa !11
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %262, label %264

262:                                              ; preds = %259
  %263 = call i32 (ptr, ...) @printf(ptr noundef @.str.38)
  br label %264

264:                                              ; preds = %262, %259, %256
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 144, 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 i32 0
}

declare i32 @status(ptr noundef) #1

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

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

declare i32 @open(ptr noundef, i32 noundef, ...) #1

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #1

declare i32 @close(i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = { 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 #4 = { inlinehint 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 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 #6 = { 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 #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 = { nounwind willreturn memory(none) }
attributes #11 = { noreturn 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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"node", !6, i64 0, !12, i64 8, !6, i64 16}
!15 = !{!14, !6, i64 0}
!16 = !{!17, !6, i64 16}
!17 = !{!"file_list", !18, i64 0, !18, i64 24, !7, i64 48, !19, i64 88, !12, i64 92, !20, i64 96, !6, i64 240}
!18 = !{!"strbuf", !10, i64 0, !10, i64 8, !6, i64 16}
!19 = !{!"_Bool", !7, i64 0}
!20 = !{!"stat", !10, i64 0, !10, i64 8, !10, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !21, i64 72, !21, i64 88, !21, i64 104, !7, i64 120}
!21 = !{!"timespec", !10, i64 0, !10, i64 8}
!22 = !{!17, !12, i64 92}
!23 = !{!17, !6, i64 240}
!24 = !{!14, !6, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!17, !10, i64 144}
!28 = !{!17, !6, i64 40}
!29 = !{!30, !10, i64 16}
!30 = !{!"stage_options", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !10, i64 16, !19, i64 24, !19, i64 25, !12, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !31, i64 56}
!31 = !{!"pack_file_cache", !6, i64 0, !18, i64 8}
!32 = !{!33, !10, i64 32}
!33 = !{!"stage_stats", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!34 = !{!33, !10, i64 0}
!35 = !{!33, !10, i64 8}
!36 = !{!17, !10, i64 32}
!37 = !{!30, !12, i64 28}


; 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.stage_stats = type { i64, i64, i64, i64, i64 }
%struct.stage_options = type { i32, i32, i32, i32, i64, i8, i8, i32, ptr, ptr, ptr, %struct.pack_file_cache }
%struct.pack_file_cache = type { ptr, %struct.strbuf }
%struct.strbuf = type { i64, i64, ptr }

@stats = external dso_local local_unnamed_addr global %struct.stage_stats, align 8
@opts = external dso_local local_unnamed_addr global %struct.stage_options, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [3 x i8], align 1
@count = external local_unnamed_addr global i64, align 8
@root = external local_unnamed_addr global ptr, align 8
@.str.32 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [9 x i8], align 1

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

declare void @strbuf_init(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @is_marked_as_ignored(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @strbuf_addstr(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

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

declare void @print_humanised_bytes(i64 noundef) local_unnamed_addr #1

declare i32 @set_timer(i32 noundef) local_unnamed_addr #1

declare i32 @got_signal(...) local_unnamed_addr #1

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

declare void @reset_signal(...) local_unnamed_addr #1

declare void @stop_timer(...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @detect_and_add_files(ptr noundef %0) local_unnamed_addr #2 {
  %2 = tail call i32 @status(ptr noundef %0) #9
  %3 = load ptr, ptr @root, align 8, !tbaa !5
  %4 = tail call i32 @set_timer(i32 noundef 300) #9
  %.not7680 = icmp eq ptr %3, null
  br i1 %.not7680, label %.outer._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %1, %.outer
  %.0.ph82 = phi i32 [ %.1, %.outer ], [ 0, %1 ]
  %.048.ph81 = phi ptr [ %135, %.outer ], [ %3, %1 ]
  br label %5

5:                                                ; preds = %.lr.ph, %22
  %.04877 = phi ptr [ %.048.ph81, %.lr.ph ], [ %27, %22 ]
  %6 = getelementptr inbounds i8, ptr %.04877, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !9
  switch i32 %7, label %.outer [
    i32 2048, label %8
    i32 256, label %8
    i32 512, label %8
  ]

8:                                                ; preds = %5, %5, %5
  %9 = load ptr, ptr %.04877, align 8, !tbaa !12
  %10 = tail call zeroext i1 @is_marked_as_ignored(ptr noundef %9)
  br i1 %10, label %.outer, label %11

11:                                               ; preds = %8
  %12 = tail call noalias dereferenceable_or_null(248) ptr @malloc(i64 noundef 248) #10
  tail call void @strbuf_init(ptr noundef %12, i64 noundef 0) #9
  %13 = load ptr, ptr %.04877, align 8, !tbaa !12
  tail call void @strbuf_addstr(ptr noundef %12, ptr noundef %13)
  %14 = getelementptr inbounds i8, ptr %12, i64 16
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %12, i64 96
  %17 = tail call i32 @stat(ptr noundef %15, ptr noundef nonnull %16) #9
  %18 = icmp slt i32 %17, 0
  br i1 %18, label %19, label %44

19:                                               ; preds = %11
  %20 = load i32, ptr %6, align 8, !tbaa !9
  %21 = icmp eq i32 %20, 2048
  br i1 %21, label %22, label %28

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %12, i64 92
  store i32 2048, ptr %23, align 4, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %12, i64 240
  store ptr null, ptr %24, align 8, !tbaa !21
  %25 = getelementptr inbounds i8, ptr %12, i64 24
  tail call void @strbuf_init(ptr noundef nonnull %25, i64 noundef 0) #9
  tail call void @file_list_add(ptr noundef nonnull %12)
  %26 = getelementptr inbounds i8, ptr %.04877, i64 16
  %27 = load ptr, ptr %26, align 8, !tbaa !22
  %.not = icmp eq ptr %27, null
  br i1 %.not, label %.outer._crit_edge, label %5, !llvm.loop !23

28:                                               ; preds = %19
  %29 = getelementptr inbounds i8, ptr %12, i64 16
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.20) #11
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.21) #11
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.22) #11
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.23) #11
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = load ptr, ptr %29, align 8, !tbaa !13
  %40 = tail call ptr @__errno_location() #12
  %41 = load i32, ptr %40, align 4, !tbaa !25
  %42 = tail call ptr @strerror(i32 noundef %41) #9
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.32, ptr noundef %39, ptr noundef %42) #11
  tail call void @exit(i32 noundef 1) #13
  unreachable

44:                                               ; preds = %11
  %45 = getelementptr inbounds i8, ptr %12, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = tail call i32 (ptr, i32, ...) @open(ptr noundef %46, i32 noundef 0) #9
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %65

49:                                               ; preds = %44
  %50 = getelementptr inbounds i8, ptr %12, i64 16
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.20) #11
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.21) #11
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.22) #11
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.23) #11
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = load ptr, ptr %50, align 8, !tbaa !13
  %61 = tail call ptr @__errno_location() #12
  %62 = load i32, ptr %61, align 4, !tbaa !25
  %63 = tail call ptr @strerror(i32 noundef %62) #9
  %64 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str.33, ptr noundef %60, ptr noundef %63) #11
  tail call void @exit(i32 noundef 1) #13
  unreachable

65:                                               ; preds = %44
  %66 = getelementptr inbounds i8, ptr %12, i64 24
  %67 = getelementptr inbounds i8, ptr %12, i64 144
  %68 = load i64, ptr %67, align 8, !tbaa !26
  tail call void @strbuf_init(ptr noundef nonnull %66, i64 noundef %68) #9
  %69 = getelementptr inbounds i8, ptr %12, i64 40
  %70 = load ptr, ptr %69, align 8, !tbaa !27
  %71 = load i64, ptr %67, align 8, !tbaa !26
  %72 = tail call i64 @read(i32 noundef %47, ptr noundef %70, i64 noundef %71) #9
  %73 = icmp slt i64 %72, 0
  br i1 %73, label %74, label %85

74:                                               ; preds = %65
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.20) #11
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  %78 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.21) #11
  %79 = load ptr, ptr @stderr, align 8, !tbaa !5
  %80 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull @.str.22) #11
  %81 = load ptr, ptr @stderr, align 8, !tbaa !5
  %82 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef nonnull @.str.23) #11
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  %84 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.34, i64 noundef %72) #11
  tail call void @exit(i32 noundef 1) #13
  unreachable

85:                                               ; preds = %65
  %86 = load i64, ptr %67, align 8, !tbaa !26
  %87 = load i64, ptr getelementptr inbounds (i8, ptr @opts, i64 16), align 8, !tbaa !28
  %88 = add i64 %87, %86
  store i64 %88, ptr getelementptr inbounds (i8, ptr @opts, i64 16), align 8, !tbaa !28
  %89 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 32), align 8, !tbaa !31
  %90 = add i64 %89, 1
  store i64 %90, ptr getelementptr inbounds (i8, ptr @stats, i64 32), align 8, !tbaa !31
  %91 = getelementptr inbounds i8, ptr %12, i64 92
  %92 = load i32, ptr %91, align 4, !tbaa !20
  %93 = icmp eq i32 %92, 256
  %stats. = select i1 %93, ptr @stats, ptr getelementptr inbounds (i8, ptr @stats, i64 8)
  %94 = load i64, ptr %stats., align 8, !tbaa !33
  %95 = add i64 %94, 1
  store i64 %95, ptr %stats., align 8, !tbaa !33
  %96 = getelementptr inbounds i8, ptr %12, i64 32
  store i64 %72, ptr %96, align 8, !tbaa !34
  %97 = load i32, ptr %6, align 8, !tbaa !9
  store i32 %97, ptr %91, align 4, !tbaa !20
  %98 = getelementptr inbounds i8, ptr %12, i64 240
  store ptr null, ptr %98, align 8, !tbaa !21
  tail call void @file_list_add(ptr noundef nonnull %12)
  %99 = tail call i32 @close(i32 noundef %47) #9
  %100 = icmp slt i32 %99, 0
  br i1 %100, label %101, label %117

101:                                              ; preds = %85
  %102 = getelementptr inbounds i8, ptr %12, i64 16
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull @.str.20) #11
  %105 = load ptr, ptr @stderr, align 8, !tbaa !5
  %106 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef nonnull @.str.21) #11
  %107 = load ptr, ptr @stderr, align 8, !tbaa !5
  %108 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str.22) #11
  %109 = load ptr, ptr @stderr, align 8, !tbaa !5
  %110 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.23) #11
  %111 = load ptr, ptr @stderr, align 8, !tbaa !5
  %112 = load ptr, ptr %102, align 8, !tbaa !13
  %113 = tail call ptr @__errno_location() #12
  %114 = load i32, ptr %113, align 4, !tbaa !25
  %115 = tail call ptr @strerror(i32 noundef %114) #9
  %116 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef nonnull @.str.35, ptr noundef %112, ptr noundef %115) #11
  tail call void @exit(i32 noundef 1) #13
  unreachable

117:                                              ; preds = %85
  %118 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 28), align 4, !tbaa !35
  %.not53 = icmp eq i32 %118, 0
  br i1 %.not53, label %130, label %119

119:                                              ; preds = %117
  %120 = tail call i32 (...) @got_signal() #9
  %121 = icmp ne i32 %120, 0
  %122 = icmp ne i32 %.0.ph82, 0
  %or.cond = select i1 %121, i1 %122, i1 false
  br i1 %or.cond, label %.thread, label %130

.thread:                                          ; preds = %119
  %123 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 32), align 8, !tbaa !31
  %124 = load i64, ptr @count, align 8, !tbaa !33
  %125 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.36, i64 noundef %123, i64 noundef %124)
  %126 = load i64, ptr getelementptr inbounds (i8, ptr @opts, i64 16), align 8, !tbaa !28
  tail call void @print_humanised_bytes(i64 noundef %126) #9
  %127 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  %128 = load ptr, ptr @stdout, align 8, !tbaa !5
  %129 = tail call i32 @fflush(ptr noundef %128)
  tail call void (...) @reset_signal() #9
  br label %.outer

130:                                              ; preds = %119, %117
  %.not54 = icmp eq i32 %.0.ph82, 0
  br i1 %.not54, label %131, label %.outer

131:                                              ; preds = %130
  %132 = tail call i32 (...) @got_signal() #9
  %.not55 = icmp eq i32 %132, 0
  br i1 %.not55, label %.outer, label %133

133:                                              ; preds = %131
  store i32 1, ptr getelementptr inbounds (i8, ptr @opts, i64 28), align 4, !tbaa !35
  br label %.outer

.outer:                                           ; preds = %5, %8, %.thread, %130, %131, %133
  %.1 = phi i32 [ 1, %130 ], [ 1, %133 ], [ 0, %131 ], [ 1, %.thread ], [ %.0.ph82, %8 ], [ %.0.ph82, %5 ]
  %134 = getelementptr inbounds i8, ptr %.04877, i64 16
  %135 = load ptr, ptr %134, align 8, !tbaa !22
  %.not76 = icmp eq ptr %135, null
  br i1 %.not76, label %.outer._crit_edge, label %.lr.ph, !llvm.loop !23

.outer._crit_edge:                                ; preds = %.outer, %22
  %.0.ph.lcssa73 = phi i32 [ %.0.ph82, %22 ], [ %.1, %.outer ]
  %136 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 28), align 4, !tbaa !35
  %137 = icmp ne i32 %136, 0
  %138 = icmp ne i32 %.0.ph.lcssa73, 0
  %or.cond3 = select i1 %137, i1 %138, i1 false
  br i1 %or.cond3, label %139, label %.outer._crit_edge.thread

139:                                              ; preds = %.outer._crit_edge
  %140 = load i64, ptr getelementptr inbounds (i8, ptr @stats, i64 32), align 8, !tbaa !31
  %141 = load i64, ptr @count, align 8, !tbaa !33
  %142 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.36, i64 noundef %140, i64 noundef %141)
  %143 = load i64, ptr getelementptr inbounds (i8, ptr @opts, i64 16), align 8, !tbaa !28
  tail call void @print_humanised_bytes(i64 noundef %143) #9
  %144 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  %145 = load ptr, ptr @stdout, align 8, !tbaa !5
  %146 = tail call i32 @fflush(ptr noundef %145)
  tail call void (...) @reset_signal() #9
  br label %.outer._crit_edge.thread

.outer._crit_edge.thread:                         ; preds = %1, %139, %.outer._crit_edge
  %147 = phi i1 [ %138, %139 ], [ %138, %.outer._crit_edge ], [ false, %1 ]
  tail call void (...) @stop_timer() #9
  %148 = load i32, ptr getelementptr inbounds (i8, ptr @opts, i64 28), align 4, !tbaa !35
  %149 = icmp ne i32 %148, 0
  %or.cond5 = select i1 %149, i1 %147, i1 false
  br i1 %or.cond5, label %150, label %152

150:                                              ; preds = %.outer._crit_edge.thread
  %151 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38)
  br label %152

152:                                              ; preds = %150, %.outer._crit_edge.thread
  ret i32 0
}

declare i32 @status(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #8

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #8

declare i32 @close(i32 noundef) local_unnamed_addr #1

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 = { "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 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 = { inlinehint 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 = { 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 #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 = { 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 = { 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 #8 = { nofree "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 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { cold nounwind }
attributes #12 = { nounwind willreturn memory(none) }
attributes #13 = { noreturn 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 = !{!10, !11, i64 8}
!10 = !{!"node", !6, i64 0, !11, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"file_list", !15, i64 0, !15, i64 24, !7, i64 48, !17, i64 88, !11, i64 92, !18, i64 96, !6, i64 240}
!15 = !{!"strbuf", !16, i64 0, !16, i64 8, !6, i64 16}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{!"stat", !16, i64 0, !16, i64 8, !16, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !19, i64 72, !19, i64 88, !19, i64 104, !7, i64 120}
!19 = !{!"timespec", !16, i64 0, !16, i64 8}
!20 = !{!14, !11, i64 92}
!21 = !{!14, !6, i64 240}
!22 = !{!10, !6, i64 16}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!11, !11, i64 0}
!26 = !{!14, !16, i64 144}
!27 = !{!14, !6, i64 40}
!28 = !{!29, !16, i64 16}
!29 = !{!"stage_options", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !16, i64 16, !17, i64 24, !17, i64 25, !11, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !30, i64 56}
!30 = !{!"pack_file_cache", !6, i64 0, !15, i64 8}
!31 = !{!32, !16, i64 32}
!32 = !{!"stage_stats", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32}
!33 = !{!16, !16, i64 0}
!34 = !{!14, !16, i64 32}
!35 = !{!29, !11, i64 28}


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