; LLVM IR from ARMmbed/mbed-crypto :: library (sha256)

; 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.mbedtls_sha256_context = type { [2 x i32], [8 x i32], [64 x i8], i32 }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@sha256_test_buf = external hidden constant [3 x [57 x i8]], align 16
@sha256_test_buflen = external hidden constant [3 x i64], align 16
@sha256_test_sum = external hidden constant [6 x [32 x i8]], align 16
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_sha256_init(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_sha256_free(ptr noundef) #0

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_sha256_self_test(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca [32 x i8], align 16
  %11 = alloca %struct.mbedtls_sha256_context, align 4
  %12 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 108, ptr %11) #7
  %13 = call noalias ptr @calloc(i64 noundef 1024, i64 noundef 1) #8
  store ptr %13, ptr %9, align 8, !tbaa !9
  %14 = load ptr, ptr %9, align 8, !tbaa !9
  %15 = icmp eq ptr null, %14
  br i1 %15, label %16, label %22

16:                                               ; preds = %1
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %21

19:                                               ; preds = %16
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  br label %21

21:                                               ; preds = %19, %16
  store i32 1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %123

22:                                               ; preds = %1
  call void @mbedtls_sha256_init(ptr noundef %11)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %105, %22
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 6
  br i1 %25, label %26, label %108

26:                                               ; preds = %23
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = srem i32 %27, 3
  store i32 %28, ptr %5, align 4, !tbaa !5
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = icmp slt i32 %29, 3
  %31 = zext i1 %30 to i32
  store i32 %31, ptr %6, align 4, !tbaa !5
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %41

34:                                               ; preds = %26
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = mul nsw i32 %35, 32
  %37 = sub nsw i32 256, %36
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %37, i32 noundef %39)
  br label %41

41:                                               ; preds = %34, %26
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = call i32 @mbedtls_sha256_starts_ret(ptr noundef %11, i32 noundef %42)
  store i32 %43, ptr %8, align 4, !tbaa !5
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  br label %114

46:                                               ; preds = %41
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = icmp eq i32 %47, 2
  br i1 %48, label %49, label %67

49:                                               ; preds = %46
  %50 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 1000, ptr %7, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 1 %50, i8 97, i64 1000, i1 false)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %63, %49
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = icmp slt i32 %52, 1000
  br i1 %53, label %54, label %66

54:                                               ; preds = %51
  %55 = load ptr, ptr %9, align 8, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = call i32 @mbedtls_sha256_update_ret(ptr noundef %11, ptr noundef %55, i64 noundef %57)
  store i32 %58, ptr %8, align 4, !tbaa !5
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %62

61:                                               ; preds = %54
  br label %114

62:                                               ; preds = %54
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %5, align 4, !tbaa !5
  br label %51, !llvm.loop !11

66:                                               ; preds = %51
  br label %81

67:                                               ; preds = %46
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [3 x [57 x i8]], ptr @sha256_test_buf, i64 0, i64 %69
  %71 = getelementptr inbounds [57 x i8], ptr %70, i64 0, i64 0
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [3 x i64], ptr @sha256_test_buflen, i64 0, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !13
  %76 = call i32 @mbedtls_sha256_update_ret(ptr noundef %11, ptr noundef %71, i64 noundef %75)
  store i32 %76, ptr %8, align 4, !tbaa !5
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %67
  br label %114

80:                                               ; preds = %67
  br label %81

81:                                               ; preds = %80, %66
  %82 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %83 = call i32 @mbedtls_sha256_finish_ret(ptr noundef %11, ptr noundef %82)
  store i32 %83, ptr %8, align 4, !tbaa !5
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %86

85:                                               ; preds = %81
  br label %114

86:                                               ; preds = %81
  %87 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [6 x [32 x i8]], ptr @sha256_test_sum, i64 0, i64 %89
  %91 = getelementptr inbounds [32 x i8], ptr %90, i64 0, i64 0
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = mul nsw i32 %92, 4
  %94 = sub nsw i32 32, %93
  %95 = sext i32 %94 to i64
  %96 = call i32 @memcmp(ptr noundef %87, ptr noundef %91, i64 noundef %95) #9
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %86
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %114

99:                                               ; preds = %86
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %99
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %104

104:                                              ; preds = %102, %99
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %4, align 4, !tbaa !5
  br label %23, !llvm.loop !15

108:                                              ; preds = %23
  %109 = load i32, ptr %3, align 4, !tbaa !5
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %113

111:                                              ; preds = %108
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %113

113:                                              ; preds = %111, %108
  br label %120

114:                                              ; preds = %98, %85, %79, %61, %45
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %119

117:                                              ; preds = %114
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %119

119:                                              ; preds = %117, %114
  br label %120

120:                                              ; preds = %119, %113
  call void @mbedtls_sha256_free(ptr noundef %11)
  %121 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %121) #7
  %122 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %122, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %123

123:                                              ; preds = %120, %21
  call void @llvm.lifetime.end.p0(i64 108, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  %124 = load i32, ptr %2, align 4
  ret i32 %124
}

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #3

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

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 nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind allocsize(0,1) "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 willreturn memory(read) "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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }
attributes #9 = { nounwind willreturn memory(read) }

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


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

%struct.mbedtls_sha256_context = type { [2 x i32], [8 x i32], [64 x i8], i32 }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@sha256_test_buf = external hidden constant [3 x [57 x i8]], align 16
@sha256_test_buflen = external hidden local_unnamed_addr constant [3 x i64], align 16
@sha256_test_sum = external hidden constant [6 x [32 x i8]], align 16
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_sha256_self_test(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca [32 x i8], align 16
  %3 = alloca %struct.mbedtls_sha256_context, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 108, ptr nonnull %3) #7
  %4 = tail call noalias dereferenceable_or_null(1024) ptr @calloc(i64 noundef 1024, i64 noundef 1) #8
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %9

6:                                                ; preds = %1
  %.not43 = icmp eq i32 %0, 0
  br i1 %.not43, label %39, label %7

7:                                                ; preds = %6
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %39

9:                                                ; preds = %1
  call void @mbedtls_sha256_init(ptr noundef nonnull %3)
  %.not37 = icmp eq i32 %0, 0
  br label %.backedge

.backedge:                                        ; preds = %.backedge.backedge, %9
  %indvars.iv = phi i64 [ 0, %9 ], [ %indvars.iv.be, %.backedge.backedge ]
  %indvars53 = trunc i64 %indvars.iv to i32
  %.urem = add nsw i32 %indvars53, -3
  %.cmp = icmp ult i64 %indvars.iv, 3
  %10 = select i1 %.cmp, i32 %indvars53, i32 %.urem
  %11 = zext i1 %.cmp to i32
  br i1 %.not37, label %16, label %12

12:                                               ; preds = %.backedge
  %13 = select i1 %.cmp, i32 224, i32 256
  %14 = add nuw nsw i32 %10, 1
  %15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %13, i32 noundef %14)
  br label %16

16:                                               ; preds = %12, %.backedge
  %17 = call i32 @mbedtls_sha256_starts_ret(ptr noundef nonnull %3, i32 noundef %11)
  %.not38 = icmp eq i32 %17, 0
  br i1 %.not38, label %18, label %.loopexit44

18:                                               ; preds = %16
  %19 = icmp eq i32 %10, 2
  br i1 %19, label %20, label %25

20:                                               ; preds = %18
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1000) %4, i8 97, i64 1000, i1 false)
  br label %23

21:                                               ; preds = %23
  %22 = add nuw nsw i32 %.02948, 1
  %exitcond.not = icmp eq i32 %22, 1000
  br i1 %exitcond.not, label %.loopexit, label %23, !llvm.loop !5

23:                                               ; preds = %20, %21
  %.02948 = phi i32 [ 0, %20 ], [ %22, %21 ]
  %24 = call i32 @mbedtls_sha256_update_ret(ptr noundef nonnull %3, ptr noundef nonnull %4, i64 noundef 1000)
  %.not42 = icmp eq i32 %24, 0
  br i1 %.not42, label %21, label %.loopexit44

25:                                               ; preds = %18
  %26 = zext nneg i32 %10 to i64
  %27 = getelementptr inbounds [3 x [57 x i8]], ptr @sha256_test_buf, i64 0, i64 %26
  %28 = getelementptr inbounds [3 x i64], ptr @sha256_test_buflen, i64 0, i64 %26
  %29 = load i64, ptr %28, align 8, !tbaa !7
  %30 = call i32 @mbedtls_sha256_update_ret(ptr noundef nonnull %3, ptr noundef nonnull %27, i64 noundef %29)
  %.not39 = icmp eq i32 %30, 0
  br i1 %.not39, label %.loopexit, label %.loopexit44

.loopexit:                                        ; preds = %21, %25
  %31 = call i32 @mbedtls_sha256_finish_ret(ptr noundef nonnull %3, ptr noundef nonnull %2)
  %.not40 = icmp eq i32 %31, 0
  br i1 %.not40, label %32, label %.loopexit44

32:                                               ; preds = %.loopexit
  %33 = getelementptr inbounds [6 x [32 x i8]], ptr @sha256_test_sum, i64 0, i64 %indvars.iv
  %34 = select i1 %.cmp, i64 28, i64 32
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(28) %2, ptr noundef nonnull dereferenceable(28) %33, i64 %34)
  %.not41 = icmp eq i32 %bcmp, 0
  br i1 %.not41, label %35, label %.loopexit44

35:                                               ; preds = %32
  br i1 %.not37, label %36, label %.thread

36:                                               ; preds = %35
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next, 6
  br i1 %exitcond54.not, label %.loopexit59, label %.backedge.backedge

.backedge.backedge:                               ; preds = %36, %.thread
  %indvars.iv.be = phi i64 [ %indvars.iv.next, %36 ], [ %indvars.iv.next55, %.thread ]
  br label %.backedge, !llvm.loop !11

.thread:                                          ; preds = %35
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv, 1
  %exitcond54.not56 = icmp eq i64 %indvars.iv.next55, 6
  br i1 %exitcond54.not56, label %.loopexit59.sink.split, label %.backedge.backedge

.loopexit44:                                      ; preds = %32, %.loopexit, %25, %16, %23
  %.1 = phi i32 [ %24, %23 ], [ 1, %32 ], [ %30, %25 ], [ %31, %.loopexit ], [ %17, %16 ]
  br i1 %.not37, label %.loopexit59, label %.loopexit59.sink.split

.loopexit59.sink.split:                           ; preds = %.thread, %.loopexit44
  %.str.4.sink = phi ptr [ @.str.4, %.loopexit44 ], [ @.str.3, %.thread ]
  %.2.ph = phi i32 [ %.1, %.loopexit44 ], [ 0, %.thread ]
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink)
  br label %.loopexit59

.loopexit59:                                      ; preds = %36, %.loopexit59.sink.split, %.loopexit44
  %.2 = phi i32 [ %.1, %.loopexit44 ], [ %.2.ph, %.loopexit59.sink.split ], [ 0, %36 ]
  call void @mbedtls_sha256_free(ptr noundef nonnull %3)
  call void @free(ptr noundef %4) #7
  br label %39

39:                                               ; preds = %6, %7, %.loopexit59
  %.0 = phi i32 [ %.2, %.loopexit59 ], [ 1, %7 ], [ 1, %6 ]
  call void @llvm.lifetime.end.p0(i64 108, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  ret i32 %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #6

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 nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { nofree nounwind willreturn memory(argmem: read) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = distinct !{!11, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass