; LLVM IR from zeroth-robotics/zeroth-bot :: kos-zbot/firmware/efuse (efuse_read_serial)

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

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [50 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 @read_efuse(i32 noundef, i32 noundef, ptr noundef) #1

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

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

15:                                               ; preds = %0
  call void @perror(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %222

16:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %66, %16
  %18 = load i32, ptr %6, align 4, !tbaa !5
  %19 = icmp slt i32 %18, 8
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  store i32 2, ptr %3, align 4
  br label %69

21:                                               ; preds = %17
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = mul nsw i32 %23, 4
  %25 = add nsw i32 8, %24
  %26 = call i32 @read_efuse(i32 noundef %22, i32 noundef %25, ptr noundef %5)
  %27 = icmp slt i32 %26, 0
  br i1 %27, label %28, label %31

28:                                               ; preds = %21
  call void @perror(ptr noundef @.str.3)
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = call i32 @close(i32 noundef %29)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %69

31:                                               ; preds = %21
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = lshr i32 %32, 24
  %34 = and i32 %33, 255
  %35 = trunc i32 %34 to i8
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = mul nsw i32 %36, 4
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 %38
  store i8 %35, ptr %39, align 1, !tbaa !9
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = lshr i32 %40, 16
  %42 = and i32 %41, 255
  %43 = trunc i32 %42 to i8
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = mul nsw i32 %44, 4
  %46 = add nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 %47
  store i8 %43, ptr %48, align 1, !tbaa !9
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = lshr i32 %49, 8
  %51 = and i32 %50, 255
  %52 = trunc i32 %51 to i8
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = mul nsw i32 %53, 4
  %55 = add nsw i32 %54, 2
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 %56
  store i8 %52, ptr %57, align 1, !tbaa !9
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = and i32 %58, 255
  %60 = trunc i32 %59 to i8
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = mul nsw i32 %61, 4
  %63 = add nsw i32 %62, 3
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 %64
  store i8 %60, ptr %65, align 1, !tbaa !9
  br label %66

66:                                               ; preds = %31
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %6, align 4, !tbaa !5
  br label %17, !llvm.loop !10

69:                                               ; preds = %28, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %70 = load i32, ptr %3, align 4
  switch i32 %70, label %221 [
    i32 2, label %71
  ]

71:                                               ; preds = %69
  %72 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %73 = load i8, ptr %72, align 16, !tbaa !9
  %74 = zext i8 %73 to i32
  %75 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 1
  %76 = load i8, ptr %75, align 1, !tbaa !9
  %77 = zext i8 %76 to i32
  %78 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 2
  %79 = load i8, ptr %78, align 2, !tbaa !9
  %80 = zext i8 %79 to i32
  %81 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 3
  %82 = load i8, ptr %81, align 1, !tbaa !9
  %83 = zext i8 %82 to i32
  %84 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 4
  %85 = load i8, ptr %84, align 4, !tbaa !9
  %86 = zext i8 %85 to i32
  %87 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 5
  %88 = load i8, ptr %87, align 1, !tbaa !9
  %89 = zext i8 %88 to i32
  %90 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 6
  %91 = load i8, ptr %90, align 2, !tbaa !9
  %92 = zext i8 %91 to i32
  %93 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 7
  %94 = load i8, ptr %93, align 1, !tbaa !9
  %95 = zext i8 %94 to i32
  %96 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 8
  %97 = load i8, ptr %96, align 8, !tbaa !9
  %98 = zext i8 %97 to i32
  %99 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 9
  %100 = load i8, ptr %99, align 1, !tbaa !9
  %101 = zext i8 %100 to i32
  %102 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 10
  %103 = load i8, ptr %102, align 2, !tbaa !9
  %104 = zext i8 %103 to i32
  %105 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 11
  %106 = load i8, ptr %105, align 1, !tbaa !9
  %107 = zext i8 %106 to i32
  %108 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 12
  %109 = load i8, ptr %108, align 4, !tbaa !9
  %110 = zext i8 %109 to i32
  %111 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 13
  %112 = load i8, ptr %111, align 1, !tbaa !9
  %113 = zext i8 %112 to i32
  %114 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 14
  %115 = load i8, ptr %114, align 2, !tbaa !9
  %116 = zext i8 %115 to i32
  %117 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 15
  %118 = load i8, ptr %117, align 1, !tbaa !9
  %119 = zext i8 %118 to i32
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %74, i32 noundef %77, i32 noundef %80, i32 noundef %83, i32 noundef %86, i32 noundef %89, i32 noundef %92, i32 noundef %95, i32 noundef %98, i32 noundef %101, i32 noundef %104, i32 noundef %107, i32 noundef %110, i32 noundef %113, i32 noundef %116, i32 noundef %119)
  %121 = load i32, ptr %2, align 4, !tbaa !5
  %122 = call i32 @close(i32 noundef %121)
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 6, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 6, ptr %8) #4
  %124 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %125 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 0
  %126 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 0
  call void @generate_mac_addresses(ptr noundef %124, ptr noundef %125, ptr noundef %126)
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %128 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 0
  %129 = load i8, ptr %128, align 1, !tbaa !9
  %130 = zext i8 %129 to i32
  %131 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 1
  %132 = load i8, ptr %131, align 1, !tbaa !9
  %133 = zext i8 %132 to i32
  %134 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 2
  %135 = load i8, ptr %134, align 1, !tbaa !9
  %136 = zext i8 %135 to i32
  %137 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 3
  %138 = load i8, ptr %137, align 1, !tbaa !9
  %139 = zext i8 %138 to i32
  %140 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 4
  %141 = load i8, ptr %140, align 1, !tbaa !9
  %142 = zext i8 %141 to i32
  %143 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 5
  %144 = load i8, ptr %143, align 1, !tbaa !9
  %145 = zext i8 %144 to i32
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %130, i32 noundef %133, i32 noundef %136, i32 noundef %139, i32 noundef %142, i32 noundef %145)
  %147 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 0
  %148 = load i8, ptr %147, align 1, !tbaa !9
  %149 = zext i8 %148 to i32
  %150 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 1
  %151 = load i8, ptr %150, align 1, !tbaa !9
  %152 = zext i8 %151 to i32
  %153 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 2
  %154 = load i8, ptr %153, align 1, !tbaa !9
  %155 = zext i8 %154 to i32
  %156 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 3
  %157 = load i8, ptr %156, align 1, !tbaa !9
  %158 = zext i8 %157 to i32
  %159 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 4
  %160 = load i8, ptr %159, align 1, !tbaa !9
  %161 = zext i8 %160 to i32
  %162 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 5
  %163 = load i8, ptr %162, align 1, !tbaa !9
  %164 = zext i8 %163 to i32
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %149, i32 noundef %152, i32 noundef %155, i32 noundef %158, i32 noundef %161, i32 noundef %164)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %166 = call noalias ptr @fopen(ptr noundef @.str.9, ptr noundef @.str.10)
  store ptr %166, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %167 = call noalias ptr @fopen(ptr noundef @.str.11, ptr noundef @.str.10)
  store ptr %167, ptr %10, align 8, !tbaa !12
  %168 = load ptr, ptr %9, align 8, !tbaa !12
  %169 = icmp eq ptr %168, null
  br i1 %169, label %173, label %170

170:                                              ; preds = %71
  %171 = load ptr, ptr %10, align 8, !tbaa !12
  %172 = icmp eq ptr %171, null
  br i1 %172, label %173, label %174

173:                                              ; preds = %170, %71
  call void @perror(ptr noundef @.str.12)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %220

174:                                              ; preds = %170
  %175 = load ptr, ptr %9, align 8, !tbaa !12
  %176 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 0
  %177 = load i8, ptr %176, align 1, !tbaa !9
  %178 = zext i8 %177 to i32
  %179 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 1
  %180 = load i8, ptr %179, align 1, !tbaa !9
  %181 = zext i8 %180 to i32
  %182 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 2
  %183 = load i8, ptr %182, align 1, !tbaa !9
  %184 = zext i8 %183 to i32
  %185 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 3
  %186 = load i8, ptr %185, align 1, !tbaa !9
  %187 = zext i8 %186 to i32
  %188 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 4
  %189 = load i8, ptr %188, align 1, !tbaa !9
  %190 = zext i8 %189 to i32
  %191 = getelementptr inbounds [6 x i8], ptr %7, i64 0, i64 5
  %192 = load i8, ptr %191, align 1, !tbaa !9
  %193 = zext i8 %192 to i32
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef @.str.13, i32 noundef %178, i32 noundef %181, i32 noundef %184, i32 noundef %187, i32 noundef %190, i32 noundef %193) #4
  %195 = load ptr, ptr %10, align 8, !tbaa !12
  %196 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 0
  %197 = load i8, ptr %196, align 1, !tbaa !9
  %198 = zext i8 %197 to i32
  %199 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 1
  %200 = load i8, ptr %199, align 1, !tbaa !9
  %201 = zext i8 %200 to i32
  %202 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 2
  %203 = load i8, ptr %202, align 1, !tbaa !9
  %204 = zext i8 %203 to i32
  %205 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 3
  %206 = load i8, ptr %205, align 1, !tbaa !9
  %207 = zext i8 %206 to i32
  %208 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 4
  %209 = load i8, ptr %208, align 1, !tbaa !9
  %210 = zext i8 %209 to i32
  %211 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 5
  %212 = load i8, ptr %211, align 1, !tbaa !9
  %213 = zext i8 %212 to i32
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef @.str.13, i32 noundef %198, i32 noundef %201, i32 noundef %204, i32 noundef %207, i32 noundef %210, i32 noundef %213) #4
  %215 = load ptr, ptr %9, align 8, !tbaa !12
  %216 = call i32 @fclose(ptr noundef %215)
  %217 = load ptr, ptr %10, align 8, !tbaa !12
  %218 = call i32 @fclose(ptr noundef %217)
  %219 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %220

220:                                              ; preds = %174, %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 6, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 6, ptr %7) #4
  br label %221

221:                                              ; preds = %220, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #4
  br label %222

222:                                              ; preds = %221, %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %223 = load i32, ptr %1, align 4
  ret i32 %223
}

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

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

declare void @perror(ptr noundef) #2

declare i32 @close(i32 noundef) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

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

declare i32 @fclose(ptr noundef) #2

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 = { "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 = { 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 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}


; 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 [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [50 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 @read_efuse(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main() local_unnamed_addr #1 {
  %1 = alloca [32 x i8], align 16
  %2 = alloca i32, align 4
  %3 = alloca [6 x i8], align 1
  %4 = alloca [6 x i8], align 1
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %6 = tail call i32 (ptr, i32, ...) @open(ptr noundef nonnull @.str.1, i32 noundef 0) #5
  %7 = icmp slt i32 %6, 0
  br i1 %7, label %8, label %9

8:                                                ; preds = %0
  tail call void @perror(ptr noundef nonnull @.str.2) #6
  br label %220

9:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %10 = call i32 @read_efuse(i32 noundef %6, i32 noundef 8, ptr noundef nonnull %2)
  %11 = icmp slt i32 %10, 0
  br i1 %11, label %185, label %12

12:                                               ; preds = %9
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = lshr i32 %13, 24
  %15 = trunc nuw i32 %14 to i8
  store i8 %15, ptr %1, align 16, !tbaa !9
  %16 = lshr i32 %13, 16
  %17 = trunc i32 %16 to i8
  %18 = getelementptr inbounds i8, ptr %1, i64 1
  store i8 %17, ptr %18, align 1, !tbaa !9
  %19 = lshr i32 %13, 8
  %20 = trunc i32 %19 to i8
  %21 = getelementptr inbounds i8, ptr %1, i64 2
  store i8 %20, ptr %21, align 2, !tbaa !9
  %22 = trunc i32 %13 to i8
  %23 = getelementptr inbounds i8, ptr %1, i64 3
  store i8 %22, ptr %23, align 1, !tbaa !9
  %24 = call i32 @read_efuse(i32 noundef %6, i32 noundef 12, ptr noundef nonnull %2)
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %185, label %26

26:                                               ; preds = %12
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = lshr i32 %27, 24
  %29 = trunc nuw i32 %28 to i8
  %30 = getelementptr inbounds i8, ptr %1, i64 4
  store i8 %29, ptr %30, align 4, !tbaa !9
  %31 = lshr i32 %27, 16
  %32 = trunc i32 %31 to i8
  %33 = getelementptr inbounds i8, ptr %1, i64 5
  store i8 %32, ptr %33, align 1, !tbaa !9
  %34 = lshr i32 %27, 8
  %35 = trunc i32 %34 to i8
  %36 = getelementptr inbounds i8, ptr %1, i64 6
  store i8 %35, ptr %36, align 2, !tbaa !9
  %37 = trunc i32 %27 to i8
  %38 = getelementptr inbounds i8, ptr %1, i64 7
  store i8 %37, ptr %38, align 1, !tbaa !9
  %39 = call i32 @read_efuse(i32 noundef %6, i32 noundef 16, ptr noundef nonnull %2)
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %185, label %41

41:                                               ; preds = %26
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = lshr i32 %42, 24
  %44 = trunc nuw i32 %43 to i8
  %45 = getelementptr inbounds i8, ptr %1, i64 8
  store i8 %44, ptr %45, align 8, !tbaa !9
  %46 = lshr i32 %42, 16
  %47 = trunc i32 %46 to i8
  %48 = getelementptr inbounds i8, ptr %1, i64 9
  store i8 %47, ptr %48, align 1, !tbaa !9
  %49 = lshr i32 %42, 8
  %50 = trunc i32 %49 to i8
  %51 = getelementptr inbounds i8, ptr %1, i64 10
  store i8 %50, ptr %51, align 2, !tbaa !9
  %52 = trunc i32 %42 to i8
  %53 = getelementptr inbounds i8, ptr %1, i64 11
  store i8 %52, ptr %53, align 1, !tbaa !9
  %54 = call i32 @read_efuse(i32 noundef %6, i32 noundef 20, ptr noundef nonnull %2)
  %55 = icmp slt i32 %54, 0
  br i1 %55, label %185, label %56

56:                                               ; preds = %41
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = lshr i32 %57, 24
  %59 = trunc nuw i32 %58 to i8
  %60 = getelementptr inbounds i8, ptr %1, i64 12
  store i8 %59, ptr %60, align 4, !tbaa !9
  %61 = lshr i32 %57, 16
  %62 = trunc i32 %61 to i8
  %63 = getelementptr inbounds i8, ptr %1, i64 13
  store i8 %62, ptr %63, align 1, !tbaa !9
  %64 = lshr i32 %57, 8
  %65 = trunc i32 %64 to i8
  %66 = getelementptr inbounds i8, ptr %1, i64 14
  store i8 %65, ptr %66, align 2, !tbaa !9
  %67 = trunc i32 %57 to i8
  %68 = getelementptr inbounds i8, ptr %1, i64 15
  store i8 %67, ptr %68, align 1, !tbaa !9
  %69 = call i32 @read_efuse(i32 noundef %6, i32 noundef 24, ptr noundef nonnull %2)
  %70 = icmp slt i32 %69, 0
  br i1 %70, label %185, label %71

71:                                               ; preds = %56
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = lshr i32 %72, 24
  %74 = trunc nuw i32 %73 to i8
  %75 = getelementptr inbounds i8, ptr %1, i64 16
  store i8 %74, ptr %75, align 16, !tbaa !9
  %76 = lshr i32 %72, 16
  %77 = trunc i32 %76 to i8
  %78 = getelementptr inbounds i8, ptr %1, i64 17
  store i8 %77, ptr %78, align 1, !tbaa !9
  %79 = lshr i32 %72, 8
  %80 = trunc i32 %79 to i8
  %81 = getelementptr inbounds i8, ptr %1, i64 18
  store i8 %80, ptr %81, align 2, !tbaa !9
  %82 = trunc i32 %72 to i8
  %83 = getelementptr inbounds i8, ptr %1, i64 19
  store i8 %82, ptr %83, align 1, !tbaa !9
  %84 = call i32 @read_efuse(i32 noundef %6, i32 noundef 28, ptr noundef nonnull %2)
  %85 = icmp slt i32 %84, 0
  br i1 %85, label %185, label %86

86:                                               ; preds = %71
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = lshr i32 %87, 24
  %89 = trunc nuw i32 %88 to i8
  %90 = getelementptr inbounds i8, ptr %1, i64 20
  store i8 %89, ptr %90, align 4, !tbaa !9
  %91 = lshr i32 %87, 16
  %92 = trunc i32 %91 to i8
  %93 = getelementptr inbounds i8, ptr %1, i64 21
  store i8 %92, ptr %93, align 1, !tbaa !9
  %94 = lshr i32 %87, 8
  %95 = trunc i32 %94 to i8
  %96 = getelementptr inbounds i8, ptr %1, i64 22
  store i8 %95, ptr %96, align 2, !tbaa !9
  %97 = trunc i32 %87 to i8
  %98 = getelementptr inbounds i8, ptr %1, i64 23
  store i8 %97, ptr %98, align 1, !tbaa !9
  %99 = call i32 @read_efuse(i32 noundef %6, i32 noundef 32, ptr noundef nonnull %2)
  %100 = icmp slt i32 %99, 0
  br i1 %100, label %185, label %101

101:                                              ; preds = %86
  %102 = load i32, ptr %2, align 4, !tbaa !5
  %103 = lshr i32 %102, 24
  %104 = trunc nuw i32 %103 to i8
  %105 = getelementptr inbounds i8, ptr %1, i64 24
  store i8 %104, ptr %105, align 8, !tbaa !9
  %106 = lshr i32 %102, 16
  %107 = trunc i32 %106 to i8
  %108 = getelementptr inbounds i8, ptr %1, i64 25
  store i8 %107, ptr %108, align 1, !tbaa !9
  %109 = lshr i32 %102, 8
  %110 = trunc i32 %109 to i8
  %111 = getelementptr inbounds i8, ptr %1, i64 26
  store i8 %110, ptr %111, align 2, !tbaa !9
  %112 = trunc i32 %102 to i8
  %113 = getelementptr inbounds i8, ptr %1, i64 27
  store i8 %112, ptr %113, align 1, !tbaa !9
  %114 = call i32 @read_efuse(i32 noundef %6, i32 noundef 36, ptr noundef nonnull %2)
  %115 = icmp slt i32 %114, 0
  br i1 %115, label %185, label %116

116:                                              ; preds = %101
  %117 = load i32, ptr %2, align 4, !tbaa !5
  %118 = lshr i32 %117, 24
  %119 = trunc nuw i32 %118 to i8
  %120 = getelementptr inbounds i8, ptr %1, i64 28
  store i8 %119, ptr %120, align 4, !tbaa !9
  %121 = lshr i32 %117, 16
  %122 = trunc i32 %121 to i8
  %123 = getelementptr inbounds i8, ptr %1, i64 29
  store i8 %122, ptr %123, align 1, !tbaa !9
  %124 = lshr i32 %117, 8
  %125 = trunc i32 %124 to i8
  %126 = getelementptr inbounds i8, ptr %1, i64 30
  store i8 %125, ptr %126, align 2, !tbaa !9
  %127 = trunc i32 %117 to i8
  %128 = getelementptr inbounds i8, ptr %1, i64 31
  store i8 %127, ptr %128, align 1, !tbaa !9
  %129 = and i32 %16, 255
  %130 = and i32 %19, 255
  %131 = and i32 %13, 255
  %132 = and i32 %31, 255
  %133 = and i32 %34, 255
  %134 = and i32 %27, 255
  %135 = and i32 %46, 255
  %136 = and i32 %49, 255
  %137 = and i32 %42, 255
  %138 = and i32 %61, 255
  %139 = and i32 %64, 255
  %140 = and i32 %57, 255
  %141 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %14, i32 noundef %129, i32 noundef %130, i32 noundef %131, i32 noundef %28, i32 noundef %132, i32 noundef %133, i32 noundef %134, i32 noundef %43, i32 noundef %135, i32 noundef %136, i32 noundef %137, i32 noundef %58, i32 noundef %138, i32 noundef %139, i32 noundef %140)
  %142 = call i32 @close(i32 noundef %6) #5
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %4) #5
  call void @generate_mac_addresses(ptr noundef nonnull %1, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %144 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %145 = load i8, ptr %3, align 1, !tbaa !9
  %146 = zext i8 %145 to i32
  %147 = getelementptr inbounds i8, ptr %3, i64 1
  %148 = load i8, ptr %147, align 1, !tbaa !9
  %149 = zext i8 %148 to i32
  %150 = getelementptr inbounds i8, ptr %3, i64 2
  %151 = load i8, ptr %150, align 1, !tbaa !9
  %152 = zext i8 %151 to i32
  %153 = getelementptr inbounds i8, ptr %3, i64 3
  %154 = load i8, ptr %153, align 1, !tbaa !9
  %155 = zext i8 %154 to i32
  %156 = getelementptr inbounds i8, ptr %3, i64 4
  %157 = load i8, ptr %156, align 1, !tbaa !9
  %158 = zext i8 %157 to i32
  %159 = getelementptr inbounds i8, ptr %3, i64 5
  %160 = load i8, ptr %159, align 1, !tbaa !9
  %161 = zext i8 %160 to i32
  %162 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %146, i32 noundef %149, i32 noundef %152, i32 noundef %155, i32 noundef %158, i32 noundef %161)
  %163 = load i8, ptr %4, align 1, !tbaa !9
  %164 = zext i8 %163 to i32
  %165 = getelementptr inbounds i8, ptr %4, i64 1
  %166 = load i8, ptr %165, align 1, !tbaa !9
  %167 = zext i8 %166 to i32
  %168 = getelementptr inbounds i8, ptr %4, i64 2
  %169 = load i8, ptr %168, align 1, !tbaa !9
  %170 = zext i8 %169 to i32
  %171 = getelementptr inbounds i8, ptr %4, i64 3
  %172 = load i8, ptr %171, align 1, !tbaa !9
  %173 = zext i8 %172 to i32
  %174 = getelementptr inbounds i8, ptr %4, i64 4
  %175 = load i8, ptr %174, align 1, !tbaa !9
  %176 = zext i8 %175 to i32
  %177 = getelementptr inbounds i8, ptr %4, i64 5
  %178 = load i8, ptr %177, align 1, !tbaa !9
  %179 = zext i8 %178 to i32
  %180 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %164, i32 noundef %167, i32 noundef %170, i32 noundef %173, i32 noundef %176, i32 noundef %179)
  %181 = call noalias ptr @fopen(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10)
  %182 = call noalias ptr @fopen(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.10)
  %183 = icmp eq ptr %181, null
  %184 = icmp eq ptr %182, null
  %or.cond = or i1 %183, %184
  br i1 %or.cond, label %187, label %188

185:                                              ; preds = %101, %86, %71, %56, %41, %26, %12, %9
  call void @perror(ptr noundef nonnull @.str.3) #6
  %186 = call i32 @close(i32 noundef %6) #5
  br label %219

187:                                              ; preds = %116
  call void @perror(ptr noundef nonnull @.str.12) #6
  br label %218

188:                                              ; preds = %116
  %189 = load i8, ptr %3, align 1, !tbaa !9
  %190 = zext i8 %189 to i32
  %191 = load i8, ptr %147, align 1, !tbaa !9
  %192 = zext i8 %191 to i32
  %193 = load i8, ptr %150, align 1, !tbaa !9
  %194 = zext i8 %193 to i32
  %195 = load i8, ptr %153, align 1, !tbaa !9
  %196 = zext i8 %195 to i32
  %197 = load i8, ptr %156, align 1, !tbaa !9
  %198 = zext i8 %197 to i32
  %199 = load i8, ptr %159, align 1, !tbaa !9
  %200 = zext i8 %199 to i32
  %201 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %181, ptr noundef nonnull @.str.13, i32 noundef %190, i32 noundef %192, i32 noundef %194, i32 noundef %196, i32 noundef %198, i32 noundef %200) #5
  %202 = load i8, ptr %4, align 1, !tbaa !9
  %203 = zext i8 %202 to i32
  %204 = load i8, ptr %165, align 1, !tbaa !9
  %205 = zext i8 %204 to i32
  %206 = load i8, ptr %168, align 1, !tbaa !9
  %207 = zext i8 %206 to i32
  %208 = load i8, ptr %171, align 1, !tbaa !9
  %209 = zext i8 %208 to i32
  %210 = load i8, ptr %174, align 1, !tbaa !9
  %211 = zext i8 %210 to i32
  %212 = load i8, ptr %177, align 1, !tbaa !9
  %213 = zext i8 %212 to i32
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %182, ptr noundef nonnull @.str.13, i32 noundef %203, i32 noundef %205, i32 noundef %207, i32 noundef %209, i32 noundef %211, i32 noundef %213) #5
  %215 = call i32 @fclose(ptr noundef nonnull %181)
  %216 = call i32 @fclose(ptr noundef nonnull %182)
  %217 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  br label %218

218:                                              ; preds = %188, %187
  %.1 = phi i32 [ 1, %187 ], [ 0, %188 ]
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %3) #5
  br label %219

219:                                              ; preds = %185, %218
  %.2 = phi i32 [ %.1, %218 ], [ 1, %185 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #5
  br label %220

220:                                              ; preds = %219, %8
  %.3 = phi i32 [ 1, %8 ], [ %.2, %219 ]
  ret i32 %.3
}

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

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

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #2

declare i32 @close(i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree "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 = { "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 }

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


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