; LLVM IR from mncoppola/rpef :: utilities_src/squashfs4.2/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 %279

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 = load ptr, ptr @fragment_table, align 8, !tbaa !14
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %53

45:                                               ; preds = %38
  br label %46

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

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51
  br label %53

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

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

74:                                               ; preds = %56
  br label %75

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

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

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

86:                                               ; preds = %82
  br label %87

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

88:                                               ; preds = %56
  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
  %89 = load i32, ptr %4, align 4, !tbaa !13
  %90 = mul nsw i32 %89, 8
  %91 = sext i32 %90 to i64
  call void @llvm.memset.p0.i64(ptr align 16 %34, i8 0, i64 %91, i1 false)
  store i32 0, ptr %10, align 4, !tbaa !13
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %92

92:                                               ; preds = %127, %88
  %93 = load i32, ptr %10, align 4, !tbaa !13
  %94 = load i32, ptr %4, align 4, !tbaa !13
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %96, label %132

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

104:                                              ; preds = %115, %96
  %105 = load i32, ptr %12, align 4, !tbaa !13
  %106 = load i32, ptr %13, align 4, !tbaa !13
  %107 = add nsw i32 64, %106
  %108 = icmp slt i32 %105, %107
  br i1 %108, label %109, label %118

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

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

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

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

132:                                              ; preds = %92
  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 %133

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

136:                                              ; preds = %133
  br label %166

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

151:                                              ; preds = %137
  br label %152

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

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

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

163:                                              ; preds = %159
  br label %164

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

165:                                              ; preds = %137
  br label %166

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

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

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

185:                                              ; preds = %171
  br label %186

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

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

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

197:                                              ; preds = %193
  br label %198

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

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

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

202:                                              ; preds = %200
  br label %203

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

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

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

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

214:                                              ; preds = %210
  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
  %215 = load ptr, ptr @fragment_table, align 8, !tbaa !14
  %216 = load i32, ptr %3, align 4, !tbaa !13
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %215, i64 %217
  %219 = getelementptr inbounds i8, ptr %218, i64 0
  store ptr %219, ptr %22, align 8, !tbaa !14
  %220 = getelementptr inbounds i8, ptr %21, i64 7
  store ptr %220, ptr %23, align 8, !tbaa !14
  store i32 0, ptr %19, align 4, !tbaa !13
  br label %221

221:                                              ; preds = %232, %214
  %222 = load i32, ptr %19, align 4, !tbaa !13
  %223 = load i32, ptr %20, align 4, !tbaa !13
  %224 = add nsw i32 64, %223
  %225 = icmp slt i32 %222, %224
  br i1 %225, label %226, label %235

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

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

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

248:                                              ; preds = %259, %235
  %249 = load i32, ptr %19, align 4, !tbaa !13
  %250 = load i32, ptr %20, align 4, !tbaa !13
  %251 = add nsw i32 32, %250
  %252 = icmp slt i32 %249, %251
  br i1 %252, label %253, label %262

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

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

262:                                              ; preds = %248
  %263 = load i64, ptr %21, align 8, !tbaa !17
  %264 = load i32, ptr %20, align 4, !tbaa !13
  %265 = sub nsw i32 32, %264
  %266 = zext i32 %265 to i64
  %267 = lshr i64 %263, %266
  %268 = trunc i64 %267 to i32
  %269 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %18, i32 0, i32 1
  store i32 %268, ptr %269, 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
  %270 = load ptr, ptr @fragment_table, align 8, !tbaa !14
  %271 = load i32, ptr %3, align 4, !tbaa !13
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds %struct.squashfs_fragment_entry_3, ptr %270, i64 %272
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %273, ptr align 1 %18, i64 16, i1 false)
  br label %274

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

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

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

279:                                              ; preds = %278, %200, %164, %133, %37
  %280 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %280)
  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
  %281 = load i32, ptr %1, align 4
  ret i32 %281
}

; 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