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

; 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 }

@swap = external global i32, align 4
@sBlk = external global %struct.super_block, align 8
@screen_mutex = external global %union.pthread_mutex_t, align 8
@stderr = external global ptr, align 8
@uid_table = external global ptr, align 8
@guid_table = external global ptr, align 8
@progress_enabled = external global i32, align 4
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [51 x i8], align 1
@fd = external global i32, align 4
@.str.8 = external hidden unnamed_addr constant [47 x i8], align 1

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @read_uids_guids_1() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %13 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 1), align 8, !tbaa !5
  %14 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 2), align 4, !tbaa !13
  %15 = add i32 %13, %14
  %16 = zext i32 %15 to i64
  %17 = mul i64 %16, 4
  %18 = call noalias ptr @malloc(i64 noundef %17) #8
  store ptr %18, ptr @uid_table, align 8, !tbaa !14
  %19 = load ptr, ptr @uid_table, align 8, !tbaa !14
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %35

21:                                               ; preds = %0
  br label %22

22:                                               ; preds = %21
  %23 = call i32 @pthread_mutex_lock(ptr noundef @screen_mutex) #7
  %24 = load i32, ptr @progress_enabled, align 4, !tbaa !16
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %29

26:                                               ; preds = %22
  %27 = load ptr, ptr @stderr, align 8, !tbaa !14
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.6) #7
  br label %29

29:                                               ; preds = %26, %22
  %30 = load ptr, ptr @stderr, align 8, !tbaa !14
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.7) #7
  %32 = call i32 @pthread_mutex_unlock(ptr noundef @screen_mutex) #7
  br label %33

33:                                               ; preds = %29
  br label %34

34:                                               ; preds = %33
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %159

35:                                               ; preds = %0
  %36 = load ptr, ptr @uid_table, align 8, !tbaa !14
  %37 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 1), align 8, !tbaa !5
  %38 = zext i32 %37 to i64
  %39 = getelementptr inbounds i32, ptr %36, i64 %38
  store ptr %39, ptr @guid_table, align 8, !tbaa !14
  %40 = load i32, ptr @swap, align 4, !tbaa !16
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %130

42:                                               ; preds = %35
  %43 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 1), align 8, !tbaa !5
  %44 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 2), align 4, !tbaa !13
  %45 = add i32 %43, %44
  %46 = zext i32 %45 to i64
  %47 = call ptr @llvm.stacksave.p0()
  store ptr %47, ptr %4, align 8
  %48 = alloca i32, i64 %46, align 16
  store i64 %46, ptr %5, align 8
  %49 = load i32, ptr @fd, align 4, !tbaa !16
  %50 = load i64, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 3), align 8, !tbaa !17
  %51 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 1), align 8, !tbaa !5
  %52 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 2), align 4, !tbaa !13
  %53 = add i32 %51, %52
  %54 = zext i32 %53 to i64
  %55 = mul i64 %54, 4
  %56 = trunc i64 %55 to i32
  %57 = call i32 @read_fs_bytes(i32 noundef %49, i64 noundef %50, i32 noundef %56, ptr noundef %48)
  store i32 %57, ptr %2, align 4, !tbaa !16
  %58 = load i32, ptr %2, align 4, !tbaa !16
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %74

60:                                               ; preds = %42
  br label %61

61:                                               ; preds = %60
  %62 = call i32 @pthread_mutex_lock(ptr noundef @screen_mutex) #7
  %63 = load i32, ptr @progress_enabled, align 4, !tbaa !16
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %61
  %66 = load ptr, ptr @stderr, align 8, !tbaa !14
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.6) #7
  br label %68

68:                                               ; preds = %65, %61
  %69 = load ptr, ptr @stderr, align 8, !tbaa !14
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.8) #7
  %71 = call i32 @pthread_mutex_unlock(ptr noundef @screen_mutex) #7
  br label %72

72:                                               ; preds = %68
  br label %73

73:                                               ; preds = %72
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %126

74:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %75 = load ptr, ptr @uid_table, align 8, !tbaa !14
  %76 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 1), align 8, !tbaa !5
  %77 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 2), align 4, !tbaa !13
  %78 = mul i32 %77, 4
  %79 = add i32 %76, %78
  %80 = zext i32 %79 to i64
  call void @llvm.memset.p0.i64(ptr align 4 %75, i8 0, i64 %80, i1 false)
  store i32 0, ptr %6, align 4, !tbaa !16
  store i32 0, ptr %7, align 4, !tbaa !16
  br label %81

81:                                               ; preds = %120, %74
  %82 = load i32, ptr %6, align 4, !tbaa !16
  %83 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 1), align 8, !tbaa !5
  %84 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 2), align 4, !tbaa !13
  %85 = add i32 %83, %84
  %86 = icmp ult i32 %82, %85
  br i1 %86, label %87, label %125

87:                                               ; preds = %81
  %88 = load i32, ptr %7, align 4, !tbaa !16
  %89 = srem i32 %88, 8
  store i32 %89, ptr %9, align 4, !tbaa !16
  store i64 0, ptr %10, align 8, !tbaa !18
  %90 = load i32, ptr %7, align 4, !tbaa !16
  %91 = sdiv i32 %90, 8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %48, i64 %92
  store ptr %93, ptr %11, align 8, !tbaa !14
  %94 = getelementptr inbounds i8, ptr %10, i64 7
  store ptr %94, ptr %12, align 8, !tbaa !14
  store i32 0, ptr %8, align 4, !tbaa !16
  br label %95

95:                                               ; preds = %106, %87
  %96 = load i32, ptr %8, align 4, !tbaa !16
  %97 = load i32, ptr %9, align 4, !tbaa !16
  %98 = add nsw i32 32, %97
  %99 = icmp slt i32 %96, %98
  br i1 %99, label %100, label %109

100:                                              ; preds = %95
  %101 = load ptr, ptr %11, align 8, !tbaa !14
  %102 = getelementptr inbounds i8, ptr %101, i32 1
  store ptr %102, ptr %11, align 8, !tbaa !14
  %103 = load i8, ptr %101, align 1, !tbaa !19
  %104 = load ptr, ptr %12, align 8, !tbaa !14
  %105 = getelementptr inbounds i8, ptr %104, i32 -1
  store ptr %105, ptr %12, align 8, !tbaa !14
  store i8 %103, ptr %104, align 1, !tbaa !19
  br label %106

106:                                              ; preds = %100
  %107 = load i32, ptr %8, align 4, !tbaa !16
  %108 = add nsw i32 %107, 8
  store i32 %108, ptr %8, align 4, !tbaa !16
  br label %95, !llvm.loop !20

109:                                              ; preds = %95
  %110 = load i64, ptr %10, align 8, !tbaa !18
  %111 = load i32, ptr %9, align 4, !tbaa !16
  %112 = sub nsw i32 32, %111
  %113 = zext i32 %112 to i64
  %114 = lshr i64 %110, %113
  %115 = trunc i64 %114 to i32
  %116 = load ptr, ptr @uid_table, align 8, !tbaa !14
  %117 = load i32, ptr %6, align 4, !tbaa !16
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %116, i64 %118
  store i32 %115, ptr %119, align 4, !tbaa !16
  br label %120

120:                                              ; preds = %109
  %121 = load i32, ptr %6, align 4, !tbaa !16
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %6, align 4, !tbaa !16
  %123 = load i32, ptr %7, align 4, !tbaa !16
  %124 = add nsw i32 %123, 32
  store i32 %124, ptr %7, align 4, !tbaa !16
  br label %81, !llvm.loop !22

125:                                              ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  store i32 0, ptr %3, align 4
  br label %126

126:                                              ; preds = %125, %73
  %127 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %127)
  %128 = load i32, ptr %3, align 4
  switch i32 %128, label %159 [
    i32 0, label %129
  ]

129:                                              ; preds = %126
  br label %158

130:                                              ; preds = %35
  %131 = load i32, ptr @fd, align 4, !tbaa !16
  %132 = load i64, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 3), align 8, !tbaa !17
  %133 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 1), align 8, !tbaa !5
  %134 = load i32, ptr getelementptr inbounds (%struct.super_block, ptr @sBlk, i32 0, i32 2), align 4, !tbaa !13
  %135 = add i32 %133, %134
  %136 = zext i32 %135 to i64
  %137 = mul i64 %136, 4
  %138 = trunc i64 %137 to i32
  %139 = load ptr, ptr @uid_table, align 8, !tbaa !14
  %140 = call i32 @read_fs_bytes(i32 noundef %131, i64 noundef %132, i32 noundef %138, ptr noundef %139)
  store i32 %140, ptr %2, align 4, !tbaa !16
  %141 = load i32, ptr %2, align 4, !tbaa !16
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %157

143:                                              ; preds = %130
  br label %144

144:                                              ; preds = %143
  %145 = call i32 @pthread_mutex_lock(ptr noundef @screen_mutex) #7
  %146 = load i32, ptr @progress_enabled, align 4, !tbaa !16
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %151

148:                                              ; preds = %144
  %149 = load ptr, ptr @stderr, align 8, !tbaa !14
  %150 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef @.str.6) #7
  br label %151

151:                                              ; preds = %148, %144
  %152 = load ptr, ptr @stderr, align 8, !tbaa !14
  %153 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %152, ptr noundef @.str.8) #7
  %154 = call i32 @pthread_mutex_unlock(ptr noundef @screen_mutex) #7
  br label %155

155:                                              ; preds = %151
  br label %156

156:                                              ; preds = %155
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %159

157:                                              ; preds = %130
  br label %158

158:                                              ; preds = %157, %129
  store i32 1, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %159

159:                                              ; preds = %158, %156, %126, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %160 = load i32, ptr %1, align 4
  ret i32 %160
}

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 96}
!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 = !{!6, !8, i64 100}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!8, !8, i64 0}
!17 = !{!6, !12, i64 104}
!18 = !{!12, !12, i64 0}
!19 = !{!9, !9, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


; 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 }

@swap = external local_unnamed_addr global i32, align 4
@sBlk = external local_unnamed_addr global %struct.super_block, align 8
@screen_mutex = external global %union.pthread_mutex_t, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@uid_table = external local_unnamed_addr global ptr, align 8
@guid_table = external local_unnamed_addr global ptr, align 8
@progress_enabled = external local_unnamed_addr global i32, align 4
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [51 x i8], align 1
@fd = external local_unnamed_addr global i32, align 4
@.str.8 = external hidden unnamed_addr constant [47 x i8], align 1

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

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

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) local_unnamed_addr #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 #3

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @read_uids_guids_1() local_unnamed_addr #4 {
  %1 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 96), align 8, !tbaa !5
  %2 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 100), align 4, !tbaa !13
  %3 = add i32 %2, %1
  %4 = zext i32 %3 to i64
  %5 = shl nuw nsw i64 %4, 2
  %6 = tail call noalias ptr @malloc(i64 noundef %5) #7
  store ptr %6, ptr @uid_table, align 8, !tbaa !14
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %18

8:                                                ; preds = %0
  %9 = tail call i32 @pthread_mutex_lock(ptr noundef nonnull @screen_mutex) #8
  %10 = load i32, ptr @progress_enabled, align 4, !tbaa !16
  %.not26 = icmp eq i32 %10, 0
  br i1 %.not26, label %14, label %11

11:                                               ; preds = %8
  %12 = load ptr, ptr @stderr, align 8, !tbaa !14
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.6) #9
  br label %14

14:                                               ; preds = %11, %8
  %15 = load ptr, ptr @stderr, align 8, !tbaa !14
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.7) #9
  %17 = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull @screen_mutex) #8
  br label %84

18:                                               ; preds = %0
  %19 = zext i32 %1 to i64
  %20 = getelementptr inbounds i32, ptr %6, i64 %19
  store ptr %20, ptr @guid_table, align 8, !tbaa !14
  %21 = load i32, ptr @swap, align 4, !tbaa !16
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %68, label %22

22:                                               ; preds = %18
  %23 = tail call ptr @llvm.stacksave.p0()
  %24 = alloca i32, i64 %4, align 16
  %25 = load i32, ptr @fd, align 4, !tbaa !16
  %26 = load i64, ptr getelementptr inbounds (i8, ptr @sBlk, i64 104), align 8, !tbaa !17
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 96), align 8, !tbaa !5
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 100), align 4, !tbaa !13
  %29 = add i32 %28, %27
  %30 = shl i32 %29, 2
  %31 = call i32 @read_fs_bytes(i32 noundef %25, i64 noundef %26, i32 noundef %30, ptr noundef nonnull %24) #8
  %.not25 = icmp eq i32 %31, 0
  br i1 %.not25, label %32, label %41

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

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

.thread:                                          ; preds = %32, %35
  %38 = load ptr, ptr @stderr, align 8, !tbaa !14
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.8) #9
  %40 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @screen_mutex) #8
  call void @llvm.stackrestore.p0(ptr %23)
  br label %84

41:                                               ; preds = %22
  %42 = load ptr, ptr @uid_table, align 8, !tbaa !14
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 96), align 8, !tbaa !5
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 100), align 4, !tbaa !13
  %45 = shl i32 %44, 2
  %46 = add i32 %45, %43
  %47 = zext i32 %46 to i64
  call void @llvm.memset.p0.i64(ptr align 4 %42, i8 0, i64 %47, i1 false)
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 96), align 8, !tbaa !5
  %49 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 100), align 4, !tbaa !13
  %50 = sub i32 0, %48
  %.not32 = icmp eq i32 %49, %50
  br i1 %.not32, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %41
  %51 = load ptr, ptr @uid_table, align 8, !tbaa !14
  br label %52

52:                                               ; preds = %.lr.ph, %52
  %indvars.iv33 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next34, %52 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %52 ]
  %53 = lshr exact i64 %indvars.iv, 3
  %54 = getelementptr inbounds i8, ptr %24, i64 %53
  %55 = getelementptr inbounds i8, ptr %54, i64 1
  %56 = load i8, ptr %54, align 4, !tbaa !18
  %57 = getelementptr inbounds i8, ptr %54, i64 2
  %58 = load i8, ptr %55, align 1, !tbaa !18
  %59 = getelementptr inbounds i8, ptr %54, i64 3
  %60 = load i8, ptr %57, align 2, !tbaa !18
  %61 = load i8, ptr %59, align 1, !tbaa !18
  %.sroa.7.0.insert.ext = zext i8 %56 to i32
  %.sroa.7.0.insert.shift = shl nuw i32 %.sroa.7.0.insert.ext, 24
  %.sroa.6.0.insert.ext = zext i8 %58 to i32
  %.sroa.6.0.insert.shift = shl nuw nsw i32 %.sroa.6.0.insert.ext, 16
  %.sroa.6.0.insert.insert = or disjoint i32 %.sroa.7.0.insert.shift, %.sroa.6.0.insert.shift
  %.sroa.5.0.insert.ext = zext i8 %60 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.6.0.insert.insert, %.sroa.5.0.insert.shift
  %.sroa.4.0.insert.ext = zext i8 %61 to i32
  %.sroa.4.0.insert.insert = or disjoint i32 %.sroa.5.0.insert.insert, %.sroa.4.0.insert.ext
  %62 = getelementptr inbounds i32, ptr %51, i64 %indvars.iv33
  store i32 %.sroa.4.0.insert.insert, ptr %62, align 4, !tbaa !16
  %indvars.iv.next34 = add nuw nsw i64 %indvars.iv33, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 32
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 96), align 8, !tbaa !5
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @sBlk, i64 100), align 4, !tbaa !13
  %65 = add i32 %64, %63
  %66 = zext i32 %65 to i64
  %67 = icmp ult i64 %indvars.iv.next34, %66
  br i1 %67, label %52, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %52, %41
  call void @llvm.stackrestore.p0(ptr %23)
  br label %84

68:                                               ; preds = %18
  %69 = load i32, ptr @fd, align 4, !tbaa !16
  %70 = load i64, ptr getelementptr inbounds (i8, ptr @sBlk, i64 104), align 8, !tbaa !17
  %71 = shl i32 %3, 2
  %72 = tail call i32 @read_fs_bytes(i32 noundef %69, i64 noundef %70, i32 noundef %71, ptr noundef nonnull %6) #8
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %84

74:                                               ; preds = %68
  %75 = tail call i32 @pthread_mutex_lock(ptr noundef nonnull @screen_mutex) #8
  %76 = load i32, ptr @progress_enabled, align 4, !tbaa !16
  %.not23 = icmp eq i32 %76, 0
  br i1 %.not23, label %80, label %77

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

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

84:                                               ; preds = %68, %._crit_edge, %.thread, %80, %14
  %.1 = phi i32 [ 0, %14 ], [ 0, %80 ], [ 0, %.thread ], [ 1, %._crit_edge ], [ 1, %68 ]
  ret i32 %.1
}

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 96}
!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 = !{!6, !8, i64 100}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!8, !8, i64 0}
!17 = !{!6, !12, i64 104}
!18 = !{!9, !9, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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