; LLVM IR from yellow-footed-honeyguide/facad :: src (main)

; 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.CommandLineArgs = type { i8, i8, i8, i8, ptr, ptr, i32 }
%struct.winsize = type { i16, i16, i16, i16 }
%struct.GitFileList = type { [1000 x %struct.GitFile], i32 }
%struct.GitFile = type { [1024 x i8], i8 }
%struct.FileCardInfo = type { ptr, ptr, i32, i32, [2 x i8], i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.CommandLineArgs, align 8
  %7 = alloca i32, align 4
  %8 = alloca [4096 x i8], align 16
  %9 = alloca %struct.winsize, align 2
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [4096 x i8], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca [4096 x i8], align 16
  %19 = alloca %struct.GitFileList, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !9
  call void @parse_args(ptr dead_on_unwind writable sret(%struct.CommandLineArgs) align 8 %6, i32 noundef %23, ptr noundef %24)
  %25 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 0
  %26 = load i8, ptr %25, align 8, !tbaa !11, !range !14, !noundef !15
  %27 = trunc i8 %26 to i1
  br i1 %27, label %28, label %29

28:                                               ; preds = %2
  call void @print_version()
  call void @free_args(ptr noundef %6)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %312

29:                                               ; preds = %2
  %30 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 1
  %31 = load i8, ptr %30, align 1, !tbaa !16, !range !14, !noundef !15
  %32 = trunc i8 %31 to i1
  br i1 %32, label %33, label %37

33:                                               ; preds = %29
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i64 0
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  call void @print_help(ptr noundef %36)
  call void @free_args(ptr noundef %6)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %312

37:                                               ; preds = %29
  %38 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 4
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %54

41:                                               ; preds = %37
  %42 = load ptr, ptr @stderr, align 8, !tbaa !9
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = getelementptr inbounds ptr, ptr %43, i64 0
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !17
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str, ptr noundef %45, ptr noundef %47) #5
  %49 = load ptr, ptr @stderr, align 8, !tbaa !9
  %50 = load ptr, ptr %5, align 8, !tbaa !9
  %51 = getelementptr inbounds ptr, ptr %50, i64 0
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.1, ptr noundef %52) #5
  call void @free_args(ptr noundef %6)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %312

54:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4096, ptr %8) #5
  %55 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %56 = call ptr @getcwd(ptr noundef %55, i64 noundef 4096) #5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %59

58:                                               ; preds = %54
  call void @perror(ptr noundef @.str.2)
  call void @free_args(ptr noundef %6)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %311

59:                                               ; preds = %54
  %60 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 2
  %61 = load i8, ptr %60, align 2, !tbaa !18, !range !14, !noundef !15
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %92

63:                                               ; preds = %59
  %64 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 6
  %65 = load i32, ptr %64, align 8, !tbaa !19
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %67, label %79

67:                                               ; preds = %63
  %68 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 5
  %69 = load ptr, ptr %68, align 8, !tbaa !20
  %70 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 6
  %71 = load i32, ptr %70, align 8, !tbaa !19
  %72 = call i32 @is_glob_or_specific_files(ptr noundef %69, i32 noundef %71)
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %79

74:                                               ; preds = %67
  %75 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 5
  %76 = load ptr, ptr %75, align 8, !tbaa !20
  %77 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 6
  %78 = load i32, ptr %77, align 8, !tbaa !19
  call void @print_longlisting_files(ptr noundef %76, i32 noundef %78)
  br label %91

79:                                               ; preds = %67, %63
  %80 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 6
  %81 = load i32, ptr %80, align 8, !tbaa !19
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %83, label %88

83:                                               ; preds = %79
  %84 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 5
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = getelementptr inbounds ptr, ptr %85, i64 0
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  br label %89

88:                                               ; preds = %79
  br label %89

89:                                               ; preds = %88, %83
  %90 = phi ptr [ %87, %83 ], [ @.str.3, %88 ]
  call void @print_longlisting(ptr noundef %90)
  br label %91

91:                                               ; preds = %89, %74
  call void @free_args(ptr noundef %6)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %311

92:                                               ; preds = %59
  %93 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 3
  %94 = load i8, ptr %93, align 1, !tbaa !21, !range !14, !noundef !15
  %95 = trunc i8 %94 to i1
  br i1 %95, label %96, label %108

96:                                               ; preds = %92
  %97 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 6
  %98 = load i32, ptr %97, align 8, !tbaa !19
  %99 = icmp sgt i32 %98, 0
  br i1 %99, label %100, label %105

100:                                              ; preds = %96
  %101 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 5
  %102 = load ptr, ptr %101, align 8, !tbaa !20
  %103 = getelementptr inbounds ptr, ptr %102, i64 0
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  br label %106

105:                                              ; preds = %96
  br label %106

106:                                              ; preds = %105, %100
  %107 = phi ptr [ %104, %100 ], [ @.str.3, %105 ]
  call void @print_dir_analytics(ptr noundef %107)
  call void @free_args(ptr noundef %6)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %311

108:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %109 = call i32 (i32, i64, ...) @ioctl(i32 noundef 1, i64 noundef 21523, ptr noundef %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %110 = getelementptr inbounds %struct.winsize, ptr %9, i32 0, i32 1
  %111 = load i16, ptr %110, align 2, !tbaa !22
  %112 = zext i16 %111 to i32
  store i32 %112, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr null, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4096, ptr %14) #5
  %113 = getelementptr inbounds [4096 x i8], ptr %14, i64 0, i64 0
  %114 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %115 = call ptr @strcpy(ptr noundef %113, ptr noundef %114) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 1, ptr %15, align 4, !tbaa !5
  %116 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 6
  %117 = load i32, ptr %116, align 8, !tbaa !19
  %118 = icmp sgt i32 %117, 0
  br i1 %118, label %119, label %178

119:                                              ; preds = %108
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %172, %119
  %121 = load i32, ptr %16, align 4, !tbaa !5
  %122 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 6
  %123 = load i32, ptr %122, align 8, !tbaa !19
  %124 = icmp slt i32 %121, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %120
  store i32 2, ptr %7, align 4
  br label %175

126:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %127 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 5
  %128 = load ptr, ptr %127, align 8, !tbaa !20
  %129 = load i32, ptr %16, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !9
  %133 = call ptr @realpath(ptr noundef %132, ptr noundef null) #5
  store ptr %133, ptr %17, align 8, !tbaa !9
  %134 = load ptr, ptr %17, align 8, !tbaa !9
  %135 = icmp ne ptr %134, null
  br i1 %135, label %136, label %141

136:                                              ; preds = %126
  %137 = getelementptr inbounds [4096 x i8], ptr %14, i64 0, i64 0
  %138 = load ptr, ptr %17, align 8, !tbaa !9
  %139 = call ptr @strcpy(ptr noundef %137, ptr noundef %138) #5
  %140 = load ptr, ptr %17, align 8, !tbaa !9
  call void @free(ptr noundef %140) #5
  br label %150

141:                                              ; preds = %126
  %142 = getelementptr inbounds [4096 x i8], ptr %14, i64 0, i64 0
  %143 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 5
  %144 = load ptr, ptr %143, align 8, !tbaa !20
  %145 = load i32, ptr %16, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds ptr, ptr %144, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !9
  %149 = call ptr @strcpy(ptr noundef %142, ptr noundef %148) #5
  br label %150

150:                                              ; preds = %141, %136
  %151 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 5
  %152 = load ptr, ptr %151, align 8, !tbaa !20
  %153 = load i32, ptr %16, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds ptr, ptr %152, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !9
  %157 = call i32 @process_target(ptr noundef %156, ptr noundef %11, ptr noundef %12, ptr noundef %13)
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %168

159:                                              ; preds = %150
  %160 = load ptr, ptr @stderr, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.CommandLineArgs, ptr %6, i32 0, i32 5
  %162 = load ptr, ptr %161, align 8, !tbaa !20
  %163 = load i32, ptr %16, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds ptr, ptr %162, i64 %164
  %166 = load ptr, ptr %165, align 8, !tbaa !9
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %160, ptr noundef @.str.4, ptr noundef %166) #5
  store i32 5, ptr %7, align 4
  br label %169

168:                                              ; preds = %150
  store i32 0, ptr %7, align 4
  br label %169

169:                                              ; preds = %168, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %170 = load i32, ptr %7, align 4
  switch i32 %170, label %175 [
    i32 0, label %171
  ]

171:                                              ; preds = %169
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %16, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %16, align 4, !tbaa !5
  br label %120, !llvm.loop !25

175:                                              ; preds = %169, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %176 = load i32, ptr %7, align 4
  switch i32 %176, label %310 [
    i32 2, label %177
    i32 5, label %290
  ]

177:                                              ; preds = %175
  br label %199

178:                                              ; preds = %108
  %179 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %180 = call i32 @is_dev_directory(ptr noundef %179)
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %191

182:                                              ; preds = %178
  %183 = getelementptr inbounds [4096 x i8], ptr %14, i64 0, i64 0
  %184 = call ptr @strcpy(ptr noundef %183, ptr noundef @.str.5) #5
  %185 = call i32 @handle_dev_directory(ptr noundef %11, ptr noundef %12, ptr noundef %13)
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %190

187:                                              ; preds = %182
  %188 = load ptr, ptr @stderr, align 8, !tbaa !9
  %189 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %188, ptr noundef @.str.6) #5
  br label %290

190:                                              ; preds = %182
  br label %198

191:                                              ; preds = %178
  %192 = call i32 @process_directory(ptr noundef @.str.3, ptr noundef %11, ptr noundef %12, ptr noundef %13)
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %197

194:                                              ; preds = %191
  %195 = load ptr, ptr @stderr, align 8, !tbaa !9
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef @.str.7) #5
  br label %290

197:                                              ; preds = %191
  br label %198

198:                                              ; preds = %197, %190
  br label %199

199:                                              ; preds = %198, %177
  %200 = load i32, ptr %12, align 4, !tbaa !5
  %201 = icmp eq i32 %200, 0
  br i1 %201, label %202, label %221

202:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 4096, ptr %18) #5
  %203 = getelementptr inbounds [4096 x i8], ptr %18, i64 0, i64 0
  %204 = call ptr @getcwd(ptr noundef %203, i64 noundef 4096) #5
  %205 = icmp ne ptr %204, null
  br i1 %205, label %206, label %217

206:                                              ; preds = %202
  %207 = getelementptr inbounds [4096 x i8], ptr %18, i64 0, i64 0
  %208 = getelementptr inbounds [4096 x i8], ptr %14, i64 0, i64 0
  %209 = call i32 @strcmp(ptr noundef %207, ptr noundef %208) #6
  %210 = icmp eq i32 %209, 0
  br i1 %210, label %211, label %214

211:                                              ; preds = %206
  %212 = getelementptr inbounds [4096 x i8], ptr %18, i64 0, i64 0
  %213 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %212)
  br label %214

214:                                              ; preds = %211, %206
  %215 = load ptr, ptr @stderr, align 8, !tbaa !9
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef @.str.9) #5
  br label %220

217:                                              ; preds = %202
  %218 = load ptr, ptr @stderr, align 8, !tbaa !9
  %219 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %218, ptr noundef @.str.9) #5
  br label %220

220:                                              ; preds = %217, %214
  call void @llvm.lifetime.end.p0(i64 4096, ptr %18) #5
  br label %289

221:                                              ; preds = %199
  %222 = load ptr, ptr %11, align 8, !tbaa !9
  %223 = load i32, ptr %12, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  call void @qsort(ptr noundef %222, i64 noundef %224, i64 noundef 32, ptr noundef @compare_file_entries)
  %225 = call zeroext i1 @is_git_repository()
  br i1 %225, label %226, label %283

226:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 1025004, ptr %19) #5
  call void @get_git_status(ptr dead_on_unwind writable sret(%struct.GitFileList) align 4 %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %279, %226
  %228 = load i32, ptr %20, align 4, !tbaa !5
  %229 = load i32, ptr %12, align 4, !tbaa !5
  %230 = icmp slt i32 %228, %229
  br i1 %230, label %232, label %231

231:                                              ; preds = %227
  store i32 6, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %282

232:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %233

233:                                              ; preds = %274, %232
  %234 = load i32, ptr %21, align 4, !tbaa !5
  %235 = getelementptr inbounds %struct.GitFileList, ptr %19, i32 0, i32 1
  %236 = load i32, ptr %235, align 4, !tbaa !27
  %237 = icmp slt i32 %234, %236
  br i1 %237, label %239, label %238

238:                                              ; preds = %233
  store i32 9, ptr %7, align 4
  br label %277

239:                                              ; preds = %233
  %240 = load ptr, ptr %11, align 8, !tbaa !9
  %241 = load i32, ptr %20, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds %struct.FileCardInfo, ptr %240, i64 %242
  %244 = getelementptr inbounds %struct.FileCardInfo, ptr %243, i32 0, i32 0
  %245 = load ptr, ptr %244, align 8, !tbaa !29
  %246 = getelementptr inbounds %struct.GitFileList, ptr %19, i32 0, i32 0
  %247 = load i32, ptr %21, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [1000 x %struct.GitFile], ptr %246, i64 0, i64 %248
  %250 = getelementptr inbounds %struct.GitFile, ptr %249, i32 0, i32 0
  %251 = getelementptr inbounds [1024 x i8], ptr %250, i64 0, i64 0
  %252 = call i32 @strcmp(ptr noundef %245, ptr noundef %251) #6
  %253 = icmp eq i32 %252, 0
  br i1 %253, label %254, label %273

254:                                              ; preds = %239
  %255 = getelementptr inbounds %struct.GitFileList, ptr %19, i32 0, i32 0
  %256 = load i32, ptr %21, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [1000 x %struct.GitFile], ptr %255, i64 0, i64 %257
  %259 = getelementptr inbounds %struct.GitFile, ptr %258, i32 0, i32 1
  %260 = load i8, ptr %259, align 1, !tbaa !31
  %261 = load ptr, ptr %11, align 8, !tbaa !9
  %262 = load i32, ptr %20, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds %struct.FileCardInfo, ptr %261, i64 %263
  %265 = getelementptr inbounds %struct.FileCardInfo, ptr %264, i32 0, i32 4
  %266 = getelementptr inbounds [2 x i8], ptr %265, i64 0, i64 0
  store i8 %260, ptr %266, align 8, !tbaa !33
  %267 = load ptr, ptr %11, align 8, !tbaa !9
  %268 = load i32, ptr %20, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds %struct.FileCardInfo, ptr %267, i64 %269
  %271 = getelementptr inbounds %struct.FileCardInfo, ptr %270, i32 0, i32 4
  %272 = getelementptr inbounds [2 x i8], ptr %271, i64 0, i64 1
  store i8 0, ptr %272, align 1, !tbaa !33
  store i32 9, ptr %7, align 4
  br label %277

273:                                              ; preds = %239
  br label %274

274:                                              ; preds = %273
  %275 = load i32, ptr %21, align 4, !tbaa !5
  %276 = add nsw i32 %275, 1
  store i32 %276, ptr %21, align 4, !tbaa !5
  br label %233, !llvm.loop !34

277:                                              ; preds = %254, %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %278

278:                                              ; preds = %277
  br label %279

279:                                              ; preds = %278
  %280 = load i32, ptr %20, align 4, !tbaa !5
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %20, align 4, !tbaa !5
  br label %227, !llvm.loop !35

282:                                              ; preds = %231
  call void @llvm.lifetime.end.p0(i64 1025004, ptr %19) #5
  br label %283

283:                                              ; preds = %282, %221
  %284 = load ptr, ptr %11, align 8, !tbaa !9
  %285 = load i32, ptr %12, align 4, !tbaa !5
  %286 = load i32, ptr %10, align 4, !tbaa !5
  %287 = getelementptr inbounds [4096 x i8], ptr %14, i64 0, i64 0
  %288 = load i32, ptr %15, align 4, !tbaa !5
  call void @display_entries(ptr noundef %284, i32 noundef %285, i32 noundef %286, ptr noundef %287, i32 noundef %288)
  br label %289

289:                                              ; preds = %283, %220
  br label %290

290:                                              ; preds = %289, %194, %187, %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %291

291:                                              ; preds = %301, %290
  %292 = load i32, ptr %22, align 4, !tbaa !5
  %293 = load i32, ptr %12, align 4, !tbaa !5
  %294 = icmp slt i32 %292, %293
  br i1 %294, label %296, label %295

295:                                              ; preds = %291
  store i32 12, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %304

296:                                              ; preds = %291
  %297 = load ptr, ptr %11, align 8, !tbaa !9
  %298 = load i32, ptr %22, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds %struct.FileCardInfo, ptr %297, i64 %299
  call void @free_file_entry(ptr noundef %300)
  br label %301

301:                                              ; preds = %296
  %302 = load i32, ptr %22, align 4, !tbaa !5
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %22, align 4, !tbaa !5
  br label %291, !llvm.loop !36

304:                                              ; preds = %295
  %305 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %305) #5
  call void @free_args(ptr noundef %6)
  %306 = load i32, ptr %12, align 4, !tbaa !5
  %307 = icmp sgt i32 %306, 0
  %308 = zext i1 %307 to i64
  %309 = select i1 %307, i32 0, i32 1
  store i32 %309, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %310

310:                                              ; preds = %304, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4096, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %311

311:                                              ; preds = %310, %106, %91, %58
  call void @llvm.lifetime.end.p0(i64 4096, ptr %8) #5
  br label %312

312:                                              ; preds = %311, %41, %33, %28
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  %313 = load i32, ptr %3, align 4
  ret i32 %313
}

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

declare void @parse_args(ptr dead_on_unwind writable sret(%struct.CommandLineArgs) align 8, i32 noundef, ptr noundef) #2

declare void @print_version() #2

declare void @free_args(ptr noundef) #2

declare void @print_help(ptr noundef) #2

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

; Function Attrs: nounwind
declare ptr @getcwd(ptr noundef, i64 noundef) #3

declare void @perror(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @is_glob_or_specific_files(ptr noundef, i32 noundef) #0

declare void @print_longlisting_files(ptr noundef, i32 noundef) #2

declare void @print_longlisting(ptr noundef) #2

declare void @print_dir_analytics(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) #3

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @process_target(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

declare i32 @is_dev_directory(ptr noundef) #2

declare i32 @handle_dev_directory(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @process_directory(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

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

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare i32 @compare_file_entries(ptr noundef, ptr noundef) #2

declare zeroext i1 @is_git_repository() #2

declare void @get_git_status(ptr dead_on_unwind writable sret(%struct.GitFileList) align 4) #2

declare void @display_entries(ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare void @free_file_entry(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nounwind willreturn memory(read) "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(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 1, !13, i64 2, !13, i64 3, !10, i64 8, !10, i64 16, !6, i64 24}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!12, !13, i64 1}
!17 = !{!12, !10, i64 8}
!18 = !{!12, !13, i64 2}
!19 = !{!12, !6, i64 24}
!20 = !{!12, !10, i64 16}
!21 = !{!12, !13, i64 3}
!22 = !{!23, !24, i64 2}
!23 = !{!"winsize", !24, i64 0, !24, i64 2, !24, i64 4, !24, i64 6}
!24 = !{!"short", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !6, i64 1025000}
!28 = !{!"", !7, i64 0, !6, i64 1025000}
!29 = !{!30, !10, i64 0}
!30 = !{!"", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !7, i64 24, !6, i64 28}
!31 = !{!32, !7, i64 1024}
!32 = !{!"", !7, i64 0, !7, i64 1024}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !26}
!35 = distinct !{!35, !26}
!36 = distinct !{!36, !26}


; 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.CommandLineArgs = type { i8, i8, i8, i8, ptr, ptr, i32 }
%struct.winsize = type { i16, i16, i16, i16 }
%struct.GitFileList = type { [1000 x %struct.GitFile], i32 }
%struct.GitFile = type { [1024 x i8], i8 }
%struct.FileCardInfo = type { ptr, ptr, i32, i32, [2 x i8], i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.CommandLineArgs, align 8
  %4 = alloca [4096 x i8], align 16
  %5 = alloca %struct.winsize, align 2
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [4096 x i8], align 16
  %10 = alloca [4096 x i8], align 16
  %11 = alloca %struct.GitFileList, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  call void @parse_args(ptr dead_on_unwind nonnull writable sret(%struct.CommandLineArgs) align 8 %3, i32 noundef %0, ptr noundef %1) #9
  %12 = load i8, ptr %3, align 8, !tbaa !5, !range !12, !noundef !13
  %13 = trunc nuw i8 %12 to i1
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  call void @print_version() #9
  call void @free_args(ptr noundef nonnull %3) #9
  br label %180

15:                                               ; preds = %2
  %16 = getelementptr inbounds i8, ptr %3, i64 1
  %17 = load i8, ptr %16, align 1, !tbaa !14, !range !12, !noundef !13
  %18 = trunc nuw i8 %17 to i1
  br i1 %18, label %19, label %21

19:                                               ; preds = %15
  %20 = load ptr, ptr %1, align 8, !tbaa !15
  call void @print_help(ptr noundef %20) #9
  call void @free_args(ptr noundef nonnull %3) #9
  br label %180

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %3, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %.not = icmp eq ptr %23, null
  br i1 %.not, label %31, label %24

24:                                               ; preds = %21
  %25 = load ptr, ptr @stderr, align 8, !tbaa !15
  %26 = load ptr, ptr %1, align 8, !tbaa !15
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str, ptr noundef %26, ptr noundef nonnull %23) #10
  %28 = load ptr, ptr @stderr, align 8, !tbaa !15
  %29 = load ptr, ptr %1, align 8, !tbaa !15
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.1, ptr noundef %29) #10
  call void @free_args(ptr noundef nonnull %3) #9
  br label %180

31:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %4) #9
  %32 = call ptr @getcwd(ptr noundef nonnull %4, i64 noundef 4096) #9
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %31
  call void @perror(ptr noundef nonnull @.str.2) #11
  call void @free_args(ptr noundef nonnull %3) #9
  br label %179

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %3, i64 2
  %37 = load i8, ptr %36, align 2, !tbaa !17, !range !12, !noundef !13
  %38 = trunc nuw i8 %37 to i1
  br i1 %38, label %39, label %57

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %3, i64 24
  %41 = load i32, ptr %40, align 8, !tbaa !18
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %43, label %.thread

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %3, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  %46 = call i32 @is_glob_or_specific_files(ptr noundef %45, i32 noundef %41)
  %.not47 = icmp eq i32 %46, 0
  br i1 %.not47, label %50, label %47

47:                                               ; preds = %43
  %48 = load ptr, ptr %44, align 8, !tbaa !19
  %49 = load i32, ptr %40, align 8, !tbaa !18
  call void @print_longlisting_files(ptr noundef %48, i32 noundef %49) #9
  br label %56

50:                                               ; preds = %43
  %.pr = load i32, ptr %40, align 8, !tbaa !18
  %51 = icmp sgt i32 %.pr, 0
  br i1 %51, label %52, label %.thread

52:                                               ; preds = %50
  %53 = load ptr, ptr %44, align 8, !tbaa !19
  %54 = load ptr, ptr %53, align 8, !tbaa !15
  br label %.thread

.thread:                                          ; preds = %39, %50, %52
  %55 = phi ptr [ %54, %52 ], [ @.str.3, %50 ], [ @.str.3, %39 ]
  call void @print_longlisting(ptr noundef %55) #9
  br label %56

56:                                               ; preds = %.thread, %47
  call void @free_args(ptr noundef nonnull %3) #9
  br label %179

57:                                               ; preds = %35
  %58 = getelementptr inbounds i8, ptr %3, i64 3
  %59 = load i8, ptr %58, align 1, !tbaa !20, !range !12, !noundef !13
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %61, label %71

61:                                               ; preds = %57
  %62 = getelementptr inbounds i8, ptr %3, i64 24
  %63 = load i32, ptr %62, align 8, !tbaa !18
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %65, label %69

65:                                               ; preds = %61
  %66 = getelementptr inbounds i8, ptr %3, i64 16
  %67 = load ptr, ptr %66, align 8, !tbaa !19
  %68 = load ptr, ptr %67, align 8, !tbaa !15
  br label %69

69:                                               ; preds = %61, %65
  %70 = phi ptr [ %68, %65 ], [ @.str.3, %61 ]
  call void @print_dir_analytics(ptr noundef %70) #9
  call void @free_args(ptr noundef nonnull %3) #9
  br label %179

71:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %72 = call i32 (i32, i64, ...) @ioctl(i32 noundef 1, i64 noundef 21523, ptr noundef nonnull %5) #9
  %73 = getelementptr inbounds i8, ptr %5, i64 2
  %74 = load i16, ptr %73, align 2, !tbaa !21
  %75 = zext i16 %74 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  store ptr null, ptr %6, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store i32 0, ptr %7, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  store i32 0, ptr %8, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %9) #9
  %76 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) %4) #9
  %77 = getelementptr inbounds i8, ptr %3, i64 24
  %78 = load i32, ptr %77, align 8, !tbaa !18
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %.lr.ph, label %108

.lr.ph:                                           ; preds = %71
  %80 = getelementptr inbounds i8, ptr %3, i64 16
  br label %85

81:                                               ; preds = %97
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %82 = load i32, ptr %77, align 8, !tbaa !18
  %83 = sext i32 %82 to i64
  %84 = icmp slt i64 %indvars.iv.next, %83
  br i1 %84, label %85, label %.thread50, !llvm.loop !25

85:                                               ; preds = %.lr.ph, %81
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %81 ]
  %86 = load ptr, ptr %80, align 8, !tbaa !19
  %87 = getelementptr inbounds ptr, ptr %86, i64 %indvars.iv
  %88 = load ptr, ptr %87, align 8, !tbaa !15
  %89 = call ptr @realpath(ptr noundef %88, ptr noundef null) #9
  %.not44 = icmp eq ptr %89, null
  br i1 %.not44, label %92, label %90

90:                                               ; preds = %85
  %91 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) %89) #9
  call void @free(ptr noundef nonnull %89) #9
  %.pre = load ptr, ptr %80, align 8, !tbaa !19
  br label %97

92:                                               ; preds = %85
  %93 = load ptr, ptr %80, align 8, !tbaa !19
  %94 = getelementptr inbounds ptr, ptr %93, i64 %indvars.iv
  %95 = load ptr, ptr %94, align 8, !tbaa !15
  %96 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) %95) #9
  br label %97

97:                                               ; preds = %92, %90
  %98 = phi ptr [ %93, %92 ], [ %.pre, %90 ]
  %99 = getelementptr inbounds ptr, ptr %98, i64 %indvars.iv
  %100 = load ptr, ptr %99, align 8, !tbaa !15
  %101 = call i32 @process_target(ptr noundef %100, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not45 = icmp eq i32 %101, 0
  br i1 %.not45, label %81, label %102

102:                                              ; preds = %97
  %103 = load ptr, ptr @stderr, align 8, !tbaa !15
  %104 = load ptr, ptr %80, align 8, !tbaa !19
  %105 = getelementptr inbounds ptr, ptr %104, i64 %indvars.iv
  %106 = load ptr, ptr %105, align 8, !tbaa !15
  %107 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull @.str.4, ptr noundef %106) #10
  br label %167

108:                                              ; preds = %71
  %109 = call i32 @is_dev_directory(ptr noundef nonnull %4) #9
  %.not41 = icmp eq i32 %109, 0
  br i1 %.not41, label %116, label %110

110:                                              ; preds = %108
  %111 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.5) #9
  %112 = call i32 @handle_dev_directory(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #9
  %.not43 = icmp eq i32 %112, 0
  br i1 %.not43, label %.thread50, label %113

113:                                              ; preds = %110
  %114 = load ptr, ptr @stderr, align 8, !tbaa !15
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef nonnull @.str.6) #10
  br label %167

116:                                              ; preds = %108
  %117 = call i32 @process_directory(ptr noundef nonnull @.str.3, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not42 = icmp eq i32 %117, 0
  br i1 %.not42, label %.thread50, label %118

118:                                              ; preds = %116
  %119 = load ptr, ptr @stderr, align 8, !tbaa !15
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef nonnull @.str.7) #10
  br label %167

.thread50:                                        ; preds = %81, %110, %116
  %.034 = phi i32 [ 1, %110 ], [ 1, %116 ], [ 0, %81 ]
  %121 = load i32, ptr %7, align 4, !tbaa !24
  %122 = icmp eq i32 %121, 0
  br i1 %122, label %123, label %133

123:                                              ; preds = %.thread50
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %10) #9
  %124 = call ptr @getcwd(ptr noundef nonnull %10, i64 noundef 4096) #9
  %.not46 = icmp eq ptr %124, null
  br i1 %.not46, label %130, label %125

125:                                              ; preds = %123
  %126 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) %9) #12
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %130

128:                                              ; preds = %125
  %129 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull %10)
  br label %130

130:                                              ; preds = %123, %125, %128
  %131 = load ptr, ptr @stderr, align 8, !tbaa !15
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef nonnull @.str.9) #10
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %10) #9
  br label %167

133:                                              ; preds = %.thread50
  %134 = load ptr, ptr %6, align 8, !tbaa !15
  %135 = sext i32 %121 to i64
  call void @qsort(ptr noundef %134, i64 noundef %135, i64 noundef 32, ptr noundef nonnull @compare_file_entries) #9
  %136 = call zeroext i1 @is_git_repository() #9
  br i1 %136, label %137, label %._crit_edge81

._crit_edge81:                                    ; preds = %133
  %.pre82 = load i32, ptr %7, align 4, !tbaa !24
  br label %164

137:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 1025004, ptr nonnull %11) #9
  call void @get_git_status(ptr dead_on_unwind nonnull writable sret(%struct.GitFileList) align 4 %11) #9
  %138 = load i32, ptr %7, align 4, !tbaa !24
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %.preheader.lr.ph, label %._crit_edge

.preheader.lr.ph:                                 ; preds = %137
  %140 = getelementptr inbounds i8, ptr %11, i64 1025000
  %141 = load i32, ptr %140, align 4, !tbaa !27
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %.preheader, label %._crit_edge

.preheaderthread-pre-split:                       ; preds = %.loopexit
  %.pr83 = load i32, ptr %140, align 4, !tbaa !27
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %.preheaderthread-pre-split
  %143 = phi i32 [ %.pr83, %.preheaderthread-pre-split ], [ %141, %.preheader.lr.ph ]
  %144 = phi i32 [ %161, %.preheaderthread-pre-split ], [ %138, %.preheader.lr.ph ]
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.preheaderthread-pre-split ], [ 0, %.preheader.lr.ph ]
  %145 = icmp sgt i32 %143, 0
  br i1 %145, label %.lr.ph59, label %.loopexit

.lr.ph59:                                         ; preds = %.preheader
  %146 = load ptr, ptr %6, align 8, !tbaa !15
  %147 = getelementptr inbounds %struct.FileCardInfo, ptr %146, i64 %indvars.iv74
  %148 = load ptr, ptr %147, align 8, !tbaa !29
  %wide.trip.count = zext nneg i32 %143 to i64
  br label %151

._crit_edge:                                      ; preds = %.loopexit, %.preheader.lr.ph, %137
  %149 = phi i32 [ %138, %137 ], [ %138, %.preheader.lr.ph ], [ %161, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 1025004, ptr nonnull %11) #9
  br label %164

150:                                              ; preds = %151
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %151, !llvm.loop !31

151:                                              ; preds = %.lr.ph59, %150
  %indvars.iv71 = phi i64 [ 0, %.lr.ph59 ], [ %indvars.iv.next72, %150 ]
  %152 = getelementptr inbounds [1000 x %struct.GitFile], ptr %11, i64 0, i64 %indvars.iv71
  %153 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %148, ptr noundef nonnull dereferenceable(1) %152) #12
  %154 = icmp eq i32 %153, 0
  br i1 %154, label %155, label %150

155:                                              ; preds = %151
  %156 = getelementptr inbounds i8, ptr %152, i64 1024
  %157 = load i8, ptr %156, align 1, !tbaa !32
  %158 = getelementptr inbounds i8, ptr %147, i64 24
  store i8 %157, ptr %158, align 8, !tbaa !34
  %159 = load ptr, ptr %6, align 8, !tbaa !15
  %160 = getelementptr inbounds %struct.FileCardInfo, ptr %159, i64 %indvars.iv74, i32 4, i64 1
  store i8 0, ptr %160, align 1, !tbaa !34
  %.pre80 = load i32, ptr %7, align 4, !tbaa !24
  br label %.loopexit

.loopexit:                                        ; preds = %150, %.preheader, %155
  %161 = phi i32 [ %144, %.preheader ], [ %.pre80, %155 ], [ %144, %150 ]
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %162 = sext i32 %161 to i64
  %163 = icmp slt i64 %indvars.iv.next75, %162
  br i1 %163, label %.preheaderthread-pre-split, label %._crit_edge, !llvm.loop !35

164:                                              ; preds = %._crit_edge81, %._crit_edge
  %165 = phi i32 [ %.pre82, %._crit_edge81 ], [ %149, %._crit_edge ]
  %166 = load ptr, ptr %6, align 8, !tbaa !15
  call void @display_entries(ptr noundef %166, i32 noundef %165, i32 noundef %75, ptr noundef nonnull %9, i32 noundef %.034) #9
  br label %167

167:                                              ; preds = %102, %130, %164, %118, %113
  %168 = load i32, ptr %7, align 4, !tbaa !24
  %169 = icmp sgt i32 %168, 0
  br i1 %169, label %.lr.ph64, label %._crit_edge65

.lr.ph64:                                         ; preds = %167, %.lr.ph64
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %.lr.ph64 ], [ 0, %167 ]
  %170 = load ptr, ptr %6, align 8, !tbaa !15
  %171 = getelementptr inbounds %struct.FileCardInfo, ptr %170, i64 %indvars.iv77
  call void @free_file_entry(ptr noundef %171) #9
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %172 = load i32, ptr %7, align 4, !tbaa !24
  %173 = sext i32 %172 to i64
  %174 = icmp slt i64 %indvars.iv.next78, %173
  br i1 %174, label %.lr.ph64, label %._crit_edge65, !llvm.loop !37

._crit_edge65:                                    ; preds = %.lr.ph64, %167
  %175 = load ptr, ptr %6, align 8, !tbaa !15
  call void @free(ptr noundef %175) #9
  call void @free_args(ptr noundef nonnull %3) #9
  %176 = load i32, ptr %7, align 4, !tbaa !24
  %177 = icmp slt i32 %176, 1
  %178 = zext i1 %177 to i32
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %179

179:                                              ; preds = %._crit_edge65, %69, %56, %34
  %.1 = phi i32 [ 1, %34 ], [ 0, %56 ], [ 0, %69 ], [ %178, %._crit_edge65 ]
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %4) #9
  br label %180

180:                                              ; preds = %179, %24, %19, %14
  %.2 = phi i32 [ 0, %14 ], [ 0, %19 ], [ 1, %24 ], [ %.1, %179 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  ret i32 %.2
}

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

declare void @parse_args(ptr dead_on_unwind writable sret(%struct.CommandLineArgs) align 8, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @print_version() local_unnamed_addr #2

declare void @free_args(ptr noundef) local_unnamed_addr #2

declare void @print_help(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare ptr @getcwd(ptr noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
declare hidden i32 @is_glob_or_specific_files(ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @print_longlisting_files(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @print_longlisting(ptr noundef) local_unnamed_addr #2

declare void @print_dir_analytics(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef ptr @realpath(ptr nocapture noundef readonly, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare hidden i32 @process_target(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare i32 @is_dev_directory(ptr noundef) local_unnamed_addr #2

declare i32 @handle_dev_directory(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @process_directory(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #7

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

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

declare i32 @compare_file_entries(ptr noundef, ptr noundef) #2

declare zeroext i1 @is_git_repository() local_unnamed_addr #2

declare void @get_git_status(ptr dead_on_unwind writable sret(%struct.GitFileList) align 4) local_unnamed_addr #2

declare void @display_entries(ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @free_file_entry(ptr noundef) local_unnamed_addr #2

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

!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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !10, i64 8, !10, i64 16, !11, i64 24}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !7, i64 1}
!15 = !{!10, !10, i64 0}
!16 = !{!6, !10, i64 8}
!17 = !{!6, !7, i64 2}
!18 = !{!6, !11, i64 24}
!19 = !{!6, !10, i64 16}
!20 = !{!6, !7, i64 3}
!21 = !{!22, !23, i64 2}
!22 = !{!"winsize", !23, i64 0, !23, i64 2, !23, i64 4, !23, i64 6}
!23 = !{!"short", !8, i64 0}
!24 = !{!11, !11, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !11, i64 1025000}
!28 = !{!"", !8, i64 0, !11, i64 1025000}
!29 = !{!30, !10, i64 0}
!30 = !{!"", !10, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !8, i64 24, !11, i64 28}
!31 = distinct !{!31, !26}
!32 = !{!33, !8, i64 1024}
!33 = !{!"", !8, i64 0, !8, i64 1024}
!34 = !{!8, !8, i64 0}
!35 = distinct !{!35, !26, !36}
!36 = !{!"llvm.loop.unswitch.partial.disable"}
!37 = distinct !{!37, !26}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass