; LLVM IR from aws/s2n-tls :: tests/unit (s2n_tls13_key_schedule_test)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.s2n_debug_info = type { ptr, ptr }
%struct.s2n_result = type { i32 }
%struct.s2n_connection = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [22 x i8], [22 x i8], [22 x i8], i32, i32, %struct.s2n_timer, i64, i64, [32 x i8], i8, i8, i8, i8, i8, i8, i8, ptr, ptr, %struct.s2n_secrets, ptr, ptr, %struct.s2n_kex_parameters, %struct.s2n_handshake_parameters, %struct.s2n_psk_parameters, ptr, i8, i32, [5 x i8], %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, i32, i64, [2 x i8], %struct.s2n_stuffer, i8, i8, i8, i8, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, %struct.s2n_handshake, i16, i32, i16, i64, i8, i64, i64, i64, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, [256 x i8], [256 x i8], i32, %struct.s2n_blob, i32, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_client_hello, %struct.s2n_x509_validator, ptr, ptr, i8, i32, %struct.s2n_blob, i32, %struct.s2n_ticket_fields, [138 x i8], %struct.s2n_stuffer, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8, i16, i16, i32, i32, %struct.s2n_blob, i32, %struct.s2n_post_handshake, %struct.s2n_atomic_flag, i8, i8 }
%struct.s2n_timer = type { i64 }
%struct.s2n_secrets = type { %union.anon.0, i32 }
%union.anon.0 = type { %struct.s2n_tls13_secrets }
%struct.s2n_tls13_secrets = type { [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], i32 }
%struct.s2n_kex_parameters = type { %struct.s2n_dh_params, %struct.s2n_ecc_evp_params, [4 x ptr], %struct.s2n_ecc_evp_params, %struct.s2n_kem_group_params, %struct.s2n_kem_group_params, [8 x ptr], %struct.s2n_kem_params, %struct.s2n_blob, %struct.s2n_blob }
%struct.s2n_dh_params = type { ptr }
%struct.s2n_ecc_evp_params = type { ptr, ptr }
%struct.s2n_kem_group_params = type { ptr, %struct.s2n_kem_params, %struct.s2n_ecc_evp_params }
%struct.s2n_kem_params = type { ptr, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8 }
%struct.s2n_handshake_parameters = type { %struct.s2n_pkey, %struct.s2n_pkey, %struct.s2n_blob, i32, %struct.s2n_sig_scheme_list, ptr, ptr, ptr, [4 x ptr], [4 x ptr], i8, i8, [32 x i8], [32 x i8] }
%struct.s2n_pkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.s2n_sig_scheme_list = type { [128 x i16], i8 }
%struct.s2n_psk_parameters = type { i32, %struct.s2n_array, i16, i16, ptr, i32 }
%struct.s2n_array = type { %struct.s2n_blob, i32, i32 }
%struct.s2n_handshake = type { %struct.s2n_stuffer, ptr, [8 x i8], [48 x i8], [48 x i8], i8, i32, i32, i32, i32, %struct.s2n_offered_early_data, i8, i32 }
%struct.s2n_offered_early_data = type { 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_x509_validator = type { ptr, ptr, i8, i8, i16, ptr, i32, ptr, %struct.s2n_cert_validation_info, i8 }
%struct.s2n_cert_validation_info = type { i8, [3 x i8] }
%struct.s2n_ticket_fields = type { %struct.s2n_blob, i32 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_post_handshake = type { %struct.s2n_stuffer, [4 x i8] }
%struct.s2n_atomic_flag = type { i32 }
%struct.s2n_crypto_parameters = type { ptr, %struct.s2n_session_key, %struct.s2n_session_key, %struct.s2n_hmac_state, %struct.s2n_hmac_state, [16 x i8], [16 x i8], [8 x i8], [8 x i8] }
%struct.s2n_session_key = type { ptr }
%struct.s2n_hmac_state = type { i32, i16, i32, i16, i8, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, [128 x i8], [64 x i8] }
%struct.s2n_hash_state = type { ptr, i32, i8, i64, %union.anon }
%union.anon = type { %struct.s2n_hash_evp_digest }
%struct.s2n_hash_evp_digest = type { %struct.s2n_evp_digest, %struct.s2n_evp_digest }
%struct.s2n_evp_digest = type { ptr, ptr }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.17 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [94 x i8], align 1
@derive_methods = external hidden global [4 x [2 x ptr]], align 16
@.str.25 = external hidden unnamed_addr constant [94 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: nounwind uwtable
declare dso_local i32 @s2n_tls13_extract_secret(ptr noundef, i32 noundef) #4

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

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

16:                                               ; preds = %13
  br label %17

17:                                               ; preds = %16
  br label %18

18:                                               ; preds = %17
  %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
  store ptr @.str.17, ptr %20, align 8, !tbaa !11
  %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
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %23, i64 21
  %25 = call ptr @strrchr(ptr noundef %24, i32 noundef 47) #5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %34

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

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

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

45:                                               ; preds = %39
  %46 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %46, align 4, !tbaa !14
  br label %408

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %13
  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 %85, 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.18, 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
  %83 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %83, align 4, !tbaa !14
  br label %408

84:                                               ; No predecessors!
  br label %85

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

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.s2n_connection, ptr %88, i32 0, i32 27
  %90 = load ptr, ptr %89, align 8, !tbaa !16
  %91 = icmp ne ptr %90, null
  br i1 %91, label %124, label %92

92:                                               ; preds = %87
  br label %93

93:                                               ; preds = %92
  br label %94

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

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

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

115:                                              ; preds = %110, %103
  %116 = phi ptr [ %109, %103 ], [ %114, %110 ]
  %117 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %118 = getelementptr inbounds %struct.s2n_debug_info, ptr %117, i32 0, i32 1
  store ptr %116, ptr %118, align 8, !tbaa !13
  %119 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %119, align 4, !tbaa !9
  %120 = call i32 @s2n_calculate_stacktrace()
  br label %121

121:                                              ; preds = %115
  %122 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %122, align 4, !tbaa !14
  br label %408

123:                                              ; No predecessors!
  br label %124

124:                                              ; preds = %123, %87
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.s2n_connection, ptr %127, i32 0, i32 27
  %129 = load ptr, ptr %128, align 8, !tbaa !16
  %130 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !43
  %132 = icmp ne ptr %131, null
  br i1 %132, label %165, label %133

133:                                              ; preds = %126
  br label %134

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134
  %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 0
  store ptr @.str.20, ptr %137, align 8, !tbaa !11
  %138 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %139 = getelementptr inbounds %struct.s2n_debug_info, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !11
  %141 = getelementptr inbounds i8, ptr %140, i64 21
  %142 = call ptr @strrchr(ptr noundef %141, i32 noundef 47) #5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %151

144:                                              ; preds = %135
  %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 0
  %147 = load ptr, ptr %146, align 8, !tbaa !11
  %148 = getelementptr inbounds i8, ptr %147, i64 21
  %149 = call ptr @strrchr(ptr noundef %148, i32 noundef 47) #5
  %150 = getelementptr inbounds i8, ptr %149, i64 1
  br label %156

151:                                              ; preds = %135
  %152 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %153 = getelementptr inbounds %struct.s2n_debug_info, ptr %152, i32 0, i32 0
  %154 = load ptr, ptr %153, align 8, !tbaa !11
  %155 = getelementptr inbounds i8, ptr %154, i64 21
  br label %156

156:                                              ; preds = %151, %144
  %157 = phi ptr [ %150, %144 ], [ %155, %151 ]
  %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 1
  store ptr %157, ptr %159, align 8, !tbaa !13
  %160 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %160, align 4, !tbaa !9
  %161 = call i32 @s2n_calculate_stacktrace()
  br label %162

162:                                              ; preds = %156
  %163 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %163, align 4, !tbaa !14
  br label %408

164:                                              ; No predecessors!
  br label %165

165:                                              ; preds = %164, %126
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.s2n_connection, ptr %168, i32 0, i32 52
  %170 = getelementptr inbounds %struct.s2n_handshake, ptr %169, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !48
  %172 = icmp ne ptr %171, null
  br i1 %172, label %205, label %173

173:                                              ; preds = %167
  br label %174

174:                                              ; preds = %173
  br label %175

175:                                              ; preds = %174
  %176 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %177 = getelementptr inbounds %struct.s2n_debug_info, ptr %176, i32 0, i32 0
  store ptr @.str.21, ptr %177, align 8, !tbaa !11
  %178 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %179 = getelementptr inbounds %struct.s2n_debug_info, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !11
  %181 = getelementptr inbounds i8, ptr %180, i64 21
  %182 = call ptr @strrchr(ptr noundef %181, i32 noundef 47) #5
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %191

184:                                              ; preds = %175
  %185 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %186 = getelementptr inbounds %struct.s2n_debug_info, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !11
  %188 = getelementptr inbounds i8, ptr %187, i64 21
  %189 = call ptr @strrchr(ptr noundef %188, i32 noundef 47) #5
  %190 = getelementptr inbounds i8, ptr %189, i64 1
  br label %196

191:                                              ; preds = %175
  %192 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %193 = getelementptr inbounds %struct.s2n_debug_info, ptr %192, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !11
  %195 = getelementptr inbounds i8, ptr %194, i64 21
  br label %196

196:                                              ; preds = %191, %184
  %197 = phi ptr [ %190, %184 ], [ %195, %191 ]
  %198 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %199 = getelementptr inbounds %struct.s2n_debug_info, ptr %198, i32 0, i32 1
  store ptr %197, ptr %199, align 8, !tbaa !13
  %200 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %200, align 4, !tbaa !9
  %201 = call i32 @s2n_calculate_stacktrace()
  br label %202

202:                                              ; preds = %196
  %203 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %203, align 4, !tbaa !14
  br label %408

204:                                              ; No predecessors!
  br label %205

205:                                              ; preds = %204, %167
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %7, align 4, !tbaa !9
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %242, label %210

210:                                              ; preds = %207
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  %213 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %214 = getelementptr inbounds %struct.s2n_debug_info, ptr %213, i32 0, i32 0
  store ptr @.str.22, ptr %214, align 8, !tbaa !11
  %215 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %216 = getelementptr inbounds %struct.s2n_debug_info, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8, !tbaa !11
  %218 = getelementptr inbounds i8, ptr %217, i64 21
  %219 = call ptr @strrchr(ptr noundef %218, i32 noundef 47) #5
  %220 = icmp ne ptr %219, null
  br i1 %220, label %221, label %228

221:                                              ; preds = %212
  %222 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %223 = getelementptr inbounds %struct.s2n_debug_info, ptr %222, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !11
  %225 = getelementptr inbounds i8, ptr %224, i64 21
  %226 = call ptr @strrchr(ptr noundef %225, i32 noundef 47) #5
  %227 = getelementptr inbounds i8, ptr %226, i64 1
  br label %233

228:                                              ; preds = %212
  %229 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %230 = getelementptr inbounds %struct.s2n_debug_info, ptr %229, i32 0, i32 0
  %231 = load ptr, ptr %230, align 8, !tbaa !11
  %232 = getelementptr inbounds i8, ptr %231, i64 21
  br label %233

233:                                              ; preds = %228, %221
  %234 = phi ptr [ %227, %221 ], [ %232, %228 ]
  %235 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %236 = getelementptr inbounds %struct.s2n_debug_info, ptr %235, i32 0, i32 1
  store ptr %234, ptr %236, align 8, !tbaa !13
  %237 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %237, align 4, !tbaa !9
  %238 = call i32 @s2n_calculate_stacktrace()
  br label %239

239:                                              ; preds = %233
  %240 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %240, align 4, !tbaa !14
  br label %408

241:                                              ; No predecessors!
  br label %242

242:                                              ; preds = %241, %207
  br label %243

243:                                              ; preds = %242
  br label %244

244:                                              ; preds = %243
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = load i32, ptr %7, align 4, !tbaa !9
  %247 = call i32 @s2n_tls13_extract_secret(ptr noundef %245, i32 noundef %246)
  %248 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  store i32 %247, ptr %248, align 4
  %249 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  %250 = load i32, ptr %249, align 4
  %251 = call zeroext i1 @s2n_result_is_ok(i32 %250)
  br i1 %251, label %254, label %252

252:                                              ; preds = %244
  %253 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %253, align 4, !tbaa !14
  br label %408

254:                                              ; preds = %244
  br label %255

255:                                              ; preds = %254
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %7, align 4, !tbaa !9
  %258 = icmp uge i32 %257, 0
  br i1 %258, label %291, label %259

259:                                              ; preds = %256
  br label %260

260:                                              ; preds = %259
  br label %261

261:                                              ; preds = %260
  %262 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %263 = getelementptr inbounds %struct.s2n_debug_info, ptr %262, i32 0, i32 0
  store ptr @.str.23, ptr %263, align 8, !tbaa !11
  %264 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %265 = getelementptr inbounds %struct.s2n_debug_info, ptr %264, i32 0, i32 0
  %266 = load ptr, ptr %265, align 8, !tbaa !11
  %267 = getelementptr inbounds i8, ptr %266, i64 21
  %268 = call ptr @strrchr(ptr noundef %267, i32 noundef 47) #5
  %269 = icmp ne ptr %268, null
  br i1 %269, label %270, label %277

270:                                              ; preds = %261
  %271 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %272 = getelementptr inbounds %struct.s2n_debug_info, ptr %271, i32 0, i32 0
  %273 = load ptr, ptr %272, align 8, !tbaa !11
  %274 = getelementptr inbounds i8, ptr %273, i64 21
  %275 = call ptr @strrchr(ptr noundef %274, i32 noundef 47) #5
  %276 = getelementptr inbounds i8, ptr %275, i64 1
  br label %282

277:                                              ; preds = %261
  %278 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %279 = getelementptr inbounds %struct.s2n_debug_info, ptr %278, i32 0, i32 0
  %280 = load ptr, ptr %279, align 8, !tbaa !11
  %281 = getelementptr inbounds i8, ptr %280, i64 21
  br label %282

282:                                              ; preds = %277, %270
  %283 = phi ptr [ %276, %270 ], [ %281, %277 ]
  %284 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %285 = getelementptr inbounds %struct.s2n_debug_info, ptr %284, i32 0, i32 1
  store ptr %283, ptr %285, align 8, !tbaa !13
  %286 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %286, align 4, !tbaa !9
  %287 = call i32 @s2n_calculate_stacktrace()
  br label %288

288:                                              ; preds = %282
  %289 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %289, align 4, !tbaa !14
  br label %408

290:                                              ; No predecessors!
  br label %291

291:                                              ; preds = %290, %256
  br label %292

292:                                              ; preds = %291
  br label %293

293:                                              ; preds = %292
  %294 = load i32, ptr %7, align 4, !tbaa !9
  %295 = zext i32 %294 to i64
  %296 = icmp ult i64 %295, 4
  br i1 %296, label %329, label %297

297:                                              ; preds = %293
  br label %298

298:                                              ; preds = %297
  br label %299

299:                                              ; preds = %298
  %300 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %301 = getelementptr inbounds %struct.s2n_debug_info, ptr %300, i32 0, i32 0
  store ptr @.str.24, ptr %301, align 8, !tbaa !11
  %302 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %303 = getelementptr inbounds %struct.s2n_debug_info, ptr %302, i32 0, i32 0
  %304 = load ptr, ptr %303, align 8, !tbaa !11
  %305 = getelementptr inbounds i8, ptr %304, i64 21
  %306 = call ptr @strrchr(ptr noundef %305, i32 noundef 47) #5
  %307 = icmp ne ptr %306, null
  br i1 %307, label %308, label %315

308:                                              ; preds = %299
  %309 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %310 = getelementptr inbounds %struct.s2n_debug_info, ptr %309, i32 0, i32 0
  %311 = load ptr, ptr %310, align 8, !tbaa !11
  %312 = getelementptr inbounds i8, ptr %311, i64 21
  %313 = call ptr @strrchr(ptr noundef %312, i32 noundef 47) #5
  %314 = getelementptr inbounds i8, ptr %313, i64 1
  br label %320

315:                                              ; preds = %299
  %316 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %317 = getelementptr inbounds %struct.s2n_debug_info, ptr %316, i32 0, i32 0
  %318 = load ptr, ptr %317, align 8, !tbaa !11
  %319 = getelementptr inbounds i8, ptr %318, i64 21
  br label %320

320:                                              ; preds = %315, %308
  %321 = phi ptr [ %314, %308 ], [ %319, %315 ]
  %322 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %323 = getelementptr inbounds %struct.s2n_debug_info, ptr %322, i32 0, i32 1
  store ptr %321, ptr %323, align 8, !tbaa !13
  %324 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %324, align 4, !tbaa !9
  %325 = call i32 @s2n_calculate_stacktrace()
  br label %326

326:                                              ; preds = %320
  %327 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %327, align 4, !tbaa !14
  br label %408

328:                                              ; No predecessors!
  br label %329

329:                                              ; preds = %328, %293
  br label %330

330:                                              ; preds = %329
  br label %331

331:                                              ; preds = %330
  %332 = load i32, ptr %7, align 4, !tbaa !9
  %333 = zext i32 %332 to i64
  %334 = getelementptr inbounds [4 x [2 x ptr]], ptr @derive_methods, i64 0, i64 %333
  %335 = load i32, ptr %8, align 4, !tbaa !9
  %336 = zext i32 %335 to i64
  %337 = getelementptr inbounds [2 x ptr], ptr %334, i64 0, i64 %336
  %338 = load ptr, ptr %337, align 8, !tbaa !5
  %339 = icmp ne ptr %338, null
  br i1 %339, label %372, label %340

340:                                              ; preds = %331
  br label %341

341:                                              ; preds = %340
  br label %342

342:                                              ; preds = %341
  %343 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %344 = getelementptr inbounds %struct.s2n_debug_info, ptr %343, i32 0, i32 0
  store ptr @.str.25, ptr %344, align 8, !tbaa !11
  %345 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %346 = getelementptr inbounds %struct.s2n_debug_info, ptr %345, i32 0, i32 0
  %347 = load ptr, ptr %346, align 8, !tbaa !11
  %348 = getelementptr inbounds i8, ptr %347, i64 21
  %349 = call ptr @strrchr(ptr noundef %348, i32 noundef 47) #5
  %350 = icmp ne ptr %349, null
  br i1 %350, label %351, label %358

351:                                              ; preds = %342
  %352 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %353 = getelementptr inbounds %struct.s2n_debug_info, ptr %352, i32 0, i32 0
  %354 = load ptr, ptr %353, align 8, !tbaa !11
  %355 = getelementptr inbounds i8, ptr %354, i64 21
  %356 = call ptr @strrchr(ptr noundef %355, i32 noundef 47) #5
  %357 = getelementptr inbounds i8, ptr %356, i64 1
  br label %363

358:                                              ; preds = %342
  %359 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %360 = getelementptr inbounds %struct.s2n_debug_info, ptr %359, i32 0, i32 0
  %361 = load ptr, ptr %360, align 8, !tbaa !11
  %362 = getelementptr inbounds i8, ptr %361, i64 21
  br label %363

363:                                              ; preds = %358, %351
  %364 = phi ptr [ %357, %351 ], [ %362, %358 ]
  %365 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %366 = getelementptr inbounds %struct.s2n_debug_info, ptr %365, i32 0, i32 1
  store ptr %364, ptr %366, align 8, !tbaa !13
  %367 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %367, align 4, !tbaa !9
  %368 = call i32 @s2n_calculate_stacktrace()
  br label %369

369:                                              ; preds = %363
  %370 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %370, align 4, !tbaa !14
  br label %408

371:                                              ; No predecessors!
  br label %372

372:                                              ; preds = %371, %331
  br label %373

373:                                              ; preds = %372
  br label %374

374:                                              ; preds = %373
  %375 = load i32, ptr %7, align 4, !tbaa !9
  %376 = zext i32 %375 to i64
  %377 = getelementptr inbounds [4 x [2 x ptr]], ptr @derive_methods, i64 0, i64 %376
  %378 = load i32, ptr %8, align 4, !tbaa !9
  %379 = zext i32 %378 to i64
  %380 = getelementptr inbounds [2 x ptr], ptr %377, i64 0, i64 %379
  %381 = load ptr, ptr %380, align 8, !tbaa !5
  %382 = load ptr, ptr %6, align 8, !tbaa !5
  %383 = load ptr, ptr %9, align 8, !tbaa !5
  %384 = call i32 %381(ptr noundef %382, ptr noundef %383)
  %385 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  store i32 %384, ptr %385, align 4
  %386 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  %387 = load i32, ptr %386, align 4
  %388 = call zeroext i1 @s2n_result_is_ok(i32 %387)
  br i1 %388, label %391, label %389

389:                                              ; preds = %374
  %390 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %390, align 4, !tbaa !14
  br label %408

391:                                              ; preds = %374
  br label %392

392:                                              ; preds = %391
  br label %393

393:                                              ; preds = %392
  %394 = load ptr, ptr %6, align 8, !tbaa !5
  %395 = load ptr, ptr %9, align 8, !tbaa !5
  %396 = load i32, ptr %7, align 4, !tbaa !9
  %397 = load i32, ptr %8, align 4, !tbaa !9
  %398 = call i32 @s2n_trigger_secret_callbacks(ptr noundef %394, ptr noundef %395, i32 noundef %396, i32 noundef %397)
  %399 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  store i32 %398, ptr %399, align 4
  %400 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  %401 = load i32, ptr %400, align 4
  %402 = call zeroext i1 @s2n_result_is_ok(i32 %401)
  br i1 %402, label %405, label %403

403:                                              ; preds = %393
  %404 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %404, align 4, !tbaa !14
  br label %408

405:                                              ; preds = %393
  br label %406

406:                                              ; preds = %405
  %407 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 0, ptr %407, align 4, !tbaa !14
  br label %408

408:                                              ; preds = %406, %403, %389, %369, %326, %288, %252, %239, %202, %162, %121, %82, %45
  %409 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  %410 = load i32, ptr %409, align 4
  ret i32 %410
}

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

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 = { 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) }

!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, !10, i64 0}
!15 = !{!"", !10, i64 0}
!16 = !{!17, !6, i64 232}
!17 = !{!"s2n_connection", !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 2, !10, i64 2, !10, i64 2, !10, i64 2, !10, i64 2, !10, i64 2, !10, i64 2, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !7, i64 80, !7, i64 102, !7, i64 124, !10, i64 148, !10, i64 152, !18, i64 160, !19, i64 168, !19, i64 176, !7, i64 184, !7, i64 216, !7, i64 217, !7, i64 218, !7, i64 219, !7, i64 220, !7, i64 221, !7, i64 222, !6, i64 224, !6, i64 232, !20, i64 240, !6, i64 632, !6, i64 640, !21, i64 648, !28, i64 1144, !31, i64 1688, !6, i64 1752, !7, i64 1760, !10, i64 1764, !7, i64 1768, !34, i64 1776, !34, i64 1816, !34, i64 1856, !34, i64 1896, !10, i64 1936, !19, i64 1944, !7, i64 1952, !34, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !27, i64 2003, !15, i64 2004, !15, i64 2008, !35, i64 2016, !33, i64 2208, !10, i64 2212, !33, i64 2216, !19, i64 2224, !7, i64 2232, !19, i64 2240, !19, i64 2248, !19, i64 2256, !15, i64 2264, !15, i64 2268, !7, i64 2272, !7, i64 2528, !10, i64 2784, !26, i64 2792, !10, i64 2816, !26, i64 2824, !26, i64 2848, !26, i64 2872, !37, i64 2896, !39, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !10, i64 3780, !26, i64 3784, !10, i64 3808, !41, i64 3816, !7, i64 3848, !34, i64 3992, !26, i64 4032, !26, i64 4056, !27, i64 4080, !27, i64 4081, !27, i64 4082, !33, i64 4084, !33, i64 4086, !10, i64 4088, !10, i64 4092, !26, i64 4096, !10, i64 4120, !42, i64 4128, !15, i64 4176, !7, i64 4180, !7, i64 4181}
!18 = !{!"s2n_timer", !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"s2n_secrets", !7, i64 0, !10, i64 388}
!21 = !{!"s2n_kex_parameters", !22, i64 0, !23, i64 8, !7, i64 24, !23, i64 56, !24, i64 72, !24, i64 184, !7, i64 296, !25, i64 360, !26, i64 448, !26, i64 472}
!22 = !{!"s2n_dh_params", !6, i64 0}
!23 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!24 = !{!"s2n_kem_group_params", !6, i64 0, !25, i64 8, !23, i64 96}
!25 = !{!"s2n_kem_params", !6, i64 0, !26, i64 8, !26, i64 32, !26, i64 56, !27, i64 80}
!26 = !{!"s2n_blob", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!27 = !{!"_Bool", !7, i64 0}
!28 = !{!"s2n_handshake_parameters", !29, i64 0, !29, i64 48, !26, i64 96, !10, i64 120, !30, i64 124, !6, i64 384, !6, i64 392, !6, i64 400, !7, i64 408, !7, i64 440, !7, i64 472, !7, i64 473, !7, i64 474, !7, i64 506}
!29 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!30 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!31 = !{!"s2n_psk_parameters", !10, i64 0, !32, i64 8, !33, i64 40, !33, i64 42, !6, i64 48, !10, i64 56}
!32 = !{!"s2n_array", !26, i64 0, !10, i64 24, !10, i64 28}
!33 = !{!"short", !7, i64 0}
!34 = !{!"s2n_stuffer", !26, i64 0, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 36, !10, i64 36}
!35 = !{!"s2n_handshake", !34, i64 0, !6, i64 40, !7, i64 48, !7, i64 56, !7, i64 104, !7, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !36, i64 176, !10, i64 184, !10, i64 184, !10, i64 184, !10, i64 184, !10, i64 188}
!36 = !{!"s2n_offered_early_data", !6, i64 0}
!37 = !{!"s2n_client_hello", !26, i64 0, !38, i64 24, !26, i64 728, !26, i64 752, !26, i64 776, !7, i64 800, !7, i64 801, !10, i64 802, !10, i64 802, !10, i64 802, !10, i64 802, !10, i64 802, !10, i64 802, !10, i64 802}
!38 = !{!"", !7, i64 0, !26, i64 672, !33, i64 696}
!39 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !33, i64 18, !6, i64 24, !10, i64 32, !6, i64 40, !40, i64 48, !27, i64 52}
!40 = !{!"s2n_cert_validation_info", !10, i64 0, !10, i64 0}
!41 = !{!"s2n_ticket_fields", !26, i64 0, !10, i64 24}
!42 = !{!"s2n_post_handshake", !34, i64 0, !7, i64 40}
!43 = !{!44, !6, i64 0}
!44 = !{!"s2n_crypto_parameters", !6, i64 0, !45, i64 8, !45, i64 16, !46, i64 24, !46, i64 456, !7, i64 888, !7, i64 904, !7, i64 920, !7, i64 928}
!45 = !{!"s2n_session_key", !6, i64 0}
!46 = !{!"s2n_hmac_state", !10, i64 0, !33, i64 4, !10, i64 8, !33, i64 12, !7, i64 14, !47, i64 16, !47, i64 72, !47, i64 128, !47, i64 184, !7, i64 240, !7, i64 368}
!47 = !{!"s2n_hash_state", !6, i64 0, !10, i64 8, !7, i64 12, !19, i64 16, !7, i64 24}
!48 = !{!17, !6, i64 2056}


; 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.17 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [94 x i8], align 1
@derive_methods = external hidden local_unnamed_addr global [4 x [2 x ptr]], align 16
@.str.25 = external hidden unnamed_addr constant [94 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: nounwind uwtable
declare dso_local i32 @s2n_tls13_extract_secret(ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

13:                                               ; preds = %4
  %.not37 = icmp eq ptr %3, null
  br i1 %.not37, 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.18, ptr %15, align 8, !tbaa !5
  %16 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.18, i64 21), i32 noundef 47) #5
  %.not38 = icmp eq ptr %16, null
  %17 = getelementptr inbounds i8, ptr %16, i64 1
  %18 = select i1 %.not38, ptr getelementptr inbounds (i8, ptr @.str.18, 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 %95

22:                                               ; preds = %13
  %23 = getelementptr inbounds i8, ptr %0, i64 232
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  %.not39 = icmp eq ptr %24, null
  br i1 %.not39, label %25, label %33

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

33:                                               ; preds = %22
  %34 = load ptr, ptr %24, align 8, !tbaa !41
  %.not41 = icmp eq ptr %34, null
  br i1 %.not41, label %35, label %43

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

43:                                               ; preds = %33
  %44 = getelementptr inbounds i8, ptr %0, i64 2056
  %45 = load ptr, ptr %44, align 8, !tbaa !46
  %.not43 = icmp eq ptr %45, null
  br i1 %.not43, label %46, label %54

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

54:                                               ; preds = %43
  %.not45 = icmp eq i32 %1, 0
  br i1 %.not45, label %55, label %63

55:                                               ; preds = %54
  %56 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.22, ptr %56, align 8, !tbaa !5
  %57 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.22, i64 21), i32 noundef 47) #5
  %.not46 = icmp eq ptr %57, null
  %58 = getelementptr inbounds i8, ptr %57, i64 1
  %59 = select i1 %.not46, ptr getelementptr inbounds (i8, ptr @.str.22, i64 21), ptr %58
  %60 = getelementptr inbounds i8, ptr %56, i64 8
  store ptr %59, ptr %60, align 8, !tbaa !10
  %61 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %61, align 4, !tbaa !11
  %62 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %95

63:                                               ; preds = %54
  %64 = tail call i32 @s2n_tls13_extract_secret(ptr noundef nonnull %0, i32 noundef %1)
  %65 = tail call zeroext i1 @s2n_result_is_ok(i32 %64)
  br i1 %65, label %66, label %95

66:                                               ; preds = %63
  %67 = icmp ult i32 %1, 4
  br i1 %67, label %76, label %68

68:                                               ; preds = %66
  %69 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.24, ptr %69, align 8, !tbaa !5
  %70 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.24, i64 21), i32 noundef 47) #5
  %.not47 = icmp eq ptr %70, null
  %71 = getelementptr inbounds i8, ptr %70, i64 1
  %72 = select i1 %.not47, ptr getelementptr inbounds (i8, ptr @.str.24, i64 21), ptr %71
  %73 = getelementptr inbounds i8, ptr %69, i64 8
  store ptr %72, ptr %73, align 8, !tbaa !10
  %74 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %74, align 4, !tbaa !11
  %75 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %95

76:                                               ; preds = %66
  %77 = zext nneg i32 %1 to i64
  %78 = zext i32 %2 to i64
  %79 = getelementptr inbounds [4 x [2 x ptr]], ptr @derive_methods, i64 0, i64 %77, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !47
  %.not48 = icmp eq ptr %80, null
  br i1 %.not48, label %81, label %89

81:                                               ; preds = %76
  %82 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.25, ptr %82, align 8, !tbaa !5
  %83 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.25, i64 21), i32 noundef 47) #5
  %.not49 = icmp eq ptr %83, null
  %84 = getelementptr inbounds i8, ptr %83, i64 1
  %85 = select i1 %.not49, ptr getelementptr inbounds (i8, ptr @.str.25, i64 21), ptr %84
  %86 = getelementptr inbounds i8, ptr %82, i64 8
  store ptr %85, ptr %86, align 8, !tbaa !10
  %87 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %87, align 4, !tbaa !11
  %88 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %95

89:                                               ; preds = %76
  %90 = tail call i32 %80(ptr noundef nonnull %0, ptr noundef nonnull %3) #6
  %91 = tail call zeroext i1 @s2n_result_is_ok(i32 %90)
  br i1 %91, label %92, label %95

92:                                               ; preds = %89
  %93 = tail call i32 @s2n_trigger_secret_callbacks(ptr noundef nonnull %0, ptr noundef nonnull %3, i32 noundef %1, i32 noundef %2)
  %94 = tail call zeroext i1 @s2n_result_is_ok(i32 %93)
  %not. = xor i1 %94, true
  %. = sext i1 %not. to i32
  br label %95

95:                                               ; preds = %92, %89, %63, %81, %68, %55, %46, %35, %25, %14, %5
  %.sroa.021.0 = phi i32 [ -1, %81 ], [ -1, %68 ], [ -1, %55 ], [ -1, %46 ], [ -1, %35 ], [ -1, %25 ], [ -1, %14 ], [ -1, %5 ], [ -1, %63 ], [ -1, %89 ], [ %., %92 ]
  ret i32 %.sroa.021.0
}

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

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 = { 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 = !{!14, !7, i64 232}
!14 = !{!"s2n_connection", !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !8, i64 80, !8, i64 102, !8, i64 124, !12, i64 148, !12, i64 152, !15, i64 160, !16, i64 168, !16, i64 176, !8, i64 184, !8, i64 216, !8, i64 217, !8, i64 218, !8, i64 219, !8, i64 220, !8, i64 221, !8, i64 222, !7, i64 224, !7, i64 232, !17, i64 240, !7, i64 632, !7, i64 640, !18, i64 648, !25, i64 1144, !28, i64 1688, !7, i64 1752, !8, i64 1760, !12, i64 1764, !8, i64 1768, !31, i64 1776, !31, i64 1816, !31, i64 1856, !31, i64 1896, !12, i64 1936, !16, i64 1944, !8, i64 1952, !31, i64 1960, !8, i64 2000, !8, i64 2001, !8, i64 2002, !24, i64 2003, !32, i64 2004, !32, i64 2008, !33, i64 2016, !30, i64 2208, !12, i64 2212, !30, i64 2216, !16, i64 2224, !8, i64 2232, !16, i64 2240, !16, i64 2248, !16, i64 2256, !32, i64 2264, !32, i64 2268, !8, i64 2272, !8, i64 2528, !12, i64 2784, !23, i64 2792, !12, i64 2816, !23, i64 2824, !23, i64 2848, !23, i64 2872, !35, i64 2896, !37, i64 3704, !7, i64 3760, !7, i64 3768, !8, i64 3776, !12, i64 3780, !23, i64 3784, !12, i64 3808, !39, i64 3816, !8, i64 3848, !31, i64 3992, !23, i64 4032, !23, i64 4056, !24, i64 4080, !24, i64 4081, !24, i64 4082, !30, i64 4084, !30, i64 4086, !12, i64 4088, !12, i64 4092, !23, i64 4096, !12, i64 4120, !40, i64 4128, !32, i64 4176, !8, i64 4180, !8, i64 4181}
!15 = !{!"s2n_timer", !16, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!"s2n_secrets", !8, i64 0, !12, i64 388}
!18 = !{!"s2n_kex_parameters", !19, i64 0, !20, i64 8, !8, i64 24, !20, i64 56, !21, i64 72, !21, i64 184, !8, i64 296, !22, i64 360, !23, i64 448, !23, i64 472}
!19 = !{!"s2n_dh_params", !7, i64 0}
!20 = !{!"s2n_ecc_evp_params", !7, i64 0, !7, i64 8}
!21 = !{!"s2n_kem_group_params", !7, i64 0, !22, i64 8, !20, i64 96}
!22 = !{!"s2n_kem_params", !7, i64 0, !23, i64 8, !23, i64 32, !23, i64 56, !24, i64 80}
!23 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!24 = !{!"_Bool", !8, i64 0}
!25 = !{!"s2n_handshake_parameters", !26, i64 0, !26, i64 48, !23, i64 96, !12, i64 120, !27, i64 124, !7, i64 384, !7, i64 392, !7, i64 400, !8, i64 408, !8, i64 440, !8, i64 472, !8, i64 473, !8, i64 474, !8, i64 506}
!26 = !{!"s2n_pkey", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!27 = !{!"s2n_sig_scheme_list", !8, i64 0, !8, i64 256}
!28 = !{!"s2n_psk_parameters", !12, i64 0, !29, i64 8, !30, i64 40, !30, i64 42, !7, i64 48, !12, i64 56}
!29 = !{!"s2n_array", !23, i64 0, !12, i64 24, !12, i64 28}
!30 = !{!"short", !8, i64 0}
!31 = !{!"s2n_stuffer", !23, i64 0, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 36, !12, i64 36}
!32 = !{!"", !12, i64 0}
!33 = !{!"s2n_handshake", !31, i64 0, !7, i64 40, !8, i64 48, !8, i64 56, !8, i64 104, !8, i64 152, !12, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !34, i64 176, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 188}
!34 = !{!"s2n_offered_early_data", !7, i64 0}
!35 = !{!"s2n_client_hello", !23, i64 0, !36, i64 24, !23, i64 728, !23, i64 752, !23, i64 776, !8, i64 800, !8, i64 801, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802}
!36 = !{!"", !8, i64 0, !23, i64 672, !30, i64 696}
!37 = !{!"s2n_x509_validator", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 17, !30, i64 18, !7, i64 24, !12, i64 32, !7, i64 40, !38, i64 48, !24, i64 52}
!38 = !{!"s2n_cert_validation_info", !12, i64 0, !12, i64 0}
!39 = !{!"s2n_ticket_fields", !23, i64 0, !12, i64 24}
!40 = !{!"s2n_post_handshake", !31, i64 0, !8, i64 40}
!41 = !{!42, !7, i64 0}
!42 = !{!"s2n_crypto_parameters", !7, i64 0, !43, i64 8, !43, i64 16, !44, i64 24, !44, i64 456, !8, i64 888, !8, i64 904, !8, i64 920, !8, i64 928}
!43 = !{!"s2n_session_key", !7, i64 0}
!44 = !{!"s2n_hmac_state", !12, i64 0, !30, i64 4, !12, i64 8, !30, i64 12, !8, i64 14, !45, i64 16, !45, i64 72, !45, i64 128, !45, i64 184, !8, i64 240, !8, i64 368}
!45 = !{!"s2n_hash_state", !7, i64 0, !12, i64 8, !8, i64 12, !16, i64 16, !8, i64 24}
!46 = !{!14, !7, i64 2056}
!47 = !{!7, !7, i64 0}


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