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

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

11:                                               ; preds = %3
  %12 = load ptr, ptr %6, align 8, !tbaa !9
  %13 = icmp ne ptr %12, null
  br i1 %13, label %45, label %14

14:                                               ; preds = %11
  br label %15

15:                                               ; preds = %14
  br label %16

16:                                               ; preds = %15
  %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
  store ptr @.str.62, ptr %18, align 8, !tbaa !11
  %19 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %20 = getelementptr inbounds %struct.s2n_debug_info, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %21, i64 21
  %23 = call ptr @strrchr(ptr noundef %22, i32 noundef 47) #5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %32

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

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

37:                                               ; preds = %32, %25
  %38 = phi ptr [ %31, %25 ], [ %36, %32 ]
  %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 1
  store ptr %38, ptr %40, align 8, !tbaa !13
  %41 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %41, align 4, !tbaa !5
  %42 = call i32 @s2n_calculate_stacktrace()
  br label %43

43:                                               ; preds = %37
  store i32 -1, ptr %4, align 4
  br label %186

44:                                               ; No predecessors!
  br label %45

45:                                               ; preds = %44, %11
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  %48 = load ptr, ptr %7, align 8, !tbaa !9
  %49 = icmp ne ptr %48, null
  br i1 %49, label %81, label %50

50:                                               ; preds = %47
  br label %51

51:                                               ; preds = %50
  br label %52

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

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

68:                                               ; preds = %52
  %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
  %71 = load ptr, ptr %70, align 8, !tbaa !11
  %72 = getelementptr inbounds i8, ptr %71, i64 21
  br label %73

73:                                               ; preds = %68, %61
  %74 = phi ptr [ %67, %61 ], [ %72, %68 ]
  %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 1
  store ptr %74, ptr %76, align 8, !tbaa !13
  %77 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %77, align 4, !tbaa !5
  %78 = call i32 @s2n_calculate_stacktrace()
  br label %79

79:                                               ; preds = %73
  store i32 -1, ptr %4, align 4
  br label %186

80:                                               ; No predecessors!
  br label %81

81:                                               ; preds = %80, %47
  br label %82

82:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  store i8 0, ptr %8, align 1, !tbaa !14
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = trunc i32 %84 to i16
  %86 = call i32 @s2n_extension_supported_iana_value_to_id(i16 noundef zeroext %85, ptr noundef %8)
  %87 = icmp sgt i32 %86, -1
  br i1 %87, label %89, label %88

88:                                               ; preds = %83
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %185

89:                                               ; preds = %83
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %92 = load ptr, ptr %6, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.s2n_parsed_extensions_list, ptr %92, i32 0, i32 0
  %94 = load i8, ptr %8, align 1, !tbaa !14
  %95 = zext i8 %94 to i64
  %96 = getelementptr inbounds [21 x %struct.s2n_parsed_extension], ptr %93, i64 0, i64 %95
  store ptr %96, ptr %10, align 8, !tbaa !9
  br label %97

97:                                               ; preds = %91
  %98 = load ptr, ptr %10, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.s2n_parsed_extension, ptr %98, i32 0, i32 0
  %100 = getelementptr inbounds %struct.s2n_blob, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !15
  %102 = icmp ne ptr %101, null
  br i1 %102, label %136, label %103

103:                                              ; preds = %97
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  %106 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %107 = getelementptr inbounds %struct.s2n_debug_info, ptr %106, i32 0, i32 0
  store ptr @.str.64, ptr %107, align 8, !tbaa !11
  %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
  %112 = call ptr @strrchr(ptr noundef %111, i32 noundef 47) #5
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %121

114:                                              ; preds = %105
  %115 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %116 = getelementptr inbounds %struct.s2n_debug_info, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = getelementptr inbounds i8, ptr %117, i64 21
  %119 = call ptr @strrchr(ptr noundef %118, i32 noundef 47) #5
  %120 = getelementptr inbounds i8, ptr %119, i64 1
  br label %126

121:                                              ; preds = %105
  %122 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %123 = getelementptr inbounds %struct.s2n_debug_info, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !11
  %125 = getelementptr inbounds i8, ptr %124, i64 21
  br label %126

126:                                              ; preds = %121, %114
  %127 = phi ptr [ %120, %114 ], [ %125, %121 ]
  %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 1
  store ptr %127, ptr %129, align 8, !tbaa !13
  %130 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762072, ptr %130, align 4, !tbaa !5
  %131 = call i32 @s2n_calculate_stacktrace()
  br label %132

132:                                              ; preds = %126
  br label %133

133:                                              ; preds = %132
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %184

134:                                              ; No predecessors!
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135, %97
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138
  %140 = load ptr, ptr %10, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.s2n_parsed_extension, ptr %140, i32 0, i32 1
  %142 = load i16, ptr %141, align 8, !tbaa !19
  %143 = zext i16 %142 to i32
  %144 = load i32, ptr %5, align 4, !tbaa !5
  %145 = icmp eq i32 %143, %144
  br i1 %145, label %179, label %146

146:                                              ; preds = %139
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147
  %149 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %150 = getelementptr inbounds %struct.s2n_debug_info, ptr %149, i32 0, i32 0
  store ptr @.str.65, ptr %150, align 8, !tbaa !11
  %151 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %152 = getelementptr inbounds %struct.s2n_debug_info, ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !11
  %154 = getelementptr inbounds i8, ptr %153, i64 21
  %155 = call ptr @strrchr(ptr noundef %154, i32 noundef 47) #5
  %156 = icmp ne ptr %155, null
  br i1 %156, label %157, label %164

157:                                              ; preds = %148
  %158 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %159 = getelementptr inbounds %struct.s2n_debug_info, ptr %158, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !11
  %161 = getelementptr inbounds i8, ptr %160, i64 21
  %162 = call ptr @strrchr(ptr noundef %161, i32 noundef 47) #5
  %163 = getelementptr inbounds i8, ptr %162, i64 1
  br label %169

164:                                              ; preds = %148
  %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
  %167 = load ptr, ptr %166, align 8, !tbaa !11
  %168 = getelementptr inbounds i8, ptr %167, i64 21
  br label %169

169:                                              ; preds = %164, %157
  %170 = phi ptr [ %163, %157 ], [ %168, %164 ]
  %171 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %172 = getelementptr inbounds %struct.s2n_debug_info, ptr %171, i32 0, i32 1
  store ptr %170, ptr %172, align 8, !tbaa !13
  %173 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653257, ptr %173, align 4, !tbaa !5
  %174 = call i32 @s2n_calculate_stacktrace()
  br label %175

175:                                              ; preds = %169
  br label %176

176:                                              ; preds = %175
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %184

177:                                              ; No predecessors!
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178, %139
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180
  %182 = load ptr, ptr %10, align 8, !tbaa !9
  %183 = load ptr, ptr %7, align 8, !tbaa !9
  store ptr %182, ptr %183, align 8, !tbaa !9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %184

184:                                              ; preds = %181, %176, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %185

185:                                              ; preds = %184, %88
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %186

186:                                              ; preds = %185, %79, %43
  %187 = load i32, ptr %4, align 4
  ret i32 %187
}

declare i32 @s2n_extension_supported_iana_value_to_id(i16 noundef zeroext, 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 = { 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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"s2n_debug_info", !10, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !10, i64 0}
!16 = !{!"", !17, i64 0, !18, i64 24, !18, i64 26, !6, i64 28}
!17 = !{!"s2n_blob", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16}
!18 = !{!"short", !7, i64 0}
!19 = !{!16, !18, i64 24}


; 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 }
%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 local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.62 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.65 = 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_client_hello_get_parsed_extension(i32 noundef %0, ptr noundef %1, ptr noundef writeonly %2) local_unnamed_addr #4 {
  %4 = alloca i8, align 1
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %5, label %13

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

13:                                               ; preds = %3
  %.not16 = icmp eq ptr %2, null
  br i1 %.not16, label %14, label %22

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

22:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  store i8 0, ptr %4, align 1, !tbaa !13
  %23 = trunc i32 %0 to i16
  %24 = call i32 @s2n_extension_supported_iana_value_to_id(i16 noundef zeroext %23, ptr noundef nonnull %4) #6
  %25 = icmp sgt i32 %24, -1
  br i1 %25, label %26, label %53

26:                                               ; preds = %22
  %27 = load i8, ptr %4, align 1, !tbaa !13
  %28 = zext i8 %27 to i64
  %29 = getelementptr inbounds [21 x %struct.s2n_parsed_extension], ptr %1, i64 0, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %.not18 = icmp eq ptr %30, null
  br i1 %.not18, label %31, label %39

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

39:                                               ; preds = %26
  %40 = getelementptr inbounds i8, ptr %29, i64 24
  %41 = load i16, ptr %40, align 8, !tbaa !18
  %42 = zext i16 %41 to i32
  %43 = icmp eq i32 %42, %0
  br i1 %43, label %52, label %44

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

52:                                               ; preds = %39
  store ptr %29, ptr %2, align 8, !tbaa !19
  br label %53

53:                                               ; preds = %31, %44, %52, %22
  %.1 = phi i32 [ -1, %22 ], [ 0, %52 ], [ -1, %44 ], [ -1, %31 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %54

54:                                               ; preds = %53, %14, %5
  %.2 = phi i32 [ %.1, %53 ], [ -1, %14 ], [ -1, %5 ]
  ret i32 %.2
}

declare i32 @s2n_extension_supported_iana_value_to_id(i16 noundef zeroext, 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 = { 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 = !{!8, !8, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"", !16, i64 0, !17, i64 24, !17, i64 26, !12, i64 28}
!16 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!17 = !{!"short", !8, i64 0}
!18 = !{!15, !17, i64 24}
!19 = !{!7, !7, i64 0}


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