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

; 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_ctr_drbg_context = type { [16 x i8], i32, i32, i64, i32, %struct.mbedtls_aes_context, ptr, ptr }
%struct.mbedtls_aes_context = type { i32, ptr, [68 x i32] }

@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@test_offset = external hidden global i64, align 8
@entropy_source_pr = external hidden constant [96 x i8], align 16
@nonce_pers_pr = external hidden constant [16 x i8], align 16
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@result_pr = external hidden constant [16 x i8], align 16
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@entropy_source_nopr = external hidden constant [64 x i8], align 16
@nonce_pers_nopr = external hidden constant [16 x i8], align 16
@result_nopr = external hidden constant [16 x i8], align 16
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_ctr_drbg_set_nonce_len(ptr noundef, i64 noundef) #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_ctr_drbg_reseed(ptr noundef, ptr noundef, i64 noundef) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_ctr_drbg_self_test(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.mbedtls_ctr_drbg_context, align 8
  %5 = alloca [16 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 344, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #4
  call void @mbedtls_ctr_drbg_init(ptr noundef %4)
  %7 = load i32, ptr %3, align 4, !tbaa !5
  %8 = icmp ne i32 %7, 0
  br i1 %8, label %9, label %11

9:                                                ; preds = %1
  %10 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %11

11:                                               ; preds = %9, %1
  store i64 0, ptr @test_offset, align 8, !tbaa !9
  call void @mbedtls_ctr_drbg_set_entropy_len(ptr noundef %4, i64 noundef 32)
  %12 = call i32 @mbedtls_ctr_drbg_set_nonce_len(ptr noundef %4, i64 noundef 0)
  %13 = call i32 @mbedtls_ctr_drbg_seed(ptr noundef %4, ptr noundef @ctr_drbg_self_test_entropy, ptr noundef @entropy_source_pr, ptr noundef @nonce_pers_pr, i64 noundef 16)
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %21

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

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

20:                                               ; preds = %18, %15
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

21:                                               ; preds = %11
  call void @mbedtls_ctr_drbg_set_prediction_resistance(ptr noundef %4, i32 noundef 1)
  %22 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  %23 = call i32 @mbedtls_ctr_drbg_random(ptr noundef %4, ptr noundef %22, i64 noundef 16)
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %31

25:                                               ; preds = %21
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %30

28:                                               ; preds = %25
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %30

30:                                               ; preds = %28, %25
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

31:                                               ; preds = %21
  %32 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  %33 = call i32 @mbedtls_ctr_drbg_random(ptr noundef %4, ptr noundef %32, i64 noundef 16)
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %41

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

38:                                               ; preds = %35
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %40

40:                                               ; preds = %38, %35
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

41:                                               ; preds = %31
  %42 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  %43 = call i32 @memcmp(ptr noundef %42, ptr noundef @result_pr, i64 noundef 16) #5
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %51

45:                                               ; preds = %41
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %50

48:                                               ; preds = %45
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %50

50:                                               ; preds = %48, %45
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

51:                                               ; preds = %41
  call void @mbedtls_ctr_drbg_free(ptr noundef %4)
  %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.4)
  br label %56

56:                                               ; preds = %54, %51
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %61

61:                                               ; preds = %59, %56
  call void @mbedtls_ctr_drbg_init(ptr noundef %4)
  store i64 0, ptr @test_offset, align 8, !tbaa !9
  call void @mbedtls_ctr_drbg_set_entropy_len(ptr noundef %4, i64 noundef 32)
  %62 = call i32 @mbedtls_ctr_drbg_set_nonce_len(ptr noundef %4, i64 noundef 0)
  %63 = call i32 @mbedtls_ctr_drbg_seed(ptr noundef %4, ptr noundef @ctr_drbg_self_test_entropy, ptr noundef @entropy_source_nopr, ptr noundef @nonce_pers_nopr, i64 noundef 16)
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %71

65:                                               ; preds = %61
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %65
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %70

70:                                               ; preds = %68, %65
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

71:                                               ; preds = %61
  %72 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  %73 = call i32 @mbedtls_ctr_drbg_random(ptr noundef %4, ptr noundef %72, i64 noundef 16)
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %81

75:                                               ; preds = %71
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %80

78:                                               ; preds = %75
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %80

80:                                               ; preds = %78, %75
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

81:                                               ; preds = %71
  %82 = call i32 @mbedtls_ctr_drbg_reseed(ptr noundef %4, ptr noundef null, i64 noundef 0)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %90

84:                                               ; preds = %81
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %89

87:                                               ; preds = %84
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %89

89:                                               ; preds = %87, %84
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

90:                                               ; preds = %81
  %91 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  %92 = call i32 @mbedtls_ctr_drbg_random(ptr noundef %4, ptr noundef %91, i64 noundef 16)
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %100

94:                                               ; preds = %90
  %95 = load i32, ptr %3, align 4, !tbaa !5
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %99

97:                                               ; preds = %94
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %99

99:                                               ; preds = %97, %94
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

100:                                              ; preds = %90
  %101 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  %102 = call i32 @memcmp(ptr noundef %101, ptr noundef @result_nopr, i64 noundef 16) #5
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %110

104:                                              ; preds = %100
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %109

107:                                              ; preds = %104
  %108 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %109

109:                                              ; preds = %107, %104
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

110:                                              ; preds = %100
  call void @mbedtls_ctr_drbg_free(ptr noundef %4)
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %115

113:                                              ; preds = %110
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %115

115:                                              ; preds = %113, %110
  %116 = load i32, ptr %3, align 4, !tbaa !5
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %120

118:                                              ; preds = %115
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %120

120:                                              ; preds = %118, %115
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %121

121:                                              ; preds = %120, %109, %99, %89, %80, %70, %50, %40, %30, %20
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 344, ptr %4) #4
  %122 = load i32, ptr %2, align 4
  ret i32 %122
}

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

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

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

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 = { 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 #4 = { nounwind }
attributes #5 = { 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}


; 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_ctr_drbg_context = type { [16 x i8], i32, i32, i64, i32, %struct.mbedtls_aes_context, ptr, ptr }
%struct.mbedtls_aes_context = type { i32, ptr, [68 x i32] }

@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@test_offset = external hidden local_unnamed_addr global i64, align 8
@entropy_source_pr = external hidden constant [96 x i8], align 16
@nonce_pers_pr = external hidden constant [16 x i8], align 16
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@result_pr = external hidden constant [16 x i8], align 16
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@entropy_source_nopr = external hidden constant [64 x i8], align 16
@nonce_pers_nopr = external hidden constant [16 x i8], align 16
@result_nopr = external hidden constant [16 x i8], align 16
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_ctr_drbg_set_nonce_len(ptr noundef, i64 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) #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_ctr_drbg_reseed(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @mbedtls_ctr_drbg_self_test(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca %struct.mbedtls_ctr_drbg_context, align 8
  %3 = alloca [16 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 344, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  call void @mbedtls_ctr_drbg_init(ptr noundef nonnull %2)
  %.not = icmp eq i32 %0, 0
  br i1 %.not, label %6, label %4

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

6:                                                ; preds = %4, %1
  store i64 0, ptr @test_offset, align 8, !tbaa !5
  call void @mbedtls_ctr_drbg_set_entropy_len(ptr noundef nonnull %2, i64 noundef 32)
  %7 = call i32 @mbedtls_ctr_drbg_set_nonce_len(ptr noundef nonnull %2, i64 noundef 0)
  %8 = call i32 @mbedtls_ctr_drbg_seed(ptr noundef nonnull %2, ptr noundef nonnull @ctr_drbg_self_test_entropy, ptr noundef nonnull @entropy_source_pr, ptr noundef nonnull @nonce_pers_pr, i64 noundef 16)
  %.not15 = icmp eq i32 %8, 0
  br i1 %.not15, label %10, label %9

9:                                                ; preds = %6
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

10:                                               ; preds = %6
  call void @mbedtls_ctr_drbg_set_prediction_resistance(ptr noundef nonnull %2, i32 noundef 1)
  %11 = call i32 @mbedtls_ctr_drbg_random(ptr noundef nonnull %2, ptr noundef nonnull %3, i64 noundef 16)
  %.not16 = icmp eq i32 %11, 0
  br i1 %.not16, label %13, label %12

12:                                               ; preds = %10
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

13:                                               ; preds = %10
  %14 = call i32 @mbedtls_ctr_drbg_random(ptr noundef nonnull %2, ptr noundef nonnull %3, i64 noundef 16)
  %.not17 = icmp eq i32 %14, 0
  br i1 %.not17, label %16, label %15

15:                                               ; preds = %13
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

16:                                               ; preds = %13
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %3, ptr noundef nonnull dereferenceable(16) @result_pr, i64 16)
  %.not18 = icmp eq i32 %bcmp, 0
  br i1 %.not18, label %18, label %17

17:                                               ; preds = %16
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

18:                                               ; preds = %16
  call void @mbedtls_ctr_drbg_free(ptr noundef nonnull %2)
  br i1 %.not, label %.critedge, label %19

19:                                               ; preds = %18
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.critedge

.critedge:                                        ; preds = %18, %19
  call void @mbedtls_ctr_drbg_init(ptr noundef nonnull %2)
  store i64 0, ptr @test_offset, align 8, !tbaa !5
  call void @mbedtls_ctr_drbg_set_entropy_len(ptr noundef nonnull %2, i64 noundef 32)
  %22 = call i32 @mbedtls_ctr_drbg_set_nonce_len(ptr noundef nonnull %2, i64 noundef 0)
  %23 = call i32 @mbedtls_ctr_drbg_seed(ptr noundef nonnull %2, ptr noundef nonnull @ctr_drbg_self_test_entropy, ptr noundef nonnull @entropy_source_nopr, ptr noundef nonnull @nonce_pers_nopr, i64 noundef 16)
  %.not19 = icmp eq i32 %23, 0
  br i1 %.not19, label %25, label %24

24:                                               ; preds = %.critedge
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

25:                                               ; preds = %.critedge
  %26 = call i32 @mbedtls_ctr_drbg_random(ptr noundef nonnull %2, ptr noundef nonnull %3, i64 noundef 16)
  %.not20 = icmp eq i32 %26, 0
  br i1 %.not20, label %28, label %27

27:                                               ; preds = %25
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

28:                                               ; preds = %25
  %29 = call i32 @mbedtls_ctr_drbg_reseed(ptr noundef nonnull %2, ptr noundef null, i64 noundef 0)
  %.not21 = icmp eq i32 %29, 0
  br i1 %.not21, label %31, label %30

30:                                               ; preds = %28
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

31:                                               ; preds = %28
  %32 = call i32 @mbedtls_ctr_drbg_random(ptr noundef nonnull %2, ptr noundef nonnull %3, i64 noundef 16)
  %.not22 = icmp eq i32 %32, 0
  br i1 %.not22, label %34, label %33

33:                                               ; preds = %31
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

34:                                               ; preds = %31
  %bcmp23 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %3, ptr noundef nonnull dereferenceable(16) @result_nopr, i64 16)
  %.not24 = icmp eq i32 %bcmp23, 0
  br i1 %.not24, label %36, label %35

35:                                               ; preds = %34
  br i1 %.not, label %.critedge26, label %.critedge26.sink.split

36:                                               ; preds = %34
  call void @mbedtls_ctr_drbg_free(ptr noundef nonnull %2)
  br i1 %.not, label %.critedge26, label %37

37:                                               ; preds = %36
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %.critedge26.sink.split

.critedge26.sink.split:                           ; preds = %35, %33, %30, %27, %24, %17, %15, %12, %9, %37
  %.str.6.sink = phi ptr [ @.str.6, %37 ], [ @.str.3, %9 ], [ @.str.3, %12 ], [ @.str.3, %15 ], [ @.str.3, %17 ], [ @.str.3, %24 ], [ @.str.3, %27 ], [ @.str.3, %30 ], [ @.str.3, %33 ], [ @.str.3, %35 ]
  %.0.ph = phi i32 [ 0, %37 ], [ 1, %9 ], [ 1, %12 ], [ 1, %15 ], [ 1, %17 ], [ 1, %24 ], [ 1, %27 ], [ 1, %30 ], [ 1, %33 ], [ 1, %35 ]
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.6.sink)
  br label %.critedge26

.critedge26:                                      ; preds = %.critedge26.sink.split, %36, %35, %33, %30, %27, %24, %17, %15, %12, %9
  %.0 = phi i32 [ 1, %9 ], [ 1, %12 ], [ 1, %15 ], [ 1, %17 ], [ 1, %24 ], [ 1, %27 ], [ 1, %30 ], [ 1, %33 ], [ 1, %35 ], [ 0, %36 ], [ %.0.ph, %.critedge26.sink.split ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 344, ptr nonnull %2) #4
  ret i32 %.0
}

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass