; LLVM IR from ARMmbed/mbed-crypto :: library (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_str = external hidden constant [8 x [81 x i8]], align 16
@ripemd160_test_strlen = external hidden constant [8 x i64], 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 [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 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 i32 @mbedtls_ripemd160_ret(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 i32, align 4
  %6 = alloca [20 x i8], align 16
  %7 = 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 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 20, ptr %6) #5
  %8 = getelementptr inbounds [20 x i8], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 20, i1 false)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %9

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

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

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

19:                                               ; preds = %15, %12
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [8 x [81 x i8]], ptr @ripemd160_test_str, i64 0, i64 %21
  %23 = getelementptr inbounds [81 x i8], ptr %22, i64 0, i64 0
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [8 x i64], ptr @ripemd160_test_strlen, i64 0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds [20 x i8], ptr %6, i64 0, i64 0
  %29 = call i32 @mbedtls_ripemd160_ret(ptr noundef %23, i64 noundef %27, ptr noundef %28)
  store i32 %29, ptr %5, align 4, !tbaa !5
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %19
  br label %57

33:                                               ; preds = %19
  %34 = getelementptr inbounds [20 x i8], ptr %6, i64 0, i64 0
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [8 x [20 x i8]], ptr @ripemd160_test_md, i64 0, i64 %36
  %38 = getelementptr inbounds [20 x i8], ptr %37, i64 0, i64 0
  %39 = call i32 @memcmp(ptr noundef %34, ptr noundef %38, i64 noundef 20) #6
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %33
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %57

42:                                               ; preds = %33
  %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.1)
  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 %9, !llvm.loop !11

51:                                               ; preds = %9
  %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.2)
  br label %56

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

57:                                               ; preds = %41, %32
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %57
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %62

62:                                               ; preds = %60, %57
  %63 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %63, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %64

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

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

; 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 = !{!"long", !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_str = external hidden constant [8 x [81 x i8]], align 16
@ripemd160_test_strlen = external hidden local_unnamed_addr constant [8 x i64], 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 [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 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 i32 @mbedtls_ripemd160_ret(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local 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) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) %2, i8 0, i64 20, i1 false)
  %.not16 = icmp eq i32 %0, 0
  br i1 %.not16, 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 i64, ptr @ripemd160_test_strlen, align 16, !tbaa !5
  %5 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull @ripemd160_test_str, i64 noundef %4, ptr noundef nonnull %2)
  %.not17 = icmp eq i32 %5, 0
  br i1 %.not17, label %30, label %.split24.us.thread.sink.split

.split.us.preheader:                              ; preds = %1
  %6 = load i64, ptr @ripemd160_test_strlen, align 16, !tbaa !5
  %7 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull @ripemd160_test_str, i64 noundef %6, ptr noundef nonnull %2)
  %.not17.us = icmp eq i32 %7, 0
  br i1 %.not17.us, label %8, label %.split24.us.thread

8:                                                ; preds = %.split.us.preheader
  %bcmp.us = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) @ripemd160_test_md, i64 20)
  %.not18.us = icmp eq i32 %bcmp.us, 0
  br i1 %.not18.us, label %.split.us.1, label %.split24.us.thread

.split.us.1:                                      ; preds = %8
  %9 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 8), align 8, !tbaa !5
  %10 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 81), i64 noundef %9, ptr noundef nonnull %2)
  %.not17.us.1 = icmp eq i32 %10, 0
  br i1 %.not17.us.1, label %11, label %.split24.us.thread

11:                                               ; preds = %.split.us.1
  %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)
  %.not18.us.1 = icmp eq i32 %bcmp.us.1, 0
  br i1 %.not18.us.1, label %.split.us.2, label %.split24.us.thread

.split.us.2:                                      ; preds = %11
  %12 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 16), align 16, !tbaa !5
  %13 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 162), i64 noundef %12, ptr noundef nonnull %2)
  %.not17.us.2 = icmp eq i32 %13, 0
  br i1 %.not17.us.2, label %14, label %.split24.us.thread

14:                                               ; preds = %.split.us.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)
  %.not18.us.2 = icmp eq i32 %bcmp.us.2, 0
  br i1 %.not18.us.2, label %.split.us.3, label %.split24.us.thread

.split.us.3:                                      ; preds = %14
  %15 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 24), align 8, !tbaa !5
  %16 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 243), i64 noundef %15, ptr noundef nonnull %2)
  %.not17.us.3 = icmp eq i32 %16, 0
  br i1 %.not17.us.3, label %17, label %.split24.us.thread

17:                                               ; preds = %.split.us.3
  %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)
  %.not18.us.3 = icmp eq i32 %bcmp.us.3, 0
  br i1 %.not18.us.3, label %.split.us.4, label %.split24.us.thread

.split.us.4:                                      ; preds = %17
  %18 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 32), align 16, !tbaa !5
  %19 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 324), i64 noundef %18, ptr noundef nonnull %2)
  %.not17.us.4 = icmp eq i32 %19, 0
  br i1 %.not17.us.4, label %20, label %.split24.us.thread

20:                                               ; preds = %.split.us.4
  %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)
  %.not18.us.4 = icmp eq i32 %bcmp.us.4, 0
  br i1 %.not18.us.4, label %.split.us.5, label %.split24.us.thread

.split.us.5:                                      ; preds = %20
  %21 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 40), align 8, !tbaa !5
  %22 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 405), i64 noundef %21, ptr noundef nonnull %2)
  %.not17.us.5 = icmp eq i32 %22, 0
  br i1 %.not17.us.5, label %23, label %.split24.us.thread

23:                                               ; preds = %.split.us.5
  %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)
  %.not18.us.5 = icmp eq i32 %bcmp.us.5, 0
  br i1 %.not18.us.5, label %.split.us.6, label %.split24.us.thread

.split.us.6:                                      ; preds = %23
  %24 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 48), align 16, !tbaa !5
  %25 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 486), i64 noundef %24, ptr noundef nonnull %2)
  %.not17.us.6 = icmp eq i32 %25, 0
  br i1 %.not17.us.6, label %26, label %.split24.us.thread

26:                                               ; preds = %.split.us.6
  %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)
  %.not18.us.6 = icmp eq i32 %bcmp.us.6, 0
  br i1 %.not18.us.6, label %.split.us.7, label %.split24.us.thread

.split.us.7:                                      ; preds = %26
  %27 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 56), align 8, !tbaa !5
  %28 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 567), i64 noundef %27, ptr noundef nonnull %2)
  %.not17.us.7 = icmp eq i32 %28, 0
  br i1 %.not17.us.7, label %29, label %.split24.us.thread

29:                                               ; preds = %.split.us.7
  %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)
  %.not18.us.7 = icmp ne i32 %bcmp.us.7, 0
  %spec.select = zext i1 %.not18.us.7 to i32
  br label %.split24.us.thread

30:                                               ; preds = %.split.preheader
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(20) %2, ptr noundef nonnull dereferenceable(20) @ripemd160_test_md, i64 20)
  %.not18 = icmp eq i32 %bcmp, 0
  br i1 %.not18, label %.split.1, label %.split24.us.thread.sink.split

.split.1:                                         ; preds = %30
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 2)
  %33 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 8), align 8, !tbaa !5
  %34 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 81), i64 noundef %33, ptr noundef nonnull %2)
  %.not17.1 = icmp eq i32 %34, 0
  br i1 %.not17.1, label %35, label %.split24.us.thread.sink.split

35:                                               ; preds = %.split.1
  %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)
  %.not18.1 = icmp eq i32 %bcmp.1, 0
  br i1 %.not18.1, label %.split.2, label %.split24.us.thread.sink.split

.split.2:                                         ; preds = %35
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 3)
  %38 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 16), align 16, !tbaa !5
  %39 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 162), i64 noundef %38, ptr noundef nonnull %2)
  %.not17.2 = icmp eq i32 %39, 0
  br i1 %.not17.2, label %40, label %.split24.us.thread.sink.split

40:                                               ; preds = %.split.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)
  %.not18.2 = icmp eq i32 %bcmp.2, 0
  br i1 %.not18.2, label %.split.3, label %.split24.us.thread.sink.split

.split.3:                                         ; preds = %40
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 4)
  %43 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 24), align 8, !tbaa !5
  %44 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 243), i64 noundef %43, ptr noundef nonnull %2)
  %.not17.3 = icmp eq i32 %44, 0
  br i1 %.not17.3, label %45, label %.split24.us.thread.sink.split

45:                                               ; preds = %.split.3
  %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)
  %.not18.3 = icmp eq i32 %bcmp.3, 0
  br i1 %.not18.3, label %.split.4, label %.split24.us.thread.sink.split

.split.4:                                         ; preds = %45
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 5)
  %48 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 32), align 16, !tbaa !5
  %49 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 324), i64 noundef %48, ptr noundef nonnull %2)
  %.not17.4 = icmp eq i32 %49, 0
  br i1 %.not17.4, label %50, label %.split24.us.thread.sink.split

50:                                               ; preds = %.split.4
  %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)
  %.not18.4 = icmp eq i32 %bcmp.4, 0
  br i1 %.not18.4, label %.split.5, label %.split24.us.thread.sink.split

.split.5:                                         ; preds = %50
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 6)
  %53 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 40), align 8, !tbaa !5
  %54 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 405), i64 noundef %53, ptr noundef nonnull %2)
  %.not17.5 = icmp eq i32 %54, 0
  br i1 %.not17.5, label %55, label %.split24.us.thread.sink.split

55:                                               ; preds = %.split.5
  %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)
  %.not18.5 = icmp eq i32 %bcmp.5, 0
  br i1 %.not18.5, label %.split.6, label %.split24.us.thread.sink.split

.split.6:                                         ; preds = %55
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 7)
  %58 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 48), align 16, !tbaa !5
  %59 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 486), i64 noundef %58, ptr noundef nonnull %2)
  %.not17.6 = icmp eq i32 %59, 0
  br i1 %.not17.6, label %60, label %.split24.us.thread.sink.split

60:                                               ; preds = %.split.6
  %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)
  %.not18.6 = icmp eq i32 %bcmp.6, 0
  br i1 %.not18.6, label %.split.7, label %.split24.us.thread.sink.split

.split.7:                                         ; preds = %60
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 8)
  %63 = load i64, ptr getelementptr inbounds (i8, ptr @ripemd160_test_strlen, i64 56), align 8, !tbaa !5
  %64 = call i32 @mbedtls_ripemd160_ret(ptr noundef nonnull getelementptr inbounds (i8, ptr @ripemd160_test_str, i64 567), i64 noundef %63, ptr noundef nonnull %2)
  %.not17.7 = icmp eq i32 %64, 0
  br i1 %.not17.7, label %65, label %.split24.us.thread.sink.split

65:                                               ; preds = %.split.7
  %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)
  %.not18.7 = icmp eq i32 %bcmp.7, 0
  br i1 %.not18.7, label %66, label %.split24.us.thread.sink.split

66:                                               ; preds = %65
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %.split24.us.thread.sink.split

.split24.us.thread.sink.split:                    ; preds = %.split.preheader, %30, %.split.1, %35, %.split.2, %40, %.split.3, %45, %.split.4, %50, %.split.5, %55, %.split.6, %60, %.split.7, %65, %66
  %.str.3.sink = phi ptr [ @.str.2, %66 ], [ @.str.3, %65 ], [ @.str.3, %.split.7 ], [ @.str.3, %60 ], [ @.str.3, %.split.6 ], [ @.str.3, %55 ], [ @.str.3, %.split.5 ], [ @.str.3, %50 ], [ @.str.3, %.split.4 ], [ @.str.3, %45 ], [ @.str.3, %.split.3 ], [ @.str.3, %40 ], [ @.str.3, %.split.2 ], [ @.str.3, %35 ], [ @.str.3, %.split.1 ], [ @.str.3, %30 ], [ @.str.3, %.split.preheader ]
  %.014.ph = phi i32 [ 0, %66 ], [ 1, %65 ], [ %64, %.split.7 ], [ 1, %60 ], [ %59, %.split.6 ], [ 1, %55 ], [ %54, %.split.5 ], [ 1, %50 ], [ %49, %.split.4 ], [ 1, %45 ], [ %44, %.split.3 ], [ 1, %40 ], [ %39, %.split.2 ], [ 1, %35 ], [ %34, %.split.1 ], [ 1, %30 ], [ %5, %.split.preheader ]
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  br label %.split24.us.thread

.split24.us.thread:                               ; preds = %29, %.split24.us.thread.sink.split, %.split.us.7, %26, %.split.us.6, %23, %.split.us.5, %20, %.split.us.4, %17, %.split.us.3, %14, %.split.us.2, %11, %.split.us.1, %8, %.split.us.preheader
  %.014 = phi i32 [ %28, %.split.us.7 ], [ 1, %26 ], [ %25, %.split.us.6 ], [ 1, %23 ], [ %22, %.split.us.5 ], [ 1, %20 ], [ %19, %.split.us.4 ], [ 1, %17 ], [ %16, %.split.us.3 ], [ 1, %14 ], [ %13, %.split.us.2 ], [ 1, %11 ], [ %10, %.split.us.1 ], [ 1, %8 ], [ %7, %.split.us.preheader ], [ %spec.select, %29 ], [ %.014.ph, %.split24.us.thread.sink.split ]
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %2) #5
  ret i32 %.014
}

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

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

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 = { nofree nounwind willreturn memory(argmem: read) }
attributes #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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