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

; 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_cipher_suite = type { i8, ptr, ptr, [2 x i8], ptr, i32, ptr, [2 x ptr], i8, ptr, ptr, i32, i8 }
%struct.s2n_psk = type { i32, %struct.s2n_blob, %struct.s2n_blob, i32, i32, i64, %struct.s2n_blob, %struct.s2n_early_data_config, i64 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_early_data_config = type { i32, i8, ptr, %struct.s2n_blob, %struct.s2n_blob }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.19 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [91 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() #2

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

; Function Attrs: nocallback nofree 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
define dso_local i32 @s2n_psk_configure_early_data(ptr noundef %0, i32 noundef %1, i8 noundef zeroext %2, i8 noundef zeroext %3) #5 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca [2 x i8], align 1
  %11 = alloca ptr, align 8
  %12 = alloca %struct.s2n_result, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i8 %2, ptr %8, align 1, !tbaa !11
  store i8 %3, ptr %9, align 1, !tbaa !11
  br label %14

14:                                               ; preds = %4
  %15 = load ptr, ptr %6, 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.19, ptr %21, align 8, !tbaa !12
  %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 !12
  %25 = getelementptr inbounds i8, ptr %24, i64 21
  %26 = call ptr @strrchr(ptr noundef %25, i32 noundef 47) #6
  %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 !12
  %32 = getelementptr inbounds i8, ptr %31, i64 21
  %33 = call ptr @strrchr(ptr noundef %32, i32 noundef 47) #6
  %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 !12
  %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 !14
  %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 %5, align 4
  br label %159

47:                                               ; No predecessors!
  br label %48

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

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #7
  %50 = load i8, ptr %8, align 1, !tbaa !11
  store i8 %50, ptr %10, align 1, !tbaa !11
  %51 = getelementptr inbounds i8, ptr %10, i64 1
  %52 = load i8, ptr %9, align 1, !tbaa !11
  store i8 %52, ptr %51, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %49
  %54 = getelementptr inbounds [2 x i8], ptr %10, i64 0, i64 0
  %55 = call i32 @s2n_cipher_suite_from_iana(ptr noundef %54, i64 noundef 2, ptr noundef %11)
  %56 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  store i32 %55, ptr %56, align 4
  %57 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  %58 = load i32, ptr %57, align 4
  %59 = call zeroext i1 @s2n_result_is_ok(i32 %58)
  br i1 %59, label %61, label %60

60:                                               ; preds = %53
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %158

61:                                               ; preds = %53
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %100, label %67

67:                                               ; preds = %64
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %71 = getelementptr inbounds %struct.s2n_debug_info, ptr %70, i32 0, i32 0
  store ptr @.str.20, ptr %71, align 8, !tbaa !12
  %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 !12
  %75 = getelementptr inbounds i8, ptr %74, i64 21
  %76 = call ptr @strrchr(ptr noundef %75, i32 noundef 47) #6
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %85

78:                                               ; preds = %69
  %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 0
  %81 = load ptr, ptr %80, align 8, !tbaa !12
  %82 = getelementptr inbounds i8, ptr %81, i64 21
  %83 = call ptr @strrchr(ptr noundef %82, i32 noundef 47) #6
  %84 = getelementptr inbounds i8, ptr %83, i64 1
  br label %90

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

90:                                               ; preds = %85, %78
  %91 = phi ptr [ %84, %78 ], [ %89, %85 ]
  %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 1
  store ptr %91, ptr %93, align 8, !tbaa !14
  %94 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %94, align 4, !tbaa !9
  %95 = call i32 @s2n_calculate_stacktrace()
  br label %96

96:                                               ; preds = %90
  br label %97

97:                                               ; preds = %96
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %158

98:                                               ; No predecessors!
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99, %64
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %104, i32 0, i32 11
  %106 = load i32, ptr %105, align 8, !tbaa !15
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.s2n_psk, ptr %107, i32 0, i32 3
  %109 = load i32, ptr %108, align 8, !tbaa !17
  %110 = icmp eq i32 %106, %109
  br i1 %110, label %144, label %111

111:                                              ; preds = %103
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  %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 0
  store ptr @.str.21, ptr %115, align 8, !tbaa !12
  %116 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %117 = getelementptr inbounds %struct.s2n_debug_info, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !12
  %119 = getelementptr inbounds i8, ptr %118, i64 21
  %120 = call ptr @strrchr(ptr noundef %119, i32 noundef 47) #6
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %129

122:                                              ; preds = %113
  %123 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %124 = getelementptr inbounds %struct.s2n_debug_info, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !12
  %126 = getelementptr inbounds i8, ptr %125, i64 21
  %127 = call ptr @strrchr(ptr noundef %126, i32 noundef 47) #6
  %128 = getelementptr inbounds i8, ptr %127, i64 1
  br label %134

129:                                              ; preds = %113
  %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 !12
  %133 = getelementptr inbounds i8, ptr %132, i64 21
  br label %134

134:                                              ; preds = %129, %122
  %135 = phi ptr [ %128, %122 ], [ %133, %129 ]
  %136 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %137 = getelementptr inbounds %struct.s2n_debug_info, ptr %136, i32 0, i32 1
  store ptr %135, ptr %137, align 8, !tbaa !14
  %138 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762089, ptr %138, align 4, !tbaa !9
  %139 = call i32 @s2n_calculate_stacktrace()
  br label %140

140:                                              ; preds = %134
  br label %141

141:                                              ; preds = %140
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %158

142:                                              ; No predecessors!
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143, %103
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %7, align 4, !tbaa !9
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.s2n_psk, ptr %148, i32 0, i32 7
  %150 = getelementptr inbounds %struct.s2n_early_data_config, ptr %149, i32 0, i32 0
  store i32 %147, ptr %150, align 8, !tbaa !22
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.s2n_psk, ptr %151, i32 0, i32 7
  %153 = getelementptr inbounds %struct.s2n_early_data_config, ptr %152, i32 0, i32 1
  store i8 34, ptr %153, align 4, !tbaa !23
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.s2n_psk, ptr %155, i32 0, i32 7
  %157 = getelementptr inbounds %struct.s2n_early_data_config, ptr %156, i32 0, i32 2
  store ptr %154, ptr %157, align 8, !tbaa !24
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %158

158:                                              ; preds = %146, %141, %97, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #7
  br label %159

159:                                              ; preds = %158, %46
  %160 = load i32, ptr %5, align 4
  ret i32 %160
}

declare i32 @s2n_cipher_suite_from_iana(ptr noundef, i64 noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind 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 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!14 = !{!13, !6, i64 8}
!15 = !{!16, !10, i64 96}
!16 = !{!"s2n_cipher_suite", !10, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !7, i64 56, !7, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !7, i64 100}
!17 = !{!18, !10, i64 56}
!18 = !{!"s2n_psk", !10, i64 0, !19, i64 8, !19, i64 32, !10, i64 56, !10, i64 60, !20, i64 64, !19, i64 72, !21, i64 96, !20, i64 160}
!19 = !{!"s2n_blob", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!20 = !{!"long", !7, i64 0}
!21 = !{!"s2n_early_data_config", !10, i64 0, !7, i64 4, !6, i64 8, !19, i64 16, !19, i64 40}
!22 = !{!18, !10, i64 96}
!23 = !{!18, !7, i64 100}
!24 = !{!18, !6, i64 104}


; 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.19 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [91 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_psk_configure_early_data(ptr noundef %0, i32 noundef %1, i8 noundef zeroext %2, i8 noundef zeroext %3) local_unnamed_addr #5 {
  %5 = alloca [2 x i8], align 1
  %6 = alloca ptr, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %15

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

15:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %5) #7
  store i8 %2, ptr %5, align 1, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %5, i64 1
  store i8 %3, ptr %16, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store ptr null, ptr %6, align 8, !tbaa !14
  %17 = call i32 @s2n_cipher_suite_from_iana(ptr noundef nonnull %5, i64 noundef 2, ptr noundef nonnull %6) #7
  %18 = call zeroext i1 @s2n_result_is_ok(i32 %17)
  br i1 %18, label %19, label %47

19:                                               ; preds = %15
  %20 = load ptr, ptr %6, align 8, !tbaa !14
  %.not14 = icmp eq ptr %20, null
  br i1 %.not14, label %21, label %29

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

29:                                               ; preds = %19
  %30 = getelementptr inbounds i8, ptr %20, i64 96
  %31 = load i32, ptr %30, align 8, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %0, i64 56
  %33 = load i32, ptr %32, align 8, !tbaa !17
  %34 = icmp eq i32 %31, %33
  br i1 %34, label %43, label %35

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

43:                                               ; preds = %29
  %44 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 %1, ptr %44, align 8, !tbaa !22
  %45 = getelementptr inbounds i8, ptr %0, i64 100
  store i8 34, ptr %45, align 4, !tbaa !23
  %46 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %20, ptr %46, align 8, !tbaa !24
  br label %47

47:                                               ; preds = %15, %43, %35, %21
  %.0 = phi i32 [ 0, %43 ], [ -1, %35 ], [ -1, %21 ], [ -1, %15 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %5) #7
  br label %48

48:                                               ; preds = %47, %7
  %.1 = phi i32 [ %.0, %47 ], [ -1, %7 ]
  ret i32 %.1
}

declare i32 @s2n_cipher_suite_from_iana(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind 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, !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 = !{!7, !7, i64 0}
!15 = !{!16, !12, i64 96}
!16 = !{!"s2n_cipher_suite", !12, i64 0, !7, i64 8, !7, i64 16, !8, i64 24, !7, i64 32, !12, i64 40, !7, i64 48, !8, i64 56, !8, i64 72, !7, i64 80, !7, i64 88, !12, i64 96, !8, i64 100}
!17 = !{!18, !12, i64 56}
!18 = !{!"s2n_psk", !12, i64 0, !19, i64 8, !19, i64 32, !12, i64 56, !12, i64 60, !20, i64 64, !19, i64 72, !21, i64 96, !20, i64 160}
!19 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!20 = !{!"long", !8, i64 0}
!21 = !{!"s2n_early_data_config", !12, i64 0, !8, i64 4, !7, i64 8, !19, i64 16, !19, i64 40}
!22 = !{!18, !12, i64 96}
!23 = !{!18, !8, i64 100}
!24 = !{!18, !7, i64 104}


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