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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.squashfs_super_block = type { i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.compressor = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32 }

@comp = external hidden global ptr, align 8
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [155 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @read_super(i32 noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [8192 x i8], align 16
  %11 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8192, ptr %10) #5
  %12 = load i32, ptr %5, align 4, !tbaa !5
  %13 = load ptr, ptr %6, align 8, !tbaa !9
  %14 = call i32 @read_fs_bytes(i32 noundef %12, i64 noundef 0, i32 noundef 96, ptr noundef %13)
  store i32 %14, ptr %8, align 4, !tbaa !5
  %15 = load i32, ptr %8, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %3
  br label %283

18:                                               ; preds = %3
  %19 = load ptr, ptr %6, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.squashfs_super_block, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = icmp ne i32 %21, 1936814952
  br i1 %22, label %23, label %43

23:                                               ; preds = %18
  %24 = load ptr, ptr %6, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.squashfs_super_block, ptr %24, i32 0, i32 0
  %26 = load i32, ptr %25, align 8, !tbaa !11
  %27 = icmp eq i32 %26, 1752396147
  br i1 %27, label %28, label %35

28:                                               ; preds = %23
  br label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr @stderr, align 8, !tbaa !9
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.4, ptr noundef %31) #5
  br label %33

33:                                               ; preds = %29
  br label %34

34:                                               ; preds = %33
  br label %42

35:                                               ; preds = %23
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr @stderr, align 8, !tbaa !9
  %38 = load ptr, ptr %7, align 8, !tbaa !9
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.5, ptr noundef %38) #5
  br label %40

40:                                               ; preds = %36
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41, %34
  br label %283

43:                                               ; preds = %18
  %44 = load ptr, ptr %6, align 8, !tbaa !9
  %45 = getelementptr inbounds %struct.squashfs_super_block, ptr %44, i32 0, i32 9
  %46 = load i16, ptr %45, align 4, !tbaa !15
  %47 = zext i16 %46 to i32
  %48 = icmp ne i32 %47, 4
  br i1 %48, label %55, label %49

49:                                               ; preds = %43
  %50 = load ptr, ptr %6, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.squashfs_super_block, ptr %50, i32 0, i32 10
  %52 = load i16, ptr %51, align 2, !tbaa !16
  %53 = zext i16 %52 to i32
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %55, label %100

55:                                               ; preds = %49, %43
  %56 = load ptr, ptr %6, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.squashfs_super_block, ptr %56, i32 0, i32 9
  %58 = load i16, ptr %57, align 4, !tbaa !15
  %59 = zext i16 %58 to i32
  %60 = icmp slt i32 %59, 4
  br i1 %60, label %61, label %84

61:                                               ; preds = %55
  br label %62

62:                                               ; preds = %61
  %63 = load ptr, ptr @stderr, align 8, !tbaa !9
  %64 = load ptr, ptr %7, align 8, !tbaa !9
  %65 = load ptr, ptr %6, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.squashfs_super_block, ptr %65, i32 0, i32 9
  %67 = load i16, ptr %66, align 4, !tbaa !15
  %68 = zext i16 %67 to i32
  %69 = load ptr, ptr %6, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct.squashfs_super_block, ptr %69, i32 0, i32 10
  %71 = load i16, ptr %70, align 2, !tbaa !16
  %72 = zext i16 %71 to i32
  %73 = load ptr, ptr %6, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.squashfs_super_block, ptr %73, i32 0, i32 9
  %75 = load i16, ptr %74, align 4, !tbaa !15
  %76 = zext i16 %75 to i32
  %77 = load ptr, ptr %6, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.squashfs_super_block, ptr %77, i32 0, i32 10
  %79 = load i16, ptr %78, align 2, !tbaa !16
  %80 = zext i16 %79 to i32
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.6, ptr noundef %64, i32 noundef %68, i32 noundef %72, i32 noundef %76, i32 noundef %80) #5
  br label %82

82:                                               ; preds = %62
  br label %83

83:                                               ; preds = %82
  br label %99

84:                                               ; preds = %55
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr @stderr, align 8, !tbaa !9
  %87 = load ptr, ptr %7, align 8, !tbaa !9
  %88 = load ptr, ptr %6, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.squashfs_super_block, ptr %88, i32 0, i32 9
  %90 = load i16, ptr %89, align 4, !tbaa !15
  %91 = zext i16 %90 to i32
  %92 = load ptr, ptr %6, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.squashfs_super_block, ptr %92, i32 0, i32 10
  %94 = load i16, ptr %93, align 2, !tbaa !16
  %95 = zext i16 %94 to i32
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.7, ptr noundef %87, i32 noundef %91, i32 noundef %95) #5
  br label %97

97:                                               ; preds = %85
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98, %83
  br label %283

100:                                              ; preds = %49
  %101 = load ptr, ptr %6, align 8, !tbaa !9
  %102 = getelementptr inbounds %struct.squashfs_super_block, ptr %101, i32 0, i32 5
  %103 = load i16, ptr %102, align 4, !tbaa !17
  %104 = zext i16 %103 to i32
  %105 = call ptr @lookup_compressor_id(i32 noundef %104)
  store ptr %105, ptr @comp, align 8, !tbaa !9
  %106 = load ptr, ptr @comp, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct.compressor, ptr %106, i32 0, i32 10
  %108 = load i32, ptr %107, align 8, !tbaa !18
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %125, label %110

110:                                              ; preds = %100
  br label %111

111:                                              ; preds = %110
  %112 = load ptr, ptr @stderr, align 8, !tbaa !9
  %113 = load ptr, ptr %7, align 8, !tbaa !9
  %114 = load ptr, ptr @comp, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.compressor, ptr %114, i32 0, i32 9
  %116 = load ptr, ptr %115, align 8, !tbaa !20
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.8, ptr noundef %113, ptr noundef %116) #5
  br label %118

118:                                              ; preds = %111
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr @stderr, align 8, !tbaa !9
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.9) #5
  br label %123

123:                                              ; preds = %120
  br label %124

124:                                              ; preds = %123
  call void @display_compressors(ptr noundef @.str.10, ptr noundef @.str.10)
  br label %283

125:                                              ; preds = %100
  %126 = load ptr, ptr %6, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.squashfs_super_block, ptr %126, i32 0, i32 7
  %128 = load i16, ptr %127, align 8, !tbaa !21
  %129 = zext i16 %128 to i32
  %130 = ashr i32 %129, 10
  %131 = and i32 %130, 1
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %141

133:                                              ; preds = %125
  %134 = load i32, ptr %5, align 4, !tbaa !5
  %135 = getelementptr inbounds [8192 x i8], ptr %10, i64 0, i64 0
  %136 = call i32 @read_block(i32 noundef %134, i64 noundef 96, ptr noundef null, ptr noundef %135)
  store i32 %136, ptr %9, align 4, !tbaa !5
  %137 = load i32, ptr %9, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %140

139:                                              ; preds = %133
  br label %283

140:                                              ; preds = %133
  br label %141

141:                                              ; preds = %140, %125
  %142 = load ptr, ptr @comp, align 8, !tbaa !9
  %143 = load ptr, ptr %6, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.squashfs_super_block, ptr %143, i32 0, i32 3
  %145 = load i32, ptr %144, align 4, !tbaa !22
  %146 = getelementptr inbounds [8192 x i8], ptr %10, i64 0, i64 0
  %147 = load i32, ptr %9, align 4, !tbaa !5
  %148 = call i32 @compressor_extract_options(ptr noundef %142, i32 noundef %145, ptr noundef %146, i32 noundef %147)
  store i32 %148, ptr %8, align 4, !tbaa !5
  %149 = load i32, ptr %8, align 4, !tbaa !5
  %150 = icmp eq i32 %149, -1
  br i1 %150, label %151, label %157

151:                                              ; preds = %141
  br label %152

152:                                              ; preds = %151
  %153 = load ptr, ptr @stderr, align 8, !tbaa !9
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef @.str.11) #5
  br label %155

155:                                              ; preds = %152
  br label %156

156:                                              ; preds = %155
  br label %283

157:                                              ; preds = %141
  %158 = load ptr, ptr %6, align 8, !tbaa !9
  %159 = getelementptr inbounds %struct.squashfs_super_block, ptr %158, i32 0, i32 7
  %160 = load i16, ptr %159, align 8, !tbaa !21
  %161 = zext i16 %160 to i32
  %162 = ashr i32 %161, 7
  %163 = and i32 %162, 1
  %164 = icmp ne i32 %163, 0
  %165 = zext i1 %164 to i64
  %166 = select i1 %164, ptr @.str.13, ptr @.str.10
  %167 = load ptr, ptr %7, align 8, !tbaa !9
  %168 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, ptr noundef %166, ptr noundef %167)
  %169 = load ptr, ptr @comp, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.compressor, ptr %169, i32 0, i32 9
  %171 = load ptr, ptr %170, align 8, !tbaa !20
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %171)
  %173 = load ptr, ptr %6, align 8, !tbaa !9
  %174 = getelementptr inbounds %struct.squashfs_super_block, ptr %173, i32 0, i32 7
  %175 = load i16, ptr %174, align 8, !tbaa !21
  %176 = zext i16 %175 to i32
  %177 = ashr i32 %176, 0
  %178 = and i32 %177, 1
  %179 = icmp ne i32 %178, 0
  %180 = zext i1 %179 to i64
  %181 = select i1 %179, ptr @.str.16, ptr @.str.10
  %182 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, ptr noundef %181)
  %183 = load ptr, ptr %6, align 8, !tbaa !9
  %184 = getelementptr inbounds %struct.squashfs_super_block, ptr %183, i32 0, i32 7
  %185 = load i16, ptr %184, align 8, !tbaa !21
  %186 = zext i16 %185 to i32
  %187 = ashr i32 %186, 1
  %188 = and i32 %187, 1
  %189 = icmp ne i32 %188, 0
  %190 = zext i1 %189 to i64
  %191 = select i1 %189, ptr @.str.16, ptr @.str.10
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, ptr noundef %191)
  %193 = load ptr, ptr %6, align 8, !tbaa !9
  %194 = getelementptr inbounds %struct.squashfs_super_block, ptr %193, i32 0, i32 7
  %195 = load i16, ptr %194, align 8, !tbaa !21
  %196 = zext i16 %195 to i32
  %197 = ashr i32 %196, 3
  %198 = and i32 %197, 1
  %199 = icmp ne i32 %198, 0
  %200 = zext i1 %199 to i64
  %201 = select i1 %199, ptr @.str.16, ptr @.str.10
  %202 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, ptr noundef %201)
  %203 = load ptr, ptr %6, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.squashfs_super_block, ptr %203, i32 0, i32 7
  %205 = load i16, ptr %204, align 8, !tbaa !21
  %206 = zext i16 %205 to i32
  %207 = ashr i32 %206, 8
  %208 = and i32 %207, 1
  %209 = icmp ne i32 %208, 0
  %210 = zext i1 %209 to i64
  %211 = select i1 %209, ptr @.str.16, ptr @.str.10
  %212 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, ptr noundef %211)
  %213 = load ptr, ptr %6, align 8, !tbaa !9
  %214 = getelementptr inbounds %struct.squashfs_super_block, ptr %213, i32 0, i32 7
  %215 = load i16, ptr %214, align 8, !tbaa !21
  %216 = zext i16 %215 to i32
  %217 = ashr i32 %216, 4
  %218 = and i32 %217, 1
  %219 = icmp ne i32 %218, 0
  %220 = zext i1 %219 to i64
  %221 = select i1 %219, ptr @.str.21, ptr @.str.10
  %222 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, ptr noundef %221)
  %223 = load ptr, ptr %6, align 8, !tbaa !9
  %224 = getelementptr inbounds %struct.squashfs_super_block, ptr %223, i32 0, i32 7
  %225 = load i16, ptr %224, align 8, !tbaa !21
  %226 = zext i16 %225 to i32
  %227 = ashr i32 %226, 5
  %228 = and i32 %227, 1
  %229 = icmp ne i32 %228, 0
  %230 = zext i1 %229 to i64
  %231 = select i1 %229, ptr @.str.10, ptr @.str.21
  %232 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, ptr noundef %231)
  %233 = load ptr, ptr %6, align 8, !tbaa !9
  %234 = getelementptr inbounds %struct.squashfs_super_block, ptr %233, i32 0, i32 7
  %235 = load i16, ptr %234, align 8, !tbaa !21
  %236 = zext i16 %235 to i32
  %237 = ashr i32 %236, 6
  %238 = and i32 %237, 1
  %239 = icmp ne i32 %238, 0
  %240 = zext i1 %239 to i64
  %241 = select i1 %239, ptr @.str.10, ptr @.str.21
  %242 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, ptr noundef %241)
  %243 = load ptr, ptr %6, align 8, !tbaa !9
  %244 = getelementptr inbounds %struct.squashfs_super_block, ptr %243, i32 0, i32 7
  %245 = load i16, ptr %244, align 8, !tbaa !21
  %246 = zext i16 %245 to i32
  %247 = ashr i32 %246, 9
  %248 = and i32 %247, 1
  %249 = icmp ne i32 %248, 0
  %250 = zext i1 %249 to i64
  %251 = select i1 %249, ptr @.str.21, ptr @.str.10
  %252 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, ptr noundef %251)
  %253 = load ptr, ptr %6, align 8, !tbaa !9
  %254 = getelementptr inbounds %struct.squashfs_super_block, ptr %253, i32 0, i32 12
  %255 = load i64, ptr %254, align 8, !tbaa !23
  %256 = sitofp i64 %255 to double
  %257 = fdiv double %256, 1.024000e+03
  %258 = load ptr, ptr %6, align 8, !tbaa !9
  %259 = getelementptr inbounds %struct.squashfs_super_block, ptr %258, i32 0, i32 12
  %260 = load i64, ptr %259, align 8, !tbaa !23
  %261 = sitofp i64 %260 to double
  %262 = fdiv double %261, 0x4130000000000000
  %263 = call i32 (ptr, ...) @printf(ptr noundef @.str.25, double noundef %257, double noundef %262)
  %264 = load ptr, ptr %6, align 8, !tbaa !9
  %265 = getelementptr inbounds %struct.squashfs_super_block, ptr %264, i32 0, i32 3
  %266 = load i32, ptr %265, align 4, !tbaa !22
  %267 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i32 noundef %266)
  %268 = load ptr, ptr %6, align 8, !tbaa !9
  %269 = getelementptr inbounds %struct.squashfs_super_block, ptr %268, i32 0, i32 4
  %270 = load i32, ptr %269, align 8, !tbaa !24
  %271 = call i32 (ptr, ...) @printf(ptr noundef @.str.27, i32 noundef %270)
  %272 = load ptr, ptr %6, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.squashfs_super_block, ptr %272, i32 0, i32 1
  %274 = load i32, ptr %273, align 4, !tbaa !25
  %275 = call i32 (ptr, ...) @printf(ptr noundef @.str.28, i32 noundef %274)
  %276 = load ptr, ptr %6, align 8, !tbaa !9
  %277 = getelementptr inbounds %struct.squashfs_super_block, ptr %276, i32 0, i32 8
  %278 = load i16, ptr %277, align 2, !tbaa !26
  %279 = zext i16 %278 to i32
  %280 = call i32 (ptr, ...) @printf(ptr noundef @.str.29, i32 noundef %279)
  %281 = call i32 (ptr, ...) @printf(ptr noundef @.str.30)
  %282 = load ptr, ptr @comp, align 8, !tbaa !9
  store ptr %282, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %284

283:                                              ; preds = %156, %139, %124, %99, %42, %17
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %284

284:                                              ; preds = %283, %157
  call void @llvm.lifetime.end.p0(i64 8192, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %285 = load ptr, ptr %4, align 8
  ret ptr %285
}

declare ptr @lookup_compressor_id(i32 noundef) #2

declare void @display_compressors(ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @compressor_extract_options(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #4

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 = { "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 = { inlinehint 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 }

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

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


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

@comp = external hidden local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [155 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @read_super(i32 noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca [8192 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %4) #5
  %5 = tail call i32 @read_fs_bytes(i32 noundef %0, i64 noundef 0, i32 noundef 96, ptr noundef %1) #5
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %126, label %7

7:                                                ; preds = %3
  %8 = load i32, ptr %1, align 8, !tbaa !5
  switch i32 %8, label %12 [
    i32 1936814952, label %15
    i32 1752396147, label %9
  ]

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

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

15:                                               ; preds = %7
  %16 = getelementptr inbounds i8, ptr %1, i64 28
  %17 = load i16, ptr %16, align 4, !tbaa !14
  %.not46 = icmp eq i16 %17, 4
  br i1 %.not46, label %18, label %21

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %1, i64 30
  %20 = load i16, ptr %19, align 2, !tbaa !15
  %.not47 = icmp eq i16 %20, 0
  br i1 %.not47, label %35, label %.thread

21:                                               ; preds = %15
  %22 = zext i16 %17 to i32
  %23 = icmp ult i16 %17, 4
  br i1 %23, label %24, label %..thread_crit_edge

..thread_crit_edge:                               ; preds = %21
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 30
  %.pre = load i16, ptr %.phi.trans.insert, align 2, !tbaa !15
  br label %.thread

24:                                               ; preds = %21
  %25 = load ptr, ptr @stderr, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %1, i64 30
  %27 = load i16, ptr %26, align 2, !tbaa !15
  %28 = zext i16 %27 to i32
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.6, ptr noundef %2, i32 noundef %22, i32 noundef %28, i32 noundef %22, i32 noundef %28) #6
  br label %126

.thread:                                          ; preds = %..thread_crit_edge, %18
  %30 = phi i16 [ %.pre, %..thread_crit_edge ], [ %20, %18 ]
  %31 = phi i32 [ %22, %..thread_crit_edge ], [ 4, %18 ]
  %32 = load ptr, ptr @stderr, align 8, !tbaa !12
  %33 = zext i16 %30 to i32
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.7, ptr noundef %2, i32 noundef %31, i32 noundef %33) #6
  br label %126

35:                                               ; preds = %18
  %36 = getelementptr inbounds i8, ptr %1, i64 20
  %37 = load i16, ptr %36, align 4, !tbaa !16
  %38 = zext i16 %37 to i32
  %39 = tail call ptr @lookup_compressor_id(i32 noundef %38) #5
  store ptr %39, ptr @comp, align 8, !tbaa !12
  %40 = getelementptr inbounds i8, ptr %39, i64 80
  %41 = load i32, ptr %40, align 8, !tbaa !17
  %.not48 = icmp eq i32 %41, 0
  br i1 %.not48, label %42, label %49

42:                                               ; preds = %35
  %43 = load ptr, ptr @stderr, align 8, !tbaa !12
  %44 = getelementptr inbounds i8, ptr %39, i64 72
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.8, ptr noundef %2, ptr noundef %45) #6
  %47 = load ptr, ptr @stderr, align 8, !tbaa !12
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.9) #6
  tail call void @display_compressors(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.10) #5
  br label %126

49:                                               ; preds = %35
  %50 = getelementptr inbounds i8, ptr %1, i64 24
  %51 = load i16, ptr %50, align 8, !tbaa !20
  %52 = and i16 %51, 1024
  %.not49 = icmp eq i16 %52, 0
  br i1 %.not49, label %56, label %53

53:                                               ; preds = %49
  %54 = call i32 @read_block(i32 noundef %0, i64 noundef 96, ptr noundef null, ptr noundef nonnull %4)
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %126, label %._crit_edge

._crit_edge:                                      ; preds = %53
  %.pre59 = load ptr, ptr @comp, align 8, !tbaa !12
  br label %56

56:                                               ; preds = %._crit_edge, %49
  %57 = phi ptr [ %.pre59, %._crit_edge ], [ %39, %49 ]
  %.0 = phi i32 [ %54, %._crit_edge ], [ 0, %49 ]
  %58 = getelementptr inbounds i8, ptr %1, i64 12
  %59 = load i32, ptr %58, align 4, !tbaa !21
  %60 = call i32 @compressor_extract_options(ptr noundef %57, i32 noundef %59, ptr noundef nonnull %4, i32 noundef %.0)
  %61 = icmp eq i32 %60, -1
  br i1 %61, label %62, label %65

62:                                               ; preds = %56
  %63 = load ptr, ptr @stderr, align 8, !tbaa !12
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.11) #6
  br label %126

65:                                               ; preds = %56
  %66 = load i16, ptr %50, align 8, !tbaa !20
  %67 = and i16 %66, 128
  %.not50 = icmp eq i16 %67, 0
  %68 = select i1 %.not50, ptr @.str.10, ptr @.str.13
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef nonnull %68, ptr noundef %2)
  %70 = load ptr, ptr @comp, align 8, !tbaa !12
  %71 = getelementptr inbounds i8, ptr %70, i64 72
  %72 = load ptr, ptr %71, align 8, !tbaa !19
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %72)
  %74 = load i16, ptr %50, align 8, !tbaa !20
  %75 = and i16 %74, 1
  %.not51 = icmp eq i16 %75, 0
  %76 = select i1 %.not51, ptr @.str.10, ptr @.str.16
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, ptr noundef nonnull %76)
  %78 = load i16, ptr %50, align 8, !tbaa !20
  %79 = and i16 %78, 2
  %.not52 = icmp eq i16 %79, 0
  %80 = select i1 %.not52, ptr @.str.10, ptr @.str.16
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef nonnull %80)
  %82 = load i16, ptr %50, align 8, !tbaa !20
  %83 = and i16 %82, 8
  %.not53 = icmp eq i16 %83, 0
  %84 = select i1 %.not53, ptr @.str.10, ptr @.str.16
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, ptr noundef nonnull %84)
  %86 = load i16, ptr %50, align 8, !tbaa !20
  %87 = and i16 %86, 256
  %.not54 = icmp eq i16 %87, 0
  %88 = select i1 %.not54, ptr @.str.10, ptr @.str.16
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, ptr noundef nonnull %88)
  %90 = load i16, ptr %50, align 8, !tbaa !20
  %91 = and i16 %90, 16
  %.not55 = icmp eq i16 %91, 0
  %92 = select i1 %.not55, ptr @.str.10, ptr @.str.21
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, ptr noundef nonnull %92)
  %94 = load i16, ptr %50, align 8, !tbaa !20
  %95 = and i16 %94, 32
  %.not56 = icmp eq i16 %95, 0
  %96 = select i1 %.not56, ptr @.str.21, ptr @.str.10
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, ptr noundef nonnull %96)
  %98 = load i16, ptr %50, align 8, !tbaa !20
  %99 = and i16 %98, 64
  %.not57 = icmp eq i16 %99, 0
  %100 = select i1 %.not57, ptr @.str.21, ptr @.str.10
  %101 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, ptr noundef nonnull %100)
  %102 = load i16, ptr %50, align 8, !tbaa !20
  %103 = and i16 %102, 512
  %.not58 = icmp eq i16 %103, 0
  %104 = select i1 %.not58, ptr @.str.10, ptr @.str.21
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24, ptr noundef nonnull %104)
  %106 = getelementptr inbounds i8, ptr %1, i64 40
  %107 = load i64, ptr %106, align 8, !tbaa !22
  %108 = sitofp i64 %107 to double
  %109 = fmul double %108, 0x3F50000000000000
  %110 = fmul double %108, 0x3EB0000000000000
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25, double noundef %109, double noundef %110)
  %112 = load i32, ptr %58, align 4, !tbaa !21
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, i32 noundef %112)
  %114 = getelementptr inbounds i8, ptr %1, i64 16
  %115 = load i32, ptr %114, align 8, !tbaa !23
  %116 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27, i32 noundef %115)
  %117 = getelementptr inbounds i8, ptr %1, i64 4
  %118 = load i32, ptr %117, align 4, !tbaa !24
  %119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28, i32 noundef %118)
  %120 = getelementptr inbounds i8, ptr %1, i64 26
  %121 = load i16, ptr %120, align 2, !tbaa !25
  %122 = zext i16 %121 to i32
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29, i32 noundef %122)
  %124 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30)
  %125 = load ptr, ptr @comp, align 8, !tbaa !12
  br label %126

126:                                              ; preds = %42, %62, %3, %12, %9, %.thread, %24, %53, %65
  %.042 = phi ptr [ %125, %65 ], [ null, %53 ], [ null, %24 ], [ null, %.thread ], [ null, %9 ], [ null, %12 ], [ null, %3 ], [ null, %62 ], [ null, %42 ]
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %4) #5
  ret ptr %.042
}

declare ptr @lookup_compressor_id(i32 noundef) local_unnamed_addr #2

declare void @display_compressors(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @compressor_extract_options(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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 memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 #4 = { inlinehint 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 }
attributes #6 = { 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, !7, i64 0}
!6 = !{!"squashfs_super_block", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 20, !10, i64 22, !10, i64 24, !10, i64 26, !10, i64 28, !10, i64 30, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"long long", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!6, !10, i64 28}
!15 = !{!6, !10, i64 30}
!16 = !{!6, !10, i64 20}
!17 = !{!18, !7, i64 80}
!18 = !{!"compressor", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !7, i64 64, !13, i64 72, !7, i64 80}
!19 = !{!18, !13, i64 72}
!20 = !{!6, !10, i64 24}
!21 = !{!6, !7, i64 12}
!22 = !{!6, !11, i64 40}
!23 = !{!6, !7, i64 16}
!24 = !{!6, !7, i64 4}
!25 = !{!6, !10, i64 26}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass