; LLVM IR from aws/s2n-tls :: tests/fuzz (s2n_hybrid_ecdhe_kyber_r3_fuzz_test)

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

@.str = external hidden unnamed_addr constant [118 x 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
@.str.1 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [118 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_fuzz_init_kem_param(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.s2n_result, align 4
  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 = getelementptr inbounds %struct.s2n_kem_params, ptr %8, i32 0, i32 0
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = icmp ne ptr %10, null
  br i1 %11, label %43, label %12

12:                                               ; preds = %7
  br label %13

13:                                               ; preds = %12
  br label %14

14:                                               ; preds = %13
  %15 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %16 = getelementptr inbounds %struct.s2n_debug_info, ptr %15, i32 0, i32 0
  store ptr @.str, ptr %16, align 8, !tbaa !14
  %17 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %18 = getelementptr inbounds %struct.s2n_debug_info, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %19, i64 21
  %21 = call ptr @strrchr(ptr noundef %20, i32 noundef 47) #6
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %30

23:                                               ; preds = %14
  %24 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %25 = getelementptr inbounds %struct.s2n_debug_info, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  %27 = getelementptr inbounds i8, ptr %26, i64 21
  %28 = call ptr @strrchr(ptr noundef %27, i32 noundef 47) #6
  %29 = getelementptr inbounds i8, ptr %28, i64 1
  br label %35

30:                                               ; preds = %14
  %31 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %32 = getelementptr inbounds %struct.s2n_debug_info, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = getelementptr inbounds i8, ptr %33, i64 21
  br label %35

35:                                               ; preds = %30, %23
  %36 = phi ptr [ %29, %23 ], [ %34, %30 ]
  %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 1
  store ptr %36, ptr %38, align 8, !tbaa !16
  %39 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %39, align 4, !tbaa !17
  %40 = call i32 @s2n_calculate_stacktrace()
  br label %41

41:                                               ; preds = %35
  store i32 -1, ptr %2, align 4
  br label %196

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %7
  br label %44

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.s2n_kem_params, ptr %45, i32 0, i32 1
  store ptr %46, ptr %4, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %44
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = call i32 @s2n_alloc(ptr noundef %48, i32 noundef 800)
  %50 = icmp sgt i32 %49, -1
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %195

52:                                               ; preds = %47
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = call i32 @s2n_kem_generate_keypair(ptr noundef %55)
  %57 = getelementptr inbounds %struct.s2n_result, ptr %6, i32 0, i32 0
  store i32 %56, ptr %57, align 4
  br label %58

58:                                               ; preds = %54
  %59 = call zeroext i1 @s2n_pq_is_enabled()
  %60 = zext i1 %59 to i32
  %61 = getelementptr inbounds %struct.s2n_result, ptr %6, i32 0, i32 0
  %62 = load i32, ptr %61, align 4
  %63 = call zeroext i1 @s2n_result_is_ok(i32 %62)
  %64 = zext i1 %63 to i32
  %65 = icmp eq i32 %60, %64
  br i1 %65, label %99, label %66

66:                                               ; preds = %58
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %70 = getelementptr inbounds %struct.s2n_debug_info, ptr %69, i32 0, i32 0
  store ptr @.str.1, ptr %70, align 8, !tbaa !14
  %71 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %72 = getelementptr inbounds %struct.s2n_debug_info, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !14
  %74 = getelementptr inbounds i8, ptr %73, i64 21
  %75 = call ptr @strrchr(ptr noundef %74, i32 noundef 47) #6
  %76 = icmp ne ptr %75, null
  br i1 %76, label %77, label %84

77:                                               ; preds = %68
  %78 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %79 = getelementptr inbounds %struct.s2n_debug_info, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !14
  %81 = getelementptr inbounds i8, ptr %80, i64 21
  %82 = call ptr @strrchr(ptr noundef %81, i32 noundef 47) #6
  %83 = getelementptr inbounds i8, ptr %82, i64 1
  br label %89

84:                                               ; preds = %68
  %85 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %86 = getelementptr inbounds %struct.s2n_debug_info, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !14
  %88 = getelementptr inbounds i8, ptr %87, i64 21
  br label %89

89:                                               ; preds = %84, %77
  %90 = phi ptr [ %83, %77 ], [ %88, %84 ]
  %91 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %92 = getelementptr inbounds %struct.s2n_debug_info, ptr %91, i32 0, i32 1
  store ptr %90, ptr %92, align 8, !tbaa !16
  %93 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %93, align 4, !tbaa !17
  %94 = call i32 @s2n_calculate_stacktrace()
  br label %95

95:                                               ; preds = %89
  br label %96

96:                                               ; preds = %95
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %194

97:                                               ; No predecessors!
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98, %58
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  br label %102

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

108:                                              ; preds = %102
  br label %109

109:                                              ; preds = %108
  br label %110

110:                                              ; preds = %109
  %111 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %112 = getelementptr inbounds %struct.s2n_debug_info, ptr %111, i32 0, i32 0
  store ptr @.str.2, ptr %112, align 8, !tbaa !14
  %113 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %114 = getelementptr inbounds %struct.s2n_debug_info, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !14
  %116 = getelementptr inbounds i8, ptr %115, i64 21
  %117 = call ptr @strrchr(ptr noundef %116, i32 noundef 47) #6
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %126

119:                                              ; preds = %110
  %120 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %121 = getelementptr inbounds %struct.s2n_debug_info, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !14
  %123 = getelementptr inbounds i8, ptr %122, i64 21
  %124 = call ptr @strrchr(ptr noundef %123, i32 noundef 47) #6
  %125 = getelementptr inbounds i8, ptr %124, i64 1
  br label %131

126:                                              ; preds = %110
  %127 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %128 = getelementptr inbounds %struct.s2n_debug_info, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !14
  %130 = getelementptr inbounds i8, ptr %129, i64 21
  br label %131

131:                                              ; preds = %126, %119
  %132 = phi ptr [ %125, %119 ], [ %130, %126 ]
  %133 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %134 = getelementptr inbounds %struct.s2n_debug_info, ptr %133, i32 0, i32 1
  store ptr %132, ptr %134, align 8, !tbaa !16
  %135 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %135, align 4, !tbaa !17
  %136 = call i32 @s2n_calculate_stacktrace()
  br label %137

137:                                              ; preds = %131
  br label %138

138:                                              ; preds = %137
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %194

139:                                              ; No predecessors!
  br label %140

140:                                              ; preds = %139
  br label %141

141:                                              ; preds = %140, %102
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.s2n_kem_params, ptr %145, i32 0, i32 2
  %147 = getelementptr inbounds %struct.s2n_blob, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !19
  %149 = icmp ne ptr %148, null
  br i1 %149, label %183, label %150

150:                                              ; preds = %144
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151
  %153 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %154 = getelementptr inbounds %struct.s2n_debug_info, ptr %153, i32 0, i32 0
  store ptr @.str.3, ptr %154, align 8, !tbaa !14
  %155 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %156 = getelementptr inbounds %struct.s2n_debug_info, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !14
  %158 = getelementptr inbounds i8, ptr %157, i64 21
  %159 = call ptr @strrchr(ptr noundef %158, i32 noundef 47) #6
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %168

161:                                              ; preds = %152
  %162 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %163 = getelementptr inbounds %struct.s2n_debug_info, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !14
  %165 = getelementptr inbounds i8, ptr %164, i64 21
  %166 = call ptr @strrchr(ptr noundef %165, i32 noundef 47) #6
  %167 = getelementptr inbounds i8, ptr %166, i64 1
  br label %173

168:                                              ; preds = %152
  %169 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %170 = getelementptr inbounds %struct.s2n_debug_info, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !14
  %172 = getelementptr inbounds i8, ptr %171, i64 21
  br label %173

173:                                              ; preds = %168, %161
  %174 = phi ptr [ %167, %161 ], [ %172, %168 ]
  %175 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %176 = getelementptr inbounds %struct.s2n_debug_info, ptr %175, i32 0, i32 1
  store ptr %174, ptr %176, align 8, !tbaa !16
  %177 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %177, align 4, !tbaa !17
  %178 = call i32 @s2n_calculate_stacktrace()
  br label %179

179:                                              ; preds = %173
  br label %180

180:                                              ; preds = %179
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %194

181:                                              ; No predecessors!
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182, %144
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184
  br label %186

186:                                              ; preds = %185
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = call i32 @s2n_free(ptr noundef %187)
  %189 = icmp sgt i32 %188, -1
  br i1 %189, label %191, label %190

190:                                              ; preds = %186
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %194

191:                                              ; preds = %186
  br label %192

192:                                              ; preds = %191
  br label %193

193:                                              ; preds = %192
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %194

194:                                              ; preds = %193, %190, %180, %138, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %195

195:                                              ; preds = %194, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %196

196:                                              ; preds = %195, %41
  %197 = load i32, ptr %2, align 4
  ret i32 %197
}

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

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

declare i32 @s2n_calculate_stacktrace() #3

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

declare i32 @s2n_alloc(ptr noundef, i32 noundef) #3

declare i32 @s2n_kem_generate_keypair(ptr noundef) #3

declare zeroext i1 @s2n_pq_is_enabled() #3

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

declare i32 @s2n_free(ptr noundef) #3

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

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


; 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 }

@.str = external hidden unnamed_addr constant [118 x 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
@.str.1 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [118 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_fuzz_init_kem_param(ptr noundef %0) local_unnamed_addr #0 {
  %2 = load ptr, ptr %0, align 8, !tbaa !5
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %3, label %11

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

11:                                               ; preds = %1
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = tail call i32 @s2n_alloc(ptr noundef nonnull %12, i32 noundef 800) #6
  %14 = icmp sgt i32 %13, -1
  br i1 %14, label %15, label %51

15:                                               ; preds = %11
  %16 = tail call i32 @s2n_kem_generate_keypair(ptr noundef nonnull %0) #6
  %17 = tail call zeroext i1 @s2n_pq_is_enabled() #6
  %18 = tail call zeroext i1 @s2n_result_is_ok(i32 %16)
  %19 = xor i1 %17, %18
  br i1 %19, label %20, label %28

20:                                               ; preds = %15
  %21 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.1, ptr %21, align 8, !tbaa !13
  %22 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.1, i64 21), i32 noundef 47) #5
  %.not12 = icmp eq ptr %22, null
  %23 = getelementptr inbounds i8, ptr %22, i64 1
  %24 = select i1 %.not12, ptr getelementptr inbounds (i8, ptr @.str.1, i64 21), ptr %23
  %25 = getelementptr inbounds i8, ptr %21, i64 8
  store ptr %24, ptr %25, align 8, !tbaa !15
  %26 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %26, align 4, !tbaa !16
  %27 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %51

28:                                               ; preds = %15
  %29 = load ptr, ptr %12, align 8, !tbaa !17
  %.not13 = icmp eq ptr %29, null
  br i1 %.not13, label %30, label %38

30:                                               ; preds = %28
  %31 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.2, ptr %31, align 8, !tbaa !13
  %32 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.2, i64 21), i32 noundef 47) #5
  %.not14 = icmp eq ptr %32, null
  %33 = getelementptr inbounds i8, ptr %32, i64 1
  %34 = select i1 %.not14, ptr getelementptr inbounds (i8, ptr @.str.2, i64 21), ptr %33
  %35 = getelementptr inbounds i8, ptr %31, i64 8
  store ptr %34, ptr %35, align 8, !tbaa !15
  %36 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %36, align 4, !tbaa !16
  %37 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %51

38:                                               ; preds = %28
  %39 = getelementptr inbounds i8, ptr %0, i64 32
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %.not15 = icmp eq ptr %40, null
  br i1 %.not15, label %41, label %49

41:                                               ; preds = %38
  %42 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.3, ptr %42, align 8, !tbaa !13
  %43 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.3, i64 21), i32 noundef 47) #5
  %.not16 = icmp eq ptr %43, null
  %44 = getelementptr inbounds i8, ptr %43, i64 1
  %45 = select i1 %.not16, ptr getelementptr inbounds (i8, ptr @.str.3, i64 21), ptr %44
  %46 = getelementptr inbounds i8, ptr %42, i64 8
  store ptr %45, ptr %46, align 8, !tbaa !15
  %47 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %47, align 4, !tbaa !16
  %48 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %51

49:                                               ; preds = %38
  %50 = tail call i32 @s2n_free(ptr noundef nonnull %12) #6
  %.lobit = ashr i32 %50, 31
  br label %51

51:                                               ; preds = %11, %49, %41, %30, %20, %3
  %.2 = phi i32 [ -1, %3 ], [ -1, %11 ], [ -1, %41 ], [ -1, %30 ], [ -1, %20 ], [ %.lobit, %49 ]
  ret i32 %.2
}

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #3

declare i32 @s2n_alloc(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @s2n_kem_generate_keypair(ptr noundef) local_unnamed_addr #3

declare zeroext i1 @s2n_pq_is_enabled() local_unnamed_addr #3

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

declare i32 @s2n_free(ptr noundef) 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 speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = { 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 #5 = { nounwind willreturn memory(read) }
attributes #6 = { 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, !7, i64 0}
!6 = !{!"s2n_kem_params", !7, i64 0, !10, i64 8, !10, i64 32, !10, i64 56, !12, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"s2n_blob", !7, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_Bool", !8, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"s2n_debug_info", !7, i64 0, !7, i64 8}
!15 = !{!14, !7, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !7, i64 8}
!18 = !{!6, !7, i64 32}


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