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

; 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_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%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, i32 }
%union.anon = 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_post_handshake = type { %struct.s2n_stuffer, [4 x i8] }
%struct.s2n_atomic_flag = type { i32 }

@_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 [91 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [92 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: nounwind uwtable
define dso_local i32 @s2n_renegotiate_wipe(ptr noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %struct.s2n_stuffer, align 8
  %5 = alloca %struct.s2n_stuffer, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i16, align 2
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i8, align 1
  %21 = alloca i8, align 1
  %22 = alloca [48 x i8], align 16
  %23 = alloca i8, align 1
  %24 = alloca ptr, align 8
  %25 = alloca [48 x i8], align 16
  %26 = alloca i8, align 1
  %27 = alloca ptr, align 8
  %28 = alloca %struct.s2n_result, align 4
  %29 = alloca %struct.s2n_result, align 4
  %30 = alloca i8, align 1
  %31 = alloca ptr, align 8
  %32 = alloca i8, align 1
  %33 = alloca ptr, align 8
  %34 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %1
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %69, label %38

38:                                               ; preds = %35
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %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 0
  store ptr @.str.6, ptr %42, align 8, !tbaa !9
  %43 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %44 = getelementptr inbounds %struct.s2n_debug_info, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %45, i64 21
  %47 = call ptr @strrchr(ptr noundef %46, i32 noundef 47) #9
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %56

49:                                               ; preds = %40
  %50 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %51 = getelementptr inbounds %struct.s2n_debug_info, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %52, i64 21
  %54 = call ptr @strrchr(ptr noundef %53, i32 noundef 47) #9
  %55 = getelementptr inbounds i8, ptr %54, i64 1
  br label %61

56:                                               ; preds = %40
  %57 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %58 = getelementptr inbounds %struct.s2n_debug_info, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %59, i64 21
  br label %61

61:                                               ; preds = %56, %49
  %62 = phi ptr [ %55, %49 ], [ %60, %56 ]
  %63 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %64 = getelementptr inbounds %struct.s2n_debug_info, ptr %63, i32 0, i32 1
  store ptr %62, ptr %64, align 8, !tbaa !11
  %65 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %65, align 4, !tbaa !12
  %66 = call i32 @s2n_calculate_stacktrace()
  br label %67

67:                                               ; preds = %61
  store i32 -1, ptr %2, align 4
  br label %798

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68, %35
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.s2n_connection, ptr %72, i32 0, i32 13
  %74 = load i32, ptr %73, align 4, !tbaa !14
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %109, label %76

76:                                               ; preds = %71
  %77 = call zeroext i1 (...) @s2n_in_unit_test()
  br i1 %77, label %109, label %78

78:                                               ; preds = %76
  br label %79

79:                                               ; preds = %78
  br label %80

80:                                               ; preds = %79
  %81 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %82 = getelementptr inbounds %struct.s2n_debug_info, ptr %81, i32 0, i32 0
  store ptr @.str.7, ptr %82, align 8, !tbaa !9
  %83 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %84 = getelementptr inbounds %struct.s2n_debug_info, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %85, i64 21
  %87 = call ptr @strrchr(ptr noundef %86, i32 noundef 47) #9
  %88 = icmp ne ptr %87, null
  br i1 %88, label %89, label %96

89:                                               ; preds = %80
  %90 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %91 = getelementptr inbounds %struct.s2n_debug_info, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !9
  %93 = getelementptr inbounds i8, ptr %92, i64 21
  %94 = call ptr @strrchr(ptr noundef %93, i32 noundef 47) #9
  %95 = getelementptr inbounds i8, ptr %94, i64 1
  br label %101

96:                                               ; preds = %80
  %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 !9
  %100 = getelementptr inbounds i8, ptr %99, i64 21
  br label %101

101:                                              ; preds = %96, %89
  %102 = phi ptr [ %95, %89 ], [ %100, %96 ]
  %103 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %104 = getelementptr inbounds %struct.s2n_debug_info, ptr %103, i32 0, i32 1
  store ptr %102, ptr %104, align 8, !tbaa !11
  %105 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544398, ptr %105, align 4, !tbaa !12
  %106 = call i32 @s2n_calculate_stacktrace()
  br label %107

107:                                              ; preds = %101
  store i32 -1, ptr %2, align 4
  br label %798

108:                                              ; No predecessors!
  br label %109

109:                                              ; preds = %108, %76, %71
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.s2n_connection, ptr %112, i32 0, i32 38
  %114 = getelementptr inbounds %struct.s2n_stuffer, ptr %113, i32 0, i32 2
  %115 = load i32, ptr %114, align 4, !tbaa !42
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.s2n_connection, ptr %116, i32 0, i32 38
  %118 = getelementptr inbounds %struct.s2n_stuffer, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 8, !tbaa !43
  %120 = sub i32 %115, %119
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %153, label %122

122:                                              ; preds = %111
  br label %123

123:                                              ; preds = %122
  br label %124

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

133:                                              ; preds = %124
  %134 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %135 = getelementptr inbounds %struct.s2n_debug_info, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = getelementptr inbounds i8, ptr %136, i64 21
  %138 = call ptr @strrchr(ptr noundef %137, i32 noundef 47) #9
  %139 = getelementptr inbounds i8, ptr %138, i64 1
  br label %145

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

145:                                              ; preds = %140, %133
  %146 = phi ptr [ %139, %133 ], [ %144, %140 ]
  %147 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %148 = getelementptr inbounds %struct.s2n_debug_info, ptr %147, i32 0, i32 1
  store ptr %146, ptr %148, align 8, !tbaa !11
  %149 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762112, ptr %149, align 4, !tbaa !12
  %150 = call i32 @s2n_calculate_stacktrace()
  br label %151

151:                                              ; preds = %145
  store i32 -1, ptr %2, align 4
  br label %798

152:                                              ; No predecessors!
  br label %153

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

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.s2n_connection, ptr %156, i32 0, i32 40
  %158 = getelementptr inbounds %struct.s2n_stuffer, ptr %157, i32 0, i32 2
  %159 = load i32, ptr %158, align 4, !tbaa !44
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.s2n_connection, ptr %160, i32 0, i32 40
  %162 = getelementptr inbounds %struct.s2n_stuffer, ptr %161, i32 0, i32 1
  %163 = load i32, ptr %162, align 8, !tbaa !45
  %164 = sub i32 %159, %163
  %165 = icmp eq i32 %164, 0
  br i1 %165, label %197, label %166

166:                                              ; preds = %155
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167
  %169 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %170 = getelementptr inbounds %struct.s2n_debug_info, ptr %169, i32 0, i32 0
  store ptr @.str.9, ptr %170, align 8, !tbaa !9
  %171 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %172 = getelementptr inbounds %struct.s2n_debug_info, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !9
  %174 = getelementptr inbounds i8, ptr %173, i64 21
  %175 = call ptr @strrchr(ptr noundef %174, i32 noundef 47) #9
  %176 = icmp ne ptr %175, null
  br i1 %176, label %177, label %184

177:                                              ; preds = %168
  %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 !9
  %181 = getelementptr inbounds i8, ptr %180, i64 21
  %182 = call ptr @strrchr(ptr noundef %181, i32 noundef 47) #9
  %183 = getelementptr inbounds i8, ptr %182, i64 1
  br label %189

184:                                              ; preds = %168
  %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 !9
  %188 = getelementptr inbounds i8, ptr %187, i64 21
  br label %189

189:                                              ; preds = %184, %177
  %190 = phi ptr [ %183, %177 ], [ %188, %184 ]
  %191 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %192 = getelementptr inbounds %struct.s2n_debug_info, ptr %191, i32 0, i32 1
  store ptr %190, ptr %192, align 8, !tbaa !11
  %193 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762112, ptr %193, align 4, !tbaa !12
  %194 = call i32 @s2n_calculate_stacktrace()
  br label %195

195:                                              ; preds = %189
  store i32 -1, ptr %2, align 4
  br label %798

196:                                              ; No predecessors!
  br label %197

197:                                              ; preds = %196, %155
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.s2n_connection, ptr %200, i32 0, i32 41
  %202 = getelementptr inbounds %struct.s2n_stuffer, ptr %201, i32 0, i32 2
  %203 = load i32, ptr %202, align 4, !tbaa !46
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.s2n_connection, ptr %204, i32 0, i32 41
  %206 = getelementptr inbounds %struct.s2n_stuffer, ptr %205, i32 0, i32 1
  %207 = load i32, ptr %206, align 8, !tbaa !47
  %208 = sub i32 %203, %207
  %209 = icmp eq i32 %208, 0
  br i1 %209, label %241, label %210

210:                                              ; preds = %199
  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.10, ptr %214, align 8, !tbaa !9
  %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 !9
  %218 = getelementptr inbounds i8, ptr %217, i64 21
  %219 = call ptr @strrchr(ptr noundef %218, i32 noundef 47) #9
  %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 !9
  %225 = getelementptr inbounds i8, ptr %224, i64 21
  %226 = call ptr @strrchr(ptr noundef %225, i32 noundef 47) #9
  %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 !9
  %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 !11
  %237 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762112, ptr %237, align 4, !tbaa !12
  %238 = call i32 @s2n_calculate_stacktrace()
  br label %239

239:                                              ; preds = %233
  store i32 -1, ptr %2, align 4
  br label %798

240:                                              ; No predecessors!
  br label %241

241:                                              ; preds = %240, %199
  br label %242

242:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #10
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.s2n_connection, ptr %243, i32 0, i32 39
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %244, i64 40, i1 false), !tbaa.struct !48
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.s2n_connection, ptr %245, i32 0, i32 39
  call void @llvm.memset.p0.i64(ptr align 8 %5, i8 0, i64 40, i1 false)
  %247 = getelementptr inbounds %struct.s2n_stuffer, ptr %5, i32 0, i32 0
  %248 = getelementptr inbounds %struct.s2n_blob, ptr %247, i32 0, i32 0
  %249 = getelementptr inbounds %struct.s2n_blob, ptr %247, i32 0, i32 1
  %250 = getelementptr inbounds %struct.s2n_blob, ptr %247, i32 0, i32 2
  %251 = getelementptr inbounds %struct.s2n_blob, ptr %247, i32 0, i32 3
  %252 = getelementptr inbounds %struct.s2n_stuffer, ptr %5, i32 0, i32 1
  %253 = getelementptr inbounds %struct.s2n_stuffer, ptr %5, i32 0, i32 2
  %254 = getelementptr inbounds %struct.s2n_stuffer, ptr %5, i32 0, i32 3
  %255 = getelementptr inbounds %struct.s2n_stuffer, ptr %5, i32 0, i32 4
  %256 = getelementptr inbounds %struct.s2n_stuffer, ptr %5, i32 0, i32 4
  %257 = getelementptr inbounds %struct.s2n_stuffer, ptr %5, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %246, ptr align 8 %5, i64 40, i1 false), !tbaa.struct !48
  br label %258

258:                                              ; preds = %242
  %259 = load ptr, ptr %3, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.s2n_connection, ptr %259, i32 0, i32 39
  %261 = call i32 @s2n_stuffer_growable_alloc(ptr noundef %260, i32 noundef 0)
  %262 = icmp sgt i32 %261, -1
  br i1 %262, label %264, label %263

263:                                              ; preds = %258
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %796

264:                                              ; preds = %258
  br label %265

265:                                              ; preds = %264
  br label %266

266:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %267 = load ptr, ptr %3, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.s2n_connection, ptr %267, i32 0, i32 27
  %269 = load ptr, ptr %268, align 8, !tbaa !50
  store ptr %269, ptr %7, align 8, !tbaa !5
  %270 = load ptr, ptr %3, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.s2n_connection, ptr %270, i32 0, i32 27
  store ptr null, ptr %271, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #10
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.s2n_connection, ptr %272, i32 0, i32 53
  %274 = load i16, ptr %273, align 8, !tbaa !51
  store i16 %274, ptr %8, align 2, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #10
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.s2n_connection, ptr %275, i32 0, i32 23
  %277 = load i8, ptr %276, align 4, !tbaa !53
  store i8 %277, ptr %9, align 1, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #10
  %278 = load ptr, ptr %3, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.s2n_connection, ptr %278, i32 0, i32 22
  %280 = load i8, ptr %279, align 1, !tbaa !54
  store i8 %280, ptr %10, align 1, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #10
  %281 = load ptr, ptr %3, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.s2n_connection, ptr %281, i32 0, i32 21
  %283 = load i8, ptr %282, align 2, !tbaa !55
  store i8 %283, ptr %11, align 1, !tbaa !49
  br label %284

284:                                              ; preds = %266
  %285 = load i8, ptr %9, align 1, !tbaa !49
  %286 = zext i8 %285 to i32
  %287 = icmp slt i32 %286, 34
  br i1 %287, label %321, label %288

288:                                              ; preds = %284
  br label %289

289:                                              ; preds = %288
  br label %290

290:                                              ; preds = %289
  %291 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %292 = getelementptr inbounds %struct.s2n_debug_info, ptr %291, i32 0, i32 0
  store ptr @.str.11, ptr %292, align 8, !tbaa !9
  %293 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %294 = getelementptr inbounds %struct.s2n_debug_info, ptr %293, i32 0, i32 0
  %295 = load ptr, ptr %294, align 8, !tbaa !9
  %296 = getelementptr inbounds i8, ptr %295, i64 21
  %297 = call ptr @strrchr(ptr noundef %296, i32 noundef 47) #9
  %298 = icmp ne ptr %297, null
  br i1 %298, label %299, label %306

299:                                              ; preds = %290
  %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
  %302 = load ptr, ptr %301, align 8, !tbaa !9
  %303 = getelementptr inbounds i8, ptr %302, i64 21
  %304 = call ptr @strrchr(ptr noundef %303, i32 noundef 47) #9
  %305 = getelementptr inbounds i8, ptr %304, i64 1
  br label %311

306:                                              ; preds = %290
  %307 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %308 = getelementptr inbounds %struct.s2n_debug_info, ptr %307, i32 0, i32 0
  %309 = load ptr, ptr %308, align 8, !tbaa !9
  %310 = getelementptr inbounds i8, ptr %309, i64 21
  br label %311

311:                                              ; preds = %306, %299
  %312 = phi ptr [ %305, %299 ], [ %310, %306 ]
  %313 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %314 = getelementptr inbounds %struct.s2n_debug_info, ptr %313, i32 0, i32 1
  store ptr %312, ptr %314, align 8, !tbaa !11
  %315 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544384, ptr %315, align 4, !tbaa !12
  %316 = call i32 @s2n_calculate_stacktrace()
  br label %317

317:                                              ; preds = %311
  br label %318

318:                                              ; preds = %317
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %793

319:                                              ; No predecessors!
  br label %320

320:                                              ; preds = %319
  br label %321

321:                                              ; preds = %320, %284
  br label %322

322:                                              ; preds = %321
  br label %323

323:                                              ; preds = %322
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %324 = load ptr, ptr %3, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.s2n_connection, ptr %324, i32 0, i32 58
  %326 = load i64, ptr %325, align 8, !tbaa !56
  store i64 %326, ptr %12, align 8, !tbaa !57
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %327 = load ptr, ptr %3, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.s2n_connection, ptr %327, i32 0, i32 59
  %329 = load i64, ptr %328, align 8, !tbaa !58
  store i64 %329, ptr %13, align 8, !tbaa !57
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #10
  %330 = load ptr, ptr %3, align 8, !tbaa !5
  %331 = load i32, ptr %330, align 8
  %332 = lshr i32 %331, 8
  %333 = and i32 %332, 1
  %334 = icmp ne i32 %333, 0
  %335 = zext i1 %334 to i8
  store i8 %335, ptr %14, align 1, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %336 = load ptr, ptr %3, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.s2n_connection, ptr %336, i32 0, i32 6
  %338 = load ptr, ptr %337, align 8, !tbaa !60
  store ptr %338, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %339 = load ptr, ptr %3, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.s2n_connection, ptr %339, i32 0, i32 8
  %341 = load ptr, ptr %340, align 8, !tbaa !61
  store ptr %341, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #10
  %342 = load ptr, ptr %3, align 8, !tbaa !5
  %343 = load i32, ptr %342, align 8
  %344 = lshr i32 %343, 9
  %345 = and i32 %344, 1
  %346 = icmp ne i32 %345, 0
  %347 = zext i1 %346 to i8
  store i8 %347, ptr %17, align 1, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %348 = load ptr, ptr %3, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.s2n_connection, ptr %348, i32 0, i32 7
  %350 = load ptr, ptr %349, align 8, !tbaa !62
  store ptr %350, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %351 = load ptr, ptr %3, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.s2n_connection, ptr %351, i32 0, i32 9
  %353 = load ptr, ptr %352, align 8, !tbaa !63
  store ptr %353, ptr %19, align 8, !tbaa !5
  %354 = load ptr, ptr %3, align 8, !tbaa !5
  %355 = load i32, ptr %354, align 8
  %356 = and i32 %355, -257
  %357 = or i32 %356, 0
  store i32 %357, ptr %354, align 8
  %358 = load ptr, ptr %3, align 8, !tbaa !5
  %359 = load i32, ptr %358, align 8
  %360 = and i32 %359, -513
  %361 = or i32 %360, 0
  store i32 %361, ptr %358, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #10
  %362 = load ptr, ptr %3, align 8, !tbaa !5
  %363 = load i32, ptr %362, align 8
  %364 = lshr i32 %363, 3
  %365 = and i32 %364, 1
  %366 = icmp ne i32 %365, 0
  %367 = zext i1 %366 to i8
  store i8 %367, ptr %20, align 1, !tbaa !59
  br label %368

368:                                              ; preds = %323
  %369 = load i8, ptr %20, align 1, !tbaa !59, !range !64, !noundef !65
  %370 = trunc i8 %369 to i1
  br i1 %370, label %404, label %371

371:                                              ; preds = %368
  br label %372

372:                                              ; preds = %371
  br label %373

373:                                              ; preds = %372
  %374 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %375 = getelementptr inbounds %struct.s2n_debug_info, ptr %374, i32 0, i32 0
  store ptr @.str.12, ptr %375, align 8, !tbaa !9
  %376 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %377 = getelementptr inbounds %struct.s2n_debug_info, ptr %376, i32 0, i32 0
  %378 = load ptr, ptr %377, align 8, !tbaa !9
  %379 = getelementptr inbounds i8, ptr %378, i64 21
  %380 = call ptr @strrchr(ptr noundef %379, i32 noundef 47) #9
  %381 = icmp ne ptr %380, null
  br i1 %381, label %382, label %389

382:                                              ; preds = %373
  %383 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %384 = getelementptr inbounds %struct.s2n_debug_info, ptr %383, i32 0, i32 0
  %385 = load ptr, ptr %384, align 8, !tbaa !9
  %386 = getelementptr inbounds i8, ptr %385, i64 21
  %387 = call ptr @strrchr(ptr noundef %386, i32 noundef 47) #9
  %388 = getelementptr inbounds i8, ptr %387, i64 1
  br label %394

389:                                              ; preds = %373
  %390 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %391 = getelementptr inbounds %struct.s2n_debug_info, ptr %390, i32 0, i32 0
  %392 = load ptr, ptr %391, align 8, !tbaa !9
  %393 = getelementptr inbounds i8, ptr %392, i64 21
  br label %394

394:                                              ; preds = %389, %382
  %395 = phi ptr [ %388, %382 ], [ %393, %389 ]
  %396 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %397 = getelementptr inbounds %struct.s2n_debug_info, ptr %396, i32 0, i32 1
  store ptr %395, ptr %397, align 8, !tbaa !11
  %398 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544398, ptr %398, align 4, !tbaa !12
  %399 = call i32 @s2n_calculate_stacktrace()
  br label %400

400:                                              ; preds = %394
  br label %401

401:                                              ; preds = %400
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %792

402:                                              ; No predecessors!
  br label %403

403:                                              ; preds = %402
  br label %404

404:                                              ; preds = %403, %368
  br label %405

405:                                              ; preds = %404
  br label %406

406:                                              ; preds = %405
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #10
  %407 = load ptr, ptr %3, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.s2n_connection, ptr %407, i32 0, i32 52
  %409 = getelementptr inbounds %struct.s2n_handshake, ptr %408, i32 0, i32 5
  %410 = load i8, ptr %409, align 8, !tbaa !66
  store i8 %410, ptr %21, align 1, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 48, ptr %22) #10
  call void @llvm.memset.p0.i64(ptr align 16 %22, i8 0, i64 48, i1 false)
  br label %411

411:                                              ; preds = %406
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #10
  %412 = load i8, ptr %21, align 1, !tbaa !49
  store i8 %412, ptr %23, align 1, !tbaa !49
  %413 = load i8, ptr %23, align 1, !tbaa !49
  %414 = icmp ne i8 %413, 0
  %415 = xor i1 %414, true
  %416 = xor i1 %415, true
  %417 = zext i1 %416 to i32
  %418 = sext i32 %417 to i64
  %419 = call i64 @llvm.expect.i64(i64 %418, i64 1)
  %420 = icmp ne i64 %419, 0
  br i1 %420, label %421, label %472

421:                                              ; preds = %411
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  %422 = getelementptr inbounds [48 x i8], ptr %22, i64 0, i64 0
  %423 = load ptr, ptr %3, align 8, !tbaa !5
  %424 = getelementptr inbounds %struct.s2n_connection, ptr %423, i32 0, i32 52
  %425 = getelementptr inbounds %struct.s2n_handshake, ptr %424, i32 0, i32 4
  %426 = getelementptr inbounds [48 x i8], ptr %425, i64 0, i64 0
  %427 = load i8, ptr %23, align 1, !tbaa !49
  %428 = zext i8 %427 to i64
  %429 = call ptr @s2n_ensure_memmove_trace(ptr noundef %422, ptr noundef %426, i64 noundef %428)
  store ptr %429, ptr %24, align 8, !tbaa !5
  br label %430

430:                                              ; preds = %421
  %431 = load ptr, ptr %24, align 8, !tbaa !5
  %432 = icmp ne ptr %431, null
  br i1 %432, label %466, label %433

433:                                              ; preds = %430
  br label %434

434:                                              ; preds = %433
  br label %435

435:                                              ; preds = %434
  %436 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %437 = getelementptr inbounds %struct.s2n_debug_info, ptr %436, i32 0, i32 0
  store ptr @.str.13, ptr %437, align 8, !tbaa !9
  %438 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %439 = getelementptr inbounds %struct.s2n_debug_info, ptr %438, i32 0, i32 0
  %440 = load ptr, ptr %439, align 8, !tbaa !9
  %441 = getelementptr inbounds i8, ptr %440, i64 21
  %442 = call ptr @strrchr(ptr noundef %441, i32 noundef 47) #9
  %443 = icmp ne ptr %442, null
  br i1 %443, label %444, label %451

444:                                              ; preds = %435
  %445 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %446 = getelementptr inbounds %struct.s2n_debug_info, ptr %445, i32 0, i32 0
  %447 = load ptr, ptr %446, align 8, !tbaa !9
  %448 = getelementptr inbounds i8, ptr %447, i64 21
  %449 = call ptr @strrchr(ptr noundef %448, i32 noundef 47) #9
  %450 = getelementptr inbounds i8, ptr %449, i64 1
  br label %456

451:                                              ; preds = %435
  %452 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %453 = getelementptr inbounds %struct.s2n_debug_info, ptr %452, i32 0, i32 0
  %454 = load ptr, ptr %453, align 8, !tbaa !9
  %455 = getelementptr inbounds i8, ptr %454, i64 21
  br label %456

456:                                              ; preds = %451, %444
  %457 = phi ptr [ %450, %444 ], [ %455, %451 ]
  %458 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %459 = getelementptr inbounds %struct.s2n_debug_info, ptr %458, i32 0, i32 1
  store ptr %457, ptr %459, align 8, !tbaa !11
  %460 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %460, align 4, !tbaa !12
  %461 = call i32 @s2n_calculate_stacktrace()
  br label %462

462:                                              ; preds = %456
  br label %463

463:                                              ; preds = %462
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %469

464:                                              ; No predecessors!
  br label %465

465:                                              ; preds = %464
  br label %466

466:                                              ; preds = %465, %430
  br label %467

467:                                              ; preds = %466
  br label %468

468:                                              ; preds = %467
  store i32 0, ptr %6, align 4
  br label %469

469:                                              ; preds = %468, %463
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  %470 = load i32, ptr %6, align 4
  switch i32 %470, label %473 [
    i32 0, label %471
  ]

471:                                              ; preds = %469
  br label %472

472:                                              ; preds = %471, %411
  store i32 0, ptr %6, align 4
  br label %473

473:                                              ; preds = %472, %469
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #10
  %474 = load i32, ptr %6, align 4
  switch i32 %474, label %791 [
    i32 0, label %475
  ]

475:                                              ; preds = %473
  br label %476

476:                                              ; preds = %475
  br label %477

477:                                              ; preds = %476
  call void @llvm.lifetime.start.p0(i64 48, ptr %25) #10
  call void @llvm.memset.p0.i64(ptr align 16 %25, i8 0, i64 48, i1 false)
  br label %478

478:                                              ; preds = %477
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #10
  %479 = load i8, ptr %21, align 1, !tbaa !49
  store i8 %479, ptr %26, align 1, !tbaa !49
  %480 = load i8, ptr %26, align 1, !tbaa !49
  %481 = icmp ne i8 %480, 0
  %482 = xor i1 %481, true
  %483 = xor i1 %482, true
  %484 = zext i1 %483 to i32
  %485 = sext i32 %484 to i64
  %486 = call i64 @llvm.expect.i64(i64 %485, i64 1)
  %487 = icmp ne i64 %486, 0
  br i1 %487, label %488, label %539

488:                                              ; preds = %478
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %489 = getelementptr inbounds [48 x i8], ptr %25, i64 0, i64 0
  %490 = load ptr, ptr %3, align 8, !tbaa !5
  %491 = getelementptr inbounds %struct.s2n_connection, ptr %490, i32 0, i32 52
  %492 = getelementptr inbounds %struct.s2n_handshake, ptr %491, i32 0, i32 3
  %493 = getelementptr inbounds [48 x i8], ptr %492, i64 0, i64 0
  %494 = load i8, ptr %26, align 1, !tbaa !49
  %495 = zext i8 %494 to i64
  %496 = call ptr @s2n_ensure_memmove_trace(ptr noundef %489, ptr noundef %493, i64 noundef %495)
  store ptr %496, ptr %27, align 8, !tbaa !5
  br label %497

497:                                              ; preds = %488
  %498 = load ptr, ptr %27, align 8, !tbaa !5
  %499 = icmp ne ptr %498, null
  br i1 %499, label %533, label %500

500:                                              ; preds = %497
  br label %501

501:                                              ; preds = %500
  br label %502

502:                                              ; preds = %501
  %503 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %504 = getelementptr inbounds %struct.s2n_debug_info, ptr %503, i32 0, i32 0
  store ptr @.str.14, ptr %504, align 8, !tbaa !9
  %505 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %506 = getelementptr inbounds %struct.s2n_debug_info, ptr %505, i32 0, i32 0
  %507 = load ptr, ptr %506, align 8, !tbaa !9
  %508 = getelementptr inbounds i8, ptr %507, i64 21
  %509 = call ptr @strrchr(ptr noundef %508, i32 noundef 47) #9
  %510 = icmp ne ptr %509, null
  br i1 %510, label %511, label %518

511:                                              ; preds = %502
  %512 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %513 = getelementptr inbounds %struct.s2n_debug_info, ptr %512, i32 0, i32 0
  %514 = load ptr, ptr %513, align 8, !tbaa !9
  %515 = getelementptr inbounds i8, ptr %514, i64 21
  %516 = call ptr @strrchr(ptr noundef %515, i32 noundef 47) #9
  %517 = getelementptr inbounds i8, ptr %516, i64 1
  br label %523

518:                                              ; preds = %502
  %519 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %520 = getelementptr inbounds %struct.s2n_debug_info, ptr %519, i32 0, i32 0
  %521 = load ptr, ptr %520, align 8, !tbaa !9
  %522 = getelementptr inbounds i8, ptr %521, i64 21
  br label %523

523:                                              ; preds = %518, %511
  %524 = phi ptr [ %517, %511 ], [ %522, %518 ]
  %525 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %526 = getelementptr inbounds %struct.s2n_debug_info, ptr %525, i32 0, i32 1
  store ptr %524, ptr %526, align 8, !tbaa !11
  %527 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %527, align 4, !tbaa !12
  %528 = call i32 @s2n_calculate_stacktrace()
  br label %529

529:                                              ; preds = %523
  br label %530

530:                                              ; preds = %529
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %536

531:                                              ; No predecessors!
  br label %532

532:                                              ; preds = %531
  br label %533

533:                                              ; preds = %532, %497
  br label %534

534:                                              ; preds = %533
  br label %535

535:                                              ; preds = %534
  store i32 0, ptr %6, align 4
  br label %536

536:                                              ; preds = %535, %530
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  %537 = load i32, ptr %6, align 4
  switch i32 %537, label %540 [
    i32 0, label %538
  ]

538:                                              ; preds = %536
  br label %539

539:                                              ; preds = %538, %478
  store i32 0, ptr %6, align 4
  br label %540

540:                                              ; preds = %539, %536
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #10
  %541 = load i32, ptr %6, align 4
  switch i32 %541, label %790 [
    i32 0, label %542
  ]

542:                                              ; preds = %540
  br label %543

543:                                              ; preds = %542
  br label %544

544:                                              ; preds = %543
  br label %545

545:                                              ; preds = %544
  %546 = load ptr, ptr %3, align 8, !tbaa !5
  %547 = call i32 @s2n_connection_wipe(ptr noundef %546)
  %548 = icmp sgt i32 %547, -1
  br i1 %548, label %550, label %549

549:                                              ; preds = %545
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %790

550:                                              ; preds = %545
  br label %551

551:                                              ; preds = %550
  br label %552

552:                                              ; preds = %551
  br label %553

553:                                              ; preds = %552
  %554 = load ptr, ptr %3, align 8, !tbaa !5
  %555 = getelementptr inbounds %struct.s2n_connection, ptr %554, i32 0, i32 26
  %556 = call i32 @s2n_crypto_parameters_free(ptr noundef %555)
  %557 = getelementptr inbounds %struct.s2n_result, ptr %28, i32 0, i32 0
  store i32 %556, ptr %557, align 4
  %558 = getelementptr inbounds %struct.s2n_result, ptr %28, i32 0, i32 0
  %559 = load i32, ptr %558, align 4
  %560 = call zeroext i1 @s2n_result_is_ok(i32 %559)
  br i1 %560, label %562, label %561

561:                                              ; preds = %553
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %790

562:                                              ; preds = %553
  br label %563

563:                                              ; preds = %562
  br label %564

564:                                              ; preds = %563
  %565 = load ptr, ptr %7, align 8, !tbaa !5
  %566 = load ptr, ptr %3, align 8, !tbaa !5
  %567 = getelementptr inbounds %struct.s2n_connection, ptr %566, i32 0, i32 26
  store ptr %565, ptr %567, align 8, !tbaa !67
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 8, i1 false)
  %568 = load ptr, ptr %3, align 8, !tbaa !5
  %569 = getelementptr inbounds %struct.s2n_connection, ptr %568, i32 0, i32 26
  %570 = load ptr, ptr %569, align 8, !tbaa !67
  %571 = load ptr, ptr %3, align 8, !tbaa !5
  %572 = getelementptr inbounds %struct.s2n_connection, ptr %571, i32 0, i32 29
  store ptr %570, ptr %572, align 8, !tbaa !68
  %573 = load ptr, ptr %3, align 8, !tbaa !5
  %574 = getelementptr inbounds %struct.s2n_connection, ptr %573, i32 0, i32 26
  %575 = load ptr, ptr %574, align 8, !tbaa !67
  %576 = load ptr, ptr %3, align 8, !tbaa !5
  %577 = getelementptr inbounds %struct.s2n_connection, ptr %576, i32 0, i32 30
  store ptr %575, ptr %577, align 8, !tbaa !69
  br label %578

578:                                              ; preds = %564
  %579 = load ptr, ptr %3, align 8, !tbaa !5
  %580 = load i16, ptr %8, align 2, !tbaa !52
  %581 = call i32 @s2n_connection_set_max_fragment_length(ptr noundef %579, i16 noundef zeroext %580)
  %582 = getelementptr inbounds %struct.s2n_result, ptr %29, i32 0, i32 0
  store i32 %581, ptr %582, align 4
  %583 = getelementptr inbounds %struct.s2n_result, ptr %29, i32 0, i32 0
  %584 = load i32, ptr %583, align 4
  %585 = call zeroext i1 @s2n_result_is_ok(i32 %584)
  br i1 %585, label %587, label %586

586:                                              ; preds = %578
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %790

587:                                              ; preds = %578
  br label %588

588:                                              ; preds = %587
  br label %589

589:                                              ; preds = %588
  br label %590

590:                                              ; preds = %589
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #10
  %591 = load i8, ptr %21, align 1, !tbaa !49
  store i8 %591, ptr %30, align 1, !tbaa !49
  %592 = load i8, ptr %30, align 1, !tbaa !49
  %593 = icmp ne i8 %592, 0
  %594 = xor i1 %593, true
  %595 = xor i1 %594, true
  %596 = zext i1 %595 to i32
  %597 = sext i32 %596 to i64
  %598 = call i64 @llvm.expect.i64(i64 %597, i64 1)
  %599 = icmp ne i64 %598, 0
  br i1 %599, label %600, label %651

600:                                              ; preds = %590
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %601 = load ptr, ptr %3, align 8, !tbaa !5
  %602 = getelementptr inbounds %struct.s2n_connection, ptr %601, i32 0, i32 52
  %603 = getelementptr inbounds %struct.s2n_handshake, ptr %602, i32 0, i32 4
  %604 = getelementptr inbounds [48 x i8], ptr %603, i64 0, i64 0
  %605 = getelementptr inbounds [48 x i8], ptr %22, i64 0, i64 0
  %606 = load i8, ptr %30, align 1, !tbaa !49
  %607 = zext i8 %606 to i64
  %608 = call ptr @s2n_ensure_memmove_trace(ptr noundef %604, ptr noundef %605, i64 noundef %607)
  store ptr %608, ptr %31, align 8, !tbaa !5
  br label %609

609:                                              ; preds = %600
  %610 = load ptr, ptr %31, align 8, !tbaa !5
  %611 = icmp ne ptr %610, null
  br i1 %611, label %645, label %612

612:                                              ; preds = %609
  br label %613

613:                                              ; preds = %612
  br label %614

614:                                              ; preds = %613
  %615 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %616 = getelementptr inbounds %struct.s2n_debug_info, ptr %615, i32 0, i32 0
  store ptr @.str.15, ptr %616, align 8, !tbaa !9
  %617 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %618 = getelementptr inbounds %struct.s2n_debug_info, ptr %617, i32 0, i32 0
  %619 = load ptr, ptr %618, align 8, !tbaa !9
  %620 = getelementptr inbounds i8, ptr %619, i64 21
  %621 = call ptr @strrchr(ptr noundef %620, i32 noundef 47) #9
  %622 = icmp ne ptr %621, null
  br i1 %622, label %623, label %630

623:                                              ; preds = %614
  %624 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %625 = getelementptr inbounds %struct.s2n_debug_info, ptr %624, i32 0, i32 0
  %626 = load ptr, ptr %625, align 8, !tbaa !9
  %627 = getelementptr inbounds i8, ptr %626, i64 21
  %628 = call ptr @strrchr(ptr noundef %627, i32 noundef 47) #9
  %629 = getelementptr inbounds i8, ptr %628, i64 1
  br label %635

630:                                              ; preds = %614
  %631 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %632 = getelementptr inbounds %struct.s2n_debug_info, ptr %631, i32 0, i32 0
  %633 = load ptr, ptr %632, align 8, !tbaa !9
  %634 = getelementptr inbounds i8, ptr %633, i64 21
  br label %635

635:                                              ; preds = %630, %623
  %636 = phi ptr [ %629, %623 ], [ %634, %630 ]
  %637 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %638 = getelementptr inbounds %struct.s2n_debug_info, ptr %637, i32 0, i32 1
  store ptr %636, ptr %638, align 8, !tbaa !11
  %639 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %639, align 4, !tbaa !12
  %640 = call i32 @s2n_calculate_stacktrace()
  br label %641

641:                                              ; preds = %635
  br label %642

642:                                              ; preds = %641
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %648

643:                                              ; No predecessors!
  br label %644

644:                                              ; preds = %643
  br label %645

645:                                              ; preds = %644, %609
  br label %646

646:                                              ; preds = %645
  br label %647

647:                                              ; preds = %646
  store i32 0, ptr %6, align 4
  br label %648

648:                                              ; preds = %647, %642
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  %649 = load i32, ptr %6, align 4
  switch i32 %649, label %652 [
    i32 0, label %650
  ]

650:                                              ; preds = %648
  br label %651

651:                                              ; preds = %650, %590
  store i32 0, ptr %6, align 4
  br label %652

652:                                              ; preds = %651, %648
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #10
  %653 = load i32, ptr %6, align 4
  switch i32 %653, label %790 [
    i32 0, label %654
  ]

654:                                              ; preds = %652
  br label %655

655:                                              ; preds = %654
  br label %656

656:                                              ; preds = %655
  br label %657

657:                                              ; preds = %656
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #10
  %658 = load i8, ptr %21, align 1, !tbaa !49
  store i8 %658, ptr %32, align 1, !tbaa !49
  %659 = load i8, ptr %32, align 1, !tbaa !49
  %660 = icmp ne i8 %659, 0
  %661 = xor i1 %660, true
  %662 = xor i1 %661, true
  %663 = zext i1 %662 to i32
  %664 = sext i32 %663 to i64
  %665 = call i64 @llvm.expect.i64(i64 %664, i64 1)
  %666 = icmp ne i64 %665, 0
  br i1 %666, label %667, label %718

667:                                              ; preds = %657
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %668 = load ptr, ptr %3, align 8, !tbaa !5
  %669 = getelementptr inbounds %struct.s2n_connection, ptr %668, i32 0, i32 52
  %670 = getelementptr inbounds %struct.s2n_handshake, ptr %669, i32 0, i32 3
  %671 = getelementptr inbounds [48 x i8], ptr %670, i64 0, i64 0
  %672 = getelementptr inbounds [48 x i8], ptr %25, i64 0, i64 0
  %673 = load i8, ptr %32, align 1, !tbaa !49
  %674 = zext i8 %673 to i64
  %675 = call ptr @s2n_ensure_memmove_trace(ptr noundef %671, ptr noundef %672, i64 noundef %674)
  store ptr %675, ptr %33, align 8, !tbaa !5
  br label %676

676:                                              ; preds = %667
  %677 = load ptr, ptr %33, align 8, !tbaa !5
  %678 = icmp ne ptr %677, null
  br i1 %678, label %712, label %679

679:                                              ; preds = %676
  br label %680

680:                                              ; preds = %679
  br label %681

681:                                              ; preds = %680
  %682 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %683 = getelementptr inbounds %struct.s2n_debug_info, ptr %682, i32 0, i32 0
  store ptr @.str.16, ptr %683, align 8, !tbaa !9
  %684 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %685 = getelementptr inbounds %struct.s2n_debug_info, ptr %684, i32 0, i32 0
  %686 = load ptr, ptr %685, align 8, !tbaa !9
  %687 = getelementptr inbounds i8, ptr %686, i64 21
  %688 = call ptr @strrchr(ptr noundef %687, i32 noundef 47) #9
  %689 = icmp ne ptr %688, null
  br i1 %689, label %690, label %697

690:                                              ; preds = %681
  %691 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %692 = getelementptr inbounds %struct.s2n_debug_info, ptr %691, i32 0, i32 0
  %693 = load ptr, ptr %692, align 8, !tbaa !9
  %694 = getelementptr inbounds i8, ptr %693, i64 21
  %695 = call ptr @strrchr(ptr noundef %694, i32 noundef 47) #9
  %696 = getelementptr inbounds i8, ptr %695, i64 1
  br label %702

697:                                              ; preds = %681
  %698 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %699 = getelementptr inbounds %struct.s2n_debug_info, ptr %698, i32 0, i32 0
  %700 = load ptr, ptr %699, align 8, !tbaa !9
  %701 = getelementptr inbounds i8, ptr %700, i64 21
  br label %702

702:                                              ; preds = %697, %690
  %703 = phi ptr [ %696, %690 ], [ %701, %697 ]
  %704 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %705 = getelementptr inbounds %struct.s2n_debug_info, ptr %704, i32 0, i32 1
  store ptr %703, ptr %705, align 8, !tbaa !11
  %706 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %706, align 4, !tbaa !12
  %707 = call i32 @s2n_calculate_stacktrace()
  br label %708

708:                                              ; preds = %702
  br label %709

709:                                              ; preds = %708
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %715

710:                                              ; No predecessors!
  br label %711

711:                                              ; preds = %710
  br label %712

712:                                              ; preds = %711, %676
  br label %713

713:                                              ; preds = %712
  br label %714

714:                                              ; preds = %713
  store i32 0, ptr %6, align 4
  br label %715

715:                                              ; preds = %714, %709
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  %716 = load i32, ptr %6, align 4
  switch i32 %716, label %719 [
    i32 0, label %717
  ]

717:                                              ; preds = %715
  br label %718

718:                                              ; preds = %717, %657
  store i32 0, ptr %6, align 4
  br label %719

719:                                              ; preds = %718, %715
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #10
  %720 = load i32, ptr %6, align 4
  switch i32 %720, label %790 [
    i32 0, label %721
  ]

721:                                              ; preds = %719
  br label %722

722:                                              ; preds = %721
  br label %723

723:                                              ; preds = %722
  %724 = load i8, ptr %21, align 1, !tbaa !49
  %725 = load ptr, ptr %3, align 8, !tbaa !5
  %726 = getelementptr inbounds %struct.s2n_connection, ptr %725, i32 0, i32 52
  %727 = getelementptr inbounds %struct.s2n_handshake, ptr %726, i32 0, i32 5
  store i8 %724, ptr %727, align 8, !tbaa !66
  %728 = load i8, ptr %9, align 1, !tbaa !49
  %729 = load ptr, ptr %3, align 8, !tbaa !5
  %730 = getelementptr inbounds %struct.s2n_connection, ptr %729, i32 0, i32 23
  store i8 %728, ptr %730, align 4, !tbaa !53
  %731 = load i8, ptr %10, align 1, !tbaa !49
  %732 = load ptr, ptr %3, align 8, !tbaa !5
  %733 = getelementptr inbounds %struct.s2n_connection, ptr %732, i32 0, i32 22
  store i8 %731, ptr %733, align 1, !tbaa !54
  %734 = load i8, ptr %11, align 1, !tbaa !49
  %735 = load ptr, ptr %3, align 8, !tbaa !5
  %736 = getelementptr inbounds %struct.s2n_connection, ptr %735, i32 0, i32 21
  store i8 %734, ptr %736, align 2, !tbaa !55
  %737 = load i64, ptr %12, align 8, !tbaa !57
  %738 = load ptr, ptr %3, align 8, !tbaa !5
  %739 = getelementptr inbounds %struct.s2n_connection, ptr %738, i32 0, i32 58
  store i64 %737, ptr %739, align 8, !tbaa !56
  %740 = load i64, ptr %13, align 8, !tbaa !57
  %741 = load ptr, ptr %3, align 8, !tbaa !5
  %742 = getelementptr inbounds %struct.s2n_connection, ptr %741, i32 0, i32 59
  store i64 %740, ptr %742, align 8, !tbaa !58
  %743 = load i8, ptr %14, align 1, !tbaa !59, !range !64, !noundef !65
  %744 = trunc i8 %743 to i1
  %745 = zext i1 %744 to i32
  %746 = load ptr, ptr %3, align 8, !tbaa !5
  %747 = load i32, ptr %746, align 8
  %748 = and i32 %745, 1
  %749 = shl i32 %748, 8
  %750 = and i32 %747, -257
  %751 = or i32 %750, %749
  store i32 %751, ptr %746, align 8
  %752 = load ptr, ptr %15, align 8, !tbaa !5
  %753 = load ptr, ptr %3, align 8, !tbaa !5
  %754 = getelementptr inbounds %struct.s2n_connection, ptr %753, i32 0, i32 6
  store ptr %752, ptr %754, align 8, !tbaa !60
  %755 = load ptr, ptr %16, align 8, !tbaa !5
  %756 = load ptr, ptr %3, align 8, !tbaa !5
  %757 = getelementptr inbounds %struct.s2n_connection, ptr %756, i32 0, i32 8
  store ptr %755, ptr %757, align 8, !tbaa !61
  %758 = load i8, ptr %17, align 1, !tbaa !59, !range !64, !noundef !65
  %759 = trunc i8 %758 to i1
  %760 = zext i1 %759 to i32
  %761 = load ptr, ptr %3, align 8, !tbaa !5
  %762 = load i32, ptr %761, align 8
  %763 = and i32 %760, 1
  %764 = shl i32 %763, 9
  %765 = and i32 %762, -513
  %766 = or i32 %765, %764
  store i32 %766, ptr %761, align 8
  %767 = load ptr, ptr %18, align 8, !tbaa !5
  %768 = load ptr, ptr %3, align 8, !tbaa !5
  %769 = getelementptr inbounds %struct.s2n_connection, ptr %768, i32 0, i32 7
  store ptr %767, ptr %769, align 8, !tbaa !62
  %770 = load ptr, ptr %19, align 8, !tbaa !5
  %771 = load ptr, ptr %3, align 8, !tbaa !5
  %772 = getelementptr inbounds %struct.s2n_connection, ptr %771, i32 0, i32 9
  store ptr %770, ptr %772, align 8, !tbaa !63
  %773 = load i8, ptr %20, align 1, !tbaa !59, !range !64, !noundef !65
  %774 = trunc i8 %773 to i1
  %775 = zext i1 %774 to i32
  %776 = load ptr, ptr %3, align 8, !tbaa !5
  %777 = load i32, ptr %776, align 8
  %778 = and i32 %775, 1
  %779 = shl i32 %778, 3
  %780 = and i32 %777, -9
  %781 = or i32 %780, %779
  store i32 %781, ptr %776, align 8
  %782 = load ptr, ptr %3, align 8, !tbaa !5
  %783 = getelementptr inbounds %struct.s2n_connection, ptr %782, i32 0, i32 39
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %783, ptr align 8 %4, i64 40, i1 false), !tbaa.struct !48
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 40, i1 false)
  %784 = load ptr, ptr %3, align 8, !tbaa !5
  %785 = getelementptr inbounds %struct.s2n_connection, ptr %784, i32 0, i32 52
  %786 = getelementptr inbounds %struct.s2n_handshake, ptr %785, i32 0, i32 11
  %787 = load i8, ptr %786, align 8
  %788 = and i8 %787, -9
  %789 = or i8 %788, 8
  store i8 %789, ptr %786, align 8
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %790

790:                                              ; preds = %723, %719, %652, %586, %561, %549, %540
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #10
  br label %791

791:                                              ; preds = %790, %473
  call void @llvm.lifetime.end.p0(i64 48, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #10
  br label %792

792:                                              ; preds = %791, %401
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %793

793:                                              ; preds = %792, %318
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #10
  %794 = call i32 @s2n_crypto_parameters_free(ptr noundef %7)
  %795 = getelementptr inbounds %struct.s2n_result, ptr %34, i32 0, i32 0
  store i32 %794, ptr %795, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  br label %796

796:                                              ; preds = %793, %263
  %797 = call i32 @s2n_stuffer_free(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #10
  br label %798

798:                                              ; preds = %796, %239, %195, %151, %107, %67
  %799 = load i32, ptr %2, align 4
  ret i32 %799
}

declare zeroext i1 @s2n_in_unit_test(...) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare i32 @s2n_stuffer_free(ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

declare i32 @s2n_stuffer_growable_alloc(ptr noundef, i32 noundef) #2

declare i32 @s2n_crypto_parameters_free(ptr noundef) #2

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

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

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

declare i32 @s2n_connection_wipe(ptr noundef) #2

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

declare i32 @s2n_connection_set_max_fragment_length(ptr noundef, i16 noundef zeroext) #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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #8 = { 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 #9 = { nounwind willreturn memory(read) }
attributes #10 = { 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, !6, i64 0}
!10 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !13, i64 148}
!15 = !{!"s2n_connection", !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, 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, !13, i64 148, !13, i64 152, !16, i64 160, !17, i64 168, !17, 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, !18, i64 240, !6, i64 632, !6, i64 640, !19, i64 648, !26, i64 1144, !29, i64 1688, !6, i64 1752, !7, i64 1760, !13, i64 1764, !7, i64 1768, !32, i64 1776, !32, i64 1816, !32, i64 1856, !32, i64 1896, !13, i64 1936, !17, i64 1944, !7, i64 1952, !32, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !25, i64 2003, !33, i64 2004, !33, i64 2008, !34, i64 2016, !31, i64 2208, !13, i64 2212, !31, i64 2216, !17, i64 2224, !7, i64 2232, !17, i64 2240, !17, i64 2248, !17, i64 2256, !33, i64 2264, !33, i64 2268, !7, i64 2272, !7, i64 2528, !13, i64 2784, !24, i64 2792, !13, i64 2816, !24, i64 2824, !24, i64 2848, !24, i64 2872, !36, i64 2896, !38, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !13, i64 3780, !24, i64 3784, !13, i64 3808, !40, i64 3816, !7, i64 3848, !32, i64 3992, !24, i64 4032, !24, i64 4056, !25, i64 4080, !25, i64 4081, !25, i64 4082, !31, i64 4084, !31, i64 4086, !13, i64 4088, !13, i64 4092, !24, i64 4096, !13, i64 4120, !41, i64 4128, !33, i64 4176, !7, i64 4180, !7, i64 4181}
!16 = !{!"s2n_timer", !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"s2n_secrets", !7, i64 0, !13, i64 388}
!19 = !{!"s2n_kex_parameters", !20, i64 0, !21, i64 8, !7, i64 24, !21, i64 56, !22, i64 72, !22, i64 184, !7, i64 296, !23, i64 360, !24, i64 448, !24, i64 472}
!20 = !{!"s2n_dh_params", !6, i64 0}
!21 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!22 = !{!"s2n_kem_group_params", !6, i64 0, !23, i64 8, !21, i64 96}
!23 = !{!"s2n_kem_params", !6, i64 0, !24, i64 8, !24, i64 32, !24, i64 56, !25, i64 80}
!24 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!25 = !{!"_Bool", !7, i64 0}
!26 = !{!"s2n_handshake_parameters", !27, i64 0, !27, i64 48, !24, i64 96, !13, i64 120, !28, 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}
!27 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!28 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!29 = !{!"s2n_psk_parameters", !13, i64 0, !30, i64 8, !31, i64 40, !31, i64 42, !6, i64 48, !13, i64 56}
!30 = !{!"s2n_array", !24, i64 0, !13, i64 24, !13, i64 28}
!31 = !{!"short", !7, i64 0}
!32 = !{!"s2n_stuffer", !24, i64 0, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 36, !13, i64 36}
!33 = !{!"", !13, i64 0}
!34 = !{!"s2n_handshake", !32, i64 0, !6, i64 40, !7, i64 48, !7, i64 56, !7, i64 104, !7, i64 152, !13, i64 156, !13, i64 160, !13, i64 164, !13, i64 168, !35, i64 176, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 188}
!35 = !{!"s2n_offered_early_data", !6, i64 0}
!36 = !{!"s2n_client_hello", !24, i64 0, !37, i64 24, !24, i64 728, !24, i64 752, !24, i64 776, !7, i64 800, !7, i64 801, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802}
!37 = !{!"", !7, i64 0, !24, i64 672, !31, i64 696}
!38 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !31, i64 18, !6, i64 24, !13, i64 32, !6, i64 40, !39, i64 48, !25, i64 52}
!39 = !{!"s2n_cert_validation_info", !13, i64 0, !13, i64 0}
!40 = !{!"s2n_ticket_fields", !24, i64 0, !13, i64 24}
!41 = !{!"s2n_post_handshake", !32, i64 0, !7, i64 40}
!42 = !{!15, !13, i64 1804}
!43 = !{!15, !13, i64 1800}
!44 = !{!15, !13, i64 1884}
!45 = !{!15, !13, i64 1880}
!46 = !{!15, !13, i64 1924}
!47 = !{!15, !13, i64 1920}
!48 = !{i64 0, i64 8, !5, i64 8, i64 4, !12, i64 12, i64 4, !12, i64 16, i64 1, !49, i64 24, i64 4, !12, i64 28, i64 4, !12, i64 32, i64 4, !12, i64 36, i64 1, !49}
!49 = !{!7, !7, i64 0}
!50 = !{!15, !6, i64 232}
!51 = !{!15, !31, i64 2208}
!52 = !{!31, !31, i64 0}
!53 = !{!15, !7, i64 220}
!54 = !{!15, !7, i64 219}
!55 = !{!15, !7, i64 218}
!56 = !{!15, !17, i64 2240}
!57 = !{!17, !17, i64 0}
!58 = !{!15, !17, i64 2248}
!59 = !{!25, !25, i64 0}
!60 = !{!15, !6, i64 48}
!61 = !{!15, !6, i64 64}
!62 = !{!15, !6, i64 56}
!63 = !{!15, !6, i64 72}
!64 = !{i8 0, i8 2}
!65 = !{}
!66 = !{!15, !7, i64 2168}
!67 = !{!15, !6, i64 224}
!68 = !{!15, !6, i64 632}
!69 = !{!15, !6, i64 640}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.s2n_debug_info = type { ptr, ptr }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.6 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [92 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_renegotiate_wipe(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca %struct.s2n_stuffer, align 8
  %3 = alloca ptr, align 8
  %4 = alloca [48 x i8], align 16
  %5 = alloca [48 x i8], align 16
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %6, label %14

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

14:                                               ; preds = %1
  %15 = getelementptr inbounds i8, ptr %0, i64 148
  %16 = load i32, ptr %15, align 4, !tbaa !13
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %28, label %18

18:                                               ; preds = %14
  %19 = tail call zeroext i1 (...) @s2n_in_unit_test() #9
  br i1 %19, label %28, label %20

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

28:                                               ; preds = %18, %14
  %29 = getelementptr inbounds i8, ptr %0, i64 1804
  %30 = load i32, ptr %29, align 4, !tbaa !41
  %31 = getelementptr inbounds i8, ptr %0, i64 1800
  %32 = load i32, ptr %31, align 8, !tbaa !42
  %33 = icmp eq i32 %30, %32
  br i1 %33, label %42, label %34

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

42:                                               ; preds = %28
  %43 = getelementptr inbounds i8, ptr %0, i64 1884
  %44 = load i32, ptr %43, align 4, !tbaa !43
  %45 = getelementptr inbounds i8, ptr %0, i64 1880
  %46 = load i32, ptr %45, align 8, !tbaa !44
  %47 = icmp eq i32 %44, %46
  br i1 %47, label %56, label %48

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

56:                                               ; preds = %42
  %57 = getelementptr inbounds i8, ptr %0, i64 1924
  %58 = load i32, ptr %57, align 4, !tbaa !45
  %59 = getelementptr inbounds i8, ptr %0, i64 1920
  %60 = load i32, ptr %59, align 8, !tbaa !46
  %61 = icmp eq i32 %58, %60
  br i1 %61, label %70, label %62

62:                                               ; preds = %56
  %63 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.10, ptr %63, align 8, !tbaa !5
  %64 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.10, i64 21), i32 noundef 47) #8
  %.not130 = icmp eq ptr %64, null
  %65 = getelementptr inbounds i8, ptr %64, i64 1
  %66 = select i1 %.not130, ptr getelementptr inbounds (i8, ptr @.str.10, i64 21), ptr %65
  %67 = getelementptr inbounds i8, ptr %63, i64 8
  store ptr %66, ptr %67, align 8, !tbaa !10
  %68 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762112, ptr %68, align 4, !tbaa !11
  %69 = tail call i32 @s2n_calculate_stacktrace() #9
  br label %186

70:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #9
  %71 = getelementptr inbounds i8, ptr %0, i64 1816
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(40) %71, i64 40, i1 false), !tbaa.struct !47
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %71, i8 0, i64 40, i1 false)
  %72 = tail call i32 @s2n_stuffer_growable_alloc(ptr noundef nonnull %71, i32 noundef 0) #9
  %73 = icmp sgt i32 %72, -1
  br i1 %73, label %74, label %184

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %75 = getelementptr inbounds i8, ptr %0, i64 232
  %76 = load ptr, ptr %75, align 8, !tbaa !50
  store ptr %76, ptr %3, align 8, !tbaa !48
  store ptr null, ptr %75, align 8, !tbaa !50
  %77 = getelementptr inbounds i8, ptr %0, i64 2208
  %78 = load i16, ptr %77, align 8, !tbaa !51
  %79 = getelementptr inbounds i8, ptr %0, i64 220
  %80 = load i8, ptr %79, align 4, !tbaa !52
  %81 = getelementptr inbounds i8, ptr %0, i64 219
  %82 = load i8, ptr %81, align 1, !tbaa !53
  %83 = getelementptr inbounds i8, ptr %0, i64 218
  %84 = load i8, ptr %83, align 2, !tbaa !54
  %85 = icmp ult i8 %80, 34
  br i1 %85, label %94, label %86

86:                                               ; preds = %74
  %87 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.11, ptr %87, align 8, !tbaa !5
  %88 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.11, i64 21), i32 noundef 47) #8
  %.not131 = icmp eq ptr %88, null
  %89 = getelementptr inbounds i8, ptr %88, i64 1
  %90 = select i1 %.not131, ptr getelementptr inbounds (i8, ptr @.str.11, i64 21), ptr %89
  %91 = getelementptr inbounds i8, ptr %87, i64 8
  store ptr %90, ptr %91, align 8, !tbaa !10
  %92 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544384, ptr %92, align 4, !tbaa !11
  %93 = tail call i32 @s2n_calculate_stacktrace() #9
  br label %182

94:                                               ; preds = %74
  %95 = getelementptr inbounds i8, ptr %0, i64 2240
  %96 = load <2 x i64>, ptr %95, align 8, !tbaa !55
  %97 = load i32, ptr %0, align 8
  %98 = getelementptr inbounds i8, ptr %0, i64 48
  %99 = getelementptr inbounds i8, ptr %0, i64 64
  %100 = load <2 x ptr>, ptr %98, align 8, !tbaa !48
  %101 = load <2 x ptr>, ptr %99, align 8, !tbaa !48
  %102 = and i32 %97, -769
  store i32 %102, ptr %0, align 8
  %103 = and i32 %97, 8
  %.not132 = icmp eq i32 %103, 0
  br i1 %.not132, label %104, label %112

104:                                              ; preds = %94
  %105 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.12, ptr %105, align 8, !tbaa !5
  %106 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.12, i64 21), i32 noundef 47) #8
  %.not133 = icmp eq ptr %106, null
  %107 = getelementptr inbounds i8, ptr %106, i64 1
  %108 = select i1 %.not133, ptr getelementptr inbounds (i8, ptr @.str.12, i64 21), ptr %107
  %109 = getelementptr inbounds i8, ptr %105, i64 8
  store ptr %108, ptr %109, align 8, !tbaa !10
  %110 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544398, ptr %110, align 4, !tbaa !11
  %111 = tail call i32 @s2n_calculate_stacktrace() #9
  br label %182

112:                                              ; preds = %94
  %113 = getelementptr inbounds i8, ptr %0, i64 2168
  %114 = load i8, ptr %113, align 8, !tbaa !56
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %4, i8 0, i64 48, i1 false)
  %.not134 = icmp eq i8 %114, 0
  br i1 %.not134, label %.critedge149.critedge, label %115, !prof !57

115:                                              ; preds = %112
  %116 = getelementptr inbounds i8, ptr %0, i64 2120
  %117 = zext i8 %114 to i64
  %118 = call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %4, ptr noundef nonnull %116, i64 noundef %117) #9
  %.not135.not = icmp eq ptr %118, null
  br i1 %.not135.not, label %119, label %127

119:                                              ; preds = %115
  %120 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.13, ptr %120, align 8, !tbaa !5
  %121 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.13, i64 21), i32 noundef 47) #8
  %.not136 = icmp eq ptr %121, null
  %122 = getelementptr inbounds i8, ptr %121, i64 1
  %123 = select i1 %.not136, ptr getelementptr inbounds (i8, ptr @.str.13, i64 21), ptr %122
  %124 = getelementptr inbounds i8, ptr %120, i64 8
  store ptr %123, ptr %124, align 8, !tbaa !10
  %125 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %125, align 4, !tbaa !11
  %126 = call i32 @s2n_calculate_stacktrace() #9
  br label %181

127:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %5, i8 0, i64 48, i1 false)
  %128 = getelementptr inbounds i8, ptr %0, i64 2072
  %129 = call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %5, ptr noundef nonnull %128, i64 noundef %117) #9
  %.not137.not = icmp eq ptr %129, null
  br i1 %.not137.not, label %130, label %.critedge149

130:                                              ; preds = %127
  %131 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.14, ptr %131, align 8, !tbaa !5
  %132 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.14, i64 21), i32 noundef 47) #8
  %.not138 = icmp eq ptr %132, null
  %133 = getelementptr inbounds i8, ptr %132, i64 1
  %134 = select i1 %.not138, ptr getelementptr inbounds (i8, ptr @.str.14, i64 21), ptr %133
  %135 = getelementptr inbounds i8, ptr %131, i64 8
  store ptr %134, ptr %135, align 8, !tbaa !10
  %136 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %136, align 4, !tbaa !11
  %137 = call i32 @s2n_calculate_stacktrace() #9
  br label %180

.critedge149.critedge:                            ; preds = %112
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %5, i8 0, i64 48, i1 false)
  br label %.critedge149

.critedge149:                                     ; preds = %127, %.critedge149.critedge
  %138 = call i32 @s2n_connection_wipe(ptr noundef nonnull %0) #9
  %139 = icmp sgt i32 %138, -1
  br i1 %139, label %140, label %180

140:                                              ; preds = %.critedge149
  %141 = getelementptr inbounds i8, ptr %0, i64 224
  %142 = call i32 @s2n_crypto_parameters_free(ptr noundef nonnull %141) #9
  %143 = call zeroext i1 @s2n_result_is_ok(i32 %142)
  br i1 %143, label %144, label %180

144:                                              ; preds = %140
  store ptr %76, ptr %141, align 8, !tbaa !58
  store i64 0, ptr %3, align 8
  %145 = getelementptr inbounds i8, ptr %0, i64 632
  store ptr %76, ptr %145, align 8, !tbaa !59
  %146 = getelementptr inbounds i8, ptr %0, i64 640
  store ptr %76, ptr %146, align 8, !tbaa !60
  %147 = call i32 @s2n_connection_set_max_fragment_length(ptr noundef nonnull %0, i16 noundef zeroext %78) #9
  %148 = call zeroext i1 @s2n_result_is_ok(i32 %147)
  br i1 %148, label %149, label %180

149:                                              ; preds = %144
  br i1 %.not134, label %.critedge157, label %150, !prof !57

150:                                              ; preds = %149
  %151 = getelementptr inbounds i8, ptr %0, i64 2120
  %152 = zext i8 %114 to i64
  %153 = call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %151, ptr noundef nonnull %4, i64 noundef %152) #9
  %.not139.not = icmp eq ptr %153, null
  br i1 %.not139.not, label %154, label %.critedge153

154:                                              ; preds = %150
  %155 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.15, ptr %155, align 8, !tbaa !5
  %156 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.15, i64 21), i32 noundef 47) #8
  %.not140 = icmp eq ptr %156, null
  %157 = getelementptr inbounds i8, ptr %156, i64 1
  %158 = select i1 %.not140, ptr getelementptr inbounds (i8, ptr @.str.15, i64 21), ptr %157
  %159 = getelementptr inbounds i8, ptr %155, i64 8
  store ptr %158, ptr %159, align 8, !tbaa !10
  %160 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %160, align 4, !tbaa !11
  %161 = call i32 @s2n_calculate_stacktrace() #9
  br label %180

.critedge153:                                     ; preds = %150
  %162 = getelementptr inbounds i8, ptr %0, i64 2072
  %163 = call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %162, ptr noundef nonnull %5, i64 noundef %152) #9
  %.not141.not = icmp eq ptr %163, null
  br i1 %.not141.not, label %164, label %.critedge157

164:                                              ; preds = %.critedge153
  %165 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.16, ptr %165, align 8, !tbaa !5
  %166 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.16, i64 21), i32 noundef 47) #8
  %.not142 = icmp eq ptr %166, null
  %167 = getelementptr inbounds i8, ptr %166, i64 1
  %168 = select i1 %.not142, ptr getelementptr inbounds (i8, ptr @.str.16, i64 21), ptr %167
  %169 = getelementptr inbounds i8, ptr %165, i64 8
  store ptr %168, ptr %169, align 8, !tbaa !10
  %170 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %170, align 4, !tbaa !11
  %171 = call i32 @s2n_calculate_stacktrace() #9
  br label %180

.critedge157:                                     ; preds = %149, %.critedge153
  store i8 %114, ptr %113, align 8, !tbaa !56
  store i8 %80, ptr %79, align 4, !tbaa !52
  store i8 %82, ptr %81, align 1, !tbaa !53
  store i8 %84, ptr %83, align 2, !tbaa !54
  store <2 x i64> %96, ptr %95, align 8, !tbaa !55
  %172 = load i32, ptr %0, align 8
  %173 = and i32 %172, -777
  %174 = and i32 %97, 768
  %175 = or disjoint i32 %173, %174
  store <2 x ptr> %100, ptr %98, align 8, !tbaa !48
  store <2 x ptr> %101, ptr %99, align 8, !tbaa !48
  %176 = or disjoint i32 %175, 8
  store i32 %176, ptr %0, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %71, ptr noundef nonnull align 8 dereferenceable(40) %2, i64 40, i1 false), !tbaa.struct !47
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %2, i8 0, i64 40, i1 false)
  %177 = getelementptr inbounds i8, ptr %0, i64 2200
  %178 = load i8, ptr %177, align 8
  %179 = or i8 %178, 8
  store i8 %179, ptr %177, align 8
  br label %180

180:                                              ; preds = %164, %154, %130, %144, %140, %.critedge149, %.critedge157
  %.12 = phi i32 [ 0, %.critedge157 ], [ -1, %130 ], [ -1, %.critedge149 ], [ -1, %140 ], [ -1, %144 ], [ -1, %154 ], [ -1, %164 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #9
  br label %181

181:                                              ; preds = %119, %180
  %.13 = phi i32 [ %.12, %180 ], [ -1, %119 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #9
  br label %182

182:                                              ; preds = %104, %181, %86
  %.15 = phi i32 [ -1, %86 ], [ %.13, %181 ], [ -1, %104 ]
  %183 = call i32 @s2n_crypto_parameters_free(ptr noundef nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %184

184:                                              ; preds = %70, %182
  %.16 = phi i32 [ %.15, %182 ], [ -1, %70 ]
  %185 = call i32 @s2n_stuffer_free(ptr noundef nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #9
  br label %186

186:                                              ; preds = %184, %62, %48, %34, %20, %6
  %.17 = phi i32 [ %.16, %184 ], [ -1, %62 ], [ -1, %48 ], [ -1, %34 ], [ -1, %20 ], [ -1, %6 ]
  ret i32 %.17
}

declare zeroext i1 @s2n_in_unit_test(...) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare i32 @s2n_stuffer_free(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

declare i32 @s2n_stuffer_growable_alloc(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @s2n_crypto_parameters_free(ptr noundef) local_unnamed_addr #2

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

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

declare i32 @s2n_connection_wipe(ptr noundef) local_unnamed_addr #2

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

declare i32 @s2n_connection_set_max_fragment_length(ptr noundef, i16 noundef zeroext) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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, !12, i64 148}
!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 1804}
!42 = !{!14, !12, i64 1800}
!43 = !{!14, !12, i64 1884}
!44 = !{!14, !12, i64 1880}
!45 = !{!14, !12, i64 1924}
!46 = !{!14, !12, i64 1920}
!47 = !{i64 0, i64 8, !48, i64 8, i64 4, !11, i64 12, i64 4, !11, i64 16, i64 1, !49, i64 24, i64 4, !11, i64 28, i64 4, !11, i64 32, i64 4, !11, i64 36, i64 1, !49}
!48 = !{!7, !7, i64 0}
!49 = !{!8, !8, i64 0}
!50 = !{!14, !7, i64 232}
!51 = !{!14, !30, i64 2208}
!52 = !{!14, !8, i64 220}
!53 = !{!14, !8, i64 219}
!54 = !{!14, !8, i64 218}
!55 = !{!16, !16, i64 0}
!56 = !{!14, !8, i64 2168}
!57 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!58 = !{!14, !7, i64 224}
!59 = !{!14, !7, i64 632}
!60 = !{!14, !7, i64 640}


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