; LLVM IR from tleonhardt/practical_cryptography_engineering :: mbedtls (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 i32 @mbedtls_ctr_drbg_seed_entropy_len(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 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: nounwind uwtable
declare dso_local i32 @mbedtls_ctr_drbg_reseed(ptr noundef, ptr noundef, i64 noundef) #0

; 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_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 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
  %12 = call i32 @mbedtls_ctr_drbg_seed_entropy_len(ptr noundef %4, ptr noundef @ctr_drbg_self_test_entropy, ptr noundef @entropy_source_pr, ptr noundef @nonce_pers_pr, i64 noundef 16, i64 noundef 32)
  %13 = icmp ne i32 %12, 0
  br i1 %13, label %14, label %20

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

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

19:                                               ; preds = %17, %14
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

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

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

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

29:                                               ; preds = %27, %24
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

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

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

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

39:                                               ; preds = %37, %34
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

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

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

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

49:                                               ; preds = %47, %44
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

50:                                               ; preds = %40
  call void @mbedtls_ctr_drbg_free(ptr noundef %4)
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %55

55:                                               ; preds = %53, %50
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %60

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

60:                                               ; preds = %58, %55
  call void @mbedtls_ctr_drbg_init(ptr noundef %4)
  store i64 0, ptr @test_offset, align 8, !tbaa !9
  %61 = call i32 @mbedtls_ctr_drbg_seed_entropy_len(ptr noundef %4, ptr noundef @ctr_drbg_self_test_entropy, ptr noundef @entropy_source_nopr, ptr noundef @nonce_pers_nopr, i64 noundef 16, i64 noundef 32)
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %69

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

66:                                               ; preds = %63
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %68

68:                                               ; preds = %66, %63
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

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

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

76:                                               ; preds = %73
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %78

78:                                               ; preds = %76, %73
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

79:                                               ; preds = %69
  %80 = call i32 @mbedtls_ctr_drbg_reseed(ptr noundef %4, ptr noundef null, i64 noundef 0)
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %88

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

85:                                               ; preds = %82
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %87

87:                                               ; preds = %85, %82
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

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

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

95:                                               ; preds = %92
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %97

97:                                               ; preds = %95, %92
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

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

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

105:                                              ; preds = %102
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %107

107:                                              ; preds = %105, %102
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

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

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

116:                                              ; preds = %113
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %118

118:                                              ; preds = %116, %113
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %119

119:                                              ; preds = %118, %107, %97, %87, %78, %68, %49, %39, %29, %19
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 344, ptr %4) #4
  %120 = load i32, ptr %2, align 4
  ret i32 %120
}

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 i32 @mbedtls_ctr_drbg_seed_entropy_len(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 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: nounwind uwtable
declare dso_local i32 @mbedtls_ctr_drbg_reseed(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; 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_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 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 %4, label %.thread

4:                                                ; preds = %1
  store i64 0, ptr @test_offset, align 8, !tbaa !5
  %5 = call i32 @mbedtls_ctr_drbg_seed_entropy_len(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, i64 noundef 32)
  %.not15 = icmp eq i32 %5, 0
  br i1 %.not15, label %8, label %.critedge26

.thread:                                          ; preds = %1
  %6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  store i64 0, ptr @test_offset, align 8, !tbaa !5
  %7 = call i32 @mbedtls_ctr_drbg_seed_entropy_len(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, i64 noundef 32)
  %.not1527 = icmp eq i32 %7, 0
  br i1 %.not1527, label %8, label %.critedge26.sink.split

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

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

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

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

14:                                               ; preds = %11
  %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 %16, label %15

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

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

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

.critedge:                                        ; preds = %16, %17
  call void @mbedtls_ctr_drbg_init(ptr noundef nonnull %2)
  store i64 0, ptr @test_offset, align 8, !tbaa !5
  %20 = call i32 @mbedtls_ctr_drbg_seed_entropy_len(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, i64 noundef 32)
  %.not19 = icmp eq i32 %20, 0
  br i1 %.not19, label %22, label %21

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

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

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

25:                                               ; preds = %22
  %26 = call i32 @mbedtls_ctr_drbg_reseed(ptr noundef nonnull %2, ptr noundef null, i64 noundef 0)
  %.not21 = icmp eq i32 %26, 0
  br i1 %.not21, 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_random(ptr noundef nonnull %2, ptr noundef nonnull %3, i64 noundef 16)
  %.not22 = icmp eq i32 %29, 0
  br i1 %.not22, label %31, label %30

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

31:                                               ; preds = %28
  %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 %33, label %32

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

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

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

.critedge26.sink.split:                           ; preds = %32, %30, %27, %24, %21, %15, %13, %10, %.thread, %34
  %.str.6.sink = phi ptr [ @.str.6, %34 ], [ @.str.3, %.thread ], [ @.str.3, %10 ], [ @.str.3, %13 ], [ @.str.3, %15 ], [ @.str.3, %21 ], [ @.str.3, %24 ], [ @.str.3, %27 ], [ @.str.3, %30 ], [ @.str.3, %32 ]
  %.0.ph = phi i32 [ 0, %34 ], [ 1, %.thread ], [ 1, %10 ], [ 1, %13 ], [ 1, %15 ], [ 1, %21 ], [ 1, %24 ], [ 1, %27 ], [ 1, %30 ], [ 1, %32 ]
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.6.sink)
  br label %.critedge26

.critedge26:                                      ; preds = %.critedge26.sink.split, %4, %33, %32, %30, %27, %24, %21, %15, %13, %10
  %.0 = phi i32 [ 1, %10 ], [ 1, %13 ], [ 1, %15 ], [ 1, %21 ], [ 1, %24 ], [ 1, %27 ], [ 1, %30 ], [ 1, %32 ], [ 0, %33 ], [ 1, %4 ], [ %.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,JumpThreadingPass,SROAPass,SimplifyCFGPass