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

; 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_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.1, i32 }
%union.anon.1 = 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_tls12_secrets = type { [48 x i8], [48 x i8] }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.6 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [87 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_connection_get_master_secret(ptr noundef %0, ptr noundef %1, i64 noundef %2) #4 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  br label %11

11:                                               ; preds = %3
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %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.6, 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) #6
  %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) #6
  %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 !14
  %42 = call i32 @s2n_calculate_stacktrace()
  br label %43

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

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 %6, align 8, !tbaa !5
  %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.7, 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) #6
  %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) #6
  %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 !14
  %78 = call i32 @s2n_calculate_stacktrace()
  br label %79

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

80:                                               ; No predecessors!
  br label %81

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

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  %84 = load i64, ptr %7, align 8, !tbaa !9
  %85 = icmp uge i64 %84, 48
  br i1 %85, label %117, label %86

86:                                               ; preds = %83
  br label %87

87:                                               ; preds = %86
  br label %88

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

97:                                               ; preds = %88
  %98 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %99 = getelementptr inbounds %struct.s2n_debug_info, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !11
  %101 = getelementptr inbounds i8, ptr %100, i64 21
  %102 = call ptr @strrchr(ptr noundef %101, i32 noundef 47) #6
  %103 = getelementptr inbounds i8, ptr %102, i64 1
  br label %109

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

109:                                              ; preds = %104, %97
  %110 = phi ptr [ %103, %97 ], [ %108, %104 ]
  %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 1
  store ptr %110, ptr %112, align 8, !tbaa !13
  %113 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762120, ptr %113, align 4, !tbaa !14
  %114 = call i32 @s2n_calculate_stacktrace()
  br label %115

115:                                              ; preds = %109
  store i32 -1, ptr %4, align 4
  br label %300

116:                                              ; No predecessors!
  br label %117

117:                                              ; preds = %116, %83
  br label %118

118:                                              ; preds = %117
  br label %119

119:                                              ; preds = %118
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.s2n_connection, ptr %120, i32 0, i32 23
  %122 = load i8, ptr %121, align 4, !tbaa !16
  %123 = zext i8 %122 to i32
  %124 = icmp slt i32 %123, 34
  br i1 %124, label %156, label %125

125:                                              ; preds = %119
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  %128 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %129 = getelementptr inbounds %struct.s2n_debug_info, ptr %128, i32 0, i32 0
  store ptr @.str.9, ptr %129, align 8, !tbaa !11
  %130 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %131 = getelementptr inbounds %struct.s2n_debug_info, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !11
  %133 = getelementptr inbounds i8, ptr %132, i64 21
  %134 = call ptr @strrchr(ptr noundef %133, i32 noundef 47) #6
  %135 = icmp ne ptr %134, null
  br i1 %135, label %136, label %143

136:                                              ; preds = %127
  %137 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %138 = getelementptr inbounds %struct.s2n_debug_info, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  %140 = getelementptr inbounds i8, ptr %139, i64 21
  %141 = call ptr @strrchr(ptr noundef %140, i32 noundef 47) #6
  %142 = getelementptr inbounds i8, ptr %141, i64 1
  br label %148

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

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

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

155:                                              ; No predecessors!
  br label %156

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

157:                                              ; preds = %156
  br label %158

158:                                              ; preds = %157
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = call i32 @s2n_conn_get_current_message_type(ptr noundef %159)
  %161 = icmp eq i32 20, %160
  br i1 %161, label %193, label %162

162:                                              ; preds = %158
  br label %163

163:                                              ; preds = %162
  br label %164

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

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

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

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

191:                                              ; preds = %185
  store i32 -1, ptr %4, align 4
  br label %300

192:                                              ; No predecessors!
  br label %193

193:                                              ; preds = %192, %158
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.s2n_connection, ptr %196, i32 0, i32 28
  %198 = getelementptr inbounds %struct.s2n_secrets, ptr %197, i32 0, i32 1
  %199 = load i32, ptr %198, align 4, !tbaa !43
  %200 = icmp eq i32 %199, 0
  br i1 %200, label %232, label %201

201:                                              ; preds = %195
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  %204 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %205 = getelementptr inbounds %struct.s2n_debug_info, ptr %204, i32 0, i32 0
  store ptr @.str.11, ptr %205, align 8, !tbaa !11
  %206 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %207 = getelementptr inbounds %struct.s2n_debug_info, ptr %206, i32 0, i32 0
  %208 = load ptr, ptr %207, align 8, !tbaa !11
  %209 = getelementptr inbounds i8, ptr %208, i64 21
  %210 = call ptr @strrchr(ptr noundef %209, i32 noundef 47) #6
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %219

212:                                              ; preds = %203
  %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
  %215 = load ptr, ptr %214, align 8, !tbaa !11
  %216 = getelementptr inbounds i8, ptr %215, i64 21
  %217 = call ptr @strrchr(ptr noundef %216, i32 noundef 47) #6
  %218 = getelementptr inbounds i8, ptr %217, i64 1
  br label %224

219:                                              ; preds = %203
  %220 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %221 = getelementptr inbounds %struct.s2n_debug_info, ptr %220, i32 0, i32 0
  %222 = load ptr, ptr %221, align 8, !tbaa !11
  %223 = getelementptr inbounds i8, ptr %222, i64 21
  br label %224

224:                                              ; preds = %219, %212
  %225 = phi ptr [ %218, %212 ], [ %223, %219 ]
  %226 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %227 = getelementptr inbounds %struct.s2n_debug_info, ptr %226, i32 0, i32 1
  store ptr %225, ptr %227, align 8, !tbaa !13
  %228 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %228, align 4, !tbaa !14
  %229 = call i32 @s2n_calculate_stacktrace()
  br label %230

230:                                              ; preds = %224
  store i32 -1, ptr %4, align 4
  br label %300

231:                                              ; No predecessors!
  br label %232

232:                                              ; preds = %231, %195
  br label %233

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 48, ptr %8, align 4, !tbaa !14
  %235 = load i32, ptr %8, align 4, !tbaa !14
  %236 = icmp ne i32 %235, 0
  %237 = xor i1 %236, true
  %238 = xor i1 %237, true
  %239 = zext i1 %238 to i32
  %240 = sext i32 %239 to i64
  %241 = call i64 @llvm.expect.i64(i64 %240, i64 1)
  %242 = icmp ne i64 %241, 0
  br i1 %242, label %243, label %295

243:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = load ptr, ptr %5, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.s2n_connection, ptr %245, i32 0, i32 28
  %247 = getelementptr inbounds %struct.s2n_secrets, ptr %246, i32 0, i32 0
  %248 = getelementptr inbounds %struct.s2n_tls12_secrets, ptr %247, i32 0, i32 1
  %249 = getelementptr inbounds [48 x i8], ptr %248, i64 0, i64 0
  %250 = load i32, ptr %8, align 4, !tbaa !14
  %251 = sext i32 %250 to i64
  %252 = call ptr @s2n_ensure_memmove_trace(ptr noundef %244, ptr noundef %249, i64 noundef %251)
  store ptr %252, ptr %9, align 8, !tbaa !5
  br label %253

253:                                              ; preds = %243
  %254 = load ptr, ptr %9, align 8, !tbaa !5
  %255 = icmp ne ptr %254, null
  br i1 %255, label %289, label %256

256:                                              ; preds = %253
  br label %257

257:                                              ; preds = %256
  br label %258

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

267:                                              ; preds = %258
  %268 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %269 = getelementptr inbounds %struct.s2n_debug_info, ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %269, align 8, !tbaa !11
  %271 = getelementptr inbounds i8, ptr %270, i64 21
  %272 = call ptr @strrchr(ptr noundef %271, i32 noundef 47) #6
  %273 = getelementptr inbounds i8, ptr %272, i64 1
  br label %279

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

279:                                              ; preds = %274, %267
  %280 = phi ptr [ %273, %267 ], [ %278, %274 ]
  %281 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %282 = getelementptr inbounds %struct.s2n_debug_info, ptr %281, i32 0, i32 1
  store ptr %280, ptr %282, align 8, !tbaa !13
  %283 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %283, align 4, !tbaa !14
  %284 = call i32 @s2n_calculate_stacktrace()
  br label %285

285:                                              ; preds = %279
  br label %286

286:                                              ; preds = %285
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %292

287:                                              ; No predecessors!
  br label %288

288:                                              ; preds = %287
  br label %289

289:                                              ; preds = %288, %253
  br label %290

290:                                              ; preds = %289
  br label %291

291:                                              ; preds = %290
  store i32 0, ptr %10, align 4
  br label %292

292:                                              ; preds = %291, %286
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %293 = load i32, ptr %10, align 4
  switch i32 %293, label %296 [
    i32 0, label %294
  ]

294:                                              ; preds = %292
  br label %295

295:                                              ; preds = %294, %234
  store i32 0, ptr %10, align 4
  br label %296

296:                                              ; preds = %295, %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %297 = load i32, ptr %10, align 4
  switch i32 %297, label %302 [
    i32 0, label %298
    i32 1, label %300
  ]

298:                                              ; preds = %296
  br label %299

299:                                              ; preds = %298
  store i32 0, ptr %4, align 4
  br label %300

300:                                              ; preds = %299, %296, %230, %191, %154, %115, %79, %43
  %301 = load i32, ptr %4, align 4
  ret i32 %301

302:                                              ; preds = %296
  unreachable
}

declare i32 @s2n_conn_get_current_message_type(ptr noundef) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !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, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !7, i64 220}
!17 = !{!"s2n_connection", !15, i64 0, !15, i64 0, !15, i64 0, !15, i64 0, !15, i64 0, !15, i64 0, !15, i64 0, !15, i64 0, !15, i64 1, !15, i64 1, !15, i64 1, !15, i64 1, !15, i64 1, !15, i64 1, !15, i64 1, !15, i64 1, !15, i64 2, !15, i64 2, !15, i64 2, !15, i64 2, !15, i64 2, !15, i64 2, !15, 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, !15, i64 148, !15, i64 152, !18, i64 160, !10, i64 168, !10, 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, !19, i64 240, !6, i64 632, !6, i64 640, !20, i64 648, !27, i64 1144, !30, i64 1688, !6, i64 1752, !7, i64 1760, !15, i64 1764, !7, i64 1768, !33, i64 1776, !33, i64 1816, !33, i64 1856, !33, i64 1896, !15, i64 1936, !10, i64 1944, !7, i64 1952, !33, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !26, i64 2003, !34, i64 2004, !34, i64 2008, !35, i64 2016, !32, i64 2208, !15, i64 2212, !32, i64 2216, !10, i64 2224, !7, i64 2232, !10, i64 2240, !10, i64 2248, !10, i64 2256, !34, i64 2264, !34, i64 2268, !7, i64 2272, !7, i64 2528, !15, i64 2784, !25, i64 2792, !15, i64 2816, !25, i64 2824, !25, i64 2848, !25, i64 2872, !37, i64 2896, !39, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !15, i64 3780, !25, i64 3784, !15, i64 3808, !41, i64 3816, !7, i64 3848, !33, i64 3992, !25, i64 4032, !25, i64 4056, !26, i64 4080, !26, i64 4081, !26, i64 4082, !32, i64 4084, !32, i64 4086, !15, i64 4088, !15, i64 4092, !25, i64 4096, !15, i64 4120, !42, i64 4128, !34, i64 4176, !7, i64 4180, !7, i64 4181}
!18 = !{!"s2n_timer", !10, i64 0}
!19 = !{!"s2n_secrets", !7, i64 0, !15, i64 388}
!20 = !{!"s2n_kex_parameters", !21, i64 0, !22, i64 8, !7, i64 24, !22, i64 56, !23, i64 72, !23, i64 184, !7, i64 296, !24, i64 360, !25, i64 448, !25, i64 472}
!21 = !{!"s2n_dh_params", !6, i64 0}
!22 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!23 = !{!"s2n_kem_group_params", !6, i64 0, !24, i64 8, !22, i64 96}
!24 = !{!"s2n_kem_params", !6, i64 0, !25, i64 8, !25, i64 32, !25, i64 56, !26, i64 80}
!25 = !{!"s2n_blob", !6, i64 0, !15, i64 8, !15, i64 12, !15, i64 16}
!26 = !{!"_Bool", !7, i64 0}
!27 = !{!"s2n_handshake_parameters", !28, i64 0, !28, i64 48, !25, i64 96, !15, i64 120, !29, 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}
!28 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!29 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!30 = !{!"s2n_psk_parameters", !15, i64 0, !31, i64 8, !32, i64 40, !32, i64 42, !6, i64 48, !15, i64 56}
!31 = !{!"s2n_array", !25, i64 0, !15, i64 24, !15, i64 28}
!32 = !{!"short", !7, i64 0}
!33 = !{!"s2n_stuffer", !25, i64 0, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 36, !15, i64 36}
!34 = !{!"", !15, i64 0}
!35 = !{!"s2n_handshake", !33, i64 0, !6, i64 40, !7, i64 48, !7, i64 56, !7, i64 104, !7, i64 152, !15, i64 156, !15, i64 160, !15, i64 164, !15, i64 168, !36, i64 176, !15, i64 184, !15, i64 184, !15, i64 184, !15, i64 184, !15, i64 188}
!36 = !{!"s2n_offered_early_data", !6, i64 0}
!37 = !{!"s2n_client_hello", !25, i64 0, !38, i64 24, !25, i64 728, !25, i64 752, !25, i64 776, !7, i64 800, !7, i64 801, !15, i64 802, !15, i64 802, !15, i64 802, !15, i64 802, !15, i64 802, !15, i64 802, !15, i64 802}
!38 = !{!"", !7, i64 0, !25, i64 672, !32, i64 696}
!39 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !32, i64 18, !6, i64 24, !15, i64 32, !6, i64 40, !40, i64 48, !26, i64 52}
!40 = !{!"s2n_cert_validation_info", !15, i64 0, !15, i64 0}
!41 = !{!"s2n_ticket_fields", !25, i64 0, !15, i64 24}
!42 = !{!"s2n_post_handshake", !33, i64 0, !7, i64 40}
!43 = !{!17, !15, i64 628}


; 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.6 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [87 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: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_connection_get_master_secret(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #3 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %12

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

12:                                               ; preds = %3
  %.not25 = icmp eq ptr %1, null
  br i1 %.not25, label %13, label %21

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

21:                                               ; preds = %12
  %22 = icmp ugt i64 %2, 47
  br i1 %22, label %31, label %23

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

31:                                               ; preds = %21
  %32 = getelementptr inbounds i8, ptr %0, i64 220
  %33 = load i8, ptr %32, align 4, !tbaa !13
  %34 = icmp ult i8 %33, 34
  br i1 %34, label %43, label %35

35:                                               ; preds = %31
  %36 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.9, ptr %36, align 8, !tbaa !5
  %37 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.9, i64 21), i32 noundef 47) #4
  %.not28 = icmp eq ptr %37, null
  %38 = getelementptr inbounds i8, ptr %37, i64 1
  %39 = select i1 %.not28, ptr getelementptr inbounds (i8, ptr @.str.9, 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 469762112, ptr %41, align 4, !tbaa !11
  %42 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %77

43:                                               ; preds = %31
  %44 = tail call i32 @s2n_conn_get_current_message_type(ptr noundef nonnull %0) #5
  %45 = icmp eq i32 %44, 20
  br i1 %45, label %54, label %46

46:                                               ; preds = %43
  %47 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.10, ptr %47, align 8, !tbaa !5
  %48 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.10, i64 21), i32 noundef 47) #4
  %.not29 = icmp eq ptr %48, null
  %49 = getelementptr inbounds i8, ptr %48, i64 1
  %50 = select i1 %.not29, ptr getelementptr inbounds (i8, ptr @.str.10, 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 469762124, ptr %52, align 4, !tbaa !11
  %53 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %77

54:                                               ; preds = %43
  %55 = getelementptr inbounds i8, ptr %0, i64 628
  %56 = load i32, ptr %55, align 4, !tbaa !41
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %66, label %58

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

66:                                               ; preds = %54
  %67 = getelementptr inbounds i8, ptr %0, i64 288
  %68 = tail call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %1, ptr noundef nonnull %67, i64 noundef 48) #5
  %.not31.not.not = icmp eq ptr %68, null
  br i1 %.not31.not.not, label %69, label %.critedge

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

.critedge:                                        ; preds = %66, %69
  %spec.select = sext i1 %.not31.not.not to i32
  br label %77

77:                                               ; preds = %.critedge, %58, %46, %35, %23, %13, %4
  %.3 = phi i32 [ -1, %58 ], [ -1, %46 ], [ -1, %35 ], [ -1, %23 ], [ -1, %13 ], [ -1, %4 ], [ %spec.select, %.critedge ]
  ret i32 %.3
}

declare i32 @s2n_conn_get_current_message_type(ptr noundef) local_unnamed_addr #2

declare ptr @s2n_ensure_memmove_trace(ptr noundef, ptr noundef, i64 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 = { 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 willreturn memory(read) }
attributes #5 = { nounwind }

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

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


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