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

; 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_2 = type { i32, i32 }

@swap = external global i32, align 4
@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
@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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #0

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @read_fragment_table_2() #4 {
  %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_2, 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, 8
  %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 i32, 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 %282

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, 8
  %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 %138

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 i32, 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, 8
  %66 = add i64 %65, 8192
  %67 = sub i64 %66, 1
  %68 = udiv i64 %67, 8192
  %69 = mul i64 %68, 4
  %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 %134

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, 4
  %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 = %128, %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 %133

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 32, %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 32, %120
  %122 = zext i32 %121 to i64
  %123 = lshr i64 %119, %122
  %124 = trunc i64 %123 to i32
  %125 = load i32, ptr %10, align 4, !tbaa !13
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %34, i64 %126
  store i32 %124, ptr %127, align 4, !tbaa !13
  br label %128

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

133:                                              ; 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 %134

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

137:                                              ; preds = %134
  br label %167

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

152:                                              ; preds = %138
  br label %153

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

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

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

164:                                              ; preds = %160
  br label %165

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

166:                                              ; preds = %138
  br label %167

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

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

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

187:                                              ; preds = %172
  br label %188

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

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

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

199:                                              ; preds = %195
  br label %200

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

201:                                              ; preds = %172
  store i32 0, ptr %7, align 4
  br label %202

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

204:                                              ; preds = %202
  br label %205

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

208:                                              ; preds = %168
  %209 = load i32, ptr @swap, align 4, !tbaa !13
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %211, label %281

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

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

216:                                              ; preds = %212
  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 8, i1 false)
  store i32 0, ptr %20, align 4, !tbaa !13
  store i64 0, ptr %21, align 8, !tbaa !17
  %217 = load ptr, ptr @fragment_table, align 8, !tbaa !14
  %218 = load i32, ptr %3, align 4, !tbaa !13
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds %struct.squashfs_fragment_entry_2, ptr %217, i64 %219
  %221 = getelementptr inbounds i8, ptr %220, i64 0
  store ptr %221, ptr %22, align 8, !tbaa !14
  %222 = getelementptr inbounds i8, ptr %21, i64 7
  store ptr %222, ptr %23, align 8, !tbaa !14
  store i32 0, ptr %19, align 4, !tbaa !13
  br label %223

223:                                              ; preds = %234, %216
  %224 = load i32, ptr %19, align 4, !tbaa !13
  %225 = load i32, ptr %20, align 4, !tbaa !13
  %226 = add nsw i32 32, %225
  %227 = icmp slt i32 %224, %226
  br i1 %227, label %228, label %237

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

234:                                              ; preds = %228
  %235 = load i32, ptr %19, align 4, !tbaa !13
  %236 = add nsw i32 %235, 8
  store i32 %236, ptr %19, align 4, !tbaa !13
  br label %223, !llvm.loop !23

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

251:                                              ; preds = %262, %237
  %252 = load i32, ptr %19, align 4, !tbaa !13
  %253 = load i32, ptr %20, align 4, !tbaa !13
  %254 = add nsw i32 32, %253
  %255 = icmp slt i32 %252, %254
  br i1 %255, label %256, label %265

256:                                              ; preds = %251
  %257 = load ptr, ptr %22, align 8, !tbaa !14
  %258 = getelementptr inbounds i8, ptr %257, i32 1
  store ptr %258, ptr %22, align 8, !tbaa !14
  %259 = load i8, ptr %257, align 1, !tbaa !18
  %260 = load ptr, ptr %23, align 8, !tbaa !14
  %261 = getelementptr inbounds i8, ptr %260, i32 -1
  store ptr %261, ptr %23, align 8, !tbaa !14
  store i8 %259, ptr %260, align 1, !tbaa !18
  br label %262

262:                                              ; preds = %256
  %263 = load i32, ptr %19, align 4, !tbaa !13
  %264 = add nsw i32 %263, 8
  store i32 %264, ptr %19, align 4, !tbaa !13
  br label %251, !llvm.loop !26

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

277:                                              ; preds = %265
  %278 = load i32, ptr %3, align 4, !tbaa !13
  %279 = add nsw i32 %278, 1
  store i32 %279, ptr %3, align 4, !tbaa !13
  br label %212, !llvm.loop !28

280:                                              ; preds = %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %281

281:                                              ; preds = %280, %208
  store i32 1, ptr %1, align 4
  store i32 1, ptr %7, align 4
  br label %282

282:                                              ; preds = %281, %202, %165, %134, %37
  %283 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %283)
  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
  %284 = load i32, ptr %1, align 4
  ret i32 %284
}

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { 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, !8, i64 0}
!25 = !{!"squashfs_fragment_entry_2", !8, i64 0, !8, i64 4}
!26 = distinct !{!26, !20}
!27 = !{!25, !8, i64 4}
!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_2 = type { i32, i32 }

@swap = external local_unnamed_addr global i32, align 4
@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
@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: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #0

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @read_fragment_table_2() local_unnamed_addr #2 {
  %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, 3
  %4 = add nuw nsw i64 %3, 8191
  %5 = lshr i64 %4, 13
  %6 = trunc nuw nsw i64 %5 to i32
  %7 = alloca i32, 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 %53, label %19

19:                                               ; preds = %17
  %20 = tail call ptr @llvm.stacksave.p0()
  %21 = alloca i32, 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, 3
  %27 = add nuw nsw i64 %26, 8191
  %28 = lshr i64 %27, 11
  %29 = trunc nuw nsw i64 %28 to i32
  %30 = and i32 %29, 33554428
  %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, 2
  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 4, !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 = load i8, ptr %49, align 1, !tbaa !17
  %.sroa.7.0.insert.ext = zext i8 %46 to i32
  %.sroa.7.0.insert.shift = shl nuw i32 %.sroa.7.0.insert.ext, 24
  %.sroa.6124.0.insert.ext = zext i8 %48 to i32
  %.sroa.6124.0.insert.shift = shl nuw nsw i32 %.sroa.6124.0.insert.ext, 16
  %.sroa.6124.0.insert.insert = or disjoint i32 %.sroa.7.0.insert.shift, %.sroa.6124.0.insert.shift
  %.sroa.5.0.insert.ext = zext i8 %50 to i32
  %.sroa.5.0.insert.shift = shl nuw nsw i32 %.sroa.5.0.insert.ext, 8
  %.sroa.5.0.insert.insert = or disjoint i32 %.sroa.6124.0.insert.insert, %.sroa.5.0.insert.shift
  %.sroa.4.0.insert.ext = zext i8 %51 to i32
  %.sroa.4.0.insert.insert = or disjoint i32 %.sroa.5.0.insert.insert, %.sroa.4.0.insert.ext
  %52 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv86
  store i32 %.sroa.4.0.insert.insert, ptr %52, align 4, !tbaa !15
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 32
  %exitcond.not = icmp eq i64 %indvars.iv.next87, %5
  br i1 %exitcond.not, label %._crit_edge, label %42, !llvm.loop !18

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

53:                                               ; preds = %17
  %54 = load i32, ptr @fd, align 4, !tbaa !15
  %55 = load i64, ptr getelementptr inbounds (i8, ptr @sBlk, i64 80), align 8, !tbaa !16
  %56 = lshr i64 %4, 11
  %57 = trunc nuw nsw i64 %56 to i32
  %58 = and i32 %57, 33554428
  %59 = call i32 @read_fs_bytes(i32 noundef %54, i64 noundef %55, i32 noundef %58, ptr noundef nonnull %7) #10
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %.critedge.preheader

61:                                               ; preds = %53
  %62 = call i32 @pthread_mutex_lock(ptr noundef nonnull @screen_mutex) #10
  %63 = load i32, ptr @progress_enabled, align 4, !tbaa !15
  %.not62 = icmp eq i32 %63, 0
  br i1 %.not62, label %67, label %64

64:                                               ; preds = %61
  %65 = load ptr, ptr @stderr, align 8, !tbaa !13
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.1) #11
  br label %67

67:                                               ; preds = %64, %61
  %68 = load ptr, ptr @stderr, align 8, !tbaa !13
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str.2) #11
  %70 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @screen_mutex) #10
  br label %.loopexit

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

71:                                               ; 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 !20

.critedge:                                        ; preds = %.critedge.preheader, %71
  %indvars.iv91 = phi i64 [ 0, %.critedge.preheader ], [ %indvars.iv.next92, %71 ]
  %72 = load i32, ptr @fd, align 4, !tbaa !15
  %73 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv91
  %74 = load i32, ptr %73, align 4, !tbaa !15
  %75 = zext i32 %74 to i64
  %76 = load ptr, ptr @fragment_table, align 8, !tbaa !13
  %77 = shl nsw i64 %indvars.iv91, 13
  %78 = getelementptr inbounds i8, ptr %76, i64 %77
  %79 = call i32 @read_block(i32 noundef %72, i64 noundef %75, ptr noundef null, ptr noundef %78) #10
  %.not67 = icmp eq i32 %79, 0
  br i1 %.not67, label %80, label %71

80:                                               ; preds = %.critedge
  %81 = call i32 @pthread_mutex_lock(ptr noundef nonnull @screen_mutex) #10
  %82 = load i32, ptr @progress_enabled, align 4, !tbaa !15
  %.not66 = icmp eq i32 %82, 0
  br i1 %.not66, label %86, label %83

83:                                               ; preds = %80
  %84 = load ptr, ptr @stderr, align 8, !tbaa !13
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef nonnull @.str.1) #11
  br label %86

86:                                               ; preds = %83, %80
  %87 = load ptr, ptr @stderr, align 8, !tbaa !13
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.3) #11
  %89 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @screen_mutex) #10
  br label %.loopexit

._crit_edge74:                                    ; preds = %71
  %90 = load i32, ptr @swap, align 4, !tbaa !15
  %.not65 = icmp ne i32 %90, 0
  %91 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 16), align 8
  %92 = icmp ne i32 %91, 0
  %or.cond = select i1 %.not65, i1 %92, 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 ]
  %93 = load ptr, ptr @fragment_table, align 8, !tbaa !13
  %94 = getelementptr inbounds %struct.squashfs_fragment_entry_2, ptr %93, i64 %indvars.iv96
  %95 = getelementptr inbounds i8, ptr %94, i64 1
  %96 = load i8, ptr %94, align 1, !tbaa !17
  %97 = getelementptr inbounds i8, ptr %94, i64 2
  %98 = load i8, ptr %95, align 1, !tbaa !17
  %99 = getelementptr inbounds i8, ptr %94, i64 3
  %100 = load i8, ptr %97, align 1, !tbaa !17
  %101 = load i8, ptr %99, align 1, !tbaa !17
  %.sroa.12.0.insert.ext = zext i8 %96 to i32
  %.sroa.12.0.insert.shift = shl nuw i32 %.sroa.12.0.insert.ext, 24
  %.sroa.10.0.insert.ext = zext i8 %98 to i32
  %.sroa.10.0.insert.shift = shl nuw nsw i32 %.sroa.10.0.insert.ext, 16
  %.sroa.10.0.insert.insert = or disjoint i32 %.sroa.12.0.insert.shift, %.sroa.10.0.insert.shift
  %.sroa.8.0.insert.ext = zext i8 %100 to i32
  %.sroa.8.0.insert.shift = shl nuw nsw i32 %.sroa.8.0.insert.ext, 8
  %.sroa.8.0.insert.insert = or disjoint i32 %.sroa.10.0.insert.insert, %.sroa.8.0.insert.shift
  %.sroa.6.0.insert.ext = zext i8 %101 to i32
  %.sroa.6.0.insert.insert = or disjoint i32 %.sroa.8.0.insert.insert, %.sroa.6.0.insert.ext
  %102 = getelementptr inbounds %struct.squashfs_fragment_entry_2, ptr %93, i64 %indvars.iv96, i32 1
  %103 = getelementptr inbounds i8, ptr %102, i64 1
  %104 = load i8, ptr %102, align 1, !tbaa !17
  %105 = getelementptr inbounds i8, ptr %102, i64 2
  %106 = load i8, ptr %103, align 1, !tbaa !17
  %107 = getelementptr inbounds i8, ptr %102, i64 3
  %108 = load i8, ptr %105, align 1, !tbaa !17
  %109 = load i8, ptr %107, align 1, !tbaa !17
  %.sroa.12.0.insert.ext119 = zext i8 %104 to i32
  %.sroa.12.0.insert.shift120 = shl nuw i32 %.sroa.12.0.insert.ext119, 24
  %.sroa.10.0.insert.ext114 = zext i8 %106 to i32
  %.sroa.10.0.insert.shift115 = shl nuw nsw i32 %.sroa.10.0.insert.ext114, 16
  %.sroa.10.0.insert.insert117 = or disjoint i32 %.sroa.12.0.insert.shift120, %.sroa.10.0.insert.shift115
  %.sroa.8.0.insert.ext109 = zext i8 %108 to i32
  %.sroa.8.0.insert.shift110 = shl nuw nsw i32 %.sroa.8.0.insert.ext109, 8
  %.sroa.8.0.insert.insert112 = or disjoint i32 %.sroa.10.0.insert.insert117, %.sroa.8.0.insert.shift110
  %.sroa.6.0.insert.ext104 = zext i8 %109 to i32
  %.sroa.6.0.insert.insert107 = or disjoint i32 %.sroa.8.0.insert.insert112, %.sroa.6.0.insert.ext104
  store i32 %.sroa.6.0.insert.insert, ptr %94, align 1
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %94, i64 4
  store i32 %.sroa.6.0.insert.insert107, ptr %.sroa.5.0..sroa_idx, align 1
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %110 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 16), align 8, !tbaa !5
  %111 = zext i32 %110 to i64
  %112 = icmp ult i64 %indvars.iv.next97, %111
  br i1 %112, label %.lr.ph82, label %.loopexit, !llvm.loop !21

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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 #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


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