; LLVM IR from cpq/bare-metal-programming-guide :: steps/step-7-webserver/pico-w5500/tools (bin2uf2)

; 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 [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1

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

16:                                               ; preds = %2
  %17 = call i32 (ptr, ...) @fail(ptr noundef @.str)
  br label %18

18:                                               ; preds = %16, %2
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = call noalias ptr @fopen(ptr noundef %21, ptr noundef @.str.1)
  store ptr %22, ptr %6, align 8, !tbaa !9
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %29

24:                                               ; preds = %18
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %25, i64 1
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = call i32 (ptr, ...) @fail(ptr noundef @.str.2, ptr noundef %27)
  br label %29

29:                                               ; preds = %24, %18
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = getelementptr inbounds ptr, ptr %30, i64 2
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = call noalias ptr @fopen(ptr noundef %32, ptr noundef @.str.3)
  store ptr %33, ptr %7, align 8, !tbaa !9
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %40

35:                                               ; preds = %29
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = getelementptr inbounds ptr, ptr %36, i64 2
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = call i32 (ptr, ...) @fail(ptr noundef @.str.2, ptr noundef %38)
  br label %40

40:                                               ; preds = %35, %29
  %41 = load ptr, ptr %6, align 8, !tbaa !9
  %42 = call i32 @fseek(ptr noundef %41, i64 noundef 0, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = call i64 @ftell(ptr noundef %43)
  store i64 %44, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %45 = load i64, ptr %8, align 8, !tbaa !11
  %46 = add i64 %45, 255
  %47 = udiv i64 %46, 256
  store i64 %47, ptr %9, align 8, !tbaa !11
  %48 = load ptr, ptr %6, align 8, !tbaa !9
  %49 = call i32 @fseek(ptr noundef %48, i64 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 256, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %50

50:                                               ; preds = %98, %40
  %51 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %52 = load ptr, ptr %6, align 8, !tbaa !9
  %53 = call i64 @fread(ptr noundef %51, i64 noundef 1, i64 noundef 256, ptr noundef %52)
  store i64 %53, ptr %11, align 8, !tbaa !11
  %54 = icmp ugt i64 %53, 0
  br i1 %54, label %55, label %102

55:                                               ; preds = %50
  %56 = load i64, ptr %11, align 8, !tbaa !11
  %57 = icmp ult i64 %56, 256
  br i1 %57, label %58, label %64

58:                                               ; preds = %55
  %59 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %60 = load i64, ptr %11, align 8, !tbaa !11
  %61 = getelementptr inbounds i8, ptr %59, i64 %60
  %62 = load i64, ptr %11, align 8, !tbaa !11
  %63 = sub i64 256, %62
  call void @llvm.memset.p0.i64(ptr align 1 %61, i8 -1, i64 %63, i1 false)
  br label %64

64:                                               ; preds = %58, %55
  %65 = load i64, ptr %12, align 8, !tbaa !11
  %66 = icmp eq i64 %65, 0
  br i1 %66, label %67, label %69

67:                                               ; preds = %64
  %68 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  call void @addcrc(ptr noundef %68)
  br label %69

69:                                               ; preds = %67, %64
  %70 = load ptr, ptr %7, align 8, !tbaa !9
  call void @wu32(ptr noundef %70, i32 noundef 171066965)
  %71 = load ptr, ptr %7, align 8, !tbaa !9
  call void @wu32(ptr noundef %71, i32 noundef -1638051497)
  %72 = load ptr, ptr %7, align 8, !tbaa !9
  call void @wu32(ptr noundef %72, i32 noundef 8192)
  %73 = load ptr, ptr %7, align 8, !tbaa !9
  %74 = load i64, ptr %12, align 8, !tbaa !11
  %75 = mul i64 %74, 256
  %76 = add i64 268435456, %75
  %77 = trunc i64 %76 to i32
  call void @wu32(ptr noundef %73, i32 noundef %77)
  %78 = load ptr, ptr %7, align 8, !tbaa !9
  call void @wu32(ptr noundef %78, i32 noundef 256)
  %79 = load ptr, ptr %7, align 8, !tbaa !9
  %80 = load i64, ptr %12, align 8, !tbaa !11
  %81 = trunc i64 %80 to i32
  call void @wu32(ptr noundef %79, i32 noundef %81)
  %82 = load ptr, ptr %7, align 8, !tbaa !9
  %83 = load i64, ptr %9, align 8, !tbaa !11
  %84 = trunc i64 %83 to i32
  call void @wu32(ptr noundef %82, i32 noundef %84)
  %85 = load ptr, ptr %7, align 8, !tbaa !9
  call void @wu32(ptr noundef %85, i32 noundef -460587178)
  %86 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %87 = load ptr, ptr %7, align 8, !tbaa !9
  %88 = call i64 @fwrite(ptr noundef %86, i64 noundef 1, i64 noundef 256, ptr noundef %87)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %95, %69
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = icmp slt i32 %90, 55
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %98

93:                                               ; preds = %89
  %94 = load ptr, ptr %7, align 8, !tbaa !9
  call void @wu32(ptr noundef %94, i32 noundef 0)
  br label %95

95:                                               ; preds = %93
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %13, align 4, !tbaa !5
  br label %89, !llvm.loop !13

98:                                               ; preds = %92
  %99 = load ptr, ptr %7, align 8, !tbaa !9
  call void @wu32(ptr noundef %99, i32 noundef 179400496)
  %100 = load i64, ptr %12, align 8, !tbaa !11
  %101 = add i64 %100, 1
  store i64 %101, ptr %12, align 8, !tbaa !11
  br label %50, !llvm.loop !15

102:                                              ; preds = %50
  %103 = load ptr, ptr %7, align 8, !tbaa !9
  %104 = call i64 @ftell(ptr noundef %103)
  %105 = trunc i64 %104 to i32
  %106 = load ptr, ptr %5, align 8, !tbaa !9
  %107 = getelementptr inbounds ptr, ptr %106, i64 2
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %105, ptr noundef %108)
  %110 = load ptr, ptr %6, align 8, !tbaa !9
  %111 = call i32 @fclose(ptr noundef %110)
  %112 = load ptr, ptr %7, align 8, !tbaa !9
  %113 = call i32 @fclose(ptr noundef %112)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  ret i32 0
}

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

; Function Attrs: nounwind uwtable
declare hidden i32 @fail(ptr noundef, ...) #0

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

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

declare i64 @ftell(ptr noundef) #2

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #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
declare hidden void @addcrc(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @wu32(ptr noundef, i32 noundef) #0

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

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

declare i32 @fclose(ptr noundef) #2

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


; 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 [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [256 x i8], align 16
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %6, label %4

4:                                                ; preds = %2
  %5 = tail call i32 (ptr, ...) @fail(ptr noundef nonnull @.str)
  br label %6

6:                                                ; preds = %4, %2
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = tail call noalias ptr @fopen(ptr noundef %8, ptr noundef nonnull @.str.1)
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %14

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

14:                                               ; preds = %11, %6
  %15 = getelementptr inbounds i8, ptr %1, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = tail call noalias ptr @fopen(ptr noundef %16, ptr noundef nonnull @.str.3)
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %22

19:                                               ; preds = %14
  %20 = load ptr, ptr %15, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ...) @fail(ptr noundef nonnull @.str.2, ptr noundef %20)
  br label %22

22:                                               ; preds = %19, %14
  %23 = tail call i32 @fseek(ptr noundef %9, i64 noundef 0, i32 noundef 2)
  %24 = tail call i64 @ftell(ptr noundef %9)
  %25 = tail call i32 @fseek(ptr noundef %9, i64 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #4
  %26 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 1, i64 noundef 256, ptr noundef %9)
  %.not3638 = icmp eq i64 %26, 0
  br i1 %.not3638, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %22
  %27 = add i64 %24, 255
  %28 = lshr i64 %27, 8
  %29 = trunc i64 %28 to i32
  br label %30

30:                                               ; preds = %.lr.ph, %39
  %31 = phi i64 [ %26, %.lr.ph ], [ %44, %39 ]
  %.03439 = phi i64 [ 0, %.lr.ph ], [ %43, %39 ]
  %32 = icmp ult i64 %31, 256
  br i1 %32, label %33, label %36

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %3, i64 %31
  %35 = sub nuw nsw i64 256, %31
  call void @llvm.memset.p0.i64(ptr nonnull align 1 %34, i8 -1, i64 %35, i1 false)
  br label %36

36:                                               ; preds = %33, %30
  %37 = icmp eq i64 %.03439, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %36
  call void @addcrc(ptr noundef nonnull %3)
  br label %39

39:                                               ; preds = %38, %36
  call void @wu32(ptr noundef %17, i32 noundef 171066965)
  call void @wu32(ptr noundef %17, i32 noundef -1638051497)
  call void @wu32(ptr noundef %17, i32 noundef 8192)
  %.034.tr = trunc i64 %.03439 to i32
  %40 = shl i32 %.034.tr, 8
  %41 = add i32 %40, 268435456
  call void @wu32(ptr noundef %17, i32 noundef %41)
  call void @wu32(ptr noundef %17, i32 noundef 256)
  call void @wu32(ptr noundef %17, i32 noundef %.034.tr)
  call void @wu32(ptr noundef %17, i32 noundef %29)
  call void @wu32(ptr noundef %17, i32 noundef -460587178)
  %42 = call i64 @fwrite(ptr noundef nonnull %3, i64 noundef 1, i64 noundef 256, ptr noundef %17)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 0)
  call void @wu32(ptr noundef %17, i32 noundef 179400496)
  %43 = add i64 %.03439, 1
  %44 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 1, i64 noundef 256, ptr noundef %9)
  %.not36 = icmp eq i64 %44, 0
  br i1 %.not36, label %._crit_edge, label %30, !llvm.loop !9

._crit_edge:                                      ; preds = %39, %22
  %45 = call i64 @ftell(ptr noundef %17)
  %46 = trunc i64 %45 to i32
  %47 = load ptr, ptr %15, align 8, !tbaa !5
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %46, ptr noundef %47)
  %49 = call i32 @fclose(ptr noundef %9)
  %50 = call i32 @fclose(ptr noundef %17)
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #4
  ret i32 0
}

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

; Function Attrs: nounwind uwtable
declare hidden i32 @fail(ptr noundef, ...) local_unnamed_addr #0

; 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 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #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
declare hidden void @addcrc(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @wu32(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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