; LLVM IR from aws/s2n-tls :: crypto (s2n_hkdf)

; 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_hkdf_impl = type { ptr, ptr, ptr }

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_hkdf_extract(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %5
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %48, label %17

17:                                               ; preds = %14
  br label %18

18:                                               ; preds = %17
  br label %19

19:                                               ; preds = %18
  %20 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %21 = getelementptr inbounds %struct.s2n_debug_info, ptr %20, i32 0, i32 0
  store ptr @.str, ptr %21, align 8, !tbaa !11
  %22 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %23 = getelementptr inbounds %struct.s2n_debug_info, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %24, i64 21
  %26 = call ptr @strrchr(ptr noundef %25, i32 noundef 47) #5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %35

28:                                               ; preds = %19
  %29 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %30 = getelementptr inbounds %struct.s2n_debug_info, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = getelementptr inbounds i8, ptr %31, i64 21
  %33 = call ptr @strrchr(ptr noundef %32, i32 noundef 47) #5
  %34 = getelementptr inbounds i8, ptr %33, i64 1
  br label %40

35:                                               ; preds = %19
  %36 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %37 = getelementptr inbounds %struct.s2n_debug_info, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds i8, ptr %38, i64 21
  br label %40

40:                                               ; preds = %35, %28
  %41 = phi ptr [ %34, %28 ], [ %39, %35 ]
  %42 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %43 = getelementptr inbounds %struct.s2n_debug_info, ptr %42, i32 0, i32 1
  store ptr %41, ptr %43, align 8, !tbaa !13
  %44 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %44, align 4, !tbaa !9
  %45 = call i32 @s2n_calculate_stacktrace()
  br label %46

46:                                               ; preds = %40
  store i32 -1, ptr %6, align 4
  br label %214

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %14
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %84, label %53

53:                                               ; preds = %50
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54
  %56 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %57 = getelementptr inbounds %struct.s2n_debug_info, ptr %56, i32 0, i32 0
  store ptr @.str.1, ptr %57, align 8, !tbaa !11
  %58 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %59 = getelementptr inbounds %struct.s2n_debug_info, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds i8, ptr %60, i64 21
  %62 = call ptr @strrchr(ptr noundef %61, i32 noundef 47) #5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %71

64:                                               ; preds = %55
  %65 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %66 = getelementptr inbounds %struct.s2n_debug_info, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds i8, ptr %67, i64 21
  %69 = call ptr @strrchr(ptr noundef %68, i32 noundef 47) #5
  %70 = getelementptr inbounds i8, ptr %69, i64 1
  br label %76

71:                                               ; preds = %55
  %72 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %73 = getelementptr inbounds %struct.s2n_debug_info, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !11
  %75 = getelementptr inbounds i8, ptr %74, i64 21
  br label %76

76:                                               ; preds = %71, %64
  %77 = phi ptr [ %70, %64 ], [ %75, %71 ]
  %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 1
  store ptr %77, ptr %79, align 8, !tbaa !13
  %80 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %80, align 4, !tbaa !9
  %81 = call i32 @s2n_calculate_stacktrace()
  br label %82

82:                                               ; preds = %76
  store i32 -1, ptr %6, align 4
  br label %214

83:                                               ; No predecessors!
  br label %84

84:                                               ; preds = %83, %50
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = icmp ne ptr %87, null
  br i1 %88, label %120, label %89

89:                                               ; preds = %86
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  %92 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %93 = getelementptr inbounds %struct.s2n_debug_info, ptr %92, i32 0, i32 0
  store ptr @.str.2, ptr %93, align 8, !tbaa !11
  %94 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %95 = getelementptr inbounds %struct.s2n_debug_info, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !11
  %97 = getelementptr inbounds i8, ptr %96, i64 21
  %98 = call ptr @strrchr(ptr noundef %97, i32 noundef 47) #5
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %107

100:                                              ; preds = %91
  %101 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %102 = getelementptr inbounds %struct.s2n_debug_info, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds i8, ptr %103, i64 21
  %105 = call ptr @strrchr(ptr noundef %104, i32 noundef 47) #5
  %106 = getelementptr inbounds i8, ptr %105, i64 1
  br label %112

107:                                              ; preds = %91
  %108 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %109 = getelementptr inbounds %struct.s2n_debug_info, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  %111 = getelementptr inbounds i8, ptr %110, i64 21
  br label %112

112:                                              ; preds = %107, %100
  %113 = phi ptr [ %106, %100 ], [ %111, %107 ]
  %114 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %115 = getelementptr inbounds %struct.s2n_debug_info, ptr %114, i32 0, i32 1
  store ptr %113, ptr %115, align 8, !tbaa !13
  %116 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %116, align 4, !tbaa !9
  %117 = call i32 @s2n_calculate_stacktrace()
  br label %118

118:                                              ; preds = %112
  store i32 -1, ptr %6, align 4
  br label %214

119:                                              ; No predecessors!
  br label %120

120:                                              ; preds = %119, %86
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = icmp ne ptr %123, null
  br i1 %124, label %156, label %125

125:                                              ; preds = %122
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  %128 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %129 = getelementptr inbounds %struct.s2n_debug_info, ptr %128, i32 0, i32 0
  store ptr @.str.3, ptr %129, align 8, !tbaa !11
  %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 !11
  %133 = getelementptr inbounds i8, ptr %132, i64 21
  %134 = call ptr @strrchr(ptr noundef %133, i32 noundef 47) #5
  %135 = icmp ne ptr %134, null
  br i1 %135, label %136, label %143

136:                                              ; preds = %127
  %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 !11
  %140 = getelementptr inbounds i8, ptr %139, i64 21
  %141 = call ptr @strrchr(ptr noundef %140, i32 noundef 47) #5
  %142 = getelementptr inbounds i8, ptr %141, i64 1
  br label %148

143:                                              ; preds = %127
  %144 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %145 = getelementptr inbounds %struct.s2n_debug_info, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !11
  %147 = getelementptr inbounds i8, ptr %146, i64 21
  br label %148

148:                                              ; preds = %143, %136
  %149 = phi ptr [ %142, %136 ], [ %147, %143 ]
  %150 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %151 = getelementptr inbounds %struct.s2n_debug_info, ptr %150, i32 0, i32 1
  store ptr %149, ptr %151, align 8, !tbaa !13
  %152 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %152, align 4, !tbaa !9
  %153 = call i32 @s2n_calculate_stacktrace()
  br label %154

154:                                              ; preds = %148
  store i32 -1, ptr %6, align 4
  br label %214

155:                                              ; No predecessors!
  br label %156

156:                                              ; preds = %155, %122
  br label %157

157:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %158 = call ptr @s2n_get_hkdf_implementation()
  store ptr %158, ptr %12, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %157
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = icmp ne ptr %160, null
  br i1 %161, label %195, label %162

162:                                              ; preds = %159
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  %165 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %166 = getelementptr inbounds %struct.s2n_debug_info, ptr %165, i32 0, i32 0
  store ptr @.str.4, ptr %166, align 8, !tbaa !11
  %167 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %168 = getelementptr inbounds %struct.s2n_debug_info, ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !11
  %170 = getelementptr inbounds i8, ptr %169, i64 21
  %171 = call ptr @strrchr(ptr noundef %170, i32 noundef 47) #5
  %172 = icmp ne ptr %171, null
  br i1 %172, label %173, label %180

173:                                              ; preds = %164
  %174 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %175 = getelementptr inbounds %struct.s2n_debug_info, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !11
  %177 = getelementptr inbounds i8, ptr %176, i64 21
  %178 = call ptr @strrchr(ptr noundef %177, i32 noundef 47) #5
  %179 = getelementptr inbounds i8, ptr %178, i64 1
  br label %185

180:                                              ; preds = %164
  %181 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %182 = getelementptr inbounds %struct.s2n_debug_info, ptr %181, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !11
  %184 = getelementptr inbounds i8, ptr %183, i64 21
  br label %185

185:                                              ; preds = %180, %173
  %186 = phi ptr [ %179, %173 ], [ %184, %180 ]
  %187 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %188 = getelementptr inbounds %struct.s2n_debug_info, ptr %187, i32 0, i32 1
  store ptr %186, ptr %188, align 8, !tbaa !13
  %189 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %189, align 4, !tbaa !9
  %190 = call i32 @s2n_calculate_stacktrace()
  br label %191

191:                                              ; preds = %185
  br label %192

192:                                              ; preds = %191
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %213

193:                                              ; No predecessors!
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194, %159
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  br label %198

198:                                              ; preds = %197
  %199 = load ptr, ptr %12, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.s2n_hkdf_impl, ptr %199, i32 0, i32 1
  %201 = load ptr, ptr %200, align 8, !tbaa !14
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  %203 = load i32, ptr %8, align 4, !tbaa !9
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = load ptr, ptr %11, align 8, !tbaa !5
  %207 = call i32 %201(ptr noundef %202, i32 noundef %203, ptr noundef %204, ptr noundef %205, ptr noundef %206)
  %208 = icmp sgt i32 %207, -1
  br i1 %208, label %210, label %209

209:                                              ; preds = %198
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %213

210:                                              ; preds = %198
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  store i32 0, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %213

213:                                              ; preds = %212, %209, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %214

214:                                              ; preds = %213, %154, %118, %82, %46
  %215 = load i32, ptr %6, align 4
  ret i32 %215
}

; 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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @s2n_get_hkdf_implementation() #0

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 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = !{!15, !6, i64 8}
!15 = !{!"s2n_hkdf_impl", !6, i64 0, !6, i64 8, !6, i64 16}


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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_hkdf_extract(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %6, label %14

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

14:                                               ; preds = %5
  %.not22 = icmp eq ptr %2, null
  br i1 %.not22, label %15, label %23

15:                                               ; preds = %14
  %16 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.1, ptr %16, align 8, !tbaa !5
  %17 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.1, i64 21), i32 noundef 47) #4
  %.not23 = icmp eq ptr %17, null
  %18 = getelementptr inbounds i8, ptr %17, i64 1
  %19 = select i1 %.not23, ptr getelementptr inbounds (i8, ptr @.str.1, i64 21), ptr %18
  %20 = getelementptr inbounds i8, ptr %16, i64 8
  store ptr %19, ptr %20, align 8, !tbaa !10
  %21 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %21, align 4, !tbaa !11
  %22 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %55

23:                                               ; preds = %14
  %.not24 = icmp eq ptr %3, null
  br i1 %.not24, label %24, label %32

24:                                               ; preds = %23
  %25 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.2, ptr %25, align 8, !tbaa !5
  %26 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.2, i64 21), i32 noundef 47) #4
  %.not25 = icmp eq ptr %26, null
  %27 = getelementptr inbounds i8, ptr %26, i64 1
  %28 = select i1 %.not25, ptr getelementptr inbounds (i8, ptr @.str.2, i64 21), ptr %27
  %29 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %28, ptr %29, align 8, !tbaa !10
  %30 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %30, align 4, !tbaa !11
  %31 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %55

32:                                               ; preds = %23
  %.not26 = icmp eq ptr %4, null
  br i1 %.not26, label %33, label %41

33:                                               ; preds = %32
  %34 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.3, ptr %34, align 8, !tbaa !5
  %35 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.3, i64 21), i32 noundef 47) #4
  %.not27 = icmp eq ptr %35, null
  %36 = getelementptr inbounds i8, ptr %35, i64 1
  %37 = select i1 %.not27, ptr getelementptr inbounds (i8, ptr @.str.3, i64 21), ptr %36
  %38 = getelementptr inbounds i8, ptr %34, i64 8
  store ptr %37, ptr %38, align 8, !tbaa !10
  %39 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %39, align 4, !tbaa !11
  %40 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %55

41:                                               ; preds = %32
  %42 = tail call ptr @s2n_get_hkdf_implementation()
  %.not28 = icmp eq ptr %42, null
  br i1 %.not28, label %43, label %51

43:                                               ; preds = %41
  %44 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.4, ptr %44, align 8, !tbaa !5
  %45 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.4, i64 21), i32 noundef 47) #4
  %.not29 = icmp eq ptr %45, null
  %46 = getelementptr inbounds i8, ptr %45, i64 1
  %47 = select i1 %.not29, ptr getelementptr inbounds (i8, ptr @.str.4, i64 21), ptr %46
  %48 = getelementptr inbounds i8, ptr %44, i64 8
  store ptr %47, ptr %48, align 8, !tbaa !10
  %49 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %49, align 4, !tbaa !11
  %50 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %55

51:                                               ; preds = %41
  %52 = getelementptr inbounds i8, ptr %42, i64 8
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = tail call i32 %53(ptr noundef nonnull %0, i32 noundef %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %.lobit = ashr i32 %54, 31
  br label %55

55:                                               ; preds = %43, %51, %33, %24, %15, %6
  %.1 = phi i32 [ -1, %33 ], [ -1, %24 ], [ -1, %15 ], [ -1, %6 ], [ -1, %43 ], [ %.lobit, %51 ]
  ret i32 %.1
}

; 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

; Function Attrs: nounwind uwtable
declare hidden ptr @s2n_get_hkdf_implementation() local_unnamed_addr #0

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 = { nounwind willreturn memory(read) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"s2n_debug_info", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!14, !7, i64 8}
!14 = !{!"s2n_hkdf_impl", !7, i64 0, !7, i64 8, !7, i64 16}


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