; LLVM IR from mncoppola/rpef :: utilities_src/squashfs4.1/squashfs-tools (read_fs)

; 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.squashfs_reg_inode_header = type { i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, [0 x i32] }
%struct.squashfs_lreg_inode_header = type { i16, i16, i16, i16, i32, i32, i64, i64, i64, i32, i32, i32, i32, [0 x i32] }
%struct.squashfs_symlink_inode_header = type { i16, i16, i16, i16, i32, i32, i32, i32, [0 x i8] }
%struct.squashfs_dir_inode_header = type { i16, i16, i16, i16, i32, i32, i32, i32, i16, i16, i32 }
%struct.squashfs_ldir_inode_header = type { i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, i16, i16, i32, [0 x %struct.squashfs_dir_index] }
%struct.squashfs_dir_index = type { i32, i32, i32, [0 x i8] }
%struct.squashfs_base_inode_header = type { i16, i16, i16, i16, i32, i32 }
%struct.squashfs_super_block = type { i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i64, i64, i64, i64, i64, i64, i64, i64 }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @read_block(i32 noundef, i64 noundef, ptr noundef, ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @scan_inode_table(i32 noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18) #0 {
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca %struct.squashfs_reg_inode_header, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i64, align 8
  %51 = alloca i32, align 4
  %52 = alloca i64, align 8
  %53 = alloca ptr, align 8
  %54 = alloca %struct.squashfs_lreg_inode_header, align 8
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca i64, align 8
  %58 = alloca i32, align 4
  %59 = alloca i64, align 8
  %60 = alloca ptr, align 8
  %61 = alloca %struct.squashfs_symlink_inode_header, align 4
  %62 = alloca %struct.squashfs_dir_inode_header, align 4
  %63 = alloca %struct.squashfs_ldir_inode_header, align 4
  %64 = alloca i32, align 4
  %65 = alloca %struct.squashfs_dir_index, align 4
  store i32 %0, ptr %21, align 4, !tbaa !5
  store i64 %1, ptr %22, align 8, !tbaa !9
  store i64 %2, ptr %23, align 8, !tbaa !9
  store i64 %3, ptr %24, align 8, !tbaa !9
  store i32 %4, ptr %25, align 4, !tbaa !5
  store ptr %5, ptr %26, align 8, !tbaa !11
  store ptr %6, ptr %27, align 8, !tbaa !11
  store ptr %7, ptr %28, align 8, !tbaa !11
  store ptr %8, ptr %29, align 8, !tbaa !11
  store ptr %9, ptr %30, align 8, !tbaa !11
  store ptr %10, ptr %31, align 8, !tbaa !11
  store ptr %11, ptr %32, align 8, !tbaa !11
  store ptr %12, ptr %33, align 8, !tbaa !11
  store ptr %13, ptr %34, align 8, !tbaa !11
  store ptr %14, ptr %35, align 8, !tbaa !11
  store ptr %15, ptr %36, align 8, !tbaa !11
  store ptr %16, ptr %37, align 8, !tbaa !11
  store ptr %17, ptr %38, align 8, !tbaa !11
  store ptr %18, ptr %39, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  store i32 0, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  store i32 0, ptr %43, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  store i32 0, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %45) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  br label %66

66:                                               ; preds = %109, %19
  %67 = load i64, ptr %22, align 8, !tbaa !9
  %68 = load i64, ptr %23, align 8, !tbaa !9
  %69 = icmp slt i64 %67, %68
  br i1 %69, label %70, label %113

70:                                               ; preds = %66
  %71 = load i64, ptr %22, align 8, !tbaa !9
  %72 = load i64, ptr %24, align 8, !tbaa !9
  %73 = icmp eq i64 %71, %72
  br i1 %73, label %74, label %77

74:                                               ; preds = %70
  %75 = load i32, ptr %42, align 4, !tbaa !5
  %76 = load ptr, ptr %29, align 8, !tbaa !11
  store i32 %75, ptr %76, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %74, %70
  %78 = load i32, ptr %43, align 4, !tbaa !5
  %79 = load i32, ptr %42, align 4, !tbaa !5
  %80 = sub nsw i32 %78, %79
  %81 = icmp slt i32 %80, 8192
  br i1 %81, label %82, label %95

82:                                               ; preds = %77
  %83 = load ptr, ptr %28, align 8, !tbaa !11
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = load i32, ptr %43, align 4, !tbaa !5
  %86 = add nsw i32 %85, 8192
  store i32 %86, ptr %43, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call ptr @realloc(ptr noundef %84, i64 noundef %87) #8
  %89 = load ptr, ptr %28, align 8, !tbaa !11
  store ptr %88, ptr %89, align 8, !tbaa !11
  %90 = load ptr, ptr %28, align 8, !tbaa !11
  %91 = load ptr, ptr %90, align 8, !tbaa !11
  %92 = icmp eq ptr %91, null
  br i1 %92, label %93, label %94

93:                                               ; preds = %82
  store i32 0, ptr %20, align 4
  store i32 1, ptr %47, align 4
  br label %555

94:                                               ; preds = %82
  br label %95

95:                                               ; preds = %94, %77
  %96 = load i32, ptr %21, align 4, !tbaa !5
  %97 = load i64, ptr %22, align 8, !tbaa !9
  %98 = load ptr, ptr %28, align 8, !tbaa !11
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = load i32, ptr %42, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %99, i64 %101
  %103 = call i32 @read_block(i32 noundef %96, i64 noundef %97, ptr noundef %22, ptr noundef %102)
  store i32 %103, ptr %41, align 4, !tbaa !5
  %104 = load i32, ptr %41, align 4, !tbaa !5
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %109

106:                                              ; preds = %95
  %107 = load ptr, ptr %28, align 8, !tbaa !11
  %108 = load ptr, ptr %107, align 8, !tbaa !11
  call void @free(ptr noundef %108) #7
  store i32 0, ptr %20, align 4
  store i32 1, ptr %47, align 4
  br label %555

109:                                              ; preds = %95
  %110 = load i32, ptr %41, align 4, !tbaa !5
  %111 = load i32, ptr %42, align 4, !tbaa !5
  %112 = add nsw i32 %111, %110
  store i32 %112, ptr %42, align 4, !tbaa !5
  br label %66, !llvm.loop !13

113:                                              ; preds = %66
  %114 = load i32, ptr %42, align 4, !tbaa !5
  %115 = load ptr, ptr %29, align 8, !tbaa !11
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = load i32, ptr %25, align 4, !tbaa !5
  %118 = add i32 %116, %117
  %119 = sub i32 %114, %118
  %120 = load ptr, ptr %30, align 8, !tbaa !11
  store i32 %119, ptr %120, align 4, !tbaa !5
  %121 = load ptr, ptr %29, align 8, !tbaa !11
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %25, align 4, !tbaa !5
  %124 = add i32 %122, %123
  store i32 %124, ptr %42, align 4, !tbaa !5
  %125 = load ptr, ptr %27, align 8, !tbaa !11
  %126 = load ptr, ptr %28, align 8, !tbaa !11
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = load i32, ptr %42, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %127, i64 %129
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %125, ptr align 1 %130, i64 16, i1 false)
  %131 = load ptr, ptr %27, align 8, !tbaa !11
  %132 = getelementptr inbounds %struct.squashfs_base_inode_header, ptr %131, i32 0, i32 0
  %133 = load i16, ptr %132, align 8, !tbaa !15
  %134 = zext i16 %133 to i32
  %135 = icmp eq i32 %134, 1
  br i1 %135, label %136, label %146

136:                                              ; preds = %113
  %137 = load ptr, ptr %27, align 8, !tbaa !11
  %138 = load ptr, ptr %28, align 8, !tbaa !11
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  %140 = load i32, ptr %42, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i8, ptr %139, i64 %141
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %137, ptr align 1 %142, i64 32, i1 false)
  %143 = load ptr, ptr %27, align 8, !tbaa !11
  %144 = getelementptr inbounds %struct.squashfs_dir_inode_header, ptr %143, i32 0, i32 6
  %145 = load i32, ptr %144, align 8, !tbaa !15
  store i32 %145, ptr %46, align 4, !tbaa !5
  br label %156

146:                                              ; preds = %113
  %147 = load ptr, ptr %27, align 8, !tbaa !11
  %148 = load ptr, ptr %28, align 8, !tbaa !11
  %149 = load ptr, ptr %148, align 8, !tbaa !11
  %150 = load i32, ptr %42, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds i8, ptr %149, i64 %151
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %147, ptr align 1 %152, i64 40, i1 false)
  %153 = load ptr, ptr %27, align 8, !tbaa !11
  %154 = getelementptr inbounds %struct.squashfs_ldir_inode_header, ptr %153, i32 0, i32 8
  %155 = load i32, ptr %154, align 8, !tbaa !15
  store i32 %155, ptr %46, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %146, %136
  %157 = load ptr, ptr %39, align 8, !tbaa !11
  %158 = load ptr, ptr %27, align 8, !tbaa !11
  %159 = getelementptr inbounds %struct.squashfs_base_inode_header, ptr %158, i32 0, i32 2
  %160 = load i16, ptr %159, align 4, !tbaa !15
  %161 = zext i16 %160 to i64
  %162 = getelementptr inbounds i32, ptr %157, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = call i32 @get_uid(i32 noundef %163)
  %165 = load ptr, ptr %39, align 8, !tbaa !11
  %166 = load ptr, ptr %27, align 8, !tbaa !11
  %167 = getelementptr inbounds %struct.squashfs_base_inode_header, ptr %166, i32 0, i32 3
  %168 = load i16, ptr %167, align 2, !tbaa !15
  %169 = zext i16 %168 to i64
  %170 = getelementptr inbounds i32, ptr %165, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = call i32 @get_guid(i32 noundef %171)
  %173 = load ptr, ptr %28, align 8, !tbaa !11
  %174 = load ptr, ptr %173, align 8, !tbaa !11
  store ptr %174, ptr %40, align 8, !tbaa !11
  br label %175

175:                                              ; preds = %547, %156
  %176 = load ptr, ptr %40, align 8, !tbaa !11
  %177 = load ptr, ptr %28, align 8, !tbaa !11
  %178 = load ptr, ptr %177, align 8, !tbaa !11
  %179 = load i32, ptr %42, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds i8, ptr %178, i64 %180
  %182 = icmp ult ptr %176, %181
  br i1 %182, label %183, label %550

183:                                              ; preds = %175
  %184 = load ptr, ptr %40, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 1 %184, i64 32, i1 false)
  %185 = load ptr, ptr %39, align 8, !tbaa !11
  %186 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 2
  %187 = load i16, ptr %186, align 4, !tbaa !16
  %188 = zext i16 %187 to i64
  %189 = getelementptr inbounds i32, ptr %185, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = call i32 @get_uid(i32 noundef %190)
  %192 = load ptr, ptr %39, align 8, !tbaa !11
  %193 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 3
  %194 = load i16, ptr %193, align 2, !tbaa !19
  %195 = zext i16 %194 to i64
  %196 = getelementptr inbounds i32, ptr %192, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = call i32 @get_guid(i32 noundef %197)
  %199 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 0
  %200 = load i16, ptr %199, align 4, !tbaa !20
  %201 = zext i16 %200 to i32
  switch i32 %201, label %537 [
    i32 2, label %202
    i32 9, label %312
    i32 3, label %426
    i32 10, label %426
    i32 1, label %445
    i32 8, label %464
    i32 4, label %501
    i32 5, label %501
    i32 11, label %507
    i32 12, label %507
    i32 6, label %513
    i32 13, label %519
    i32 7, label %525
    i32 14, label %531
  ]

202:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #7
  %203 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 7
  %204 = load i32, ptr %203, align 4, !tbaa !21
  %205 = icmp eq i32 %204, -1
  br i1 %205, label %206, label %207

206:                                              ; preds = %202
  br label %214

207:                                              ; preds = %202
  %208 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 9
  %209 = load i32, ptr %208, align 4, !tbaa !22
  %210 = load ptr, ptr %26, align 8, !tbaa !11
  %211 = getelementptr inbounds %struct.squashfs_super_block, ptr %210, i32 0, i32 3
  %212 = load i32, ptr %211, align 4, !tbaa !23
  %213 = urem i32 %209, %212
  br label %214

214:                                              ; preds = %207, %206
  %215 = phi i32 [ 0, %206 ], [ %213, %207 ]
  store i32 %215, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #7
  %216 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 7
  %217 = load i32, ptr %216, align 4, !tbaa !21
  %218 = icmp eq i32 %217, -1
  br i1 %218, label %219, label %232

219:                                              ; preds = %214
  %220 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 9
  %221 = load i32, ptr %220, align 4, !tbaa !22
  %222 = load ptr, ptr %26, align 8, !tbaa !11
  %223 = getelementptr inbounds %struct.squashfs_super_block, ptr %222, i32 0, i32 3
  %224 = load i32, ptr %223, align 4, !tbaa !23
  %225 = add i32 %221, %224
  %226 = sub i32 %225, 1
  %227 = load ptr, ptr %26, align 8, !tbaa !11
  %228 = getelementptr inbounds %struct.squashfs_super_block, ptr %227, i32 0, i32 6
  %229 = load i16, ptr %228, align 2, !tbaa !25
  %230 = zext i16 %229 to i32
  %231 = lshr i32 %226, %230
  br label %240

232:                                              ; preds = %214
  %233 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 9
  %234 = load i32, ptr %233, align 4, !tbaa !22
  %235 = load ptr, ptr %26, align 8, !tbaa !11
  %236 = getelementptr inbounds %struct.squashfs_super_block, ptr %235, i32 0, i32 6
  %237 = load i16, ptr %236, align 2, !tbaa !25
  %238 = zext i16 %237 to i32
  %239 = lshr i32 %234, %238
  br label %240

240:                                              ; preds = %232, %219
  %241 = phi i32 [ %231, %219 ], [ %239, %232 ]
  store i32 %241, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #7
  store i64 0, ptr %50, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #7
  %242 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 6
  %243 = load i32, ptr %242, align 4, !tbaa !26
  %244 = zext i32 %243 to i64
  store i64 %244, ptr %52, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #7
  %245 = load i32, ptr %49, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = mul i64 %246, 4
  %248 = call noalias ptr @malloc(i64 noundef %247) #9
  store ptr %248, ptr %53, align 8, !tbaa !11
  %249 = load ptr, ptr %53, align 8, !tbaa !11
  %250 = icmp eq ptr %249, null
  br i1 %250, label %251, label %257

251:                                              ; preds = %240
  br label %252

252:                                              ; preds = %251
  %253 = load ptr, ptr @stderr, align 8, !tbaa !11
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %253, ptr noundef @.str.1) #7
  br label %255

255:                                              ; preds = %252
  br label %256

256:                                              ; preds = %255
  store i32 10, ptr %47, align 4
  br label %310

257:                                              ; preds = %240
  %258 = load ptr, ptr %40, align 8, !tbaa !11
  %259 = getelementptr inbounds i8, ptr %258, i64 32
  store ptr %259, ptr %40, align 8, !tbaa !11
  %260 = load ptr, ptr %53, align 8, !tbaa !11
  %261 = load ptr, ptr %40, align 8, !tbaa !11
  %262 = load i32, ptr %49, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = mul i64 %263, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %260, ptr align 1 %261, i64 %264, i1 false)
  %265 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 9
  %266 = load i32, ptr %265, align 4, !tbaa !22
  %267 = zext i32 %266 to i64
  %268 = load ptr, ptr %31, align 8, !tbaa !11
  %269 = load i64, ptr %268, align 8, !tbaa !9
  %270 = add nsw i64 %269, %267
  store i64 %270, ptr %268, align 8, !tbaa !9
  %271 = load ptr, ptr %33, align 8, !tbaa !11
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %271, align 4, !tbaa !5
  store i32 0, ptr %51, align 4, !tbaa !5
  br label %274

274:                                              ; preds = %288, %257
  %275 = load i32, ptr %51, align 4, !tbaa !5
  %276 = load i32, ptr %49, align 4, !tbaa !5
  %277 = icmp slt i32 %275, %276
  br i1 %277, label %278, label %291

278:                                              ; preds = %274
  %279 = load ptr, ptr %53, align 8, !tbaa !11
  %280 = load i32, ptr %51, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds i32, ptr %279, i64 %281
  %283 = load i32, ptr %282, align 4, !tbaa !5
  %284 = and i32 %283, -16777217
  %285 = zext i32 %284 to i64
  %286 = load i64, ptr %50, align 8, !tbaa !9
  %287 = add nsw i64 %286, %285
  store i64 %287, ptr %50, align 8, !tbaa !9
  br label %288

288:                                              ; preds = %278
  %289 = load i32, ptr %51, align 4, !tbaa !5
  %290 = add nsw i32 %289, 1
  store i32 %290, ptr %51, align 4, !tbaa !5
  br label %274, !llvm.loop !27

291:                                              ; preds = %274
  %292 = load i64, ptr %52, align 8, !tbaa !9
  %293 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 9
  %294 = load i32, ptr %293, align 4, !tbaa !22
  %295 = zext i32 %294 to i64
  %296 = load i64, ptr %50, align 8, !tbaa !9
  %297 = load ptr, ptr %53, align 8, !tbaa !11
  %298 = load i32, ptr %49, align 4, !tbaa !5
  %299 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 7
  %300 = load i32, ptr %299, align 4, !tbaa !21
  %301 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 8
  %302 = load i32, ptr %301, align 4, !tbaa !28
  %303 = load i32, ptr %48, align 4, !tbaa !5
  %304 = call i32 @add_file(i64 noundef %292, i64 noundef %295, i64 noundef %296, ptr noundef %297, i32 noundef %298, i32 noundef %300, i32 noundef %302, i32 noundef %303)
  %305 = load i32, ptr %49, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = mul i64 %306, 4
  %308 = load ptr, ptr %40, align 8, !tbaa !11
  %309 = getelementptr inbounds i8, ptr %308, i64 %307
  store ptr %309, ptr %40, align 8, !tbaa !11
  store i32 7, ptr %47, align 4
  br label %310

310:                                              ; preds = %291, %256
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  %311 = load i32, ptr %47, align 4
  switch i32 %311, label %555 [
    i32 7, label %546
    i32 10, label %552
  ]

312:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 56, ptr %54) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #7
  store i64 0, ptr %57, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #7
  %313 = load ptr, ptr %40, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %54, ptr align 1 %313, i64 56, i1 false)
  %314 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 10
  %315 = load i32, ptr %314, align 4, !tbaa !29
  %316 = icmp eq i32 %315, -1
  br i1 %316, label %317, label %318

317:                                              ; preds = %312
  br label %326

318:                                              ; preds = %312
  %319 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 7
  %320 = load i64, ptr %319, align 8, !tbaa !31
  %321 = load ptr, ptr %26, align 8, !tbaa !11
  %322 = getelementptr inbounds %struct.squashfs_super_block, ptr %321, i32 0, i32 3
  %323 = load i32, ptr %322, align 4, !tbaa !23
  %324 = zext i32 %323 to i64
  %325 = srem i64 %320, %324
  br label %326

326:                                              ; preds = %318, %317
  %327 = phi i64 [ 0, %317 ], [ %325, %318 ]
  %328 = trunc i64 %327 to i32
  store i32 %328, ptr %55, align 4, !tbaa !5
  %329 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 10
  %330 = load i32, ptr %329, align 4, !tbaa !29
  %331 = icmp eq i32 %330, -1
  br i1 %331, label %332, label %347

332:                                              ; preds = %326
  %333 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 7
  %334 = load i64, ptr %333, align 8, !tbaa !31
  %335 = load ptr, ptr %26, align 8, !tbaa !11
  %336 = getelementptr inbounds %struct.squashfs_super_block, ptr %335, i32 0, i32 3
  %337 = load i32, ptr %336, align 4, !tbaa !23
  %338 = zext i32 %337 to i64
  %339 = add nsw i64 %334, %338
  %340 = sub nsw i64 %339, 1
  %341 = load ptr, ptr %26, align 8, !tbaa !11
  %342 = getelementptr inbounds %struct.squashfs_super_block, ptr %341, i32 0, i32 6
  %343 = load i16, ptr %342, align 2, !tbaa !25
  %344 = zext i16 %343 to i32
  %345 = zext i32 %344 to i64
  %346 = ashr i64 %340, %345
  br label %356

347:                                              ; preds = %326
  %348 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 7
  %349 = load i64, ptr %348, align 8, !tbaa !31
  %350 = load ptr, ptr %26, align 8, !tbaa !11
  %351 = getelementptr inbounds %struct.squashfs_super_block, ptr %350, i32 0, i32 6
  %352 = load i16, ptr %351, align 2, !tbaa !25
  %353 = zext i16 %352 to i32
  %354 = zext i32 %353 to i64
  %355 = ashr i64 %349, %354
  br label %356

356:                                              ; preds = %347, %332
  %357 = phi i64 [ %346, %332 ], [ %355, %347 ]
  %358 = trunc i64 %357 to i32
  store i32 %358, ptr %56, align 4, !tbaa !5
  %359 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 6
  %360 = load i64, ptr %359, align 8, !tbaa !32
  store i64 %360, ptr %59, align 8, !tbaa !9
  %361 = load i32, ptr %56, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = mul i64 %362, 4
  %364 = call noalias ptr @malloc(i64 noundef %363) #9
  store ptr %364, ptr %60, align 8, !tbaa !11
  %365 = load ptr, ptr %60, align 8, !tbaa !11
  %366 = icmp eq ptr %365, null
  br i1 %366, label %367, label %373

367:                                              ; preds = %356
  br label %368

368:                                              ; preds = %367
  %369 = load ptr, ptr @stderr, align 8, !tbaa !11
  %370 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %369, ptr noundef @.str.1) #7
  br label %371

371:                                              ; preds = %368
  br label %372

372:                                              ; preds = %371
  store i32 10, ptr %47, align 4
  br label %424

373:                                              ; preds = %356
  %374 = load ptr, ptr %40, align 8, !tbaa !11
  %375 = getelementptr inbounds i8, ptr %374, i64 56
  store ptr %375, ptr %40, align 8, !tbaa !11
  %376 = load ptr, ptr %60, align 8, !tbaa !11
  %377 = load ptr, ptr %40, align 8, !tbaa !11
  %378 = load i32, ptr %56, align 4, !tbaa !5
  %379 = sext i32 %378 to i64
  %380 = mul i64 %379, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %376, ptr align 1 %377, i64 %380, i1 false)
  %381 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 7
  %382 = load i64, ptr %381, align 8, !tbaa !31
  %383 = load ptr, ptr %31, align 8, !tbaa !11
  %384 = load i64, ptr %383, align 8, !tbaa !9
  %385 = add nsw i64 %384, %382
  store i64 %385, ptr %383, align 8, !tbaa !9
  %386 = load ptr, ptr %33, align 8, !tbaa !11
  %387 = load i32, ptr %386, align 4, !tbaa !5
  %388 = add nsw i32 %387, 1
  store i32 %388, ptr %386, align 4, !tbaa !5
  store i32 0, ptr %58, align 4, !tbaa !5
  br label %389

389:                                              ; preds = %403, %373
  %390 = load i32, ptr %58, align 4, !tbaa !5
  %391 = load i32, ptr %56, align 4, !tbaa !5
  %392 = icmp slt i32 %390, %391
  br i1 %392, label %393, label %406

393:                                              ; preds = %389
  %394 = load ptr, ptr %60, align 8, !tbaa !11
  %395 = load i32, ptr %58, align 4, !tbaa !5
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds i32, ptr %394, i64 %396
  %398 = load i32, ptr %397, align 4, !tbaa !5
  %399 = and i32 %398, -16777217
  %400 = zext i32 %399 to i64
  %401 = load i64, ptr %57, align 8, !tbaa !9
  %402 = add nsw i64 %401, %400
  store i64 %402, ptr %57, align 8, !tbaa !9
  br label %403

403:                                              ; preds = %393
  %404 = load i32, ptr %58, align 4, !tbaa !5
  %405 = add nsw i32 %404, 1
  store i32 %405, ptr %58, align 4, !tbaa !5
  br label %389, !llvm.loop !33

406:                                              ; preds = %389
  %407 = load i64, ptr %59, align 8, !tbaa !9
  %408 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 7
  %409 = load i64, ptr %408, align 8, !tbaa !31
  %410 = load i64, ptr %57, align 8, !tbaa !9
  %411 = load ptr, ptr %60, align 8, !tbaa !11
  %412 = load i32, ptr %56, align 4, !tbaa !5
  %413 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 10
  %414 = load i32, ptr %413, align 4, !tbaa !29
  %415 = getelementptr inbounds %struct.squashfs_lreg_inode_header, ptr %54, i32 0, i32 11
  %416 = load i32, ptr %415, align 8, !tbaa !34
  %417 = load i32, ptr %55, align 4, !tbaa !5
  %418 = call i32 @add_file(i64 noundef %407, i64 noundef %409, i64 noundef %410, ptr noundef %411, i32 noundef %412, i32 noundef %414, i32 noundef %416, i32 noundef %417)
  %419 = load i32, ptr %56, align 4, !tbaa !5
  %420 = sext i32 %419 to i64
  %421 = mul i64 %420, 4
  %422 = load ptr, ptr %40, align 8, !tbaa !11
  %423 = getelementptr inbounds i8, ptr %422, i64 %421
  store ptr %423, ptr %40, align 8, !tbaa !11
  store i32 7, ptr %47, align 4
  br label %424

424:                                              ; preds = %406, %372
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %54) #7
  %425 = load i32, ptr %47, align 4
  switch i32 %425, label %555 [
    i32 7, label %546
    i32 10, label %552
  ]

426:                                              ; preds = %183, %183
  call void @llvm.lifetime.start.p0(i64 24, ptr %61) #7
  %427 = load ptr, ptr %40, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 1 %427, i64 24, i1 false)
  %428 = load ptr, ptr %34, align 8, !tbaa !11
  %429 = load i32, ptr %428, align 4, !tbaa !5
  %430 = add nsw i32 %429, 1
  store i32 %430, ptr %428, align 4, !tbaa !5
  %431 = getelementptr inbounds %struct.squashfs_symlink_inode_header, ptr %61, i32 0, i32 7
  %432 = load i32, ptr %431, align 4, !tbaa !35
  %433 = zext i32 %432 to i64
  %434 = add i64 24, %433
  %435 = load ptr, ptr %40, align 8, !tbaa !11
  %436 = getelementptr inbounds i8, ptr %435, i64 %434
  store ptr %436, ptr %40, align 8, !tbaa !11
  %437 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 0
  %438 = load i16, ptr %437, align 4, !tbaa !20
  %439 = zext i16 %438 to i32
  %440 = icmp eq i32 %439, 10
  br i1 %440, label %441, label %444

441:                                              ; preds = %426
  %442 = load ptr, ptr %40, align 8, !tbaa !11
  %443 = getelementptr inbounds i8, ptr %442, i64 4
  store ptr %443, ptr %40, align 8, !tbaa !11
  br label %444

444:                                              ; preds = %441, %426
  store i32 7, ptr %47, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %61) #7
  br label %546

445:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 32, ptr %62) #7
  %446 = load ptr, ptr %40, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 1 %446, i64 32, i1 false)
  %447 = getelementptr inbounds %struct.squashfs_dir_inode_header, ptr %62, i32 0, i32 6
  %448 = load i32, ptr %447, align 4, !tbaa !37
  %449 = load i32, ptr %46, align 4, !tbaa !5
  %450 = icmp ult i32 %448, %449
  br i1 %450, label %451, label %458

451:                                              ; preds = %445
  %452 = getelementptr inbounds %struct.squashfs_dir_inode_header, ptr %62, i32 0, i32 8
  %453 = load i16, ptr %452, align 4, !tbaa !39
  %454 = zext i16 %453 to i32
  %455 = load ptr, ptr %32, align 8, !tbaa !11
  %456 = load i32, ptr %455, align 4, !tbaa !5
  %457 = add i32 %456, %454
  store i32 %457, ptr %455, align 4, !tbaa !5
  br label %458

458:                                              ; preds = %451, %445
  %459 = load ptr, ptr %36, align 8, !tbaa !11
  %460 = load i32, ptr %459, align 4, !tbaa !5
  %461 = add nsw i32 %460, 1
  store i32 %461, ptr %459, align 4, !tbaa !5
  %462 = load ptr, ptr %40, align 8, !tbaa !11
  %463 = getelementptr inbounds i8, ptr %462, i64 32
  store ptr %463, ptr %40, align 8, !tbaa !11
  store i32 7, ptr %47, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %62) #7
  br label %546

464:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 40, ptr %63) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #7
  %465 = load ptr, ptr %40, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %63, ptr align 1 %465, i64 40, i1 false)
  %466 = getelementptr inbounds %struct.squashfs_ldir_inode_header, ptr %63, i32 0, i32 8
  %467 = load i32, ptr %466, align 4, !tbaa !40
  %468 = load i32, ptr %46, align 4, !tbaa !5
  %469 = icmp ult i32 %467, %468
  br i1 %469, label %470, label %476

470:                                              ; preds = %464
  %471 = getelementptr inbounds %struct.squashfs_ldir_inode_header, ptr %63, i32 0, i32 7
  %472 = load i32, ptr %471, align 4, !tbaa !42
  %473 = load ptr, ptr %32, align 8, !tbaa !11
  %474 = load i32, ptr %473, align 4, !tbaa !5
  %475 = add i32 %474, %472
  store i32 %475, ptr %473, align 4, !tbaa !5
  br label %476

476:                                              ; preds = %470, %464
  %477 = load ptr, ptr %36, align 8, !tbaa !11
  %478 = load i32, ptr %477, align 4, !tbaa !5
  %479 = add nsw i32 %478, 1
  store i32 %479, ptr %477, align 4, !tbaa !5
  %480 = load ptr, ptr %40, align 8, !tbaa !11
  %481 = getelementptr inbounds i8, ptr %480, i64 40
  store ptr %481, ptr %40, align 8, !tbaa !11
  store i32 0, ptr %64, align 4, !tbaa !5
  br label %482

482:                                              ; preds = %497, %476
  %483 = load i32, ptr %64, align 4, !tbaa !5
  %484 = getelementptr inbounds %struct.squashfs_ldir_inode_header, ptr %63, i32 0, i32 10
  %485 = load i16, ptr %484, align 4, !tbaa !43
  %486 = zext i16 %485 to i32
  %487 = icmp slt i32 %483, %486
  br i1 %487, label %488, label %500

488:                                              ; preds = %482
  call void @llvm.lifetime.start.p0(i64 12, ptr %65) #7
  %489 = load ptr, ptr %40, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 1 %489, i64 12, i1 false)
  %490 = getelementptr inbounds %struct.squashfs_dir_index, ptr %65, i32 0, i32 2
  %491 = load i32, ptr %490, align 4, !tbaa !44
  %492 = zext i32 %491 to i64
  %493 = add i64 12, %492
  %494 = add i64 %493, 1
  %495 = load ptr, ptr %40, align 8, !tbaa !11
  %496 = getelementptr inbounds i8, ptr %495, i64 %494
  store ptr %496, ptr %40, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %65) #7
  br label %497

497:                                              ; preds = %488
  %498 = load i32, ptr %64, align 4, !tbaa !5
  %499 = add nsw i32 %498, 1
  store i32 %499, ptr %64, align 4, !tbaa !5
  br label %482, !llvm.loop !46

500:                                              ; preds = %482
  store i32 7, ptr %47, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %63) #7
  br label %546

501:                                              ; preds = %183, %183
  %502 = load ptr, ptr %35, align 8, !tbaa !11
  %503 = load i32, ptr %502, align 4, !tbaa !5
  %504 = add nsw i32 %503, 1
  store i32 %504, ptr %502, align 4, !tbaa !5
  %505 = load ptr, ptr %40, align 8, !tbaa !11
  %506 = getelementptr inbounds i8, ptr %505, i64 24
  store ptr %506, ptr %40, align 8, !tbaa !11
  br label %546

507:                                              ; preds = %183, %183
  %508 = load ptr, ptr %35, align 8, !tbaa !11
  %509 = load i32, ptr %508, align 4, !tbaa !5
  %510 = add nsw i32 %509, 1
  store i32 %510, ptr %508, align 4, !tbaa !5
  %511 = load ptr, ptr %40, align 8, !tbaa !11
  %512 = getelementptr inbounds i8, ptr %511, i64 28
  store ptr %512, ptr %40, align 8, !tbaa !11
  br label %546

513:                                              ; preds = %183
  %514 = load ptr, ptr %37, align 8, !tbaa !11
  %515 = load i32, ptr %514, align 4, !tbaa !5
  %516 = add nsw i32 %515, 1
  store i32 %516, ptr %514, align 4, !tbaa !5
  %517 = load ptr, ptr %40, align 8, !tbaa !11
  %518 = getelementptr inbounds i8, ptr %517, i64 20
  store ptr %518, ptr %40, align 8, !tbaa !11
  br label %546

519:                                              ; preds = %183
  %520 = load ptr, ptr %37, align 8, !tbaa !11
  %521 = load i32, ptr %520, align 4, !tbaa !5
  %522 = add nsw i32 %521, 1
  store i32 %522, ptr %520, align 4, !tbaa !5
  %523 = load ptr, ptr %40, align 8, !tbaa !11
  %524 = getelementptr inbounds i8, ptr %523, i64 24
  store ptr %524, ptr %40, align 8, !tbaa !11
  br label %546

525:                                              ; preds = %183
  %526 = load ptr, ptr %38, align 8, !tbaa !11
  %527 = load i32, ptr %526, align 4, !tbaa !5
  %528 = add nsw i32 %527, 1
  store i32 %528, ptr %526, align 4, !tbaa !5
  %529 = load ptr, ptr %40, align 8, !tbaa !11
  %530 = getelementptr inbounds i8, ptr %529, i64 20
  store ptr %530, ptr %40, align 8, !tbaa !11
  br label %546

531:                                              ; preds = %183
  %532 = load ptr, ptr %38, align 8, !tbaa !11
  %533 = load i32, ptr %532, align 4, !tbaa !5
  %534 = add nsw i32 %533, 1
  store i32 %534, ptr %532, align 4, !tbaa !5
  %535 = load ptr, ptr %40, align 8, !tbaa !11
  %536 = getelementptr inbounds i8, ptr %535, i64 24
  store ptr %536, ptr %40, align 8, !tbaa !11
  br label %546

537:                                              ; preds = %183
  br label %538

538:                                              ; preds = %537
  %539 = load ptr, ptr @stderr, align 8, !tbaa !11
  %540 = getelementptr inbounds %struct.squashfs_reg_inode_header, ptr %45, i32 0, i32 0
  %541 = load i16, ptr %540, align 4, !tbaa !20
  %542 = zext i16 %541 to i32
  %543 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %539, ptr noundef @.str.2, i32 noundef %542) #7
  br label %544

544:                                              ; preds = %538
  br label %545

545:                                              ; preds = %544
  br label %552

546:                                              ; preds = %531, %525, %519, %513, %507, %501, %500, %458, %444, %424, %310
  br label %547

547:                                              ; preds = %546
  %548 = load i32, ptr %44, align 4, !tbaa !5
  %549 = add nsw i32 %548, 1
  store i32 %549, ptr %44, align 4, !tbaa !5
  br label %175, !llvm.loop !47

550:                                              ; preds = %175
  %551 = load i32, ptr %44, align 4, !tbaa !5
  store i32 %551, ptr %20, align 4
  store i32 1, ptr %47, align 4
  br label %555

552:                                              ; preds = %545, %424, %310
  %553 = load ptr, ptr %28, align 8, !tbaa !11
  %554 = load ptr, ptr %553, align 8, !tbaa !11
  call void @free(ptr noundef %554) #7
  store i32 0, ptr %20, align 4
  store i32 1, ptr %47, align 4
  br label %555

555:                                              ; preds = %552, %550, %424, %310, %106, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  %556 = load i32, ptr %20, align 4
  ret i32 %556
}

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @get_uid(i32 noundef) #5

declare i32 @get_guid(i32 noundef) #5

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

declare i32 @add_file(i64 noundef, i64 noundef, i64 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #5

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

!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 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !18, i64 4}
!17 = !{!"squashfs_reg_inode_header", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !7, i64 32}
!18 = !{!"short", !7, i64 0}
!19 = !{!17, !18, i64 6}
!20 = !{!17, !18, i64 0}
!21 = !{!17, !6, i64 20}
!22 = !{!17, !6, i64 28}
!23 = !{!24, !6, i64 12}
!24 = !{!"squashfs_super_block", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !18, i64 20, !18, i64 22, !18, i64 24, !18, i64 26, !18, i64 28, !18, i64 30, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88}
!25 = !{!24, !18, i64 22}
!26 = !{!17, !6, i64 16}
!27 = distinct !{!27, !14}
!28 = !{!17, !6, i64 24}
!29 = !{!30, !6, i64 44}
!30 = !{!"squashfs_lreg_inode_header", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !7, i64 56}
!31 = !{!30, !10, i64 24}
!32 = !{!30, !10, i64 16}
!33 = distinct !{!33, !14}
!34 = !{!30, !6, i64 48}
!35 = !{!36, !6, i64 20}
!36 = !{!"squashfs_symlink_inode_header", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !7, i64 24}
!37 = !{!38, !6, i64 16}
!38 = !{!"squashfs_dir_inode_header", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !18, i64 24, !18, i64 26, !6, i64 28}
!39 = !{!38, !18, i64 24}
!40 = !{!41, !6, i64 24}
!41 = !{!"squashfs_ldir_inode_header", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !18, i64 32, !18, i64 34, !6, i64 36, !7, i64 40}
!42 = !{!41, !6, i64 20}
!43 = !{!41, !18, i64 32}
!44 = !{!45, !6, i64 8}
!45 = !{!"squashfs_dir_index", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 12}
!46 = distinct !{!46, !14}
!47 = distinct !{!47, !14}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @read_block(i32 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @scan_inode_table(i32 noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i32 noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef %6, ptr nocapture noundef %7, ptr nocapture noundef %8, ptr nocapture noundef writeonly %9, ptr nocapture noundef %10, ptr nocapture noundef %11, ptr nocapture noundef %12, ptr nocapture noundef %13, ptr nocapture noundef %14, ptr nocapture noundef %15, ptr nocapture noundef %16, ptr nocapture noundef %17, ptr nocapture noundef readonly %18) local_unnamed_addr #0 {
  %20 = alloca i64, align 8
  store i64 %1, ptr %20, align 8, !tbaa !5
  %21 = icmp slt i64 %1, %2
  br i1 %21, label %.lr.ph, label %._crit_edge

22:                                               ; preds = %37
  %23 = add nsw i32 %42, %.0169205
  %24 = load i64, ptr %20, align 8, !tbaa !5
  %25 = icmp slt i64 %24, %2
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph:                                           ; preds = %19, %22
  %26 = phi i64 [ %24, %22 ], [ %1, %19 ]
  %.0169205 = phi i32 [ %23, %22 ], [ 0, %19 ]
  %.0170204 = phi i32 [ %.1171, %22 ], [ 0, %19 ]
  %27 = icmp eq i64 %26, %3
  br i1 %27, label %28, label %29

28:                                               ; preds = %.lr.ph
  store i32 %.0169205, ptr %8, align 4, !tbaa !11
  br label %29

29:                                               ; preds = %28, %.lr.ph
  %30 = sub nsw i32 %.0170204, %.0169205
  %31 = icmp slt i32 %30, 8192
  %.pre242 = load ptr, ptr %7, align 8, !tbaa !13
  br i1 %31, label %32, label %37

32:                                               ; preds = %29
  %33 = add nsw i32 %.0170204, 8192
  %34 = sext i32 %33 to i64
  %35 = call ptr @realloc(ptr noundef %.pre242, i64 noundef %34) #8
  store ptr %35, ptr %7, align 8, !tbaa !13
  %36 = icmp eq ptr %35, null
  br i1 %36, label %.loopexit195, label %._crit_edge241

._crit_edge241:                                   ; preds = %32
  %.pre = load i64, ptr %20, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %._crit_edge241, %29
  %38 = phi ptr [ %35, %._crit_edge241 ], [ %.pre242, %29 ]
  %39 = phi i64 [ %.pre, %._crit_edge241 ], [ %26, %29 ]
  %.1171 = phi i32 [ %33, %._crit_edge241 ], [ %.0170204, %29 ]
  %40 = sext i32 %.0169205 to i64
  %41 = getelementptr inbounds i8, ptr %38, i64 %40
  %42 = call i32 @read_block(i32 noundef %0, i64 noundef %39, ptr noundef nonnull %20, ptr noundef %41)
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %.loopexit195.sink.split, label %22

._crit_edge:                                      ; preds = %22, %19
  %.0169.lcssa = phi i32 [ 0, %19 ], [ %23, %22 ]
  %44 = load i32, ptr %8, align 4, !tbaa !11
  %45 = add i32 %44, %4
  %46 = sub i32 %.0169.lcssa, %45
  store i32 %46, ptr %9, align 4, !tbaa !11
  %47 = load i32, ptr %8, align 4, !tbaa !11
  %48 = add i32 %47, %4
  %49 = load ptr, ptr %7, align 8, !tbaa !13
  %50 = sext i32 %48 to i64
  %51 = getelementptr inbounds i8, ptr %49, i64 %50
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 1 dereferenceable(16) %51, i64 16, i1 false)
  %52 = load i16, ptr %6, align 8, !tbaa !15
  %53 = icmp eq i16 %52, 1
  %54 = load ptr, ptr %7, align 8, !tbaa !13
  %55 = getelementptr inbounds i8, ptr %54, i64 %50
  br i1 %53, label %56, label %57

56:                                               ; preds = %._crit_edge
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 1 dereferenceable(32) %55, i64 32, i1 false)
  br label %58

57:                                               ; preds = %._crit_edge
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 1 dereferenceable(40) %55, i64 40, i1 false)
  br label %58

58:                                               ; preds = %57, %56
  %.sink = phi i64 [ 24, %57 ], [ 16, %56 ]
  %59 = getelementptr inbounds i8, ptr %6, i64 %.sink
  %.0173 = load i32, ptr %59, align 8, !tbaa !15
  %60 = getelementptr inbounds i8, ptr %6, i64 4
  %61 = load i16, ptr %60, align 4, !tbaa !15
  %62 = zext i16 %61 to i64
  %63 = getelementptr inbounds i32, ptr %18, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = call i32 @get_uid(i32 noundef %64) #9
  %66 = getelementptr inbounds i8, ptr %6, i64 6
  %67 = load i16, ptr %66, align 2, !tbaa !15
  %68 = zext i16 %67 to i64
  %69 = getelementptr inbounds i32, ptr %18, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !11
  %71 = call i32 @get_guid(i32 noundef %70) #9
  %72 = icmp sgt i32 %48, 0
  br i1 %72, label %.lr.ph224, label %.loopexit195

.lr.ph224:                                        ; preds = %58
  %73 = load ptr, ptr %7, align 8, !tbaa !13
  %74 = getelementptr inbounds i8, ptr %5, i64 12
  %75 = getelementptr inbounds i8, ptr %5, i64 22
  br label %76

76:                                               ; preds = %.lr.ph224, %.loopexit
  %.0168222 = phi ptr [ %73, %.lr.ph224 ], [ %.5, %.loopexit ]
  %.0172221 = phi i32 [ 0, %.lr.ph224 ], [ %251, %.loopexit ]
  %.sroa.057.0.copyload = load i16, ptr %.0168222, align 1
  %.sroa.661.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 4
  %.sroa.661.0.copyload = load i16, ptr %.sroa.661.0..sroa_idx, align 1
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 6
  %.sroa.7.0.copyload = load i16, ptr %.sroa.7.0..sroa_idx, align 1
  %.sroa.862.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 16
  %.sroa.862.0.copyload = load i32, ptr %.sroa.862.0..sroa_idx, align 1
  %.sroa.963.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 20
  %.sroa.963.0.copyload = load i32, ptr %.sroa.963.0..sroa_idx, align 1
  %.sroa.1266.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 24
  %.sroa.1266.0.copyload = load i32, ptr %.sroa.1266.0..sroa_idx, align 1
  %.sroa.1367.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 28
  %.sroa.1367.0.copyload = load i32, ptr %.sroa.1367.0..sroa_idx, align 1
  %77 = zext i16 %.sroa.661.0.copyload to i64
  %78 = getelementptr inbounds i32, ptr %18, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !11
  %80 = call i32 @get_uid(i32 noundef %79) #9
  %81 = zext i16 %.sroa.7.0.copyload to i64
  %82 = getelementptr inbounds i32, ptr %18, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !11
  %84 = call i32 @get_guid(i32 noundef %83) #9
  switch i16 %.sroa.057.0.copyload, label %244 [
    i16 2, label %85
    i16 9, label %131
    i16 3, label %177
    i16 10, label %177
    i16 1, label %184
    i16 8, label %194
    i16 4, label %226
    i16 5, label %226
    i16 11, label %229
    i16 12, label %229
    i16 6, label %232
    i16 13, label %235
    i16 7, label %238
    i16 14, label %241
  ]

85:                                               ; preds = %76
  %86 = icmp eq i32 %.sroa.963.0.copyload, -1
  %87 = load i32, ptr %74, align 4, !tbaa !16
  br i1 %86, label %88, label %91

88:                                               ; preds = %85
  %89 = add i32 %.sroa.1367.0.copyload, -1
  %90 = add i32 %89, %87
  br label %93

91:                                               ; preds = %85
  %92 = urem i32 %.sroa.1367.0.copyload, %87
  br label %93

93:                                               ; preds = %91, %88
  %.sroa.1367.0.copyload.sink = phi i32 [ %.sroa.1367.0.copyload, %91 ], [ %90, %88 ]
  %94 = phi i32 [ %92, %91 ], [ 0, %88 ]
  %95 = load i16, ptr %75, align 2, !tbaa !19
  %96 = zext nneg i16 %95 to i32
  %97 = lshr i32 %.sroa.1367.0.copyload.sink, %96
  %98 = zext i32 %.sroa.862.0.copyload to i64
  %99 = sext i32 %97 to i64
  %100 = shl nsw i64 %99, 2
  %101 = call noalias ptr @malloc(i64 noundef %100) #10
  %102 = icmp eq ptr %101, null
  br i1 %102, label %128, label %103

103:                                              ; preds = %93
  %104 = getelementptr inbounds i8, ptr %.0168222, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %101, ptr nonnull align 1 %104, i64 %100, i1 false)
  %105 = zext i32 %.sroa.1367.0.copyload to i64
  %106 = load i64, ptr %10, align 8, !tbaa !5
  %107 = add nsw i64 %106, %105
  store i64 %107, ptr %10, align 8, !tbaa !5
  %108 = load i32, ptr %12, align 4, !tbaa !11
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %12, align 4, !tbaa !11
  %110 = icmp sgt i32 %97, 0
  br i1 %110, label %.lr.ph219.preheader, label %.thread186

.lr.ph219.preheader:                              ; preds = %103
  %wide.trip.count239 = zext nneg i32 %97 to i64
  %min.iters.check = icmp ult i32 %97, 4
  br i1 %min.iters.check, label %.lr.ph219.preheader281, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph219.preheader
  %n.vec = and i64 %wide.trip.count239, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %117, %vector.body ]
  %vec.phi262 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %118, %vector.body ]
  %111 = getelementptr inbounds i32, ptr %101, i64 %index
  %112 = getelementptr inbounds i8, ptr %111, i64 8
  %wide.load = load <2 x i32>, ptr %111, align 4, !tbaa !11
  %wide.load263 = load <2 x i32>, ptr %112, align 4, !tbaa !11
  %113 = and <2 x i32> %wide.load, <i32 -16777217, i32 -16777217>
  %114 = and <2 x i32> %wide.load263, <i32 -16777217, i32 -16777217>
  %115 = zext <2 x i32> %113 to <2 x i64>
  %116 = zext <2 x i32> %114 to <2 x i64>
  %117 = add <2 x i64> %vec.phi, %115
  %118 = add <2 x i64> %vec.phi262, %116
  %index.next = add nuw i64 %index, 4
  %119 = icmp eq i64 %index.next, %n.vec
  br i1 %119, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %118, %117
  %120 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count239
  br i1 %cmp.n, label %.thread186, label %.lr.ph219.preheader281

.lr.ph219.preheader281:                           ; preds = %middle.block, %.lr.ph219.preheader
  %indvars.iv236.ph = phi i64 [ 0, %.lr.ph219.preheader ], [ %n.vec, %middle.block ]
  %.0176217.ph = phi i64 [ 0, %.lr.ph219.preheader ], [ %120, %middle.block ]
  br label %.lr.ph219

.lr.ph219:                                        ; preds = %.lr.ph219.preheader281, %.lr.ph219
  %indvars.iv236 = phi i64 [ %indvars.iv.next237, %.lr.ph219 ], [ %indvars.iv236.ph, %.lr.ph219.preheader281 ]
  %.0176217 = phi i64 [ %125, %.lr.ph219 ], [ %.0176217.ph, %.lr.ph219.preheader281 ]
  %121 = getelementptr inbounds i32, ptr %101, i64 %indvars.iv236
  %122 = load i32, ptr %121, align 4, !tbaa !11
  %123 = and i32 %122, -16777217
  %124 = zext i32 %123 to i64
  %125 = add nuw nsw i64 %.0176217, %124
  %indvars.iv.next237 = add nuw nsw i64 %indvars.iv236, 1
  %exitcond240.not = icmp eq i64 %indvars.iv.next237, %wide.trip.count239
  br i1 %exitcond240.not, label %.thread186, label %.lr.ph219, !llvm.loop !23

.thread186:                                       ; preds = %.lr.ph219, %middle.block, %103
  %.0176.lcssa = phi i64 [ 0, %103 ], [ %120, %middle.block ], [ %125, %.lr.ph219 ]
  %126 = call i32 @add_file(i64 noundef %98, i64 noundef %105, i64 noundef %.0176.lcssa, ptr noundef nonnull %101, i32 noundef %97, i32 noundef %.sroa.963.0.copyload, i32 noundef %.sroa.1266.0.copyload, i32 noundef %94) #9
  %127 = getelementptr inbounds i8, ptr %104, i64 %100
  br label %.loopexit

128:                                              ; preds = %93
  %129 = load ptr, ptr @stderr, align 8, !tbaa !13
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef nonnull @.str.1) #11
  br label %.loopexit195.sink.split

131:                                              ; preds = %76
  %.sroa.328.0.copyload = load i64, ptr %.sroa.862.0..sroa_idx, align 1
  %.sroa.429.0.copyload = load i64, ptr %.sroa.1266.0..sroa_idx, align 1
  %.sroa.934.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 44
  %.sroa.934.0.copyload = load i32, ptr %.sroa.934.0..sroa_idx, align 1
  %.sroa.12.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 48
  %.sroa.12.0.copyload = load i32, ptr %.sroa.12.0..sroa_idx, align 1
  %132 = icmp eq i32 %.sroa.934.0.copyload, -1
  %133 = load i32, ptr %74, align 4, !tbaa !16
  %134 = zext i32 %133 to i64
  %135 = load i16, ptr %75, align 2, !tbaa !19
  %136 = zext nneg i16 %135 to i64
  br i1 %132, label %137, label %140

137:                                              ; preds = %131
  %138 = add i64 %.sroa.429.0.copyload, -1
  %139 = add i64 %138, %134
  br label %143

140:                                              ; preds = %131
  %141 = srem i64 %.sroa.429.0.copyload, %134
  %142 = trunc i64 %141 to i32
  br label %143

143:                                              ; preds = %140, %137
  %.sroa.429.0.copyload.sink = phi i64 [ %.sroa.429.0.copyload, %140 ], [ %139, %137 ]
  %144 = phi i32 [ %142, %140 ], [ 0, %137 ]
  %145 = ashr i64 %.sroa.429.0.copyload.sink, %136
  %146 = trunc i64 %145 to i32
  %sext = shl i64 %145, 32
  %147 = ashr exact i64 %sext, 30
  %148 = call noalias ptr @malloc(i64 noundef %147) #10
  %149 = icmp eq ptr %148, null
  br i1 %149, label %174, label %150

150:                                              ; preds = %143
  %151 = getelementptr inbounds i8, ptr %.0168222, i64 56
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %148, ptr nonnull align 1 %151, i64 %147, i1 false)
  %152 = load i64, ptr %10, align 8, !tbaa !5
  %153 = add nsw i64 %152, %.sroa.429.0.copyload
  store i64 %153, ptr %10, align 8, !tbaa !5
  %154 = load i32, ptr %12, align 4, !tbaa !11
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %12, align 4, !tbaa !11
  %156 = icmp sgt i32 %146, 0
  br i1 %156, label %.lr.ph214.preheader, label %.thread190

.lr.ph214.preheader:                              ; preds = %150
  %wide.trip.count = and i64 %145, 2147483647
  %min.iters.check266 = icmp ult i64 %wide.trip.count, 4
  br i1 %min.iters.check266, label %.lr.ph214.preheader282, label %vector.ph267

vector.ph267:                                     ; preds = %.lr.ph214.preheader
  %n.mod.vf268 = and i64 %145, 3
  %n.vec269 = sub nsw i64 %wide.trip.count, %n.mod.vf268
  br label %vector.body271

vector.body271:                                   ; preds = %vector.body271, %vector.ph267
  %index272 = phi i64 [ 0, %vector.ph267 ], [ %index.next277, %vector.body271 ]
  %vec.phi273 = phi <2 x i64> [ zeroinitializer, %vector.ph267 ], [ %163, %vector.body271 ]
  %vec.phi274 = phi <2 x i64> [ zeroinitializer, %vector.ph267 ], [ %164, %vector.body271 ]
  %157 = getelementptr inbounds i32, ptr %148, i64 %index272
  %158 = getelementptr inbounds i8, ptr %157, i64 8
  %wide.load275 = load <2 x i32>, ptr %157, align 4, !tbaa !11
  %wide.load276 = load <2 x i32>, ptr %158, align 4, !tbaa !11
  %159 = and <2 x i32> %wide.load275, <i32 -16777217, i32 -16777217>
  %160 = and <2 x i32> %wide.load276, <i32 -16777217, i32 -16777217>
  %161 = zext <2 x i32> %159 to <2 x i64>
  %162 = zext <2 x i32> %160 to <2 x i64>
  %163 = add <2 x i64> %vec.phi273, %161
  %164 = add <2 x i64> %vec.phi274, %162
  %index.next277 = add nuw i64 %index272, 4
  %165 = icmp eq i64 %index.next277, %n.vec269
  br i1 %165, label %middle.block264, label %vector.body271, !llvm.loop !24

middle.block264:                                  ; preds = %vector.body271
  %bin.rdx278 = add <2 x i64> %164, %163
  %166 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx278)
  %cmp.n279 = icmp eq i64 %n.mod.vf268, 0
  br i1 %cmp.n279, label %.thread190, label %.lr.ph214.preheader282

.lr.ph214.preheader282:                           ; preds = %middle.block264, %.lr.ph214.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph214.preheader ], [ %n.vec269, %middle.block264 ]
  %.0178212.ph = phi i64 [ 0, %.lr.ph214.preheader ], [ %166, %middle.block264 ]
  br label %.lr.ph214

.lr.ph214:                                        ; preds = %.lr.ph214.preheader282, %.lr.ph214
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph214 ], [ %indvars.iv.ph, %.lr.ph214.preheader282 ]
  %.0178212 = phi i64 [ %171, %.lr.ph214 ], [ %.0178212.ph, %.lr.ph214.preheader282 ]
  %167 = getelementptr inbounds i32, ptr %148, i64 %indvars.iv
  %168 = load i32, ptr %167, align 4, !tbaa !11
  %169 = and i32 %168, -16777217
  %170 = zext i32 %169 to i64
  %171 = add nuw nsw i64 %.0178212, %170
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond235.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond235.not, label %.thread190, label %.lr.ph214, !llvm.loop !25

.thread190:                                       ; preds = %.lr.ph214, %middle.block264, %150
  %.0178.lcssa = phi i64 [ 0, %150 ], [ %166, %middle.block264 ], [ %171, %.lr.ph214 ]
  %172 = call i32 @add_file(i64 noundef %.sroa.328.0.copyload, i64 noundef %.sroa.429.0.copyload, i64 noundef %.0178.lcssa, ptr noundef nonnull %148, i32 noundef %146, i32 noundef %.sroa.934.0.copyload, i32 noundef %.sroa.12.0.copyload, i32 noundef %144) #9
  %173 = getelementptr inbounds i8, ptr %151, i64 %147
  br label %.loopexit

174:                                              ; preds = %143
  %175 = load ptr, ptr @stderr, align 8, !tbaa !13
  %176 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef nonnull @.str.1) #11
  br label %.loopexit195.sink.split

177:                                              ; preds = %76, %76
  %.sroa.311.0.copyload = load i32, ptr %.sroa.963.0..sroa_idx, align 1
  %178 = load i32, ptr %13, align 4, !tbaa !11
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %13, align 4, !tbaa !11
  %180 = zext i32 %.sroa.311.0.copyload to i64
  %181 = add nuw nsw i64 %180, 24
  %182 = getelementptr inbounds i8, ptr %.0168222, i64 %181
  %183 = icmp eq i16 %.sroa.057.0.copyload, 10
  %spec.select.idx = select i1 %183, i64 4, i64 0
  %spec.select = getelementptr inbounds i8, ptr %182, i64 %spec.select.idx
  br label %.loopexit

184:                                              ; preds = %76
  %.sroa.36.0.copyload = load i32, ptr %.sroa.862.0..sroa_idx, align 1
  %185 = icmp ult i32 %.sroa.36.0.copyload, %.0173
  br i1 %185, label %186, label %190

186:                                              ; preds = %184
  %.sroa.48.0.copyload = load i16, ptr %.sroa.1266.0..sroa_idx, align 1
  %187 = zext i16 %.sroa.48.0.copyload to i32
  %188 = load i32, ptr %11, align 4, !tbaa !11
  %189 = add i32 %188, %187
  store i32 %189, ptr %11, align 4, !tbaa !11
  br label %190

190:                                              ; preds = %186, %184
  %191 = load i32, ptr %15, align 4, !tbaa !11
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %15, align 4, !tbaa !11
  %193 = getelementptr inbounds i8, ptr %.0168222, i64 32
  br label %.loopexit

194:                                              ; preds = %76
  %.sroa.4.0.copyload = load i32, ptr %.sroa.1266.0..sroa_idx, align 1
  %.sroa.54.0..sroa_idx = getelementptr inbounds i8, ptr %.0168222, i64 32
  %.sroa.54.0.copyload = load i16, ptr %.sroa.54.0..sroa_idx, align 1
  %195 = icmp ult i32 %.sroa.4.0.copyload, %.0173
  br i1 %195, label %196, label %199

196:                                              ; preds = %194
  %.sroa.33.0.copyload = load i32, ptr %.sroa.963.0..sroa_idx, align 1
  %197 = load i32, ptr %11, align 4, !tbaa !11
  %198 = add i32 %197, %.sroa.33.0.copyload
  store i32 %198, ptr %11, align 4, !tbaa !11
  br label %199

199:                                              ; preds = %196, %194
  %200 = load i32, ptr %15, align 4, !tbaa !11
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %15, align 4, !tbaa !11
  %202 = getelementptr inbounds i8, ptr %.0168222, i64 40
  %203 = zext i16 %.sroa.54.0.copyload to i32
  %.not = icmp eq i16 %.sroa.54.0.copyload, 0
  br i1 %.not, label %.loopexit, label %.lr.ph209.preheader

.lr.ph209.preheader:                              ; preds = %199
  %xtraiter = and i32 %203, 7
  %204 = icmp ult i16 %.sroa.54.0.copyload, 8
  br i1 %204, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph209.preheader.new

.lr.ph209.preheader.new:                          ; preds = %.lr.ph209.preheader
  %unroll_iter = and i32 %203, 65528
  br label %.lr.ph209

.lr.ph209:                                        ; preds = %.lr.ph209, %.lr.ph209.preheader.new
  %.4206 = phi ptr [ %202, %.lr.ph209.preheader.new ], [ %225, %.lr.ph209 ]
  %niter = phi i32 [ 0, %.lr.ph209.preheader.new ], [ %niter.next.7, %.lr.ph209 ]
  %.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %.4206, i64 8
  %.sroa.3.0.copyload = load i32, ptr %.sroa.3.0..sroa_idx, align 1
  %205 = zext i32 %.sroa.3.0.copyload to i64
  %206 = add nuw nsw i64 %205, 13
  %207 = getelementptr inbounds i8, ptr %.4206, i64 %206
  %.sroa.3.0..sroa_idx.1 = getelementptr inbounds i8, ptr %207, i64 8
  %.sroa.3.0.copyload.1 = load i32, ptr %.sroa.3.0..sroa_idx.1, align 1
  %208 = zext i32 %.sroa.3.0.copyload.1 to i64
  %209 = getelementptr inbounds i8, ptr %207, i64 %208
  %.sroa.3.0..sroa_idx.2 = getelementptr inbounds i8, ptr %209, i64 21
  %.sroa.3.0.copyload.2 = load i32, ptr %.sroa.3.0..sroa_idx.2, align 1
  %210 = zext i32 %.sroa.3.0.copyload.2 to i64
  %211 = getelementptr i8, ptr %209, i64 26
  %212 = getelementptr i8, ptr %211, i64 %210
  %.sroa.3.0..sroa_idx.3 = getelementptr inbounds i8, ptr %212, i64 8
  %.sroa.3.0.copyload.3 = load i32, ptr %.sroa.3.0..sroa_idx.3, align 1
  %213 = zext i32 %.sroa.3.0.copyload.3 to i64
  %214 = getelementptr inbounds i8, ptr %212, i64 %213
  %.sroa.3.0..sroa_idx.4 = getelementptr inbounds i8, ptr %214, i64 21
  %.sroa.3.0.copyload.4 = load i32, ptr %.sroa.3.0..sroa_idx.4, align 1
  %215 = zext i32 %.sroa.3.0.copyload.4 to i64
  %216 = getelementptr i8, ptr %214, i64 26
  %217 = getelementptr i8, ptr %216, i64 %215
  %.sroa.3.0..sroa_idx.5 = getelementptr inbounds i8, ptr %217, i64 8
  %.sroa.3.0.copyload.5 = load i32, ptr %.sroa.3.0..sroa_idx.5, align 1
  %218 = zext i32 %.sroa.3.0.copyload.5 to i64
  %219 = getelementptr inbounds i8, ptr %217, i64 %218
  %.sroa.3.0..sroa_idx.6 = getelementptr inbounds i8, ptr %219, i64 21
  %.sroa.3.0.copyload.6 = load i32, ptr %.sroa.3.0..sroa_idx.6, align 1
  %220 = zext i32 %.sroa.3.0.copyload.6 to i64
  %221 = getelementptr i8, ptr %219, i64 26
  %222 = getelementptr i8, ptr %221, i64 %220
  %.sroa.3.0..sroa_idx.7 = getelementptr inbounds i8, ptr %222, i64 8
  %.sroa.3.0.copyload.7 = load i32, ptr %.sroa.3.0..sroa_idx.7, align 1
  %223 = zext i32 %.sroa.3.0.copyload.7 to i64
  %224 = getelementptr inbounds i8, ptr %222, i64 %223
  %225 = getelementptr inbounds i8, ptr %224, i64 13
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph209, !llvm.loop !26

226:                                              ; preds = %76, %76
  %227 = load i32, ptr %14, align 4, !tbaa !11
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %14, align 4, !tbaa !11
  br label %.loopexit

229:                                              ; preds = %76, %76
  %230 = load i32, ptr %14, align 4, !tbaa !11
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %14, align 4, !tbaa !11
  br label %.loopexit

232:                                              ; preds = %76
  %233 = load i32, ptr %16, align 4, !tbaa !11
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %16, align 4, !tbaa !11
  br label %.loopexit

235:                                              ; preds = %76
  %236 = load i32, ptr %16, align 4, !tbaa !11
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %16, align 4, !tbaa !11
  br label %.loopexit

238:                                              ; preds = %76
  %239 = load i32, ptr %17, align 4, !tbaa !11
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %17, align 4, !tbaa !11
  br label %.loopexit

241:                                              ; preds = %76
  %242 = load i32, ptr %17, align 4, !tbaa !11
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %17, align 4, !tbaa !11
  br label %.loopexit

244:                                              ; preds = %76
  %245 = zext i16 %.sroa.057.0.copyload to i32
  %246 = load ptr, ptr @stderr, align 8, !tbaa !13
  %247 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %246, ptr noundef nonnull @.str.2, i32 noundef %245) #11
  br label %.loopexit195.sink.split

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph209, %.lr.ph209.preheader
  %.lcssa.ph = phi ptr [ poison, %.lr.ph209.preheader ], [ %225, %.lr.ph209 ]
  %.4206.unr = phi ptr [ %202, %.lr.ph209.preheader ], [ %225, %.lr.ph209 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph209.epil

.lr.ph209.epil:                                   ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph209.epil
  %.4206.epil = phi ptr [ %250, %.lr.ph209.epil ], [ %.4206.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph209.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %.sroa.3.0..sroa_idx.epil = getelementptr inbounds i8, ptr %.4206.epil, i64 8
  %.sroa.3.0.copyload.epil = load i32, ptr %.sroa.3.0..sroa_idx.epil, align 1
  %248 = zext i32 %.sroa.3.0.copyload.epil to i64
  %249 = add nuw nsw i64 %248, 13
  %250 = getelementptr inbounds i8, ptr %.4206.epil, i64 %249
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph209.epil, !llvm.loop !27

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph209.epil, %199, %.thread190, %.thread186, %177, %190, %226, %229, %232, %235, %238, %241
  %.5 = phi ptr [ %.sroa.1266.0..sroa_idx, %241 ], [ %.sroa.963.0..sroa_idx, %238 ], [ %.sroa.1266.0..sroa_idx, %235 ], [ %.sroa.963.0..sroa_idx, %232 ], [ %.sroa.1367.0..sroa_idx, %229 ], [ %.sroa.1266.0..sroa_idx, %226 ], [ %193, %190 ], [ %spec.select, %177 ], [ %127, %.thread186 ], [ %173, %.thread190 ], [ %202, %199 ], [ %.lcssa.ph, %.loopexit.loopexit.unr-lcssa ], [ %250, %.lr.ph209.epil ]
  %251 = add nuw nsw i32 %.0172221, 1
  %252 = load ptr, ptr %7, align 8, !tbaa !13
  %253 = getelementptr inbounds i8, ptr %252, i64 %50
  %254 = icmp ult ptr %.5, %253
  br i1 %254, label %76, label %.loopexit195, !llvm.loop !29

.loopexit195.sink.split:                          ; preds = %37, %244, %128, %174
  %255 = load ptr, ptr %7, align 8, !tbaa !13
  call void @free(ptr noundef %255) #9
  br label %.loopexit195

.loopexit195:                                     ; preds = %32, %.loopexit, %.loopexit195.sink.split, %58
  %.0 = phi i32 [ 0, %58 ], [ 0, %.loopexit195.sink.split ], [ %251, %.loopexit ], [ 0, %32 ]
  ret i32 %.0
}

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @get_uid(i32 noundef) local_unnamed_addr #5

declare i32 @get_guid(i32 noundef) local_unnamed_addr #5

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

declare i32 @add_file(i64 noundef, i64 noundef, i64 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

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 = { 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 #2 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) 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 #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind allocsize(1) }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { cold nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass