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

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

@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [130 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @write_sector(ptr noundef, i32 noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @tf_initializeMedia(i32 noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca [512 x i8], align 16
  %4 = alloca [512 x i8], align 16
  %5 = alloca %struct.struct_BPB_struct, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 512, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 512, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 90, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %10 = getelementptr inbounds [512 x i8], ptr %3, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 512, i1 false)
  call void @llvm.memset.p0.i64(ptr align 1 %5, i8 0, i64 90, i1 false)
  %11 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 0
  %12 = getelementptr inbounds [3 x i8], ptr %11, i64 0, i64 0
  store i8 -21, ptr %12, align 1, !tbaa !9
  %13 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 0
  %14 = getelementptr inbounds [3 x i8], ptr %13, i64 0, i64 1
  store i8 88, ptr %14, align 1, !tbaa !9
  %15 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 0
  %16 = getelementptr inbounds [3 x i8], ptr %15, i64 0, i64 2
  store i8 -112, ptr %16, align 1, !tbaa !9
  %17 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 1
  %18 = getelementptr inbounds [8 x i8], ptr %17, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %18, ptr align 1 @.str.10, i64 8, i1 false)
  %19 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 2
  store i16 512, ptr %19, align 1, !tbaa !10
  %20 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 3
  store i8 32, ptr %20, align 1, !tbaa !13
  %21 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 4
  store i16 32, ptr %21, align 1, !tbaa !14
  %22 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 5
  store i8 2, ptr %22, align 1, !tbaa !15
  %23 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 8
  store i8 -8, ptr %23, align 1, !tbaa !16
  %24 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 10
  store i16 32, ptr %24, align 1, !tbaa !17
  %25 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 11
  store i16 64, ptr %25, align 1, !tbaa !18
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 13
  store i32 %26, ptr %27, align 1, !tbaa !19
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = udiv i32 %28, 4095
  %30 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %31 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %30, i32 0, i32 0
  store i32 %29, ptr %31, align 1, !tbaa !9
  %32 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %33 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %32, i32 0, i32 3
  store i32 2, ptr %33, align 1, !tbaa !9
  %34 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %35 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %34, i32 0, i32 4
  store i16 1, ptr %35, align 1, !tbaa !9
  %36 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %37 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %36, i32 0, i32 5
  store i16 6, ptr %37, align 1, !tbaa !9
  %38 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %39 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %38, i32 0, i32 9
  store i8 41, ptr %39, align 1, !tbaa !9
  %40 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %41 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %40, i32 0, i32 10
  store i32 -212279871, ptr %41, align 1, !tbaa !9
  %42 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %43 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %42, i32 0, i32 11
  %44 = getelementptr inbounds [11 x i8], ptr %43, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %44, i8 32, i64 11, i1 false)
  %45 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %46 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %45, i32 0, i32 12
  %47 = getelementptr inbounds [8 x i8], ptr %46, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %47, ptr align 1 @.str.11, i64 8, i1 false)
  %48 = getelementptr inbounds [512 x i8], ptr %3, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %48, ptr align 1 %5, i64 90, i1 false)
  %49 = getelementptr inbounds [512 x i8], ptr %3, i64 0, i64 0
  %50 = getelementptr inbounds i8, ptr %49, i64 90
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %50, ptr align 1 @.str.12, i64 129, i1 false)
  %51 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 4
  %52 = load i16, ptr %51, align 1, !tbaa !14
  %53 = zext i16 %52 to i32
  store i32 %53, ptr %9, align 4, !tbaa !5
  %54 = getelementptr inbounds [512 x i8], ptr %3, i64 0, i64 510
  store i8 85, ptr %54, align 2, !tbaa !9
  %55 = getelementptr inbounds [512 x i8], ptr %3, i64 0, i64 511
  store i8 -86, ptr %55, align 1, !tbaa !9
  %56 = getelementptr inbounds [512 x i8], ptr %3, i64 0, i64 0
  %57 = call i32 @write_sector(ptr noundef %56, i32 noundef 0)
  %58 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 5
  %59 = load i8, ptr %58, align 1, !tbaa !15
  %60 = zext i8 %59 to i32
  %61 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 14
  %62 = getelementptr inbounds %struct.struct_BPBFAT32_struct, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 1, !tbaa !9
  %64 = mul i32 %60, %63
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = add i32 %64, %65
  store i32 %66, ptr %8, align 4, !tbaa !5
  %67 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %67, i8 0, i64 512, i1 false)
  %68 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  store i32 1096897106, ptr %68, align 16, !tbaa !5
  %69 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %70 = getelementptr inbounds i8, ptr %69, i64 484
  store i32 1631679090, ptr %70, align 4, !tbaa !5
  %71 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %72 = getelementptr inbounds i8, ptr %71, i64 488
  store i32 -1, ptr %72, align 4, !tbaa !5
  %73 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %74 = getelementptr inbounds i8, ptr %73, i64 492
  store i32 -1, ptr %74, align 4, !tbaa !5
  %75 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %76 = getelementptr inbounds i8, ptr %75, i64 496
  store i32 0, ptr %76, align 4, !tbaa !5
  %77 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %78 = getelementptr inbounds i8, ptr %77, i64 500
  store i32 0, ptr %78, align 4, !tbaa !5
  %79 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %80 = getelementptr inbounds i8, ptr %79, i64 504
  store i32 0, ptr %80, align 4, !tbaa !5
  %81 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %82 = getelementptr inbounds i8, ptr %81, i64 508
  store i32 -1437270016, ptr %82, align 4, !tbaa !5
  %83 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %84 = call i32 @write_sector(ptr noundef %83, i32 noundef 1)
  %85 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 4
  %86 = load i16, ptr %85, align 1, !tbaa !14
  %87 = zext i16 %86 to i32
  store i32 %87, ptr %9, align 4, !tbaa !5
  %88 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %88, i8 0, i64 512, i1 false)
  store i32 2, ptr %6, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %100, %1
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 3
  %92 = load i8, ptr %91, align 1, !tbaa !13
  %93 = zext i8 %92 to i32
  %94 = icmp ult i32 %90, %93
  br i1 %94, label %95, label %103

95:                                               ; preds = %89
  %96 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %96, i8 0, i64 512, i1 false)
  %97 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = call i32 @write_sector(ptr noundef %97, i32 noundef %98)
  br label %100

100:                                              ; preds = %95
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = add i32 %101, 1
  store i32 %102, ptr %6, align 4, !tbaa !5
  br label %89, !llvm.loop !20

103:                                              ; preds = %89
  %104 = getelementptr inbounds [512 x i8], ptr %3, i64 0, i64 0
  %105 = call i32 @write_sector(ptr noundef %104, i32 noundef 6)
  %106 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %106, i8 0, i64 512, i1 false)
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 3
  %109 = load i8, ptr %108, align 1, !tbaa !13
  %110 = zext i8 %109 to i32
  %111 = add i32 %107, %110
  store i32 %111, ptr %6, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %120, %103
  %113 = load i32, ptr %6, align 4, !tbaa !5
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = icmp uge i32 %113, %114
  br i1 %115, label %116, label %123

116:                                              ; preds = %112
  %117 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = call i32 @write_sector(ptr noundef %117, i32 noundef %118)
  br label %120

120:                                              ; preds = %116
  %121 = load i32, ptr %6, align 4, !tbaa !5
  %122 = add i32 %121, -1
  store i32 %122, ptr %6, align 4, !tbaa !5
  br label %112, !llvm.loop !22

123:                                              ; preds = %112
  %124 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %124, i8 0, i64 512, i1 false)
  %125 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %125, ptr %6, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %141, %123
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = load i32, ptr %8, align 4, !tbaa !5
  %129 = udiv i32 %128, 2
  %130 = icmp ult i32 %127, %129
  br i1 %130, label %131, label %144

131:                                              ; preds = %126
  %132 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = call i32 @write_sector(ptr noundef %132, i32 noundef %133)
  %135 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %136 = load i32, ptr %6, align 4, !tbaa !5
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = udiv i32 %137, 2
  %139 = add i32 %136, %138
  %140 = call i32 @write_sector(ptr noundef %135, i32 noundef %139)
  br label %141

141:                                              ; preds = %131
  %142 = load i32, ptr %6, align 4, !tbaa !5
  %143 = add i32 %142, 1
  store i32 %143, ptr %6, align 4, !tbaa !5
  br label %126, !llvm.loop !23

144:                                              ; preds = %126
  %145 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %146 = getelementptr inbounds i8, ptr %145, i64 0
  store i32 268435448, ptr %146, align 4, !tbaa !5
  %147 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %148 = getelementptr inbounds i8, ptr %147, i64 4
  store i32 268435455, ptr %148, align 4, !tbaa !5
  %149 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %150 = getelementptr inbounds i8, ptr %149, i64 8
  store i32 268435448, ptr %150, align 4, !tbaa !5
  %151 = getelementptr inbounds [512 x i8], ptr %4, i64 0, i64 0
  %152 = getelementptr inbounds %struct.struct_BPB_struct, ptr %5, i32 0, i32 3
  %153 = load i8, ptr %152, align 1, !tbaa !13
  %154 = zext i8 %153 to i32
  %155 = call i32 @write_sector(ptr noundef %151, i32 noundef %154)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 90, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 512, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #4
  ret i32 0
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = !{!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, !6, i64 28, !6, i64 32, !7, i64 36}
!12 = !{!"short", !7, i64 0}
!13 = !{!11, !7, i64 13}
!14 = !{!11, !12, i64 14}
!15 = !{!11, !7, i64 16}
!16 = !{!11, !7, i64 21}
!17 = !{!11, !12, i64 24}
!18 = !{!11, !12, i64 26}
!19 = !{!11, !6, i64 32}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !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"

@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [130 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @write_sector(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @tf_initializeMedia(i32 noundef %0) local_unnamed_addr #1 {
  %2 = alloca [512 x i8], align 16
  %3 = alloca [512 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #4
  %4 = getelementptr inbounds i8, ptr %2, i64 208
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %4, i8 0, i64 304, i1 false)
  %.sroa.7.3.copyload = load i64, ptr @.str.10, align 1
  %5 = udiv i32 %0, 4095
  %.sroa.30.82.copyload = load i64, ptr @.str.11, align 1
  store i8 -21, ptr %2, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 1
  store i8 88, ptr %.sroa.5.0..sroa_idx, align 1
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 2
  store i8 -112, ptr %.sroa.6.0..sroa_idx, align 2
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 3
  store i64 %.sroa.7.3.copyload, ptr %.sroa.7.0..sroa_idx, align 1
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 11
  store i16 512, ptr %.sroa.8.0..sroa_idx, align 1
  %.sroa.9.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 13
  store i8 32, ptr %.sroa.9.0..sroa_idx, align 1
  %.sroa.13.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 14
  store i16 32, ptr %.sroa.13.0..sroa_idx, align 2
  %.sroa.16.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 16
  store i8 2, ptr %.sroa.16.0..sroa_idx, align 16
  %.sroa.18.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 17
  store i32 0, ptr %.sroa.18.0..sroa_idx, align 1
  %.sroa.1819.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 21
  store i8 -8, ptr %.sroa.1819.0..sroa_idx, align 1
  %.sroa.19.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 22
  store i16 0, ptr %.sroa.19.0..sroa_idx, align 2
  %.sroa.1920.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 24
  store i16 32, ptr %.sroa.1920.0..sroa_idx, align 8
  %.sroa.20.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 26
  store i16 64, ptr %.sroa.20.0..sroa_idx, align 2
  %.sroa.21.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 28
  store i32 0, ptr %.sroa.21.0..sroa_idx, align 4
  %.sroa.2121.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 32
  store i32 %0, ptr %.sroa.2121.0..sroa_idx, align 16
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 36
  store i32 %5, ptr %.sroa.22.0..sroa_idx, align 4
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 40
  store i32 0, ptr %.sroa.24.0..sroa_idx, align 8
  %.sroa.2422.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 44
  store i32 2, ptr %.sroa.2422.0..sroa_idx, align 4
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 48
  store i16 1, ptr %.sroa.25.0..sroa_idx, align 16
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 50
  store i16 6, ptr %.sroa.26.0..sroa_idx, align 2
  %.sroa.27.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 52
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(14) %.sroa.27.0..sroa_idx, i8 0, i64 14, i1 false)
  %.sroa.2723.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 66
  store i8 41, ptr %.sroa.2723.0..sroa_idx, align 2
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 67
  store i32 -212279871, ptr %.sroa.28.0..sroa_idx, align 1
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 71
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(11) %.sroa.29.0..sroa_idx, i8 32, i64 11, i1 false)
  %.sroa.30.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 82
  store i64 %.sroa.30.82.copyload, ptr %.sroa.30.0..sroa_idx, align 2
  %6 = getelementptr inbounds i8, ptr %2, i64 90
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(129) %6, ptr noundef nonnull align 1 dereferenceable(129) @.str.12, i64 129, i1 false)
  %7 = getelementptr inbounds i8, ptr %2, i64 510
  store i8 85, ptr %7, align 2, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %2, i64 511
  store i8 -86, ptr %8, align 1, !tbaa !5
  %9 = call i32 @write_sector(ptr noundef nonnull %2, i32 noundef 0)
  %10 = shl nuw nsw i32 %5, 1
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 496, i1 false)
  store i32 1096897106, ptr %3, align 16, !tbaa !8
  %11 = getelementptr inbounds i8, ptr %3, i64 484
  store <4 x i32> <i32 1631679090, i32 -1, i32 -1, i32 0>, ptr %11, align 4, !tbaa !8
  %12 = getelementptr inbounds i8, ptr %3, i64 500
  store i32 0, ptr %12, align 4, !tbaa !8
  %13 = getelementptr inbounds i8, ptr %3, i64 504
  store i32 0, ptr %13, align 8, !tbaa !8
  %14 = getelementptr inbounds i8, ptr %3, i64 508
  store i32 -1437270016, ptr %14, align 4, !tbaa !8
  %15 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 1)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %16 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 2)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %17 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 3)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %18 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 4)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %19 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %20 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %21 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %22 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 8)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %23 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %24 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 10)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %25 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 11)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %26 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 12)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %27 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 13)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %28 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 14)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %29 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 15)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %30 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 16)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %31 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 17)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %32 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 18)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %33 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 19)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %34 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 20)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %35 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 21)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %36 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 22)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %37 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 23)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %38 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 24)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %39 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 25)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %40 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 26)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %41 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 27)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %42 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 28)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %43 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 29)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %44 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 30)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %45 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 31)
  %46 = add nuw nsw i32 %10, 32
  %47 = call i32 @write_sector(ptr noundef nonnull %2, i32 noundef 6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %48 = add nuw nsw i32 %10, 64
  %49 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %48)
  %50 = add nuw nsw i32 %10, 63
  %51 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %50)
  %52 = add nuw nsw i32 %10, 62
  %53 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %52)
  %54 = add nuw nsw i32 %10, 61
  %55 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %54)
  %56 = add nuw nsw i32 %10, 60
  %57 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %56)
  %58 = add nuw nsw i32 %10, 59
  %59 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %58)
  %60 = add nuw nsw i32 %10, 58
  %61 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %60)
  %62 = add nuw nsw i32 %10, 57
  %63 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %62)
  %64 = add nuw nsw i32 %10, 56
  %65 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %64)
  %66 = add nuw nsw i32 %10, 55
  %67 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %66)
  %68 = add nuw nsw i32 %10, 54
  %69 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %68)
  %70 = add nuw nsw i32 %10, 53
  %71 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %70)
  %72 = add nuw nsw i32 %10, 52
  %73 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %72)
  %74 = add nuw nsw i32 %10, 51
  %75 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %74)
  %76 = add nuw nsw i32 %10, 50
  %77 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %76)
  %78 = add nuw nsw i32 %10, 49
  %79 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %78)
  %80 = add nuw nsw i32 %10, 48
  %81 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %80)
  %82 = add nuw nsw i32 %10, 47
  %83 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %82)
  %84 = add nuw nsw i32 %10, 46
  %85 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %84)
  %86 = add nuw nsw i32 %10, 45
  %87 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %86)
  %88 = add nuw nsw i32 %10, 44
  %89 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %88)
  %90 = add nuw nsw i32 %10, 43
  %91 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %90)
  %92 = add nuw nsw i32 %10, 42
  %93 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %92)
  %94 = add nuw nsw i32 %10, 41
  %95 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %94)
  %96 = add nuw nsw i32 %10, 40
  %97 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %96)
  %98 = add nuw nsw i32 %10, 39
  %99 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %98)
  %100 = add nuw nsw i32 %10, 38
  %101 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %100)
  %102 = add nuw nsw i32 %10, 37
  %103 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %102)
  %104 = add nuw nsw i32 %10, 36
  %105 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %104)
  %106 = add nuw nsw i32 %10, 35
  %107 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %106)
  %108 = add nuw nsw i32 %10, 34
  %109 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %108)
  %110 = add nuw nsw i32 %10, 33
  %111 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %110)
  %112 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %46)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %113 = lshr exact i32 %46, 1
  %114 = icmp ugt i32 %0, 69614
  br i1 %114, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1, %.lr.ph
  %.237 = phi i32 [ %118, %.lr.ph ], [ 32, %1 ]
  %115 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %.237)
  %116 = add nuw nsw i32 %.237, %113
  %117 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef %116)
  %118 = add nuw nsw i32 %.237, 1
  %exitcond.not = icmp eq i32 %118, %113
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !10

._crit_edge:                                      ; preds = %.lr.ph, %1
  store i32 268435448, ptr %3, align 16, !tbaa !8
  %119 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 268435455, ptr %119, align 4, !tbaa !8
  %120 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 268435448, ptr %120, align 8, !tbaa !8
  %121 = call i32 @write_sector(ptr noundef nonnull %3, i32 noundef 32)
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #4
  ret i32 0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass