; LLVM IR from aws/s2n-tls :: tests/unit (s2n_self_talk_npn_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_client_hello = type { %struct.s2n_blob, %struct.s2n_parsed_extensions_list, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8 }
%struct.s2n_parsed_extensions_list = type { [21 x %struct.s2n_parsed_extension], %struct.s2n_blob, i16 }
%struct.s2n_parsed_extension = type { %struct.s2n_blob, i16, i16, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.67 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [93 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @min_size(ptr noundef, i32 noundef) #4

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

declare ptr @s2n_ensure_memmove_trace(ptr noundef, ptr noundef, i64 noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_client_hello_get_parsed_extension(i32 noundef, ptr noundef, ptr noundef) #4

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

15:                                               ; preds = %4
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %49, label %18

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  br label %20

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

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

36:                                               ; preds = %20
  %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
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = getelementptr inbounds i8, ptr %39, i64 21
  br label %41

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

47:                                               ; preds = %41
  store i64 -1, ptr %5, align 8
  br label %169

48:                                               ; No predecessors!
  br label %49

49:                                               ; preds = %48, %15
  br label %50

50:                                               ; preds = %49
  br label %51

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

54:                                               ; preds = %51
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  %57 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %58 = getelementptr inbounds %struct.s2n_debug_info, ptr %57, i32 0, i32 0
  store ptr @.str.68, ptr %58, align 8, !tbaa !11
  %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 0
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds i8, ptr %61, i64 21
  %63 = call ptr @strrchr(ptr noundef %62, i32 noundef 47) #6
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %72

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

72:                                               ; preds = %56
  %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
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = getelementptr inbounds i8, ptr %75, i64 21
  br label %77

77:                                               ; preds = %72, %65
  %78 = phi ptr [ %71, %65 ], [ %76, %72 ]
  %79 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %80 = getelementptr inbounds %struct.s2n_debug_info, ptr %79, i32 0, i32 1
  store ptr %78, ptr %80, align 8, !tbaa !13
  %81 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %81, align 4, !tbaa !9
  %82 = call i32 @s2n_calculate_stacktrace()
  br label %83

83:                                               ; preds = %77
  store i64 -1, ptr %5, align 8
  br label %169

84:                                               ; No predecessors!
  br label %85

85:                                               ; preds = %84, %51
  br label %86

86:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !5
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.s2n_client_hello, ptr %88, i32 0, i32 1
  %90 = call i32 @s2n_client_hello_get_parsed_extension(i32 noundef %87, ptr noundef %89, ptr noundef %10)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %86
  store i64 0, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %168

93:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.s2n_parsed_extension, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %9, align 4, !tbaa !9
  %97 = call i32 @min_size(ptr noundef %95, i32 noundef %96)
  store i32 %97, ptr %12, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %99 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %99, ptr %13, align 4, !tbaa !9
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = icmp ne i32 %100, 0
  %102 = xor i1 %101, true
  %103 = xor i1 %102, true
  %104 = zext i1 %103 to i32
  %105 = sext i32 %104 to i64
  %106 = call i64 @llvm.expect.i64(i64 %105, i64 1)
  %107 = icmp ne i64 %106, 0
  br i1 %107, label %108, label %159

108:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.s2n_parsed_extension, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %struct.s2n_blob, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !14
  %114 = load i32, ptr %13, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = call ptr @s2n_ensure_memmove_trace(ptr noundef %109, ptr noundef %113, i64 noundef %115)
  store ptr %116, ptr %14, align 8, !tbaa !5
  br label %117

117:                                              ; preds = %108
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = icmp ne ptr %118, null
  br i1 %119, label %153, label %120

120:                                              ; preds = %117
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  %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
  store ptr @.str.69, ptr %124, align 8, !tbaa !11
  %125 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %126 = getelementptr inbounds %struct.s2n_debug_info, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = getelementptr inbounds i8, ptr %127, i64 21
  %129 = call ptr @strrchr(ptr noundef %128, i32 noundef 47) #6
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %138

131:                                              ; preds = %122
  %132 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %133 = getelementptr inbounds %struct.s2n_debug_info, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = getelementptr inbounds i8, ptr %134, i64 21
  %136 = call ptr @strrchr(ptr noundef %135, i32 noundef 47) #6
  %137 = getelementptr inbounds i8, ptr %136, i64 1
  br label %143

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

143:                                              ; preds = %138, %131
  %144 = phi ptr [ %137, %131 ], [ %142, %138 ]
  %145 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %146 = getelementptr inbounds %struct.s2n_debug_info, ptr %145, i32 0, i32 1
  store ptr %144, ptr %146, align 8, !tbaa !13
  %147 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %147, align 4, !tbaa !9
  %148 = call i32 @s2n_calculate_stacktrace()
  br label %149

149:                                              ; preds = %143
  br label %150

150:                                              ; preds = %149
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %156

151:                                              ; No predecessors!
  br label %152

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152, %117
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  store i32 0, ptr %11, align 4
  br label %156

156:                                              ; preds = %155, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %157 = load i32, ptr %11, align 4
  switch i32 %157, label %160 [
    i32 0, label %158
  ]

158:                                              ; preds = %156
  br label %159

159:                                              ; preds = %158, %98
  store i32 0, ptr %11, align 4
  br label %160

160:                                              ; preds = %159, %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %161 = load i32, ptr %11, align 4
  switch i32 %161, label %167 [
    i32 0, label %162
  ]

162:                                              ; preds = %160
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %12, align 4, !tbaa !9
  %166 = zext i32 %165 to i64
  store i64 %166, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %167

167:                                              ; preds = %164, %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %168

168:                                              ; preds = %167, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %169

169:                                              ; preds = %168, %83, %47
  %170 = load i64, ptr %5, align 8
  ret i64 %170
}

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { nocallback nofree nosync nounwind willreturn memory(none) }
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, !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 0}
!15 = !{!"", !16, i64 0, !17, i64 24, !17, i64 26, !10, i64 28}
!16 = !{!"s2n_blob", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!17 = !{!"short", !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 }

@_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.67 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [93 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @min_size(ptr noundef, i32 noundef) local_unnamed_addr #4

declare ptr @s2n_ensure_memmove_trace(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_client_hello_get_parsed_extension(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

6:                                                ; preds = %4
  %7 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.67, ptr %7, align 8, !tbaa !5
  %8 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.67, i64 21), i32 noundef 47) #5
  %.not21 = icmp eq ptr %8, null
  %9 = getelementptr inbounds i8, ptr %8, i64 1
  %10 = select i1 %.not21, ptr getelementptr inbounds (i8, ptr @.str.67, 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() #6
  br label %41

14:                                               ; preds = %4
  %.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.68, ptr %16, align 8, !tbaa !5
  %17 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.68, i64 21), i32 noundef 47) #5
  %.not23 = icmp eq ptr %17, null
  %18 = getelementptr inbounds i8, ptr %17, i64 1
  %19 = select i1 %.not23, ptr getelementptr inbounds (i8, ptr @.str.68, 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() #6
  br label %41

23:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store ptr null, ptr %5, align 8, !tbaa !13
  %24 = getelementptr inbounds i8, ptr %0, i64 24
  %25 = call i32 @s2n_client_hello_get_parsed_extension(i32 noundef %1, ptr noundef nonnull %24, ptr noundef nonnull %5)
  %.not24 = icmp eq i32 %25, 0
  br i1 %.not24, label %26, label %._crit_edge

26:                                               ; preds = %23
  %27 = load ptr, ptr %5, align 8, !tbaa !13
  %28 = call i32 @min_size(ptr noundef %27, i32 noundef %3)
  %.not25 = icmp eq i32 %28, 0
  br i1 %.not25, label %._crit_edge, label %29, !prof !14

29:                                               ; preds = %26
  %30 = load ptr, ptr %5, align 8, !tbaa !13
  %31 = load ptr, ptr %30, align 8, !tbaa !15
  %32 = zext i32 %28 to i64
  %33 = call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %2, ptr noundef %31, i64 noundef %32) #6
  %.not26.not = icmp eq ptr %33, null
  br i1 %.not26.not, label %.critedge, label %._crit_edge

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

._crit_edge:                                      ; preds = %26, %29, %.critedge, %23
  %.4 = phi i64 [ 0, %23 ], [ -1, %.critedge ], [ %32, %29 ], [ 0, %26 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %41

41:                                               ; preds = %._crit_edge, %15, %6
  %.5 = phi i64 [ %.4, %._crit_edge ], [ -1, %15 ], [ -1, %6 ]
  ret i64 %.5
}

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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_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 = !{!7, !7, i64 0}
!14 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!15 = !{!16, !7, i64 0}
!16 = !{!"", !17, i64 0, !18, i64 24, !18, i64 26, !12, i64 28}
!17 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!18 = !{!"short", !8, i64 0}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LowerExpectIntrinsicPass,SROAPass,SimplifyCFGPass,TailCallElimPass