; LLVM IR from aws/s2n-tls :: utils (s2n_mem)

; 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.s2n_debug_info = type { ptr, ptr }
%struct.s2n_result = type { i32 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }

@initialized = external hidden global i8, align 1
@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@s2n_mem_free_cb = external hidden global ptr, align 8
@.str.30 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [86 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strrchr(ptr noundef, i32 noundef) #1

declare i32 @s2n_calculate_stacktrace() #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @s2n_blob_is_growable(ptr noundef) #6

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #7

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_free_without_wipe(ptr noundef %0) #6 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %struct.s2n_result, align 4
  %5 = alloca %struct.s2n_result, align 4
  %6 = alloca %struct.s2n_blob, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  br label %7

7:                                                ; preds = %1
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = call i32 @s2n_blob_validate(ptr noundef %8)
  %10 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 %9, ptr %10, align 4
  %11 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  %12 = load i32, ptr %11, align 4
  %13 = call zeroext i1 @s2n_result_is_ok(i32 %12)
  %14 = xor i1 %13, true
  %15 = xor i1 %14, true
  %16 = zext i1 %15 to i32
  %17 = sext i32 %16 to i64
  %18 = call i64 @llvm.expect.i64(i64 %17, i64 1)
  %19 = icmp ne i64 %18, 0
  br i1 %19, label %20, label %22

20:                                               ; preds = %7
  %21 = getelementptr inbounds %struct.s2n_result, ptr %4, i32 0, i32 0
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %24

22:                                               ; preds = %7
  %23 = getelementptr inbounds %struct.s2n_result, ptr %4, i32 0, i32 0
  store i32 -1, ptr %23, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %22, %20
  %25 = getelementptr inbounds %struct.s2n_result, ptr %4, i32 0, i32 0
  %26 = load i32, ptr %25, align 4
  %27 = call zeroext i1 @s2n_result_is_ok(i32 %26)
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  store i32 -1, ptr %2, align 4
  br label %157

29:                                               ; preds = %24
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load i8, ptr @initialized, align 1, !tbaa !12, !range !14, !noundef !15
  %33 = trunc i8 %32 to i1
  br i1 %33, label %65, label %34

34:                                               ; preds = %31
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %38 = getelementptr inbounds %struct.s2n_debug_info, ptr %37, i32 0, i32 0
  store ptr @.str.30, ptr %38, align 8, !tbaa !16
  %39 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %40 = getelementptr inbounds %struct.s2n_debug_info, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %41, i64 21
  %43 = call ptr @strrchr(ptr noundef %42, i32 noundef 47) #8
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %52

45:                                               ; preds = %36
  %46 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %47 = getelementptr inbounds %struct.s2n_debug_info, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = getelementptr inbounds i8, ptr %48, i64 21
  %50 = call ptr @strrchr(ptr noundef %49, i32 noundef 47) #8
  %51 = getelementptr inbounds i8, ptr %50, i64 1
  br label %57

52:                                               ; preds = %36
  %53 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %54 = getelementptr inbounds %struct.s2n_debug_info, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = getelementptr inbounds i8, ptr %55, i64 21
  br label %57

57:                                               ; preds = %52, %45
  %58 = phi ptr [ %51, %45 ], [ %56, %52 ]
  %59 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %60 = getelementptr inbounds %struct.s2n_debug_info, ptr %59, i32 0, i32 1
  store ptr %58, ptr %60, align 8, !tbaa !18
  %61 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653196, ptr %61, align 4, !tbaa !19
  %62 = call i32 @s2n_calculate_stacktrace()
  br label %63

63:                                               ; preds = %57
  store i32 -1, ptr %2, align 4
  br label %157

64:                                               ; No predecessors!
  br label %65

65:                                               ; preds = %64, %31
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = call zeroext i1 @s2n_blob_is_growable(ptr noundef %68)
  br i1 %69, label %101, label %70

70:                                               ; preds = %67
  br label %71

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %71
  %73 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %74 = getelementptr inbounds %struct.s2n_debug_info, ptr %73, i32 0, i32 0
  store ptr @.str.31, ptr %74, align 8, !tbaa !16
  %75 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %76 = getelementptr inbounds %struct.s2n_debug_info, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = getelementptr inbounds i8, ptr %77, i64 21
  %79 = call ptr @strrchr(ptr noundef %78, i32 noundef 47) #8
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %88

81:                                               ; preds = %72
  %82 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %83 = getelementptr inbounds %struct.s2n_debug_info, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !16
  %85 = getelementptr inbounds i8, ptr %84, i64 21
  %86 = call ptr @strrchr(ptr noundef %85, i32 noundef 47) #8
  %87 = getelementptr inbounds i8, ptr %86, i64 1
  br label %93

88:                                               ; preds = %72
  %89 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %90 = getelementptr inbounds %struct.s2n_debug_info, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !16
  %92 = getelementptr inbounds i8, ptr %91, i64 21
  br label %93

93:                                               ; preds = %88, %81
  %94 = phi ptr [ %87, %81 ], [ %92, %88 ]
  %95 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %96 = getelementptr inbounds %struct.s2n_debug_info, ptr %95, i32 0, i32 1
  store ptr %94, ptr %96, align 8, !tbaa !18
  %97 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653253, ptr %97, align 4, !tbaa !19
  %98 = call i32 @s2n_calculate_stacktrace()
  br label %99

99:                                               ; preds = %93
  store i32 -1, ptr %2, align 4
  br label %157

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %67
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.s2n_blob, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !20
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %151

107:                                              ; preds = %102
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr @s2n_mem_free_cb, align 8, !tbaa !5
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.s2n_blob, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !20
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.s2n_blob, ptr %113, i32 0, i32 2
  %115 = load i32, ptr %114, align 4, !tbaa !22
  %116 = call i32 %109(ptr noundef %112, i32 noundef %115)
  %117 = icmp sge i32 %116, 0
  br i1 %117, label %149, label %118

118:                                              ; preds = %108
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119
  %121 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %122 = getelementptr inbounds %struct.s2n_debug_info, ptr %121, i32 0, i32 0
  store ptr @.str.32, ptr %122, align 8, !tbaa !16
  %123 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %124 = getelementptr inbounds %struct.s2n_debug_info, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !16
  %126 = getelementptr inbounds i8, ptr %125, i64 21
  %127 = call ptr @strrchr(ptr noundef %126, i32 noundef 47) #8
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %136

129:                                              ; preds = %120
  %130 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %131 = getelementptr inbounds %struct.s2n_debug_info, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !16
  %133 = getelementptr inbounds i8, ptr %132, i64 21
  %134 = call ptr @strrchr(ptr noundef %133, i32 noundef 47) #8
  %135 = getelementptr inbounds i8, ptr %134, i64 1
  br label %141

136:                                              ; preds = %120
  %137 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %138 = getelementptr inbounds %struct.s2n_debug_info, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !16
  %140 = getelementptr inbounds i8, ptr %139, i64 21
  br label %141

141:                                              ; preds = %136, %129
  %142 = phi ptr [ %135, %129 ], [ %140, %136 ]
  %143 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %144 = getelementptr inbounds %struct.s2n_debug_info, ptr %143, i32 0, i32 1
  store ptr %142, ptr %144, align 8, !tbaa !18
  %145 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544386, ptr %145, align 4, !tbaa !19
  %146 = call i32 @s2n_calculate_stacktrace()
  br label %147

147:                                              ; preds = %141
  store i32 -1, ptr %2, align 4
  br label %157

148:                                              ; No predecessors!
  br label %149

149:                                              ; preds = %148, %108
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150, %102
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 24, i1 false)
  %153 = getelementptr inbounds %struct.s2n_blob, ptr %6, i32 0, i32 0
  %154 = getelementptr inbounds %struct.s2n_blob, ptr %6, i32 0, i32 1
  %155 = getelementptr inbounds %struct.s2n_blob, ptr %6, i32 0, i32 2
  %156 = getelementptr inbounds %struct.s2n_blob, ptr %6, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %152, ptr align 8 %6, i64 24, i1 false), !tbaa.struct !23
  store i32 0, ptr %2, align 4
  br label %157

157:                                              ; preds = %151, %147, %99, %63, %28
  %158 = load i32, ptr %2, align 4
  ret i32 %158
}

declare i32 @s2n_blob_validate(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #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 = { inlinehint 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #8 = { 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"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !6, i64 0}
!17 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = !{!11, !11, i64 0}
!20 = !{!21, !6, i64 0}
!21 = !{!"s2n_blob", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!22 = !{!21, !11, i64 12}
!23 = !{i64 0, i64 8, !5, i64 8, i64 4, !19, i64 12, i64 4, !19, i64 16, i64 1, !24}
!24 = !{!7, !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.s2n_debug_info = type { ptr, ptr }

@initialized = external hidden local_unnamed_addr global i8, align 1
@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@s2n_mem_free_cb = external hidden local_unnamed_addr global ptr, align 8
@.str.30 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [86 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strrchr(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @s2n_blob_is_growable(ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_free_without_wipe(ptr noundef %0) local_unnamed_addr #5 {
  %2 = tail call i32 @s2n_blob_validate(ptr noundef %0) #6
  %3 = tail call zeroext i1 @s2n_result_is_ok(i32 %2)
  %not. = xor i1 %3, true
  %. = sext i1 %not. to i32
  %4 = tail call zeroext i1 @s2n_result_is_ok(i32 %.)
  br i1 %4, label %5, label %43

5:                                                ; preds = %1
  %6 = load i8, ptr @initialized, align 1, !tbaa !5, !range !9, !noundef !10
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %16, label %8

8:                                                ; preds = %5
  %9 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.30, ptr %9, align 8, !tbaa !11
  %10 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.30, i64 21), i32 noundef 47) #7
  %.not = icmp eq ptr %10, null
  %11 = getelementptr inbounds i8, ptr %10, i64 1
  %12 = select i1 %.not, ptr getelementptr inbounds (i8, ptr @.str.30, i64 21), ptr %11
  %13 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %12, ptr %13, align 8, !tbaa !14
  %14 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653196, ptr %14, align 4, !tbaa !15
  %15 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %43

16:                                               ; preds = %5
  %17 = tail call zeroext i1 @s2n_blob_is_growable(ptr noundef %0)
  br i1 %17, label %26, label %18

18:                                               ; preds = %16
  %19 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.31, ptr %19, align 8, !tbaa !11
  %20 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.31, i64 21), i32 noundef 47) #7
  %.not11 = icmp eq ptr %20, null
  %21 = getelementptr inbounds i8, ptr %20, i64 1
  %22 = select i1 %.not11, ptr getelementptr inbounds (i8, ptr @.str.31, i64 21), ptr %21
  %23 = getelementptr inbounds i8, ptr %19, i64 8
  store ptr %22, ptr %23, align 8, !tbaa !14
  %24 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653253, ptr %24, align 4, !tbaa !15
  %25 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %43

26:                                               ; preds = %16
  %27 = load ptr, ptr %0, align 8, !tbaa !17
  %.not12 = icmp eq ptr %27, null
  br i1 %.not12, label %42, label %28

28:                                               ; preds = %26
  %29 = load ptr, ptr @s2n_mem_free_cb, align 8, !tbaa !19
  %30 = getelementptr inbounds i8, ptr %0, i64 12
  %31 = load i32, ptr %30, align 4, !tbaa !20
  %32 = tail call i32 %29(ptr noundef nonnull %27, i32 noundef %31) #6
  %33 = icmp sgt i32 %32, -1
  br i1 %33, label %42, label %34

34:                                               ; preds = %28
  %35 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.32, ptr %35, align 8, !tbaa !11
  %36 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.32, i64 21), i32 noundef 47) #7
  %.not13 = icmp eq ptr %36, null
  %37 = getelementptr inbounds i8, ptr %36, i64 1
  %38 = select i1 %.not13, ptr getelementptr inbounds (i8, ptr @.str.32, i64 21), ptr %37
  %39 = getelementptr inbounds i8, ptr %35, i64 8
  store ptr %38, ptr %39, align 8, !tbaa !14
  %40 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544386, ptr %40, align 4, !tbaa !15
  %41 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %43

42:                                               ; preds = %28, %26
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  br label %43

43:                                               ; preds = %1, %42, %34, %18, %8
  %.0 = phi i32 [ 0, %42 ], [ -1, %34 ], [ -1, %18 ], [ -1, %8 ], [ -1, %1 ]
  ret i32 %.0
}

declare i32 @s2n_blob_validate(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #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 = { inlinehint 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #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 = !{!"_Bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !13, i64 0}
!12 = !{!"s2n_debug_info", !13, i64 0, !13, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !13, i64 0}
!18 = !{!"s2n_blob", !13, i64 0, !16, i64 8, !16, i64 12, !16, i64 16}
!19 = !{!13, !13, i64 0}
!20 = !{!18, !16, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass