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

; 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.super_block = type { %struct.squashfs_super_block, i32, i32, i64, i64 }
%struct.squashfs_super_block = type { i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i64, i64, i64, i64, i64, i64, i64, i64 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.squashfs_fragment_entry_3 = type { i64, i32, i32 }

@sBlk = external global %struct.super_block, align 8
@fragment_table = external hidden global ptr, align 8
@screen_mutex = external global %union.pthread_mutex_t, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [78 x i8], align 1
@swap = external global i32, align 4
@fd = external global i32, align 4
@progress_enabled = external global i32, align 4
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [58 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @read_fragment_table_3() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %struct.squashfs_fragment_entry_3, align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  %24 = load i32, ptr getelementptr inbounds (%struct.squashfs_super_block, ptr @sBlk, i32 0, i32 4), align 8, !tbaa !5
  %25 = zext i32 %24 to i64
  %26 = mul i64 %25, 16
  %27 = add i64 %26, 8192
  %28 = sub i64 %27, 1
  %29 = udiv i64 %28, 8192
  %30 = trunc i64 %29 to i32
  store i32 %30, ptr %4, align 4, !tbaa !13
  %31 = load i32, ptr %4, align 4, !tbaa !13
  %32 = zext i32 %31 to i64
  %33 = call ptr @llvm.stacksave.p0()
  store ptr %33, ptr %5, align 8
  %34 = alloca i64, i64 %32, align 16
  store i64 %32, ptr %6, align 8
  %35 = load i32, ptr getelementptr inbounds (%struct.squashfs_super_block, ptr @sBlk, i32 0, i32 4), align 8, !tbaa !5
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %0
  store i32 1, ptr %1, align 4
  store i32 1, ptr %7, align 4
  br label %278

38:                                               ; preds = %0
  %39 = load i32, ptr getelementptr inbounds (%struct.squashfs_super_block, ptr @sBlk, i32 0, i32 4), align 8, !tbaa !5
  %40 = zext i32 %39 to i64
  %41 = mul i64 %40, 16
  %42 = call noalias ptr @malloc(i64 noundef %41) #10
  store ptr %42, ptr @fragment_table, align 8, !tbaa !14
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %52

44:                                               ; preds = %38
  br label %45

45:                                               ; preds = %44
  %46 = call i32 @pthread_mutex_lock(ptr noundef @screen_mutex) #9
  %47 = load ptr, ptr @stderr, align 8, !tbaa !14
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef @.str) #9
  %49 = call i32 @pthread_mutex_unlock(ptr noundef @screen_mutex) #9
  call void @exit(i32 noundef 1) #11
  unreachable

50:                                               ; No predecessors!
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51, %38
  %53 = load i32, ptr @swap, align 4, !tbaa !13
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %136

55:                                               ; preds = %52
  %56 = load i32, ptr %4, align 4, !tbaa !13
  %57 = zext i32 %56 to i64
  %58 = call ptr @llvm.stacksave.p0()
  store ptr %58, ptr %8, align 8
  %59 = alloca i64, i64 %57, align 16
  store i64 %57, ptr %9, align 8
  %60 = load i32, ptr @fd, align 4, !tbaa !13
  %61 = load i64, ptr getelementptr inbounds (%struct.squashfs_super_block, ptr @sBlk, i32 0, i32 17), align 8, !tbaa !16
  %62 = load i32, ptr getelementptr inbounds (%struct.squashfs_super_block, ptr @sBlk, i32 0, i32 4), align 8, !tbaa !5
  %63 = zext i32 %62 to i64
  %64 = mul i64 %63, 16
  %65 = add i64 %64, 8192
  %66 = sub i64 %65, 1
  %67 = udiv i64 %66, 8192
  %68 = mul i64 %67, 8
  %69 = trunc i64 %68 to i32
  %70 = call i32 @read_fs_bytes(i32 noundef %60, i64 noundef %61, i32 noundef %69, ptr noundef %59)
  store i32 %70, ptr %2, align 4, !tbaa !13
  %71 = load i32, ptr %2, align 4, !tbaa !13
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %87

73:                                               ; preds = %55
  br label %74

74:                                               ; preds = %73
  %75 = call i32 @pthread_mutex_lock(ptr noundef @screen_mutex) #9
  %76 = load i32, ptr @progress_enabled, align 4, !tbaa !13
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %81

78:                                               ; preds = %74
  %79 = load ptr, ptr @stderr, align 8, !tbaa !14
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.1) #9
  br label %81

81:                                               ; preds = %78, %74
  %82 = load ptr, ptr @stderr, align 8, !tbaa !14
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.2) #9
  %84 = call i32 @pthread_mutex_unlock(ptr noundef @screen_mutex) #9
  br label %85

85:                                               ; preds = %81
  br label %86

86:                                               ; preds = %85
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  br label %132

87:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %88 = load i32, ptr %4, align 4, !tbaa !13
  %89 = mul nsw i32 %88, 8
  %90 = sext i32 %89 to i64
  call void @llvm.memset.p0.i64(ptr align 16 %34, i8 0, i64 %90, i1 false)
  store i32 0, ptr %10, align 4, !tbaa !13
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %91

91:                                               ; preds = %126, %87
  %92 = load i32, ptr %10, align 4, !tbaa !13
  %93 = load i32, ptr %4, align 4, !tbaa !13
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %95, label %131

95:                                               ; preds = %91
  %96 = load i32, ptr %11, align 4, !tbaa !13
  %97 = srem i32 %96, 8
  store i32 %97, ptr %13, align 4, !tbaa !13
  store i64 0, ptr %14, align 8, !tbaa !17
  %98 = load i32, ptr %11, align 4, !tbaa !13
  %99 = sdiv i32 %98, 8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %59, i64 %100
  store ptr %101, ptr %15, align 8, !tbaa !14
  %102 = getelementptr inbounds i8, ptr %14, i64 7
  store ptr %102, ptr %16, align 8, !tbaa !14
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %103

103:                                              ; preds = %114, %95
  %104 = load i32, ptr %12, align 4, !tbaa !13
  %105 = load i32, ptr %13, align 4, !tbaa !13
  %106 = add nsw i32 64, %105
  %107 = icmp slt i32 %104, %106
  br i1 %107, label %108, label %117

108:                                              ; preds = %103
  %109 = load ptr, ptr %15, align 8, !tbaa !14
  %110 = getelementptr inbounds i8, ptr %109, i32 1
  store ptr %110, ptr %15, align 8, !tbaa !14
  %111 = load i8, ptr %109, align 1, !tbaa !18
  %112 = load ptr, ptr %16, align 8, !tbaa !14
  %113 = getelementptr inbounds i8, ptr %112, i32 -1
  store ptr %113, ptr %16, align 8, !tbaa !14
  store i8 %111, ptr %112, align 1, !tbaa !18
  br label %114

114:                                              ; preds = %108
  %115 = load i32, ptr %12, align 4, !tbaa !13
  %116 = add nsw i32 %115, 8
  store i32 %116, ptr %12, align 4, !tbaa !13
  br label %103, !llvm.loop !19

117:                                              ; preds = %103
  %118 = load i64, ptr %14, align 8, !tbaa !17
  %119 = load i32, ptr %13, align 4, !tbaa !13
  %120 = sub nsw i32 0, %119
  %121 = zext i32 %120 to i64
  %122 = lshr i64 %118, %121
  %123 = load i32, ptr %10, align 4, !tbaa !13
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i64, ptr %34, i64 %124
  store i64 %122, ptr %125, align 8, !tbaa !17
  br label %126

126:                                              ; preds = %117
  %127 = load i32, ptr %10, align 4, !tbaa !13
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %10, align 4, !tbaa !13
  %129 = load i32, ptr %11, align 4, !tbaa !13
  %130 = add nsw i32 %129, 64
  store i32 %130, ptr %11, align 4, !tbaa !13
  br label %91, !llvm.loop !21

131:                                              ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  store i32 0, ptr %7, align 4
  br label %132

132:                                              ; preds = %131, %86
  %133 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %133)
  %134 = load i32, ptr %7, align 4
  switch i32 %134, label %278 [
    i32 0, label %135
  ]

135:                                              ; preds = %132
  br label %165

136:                                              ; preds = %52
  %137 = load i32, ptr @fd, align 4, !tbaa !13
  %138 = load i64, ptr getelementptr inbounds (%struct.squashfs_super_block, ptr @sBlk, i32 0, i32 17), align 8, !tbaa !16
  %139 = load i32, ptr getelementptr inbounds (%struct.squashfs_super_block, ptr @sBlk, i32 0, i32 4), align 8, !tbaa !5
  %140 = zext i32 %139 to i64
  %141 = mul i64 %140, 16
  %142 = add i64 %141, 8192
  %143 = sub i64 %142, 1
  %144 = udiv i64 %143, 8192
  %145 = mul i64 %144, 8
  %146 = trunc i64 %145 to i32
  %147 = call i32 @read_fs_bytes(i32 noundef %137, i64 noundef %138, i32 noundef %146, ptr noundef %34)
  store i32 %147, ptr %2, align 4, !tbaa !13
  %148 = load i32, ptr %2, align 4, !tbaa !13
  %149 = icmp eq i32 %148, 0
  br i1 %149, label %150, label %164

150:                                              ; preds = %136
  br label %151

151:                                              ; preds = %150
  %152 = call i32 @pthread_mutex_lock(ptr noundef @screen_mutex) #9
  %153 = load i32, ptr @progress_enabled, align 4, !tbaa !13
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %158

155:                                              ; preds = %151
  %156 = load ptr, ptr @stderr, align 8, !tbaa !14
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef @.str.1) #9
  br label %158

158:                                              ; preds = %155, %151
  %159 = load ptr, ptr @stderr, align 8, !tbaa !14
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.2) #9
  %161 = call i32 @pthread_mutex_unlock(ptr noundef @screen_mutex) #9
  br label %162

162:                                              ; preds = %158
  br label %163

163:                                              ; preds = %162
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  br label %278

164:                                              ; preds = %136
  br label %165

165:                                              ; preds = %164, %135
  store i32 0, ptr %3, align 4, !tbaa !13
  br label %166

166:                                              ; preds = %202, %165
  %167 = load i32, ptr %3, align 4, !tbaa !13
  %168 = load i32, ptr %4, align 4, !tbaa !13
  %169 = icmp slt i32 %167, %168
  br i1 %169, label %170, label %205

170:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %171 = load i32, ptr @fd, align 4, !tbaa !13
  %172 = load i32, ptr %3, align 4, !tbaa !13
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i64, ptr %34, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !17
  %176 = load ptr, ptr @fragment_table, align 8, !tbaa !14
  %177 = load i32, ptr %3, align 4, !tbaa !13
  %178 = mul nsw i32 %177, 8192
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds i8, ptr %176, i64 %179
  %181 = call i32 @read_block(i32 noundef %171, i64 noundef %175, ptr noundef null, ptr noundef %180)
  store i32 %181, ptr %17, align 4, !tbaa !13
  %182 = load i32, ptr %17, align 4, !tbaa !13
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %198

184:                                              ; preds = %170
  br label %185

185:                                              ; preds = %184
  %186 = call i32 @pthread_mutex_lock(ptr noundef @screen_mutex) #9
  %187 = load i32, ptr @progress_enabled, align 4, !tbaa !13
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %192

189:                                              ; preds = %185
  %190 = load ptr, ptr @stderr, align 8, !tbaa !14
  %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef @.str.1) #9
  br label %192

192:                                              ; preds = %189, %185
  %193 = load ptr, ptr @stderr, align 8, !tbaa !14
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef @.str.3) #9
  %195 = call i32 @pthread_mutex_unlock(ptr noundef @screen_mutex) #9
  br label %196

196:                                              ; preds = %192
  br label %197

197:                                              ; preds = %196
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  br label %199

198:                                              ; preds = %170
  store i32 0, ptr %7, align 4
  br label %199

199:                                              ; preds = %198, %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  %200 = load i32, ptr %7, align 4
  switch i32 %200, label %278 [
    i32 0, label %201
  ]

201:                                              ; preds = %199
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %3, align 4, !tbaa !13
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %3, align 4, !tbaa !13
  br label %166, !llvm.loop !22

205:                                              ; preds = %166
  %206 = load i32, ptr @swap, align 4, !tbaa !13
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %277

208:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #9
  store i32 0, ptr %3, align 4, !tbaa !13
  br label %209

209:                                              ; preds = %273, %208
  %210 = load i32, ptr %3, align 4, !tbaa !13
  %211 = load i32, ptr getelementptr inbounds (%struct.squashfs_super_block, ptr @sBlk, i32 0, i32 4), align 8, !tbaa !5
  %212 = icmp ult i32 %210, %211
  br i1 %212, label %213, label %276

213:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  call void @llvm.memset.p0.i64(ptr align 1 %18, i8 0, i64 16, i1 false)
  store i32 0, ptr %20, align 4, !tbaa !13
  store i64 0, ptr %21, align 8, !tbaa !17
  %214 = load ptr, ptr @fragment_table, align 8, !tbaa !14
  %215 = load i32, ptr %3, align 4, !tbaa !13
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %214, i64 %216
  %218 = getelementptr inbounds i8, ptr %217, i64 0
  store ptr %218, ptr %22, align 8, !tbaa !14
  %219 = getelementptr inbounds i8, ptr %21, i64 7
  store ptr %219, ptr %23, align 8, !tbaa !14
  store i32 0, ptr %19, align 4, !tbaa !13
  br label %220

220:                                              ; preds = %231, %213
  %221 = load i32, ptr %19, align 4, !tbaa !13
  %222 = load i32, ptr %20, align 4, !tbaa !13
  %223 = add nsw i32 64, %222
  %224 = icmp slt i32 %221, %223
  br i1 %224, label %225, label %234

225:                                              ; preds = %220
  %226 = load ptr, ptr %22, align 8, !tbaa !14
  %227 = getelementptr inbounds i8, ptr %226, i32 1
  store ptr %227, ptr %22, align 8, !tbaa !14
  %228 = load i8, ptr %226, align 1, !tbaa !18
  %229 = load ptr, ptr %23, align 8, !tbaa !14
  %230 = getelementptr inbounds i8, ptr %229, i32 -1
  store ptr %230, ptr %23, align 8, !tbaa !14
  store i8 %228, ptr %229, align 1, !tbaa !18
  br label %231

231:                                              ; preds = %225
  %232 = load i32, ptr %19, align 4, !tbaa !13
  %233 = add nsw i32 %232, 8
  store i32 %233, ptr %19, align 4, !tbaa !13
  br label %220, !llvm.loop !23

234:                                              ; preds = %220
  %235 = load i64, ptr %21, align 8, !tbaa !17
  %236 = load i32, ptr %20, align 4, !tbaa !13
  %237 = sub nsw i32 0, %236
  %238 = zext i32 %237 to i64
  %239 = lshr i64 %235, %238
  %240 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %18, i32 0, i32 0
  store i64 %239, ptr %240, align 1, !tbaa !24
  store i32 0, ptr %20, align 4, !tbaa !13
  store i64 0, ptr %21, align 8, !tbaa !17
  %241 = load ptr, ptr @fragment_table, align 8, !tbaa !14
  %242 = load i32, ptr %3, align 4, !tbaa !13
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %241, i64 %243
  %245 = getelementptr inbounds i8, ptr %244, i64 8
  store ptr %245, ptr %22, align 8, !tbaa !14
  %246 = getelementptr inbounds i8, ptr %21, i64 7
  store ptr %246, ptr %23, align 8, !tbaa !14
  store i32 0, ptr %19, align 4, !tbaa !13
  br label %247

247:                                              ; preds = %258, %234
  %248 = load i32, ptr %19, align 4, !tbaa !13
  %249 = load i32, ptr %20, align 4, !tbaa !13
  %250 = add nsw i32 32, %249
  %251 = icmp slt i32 %248, %250
  br i1 %251, label %252, label %261

252:                                              ; preds = %247
  %253 = load ptr, ptr %22, align 8, !tbaa !14
  %254 = getelementptr inbounds i8, ptr %253, i32 1
  store ptr %254, ptr %22, align 8, !tbaa !14
  %255 = load i8, ptr %253, align 1, !tbaa !18
  %256 = load ptr, ptr %23, align 8, !tbaa !14
  %257 = getelementptr inbounds i8, ptr %256, i32 -1
  store ptr %257, ptr %23, align 8, !tbaa !14
  store i8 %255, ptr %256, align 1, !tbaa !18
  br label %258

258:                                              ; preds = %252
  %259 = load i32, ptr %19, align 4, !tbaa !13
  %260 = add nsw i32 %259, 8
  store i32 %260, ptr %19, align 4, !tbaa !13
  br label %247, !llvm.loop !26

261:                                              ; preds = %247
  %262 = load i64, ptr %21, align 8, !tbaa !17
  %263 = load i32, ptr %20, align 4, !tbaa !13
  %264 = sub nsw i32 32, %263
  %265 = zext i32 %264 to i64
  %266 = lshr i64 %262, %265
  %267 = trunc i64 %266 to i32
  %268 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %18, i32 0, i32 1
  store i32 %267, ptr %268, align 1, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  %269 = load ptr, ptr @fragment_table, align 8, !tbaa !14
  %270 = load i32, ptr %3, align 4, !tbaa !13
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %269, i64 %271
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %272, ptr align 1 %18, i64 16, i1 false)
  br label %273

273:                                              ; preds = %261
  %274 = load i32, ptr %3, align 4, !tbaa !13
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr %3, align 4, !tbaa !13
  br label %209, !llvm.loop !28

276:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #9
  br label %277

277:                                              ; preds = %276, %205
  store i32 1, ptr %1, align 4
  store i32 1, ptr %7, align 4
  br label %278

278:                                              ; preds = %277, %199, %163, %132, %37
  %279 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %279)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %280 = load i32, ptr %1, align 4
  ret i32 %280
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) #4

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) #4

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

declare i32 @read_fs_bytes(i32 noundef, i64 noundef, i32 noundef, ptr noundef) #6

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

declare i32 @read_block(i32 noundef, i64 noundef, ptr noundef, ptr noundef) #6

; 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) #8

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

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

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


; 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.super_block = type { %struct.squashfs_super_block, i32, i32, i64, i64 }
%struct.squashfs_super_block = type { i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i64, i64, i64, i64, i64, i64, i64, i64 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.squashfs_fragment_entry_3 = type { i64, i32, i32 }

@sBlk = external local_unnamed_addr global %struct.super_block, align 8
@fragment_table = external hidden local_unnamed_addr global ptr, align 8
@screen_mutex = external global %union.pthread_mutex_t, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [78 x i8], align 1
@swap = external local_unnamed_addr global i32, align 4
@fd = external local_unnamed_addr global i32, align 4
@progress_enabled = external local_unnamed_addr global i32, align 4
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [58 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @read_fragment_table_3() local_unnamed_addr #0 {
  %1 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 16), align 8, !tbaa !5
  %2 = zext i32 %1 to i64
  %3 = shl nuw nsw i64 %2, 4
  %4 = add nuw nsw i64 %3, 8191
  %5 = lshr i64 %4, 13
  %6 = trunc nuw nsw i64 %5 to i32
  %7 = alloca i64, i64 %5, align 16
  %8 = icmp eq i32 %1, 0
  br i1 %8, label %.loopexit, label %9

9:                                                ; preds = %0
  %10 = tail call noalias ptr @malloc(i64 noundef %3) #9
  store ptr %10, ptr @fragment_table, align 8, !tbaa !13
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %17

12:                                               ; preds = %9
  %13 = tail call i32 @pthread_mutex_lock(ptr noundef nonnull @screen_mutex) #10
  %14 = load ptr, ptr @stderr, align 8, !tbaa !13
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str) #11
  %16 = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull @screen_mutex) #10
  tail call void @exit(i32 noundef 1) #12
  unreachable

17:                                               ; preds = %9
  %18 = load i32, ptr @swap, align 4, !tbaa !15
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %61, label %19

19:                                               ; preds = %17
  %20 = tail call ptr @llvm.stacksave.p0()
  %21 = alloca i64, i64 %5, align 16
  %22 = load i32, ptr @fd, align 4, !tbaa !15
  %23 = load i64, ptr getelementptr inbounds (i8, ptr @sBlk, i64 80), align 8, !tbaa !16
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 16), align 8, !tbaa !5
  %25 = zext i32 %24 to i64
  %26 = shl nuw nsw i64 %25, 4
  %27 = add nuw nsw i64 %26, 8191
  %28 = lshr i64 %27, 10
  %29 = trunc nuw nsw i64 %28 to i32
  %30 = and i32 %29, 134217720
  %31 = call i32 @read_fs_bytes(i32 noundef %22, i64 noundef %23, i32 noundef %30, ptr noundef nonnull %21) #10
  %.not64 = icmp eq i32 %31, 0
  br i1 %.not64, label %32, label %.lr.ph

32:                                               ; preds = %19
  %33 = call i32 @pthread_mutex_lock(ptr noundef nonnull @screen_mutex) #10
  %34 = load i32, ptr @progress_enabled, align 4, !tbaa !15
  %.not63 = icmp eq i32 %34, 0
  br i1 %.not63, label %.thread, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr @stderr, align 8, !tbaa !13
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.1) #11
  br label %.thread

.thread:                                          ; preds = %32, %35
  %38 = load ptr, ptr @stderr, align 8, !tbaa !13
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.2) #11
  %40 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @screen_mutex) #10
  call void @llvm.stackrestore.p0(ptr %20)
  br label %.loopexit

.lr.ph:                                           ; preds = %19
  %41 = shl nuw nsw i64 %5, 3
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %7, i8 0, i64 %41, i1 false)
  br label %42

42:                                               ; preds = %.lr.ph, %42
  %indvars.iv86 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next87, %42 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %42 ]
  %43 = lshr exact i64 %indvars.iv, 3
  %44 = getelementptr inbounds i8, ptr %21, i64 %43
  %45 = getelementptr inbounds i8, ptr %44, i64 1
  %46 = load i8, ptr %44, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %44, i64 2
  %48 = load i8, ptr %45, align 1, !tbaa !17
  %49 = getelementptr inbounds i8, ptr %44, i64 3
  %50 = load i8, ptr %47, align 2, !tbaa !17
  %51 = getelementptr inbounds i8, ptr %44, i64 4
  %52 = load i8, ptr %49, align 1, !tbaa !17
  %53 = getelementptr inbounds i8, ptr %44, i64 5
  %54 = load i8, ptr %51, align 4, !tbaa !17
  %55 = getelementptr inbounds i8, ptr %44, i64 6
  %56 = load i8, ptr %53, align 1, !tbaa !17
  %57 = getelementptr inbounds i8, ptr %44, i64 7
  %58 = load i8, ptr %55, align 2, !tbaa !17
  %59 = load i8, ptr %57, align 1, !tbaa !17
  %.sroa.11.0.insert.ext = zext i8 %46 to i64
  %.sroa.11.0.insert.shift = shl nuw i64 %.sroa.11.0.insert.ext, 56
  %.sroa.10142.0.insert.ext = zext i8 %48 to i64
  %.sroa.10142.0.insert.shift = shl nuw nsw i64 %.sroa.10142.0.insert.ext, 48
  %.sroa.10142.0.insert.insert = or disjoint i64 %.sroa.11.0.insert.shift, %.sroa.10142.0.insert.shift
  %.sroa.9141.0.insert.ext = zext i8 %50 to i64
  %.sroa.9141.0.insert.shift = shl nuw nsw i64 %.sroa.9141.0.insert.ext, 40
  %.sroa.9141.0.insert.insert = or disjoint i64 %.sroa.10142.0.insert.insert, %.sroa.9141.0.insert.shift
  %.sroa.8140.0.insert.ext = zext i8 %52 to i64
  %.sroa.8140.0.insert.shift = shl nuw nsw i64 %.sroa.8140.0.insert.ext, 32
  %.sroa.8140.0.insert.insert = or disjoint i64 %.sroa.9141.0.insert.insert, %.sroa.8140.0.insert.shift
  %.sroa.7139.0.insert.ext = zext i8 %54 to i64
  %.sroa.7139.0.insert.shift = shl nuw nsw i64 %.sroa.7139.0.insert.ext, 24
  %.sroa.7139.0.insert.insert = or disjoint i64 %.sroa.8140.0.insert.insert, %.sroa.7139.0.insert.shift
  %.sroa.6.0.insert.ext = zext i8 %56 to i64
  %.sroa.6.0.insert.shift = shl nuw nsw i64 %.sroa.6.0.insert.ext, 16
  %.sroa.5.0.insert.ext = zext i8 %58 to i64
  %.sroa.5.0.insert.shift = shl nuw nsw i64 %.sroa.5.0.insert.ext, 8
  %.sroa.5.0.insert.mask = or disjoint i64 %.sroa.7139.0.insert.insert, %.sroa.6.0.insert.shift
  %.sroa.0138.0.insert.ext = zext i8 %59 to i64
  %.sroa.0138.0.insert.mask = or i64 %.sroa.5.0.insert.mask, %.sroa.5.0.insert.shift
  %.sroa.0138.0.insert.insert = or i64 %.sroa.0138.0.insert.mask, %.sroa.0138.0.insert.ext
  %60 = getelementptr inbounds i64, ptr %7, i64 %indvars.iv86
  store i64 %.sroa.0138.0.insert.insert, ptr %60, align 8, !tbaa !18
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 64
  %exitcond.not = icmp eq i64 %indvars.iv.next87, %5
  br i1 %exitcond.not, label %._crit_edge, label %42, !llvm.loop !19

._crit_edge:                                      ; preds = %42
  call void @llvm.stackrestore.p0(ptr %20)
  br label %.critedge.preheader

61:                                               ; preds = %17
  %62 = load i32, ptr @fd, align 4, !tbaa !15
  %63 = load i64, ptr getelementptr inbounds (i8, ptr @sBlk, i64 80), align 8, !tbaa !16
  %64 = lshr i64 %4, 10
  %65 = trunc nuw nsw i64 %64 to i32
  %66 = and i32 %65, 134217720
  %67 = call i32 @read_fs_bytes(i32 noundef %62, i64 noundef %63, i32 noundef %66, ptr noundef nonnull %7) #10
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %.critedge.preheader

69:                                               ; preds = %61
  %70 = call i32 @pthread_mutex_lock(ptr noundef nonnull @screen_mutex) #10
  %71 = load i32, ptr @progress_enabled, align 4, !tbaa !15
  %.not62 = icmp eq i32 %71, 0
  br i1 %.not62, label %75, label %72

72:                                               ; preds = %69
  %73 = load ptr, ptr @stderr, align 8, !tbaa !13
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.1) #11
  br label %75

75:                                               ; preds = %72, %69
  %76 = load ptr, ptr @stderr, align 8, !tbaa !13
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.2) #11
  %78 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @screen_mutex) #10
  br label %.loopexit

.critedge.preheader:                              ; preds = %61, %._crit_edge
  %umax = call i32 @llvm.umax.i32(i32 %6, i32 1)
  %wide.trip.count94 = zext nneg i32 %umax to i64
  br label %.critedge

79:                                               ; preds = %.critedge
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond95.not = icmp eq i64 %indvars.iv.next92, %wide.trip.count94
  br i1 %exitcond95.not, label %._crit_edge74, label %.critedge, !llvm.loop !21

.critedge:                                        ; preds = %.critedge.preheader, %79
  %indvars.iv91 = phi i64 [ 0, %.critedge.preheader ], [ %indvars.iv.next92, %79 ]
  %80 = load i32, ptr @fd, align 4, !tbaa !15
  %81 = getelementptr inbounds i64, ptr %7, i64 %indvars.iv91
  %82 = load i64, ptr %81, align 8, !tbaa !18
  %83 = load ptr, ptr @fragment_table, align 8, !tbaa !13
  %84 = shl nsw i64 %indvars.iv91, 13
  %85 = getelementptr inbounds i8, ptr %83, i64 %84
  %86 = call i32 @read_block(i32 noundef %80, i64 noundef %82, ptr noundef null, ptr noundef %85) #10
  %.not67 = icmp eq i32 %86, 0
  br i1 %.not67, label %87, label %79

87:                                               ; preds = %.critedge
  %88 = call i32 @pthread_mutex_lock(ptr noundef nonnull @screen_mutex) #10
  %89 = load i32, ptr @progress_enabled, align 4, !tbaa !15
  %.not66 = icmp eq i32 %89, 0
  br i1 %.not66, label %93, label %90

90:                                               ; preds = %87
  %91 = load ptr, ptr @stderr, align 8, !tbaa !13
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.1) #11
  br label %93

93:                                               ; preds = %90, %87
  %94 = load ptr, ptr @stderr, align 8, !tbaa !13
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.3) #11
  %96 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @screen_mutex) #10
  br label %.loopexit

._crit_edge74:                                    ; preds = %79
  %97 = load i32, ptr @swap, align 4, !tbaa !15
  %.not65 = icmp ne i32 %97, 0
  %98 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 16), align 8
  %99 = icmp ne i32 %98, 0
  %or.cond = select i1 %.not65, i1 %99, i1 false
  br i1 %or.cond, label %.lr.ph82, label %.loopexit

.lr.ph82:                                         ; preds = %._crit_edge74, %.lr.ph82
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.lr.ph82 ], [ 0, %._crit_edge74 ]
  %100 = load ptr, ptr @fragment_table, align 8, !tbaa !13
  %101 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %100, i64 %indvars.iv96
  %102 = getelementptr inbounds i8, ptr %101, i64 1
  %103 = load i8, ptr %101, align 1, !tbaa !17
  %104 = getelementptr inbounds i8, ptr %101, i64 2
  %105 = load i8, ptr %102, align 1, !tbaa !17
  %106 = getelementptr inbounds i8, ptr %101, i64 3
  %107 = load i8, ptr %104, align 1, !tbaa !17
  %108 = getelementptr inbounds i8, ptr %101, i64 4
  %109 = load i8, ptr %106, align 1, !tbaa !17
  %110 = getelementptr inbounds i8, ptr %101, i64 5
  %111 = load i8, ptr %108, align 1, !tbaa !17
  %112 = getelementptr inbounds i8, ptr %101, i64 6
  %113 = load i8, ptr %110, align 1, !tbaa !17
  %114 = getelementptr inbounds i8, ptr %101, i64 7
  %115 = load i8, ptr %112, align 1, !tbaa !17
  %116 = load i8, ptr %114, align 1, !tbaa !17
  %.sroa.16.0.insert.ext = zext i8 %103 to i64
  %.sroa.16.0.insert.shift = shl nuw i64 %.sroa.16.0.insert.ext, 56
  %.sroa.14.0.insert.ext = zext i8 %105 to i64
  %.sroa.14.0.insert.shift = shl nuw nsw i64 %.sroa.14.0.insert.ext, 48
  %.sroa.14.0.insert.insert = or disjoint i64 %.sroa.16.0.insert.shift, %.sroa.14.0.insert.shift
  %.sroa.12.0.insert.ext = zext i8 %107 to i64
  %.sroa.12.0.insert.shift = shl nuw nsw i64 %.sroa.12.0.insert.ext, 40
  %.sroa.12.0.insert.insert = or disjoint i64 %.sroa.14.0.insert.insert, %.sroa.12.0.insert.shift
  %.sroa.10.0.insert.ext = zext i8 %109 to i64
  %.sroa.10.0.insert.shift = shl nuw nsw i64 %.sroa.10.0.insert.ext, 32
  %.sroa.10.0.insert.insert = or disjoint i64 %.sroa.12.0.insert.insert, %.sroa.10.0.insert.shift
  %.sroa.9.0.insert.ext = zext i8 %111 to i64
  %.sroa.9.0.insert.shift = shl nuw nsw i64 %.sroa.9.0.insert.ext, 24
  %.sroa.9.0.insert.insert = or disjoint i64 %.sroa.10.0.insert.insert, %.sroa.9.0.insert.shift
  %.sroa.8.0.insert.ext = zext i8 %113 to i64
  %.sroa.8.0.insert.shift = shl nuw nsw i64 %.sroa.8.0.insert.ext, 16
  %.sroa.7.0.insert.ext = zext i8 %115 to i64
  %.sroa.7.0.insert.shift = shl nuw nsw i64 %.sroa.7.0.insert.ext, 8
  %.sroa.7.0.insert.mask = or disjoint i64 %.sroa.9.0.insert.insert, %.sroa.8.0.insert.shift
  %.sroa.0.0.insert.ext = zext i8 %116 to i64
  %.sroa.0.0.insert.mask = or i64 %.sroa.7.0.insert.mask, %.sroa.7.0.insert.shift
  %.sroa.0.0.insert.insert = or i64 %.sroa.0.0.insert.mask, %.sroa.0.0.insert.ext
  %117 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %100, i64 %indvars.iv96, i32 1
  %118 = getelementptr inbounds i8, ptr %117, i64 1
  %119 = load i8, ptr %117, align 1, !tbaa !17
  %120 = getelementptr inbounds i8, ptr %117, i64 2
  %121 = load i8, ptr %118, align 1, !tbaa !17
  %122 = getelementptr inbounds i8, ptr %117, i64 3
  %123 = load i8, ptr %120, align 1, !tbaa !17
  %124 = load i8, ptr %122, align 1, !tbaa !17
  %.sroa.16.0.insert.ext134 = zext i8 %119 to i32
  %.sroa.16.0.insert.shift135 = shl nuw i32 %.sroa.16.0.insert.ext134, 24
  %.sroa.14.0.insert.ext129 = zext i8 %121 to i32
  %.sroa.14.0.insert.shift130 = shl nuw nsw i32 %.sroa.14.0.insert.ext129, 16
  %.sroa.14.0.insert.insert132 = or disjoint i32 %.sroa.16.0.insert.shift135, %.sroa.14.0.insert.shift130
  %.sroa.12.0.insert.ext124 = zext i8 %123 to i32
  %.sroa.12.0.insert.shift125 = shl nuw nsw i32 %.sroa.12.0.insert.ext124, 8
  %.sroa.12.0.insert.insert127 = or disjoint i32 %.sroa.14.0.insert.insert132, %.sroa.12.0.insert.shift125
  %.sroa.10.0.insert.ext119 = zext i8 %124 to i32
  %.sroa.10.0.insert.insert122 = or disjoint i32 %.sroa.12.0.insert.insert127, %.sroa.10.0.insert.ext119
  store i64 %.sroa.0.0.insert.insert, ptr %101, align 1
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %101, i64 8
  store i32 %.sroa.10.0.insert.insert122, ptr %.sroa.5.0..sroa_idx, align 1
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %101, i64 12
  store i32 0, ptr %.sroa.6.0..sroa_idx, align 1
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %125 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 16), align 8, !tbaa !5
  %126 = zext i32 %125 to i64
  %127 = icmp ult i64 %indvars.iv.next97, %126
  br i1 %127, label %.lr.ph82, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %.lr.ph82, %93, %.thread, %._crit_edge74, %0, %75
  %.4 = phi i32 [ 0, %93 ], [ 0, %75 ], [ 1, %0 ], [ 1, %._crit_edge74 ], [ 0, %.thread ], [ 1, %.lr.ph82 ]
  ret i32 %.4
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #1

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

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

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

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

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

declare i32 @read_fs_bytes(i32 noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

declare i32 @read_block(i32 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #8

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

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

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


; Effective O3 passes: ConstraintEliminationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass