; LLVM IR from ryansturmer/thinfat32 :: src (fat32_ui)

; 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.struct_BPB_struct = type <{ [3 x i8], [8 x i8], i16, i8, i16, i8, i16, i16, i8, i16, i16, i16, i32, i32, %union.anon }>
%union.anon = type { %struct.struct_BPBFAT32_struct }
%struct.struct_BPBFAT32_struct = type <{ i32, i16, i16, i32, i16, i16, [12 x i8], i8, i8, i8, i32, [11 x i8], [8 x i8] }>
%struct.struct_BPBFAT1216_struct = type <{ i8, i8, i8, i32, [11 x i8], [8 x i8] }>

@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [25 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @printBPB(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %5 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.struct_BPB_struct, ptr %6, i32 0, i32 0
  %8 = getelementptr inbounds [3 x i8], ptr %7, i64 0, i64 0
  %9 = load i8, ptr %8, align 1, !tbaa !9
  %10 = zext i8 %9 to i32
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.struct_BPB_struct, ptr %11, i32 0, i32 0
  %13 = getelementptr inbounds [3 x i8], ptr %12, i64 0, i64 1
  %14 = load i8, ptr %13, align 1, !tbaa !9
  %15 = zext i8 %14 to i32
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.struct_BPB_struct, ptr %16, i32 0, i32 0
  %18 = getelementptr inbounds [3 x i8], ptr %17, i64 0, i64 2
  %19 = load i8, ptr %18, align 1, !tbaa !9
  %20 = zext i8 %19 to i32
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %10, i32 noundef %15, i32 noundef %20)
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.struct_BPB_struct, ptr %22, i32 0, i32 1
  %24 = getelementptr inbounds [8 x i8], ptr %23, i64 0, i64 0
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %24)
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.struct_BPB_struct, ptr %26, i32 0, i32 2
  %28 = load i16, ptr %27, align 1, !tbaa !10
  %29 = zext i16 %28 to i32
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %29)
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.struct_BPB_struct, ptr %31, i32 0, i32 3
  %33 = load i8, ptr %32, align 1, !tbaa !14
  %34 = zext i8 %33 to i32
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %34)
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.struct_BPB_struct, ptr %36, i32 0, i32 4
  %38 = load i16, ptr %37, align 1, !tbaa !15
  %39 = zext i16 %38 to i32
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %39)
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.struct_BPB_struct, ptr %41, i32 0, i32 5
  %43 = load i8, ptr %42, align 1, !tbaa !16
  %44 = zext i8 %43 to i32
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %44)
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.struct_BPB_struct, ptr %46, i32 0, i32 6
  %48 = load i16, ptr %47, align 1, !tbaa !17
  %49 = zext i16 %48 to i32
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %49)
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.struct_BPB_struct, ptr %52, i32 0, i32 8
  %54 = load i8, ptr %53, align 1, !tbaa !18
  call void @print_media(i8 noundef zeroext %54)
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.struct_BPB_struct, ptr %56, i32 0, i32 9
  %58 = load i16, ptr %57, align 1, !tbaa !19
  %59 = zext i16 %58 to i32
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %59)
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.struct_BPB_struct, ptr %61, i32 0, i32 10
  %63 = load i16, ptr %62, align 1, !tbaa !20
  %64 = zext i16 %63 to i32
  %65 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %64)
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.struct_BPB_struct, ptr %66, i32 0, i32 11
  %68 = load i16, ptr %67, align 1, !tbaa !21
  %69 = zext i16 %68 to i32
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %69)
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.struct_BPB_struct, ptr %71, i32 0, i32 12
  %73 = load i32, ptr %72, align 1, !tbaa !22
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %73)
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.struct_BPB_struct, ptr %75, i32 0, i32 7
  %77 = load i16, ptr %76, align 1, !tbaa !23
  %78 = zext i16 %77 to i32
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %78)
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.struct_BPB_struct, ptr %80, i32 0, i32 13
  %82 = load i32, ptr %81, align 1, !tbaa !24
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %82)
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = call i32 @fat_type(ptr noundef %84)
  switch i32 %85, label %92 [
    i32 0, label %86
    i32 1, label %88
    i32 2, label %90
  ]

86:                                               ; preds = %1
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  br label %94

88:                                               ; preds = %1
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  br label %94

90:                                               ; preds = %1
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  br label %94

92:                                               ; preds = %1
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  br label %94

94:                                               ; preds = %92, %90, %88, %86
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = call i32 @fat_type(ptr noundef %95)
  %97 = icmp eq i32 %96, 0
  %98 = zext i1 %97 to i32
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = call i32 @fat_type(ptr noundef %99)
  %101 = icmp eq i32 %100, 1
  %102 = zext i1 %101 to i32
  %103 = or i32 %98, %102
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %133

105:                                              ; preds = %94
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.struct_BPB_struct, ptr %106, i32 0, i32 14
  %108 = getelementptr inbounds %struct.struct_BPBFAT1216_struct, ptr %107, i32 0, i32 0
  %109 = load i8, ptr %108, align 1, !tbaa !9
  %110 = zext i8 %109 to i32
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, i32 noundef %110)
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.struct_BPB_struct, ptr %112, i32 0, i32 14
  %114 = getelementptr inbounds %struct.struct_BPBFAT1216_struct, ptr %113, i32 0, i32 2
  %115 = load i8, ptr %114, align 1, !tbaa !9
  %116 = zext i8 %115 to i32
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, i32 noundef %116)
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.struct_BPB_struct, ptr %118, i32 0, i32 14
  %120 = getelementptr inbounds %struct.struct_BPBFAT1216_struct, ptr %119, i32 0, i32 3
  %121 = load i32, ptr %120, align 1, !tbaa !9
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, i32 noundef %121)
  %123 = load ptr, ptr %2, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.struct_BPB_struct, ptr %123, i32 0, i32 14
  %125 = getelementptr inbounds %struct.struct_BPBFAT1216_struct, ptr %124, i32 0, i32 4
  %126 = getelementptr inbounds [11 x i8], ptr %125, i64 0, i64 0
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i32 noundef 11, ptr noundef %126)
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.struct_BPB_struct, ptr %128, i32 0, i32 14
  %130 = getelementptr inbounds %struct.struct_BPBFAT1216_struct, ptr %129, i32 0, i32 5
  %131 = getelementptr inbounds [8 x i8], ptr %130, i64 0, i64 0
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, i32 noundef 8, ptr noundef %131)
  br label %221

133:                                              ; preds = %94
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.struct_BPB_struct, ptr %134, i32 0, i32 14
  %136 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %135, i32 0, i32 0
  %137 = load i32, ptr %136, align 1, !tbaa !9
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str.25, i32 noundef %137)
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.struct_BPB_struct, ptr %139, i32 0, i32 14
  %141 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %140, i32 0, i32 1
  %142 = load i16, ptr %141, align 1, !tbaa !9
  %143 = zext i16 %142 to i32
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i32 noundef %143)
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.struct_BPB_struct, ptr %145, i32 0, i32 14
  %147 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %146, i32 0, i32 2
  %148 = load i16, ptr %147, align 1, !tbaa !9
  %149 = zext i16 %148 to i32
  %150 = call i32 (ptr, ...) @printf(ptr noundef @.str.27, i32 noundef %149)
  %151 = load ptr, ptr %2, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.struct_BPB_struct, ptr %151, i32 0, i32 14
  %153 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %152, i32 0, i32 3
  %154 = load i32, ptr %153, align 1, !tbaa !9
  %155 = call i32 (ptr, ...) @printf(ptr noundef @.str.28, i32 noundef %154)
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.struct_BPB_struct, ptr %156, i32 0, i32 14
  %158 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %157, i32 0, i32 4
  %159 = load i16, ptr %158, align 1, !tbaa !9
  %160 = zext i16 %159 to i32
  %161 = call i32 (ptr, ...) @printf(ptr noundef @.str.29, i32 noundef %160)
  %162 = load ptr, ptr %2, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.struct_BPB_struct, ptr %162, i32 0, i32 14
  %164 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %163, i32 0, i32 5
  %165 = load i16, ptr %164, align 1, !tbaa !9
  %166 = zext i16 %165 to i32
  %167 = call i32 (ptr, ...) @printf(ptr noundef @.str.30, i32 noundef %166)
  store i32 0, ptr %4, align 4, !tbaa !25
  store i32 0, ptr %3, align 4, !tbaa !25
  br label %168

168:                                              ; preds = %183, %133
  %169 = load i32, ptr %3, align 4, !tbaa !25
  %170 = icmp slt i32 %169, 12
  br i1 %170, label %171, label %186

171:                                              ; preds = %168
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.struct_BPB_struct, ptr %172, i32 0, i32 14
  %174 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %173, i32 0, i32 6
  %175 = load i32, ptr %3, align 4, !tbaa !25
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [12 x i8], ptr %174, i64 0, i64 %176
  %178 = load i8, ptr %177, align 1, !tbaa !9
  %179 = zext i8 %178 to i32
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %182

181:                                              ; preds = %171
  store i32 1, ptr %4, align 4, !tbaa !25
  br label %182

182:                                              ; preds = %181, %171
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %3, align 4, !tbaa !25
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %3, align 4, !tbaa !25
  br label %168, !llvm.loop !26

186:                                              ; preds = %168
  %187 = load i32, ptr %4, align 4, !tbaa !25
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %191

189:                                              ; preds = %186
  %190 = call i32 (ptr, ...) @printf(ptr noundef @.str.31)
  br label %193

191:                                              ; preds = %186
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.32)
  br label %193

193:                                              ; preds = %191, %189
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.struct_BPB_struct, ptr %194, i32 0, i32 14
  %196 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %195, i32 0, i32 7
  %197 = load i8, ptr %196, align 1, !tbaa !9
  %198 = zext i8 %197 to i32
  %199 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, i32 noundef %198)
  %200 = load ptr, ptr %2, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.struct_BPB_struct, ptr %200, i32 0, i32 14
  %202 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %201, i32 0, i32 9
  %203 = load i8, ptr %202, align 1, !tbaa !9
  %204 = zext i8 %203 to i32
  %205 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, i32 noundef %204)
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.struct_BPB_struct, ptr %206, i32 0, i32 14
  %208 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %207, i32 0, i32 10
  %209 = load i32, ptr %208, align 1, !tbaa !9
  %210 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, i32 noundef %209)
  %211 = load ptr, ptr %2, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.struct_BPB_struct, ptr %211, i32 0, i32 14
  %213 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %212, i32 0, i32 11
  %214 = getelementptr inbounds [11 x i8], ptr %213, i64 0, i64 0
  %215 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i32 noundef 11, ptr noundef %214)
  %216 = load ptr, ptr %2, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.struct_BPB_struct, ptr %216, i32 0, i32 14
  %218 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %217, i32 0, i32 12
  %219 = getelementptr inbounds [8 x i8], ptr %218, i64 0, i64 0
  %220 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, i32 noundef 8, ptr noundef %219)
  br label %221

221:                                              ; preds = %193, %105
  %222 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @print_media(i8 noundef zeroext) #0

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

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 }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 11}
!11 = !{!"struct_BPB_struct", !7, i64 0, !7, i64 3, !12, i64 11, !7, i64 13, !12, i64 14, !7, i64 16, !12, i64 17, !12, i64 19, !7, i64 21, !12, i64 22, !12, i64 24, !12, i64 26, !13, i64 28, !13, i64 32, !7, i64 36}
!12 = !{!"short", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!11, !7, i64 13}
!15 = !{!11, !12, i64 14}
!16 = !{!11, !7, i64 16}
!17 = !{!11, !12, i64 17}
!18 = !{!11, !7, i64 21}
!19 = !{!11, !12, i64 22}
!20 = !{!11, !12, i64 24}
!21 = !{!11, !12, i64 26}
!22 = !{!11, !13, i64 28}
!23 = !{!11, !12, i64 19}
!24 = !{!11, !13, i64 32}
!25 = !{!13, !13, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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

@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [25 x i8], align 1
@switch.table.printBPB = private unnamed_addr constant [3 x ptr] [ptr @.str.16, ptr @.str.17, ptr @.str.18], align 8

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

; Function Attrs: nounwind uwtable
define dso_local void @printBPB(ptr noundef %0) local_unnamed_addr #0 {
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %3 = load i8, ptr %0, align 1, !tbaa !5
  %4 = zext i8 %3 to i32
  %5 = getelementptr inbounds i8, ptr %0, i64 1
  %6 = load i8, ptr %5, align 1, !tbaa !5
  %7 = zext i8 %6 to i32
  %8 = getelementptr inbounds i8, ptr %0, i64 2
  %9 = load i8, ptr %8, align 1, !tbaa !5
  %10 = zext i8 %9 to i32
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4, i32 noundef %7, i32 noundef %10)
  %12 = getelementptr inbounds i8, ptr %0, i64 3
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %12)
  %14 = getelementptr inbounds i8, ptr %0, i64 11
  %15 = load i16, ptr %14, align 1, !tbaa !8
  %16 = zext i16 %15 to i32
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %16)
  %18 = getelementptr inbounds i8, ptr %0, i64 13
  %19 = load i8, ptr %18, align 1, !tbaa !12
  %20 = zext i8 %19 to i32
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %20)
  %22 = getelementptr inbounds i8, ptr %0, i64 14
  %23 = load i16, ptr %22, align 1, !tbaa !13
  %24 = zext i16 %23 to i32
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %24)
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  %27 = load i8, ptr %26, align 1, !tbaa !14
  %28 = zext i8 %27 to i32
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %28)
  %30 = getelementptr inbounds i8, ptr %0, i64 17
  %31 = load i16, ptr %30, align 1, !tbaa !15
  %32 = zext i16 %31 to i32
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %32)
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %35 = getelementptr inbounds i8, ptr %0, i64 21
  %36 = load i8, ptr %35, align 1, !tbaa !16
  tail call void @print_media(i8 noundef zeroext %36)
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %38 = getelementptr inbounds i8, ptr %0, i64 22
  %39 = load i16, ptr %38, align 1, !tbaa !17
  %40 = zext i16 %39 to i32
  %41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %40)
  %42 = getelementptr inbounds i8, ptr %0, i64 24
  %43 = load i16, ptr %42, align 1, !tbaa !18
  %44 = zext i16 %43 to i32
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %44)
  %46 = getelementptr inbounds i8, ptr %0, i64 26
  %47 = load i16, ptr %46, align 1, !tbaa !19
  %48 = zext i16 %47 to i32
  %49 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %48)
  %50 = getelementptr inbounds i8, ptr %0, i64 28
  %51 = load i32, ptr %50, align 1, !tbaa !20
  %52 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %51)
  %53 = getelementptr inbounds i8, ptr %0, i64 19
  %54 = load i16, ptr %53, align 1, !tbaa !21
  %55 = zext i16 %54 to i32
  %56 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %55)
  %57 = getelementptr inbounds i8, ptr %0, i64 32
  %58 = load i32, ptr %57, align 1, !tbaa !22
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %58)
  %60 = tail call i32 @fat_type(ptr noundef nonnull %0)
  %61 = icmp ult i32 %60, 3
  br i1 %61, label %switch.lookup, label %63

switch.lookup:                                    ; preds = %1
  %62 = zext nneg i32 %60 to i64
  %switch.gep = getelementptr inbounds [3 x ptr], ptr @switch.table.printBPB, i64 0, i64 %62
  %switch.load = load ptr, ptr %switch.gep, align 8
  br label %63

63:                                               ; preds = %1, %switch.lookup
  %.str.19.sink = phi ptr [ %switch.load, %switch.lookup ], [ @.str.19, %1 ]
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.19.sink)
  %65 = tail call i32 @fat_type(ptr noundef nonnull %0)
  %66 = icmp eq i32 %65, 0
  %67 = tail call i32 @fat_type(ptr noundef nonnull %0)
  %68 = icmp eq i32 %67, 1
  %69 = or i1 %66, %68
  br i1 %69, label %100, label %70

70:                                               ; preds = %63
  %71 = getelementptr inbounds i8, ptr %0, i64 36
  %72 = load i32, ptr %71, align 1, !tbaa !5
  %73 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25, i32 noundef %72)
  %74 = getelementptr inbounds i8, ptr %0, i64 40
  %75 = load i16, ptr %74, align 1, !tbaa !5
  %76 = zext i16 %75 to i32
  %77 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, i32 noundef %76)
  %78 = getelementptr inbounds i8, ptr %0, i64 42
  %79 = load i16, ptr %78, align 1, !tbaa !5
  %80 = zext i16 %79 to i32
  %81 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27, i32 noundef %80)
  %82 = getelementptr inbounds i8, ptr %0, i64 44
  %83 = load i32, ptr %82, align 1, !tbaa !5
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28, i32 noundef %83)
  %85 = getelementptr inbounds i8, ptr %0, i64 48
  %86 = load i16, ptr %85, align 1, !tbaa !5
  %87 = zext i16 %86 to i32
  %88 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29, i32 noundef %87)
  %89 = getelementptr inbounds i8, ptr %0, i64 50
  %90 = load i16, ptr %89, align 1, !tbaa !5
  %91 = zext i16 %90 to i32
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30, i32 noundef %91)
  %93 = getelementptr inbounds i8, ptr %0, i64 52
  %94 = load <4 x i8>, ptr %93, align 1, !tbaa !5
  %.fr68 = freeze <4 x i8> %94
  %95 = getelementptr inbounds i8, ptr %0, i64 56
  %96 = load <8 x i8>, ptr %95, align 1, !tbaa !5
  %.fr = freeze <8 x i8> %96
  %.fr.scalar = bitcast <8 x i8> %.fr to i64
  %97 = icmp eq i64 %.fr.scalar, 0
  %.fr68.scalar = bitcast <4 x i8> %.fr68 to i32
  %98 = icmp eq i32 %.fr68.scalar, 0
  %op.rdx = and i1 %97, %98
  %.str.32..str.31 = select i1 %op.rdx, ptr @.str.32, ptr @.str.31
  %99 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.32..str.31)
  br label %100

100:                                              ; preds = %63, %70
  %.sink67 = phi i64 [ 64, %70 ], [ 36, %63 ]
  %.sink63 = phi i64 [ 66, %70 ], [ 38, %63 ]
  %.sink = phi i64 [ 67, %70 ], [ 39, %63 ]
  %.sink58 = phi i64 [ 71, %70 ], [ 43, %63 ]
  %.sink57 = phi i64 [ 82, %70 ], [ 54, %63 ]
  %101 = getelementptr inbounds i8, ptr %0, i64 %.sink67
  %102 = load i8, ptr %101, align 1, !tbaa !5
  %103 = zext i8 %102 to i32
  %104 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, i32 noundef %103)
  %105 = getelementptr inbounds i8, ptr %0, i64 %.sink63
  %106 = load i8, ptr %105, align 1, !tbaa !5
  %107 = zext i8 %106 to i32
  %108 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %107)
  %109 = getelementptr inbounds i8, ptr %0, i64 %.sink
  %110 = load i32, ptr %109, align 1, !tbaa !5
  %111 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, i32 noundef %110)
  %112 = getelementptr inbounds i8, ptr %0, i64 %.sink58
  %113 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef 11, ptr noundef nonnull %112)
  %114 = getelementptr inbounds i8, ptr %0, i64 %.sink57
  %115 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24, i32 noundef 8, ptr noundef nonnull %114)
  %116 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @print_media(i8 noundef zeroext) local_unnamed_addr #0

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

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 11}
!9 = !{!"struct_BPB_struct", !6, i64 0, !6, i64 3, !10, i64 11, !6, i64 13, !10, i64 14, !6, i64 16, !10, i64 17, !10, i64 19, !6, i64 21, !10, i64 22, !10, i64 24, !10, i64 26, !11, i64 28, !11, i64 32, !6, i64 36}
!10 = !{!"short", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!9, !6, i64 13}
!13 = !{!9, !10, i64 14}
!14 = !{!9, !6, i64 16}
!15 = !{!9, !10, i64 17}
!16 = !{!9, !6, i64 21}
!17 = !{!9, !10, i64 22}
!18 = !{!9, !10, i64 24}
!19 = !{!9, !10, i64 26}
!20 = !{!9, !11, i64 28}
!21 = !{!9, !10, i64 19}
!22 = !{!9, !11, i64 32}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass