; LLVM IR from tleonhardt/practical_cryptography_engineering :: mbedtls (ripemd160)

; 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 [24 x i8], align 1
@ripemd160_test_input = external hidden global [8 x ptr], align 16
@ripemd160_test_md = external hidden constant [8 x [20 x i8]], align 16
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ripemd160(ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_ripemd160_self_test(i32 noundef %0) #2 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [20 x i8], align 16
  %6 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 20, ptr %5) #5
  %7 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 20, i1 false)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %8

8:                                                ; preds = %48, %1
  %9 = load i32, ptr %4, align 4, !tbaa !5
  %10 = icmp slt i32 %9, 8
  br i1 %10, label %11, label %51

11:                                               ; preds = %8
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %13 = icmp ne i32 %12, 0
  br i1 %13, label %14, label %18

14:                                               ; preds = %11
  %15 = load i32, ptr %4, align 4, !tbaa !5
  %16 = add nsw i32 %15, 1
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %16)
  br label %18

18:                                               ; preds = %14, %11
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [8 x ptr], ptr @ripemd160_test_input, i64 0, i64 %20
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [8 x ptr], ptr @ripemd160_test_input, i64 0, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = call i64 @strlen(ptr noundef %26) #6
  %28 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  call void @mbedtls_ripemd160(ptr noundef %22, i64 noundef %27, ptr noundef %28)
  %29 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [8 x [20 x i8]], ptr @ripemd160_test_md, i64 0, i64 %31
  %33 = getelementptr inbounds [20 x i8], ptr %32, i64 0, i64 0
  %34 = call i32 @memcmp(ptr noundef %29, ptr noundef %33, i64 noundef 20) #6
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %42

36:                                               ; preds = %18
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %36
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %41

41:                                               ; preds = %39, %36
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %57

42:                                               ; preds = %18
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %42
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %47

47:                                               ; preds = %45, %42
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %4, align 4, !tbaa !5
  br label %8, !llvm.loop !11

51:                                               ; preds = %8
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %51
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %56

56:                                               ; preds = %54, %51
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %57

57:                                               ; preds = %56, %41
  call void @llvm.lifetime.end.p0(i64 20, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %58 = load i32, ptr %2, align 4
  ret i32 %58
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

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


; 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 [24 x i8], align 1
@ripemd160_test_input = external hidden local_unnamed_addr global [8 x ptr], align 16
@ripemd160_test_md = external hidden constant [8 x [20 x i8]], align 16
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ripemd160(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @mbedtls_ripemd160_self_test(i32 noundef %0) local_unnamed_addr #2 {
  %2 = alloca [20 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %2) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) %2, i8 0, i64 20, i1 false)
  %.not12 = icmp eq i32 %0, 0
  br i1 %.not12, label %.split.us.preheader, label %.split.preheader

.split.preheader:                                 ; preds = %1
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 1)
  %4 = load ptr, ptr @ripemd160_test_input, align 16, !tbaa !5
  %5 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #7
  call void @mbedtls_ripemd160(ptr noundef %4, i64 noundef %5, ptr noundef nonnull %2)
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) @ripemd160_test_md, i64 20)
  %.not13 = icmp eq i32 %bcmp, 0
  br i1 %.not13, label %.split.1, label %.critedge.sink.split

.split.us.preheader:                              ; preds = %1
  %6 = load ptr, ptr @ripemd160_test_input, align 16, !tbaa !5
  %7 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %6) #7
  call void @mbedtls_ripemd160(ptr noundef %6, i64 noundef %7, ptr noundef nonnull %2)
  %bcmp.us = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) @ripemd160_test_md, i64 20)
  %.not13.us = icmp eq i32 %bcmp.us, 0
  br i1 %.not13.us, label %.split.us.1, label %.critedge

.split.us.1:                                      ; preds = %.split.us.preheader
  %8 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 8), align 8, !tbaa !5
  %9 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %8) #7
  call void @mbedtls_ripemd160(ptr noundef %8, i64 noundef %9, ptr noundef nonnull %2)
  %bcmp.us.1 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 20), i64 20)
  %.not13.us.1 = icmp eq i32 %bcmp.us.1, 0
  br i1 %.not13.us.1, label %.split.us.2, label %.critedge

.split.us.2:                                      ; preds = %.split.us.1
  %10 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 16), align 16, !tbaa !5
  %11 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %10) #7
  call void @mbedtls_ripemd160(ptr noundef %10, i64 noundef %11, ptr noundef nonnull %2)
  %bcmp.us.2 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 40), i64 20)
  %.not13.us.2 = icmp eq i32 %bcmp.us.2, 0
  br i1 %.not13.us.2, label %.split.us.3, label %.critedge

.split.us.3:                                      ; preds = %.split.us.2
  %12 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 24), align 8, !tbaa !5
  %13 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %12) #7
  call void @mbedtls_ripemd160(ptr noundef %12, i64 noundef %13, ptr noundef nonnull %2)
  %bcmp.us.3 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 60), i64 20)
  %.not13.us.3 = icmp eq i32 %bcmp.us.3, 0
  br i1 %.not13.us.3, label %.split.us.4, label %.critedge

.split.us.4:                                      ; preds = %.split.us.3
  %14 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 32), align 16, !tbaa !5
  %15 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %14) #7
  call void @mbedtls_ripemd160(ptr noundef %14, i64 noundef %15, ptr noundef nonnull %2)
  %bcmp.us.4 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 80), i64 20)
  %.not13.us.4 = icmp eq i32 %bcmp.us.4, 0
  br i1 %.not13.us.4, label %.split.us.5, label %.critedge

.split.us.5:                                      ; preds = %.split.us.4
  %16 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 40), align 8, !tbaa !5
  %17 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %16) #7
  call void @mbedtls_ripemd160(ptr noundef %16, i64 noundef %17, ptr noundef nonnull %2)
  %bcmp.us.5 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 100), i64 20)
  %.not13.us.5 = icmp eq i32 %bcmp.us.5, 0
  br i1 %.not13.us.5, label %.split.us.6, label %.critedge

.split.us.6:                                      ; preds = %.split.us.5
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 48), align 16, !tbaa !5
  %19 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %18) #7
  call void @mbedtls_ripemd160(ptr noundef %18, i64 noundef %19, ptr noundef nonnull %2)
  %bcmp.us.6 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 120), i64 20)
  %.not13.us.6 = icmp eq i32 %bcmp.us.6, 0
  br i1 %.not13.us.6, label %.split.us.7, label %.critedge

.split.us.7:                                      ; preds = %.split.us.6
  %20 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 56), align 8, !tbaa !5
  %21 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %20) #7
  call void @mbedtls_ripemd160(ptr noundef %20, i64 noundef %21, ptr noundef nonnull %2)
  %bcmp.us.7 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 140), i64 20)
  %.not13.us.7 = icmp ne i32 %bcmp.us.7, 0
  %spec.select = zext i1 %.not13.us.7 to i32
  br label %.critedge

.split.1:                                         ; preds = %.split.preheader
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 2)
  %24 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 8), align 8, !tbaa !5
  %25 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %24) #7
  call void @mbedtls_ripemd160(ptr noundef %24, i64 noundef %25, ptr noundef nonnull %2)
  %bcmp.1 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 20), i64 20)
  %.not13.1 = icmp eq i32 %bcmp.1, 0
  br i1 %.not13.1, label %.split.2, label %.critedge.sink.split

.split.2:                                         ; preds = %.split.1
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 3)
  %28 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 16), align 16, !tbaa !5
  %29 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %28) #7
  call void @mbedtls_ripemd160(ptr noundef %28, i64 noundef %29, ptr noundef nonnull %2)
  %bcmp.2 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 40), i64 20)
  %.not13.2 = icmp eq i32 %bcmp.2, 0
  br i1 %.not13.2, label %.split.3, label %.critedge.sink.split

.split.3:                                         ; preds = %.split.2
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 4)
  %32 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 24), align 8, !tbaa !5
  %33 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %32) #7
  call void @mbedtls_ripemd160(ptr noundef %32, i64 noundef %33, ptr noundef nonnull %2)
  %bcmp.3 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 60), i64 20)
  %.not13.3 = icmp eq i32 %bcmp.3, 0
  br i1 %.not13.3, label %.split.4, label %.critedge.sink.split

.split.4:                                         ; preds = %.split.3
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 5)
  %36 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 32), align 16, !tbaa !5
  %37 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %36) #7
  call void @mbedtls_ripemd160(ptr noundef %36, i64 noundef %37, ptr noundef nonnull %2)
  %bcmp.4 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 80), i64 20)
  %.not13.4 = icmp eq i32 %bcmp.4, 0
  br i1 %.not13.4, label %.split.5, label %.critedge.sink.split

.split.5:                                         ; preds = %.split.4
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 6)
  %40 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 40), align 8, !tbaa !5
  %41 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %40) #7
  call void @mbedtls_ripemd160(ptr noundef %40, i64 noundef %41, ptr noundef nonnull %2)
  %bcmp.5 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 100), i64 20)
  %.not13.5 = icmp eq i32 %bcmp.5, 0
  br i1 %.not13.5, label %.split.6, label %.critedge.sink.split

.split.6:                                         ; preds = %.split.5
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 7)
  %44 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 48), align 16, !tbaa !5
  %45 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %44) #7
  call void @mbedtls_ripemd160(ptr noundef %44, i64 noundef %45, ptr noundef nonnull %2)
  %bcmp.6 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 120), i64 20)
  %.not13.6 = icmp eq i32 %bcmp.6, 0
  br i1 %.not13.6, label %.split.7, label %.critedge.sink.split

.split.7:                                         ; preds = %.split.6
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 8)
  %48 = load ptr, ptr getelementptr inbounds (i8, ptr @ripemd160_test_input, i64 56), align 8, !tbaa !5
  %49 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %48) #7
  call void @mbedtls_ripemd160(ptr noundef %48, i64 noundef %49, ptr noundef nonnull %2)
  %bcmp.7 = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) getelementptr inbounds (i8, ptr @ripemd160_test_md, i64 140), i64 20)
  %.not13.7 = icmp eq i32 %bcmp.7, 0
  br i1 %.not13.7, label %50, label %.critedge.sink.split

50:                                               ; preds = %.split.7
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.critedge.sink.split

.critedge.sink.split:                             ; preds = %.split.preheader, %.split.1, %.split.2, %.split.3, %.split.4, %.split.5, %.split.6, %.split.7, %50
  %.str.3.sink = phi ptr [ @.str.3, %50 ], [ @.str.1, %.split.7 ], [ @.str.1, %.split.6 ], [ @.str.1, %.split.5 ], [ @.str.1, %.split.4 ], [ @.str.1, %.split.3 ], [ @.str.1, %.split.2 ], [ @.str.1, %.split.1 ], [ @.str.1, %.split.preheader ]
  %.011.ph = phi i32 [ 0, %50 ], [ 1, %.split.7 ], [ 1, %.split.6 ], [ 1, %.split.5 ], [ 1, %.split.4 ], [ 1, %.split.3 ], [ 1, %.split.2 ], [ 1, %.split.1 ], [ 1, %.split.preheader ]
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  br label %.critedge

.critedge:                                        ; preds = %.split.us.7, %.critedge.sink.split, %.split.us.preheader, %.split.us.1, %.split.us.2, %.split.us.3, %.split.us.4, %.split.us.5, %.split.us.6
  %.011 = phi i32 [ 1, %.split.us.6 ], [ 1, %.split.us.5 ], [ 1, %.split.us.4 ], [ 1, %.split.us.3 ], [ 1, %.split.us.2 ], [ 1, %.split.us.1 ], [ 1, %.split.us.preheader ], [ %spec.select, %.split.us.7 ], [ %.011.ph, %.critedge.sink.split ]
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %2) #6
  ret i32 %.011
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nofree nounwind willreturn memory(argmem: 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 #5 = { nofree nounwind willreturn memory(argmem: read) }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass