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

; 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_cipher = type { i32, %union.anon.1, i8, ptr, ptr, ptr, ptr, ptr, ptr }
%union.anon.1 = type { %struct.s2n_composite_cipher }
%struct.s2n_composite_cipher = type { i8, i8, i8, ptr, ptr, ptr, ptr }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_result = type { i32 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%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 }
%struct.s2n_crypto_parameters = type { ptr, %struct.s2n_session_key, %struct.s2n_session_key, %struct.s2n_hmac_state, %struct.s2n_hmac_state, [16 x i8], [16 x i8], [8 x i8], [8 x i8] }
%struct.s2n_session_key = type { ptr }
%struct.s2n_hmac_state = type { i32, i16, i32, i16, i8, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, [128 x i8], [64 x i8] }
%struct.s2n_hash_state = type { ptr, i32, i8, i64, %union.anon.0 }
%union.anon.0 = type { %struct.s2n_hash_evp_digest }
%struct.s2n_hash_evp_digest = type { %struct.s2n_evp_digest, %struct.s2n_evp_digest }
%struct.s2n_evp_digest = type { ptr, ptr }
%struct.s2n_cipher_suite = type { i8, ptr, ptr, [2 x i8], ptr, i32, ptr, [2 x ptr], i8, ptr, ptr, i32, i8 }
%struct.s2n_record_algorithm = type { ptr, i32, i32, i64 }
%struct.s2n_cbc_cipher = type { i8, i8, ptr, ptr }
%struct.s2n_config = type { i32, ptr, ptr, %struct.certs_by_type, %struct.s2n_blob, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i64, ptr, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i32, i8, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, %struct.s2n_x509_trust_store, i16, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, %struct.s2n_blob }
%struct.certs_by_type = type { [4 x ptr] }
%struct.s2n_x509_trust_store = type { ptr, i8 }
%struct.s2n_aead_cipher = type { i8, i8, i8, ptr, ptr }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.14 = external hidden unnamed_addr constant [93 x i8], align 1
@s2n_null_cipher = external constant %struct.s2n_cipher, align 8
@.str.15 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [93 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_record_max_write_payload_size(ptr noundef, ptr noundef) #0

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

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

declare i32 @s2n_calculate_stacktrace() #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_record_max_write_size(ptr noundef, i16 noundef zeroext, ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_record_write_protocol_version(ptr noundef, i8 noundef zeroext, ptr noundef) #0

declare i32 @s2n_stuffer_write_bytes(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_record_writev(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2, i32 noundef %3, i64 noundef %4, i64 noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %struct.s2n_blob, align 8
  %15 = alloca i8, align 1
  %16 = alloca i16, align 2
  %17 = alloca [16 x i8], align 16
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i64, align 8
  %27 = alloca [13 x i8], align 1
  %28 = alloca %struct.s2n_blob, align 8
  %29 = alloca i16, align 2
  %30 = alloca %struct.s2n_result, align 4
  %31 = alloca i16, align 2
  %32 = alloca i16, align 2
  %33 = alloca %struct.s2n_result, align 4
  %34 = alloca i16, align 2
  %35 = alloca %struct.s2n_result, align 4
  %36 = alloca i32, align 4
  %37 = alloca %struct.s2n_blob, align 8
  %38 = alloca %struct.s2n_stuffer, align 8
  %39 = alloca i8, align 1
  %40 = alloca i16, align 2
  %41 = alloca i32, align 4
  %42 = alloca i16, align 2
  %43 = alloca i16, align 2
  %44 = alloca %struct.s2n_stuffer, align 8
  %45 = alloca [4 x i8], align 1
  %46 = alloca i32, align 4
  %47 = alloca %struct.s2n_result, align 4
  %48 = alloca %struct.s2n_result, align 4
  %49 = alloca %struct.s2n_result, align 4
  %50 = alloca %struct.s2n_blob, align 8
  %51 = alloca [16 x i8], align 16
  %52 = alloca %struct.s2n_result, align 4
  %53 = alloca ptr, align 8
  %54 = alloca %struct.s2n_blob, align 8
  %55 = alloca %struct.s2n_blob, align 8
  %56 = alloca i32, align 4
  %57 = alloca %struct.s2n_result, align 4
  %58 = alloca %struct.s2n_blob, align 8
  %59 = alloca i32, align 4
  %60 = alloca i16, align 2
  %61 = alloca %struct.s2n_blob, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i8 %1, ptr %9, align 1, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !10
  store i64 %4, ptr %12, align 8, !tbaa !12
  store i64 %5, ptr %13, align 8, !tbaa !12
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = load i32, ptr %62, align 8
  %64 = lshr i32 %63, 18
  %65 = and i32 %64, 1
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %75

67:                                               ; preds = %6
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = load i8, ptr %9, align 1, !tbaa !9
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load i32, ptr %11, align 4, !tbaa !10
  %72 = load i64, ptr %12, align 8, !tbaa !12
  %73 = load i64, ptr %13, align 8, !tbaa !12
  %74 = call i32 @s2n_ktls_record_writev(ptr noundef %68, i8 noundef zeroext %69, ptr noundef %70, i32 noundef %71, i64 noundef %72, i64 noundef %73)
  store i32 %74, ptr %7, align 4
  br label %1326

75:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 0, ptr %15, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #7
  store i16 0, ptr %16, align 2, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @llvm.memset.p0.i64(ptr align 16 %17, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.s2n_connection, ptr %76, i32 0, i32 29
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  store ptr %78, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.s2n_connection, ptr %79, i32 0, i32 30
  %81 = load ptr, ptr %80, align 8, !tbaa !42
  store ptr %81, ptr %19, align 8, !tbaa !5
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.s2n_connection, ptr %82, i32 0, i32 23
  %84 = load i8, ptr %83, align 4, !tbaa !43
  %85 = zext i8 %84 to i32
  %86 = icmp eq i32 %85, 34
  br i1 %86, label %87, label %143

87:                                               ; preds = %75
  %88 = load i8, ptr %9, align 1, !tbaa !9
  %89 = zext i8 %88 to i32
  %90 = icmp eq i32 %89, 20
  br i1 %90, label %91, label %143

91:                                               ; preds = %87
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.s2n_connection, ptr %93, i32 0, i32 26
  %95 = load ptr, ptr %94, align 8, !tbaa !44
  %96 = icmp ne ptr %95, null
  br i1 %96, label %130, label %97

97:                                               ; preds = %92
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  %100 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %101 = getelementptr inbounds %struct.s2n_debug_info, ptr %100, i32 0, i32 0
  store ptr @.str.14, ptr %101, align 8, !tbaa !45
  %102 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %103 = getelementptr inbounds %struct.s2n_debug_info, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !45
  %105 = getelementptr inbounds i8, ptr %104, i64 21
  %106 = call ptr @strrchr(ptr noundef %105, i32 noundef 47) #8
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %115

108:                                              ; preds = %99
  %109 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %110 = getelementptr inbounds %struct.s2n_debug_info, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !45
  %112 = getelementptr inbounds i8, ptr %111, i64 21
  %113 = call ptr @strrchr(ptr noundef %112, i32 noundef 47) #8
  %114 = getelementptr inbounds i8, ptr %113, i64 1
  br label %120

115:                                              ; preds = %99
  %116 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %117 = getelementptr inbounds %struct.s2n_debug_info, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !45
  %119 = getelementptr inbounds i8, ptr %118, i64 21
  br label %120

120:                                              ; preds = %115, %108
  %121 = phi ptr [ %114, %108 ], [ %119, %115 ]
  %122 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %123 = getelementptr inbounds %struct.s2n_debug_info, ptr %122, i32 0, i32 1
  store ptr %121, ptr %123, align 8, !tbaa !47
  %124 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %124, align 4, !tbaa !10
  %125 = call i32 @s2n_calculate_stacktrace()
  br label %126

126:                                              ; preds = %120
  br label %127

127:                                              ; preds = %126
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1325

128:                                              ; No predecessors!
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129, %92
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.s2n_connection, ptr %133, i32 0, i32 26
  %135 = load ptr, ptr %134, align 8, !tbaa !44
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.s2n_connection, ptr %136, i32 0, i32 29
  store ptr %135, ptr %137, align 8, !tbaa !16
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.s2n_connection, ptr %138, i32 0, i32 26
  %140 = load ptr, ptr %139, align 8, !tbaa !44
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.s2n_connection, ptr %141, i32 0, i32 30
  store ptr %140, ptr %142, align 8, !tbaa !42
  br label %143

143:                                              ; preds = %132, %87, %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.s2n_connection, ptr %144, i32 0, i32 30
  %146 = load ptr, ptr %145, align 8, !tbaa !42
  %147 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %146, i32 0, i32 8
  %148 = getelementptr inbounds [8 x i8], ptr %147, i64 0, i64 0
  store ptr %148, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.s2n_connection, ptr %149, i32 0, i32 30
  %151 = load ptr, ptr %150, align 8, !tbaa !42
  %152 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %151, i32 0, i32 2
  store ptr %152, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.s2n_connection, ptr %153, i32 0, i32 30
  %155 = load ptr, ptr %154, align 8, !tbaa !42
  %156 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !48
  store ptr %157, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.s2n_connection, ptr %158, i32 0, i32 30
  %160 = load ptr, ptr %159, align 8, !tbaa !42
  %161 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %160, i32 0, i32 6
  %162 = getelementptr inbounds [16 x i8], ptr %161, i64 0, i64 0
  store ptr %162, ptr %24, align 8, !tbaa !5
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.s2n_connection, ptr %163, i32 0, i32 13
  %165 = load i32, ptr %164, align 4, !tbaa !53
  %166 = icmp eq i32 %165, 1
  br i1 %166, label %167, label %187

167:                                              ; preds = %143
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.s2n_connection, ptr %168, i32 0, i32 29
  %170 = load ptr, ptr %169, align 8, !tbaa !16
  %171 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %170, i32 0, i32 7
  %172 = getelementptr inbounds [8 x i8], ptr %171, i64 0, i64 0
  store ptr %172, ptr %21, align 8, !tbaa !5
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.s2n_connection, ptr %173, i32 0, i32 29
  %175 = load ptr, ptr %174, align 8, !tbaa !16
  %176 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %175, i32 0, i32 1
  store ptr %176, ptr %22, align 8, !tbaa !5
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.s2n_connection, ptr %177, i32 0, i32 29
  %179 = load ptr, ptr %178, align 8, !tbaa !16
  %180 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !48
  store ptr %181, ptr %23, align 8, !tbaa !5
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.s2n_connection, ptr %182, i32 0, i32 29
  %184 = load ptr, ptr %183, align 8, !tbaa !16
  %185 = getelementptr inbounds %struct.s2n_crypto_parameters, ptr %184, i32 0, i32 5
  %186 = getelementptr inbounds [16 x i8], ptr %185, i64 0, i64 0
  store ptr %186, ptr %24, align 8, !tbaa !5
  br label %187

187:                                              ; preds = %167, %143
  %188 = load ptr, ptr %23, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %188, i32 0, i32 6
  %190 = load ptr, ptr %189, align 8, !tbaa !54
  %191 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %190, i32 0, i32 0
  %192 = load ptr, ptr %191, align 8, !tbaa !56
  %193 = icmp eq ptr %192, @s2n_null_cipher
  br i1 %193, label %194, label %235

194:                                              ; preds = %187
  br label %195

195:                                              ; preds = %194
  %196 = load i8, ptr %9, align 1, !tbaa !9
  %197 = zext i8 %196 to i32
  %198 = icmp ne i32 %197, 23
  br i1 %198, label %232, label %199

199:                                              ; preds = %195
  br label %200

200:                                              ; preds = %199
  br label %201

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

210:                                              ; preds = %201
  %211 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %212 = getelementptr inbounds %struct.s2n_debug_info, ptr %211, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !45
  %214 = getelementptr inbounds i8, ptr %213, i64 21
  %215 = call ptr @strrchr(ptr noundef %214, i32 noundef 47) #8
  %216 = getelementptr inbounds i8, ptr %215, i64 1
  br label %222

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

222:                                              ; preds = %217, %210
  %223 = phi ptr [ %216, %210 ], [ %221, %217 ]
  %224 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %225 = getelementptr inbounds %struct.s2n_debug_info, ptr %224, i32 0, i32 1
  store ptr %223, ptr %225, align 8, !tbaa !47
  %226 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544320, ptr %226, align 4, !tbaa !10
  %227 = call i32 @s2n_calculate_stacktrace()
  br label %228

228:                                              ; preds = %222
  br label %229

229:                                              ; preds = %228
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1324

230:                                              ; No predecessors!
  br label %231

231:                                              ; preds = %230
  br label %232

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

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  br label %235

235:                                              ; preds = %234, %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %236 = load ptr, ptr %23, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %236, i32 0, i32 6
  %238 = load ptr, ptr %237, align 8, !tbaa !54
  %239 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %238, i32 0, i32 2
  %240 = load i32, ptr %239, align 4, !tbaa !58
  %241 = and i32 %240, 4
  store i32 %241, ptr %25, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %242 = load i32, ptr %25, align 4, !tbaa !10
  %243 = icmp ne i32 %242, 0
  %244 = zext i1 %243 to i64
  %245 = select i1 %243, i32 5, i32 13
  %246 = sext i32 %245 to i64
  store i64 %246, ptr %26, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 13, ptr %27) #7
  call void @llvm.memset.p0.i64(ptr align 1 %27, i8 0, i64 13, i1 false)
  br label %247

247:                                              ; preds = %235
  %248 = load i64, ptr %26, align 8, !tbaa !12
  %249 = icmp ule i64 %248, 13
  br i1 %249, label %283, label %250

250:                                              ; preds = %247
  br label %251

251:                                              ; preds = %250
  br label %252

252:                                              ; preds = %251
  %253 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %254 = getelementptr inbounds %struct.s2n_debug_info, ptr %253, i32 0, i32 0
  store ptr @.str.16, ptr %254, align 8, !tbaa !45
  %255 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %256 = getelementptr inbounds %struct.s2n_debug_info, ptr %255, i32 0, i32 0
  %257 = load ptr, ptr %256, align 8, !tbaa !45
  %258 = getelementptr inbounds i8, ptr %257, i64 21
  %259 = call ptr @strrchr(ptr noundef %258, i32 noundef 47) #8
  %260 = icmp ne ptr %259, null
  br i1 %260, label %261, label %268

261:                                              ; preds = %252
  %262 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %263 = getelementptr inbounds %struct.s2n_debug_info, ptr %262, i32 0, i32 0
  %264 = load ptr, ptr %263, align 8, !tbaa !45
  %265 = getelementptr inbounds i8, ptr %264, i64 21
  %266 = call ptr @strrchr(ptr noundef %265, i32 noundef 47) #8
  %267 = getelementptr inbounds i8, ptr %266, i64 1
  br label %273

268:                                              ; preds = %252
  %269 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %270 = getelementptr inbounds %struct.s2n_debug_info, ptr %269, i32 0, i32 0
  %271 = load ptr, ptr %270, align 8, !tbaa !45
  %272 = getelementptr inbounds i8, ptr %271, i64 21
  br label %273

273:                                              ; preds = %268, %261
  %274 = phi ptr [ %267, %261 ], [ %272, %268 ]
  %275 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %276 = getelementptr inbounds %struct.s2n_debug_info, ptr %275, i32 0, i32 1
  store ptr %274, ptr %276, align 8, !tbaa !47
  %277 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %277, align 4, !tbaa !10
  %278 = call i32 @s2n_calculate_stacktrace()
  br label %279

279:                                              ; preds = %273
  br label %280

280:                                              ; preds = %279
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1323

281:                                              ; No predecessors!
  br label %282

282:                                              ; preds = %281
  br label %283

283:                                              ; preds = %282, %247
  br label %284

284:                                              ; preds = %283
  br label %285

285:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #7
  call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 24, i1 false)
  br label %286

286:                                              ; preds = %285
  %287 = getelementptr inbounds [13 x i8], ptr %27, i64 0, i64 0
  %288 = load i64, ptr %26, align 8, !tbaa !12
  %289 = trunc i64 %288 to i32
  %290 = call i32 @s2n_blob_init(ptr noundef %28, ptr noundef %287, i32 noundef %289)
  %291 = icmp sgt i32 %290, -1
  br i1 %291, label %293, label %292

292:                                              ; preds = %286
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1322

293:                                              ; preds = %286
  br label %294

294:                                              ; preds = %293
  br label %295

295:                                              ; preds = %294
  %296 = load ptr, ptr %8, align 8, !tbaa !5
  %297 = load i32, ptr %296, align 8
  %298 = lshr i32 %297, 15
  %299 = and i32 %298, 1
  %300 = icmp ne i32 %299, 0
  br i1 %300, label %349, label %301

301:                                              ; preds = %295
  br label %302

302:                                              ; preds = %301
  %303 = load ptr, ptr %8, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.s2n_connection, ptr %303, i32 0, i32 41
  %305 = getelementptr inbounds %struct.s2n_stuffer, ptr %304, i32 0, i32 2
  %306 = load i32, ptr %305, align 4, !tbaa !59
  %307 = load ptr, ptr %8, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.s2n_connection, ptr %307, i32 0, i32 41
  %309 = getelementptr inbounds %struct.s2n_stuffer, ptr %308, i32 0, i32 1
  %310 = load i32, ptr %309, align 8, !tbaa !60
  %311 = sub i32 %306, %310
  %312 = icmp eq i32 %311, 0
  br i1 %312, label %346, label %313

313:                                              ; preds = %302
  br label %314

314:                                              ; preds = %313
  br label %315

315:                                              ; preds = %314
  %316 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %317 = getelementptr inbounds %struct.s2n_debug_info, ptr %316, i32 0, i32 0
  store ptr @.str.17, ptr %317, align 8, !tbaa !45
  %318 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %319 = getelementptr inbounds %struct.s2n_debug_info, ptr %318, i32 0, i32 0
  %320 = load ptr, ptr %319, align 8, !tbaa !45
  %321 = getelementptr inbounds i8, ptr %320, i64 21
  %322 = call ptr @strrchr(ptr noundef %321, i32 noundef 47) #8
  %323 = icmp ne ptr %322, null
  br i1 %323, label %324, label %331

324:                                              ; preds = %315
  %325 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %326 = getelementptr inbounds %struct.s2n_debug_info, ptr %325, i32 0, i32 0
  %327 = load ptr, ptr %326, align 8, !tbaa !45
  %328 = getelementptr inbounds i8, ptr %327, i64 21
  %329 = call ptr @strrchr(ptr noundef %328, i32 noundef 47) #8
  %330 = getelementptr inbounds i8, ptr %329, i64 1
  br label %336

331:                                              ; preds = %315
  %332 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %333 = getelementptr inbounds %struct.s2n_debug_info, ptr %332, i32 0, i32 0
  %334 = load ptr, ptr %333, align 8, !tbaa !45
  %335 = getelementptr inbounds i8, ptr %334, i64 21
  br label %336

336:                                              ; preds = %331, %324
  %337 = phi ptr [ %330, %324 ], [ %335, %331 ]
  %338 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %339 = getelementptr inbounds %struct.s2n_debug_info, ptr %338, i32 0, i32 1
  store ptr %337, ptr %339, align 8, !tbaa !47
  %340 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544392, ptr %340, align 4, !tbaa !10
  %341 = call i32 @s2n_calculate_stacktrace()
  br label %342

342:                                              ; preds = %336
  br label %343

343:                                              ; preds = %342
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1322

344:                                              ; No predecessors!
  br label %345

345:                                              ; preds = %344
  br label %346

346:                                              ; preds = %345, %302
  br label %347

347:                                              ; preds = %346
  br label %348

348:                                              ; preds = %347
  br label %349

349:                                              ; preds = %348, %295
  call void @llvm.lifetime.start.p0(i64 2, ptr %29) #7
  store i16 0, ptr %29, align 2, !tbaa !14
  br label %350

350:                                              ; preds = %349
  %351 = load ptr, ptr %8, align 8, !tbaa !5
  %352 = call i32 @s2n_record_max_write_payload_size(ptr noundef %351, ptr noundef %29)
  %353 = getelementptr inbounds %struct.s2n_result, ptr %30, i32 0, i32 0
  store i32 %352, ptr %353, align 4
  %354 = getelementptr inbounds %struct.s2n_result, ptr %30, i32 0, i32 0
  %355 = load i32, ptr %354, align 4
  %356 = call zeroext i1 @s2n_result_is_ok(i32 %355)
  br i1 %356, label %358, label %357

357:                                              ; preds = %350
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1321

358:                                              ; preds = %350
  br label %359

359:                                              ; preds = %358
  br label %360

360:                                              ; preds = %359
  call void @llvm.lifetime.start.p0(i64 2, ptr %31) #7
  %361 = load i64, ptr %13, align 8, !tbaa !12
  %362 = load i16, ptr %29, align 2, !tbaa !14
  %363 = zext i16 %362 to i64
  %364 = icmp ult i64 %361, %363
  br i1 %364, label %365, label %367

365:                                              ; preds = %360
  %366 = load i64, ptr %13, align 8, !tbaa !12
  br label %370

367:                                              ; preds = %360
  %368 = load i16, ptr %29, align 2, !tbaa !14
  %369 = zext i16 %368 to i64
  br label %370

370:                                              ; preds = %367, %365
  %371 = phi i64 [ %366, %365 ], [ %369, %367 ]
  %372 = trunc i64 %371 to i16
  store i16 %372, ptr %31, align 2, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 2, ptr %32) #7
  store i16 0, ptr %32, align 2, !tbaa !14
  br label %373

373:                                              ; preds = %370
  %374 = load ptr, ptr %8, align 8, !tbaa !5
  %375 = call i32 @s2n_tls_record_overhead(ptr noundef %374, ptr noundef %32)
  %376 = getelementptr inbounds %struct.s2n_result, ptr %33, i32 0, i32 0
  store i32 %375, ptr %376, align 4
  %377 = getelementptr inbounds %struct.s2n_result, ptr %33, i32 0, i32 0
  %378 = load i32, ptr %377, align 4
  %379 = call zeroext i1 @s2n_result_is_ok(i32 %378)
  br i1 %379, label %381, label %380

380:                                              ; preds = %373
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1320

381:                                              ; preds = %373
  br label %382

382:                                              ; preds = %381
  br label %383

383:                                              ; preds = %382
  %384 = load ptr, ptr %23, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %384, i32 0, i32 6
  %386 = load ptr, ptr %385, align 8, !tbaa !54
  %387 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %386, i32 0, i32 0
  %388 = load ptr, ptr %387, align 8, !tbaa !56
  %389 = getelementptr inbounds %struct.s2n_cipher, ptr %388, i32 0, i32 0
  %390 = load i32, ptr %389, align 8, !tbaa !61
  %391 = icmp eq i32 %390, 1
  br i1 %391, label %392, label %425

392:                                              ; preds = %383
  %393 = load ptr, ptr %23, align 8, !tbaa !5
  %394 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %393, i32 0, i32 6
  %395 = load ptr, ptr %394, align 8, !tbaa !54
  %396 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %395, i32 0, i32 0
  %397 = load ptr, ptr %396, align 8, !tbaa !56
  %398 = getelementptr inbounds %struct.s2n_cipher, ptr %397, i32 0, i32 1
  %399 = getelementptr inbounds %struct.s2n_cbc_cipher, ptr %398, i32 0, i32 0
  %400 = load i8, ptr %399, align 8, !tbaa !9
  %401 = zext i8 %400 to i16
  store i16 %401, ptr %16, align 2, !tbaa !14
  %402 = load i16, ptr %31, align 2, !tbaa !14
  %403 = zext i16 %402 to i32
  %404 = load i16, ptr %32, align 2, !tbaa !14
  %405 = zext i16 %404 to i32
  %406 = add nsw i32 %403, %405
  %407 = load i16, ptr %16, align 2, !tbaa !14
  %408 = zext i16 %407 to i32
  %409 = srem i32 %406, %408
  %410 = icmp ne i32 %409, 0
  br i1 %410, label %411, label %424

411:                                              ; preds = %392
  %412 = load i16, ptr %16, align 2, !tbaa !14
  %413 = zext i16 %412 to i32
  %414 = load i16, ptr %31, align 2, !tbaa !14
  %415 = zext i16 %414 to i32
  %416 = load i16, ptr %32, align 2, !tbaa !14
  %417 = zext i16 %416 to i32
  %418 = add nsw i32 %415, %417
  %419 = load i16, ptr %16, align 2, !tbaa !14
  %420 = zext i16 %419 to i32
  %421 = srem i32 %418, %420
  %422 = sub nsw i32 %413, %421
  %423 = trunc i32 %422 to i8
  store i8 %423, ptr %15, align 1, !tbaa !9
  br label %424

424:                                              ; preds = %411, %392
  br label %445

425:                                              ; preds = %383
  %426 = load ptr, ptr %23, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %426, i32 0, i32 6
  %428 = load ptr, ptr %427, align 8, !tbaa !54
  %429 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %428, i32 0, i32 0
  %430 = load ptr, ptr %429, align 8, !tbaa !56
  %431 = getelementptr inbounds %struct.s2n_cipher, ptr %430, i32 0, i32 0
  %432 = load i32, ptr %431, align 8, !tbaa !61
  %433 = icmp eq i32 %432, 3
  br i1 %433, label %434, label %444

434:                                              ; preds = %425
  %435 = load ptr, ptr %23, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %435, i32 0, i32 6
  %437 = load ptr, ptr %436, align 8, !tbaa !54
  %438 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %437, i32 0, i32 0
  %439 = load ptr, ptr %438, align 8, !tbaa !56
  %440 = getelementptr inbounds %struct.s2n_cipher, ptr %439, i32 0, i32 1
  %441 = getelementptr inbounds %struct.s2n_composite_cipher, ptr %440, i32 0, i32 0
  %442 = load i8, ptr %441, align 8, !tbaa !9
  %443 = zext i8 %442 to i16
  store i16 %443, ptr %16, align 2, !tbaa !14
  br label %444

444:                                              ; preds = %434, %425
  br label %445

445:                                              ; preds = %444, %424
  %446 = load ptr, ptr %8, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.s2n_connection, ptr %446, i32 0, i32 41
  %448 = getelementptr inbounds %struct.s2n_stuffer, ptr %447, i32 0, i32 0
  %449 = getelementptr inbounds %struct.s2n_blob, ptr %448, i32 0, i32 0
  %450 = load ptr, ptr %449, align 8, !tbaa !63
  %451 = icmp eq ptr %450, null
  br i1 %451, label %452, label %498

452:                                              ; preds = %445
  call void @llvm.lifetime.start.p0(i64 2, ptr %34) #7
  store i16 0, ptr %34, align 2, !tbaa !14
  br label %453

453:                                              ; preds = %452
  %454 = load ptr, ptr %8, align 8, !tbaa !5
  %455 = load i16, ptr %29, align 2, !tbaa !14
  %456 = call i32 @s2n_record_max_write_size(ptr noundef %454, i16 noundef zeroext %455, ptr noundef %34)
  %457 = getelementptr inbounds %struct.s2n_result, ptr %35, i32 0, i32 0
  store i32 %456, ptr %457, align 4
  %458 = getelementptr inbounds %struct.s2n_result, ptr %35, i32 0, i32 0
  %459 = load i32, ptr %458, align 4
  %460 = call zeroext i1 @s2n_result_is_ok(i32 %459)
  br i1 %460, label %462, label %461

461:                                              ; preds = %453
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %495

462:                                              ; preds = %453
  br label %463

463:                                              ; preds = %462
  br label %464

464:                                              ; preds = %463
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %465 = load ptr, ptr %8, align 8, !tbaa !5
  %466 = getelementptr inbounds %struct.s2n_connection, ptr %465, i32 0, i32 1
  %467 = load ptr, ptr %466, align 8, !tbaa !64
  %468 = getelementptr inbounds %struct.s2n_config, ptr %467, i32 0, i32 52
  %469 = load i32, ptr %468, align 4, !tbaa !65
  %470 = load i16, ptr %34, align 2, !tbaa !14
  %471 = zext i16 %470 to i32
  %472 = icmp ugt i32 %469, %471
  br i1 %472, label %473, label %479

473:                                              ; preds = %464
  %474 = load ptr, ptr %8, align 8, !tbaa !5
  %475 = getelementptr inbounds %struct.s2n_connection, ptr %474, i32 0, i32 1
  %476 = load ptr, ptr %475, align 8, !tbaa !64
  %477 = getelementptr inbounds %struct.s2n_config, ptr %476, i32 0, i32 52
  %478 = load i32, ptr %477, align 4, !tbaa !65
  br label %482

479:                                              ; preds = %464
  %480 = load i16, ptr %34, align 2, !tbaa !14
  %481 = zext i16 %480 to i32
  br label %482

482:                                              ; preds = %479, %473
  %483 = phi i32 [ %478, %473 ], [ %481, %479 ]
  store i32 %483, ptr %36, align 4, !tbaa !10
  br label %484

484:                                              ; preds = %482
  %485 = load ptr, ptr %8, align 8, !tbaa !5
  %486 = getelementptr inbounds %struct.s2n_connection, ptr %485, i32 0, i32 41
  %487 = load i32, ptr %36, align 4, !tbaa !10
  %488 = call i32 @s2n_stuffer_growable_alloc(ptr noundef %486, i32 noundef %487)
  %489 = icmp sgt i32 %488, -1
  br i1 %489, label %491, label %490

490:                                              ; preds = %484
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %494

491:                                              ; preds = %484
  br label %492

492:                                              ; preds = %491
  br label %493

493:                                              ; preds = %492
  store i32 0, ptr %20, align 4
  br label %494

494:                                              ; preds = %493, %490
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %495

495:                                              ; preds = %494, %461
  call void @llvm.lifetime.end.p0(i64 2, ptr %34) #7
  %496 = load i32, ptr %20, align 4
  switch i32 %496, label %1320 [
    i32 0, label %497
  ]

497:                                              ; preds = %495
  br label %498

498:                                              ; preds = %497, %445
  call void @llvm.lifetime.start.p0(i64 24, ptr %37) #7
  call void @llvm.memset.p0.i64(ptr align 8 %37, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %38) #7
  call void @llvm.memset.p0.i64(ptr align 8 %38, i8 0, i64 40, i1 false)
  br label %499

499:                                              ; preds = %498
  %500 = load ptr, ptr %8, align 8, !tbaa !5
  %501 = getelementptr inbounds %struct.s2n_connection, ptr %500, i32 0, i32 41
  %502 = getelementptr inbounds %struct.s2n_stuffer, ptr %501, i32 0, i32 0
  %503 = getelementptr inbounds %struct.s2n_blob, ptr %502, i32 0, i32 0
  %504 = load ptr, ptr %503, align 8, !tbaa !63
  %505 = load ptr, ptr %8, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct.s2n_connection, ptr %505, i32 0, i32 41
  %507 = getelementptr inbounds %struct.s2n_stuffer, ptr %506, i32 0, i32 2
  %508 = load i32, ptr %507, align 4, !tbaa !59
  %509 = zext i32 %508 to i64
  %510 = getelementptr inbounds i8, ptr %504, i64 %509
  %511 = load ptr, ptr %8, align 8, !tbaa !5
  %512 = getelementptr inbounds %struct.s2n_connection, ptr %511, i32 0, i32 41
  %513 = getelementptr inbounds %struct.s2n_stuffer, ptr %512, i32 0, i32 0
  %514 = getelementptr inbounds %struct.s2n_blob, ptr %513, i32 0, i32 1
  %515 = load i32, ptr %514, align 8, !tbaa !69
  %516 = load ptr, ptr %8, align 8, !tbaa !5
  %517 = getelementptr inbounds %struct.s2n_connection, ptr %516, i32 0, i32 41
  %518 = getelementptr inbounds %struct.s2n_stuffer, ptr %517, i32 0, i32 2
  %519 = load i32, ptr %518, align 4, !tbaa !59
  %520 = sub i32 %515, %519
  %521 = call i32 @s2n_blob_init(ptr noundef %37, ptr noundef %510, i32 noundef %520)
  %522 = icmp sgt i32 %521, -1
  br i1 %522, label %524, label %523

523:                                              ; preds = %499
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1319

524:                                              ; preds = %499
  br label %525

525:                                              ; preds = %524
  br label %526

526:                                              ; preds = %525
  br label %527

527:                                              ; preds = %526
  %528 = call i32 @s2n_stuffer_init(ptr noundef %38, ptr noundef %37)
  %529 = icmp sgt i32 %528, -1
  br i1 %529, label %531, label %530

530:                                              ; preds = %527
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1319

531:                                              ; preds = %527
  br label %532

532:                                              ; preds = %531
  br label %533

533:                                              ; preds = %532
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #7
  %534 = load i32, ptr %25, align 4, !tbaa !10
  %535 = icmp ne i32 %534, 0
  br i1 %535, label %536, label %537

536:                                              ; preds = %533
  br label %540

537:                                              ; preds = %533
  %538 = load i8, ptr %9, align 1, !tbaa !9
  %539 = zext i8 %538 to i32
  br label %540

540:                                              ; preds = %537, %536
  %541 = phi i32 [ 23, %536 ], [ %539, %537 ]
  %542 = trunc i32 %541 to i8
  store i8 %542, ptr %39, align 1, !tbaa !9
  br label %543

543:                                              ; preds = %540
  %544 = load i8, ptr %39, align 1, !tbaa !9
  %545 = call i32 @s2n_stuffer_write_uint8(ptr noundef %38, i8 noundef zeroext %544)
  %546 = icmp sgt i32 %545, -1
  br i1 %546, label %548, label %547

547:                                              ; preds = %543
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1318

548:                                              ; preds = %543
  br label %549

549:                                              ; preds = %548
  br label %550

550:                                              ; preds = %549
  br label %551

551:                                              ; preds = %550
  %552 = load ptr, ptr %8, align 8, !tbaa !5
  %553 = load i8, ptr %39, align 1, !tbaa !9
  %554 = call i32 @s2n_record_write_protocol_version(ptr noundef %552, i8 noundef zeroext %553, ptr noundef %38)
  %555 = icmp sgt i32 %554, -1
  br i1 %555, label %557, label %556

556:                                              ; preds = %551
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1318

557:                                              ; preds = %551
  br label %558

558:                                              ; preds = %557
  br label %559

559:                                              ; preds = %558
  %560 = load ptr, ptr %23, align 8, !tbaa !5
  %561 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %560, i32 0, i32 6
  %562 = load ptr, ptr %561, align 8, !tbaa !54
  %563 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %562, i32 0, i32 0
  %564 = load ptr, ptr %563, align 8, !tbaa !56
  %565 = getelementptr inbounds %struct.s2n_cipher, ptr %564, i32 0, i32 0
  %566 = load i32, ptr %565, align 8, !tbaa !61
  %567 = icmp eq i32 %566, 3
  br i1 %567, label %568, label %614

568:                                              ; preds = %559
  call void @llvm.lifetime.start.p0(i64 2, ptr %40) #7
  %569 = load i16, ptr %31, align 2, !tbaa !14
  store i16 %569, ptr %40, align 2, !tbaa !14
  %570 = load ptr, ptr %8, align 8, !tbaa !5
  %571 = getelementptr inbounds %struct.s2n_connection, ptr %570, i32 0, i32 23
  %572 = load i8, ptr %571, align 4, !tbaa !43
  %573 = zext i8 %572 to i32
  %574 = icmp sgt i32 %573, 31
  br i1 %574, label %575, label %582

575:                                              ; preds = %568
  %576 = load i16, ptr %16, align 2, !tbaa !14
  %577 = zext i16 %576 to i32
  %578 = load i16, ptr %40, align 2, !tbaa !14
  %579 = zext i16 %578 to i32
  %580 = add nsw i32 %579, %577
  %581 = trunc i32 %580 to i16
  store i16 %581, ptr %40, align 2, !tbaa !14
  br label %582

582:                                              ; preds = %575, %568
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  store i32 0, ptr %41, align 4, !tbaa !10
  br label %583

583:                                              ; preds = %582
  %584 = load ptr, ptr %23, align 8, !tbaa !5
  %585 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %584, i32 0, i32 6
  %586 = load ptr, ptr %585, align 8, !tbaa !54
  %587 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %586, i32 0, i32 0
  %588 = load ptr, ptr %587, align 8, !tbaa !56
  %589 = getelementptr inbounds %struct.s2n_cipher, ptr %588, i32 0, i32 1
  %590 = getelementptr inbounds %struct.s2n_composite_cipher, ptr %589, i32 0, i32 6
  %591 = load ptr, ptr %590, align 8, !tbaa !9
  %592 = load ptr, ptr %22, align 8, !tbaa !5
  %593 = load ptr, ptr %21, align 8, !tbaa !5
  %594 = load i8, ptr %9, align 1, !tbaa !9
  %595 = load ptr, ptr %8, align 8, !tbaa !5
  %596 = getelementptr inbounds %struct.s2n_connection, ptr %595, i32 0, i32 23
  %597 = load i8, ptr %596, align 4, !tbaa !43
  %598 = zext i8 %597 to i16
  %599 = load i16, ptr %40, align 2, !tbaa !14
  %600 = call i32 %591(ptr noundef %592, ptr noundef %593, i8 noundef zeroext %594, i16 noundef zeroext %598, i16 noundef zeroext %599, ptr noundef %41)
  %601 = icmp sgt i32 %600, -1
  br i1 %601, label %603, label %602

602:                                              ; preds = %583
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %611

603:                                              ; preds = %583
  br label %604

604:                                              ; preds = %603
  br label %605

605:                                              ; preds = %604
  %606 = load i32, ptr %41, align 4, !tbaa !10
  %607 = load i16, ptr %32, align 2, !tbaa !14
  %608 = zext i16 %607 to i32
  %609 = add nsw i32 %608, %606
  %610 = trunc i32 %609 to i16
  store i16 %610, ptr %32, align 2, !tbaa !14
  store i32 0, ptr %20, align 4
  br label %611

611:                                              ; preds = %605, %602
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %40) #7
  %612 = load i32, ptr %20, align 4
  switch i32 %612, label %1318 [
    i32 0, label %613
  ]

613:                                              ; preds = %611
  br label %614

614:                                              ; preds = %613, %559
  %615 = load i32, ptr %25, align 4, !tbaa !10
  %616 = icmp ne i32 %615, 0
  br i1 %616, label %617, label %622

617:                                              ; preds = %614
  %618 = load i16, ptr %32, align 2, !tbaa !14
  %619 = zext i16 %618 to i32
  %620 = add nsw i32 %619, 1
  %621 = trunc i32 %620 to i16
  store i16 %621, ptr %32, align 2, !tbaa !14
  br label %622

622:                                              ; preds = %617, %614
  call void @llvm.lifetime.start.p0(i64 2, ptr %42) #7
  %623 = load i16, ptr %31, align 2, !tbaa !14
  %624 = zext i16 %623 to i32
  %625 = load i8, ptr %15, align 1, !tbaa !9
  %626 = zext i8 %625 to i32
  %627 = add nsw i32 %624, %626
  %628 = load i16, ptr %32, align 2, !tbaa !14
  %629 = zext i16 %628 to i32
  %630 = add nsw i32 %627, %629
  %631 = trunc i32 %630 to i16
  store i16 %631, ptr %42, align 2, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 2, ptr %43) #7
  %632 = load i32, ptr %25, align 4, !tbaa !10
  %633 = icmp ne i32 %632, 0
  %634 = zext i1 %633 to i64
  %635 = select i1 %633, i32 16645, i32 17413
  %636 = trunc i32 %635 to i16
  store i16 %636, ptr %43, align 2, !tbaa !14
  br label %637

637:                                              ; preds = %622
  %638 = load i16, ptr %42, align 2, !tbaa !14
  %639 = zext i16 %638 to i32
  %640 = add nsw i32 %639, 5
  %641 = load i16, ptr %43, align 2, !tbaa !14
  %642 = zext i16 %641 to i32
  %643 = icmp sgt i32 %640, %642
  br i1 %643, label %644, label %677

644:                                              ; preds = %637
  br label %645

645:                                              ; preds = %644
  br label %646

646:                                              ; preds = %645
  %647 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %648 = getelementptr inbounds %struct.s2n_debug_info, ptr %647, i32 0, i32 0
  store ptr @.str.18, ptr %648, align 8, !tbaa !45
  %649 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %650 = getelementptr inbounds %struct.s2n_debug_info, ptr %649, i32 0, i32 0
  %651 = load ptr, ptr %650, align 8, !tbaa !45
  %652 = getelementptr inbounds i8, ptr %651, i64 21
  %653 = call ptr @strrchr(ptr noundef %652, i32 noundef 47) #8
  %654 = icmp ne ptr %653, null
  br i1 %654, label %655, label %662

655:                                              ; preds = %646
  %656 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %657 = getelementptr inbounds %struct.s2n_debug_info, ptr %656, i32 0, i32 0
  %658 = load ptr, ptr %657, align 8, !tbaa !45
  %659 = getelementptr inbounds i8, ptr %658, i64 21
  %660 = call ptr @strrchr(ptr noundef %659, i32 noundef 47) #8
  %661 = getelementptr inbounds i8, ptr %660, i64 1
  br label %667

662:                                              ; preds = %646
  %663 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %664 = getelementptr inbounds %struct.s2n_debug_info, ptr %663, i32 0, i32 0
  %665 = load ptr, ptr %664, align 8, !tbaa !45
  %666 = getelementptr inbounds i8, ptr %665, i64 21
  br label %667

667:                                              ; preds = %662, %655
  %668 = phi ptr [ %661, %655 ], [ %666, %662 ]
  %669 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %670 = getelementptr inbounds %struct.s2n_debug_info, ptr %669, i32 0, i32 1
  store ptr %668, ptr %670, align 8, !tbaa !47
  %671 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653255, ptr %671, align 4, !tbaa !10
  %672 = call i32 @s2n_calculate_stacktrace()
  br label %673

673:                                              ; preds = %667
  br label %674

674:                                              ; preds = %673
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1317

675:                                              ; No predecessors!
  br label %676

676:                                              ; preds = %675
  br label %677

677:                                              ; preds = %676, %637
  br label %678

678:                                              ; preds = %677
  br label %679

679:                                              ; preds = %678
  br label %680

680:                                              ; preds = %679
  %681 = load i16, ptr %42, align 2, !tbaa !14
  %682 = call i32 @s2n_stuffer_write_uint16(ptr noundef %38, i16 noundef zeroext %681)
  %683 = icmp sgt i32 %682, -1
  br i1 %683, label %685, label %684

684:                                              ; preds = %680
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1317

685:                                              ; preds = %680
  br label %686

686:                                              ; preds = %685
  br label %687

687:                                              ; preds = %686
  %688 = load ptr, ptr %23, align 8, !tbaa !5
  %689 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %688, i32 0, i32 6
  %690 = load ptr, ptr %689, align 8, !tbaa !54
  %691 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %690, i32 0, i32 0
  %692 = load ptr, ptr %691, align 8, !tbaa !56
  %693 = getelementptr inbounds %struct.s2n_cipher, ptr %692, i32 0, i32 0
  %694 = load i32, ptr %693, align 8, !tbaa !61
  %695 = icmp eq i32 %694, 2
  br i1 %695, label %696, label %903

696:                                              ; preds = %687
  call void @llvm.lifetime.start.p0(i64 40, ptr %44) #7
  call void @llvm.memset.p0.i64(ptr align 8 %44, i8 0, i64 40, i1 false)
  br label %697

697:                                              ; preds = %696
  %698 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 0
  %699 = call i32 @s2n_blob_init(ptr noundef %14, ptr noundef %698, i32 noundef 16)
  %700 = icmp sgt i32 %699, -1
  br i1 %700, label %702, label %701

701:                                              ; preds = %697
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %900

702:                                              ; preds = %697
  br label %703

703:                                              ; preds = %702
  br label %704

704:                                              ; preds = %703
  br label %705

705:                                              ; preds = %704
  %706 = call i32 @s2n_stuffer_init(ptr noundef %44, ptr noundef %14)
  %707 = icmp sgt i32 %706, -1
  br i1 %707, label %709, label %708

708:                                              ; preds = %705
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %900

709:                                              ; preds = %705
  br label %710

710:                                              ; preds = %709
  br label %711

711:                                              ; preds = %710
  %712 = load ptr, ptr %23, align 8, !tbaa !5
  %713 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %712, i32 0, i32 6
  %714 = load ptr, ptr %713, align 8, !tbaa !54
  %715 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %714, i32 0, i32 2
  %716 = load i32, ptr %715, align 4, !tbaa !58
  %717 = and i32 %716, 1
  %718 = icmp ne i32 %717, 0
  br i1 %718, label %719, label %753

719:                                              ; preds = %711
  br label %720

720:                                              ; preds = %719
  %721 = load ptr, ptr %21, align 8, !tbaa !5
  %722 = call i32 @s2n_stuffer_write_bytes(ptr noundef %38, ptr noundef %721, i32 noundef 8)
  %723 = icmp sgt i32 %722, -1
  br i1 %723, label %725, label %724

724:                                              ; preds = %720
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %900

725:                                              ; preds = %720
  br label %726

726:                                              ; preds = %725
  br label %727

727:                                              ; preds = %726
  br label %728

728:                                              ; preds = %727
  %729 = load ptr, ptr %24, align 8, !tbaa !5
  %730 = load ptr, ptr %23, align 8, !tbaa !5
  %731 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %730, i32 0, i32 6
  %732 = load ptr, ptr %731, align 8, !tbaa !54
  %733 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %732, i32 0, i32 0
  %734 = load ptr, ptr %733, align 8, !tbaa !56
  %735 = getelementptr inbounds %struct.s2n_cipher, ptr %734, i32 0, i32 1
  %736 = getelementptr inbounds %struct.s2n_aead_cipher, ptr %735, i32 0, i32 0
  %737 = load i8, ptr %736, align 8, !tbaa !9
  %738 = zext i8 %737 to i32
  %739 = call i32 @s2n_stuffer_write_bytes(ptr noundef %44, ptr noundef %729, i32 noundef %738)
  %740 = icmp sgt i32 %739, -1
  br i1 %740, label %742, label %741

741:                                              ; preds = %728
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %900

742:                                              ; preds = %728
  br label %743

743:                                              ; preds = %742
  br label %744

744:                                              ; preds = %743
  br label %745

745:                                              ; preds = %744
  %746 = load ptr, ptr %21, align 8, !tbaa !5
  %747 = call i32 @s2n_stuffer_write_bytes(ptr noundef %44, ptr noundef %746, i32 noundef 8)
  %748 = icmp sgt i32 %747, -1
  br i1 %748, label %750, label %749

749:                                              ; preds = %745
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %900

750:                                              ; preds = %745
  br label %751

751:                                              ; preds = %750
  br label %752

752:                                              ; preds = %751
  br label %852

753:                                              ; preds = %711
  %754 = load ptr, ptr %23, align 8, !tbaa !5
  %755 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %754, i32 0, i32 6
  %756 = load ptr, ptr %755, align 8, !tbaa !54
  %757 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %756, i32 0, i32 2
  %758 = load i32, ptr %757, align 4, !tbaa !58
  %759 = and i32 %758, 2
  %760 = icmp ne i32 %759, 0
  br i1 %760, label %764, label %761

761:                                              ; preds = %753
  %762 = load i32, ptr %25, align 4, !tbaa !10
  %763 = icmp ne i32 %762, 0
  br i1 %763, label %764, label %818

764:                                              ; preds = %761, %753
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #7
  call void @llvm.memset.p0.i64(ptr align 1 %45, i8 0, i64 4, i1 false)
  br label %765

765:                                              ; preds = %764
  %766 = getelementptr inbounds [4 x i8], ptr %45, i64 0, i64 0
  %767 = call i32 @s2n_stuffer_write_bytes(ptr noundef %44, ptr noundef %766, i32 noundef 4)
  %768 = icmp sgt i32 %767, -1
  br i1 %768, label %770, label %769

769:                                              ; preds = %765
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %815

770:                                              ; preds = %765
  br label %771

771:                                              ; preds = %770
  br label %772

772:                                              ; preds = %771
  br label %773

773:                                              ; preds = %772
  %774 = load ptr, ptr %21, align 8, !tbaa !5
  %775 = call i32 @s2n_stuffer_write_bytes(ptr noundef %44, ptr noundef %774, i32 noundef 8)
  %776 = icmp sgt i32 %775, -1
  br i1 %776, label %778, label %777

777:                                              ; preds = %773
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %815

778:                                              ; preds = %773
  br label %779

779:                                              ; preds = %778
  br label %780

780:                                              ; preds = %779
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  store i32 0, ptr %46, align 4, !tbaa !10
  br label %781

781:                                              ; preds = %811, %780
  %782 = load i32, ptr %46, align 4, !tbaa !10
  %783 = load ptr, ptr %23, align 8, !tbaa !5
  %784 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %783, i32 0, i32 6
  %785 = load ptr, ptr %784, align 8, !tbaa !54
  %786 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %785, i32 0, i32 0
  %787 = load ptr, ptr %786, align 8, !tbaa !56
  %788 = getelementptr inbounds %struct.s2n_cipher, ptr %787, i32 0, i32 1
  %789 = getelementptr inbounds %struct.s2n_aead_cipher, ptr %788, i32 0, i32 0
  %790 = load i8, ptr %789, align 8, !tbaa !9
  %791 = zext i8 %790 to i32
  %792 = icmp slt i32 %782, %791
  br i1 %792, label %794, label %793

793:                                              ; preds = %781
  store i32 68, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  br label %814

794:                                              ; preds = %781
  %795 = load i32, ptr %46, align 4, !tbaa !10
  %796 = sext i32 %795 to i64
  %797 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 %796
  %798 = load i8, ptr %797, align 1, !tbaa !9
  %799 = zext i8 %798 to i32
  %800 = load ptr, ptr %24, align 8, !tbaa !5
  %801 = load i32, ptr %46, align 4, !tbaa !10
  %802 = sext i32 %801 to i64
  %803 = getelementptr inbounds i8, ptr %800, i64 %802
  %804 = load i8, ptr %803, align 1, !tbaa !9
  %805 = zext i8 %804 to i32
  %806 = xor i32 %799, %805
  %807 = trunc i32 %806 to i8
  %808 = load i32, ptr %46, align 4, !tbaa !10
  %809 = sext i32 %808 to i64
  %810 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 %809
  store i8 %807, ptr %810, align 1, !tbaa !9
  br label %811

811:                                              ; preds = %794
  %812 = load i32, ptr %46, align 4, !tbaa !10
  %813 = add nsw i32 %812, 1
  store i32 %813, ptr %46, align 4, !tbaa !10
  br label %781, !llvm.loop !70

814:                                              ; preds = %793
  store i32 0, ptr %20, align 4
  br label %815

815:                                              ; preds = %814, %777, %769
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  %816 = load i32, ptr %20, align 4
  switch i32 %816, label %900 [
    i32 0, label %817
  ]

817:                                              ; preds = %815
  br label %851

818:                                              ; preds = %761
  br label %819

819:                                              ; preds = %818
  br label %820

820:                                              ; preds = %819
  %821 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %822 = getelementptr inbounds %struct.s2n_debug_info, ptr %821, i32 0, i32 0
  store ptr @.str.19, ptr %822, align 8, !tbaa !45
  %823 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %824 = getelementptr inbounds %struct.s2n_debug_info, ptr %823, i32 0, i32 0
  %825 = load ptr, ptr %824, align 8, !tbaa !45
  %826 = getelementptr inbounds i8, ptr %825, i64 21
  %827 = call ptr @strrchr(ptr noundef %826, i32 noundef 47) #8
  %828 = icmp ne ptr %827, null
  br i1 %828, label %829, label %836

829:                                              ; preds = %820
  %830 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %831 = getelementptr inbounds %struct.s2n_debug_info, ptr %830, i32 0, i32 0
  %832 = load ptr, ptr %831, align 8, !tbaa !45
  %833 = getelementptr inbounds i8, ptr %832, i64 21
  %834 = call ptr @strrchr(ptr noundef %833, i32 noundef 47) #8
  %835 = getelementptr inbounds i8, ptr %834, i64 1
  br label %841

836:                                              ; preds = %820
  %837 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %838 = getelementptr inbounds %struct.s2n_debug_info, ptr %837, i32 0, i32 0
  %839 = load ptr, ptr %838, align 8, !tbaa !45
  %840 = getelementptr inbounds i8, ptr %839, i64 21
  br label %841

841:                                              ; preds = %836, %829
  %842 = phi ptr [ %835, %829 ], [ %840, %836 ]
  %843 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %844 = getelementptr inbounds %struct.s2n_debug_info, ptr %843, i32 0, i32 1
  store ptr %842, ptr %844, align 8, !tbaa !47
  %845 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653230, ptr %845, align 4, !tbaa !10
  %846 = call i32 @s2n_calculate_stacktrace()
  br label %847

847:                                              ; preds = %841
  br label %848

848:                                              ; preds = %847
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %900

849:                                              ; No predecessors!
  br label %850

850:                                              ; preds = %849
  br label %851

851:                                              ; preds = %850, %817
  br label %852

852:                                              ; preds = %851, %752
  %853 = getelementptr inbounds %struct.s2n_stuffer, ptr %44, i32 0, i32 2
  %854 = load i32, ptr %853, align 4, !tbaa !72
  %855 = getelementptr inbounds %struct.s2n_stuffer, ptr %44, i32 0, i32 1
  %856 = load i32, ptr %855, align 8, !tbaa !73
  %857 = sub i32 %854, %856
  %858 = getelementptr inbounds %struct.s2n_blob, ptr %14, i32 0, i32 1
  store i32 %857, ptr %858, align 8, !tbaa !74
  %859 = load i32, ptr %25, align 4, !tbaa !10
  %860 = icmp ne i32 %859, 0
  br i1 %860, label %861, label %884

861:                                              ; preds = %852
  br label %862

862:                                              ; preds = %861
  %863 = load i16, ptr %31, align 2, !tbaa !14
  %864 = zext i16 %863 to i32
  %865 = add nsw i32 %864, 1
  %866 = trunc i32 %865 to i16
  %867 = load ptr, ptr %23, align 8, !tbaa !5
  %868 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %867, i32 0, i32 6
  %869 = load ptr, ptr %868, align 8, !tbaa !54
  %870 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %869, i32 0, i32 0
  %871 = load ptr, ptr %870, align 8, !tbaa !56
  %872 = getelementptr inbounds %struct.s2n_cipher, ptr %871, i32 0, i32 1
  %873 = getelementptr inbounds %struct.s2n_aead_cipher, ptr %872, i32 0, i32 2
  %874 = load i8, ptr %873, align 2, !tbaa !9
  %875 = call i32 @s2n_tls13_aead_aad_init(i16 noundef zeroext %866, i8 noundef zeroext %874, ptr noundef %28)
  %876 = getelementptr inbounds %struct.s2n_result, ptr %47, i32 0, i32 0
  store i32 %875, ptr %876, align 4
  %877 = getelementptr inbounds %struct.s2n_result, ptr %47, i32 0, i32 0
  %878 = load i32, ptr %877, align 4
  %879 = call zeroext i1 @s2n_result_is_ok(i32 %878)
  br i1 %879, label %881, label %880

880:                                              ; preds = %862
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %900

881:                                              ; preds = %862
  br label %882

882:                                              ; preds = %881
  br label %883

883:                                              ; preds = %882
  br label %899

884:                                              ; preds = %852
  br label %885

885:                                              ; preds = %884
  %886 = load ptr, ptr %8, align 8, !tbaa !5
  %887 = load ptr, ptr %21, align 8, !tbaa !5
  %888 = load i8, ptr %9, align 1, !tbaa !9
  %889 = load i16, ptr %31, align 2, !tbaa !14
  %890 = call i32 @s2n_aead_aad_init(ptr noundef %886, ptr noundef %887, i8 noundef zeroext %888, i16 noundef zeroext %889, ptr noundef %28)
  %891 = getelementptr inbounds %struct.s2n_result, ptr %48, i32 0, i32 0
  store i32 %890, ptr %891, align 4
  %892 = getelementptr inbounds %struct.s2n_result, ptr %48, i32 0, i32 0
  %893 = load i32, ptr %892, align 4
  %894 = call zeroext i1 @s2n_result_is_ok(i32 %893)
  br i1 %894, label %896, label %895

895:                                              ; preds = %885
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %900

896:                                              ; preds = %885
  br label %897

897:                                              ; preds = %896
  br label %898

898:                                              ; preds = %897
  br label %899

899:                                              ; preds = %898, %883
  store i32 0, ptr %20, align 4
  br label %900

900:                                              ; preds = %899, %895, %880, %848, %815, %749, %741, %724, %708, %701
  call void @llvm.lifetime.end.p0(i64 40, ptr %44) #7
  %901 = load i32, ptr %20, align 4
  switch i32 %901, label %1317 [
    i32 0, label %902
  ]

902:                                              ; preds = %900
  br label %998

903:                                              ; preds = %687
  %904 = load ptr, ptr %23, align 8, !tbaa !5
  %905 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %904, i32 0, i32 6
  %906 = load ptr, ptr %905, align 8, !tbaa !54
  %907 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %906, i32 0, i32 0
  %908 = load ptr, ptr %907, align 8, !tbaa !56
  %909 = getelementptr inbounds %struct.s2n_cipher, ptr %908, i32 0, i32 0
  %910 = load i32, ptr %909, align 8, !tbaa !61
  %911 = icmp eq i32 %910, 1
  br i1 %911, label %921, label %912

912:                                              ; preds = %903
  %913 = load ptr, ptr %23, align 8, !tbaa !5
  %914 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %913, i32 0, i32 6
  %915 = load ptr, ptr %914, align 8, !tbaa !54
  %916 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %915, i32 0, i32 0
  %917 = load ptr, ptr %916, align 8, !tbaa !56
  %918 = getelementptr inbounds %struct.s2n_cipher, ptr %917, i32 0, i32 0
  %919 = load i32, ptr %918, align 8, !tbaa !61
  %920 = icmp eq i32 %919, 3
  br i1 %920, label %921, label %997

921:                                              ; preds = %912, %903
  br label %922

922:                                              ; preds = %921
  %923 = load ptr, ptr %24, align 8, !tbaa !5
  %924 = load i16, ptr %16, align 2, !tbaa !14
  %925 = zext i16 %924 to i32
  %926 = call i32 @s2n_blob_init(ptr noundef %14, ptr noundef %923, i32 noundef %925)
  %927 = icmp sgt i32 %926, -1
  br i1 %927, label %929, label %928

928:                                              ; preds = %922
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1317

929:                                              ; preds = %922
  br label %930

930:                                              ; preds = %929
  br label %931

931:                                              ; preds = %930
  %932 = load ptr, ptr %8, align 8, !tbaa !5
  %933 = getelementptr inbounds %struct.s2n_connection, ptr %932, i32 0, i32 23
  %934 = load i8, ptr %933, align 4, !tbaa !43
  %935 = zext i8 %934 to i32
  %936 = icmp sgt i32 %935, 31
  br i1 %936, label %937, label %996

937:                                              ; preds = %931
  br label %938

938:                                              ; preds = %937
  %939 = call i32 @s2n_get_public_random_data(ptr noundef %14)
  %940 = getelementptr inbounds %struct.s2n_result, ptr %49, i32 0, i32 0
  store i32 %939, ptr %940, align 4
  %941 = getelementptr inbounds %struct.s2n_result, ptr %49, i32 0, i32 0
  %942 = load i32, ptr %941, align 4
  %943 = call zeroext i1 @s2n_result_is_ok(i32 %942)
  br i1 %943, label %945, label %944

944:                                              ; preds = %938
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1317

945:                                              ; preds = %938
  br label %946

946:                                              ; preds = %945
  br label %947

947:                                              ; preds = %946
  %948 = load ptr, ptr %23, align 8, !tbaa !5
  %949 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %948, i32 0, i32 6
  %950 = load ptr, ptr %949, align 8, !tbaa !54
  %951 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %950, i32 0, i32 0
  %952 = load ptr, ptr %951, align 8, !tbaa !56
  %953 = getelementptr inbounds %struct.s2n_cipher, ptr %952, i32 0, i32 0
  %954 = load i32, ptr %953, align 8, !tbaa !61
  %955 = icmp eq i32 %954, 3
  br i1 %955, label %956, label %987

956:                                              ; preds = %947
  call void @llvm.lifetime.start.p0(i64 24, ptr %50) #7
  call void @llvm.memset.p0.i64(ptr align 8 %50, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #7
  call void @llvm.memset.p0.i64(ptr align 16 %51, i8 0, i64 16, i1 false)
  br label %957

957:                                              ; preds = %956
  %958 = getelementptr inbounds [16 x i8], ptr %51, i64 0, i64 0
  %959 = load i16, ptr %16, align 2, !tbaa !14
  %960 = zext i16 %959 to i32
  %961 = call i32 @s2n_blob_init(ptr noundef %50, ptr noundef %958, i32 noundef %960)
  %962 = icmp sgt i32 %961, -1
  br i1 %962, label %964, label %963

963:                                              ; preds = %957
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %984

964:                                              ; preds = %957
  br label %965

965:                                              ; preds = %964
  br label %966

966:                                              ; preds = %965
  br label %967

967:                                              ; preds = %966
  %968 = call i32 @s2n_get_public_random_data(ptr noundef %50)
  %969 = getelementptr inbounds %struct.s2n_result, ptr %52, i32 0, i32 0
  store i32 %968, ptr %969, align 4
  %970 = getelementptr inbounds %struct.s2n_result, ptr %52, i32 0, i32 0
  %971 = load i32, ptr %970, align 4
  %972 = call zeroext i1 @s2n_result_is_ok(i32 %971)
  br i1 %972, label %974, label %973

973:                                              ; preds = %967
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %984

974:                                              ; preds = %967
  br label %975

975:                                              ; preds = %974
  br label %976

976:                                              ; preds = %975
  br label %977

977:                                              ; preds = %976
  %978 = call i32 @s2n_stuffer_write(ptr noundef %38, ptr noundef %50)
  %979 = icmp sgt i32 %978, -1
  br i1 %979, label %981, label %980

980:                                              ; preds = %977
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %984

981:                                              ; preds = %977
  br label %982

982:                                              ; preds = %981
  br label %983

983:                                              ; preds = %982
  store i32 0, ptr %20, align 4
  br label %984

984:                                              ; preds = %983, %980, %973, %963
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %50) #7
  %985 = load i32, ptr %20, align 4
  switch i32 %985, label %1317 [
    i32 0, label %986
  ]

986:                                              ; preds = %984
  br label %995

987:                                              ; preds = %947
  br label %988

988:                                              ; preds = %987
  %989 = call i32 @s2n_stuffer_write(ptr noundef %38, ptr noundef %14)
  %990 = icmp sgt i32 %989, -1
  br i1 %990, label %992, label %991

991:                                              ; preds = %988
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1317

992:                                              ; preds = %988
  br label %993

993:                                              ; preds = %992
  br label %994

994:                                              ; preds = %993
  br label %995

995:                                              ; preds = %994, %986
  br label %996

996:                                              ; preds = %995, %931
  br label %997

997:                                              ; preds = %996, %912
  br label %998

998:                                              ; preds = %997, %902
  br label %999

999:                                              ; preds = %998
  %1000 = load ptr, ptr %10, align 8, !tbaa !5
  %1001 = load i32, ptr %11, align 4, !tbaa !10
  %1002 = sext i32 %1001 to i64
  %1003 = load i64, ptr %12, align 8, !tbaa !12
  %1004 = trunc i64 %1003 to i32
  %1005 = load i16, ptr %31, align 2, !tbaa !14
  %1006 = zext i16 %1005 to i32
  %1007 = call i32 @s2n_stuffer_writev_bytes(ptr noundef %38, ptr noundef %1000, i64 noundef %1002, i32 noundef %1004, i32 noundef %1006)
  %1008 = icmp sgt i32 %1007, -1
  br i1 %1008, label %1010, label %1009

1009:                                             ; preds = %999
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1317

1010:                                             ; preds = %999
  br label %1011

1011:                                             ; preds = %1010
  br label %1012

1012:                                             ; preds = %1011
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #7
  %1013 = getelementptr inbounds %struct.s2n_stuffer, ptr %38, i32 0, i32 0
  %1014 = getelementptr inbounds %struct.s2n_blob, ptr %1013, i32 0, i32 0
  %1015 = load ptr, ptr %1014, align 8, !tbaa !75
  %1016 = getelementptr inbounds %struct.s2n_stuffer, ptr %38, i32 0, i32 2
  %1017 = load i32, ptr %1016, align 4, !tbaa !72
  %1018 = zext i32 %1017 to i64
  %1019 = getelementptr inbounds i8, ptr %1015, i64 %1018
  %1020 = load i16, ptr %31, align 2, !tbaa !14
  %1021 = zext i16 %1020 to i32
  %1022 = sext i32 %1021 to i64
  %1023 = sub i64 0, %1022
  %1024 = getelementptr inbounds i8, ptr %1019, i64 %1023
  store ptr %1024, ptr %53, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %54) #7
  call void @llvm.memset.p0.i64(ptr align 8 %54, i8 0, i64 24, i1 false)
  br label %1025

1025:                                             ; preds = %1012
  %1026 = call i32 @s2n_blob_slice(ptr noundef %37, ptr noundef %54, i32 noundef 0, i32 noundef 5)
  %1027 = icmp sgt i32 %1026, -1
  br i1 %1027, label %1029, label %1028

1028:                                             ; preds = %1025
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1316

1029:                                             ; preds = %1025
  br label %1030

1030:                                             ; preds = %1029
  br label %1031

1031:                                             ; preds = %1030
  call void @llvm.lifetime.start.p0(i64 24, ptr %55) #7
  call void @llvm.memset.p0.i64(ptr align 8 %55, i8 0, i64 24, i1 false)
  br label %1032

1032:                                             ; preds = %1031
  %1033 = load ptr, ptr %53, align 8, !tbaa !5
  %1034 = load i16, ptr %31, align 2, !tbaa !14
  %1035 = zext i16 %1034 to i32
  %1036 = call i32 @s2n_blob_init(ptr noundef %55, ptr noundef %1033, i32 noundef %1035)
  %1037 = icmp sgt i32 %1036, -1
  br i1 %1037, label %1039, label %1038

1038:                                             ; preds = %1032
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1315

1039:                                             ; preds = %1032
  br label %1040

1040:                                             ; preds = %1039
  br label %1041

1041:                                             ; preds = %1040
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #7
  store i32 0, ptr %56, align 4, !tbaa !10
  br label %1042

1042:                                             ; preds = %1041
  %1043 = load ptr, ptr %8, align 8, !tbaa !5
  %1044 = call i32 @s2n_record_write_mac(ptr noundef %1043, ptr noundef %54, ptr noundef %55, ptr noundef %38, ptr noundef %56)
  %1045 = getelementptr inbounds %struct.s2n_result, ptr %57, i32 0, i32 0
  store i32 %1044, ptr %1045, align 4
  %1046 = getelementptr inbounds %struct.s2n_result, ptr %57, i32 0, i32 0
  %1047 = load i32, ptr %1046, align 4
  %1048 = call zeroext i1 @s2n_result_is_ok(i32 %1047)
  br i1 %1048, label %1050, label %1049

1049:                                             ; preds = %1042
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1314

1050:                                             ; preds = %1042
  br label %1051

1051:                                             ; preds = %1050
  br label %1052

1052:                                             ; preds = %1051
  call void @llvm.lifetime.start.p0(i64 24, ptr %58) #7
  call void @llvm.memset.p0.i64(ptr align 8 %58, i8 0, i64 24, i1 false)
  br label %1053

1053:                                             ; preds = %1052
  %1054 = load ptr, ptr %21, align 8, !tbaa !5
  %1055 = call i32 @s2n_blob_init(ptr noundef %58, ptr noundef %1054, i32 noundef 8)
  %1056 = icmp sgt i32 %1055, -1
  br i1 %1056, label %1058, label %1057

1057:                                             ; preds = %1053
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1313

1058:                                             ; preds = %1053
  br label %1059

1059:                                             ; preds = %1058
  br label %1060

1060:                                             ; preds = %1059
  br label %1061

1061:                                             ; preds = %1060
  %1062 = call i32 @s2n_increment_sequence_number(ptr noundef %58)
  %1063 = icmp sgt i32 %1062, -1
  br i1 %1063, label %1065, label %1064

1064:                                             ; preds = %1061
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1313

1065:                                             ; preds = %1061
  br label %1066

1066:                                             ; preds = %1065
  br label %1067

1067:                                             ; preds = %1066
  %1068 = load i32, ptr %25, align 4, !tbaa !10
  %1069 = icmp ne i32 %1068, 0
  br i1 %1069, label %1070, label %1079

1070:                                             ; preds = %1067
  br label %1071

1071:                                             ; preds = %1070
  %1072 = load i8, ptr %9, align 1, !tbaa !9
  %1073 = call i32 @s2n_stuffer_write_uint8(ptr noundef %38, i8 noundef zeroext %1072)
  %1074 = icmp sgt i32 %1073, -1
  br i1 %1074, label %1076, label %1075

1075:                                             ; preds = %1071
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1313

1076:                                             ; preds = %1071
  br label %1077

1077:                                             ; preds = %1076
  br label %1078

1078:                                             ; preds = %1077
  br label %1079

1079:                                             ; preds = %1078, %1067
  %1080 = load ptr, ptr %23, align 8, !tbaa !5
  %1081 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %1080, i32 0, i32 6
  %1082 = load ptr, ptr %1081, align 8, !tbaa !54
  %1083 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %1082, i32 0, i32 0
  %1084 = load ptr, ptr %1083, align 8, !tbaa !56
  %1085 = getelementptr inbounds %struct.s2n_cipher, ptr %1084, i32 0, i32 0
  %1086 = load i32, ptr %1085, align 8, !tbaa !61
  %1087 = icmp eq i32 %1086, 1
  br i1 %1087, label %1088, label %1110

1088:                                             ; preds = %1079
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #7
  store i32 0, ptr %59, align 4, !tbaa !10
  br label %1089

1089:                                             ; preds = %1104, %1088
  %1090 = load i32, ptr %59, align 4, !tbaa !10
  %1091 = load i8, ptr %15, align 1, !tbaa !9
  %1092 = zext i8 %1091 to i32
  %1093 = icmp sle i32 %1090, %1092
  br i1 %1093, label %1095, label %1094

1094:                                             ; preds = %1089
  store i32 105, ptr %20, align 4
  br label %1107

1095:                                             ; preds = %1089
  br label %1096

1096:                                             ; preds = %1095
  %1097 = load i8, ptr %15, align 1, !tbaa !9
  %1098 = call i32 @s2n_stuffer_write_uint8(ptr noundef %38, i8 noundef zeroext %1097)
  %1099 = icmp sgt i32 %1098, -1
  br i1 %1099, label %1101, label %1100

1100:                                             ; preds = %1096
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1107

1101:                                             ; preds = %1096
  br label %1102

1102:                                             ; preds = %1101
  br label %1103

1103:                                             ; preds = %1102
  br label %1104

1104:                                             ; preds = %1103
  %1105 = load i32, ptr %59, align 4, !tbaa !10
  %1106 = add nsw i32 %1105, 1
  store i32 %1106, ptr %59, align 4, !tbaa !10
  br label %1089, !llvm.loop !76

1107:                                             ; preds = %1100, %1094
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #7
  %1108 = load i32, ptr %20, align 4
  switch i32 %1108, label %1313 [
    i32 105, label %1109
  ]

1109:                                             ; preds = %1107
  br label %1110

1110:                                             ; preds = %1109, %1079
  br label %1111

1111:                                             ; preds = %1110
  %1112 = call i32 @s2n_stuffer_rewrite(ptr noundef %38)
  %1113 = icmp sgt i32 %1112, -1
  br i1 %1113, label %1115, label %1114

1114:                                             ; preds = %1111
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1313

1115:                                             ; preds = %1111
  br label %1116

1116:                                             ; preds = %1115
  br label %1117

1117:                                             ; preds = %1116
  br label %1118

1118:                                             ; preds = %1117
  %1119 = call i32 @s2n_stuffer_skip_write(ptr noundef %38, i32 noundef 5)
  %1120 = icmp sgt i32 %1119, -1
  br i1 %1120, label %1122, label %1121

1121:                                             ; preds = %1118
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1313

1122:                                             ; preds = %1118
  br label %1123

1123:                                             ; preds = %1122
  br label %1124

1124:                                             ; preds = %1123
  call void @llvm.lifetime.start.p0(i64 2, ptr %60) #7
  %1125 = load i16, ptr %31, align 2, !tbaa !14
  %1126 = zext i16 %1125 to i32
  %1127 = load i32, ptr %56, align 4, !tbaa !10
  %1128 = add i32 %1126, %1127
  %1129 = trunc i32 %1128 to i16
  store i16 %1129, ptr %60, align 2, !tbaa !14
  %1130 = load ptr, ptr %23, align 8, !tbaa !5
  %1131 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %1130, i32 0, i32 6
  %1132 = load ptr, ptr %1131, align 8, !tbaa !54
  %1133 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %1132, i32 0, i32 0
  %1134 = load ptr, ptr %1133, align 8, !tbaa !56
  %1135 = getelementptr inbounds %struct.s2n_cipher, ptr %1134, i32 0, i32 0
  %1136 = load i32, ptr %1135, align 8, !tbaa !61
  switch i32 %1136, label %1206 [
    i32 2, label %1137
    i32 1, label %1175
    i32 3, label %1199
  ]

1137:                                             ; preds = %1124
  br label %1138

1138:                                             ; preds = %1137
  %1139 = load ptr, ptr %23, align 8, !tbaa !5
  %1140 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %1139, i32 0, i32 6
  %1141 = load ptr, ptr %1140, align 8, !tbaa !54
  %1142 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %1141, i32 0, i32 0
  %1143 = load ptr, ptr %1142, align 8, !tbaa !56
  %1144 = getelementptr inbounds %struct.s2n_cipher, ptr %1143, i32 0, i32 1
  %1145 = getelementptr inbounds %struct.s2n_aead_cipher, ptr %1144, i32 0, i32 1
  %1146 = load i8, ptr %1145, align 1, !tbaa !9
  %1147 = zext i8 %1146 to i32
  %1148 = call i32 @s2n_stuffer_skip_write(ptr noundef %38, i32 noundef %1147)
  %1149 = icmp sgt i32 %1148, -1
  br i1 %1149, label %1151, label %1150

1150:                                             ; preds = %1138
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1312

1151:                                             ; preds = %1138
  br label %1152

1152:                                             ; preds = %1151
  br label %1153

1153:                                             ; preds = %1152
  %1154 = load ptr, ptr %23, align 8, !tbaa !5
  %1155 = getelementptr inbounds %struct.s2n_cipher_suite, ptr %1154, i32 0, i32 6
  %1156 = load ptr, ptr %1155, align 8, !tbaa !54
  %1157 = getelementptr inbounds %struct.s2n_record_algorithm, ptr %1156, i32 0, i32 0
  %1158 = load ptr, ptr %1157, align 8, !tbaa !56
  %1159 = getelementptr inbounds %struct.s2n_cipher, ptr %1158, i32 0, i32 1
  %1160 = getelementptr inbounds %struct.s2n_aead_cipher, ptr %1159, i32 0, i32 2
  %1161 = load i8, ptr %1160, align 2, !tbaa !9
  %1162 = zext i8 %1161 to i32
  %1163 = load i16, ptr %60, align 2, !tbaa !14
  %1164 = zext i16 %1163 to i32
  %1165 = add nsw i32 %1164, %1162
  %1166 = trunc i32 %1165 to i16
  store i16 %1166, ptr %60, align 2, !tbaa !14
  %1167 = load i32, ptr %25, align 4, !tbaa !10
  %1168 = icmp ne i32 %1167, 0
  br i1 %1168, label %1169, label %1174

1169:                                             ; preds = %1153
  %1170 = load i16, ptr %60, align 2, !tbaa !14
  %1171 = zext i16 %1170 to i32
  %1172 = add nsw i32 %1171, 1
  %1173 = trunc i32 %1172 to i16
  store i16 %1173, ptr %60, align 2, !tbaa !14
  br label %1174

1174:                                             ; preds = %1169, %1153
  br label %1207

1175:                                             ; preds = %1124
  %1176 = load ptr, ptr %8, align 8, !tbaa !5
  %1177 = getelementptr inbounds %struct.s2n_connection, ptr %1176, i32 0, i32 23
  %1178 = load i8, ptr %1177, align 4, !tbaa !43
  %1179 = zext i8 %1178 to i32
  %1180 = icmp sgt i32 %1179, 31
  br i1 %1180, label %1181, label %1191

1181:                                             ; preds = %1175
  br label %1182

1182:                                             ; preds = %1181
  %1183 = getelementptr inbounds %struct.s2n_blob, ptr %14, i32 0, i32 1
  %1184 = load i32, ptr %1183, align 8, !tbaa !74
  %1185 = call i32 @s2n_stuffer_skip_write(ptr noundef %38, i32 noundef %1184)
  %1186 = icmp sgt i32 %1185, -1
  br i1 %1186, label %1188, label %1187

1187:                                             ; preds = %1182
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1312

1188:                                             ; preds = %1182
  br label %1189

1189:                                             ; preds = %1188
  br label %1190

1190:                                             ; preds = %1189
  br label %1191

1191:                                             ; preds = %1190, %1175
  %1192 = load i8, ptr %15, align 1, !tbaa !9
  %1193 = zext i8 %1192 to i32
  %1194 = add nsw i32 %1193, 1
  %1195 = load i16, ptr %60, align 2, !tbaa !14
  %1196 = zext i16 %1195 to i32
  %1197 = add nsw i32 %1196, %1194
  %1198 = trunc i32 %1197 to i16
  store i16 %1198, ptr %60, align 2, !tbaa !14
  br label %1207

1199:                                             ; preds = %1124
  %1200 = load i16, ptr %32, align 2, !tbaa !14
  %1201 = zext i16 %1200 to i32
  %1202 = load i16, ptr %60, align 2, !tbaa !14
  %1203 = zext i16 %1202 to i32
  %1204 = add nsw i32 %1203, %1201
  %1205 = trunc i32 %1204 to i16
  store i16 %1205, ptr %60, align 2, !tbaa !14
  br label %1207

1206:                                             ; preds = %1124
  br label %1207

1207:                                             ; preds = %1206, %1199, %1191, %1174
  br label %1208

1208:                                             ; preds = %1207
  %1209 = getelementptr inbounds %struct.s2n_stuffer, ptr %38, i32 0, i32 0
  %1210 = getelementptr inbounds %struct.s2n_blob, ptr %1209, i32 0, i32 1
  %1211 = load i32, ptr %1210, align 8, !tbaa !77
  %1212 = getelementptr inbounds %struct.s2n_stuffer, ptr %38, i32 0, i32 2
  %1213 = load i32, ptr %1212, align 4, !tbaa !72
  %1214 = sub i32 %1211, %1213
  %1215 = load i16, ptr %60, align 2, !tbaa !14
  %1216 = zext i16 %1215 to i32
  %1217 = icmp ult i32 %1214, %1216
  br i1 %1217, label %1218, label %1251

1218:                                             ; preds = %1208
  br label %1219

1219:                                             ; preds = %1218
  br label %1220

1220:                                             ; preds = %1219
  %1221 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %1222 = getelementptr inbounds %struct.s2n_debug_info, ptr %1221, i32 0, i32 0
  store ptr @.str.20, ptr %1222, align 8, !tbaa !45
  %1223 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %1224 = getelementptr inbounds %struct.s2n_debug_info, ptr %1223, i32 0, i32 0
  %1225 = load ptr, ptr %1224, align 8, !tbaa !45
  %1226 = getelementptr inbounds i8, ptr %1225, i64 21
  %1227 = call ptr @strrchr(ptr noundef %1226, i32 noundef 47) #8
  %1228 = icmp ne ptr %1227, null
  br i1 %1228, label %1229, label %1236

1229:                                             ; preds = %1220
  %1230 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %1231 = getelementptr inbounds %struct.s2n_debug_info, ptr %1230, i32 0, i32 0
  %1232 = load ptr, ptr %1231, align 8, !tbaa !45
  %1233 = getelementptr inbounds i8, ptr %1232, i64 21
  %1234 = call ptr @strrchr(ptr noundef %1233, i32 noundef 47) #8
  %1235 = getelementptr inbounds i8, ptr %1234, i64 1
  br label %1241

1236:                                             ; preds = %1220
  %1237 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %1238 = getelementptr inbounds %struct.s2n_debug_info, ptr %1237, i32 0, i32 0
  %1239 = load ptr, ptr %1238, align 8, !tbaa !45
  %1240 = getelementptr inbounds i8, ptr %1239, i64 21
  br label %1241

1241:                                             ; preds = %1236, %1229
  %1242 = phi ptr [ %1235, %1229 ], [ %1240, %1236 ]
  %1243 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %1244 = getelementptr inbounds %struct.s2n_debug_info, ptr %1243, i32 0, i32 1
  store ptr %1242, ptr %1244, align 8, !tbaa !47
  %1245 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544389, ptr %1245, align 4, !tbaa !10
  %1246 = call i32 @s2n_calculate_stacktrace()
  br label %1247

1247:                                             ; preds = %1241
  br label %1248

1248:                                             ; preds = %1247
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1312

1249:                                             ; No predecessors!
  br label %1250

1250:                                             ; preds = %1249
  br label %1251

1251:                                             ; preds = %1250, %1208
  br label %1252

1252:                                             ; preds = %1251
  br label %1253

1253:                                             ; preds = %1252
  call void @llvm.lifetime.start.p0(i64 24, ptr %61) #7
  %1254 = getelementptr inbounds %struct.s2n_blob, ptr %61, i32 0, i32 0
  %1255 = load i16, ptr %60, align 2, !tbaa !14
  %1256 = zext i16 %1255 to i32
  %1257 = call ptr @s2n_stuffer_raw_write(ptr noundef %38, i32 noundef %1256)
  store ptr %1257, ptr %1254, align 8, !tbaa !78
  %1258 = getelementptr inbounds %struct.s2n_blob, ptr %61, i32 0, i32 1
  %1259 = load i16, ptr %60, align 2, !tbaa !14
  %1260 = zext i16 %1259 to i32
  store i32 %1260, ptr %1258, align 8, !tbaa !74
  %1261 = getelementptr inbounds %struct.s2n_blob, ptr %61, i32 0, i32 2
  store i32 0, ptr %1261, align 4, !tbaa !79
  %1262 = getelementptr inbounds %struct.s2n_blob, ptr %61, i32 0, i32 3
  %1263 = load i8, ptr %1262, align 8
  %1264 = and i8 %1263, -2
  %1265 = or i8 %1264, 0
  store i8 %1265, ptr %1262, align 8
  br label %1266

1266:                                             ; preds = %1253
  %1267 = load ptr, ptr %8, align 8, !tbaa !5
  %1268 = load ptr, ptr %23, align 8, !tbaa !5
  %1269 = load ptr, ptr %22, align 8, !tbaa !5
  %1270 = load ptr, ptr %24, align 8, !tbaa !5
  %1271 = load i16, ptr %16, align 2, !tbaa !14
  %1272 = call i32 @s2n_record_encrypt(ptr noundef %1267, ptr noundef %1268, ptr noundef %1269, ptr noundef %14, ptr noundef %28, ptr noundef %61, ptr noundef %1270, i16 noundef zeroext %1271)
  %1273 = icmp sgt i32 %1272, -1
  br i1 %1273, label %1275, label %1274

1274:                                             ; preds = %1266
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1311

1275:                                             ; preds = %1266
  br label %1276

1276:                                             ; preds = %1275
  br label %1277

1277:                                             ; preds = %1276
  br label %1278

1278:                                             ; preds = %1277
  %1279 = load ptr, ptr %8, align 8, !tbaa !5
  %1280 = getelementptr inbounds %struct.s2n_connection, ptr %1279, i32 0, i32 41
  %1281 = getelementptr inbounds %struct.s2n_stuffer, ptr %38, i32 0, i32 2
  %1282 = load i32, ptr %1281, align 4, !tbaa !72
  %1283 = getelementptr inbounds %struct.s2n_stuffer, ptr %38, i32 0, i32 1
  %1284 = load i32, ptr %1283, align 8, !tbaa !73
  %1285 = sub i32 %1282, %1284
  %1286 = call i32 @s2n_stuffer_skip_write(ptr noundef %1280, i32 noundef %1285)
  %1287 = icmp sgt i32 %1286, -1
  br i1 %1287, label %1289, label %1288

1288:                                             ; preds = %1278
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1311

1289:                                             ; preds = %1278
  br label %1290

1290:                                             ; preds = %1289
  br label %1291

1291:                                             ; preds = %1290
  %1292 = load ptr, ptr %8, align 8, !tbaa !5
  %1293 = getelementptr inbounds %struct.s2n_connection, ptr %1292, i32 0, i32 23
  %1294 = load i8, ptr %1293, align 4, !tbaa !43
  %1295 = zext i8 %1294 to i32
  %1296 = icmp eq i32 %1295, 34
  br i1 %1296, label %1297, label %1308

1297:                                             ; preds = %1291
  %1298 = load i8, ptr %9, align 1, !tbaa !9
  %1299 = zext i8 %1298 to i32
  %1300 = icmp eq i32 %1299, 20
  br i1 %1300, label %1301, label %1308

1301:                                             ; preds = %1297
  %1302 = load ptr, ptr %18, align 8, !tbaa !5
  %1303 = load ptr, ptr %8, align 8, !tbaa !5
  %1304 = getelementptr inbounds %struct.s2n_connection, ptr %1303, i32 0, i32 29
  store ptr %1302, ptr %1304, align 8, !tbaa !16
  %1305 = load ptr, ptr %19, align 8, !tbaa !5
  %1306 = load ptr, ptr %8, align 8, !tbaa !5
  %1307 = getelementptr inbounds %struct.s2n_connection, ptr %1306, i32 0, i32 30
  store ptr %1305, ptr %1307, align 8, !tbaa !42
  br label %1308

1308:                                             ; preds = %1301, %1297, %1291
  %1309 = load i16, ptr %31, align 2, !tbaa !14
  %1310 = zext i16 %1309 to i32
  store i32 %1310, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %1311

1311:                                             ; preds = %1308, %1288, %1274
  call void @llvm.lifetime.end.p0(i64 24, ptr %61) #7
  br label %1312

1312:                                             ; preds = %1311, %1248, %1187, %1150
  call void @llvm.lifetime.end.p0(i64 2, ptr %60) #7
  br label %1313

1313:                                             ; preds = %1312, %1121, %1114, %1107, %1075, %1064, %1057
  call void @llvm.lifetime.end.p0(i64 24, ptr %58) #7
  br label %1314

1314:                                             ; preds = %1313, %1049
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  br label %1315

1315:                                             ; preds = %1314, %1038
  call void @llvm.lifetime.end.p0(i64 24, ptr %55) #7
  br label %1316

1316:                                             ; preds = %1315, %1028
  call void @llvm.lifetime.end.p0(i64 24, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #7
  br label %1317

1317:                                             ; preds = %1316, %1009, %991, %984, %944, %928, %900, %684, %674
  call void @llvm.lifetime.end.p0(i64 2, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %42) #7
  br label %1318

1318:                                             ; preds = %1317, %611, %556, %547
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #7
  br label %1319

1319:                                             ; preds = %1318, %530, %523
  call void @llvm.lifetime.end.p0(i64 40, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #7
  br label %1320

1320:                                             ; preds = %1319, %495, %380
  call void @llvm.lifetime.end.p0(i64 2, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %31) #7
  br label %1321

1321:                                             ; preds = %1320, %357
  call void @llvm.lifetime.end.p0(i64 2, ptr %29) #7
  br label %1322

1322:                                             ; preds = %1321, %343, %292
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  br label %1323

1323:                                             ; preds = %1322, %280
  call void @llvm.lifetime.end.p0(i64 13, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %1324

1324:                                             ; preds = %1323, %229
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %1325

1325:                                             ; preds = %1324, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  br label %1326

1326:                                             ; preds = %1325, %67
  %1327 = load i32, ptr %7, align 4
  ret i32 %1327
}

declare i32 @s2n_ktls_record_writev(ptr noundef, i8 noundef zeroext, ptr noundef, i32 noundef, i64 noundef, i64 noundef) #3

; 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_blob_init(ptr noundef, ptr noundef, i32 noundef) #3

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

declare i32 @s2n_stuffer_init(ptr noundef, ptr noundef) #3

declare i32 @s2n_stuffer_write_uint8(ptr noundef, i8 noundef zeroext) #3

declare i32 @s2n_stuffer_write_uint16(ptr noundef, i16 noundef zeroext) #3

declare i32 @s2n_tls13_aead_aad_init(i16 noundef zeroext, i8 noundef zeroext, ptr noundef) #3

declare i32 @s2n_aead_aad_init(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef) #3

declare i32 @s2n_get_public_random_data(ptr noundef) #3

declare i32 @s2n_stuffer_write(ptr noundef, ptr noundef) #3

declare i32 @s2n_stuffer_writev_bytes(ptr noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef) #3

declare i32 @s2n_blob_slice(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

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

declare i32 @s2n_increment_sequence_number(ptr noundef) #3

declare i32 @s2n_stuffer_rewrite(ptr noundef) #3

declare i32 @s2n_stuffer_skip_write(ptr noundef, i32 noundef) #3

declare ptr @s2n_stuffer_raw_write(ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @s2n_record_encrypt(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext) #5

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { "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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !6, i64 632}
!17 = !{!"s2n_connection", !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !11, 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, !11, i64 148, !11, i64 152, !18, i64 160, !13, i64 168, !13, i64 176, !7, i64 184, !7, i64 216, !7, i64 217, !7, i64 218, !7, i64 219, !7, i64 220, !7, i64 221, !7, i64 222, !6, i64 224, !6, i64 232, !19, i64 240, !6, i64 632, !6, i64 640, !20, i64 648, !27, i64 1144, !30, i64 1688, !6, i64 1752, !7, i64 1760, !11, i64 1764, !7, i64 1768, !32, i64 1776, !32, i64 1816, !32, i64 1856, !32, i64 1896, !11, i64 1936, !13, i64 1944, !7, i64 1952, !32, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !26, i64 2003, !33, i64 2004, !33, i64 2008, !34, i64 2016, !15, i64 2208, !11, i64 2212, !15, i64 2216, !13, i64 2224, !7, i64 2232, !13, i64 2240, !13, i64 2248, !13, i64 2256, !33, i64 2264, !33, i64 2268, !7, i64 2272, !7, i64 2528, !11, i64 2784, !25, i64 2792, !11, i64 2816, !25, i64 2824, !25, i64 2848, !25, i64 2872, !36, i64 2896, !38, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !11, i64 3780, !25, i64 3784, !11, i64 3808, !40, i64 3816, !7, i64 3848, !32, i64 3992, !25, i64 4032, !25, i64 4056, !26, i64 4080, !26, i64 4081, !26, i64 4082, !15, i64 4084, !15, i64 4086, !11, i64 4088, !11, i64 4092, !25, i64 4096, !11, i64 4120, !41, i64 4128, !33, i64 4176, !7, i64 4180, !7, i64 4181}
!18 = !{!"s2n_timer", !13, i64 0}
!19 = !{!"s2n_secrets", !7, i64 0, !11, i64 388}
!20 = !{!"s2n_kex_parameters", !21, i64 0, !22, i64 8, !7, i64 24, !22, i64 56, !23, i64 72, !23, i64 184, !7, i64 296, !24, i64 360, !25, i64 448, !25, i64 472}
!21 = !{!"s2n_dh_params", !6, i64 0}
!22 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!23 = !{!"s2n_kem_group_params", !6, i64 0, !24, i64 8, !22, i64 96}
!24 = !{!"s2n_kem_params", !6, i64 0, !25, i64 8, !25, i64 32, !25, i64 56, !26, i64 80}
!25 = !{!"s2n_blob", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!26 = !{!"_Bool", !7, i64 0}
!27 = !{!"s2n_handshake_parameters", !28, i64 0, !28, i64 48, !25, i64 96, !11, i64 120, !29, i64 124, !6, i64 384, !6, i64 392, !6, i64 400, !7, i64 408, !7, i64 440, !7, i64 472, !7, i64 473, !7, i64 474, !7, i64 506}
!28 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!29 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!30 = !{!"s2n_psk_parameters", !11, i64 0, !31, i64 8, !15, i64 40, !15, i64 42, !6, i64 48, !11, i64 56}
!31 = !{!"s2n_array", !25, i64 0, !11, i64 24, !11, i64 28}
!32 = !{!"s2n_stuffer", !25, i64 0, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 36, !11, i64 36}
!33 = !{!"", !11, i64 0}
!34 = !{!"s2n_handshake", !32, i64 0, !6, i64 40, !7, i64 48, !7, i64 56, !7, i64 104, !7, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !35, i64 176, !11, i64 184, !11, i64 184, !11, i64 184, !11, i64 184, !11, i64 188}
!35 = !{!"s2n_offered_early_data", !6, i64 0}
!36 = !{!"s2n_client_hello", !25, i64 0, !37, i64 24, !25, i64 728, !25, i64 752, !25, i64 776, !7, i64 800, !7, i64 801, !11, i64 802, !11, i64 802, !11, i64 802, !11, i64 802, !11, i64 802, !11, i64 802, !11, i64 802}
!37 = !{!"", !7, i64 0, !25, i64 672, !15, i64 696}
!38 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !15, i64 18, !6, i64 24, !11, i64 32, !6, i64 40, !39, i64 48, !26, i64 52}
!39 = !{!"s2n_cert_validation_info", !11, i64 0, !11, i64 0}
!40 = !{!"s2n_ticket_fields", !25, i64 0, !11, i64 24}
!41 = !{!"s2n_post_handshake", !32, i64 0, !7, i64 40}
!42 = !{!17, !6, i64 640}
!43 = !{!17, !7, i64 220}
!44 = !{!17, !6, i64 224}
!45 = !{!46, !6, i64 0}
!46 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!47 = !{!46, !6, i64 8}
!48 = !{!49, !6, i64 0}
!49 = !{!"s2n_crypto_parameters", !6, i64 0, !50, i64 8, !50, i64 16, !51, i64 24, !51, i64 456, !7, i64 888, !7, i64 904, !7, i64 920, !7, i64 928}
!50 = !{!"s2n_session_key", !6, i64 0}
!51 = !{!"s2n_hmac_state", !11, i64 0, !15, i64 4, !11, i64 8, !15, i64 12, !7, i64 14, !52, i64 16, !52, i64 72, !52, i64 128, !52, i64 184, !7, i64 240, !7, i64 368}
!52 = !{!"s2n_hash_state", !6, i64 0, !11, i64 8, !7, i64 12, !13, i64 16, !7, i64 24}
!53 = !{!17, !11, i64 148}
!54 = !{!55, !6, i64 48}
!55 = !{!"s2n_cipher_suite", !11, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !7, i64 56, !7, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !7, i64 100}
!56 = !{!57, !6, i64 0}
!57 = !{!"s2n_record_algorithm", !6, i64 0, !11, i64 8, !11, i64 12, !13, i64 16}
!58 = !{!57, !11, i64 12}
!59 = !{!17, !11, i64 1924}
!60 = !{!17, !11, i64 1920}
!61 = !{!62, !11, i64 0}
!62 = !{!"s2n_cipher", !11, i64 0, !7, i64 8, !7, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!63 = !{!17, !6, i64 1896}
!64 = !{!17, !6, i64 8}
!65 = !{!66, !11, i64 420}
!66 = !{!"s2n_config", !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !6, i64 8, !6, i64 16, !67, i64 24, !25, i64 56, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !11, i64 128, !11, i64 132, !6, i64 136, !13, i64 144, !6, i64 152, !13, i64 160, !13, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !7, i64 228, !11, i64 232, !11, i64 236, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !68, i64 304, !15, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !11, i64 392, !11, i64 396, !11, i64 400, !6, i64 408, !11, i64 416, !11, i64 420, !6, i64 424, !6, i64 432, !11, i64 440, !25, i64 448}
!67 = !{!"certs_by_type", !7, i64 0}
!68 = !{!"s2n_x509_trust_store", !6, i64 0, !11, i64 8}
!69 = !{!17, !11, i64 1904}
!70 = distinct !{!70, !71}
!71 = !{!"llvm.loop.mustprogress"}
!72 = !{!32, !11, i64 28}
!73 = !{!32, !11, i64 24}
!74 = !{!25, !11, i64 8}
!75 = !{!32, !6, i64 0}
!76 = distinct !{!76, !71}
!77 = !{!32, !11, i64 8}
!78 = !{!25, !6, i64 0}
!79 = !{!25, !11, i64 12}


; 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_cipher = type { i32, %union.anon.1, i8, ptr, ptr, ptr, ptr, ptr, ptr }
%union.anon.1 = type { %struct.s2n_composite_cipher }
%struct.s2n_composite_cipher = type { i8, i8, i8, ptr, ptr, ptr, ptr }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, 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.14 = external hidden unnamed_addr constant [93 x i8], align 1
@s2n_null_cipher = external constant %struct.s2n_cipher, align 8
@.str.15 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [93 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_record_max_write_payload_size(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_record_max_write_size(ptr noundef, i16 noundef zeroext, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_record_write_protocol_version(ptr noundef, i8 noundef zeroext, ptr noundef) local_unnamed_addr #0

declare i32 @s2n_stuffer_write_bytes(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_record_writev(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2, i32 noundef %3, i64 noundef %4, i64 noundef %5) local_unnamed_addr #0 {
  %7 = alloca %struct.s2n_blob, align 8
  %8 = alloca [16 x i8], align 16
  %9 = alloca [13 x i8], align 1
  %10 = alloca %struct.s2n_blob, align 8
  %11 = alloca i16, align 2
  %12 = alloca i16, align 2
  %13 = alloca i16, align 2
  %14 = alloca %struct.s2n_blob, align 8
  %15 = alloca %struct.s2n_stuffer, align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.s2n_stuffer, align 8
  %18 = alloca [4 x i8], align 4
  %19 = alloca %struct.s2n_blob, align 8
  %20 = alloca [16 x i8], align 16
  %21 = alloca %struct.s2n_blob, align 8
  %22 = alloca %struct.s2n_blob, align 8
  %23 = alloca i32, align 4
  %24 = alloca %struct.s2n_blob, align 8
  %25 = alloca %struct.s2n_blob, align 8
  %26 = load i32, ptr %0, align 8
  %27 = and i32 %26, 262144
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %30, label %28

28:                                               ; preds = %6
  %29 = tail call i32 @s2n_ktls_record_writev(ptr noundef nonnull %0, i8 noundef zeroext %1, ptr noundef %2, i32 noundef %3, i64 noundef %4, i64 noundef %5) #8
  br label %447

30:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  %31 = getelementptr inbounds i8, ptr %0, i64 632
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %0, i64 640
  %34 = load ptr, ptr %33, align 8, !tbaa !37
  %35 = getelementptr inbounds i8, ptr %0, i64 220
  %36 = load i8, ptr %35, align 4, !tbaa !38
  %37 = icmp eq i8 %36, 34
  %38 = icmp eq i8 %1, 20
  %or.cond = and i1 %38, %37
  br i1 %or.cond, label %39, label %51

39:                                               ; preds = %30
  %40 = getelementptr inbounds i8, ptr %0, i64 224
  %41 = load ptr, ptr %40, align 8, !tbaa !39
  %.not212 = icmp eq ptr %41, null
  br i1 %.not212, label %42, label %50

42:                                               ; preds = %39
  %43 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.14, ptr %43, align 8, !tbaa !40
  %44 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.14, i64 21), i32 noundef 47) #9
  %.not213 = icmp eq ptr %44, null
  %45 = getelementptr inbounds i8, ptr %44, i64 1
  %46 = select i1 %.not213, ptr getelementptr inbounds (i8, ptr @.str.14, i64 21), ptr %45
  %47 = getelementptr inbounds i8, ptr %43, i64 8
  store ptr %46, ptr %47, align 8, !tbaa !42
  %48 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %48, align 4, !tbaa !43
  %49 = tail call i32 @s2n_calculate_stacktrace() #8
  br label %446

50:                                               ; preds = %39
  store ptr %41, ptr %31, align 8, !tbaa !5
  store ptr %41, ptr %33, align 8, !tbaa !37
  br label %51

51:                                               ; preds = %50, %30
  %52 = phi ptr [ %41, %50 ], [ %32, %30 ]
  %53 = phi ptr [ %41, %50 ], [ %34, %30 ]
  %54 = getelementptr inbounds i8, ptr %53, i64 928
  %55 = getelementptr inbounds i8, ptr %53, i64 16
  %56 = getelementptr inbounds i8, ptr %53, i64 904
  %57 = getelementptr inbounds i8, ptr %0, i64 148
  %58 = load i32, ptr %57, align 4, !tbaa !44
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %60, label %64

60:                                               ; preds = %51
  %61 = getelementptr inbounds i8, ptr %52, i64 920
  %62 = getelementptr inbounds i8, ptr %52, i64 8
  %63 = getelementptr inbounds i8, ptr %52, i64 888
  br label %64

64:                                               ; preds = %60, %51
  %.0196 = phi ptr [ %63, %60 ], [ %56, %51 ]
  %.0195.in = phi ptr [ %52, %60 ], [ %53, %51 ]
  %.0193 = phi ptr [ %62, %60 ], [ %55, %51 ]
  %.0192 = phi ptr [ %61, %60 ], [ %54, %51 ]
  %.0195 = load ptr, ptr %.0195.in, align 8, !tbaa !45
  %65 = getelementptr inbounds i8, ptr %.0195, i64 48
  %66 = load ptr, ptr %65, align 8, !tbaa !50
  %67 = load ptr, ptr %66, align 8, !tbaa !52
  %68 = icmp ne ptr %67, @s2n_null_cipher
  %69 = icmp ne i8 %1, 23
  %or.cond15 = or i1 %69, %68
  br i1 %or.cond15, label %78, label %70

70:                                               ; preds = %64
  %71 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.15, ptr %71, align 8, !tbaa !40
  %72 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.15, i64 21), i32 noundef 47) #9
  %.not214 = icmp eq ptr %72, null
  %73 = getelementptr inbounds i8, ptr %72, i64 1
  %74 = select i1 %.not214, ptr getelementptr inbounds (i8, ptr @.str.15, i64 21), ptr %73
  %75 = getelementptr inbounds i8, ptr %71, i64 8
  store ptr %74, ptr %75, align 8, !tbaa !42
  %76 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544320, ptr %76, align 4, !tbaa !43
  %77 = tail call i32 @s2n_calculate_stacktrace() #8
  br label %446

78:                                               ; preds = %64
  %79 = getelementptr inbounds i8, ptr %66, i64 12
  %80 = load i32, ptr %79, align 4, !tbaa !54
  %81 = and i32 %80, 4
  %.not219.not = icmp eq i32 %81, 0
  call void @llvm.lifetime.start.p0(i64 13, ptr nonnull %9) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(13) %9, i8 0, i64 13, i1 false)
  %82 = select i1 %.not219.not, i32 13, i32 5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %10, i8 0, i64 24, i1 false)
  %83 = call i32 @s2n_blob_init(ptr noundef nonnull %10, ptr noundef nonnull %9, i32 noundef %82) #8
  %84 = icmp sgt i32 %83, -1
  br i1 %84, label %85, label %445

85:                                               ; preds = %78
  %86 = load i32, ptr %0, align 8
  %87 = and i32 %86, 32768
  %.not215 = icmp eq i32 %87, 0
  br i1 %.not215, label %88, label %102

88:                                               ; preds = %85
  %89 = getelementptr inbounds i8, ptr %0, i64 1924
  %90 = load i32, ptr %89, align 4, !tbaa !55
  %91 = getelementptr inbounds i8, ptr %0, i64 1920
  %92 = load i32, ptr %91, align 8, !tbaa !56
  %93 = icmp eq i32 %90, %92
  br i1 %93, label %102, label %94

94:                                               ; preds = %88
  %95 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.17, ptr %95, align 8, !tbaa !40
  %96 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.17, i64 21), i32 noundef 47) #9
  %.not216 = icmp eq ptr %96, null
  %97 = getelementptr inbounds i8, ptr %96, i64 1
  %98 = select i1 %.not216, ptr getelementptr inbounds (i8, ptr @.str.17, i64 21), ptr %97
  %99 = getelementptr inbounds i8, ptr %95, i64 8
  store ptr %98, ptr %99, align 8, !tbaa !42
  %100 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544392, ptr %100, align 4, !tbaa !43
  %101 = call i32 @s2n_calculate_stacktrace() #8
  br label %445

102:                                              ; preds = %88, %85
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %11) #8
  store i16 0, ptr %11, align 2, !tbaa !57
  %103 = call i32 @s2n_record_max_write_payload_size(ptr noundef nonnull %0, ptr noundef nonnull %11)
  %104 = call zeroext i1 @s2n_result_is_ok(i32 %103)
  br i1 %104, label %105, label %444

105:                                              ; preds = %102
  %106 = load i16, ptr %11, align 2
  %107 = zext i16 %106 to i64
  %108 = call i64 @llvm.umin.i64(i64 %107, i64 %5)
  %109 = trunc nuw i64 %108 to i16
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %12) #8
  store i16 0, ptr %12, align 2, !tbaa !57
  %110 = call i32 @s2n_tls_record_overhead(ptr noundef nonnull %0, ptr noundef nonnull %12)
  %111 = call zeroext i1 @s2n_result_is_ok(i32 %110)
  br i1 %111, label %112, label %443

112:                                              ; preds = %105
  %113 = load ptr, ptr %65, align 8, !tbaa !50
  %114 = load ptr, ptr %113, align 8, !tbaa !52
  %115 = load i32, ptr %114, align 8, !tbaa !58
  switch i32 %115, label %131 [
    i32 1, label %116
    i32 3, label %128
  ]

116:                                              ; preds = %112
  %117 = getelementptr inbounds i8, ptr %114, i64 8
  %118 = load i8, ptr %117, align 8, !tbaa !60
  %119 = trunc nuw nsw i64 %108 to i32
  %120 = load i16, ptr %12, align 2, !tbaa !57
  %121 = zext i16 %120 to i32
  %122 = add nuw nsw i32 %121, %119
  %123 = zext i8 %118 to i32
  %124 = urem i32 %122, %123
  %.not217 = icmp eq i32 %124, 0
  br i1 %.not217, label %131, label %125

125:                                              ; preds = %116
  %126 = trunc nuw i32 %124 to i8
  %127 = sub i8 %118, %126
  br label %131

128:                                              ; preds = %112
  %129 = getelementptr inbounds i8, ptr %114, i64 8
  %130 = load i8, ptr %129, align 8, !tbaa !60
  br label %131

131:                                              ; preds = %112, %128, %116, %125
  %.0184.shrunk = phi i8 [ %118, %125 ], [ %118, %116 ], [ %130, %128 ], [ 0, %112 ]
  %.0183 = phi i8 [ %127, %125 ], [ 0, %116 ], [ 0, %128 ], [ 0, %112 ]
  %.0184 = zext i8 %.0184.shrunk to i16
  %132 = getelementptr inbounds i8, ptr %0, i64 1896
  %133 = load ptr, ptr %132, align 8, !tbaa !61
  %134 = icmp eq ptr %133, null
  br i1 %134, label %135, label %149

135:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %13) #8
  store i16 0, ptr %13, align 2, !tbaa !57
  %136 = load i16, ptr %11, align 2, !tbaa !57
  %137 = call i32 @s2n_record_max_write_size(ptr noundef nonnull %0, i16 noundef zeroext %136, ptr noundef nonnull %13)
  %138 = call zeroext i1 @s2n_result_is_ok(i32 %137)
  br i1 %138, label %139, label %.thread

139:                                              ; preds = %135
  %140 = getelementptr inbounds i8, ptr %0, i64 8
  %141 = load ptr, ptr %140, align 8, !tbaa !62
  %142 = getelementptr inbounds i8, ptr %141, i64 420
  %143 = load i32, ptr %142, align 4, !tbaa !63
  %144 = load i16, ptr %13, align 2, !tbaa !57
  %145 = zext i16 %144 to i32
  %. = call i32 @llvm.umax.i32(i32 %143, i32 %145)
  %146 = call i32 @s2n_stuffer_growable_alloc(ptr noundef nonnull %132, i32 noundef %.) #8
  %147 = icmp sgt i32 %146, -1
  br i1 %147, label %148, label %.thread

.thread:                                          ; preds = %139, %135
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %13) #8
  br label %443

148:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %13) #8
  %.pre = load ptr, ptr %132, align 8, !tbaa !61
  br label %149

149:                                              ; preds = %148, %131
  %150 = phi ptr [ %.pre, %148 ], [ %133, %131 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %14, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %15, i8 0, i64 40, i1 false)
  %151 = getelementptr inbounds i8, ptr %0, i64 1924
  %152 = load i32, ptr %151, align 4, !tbaa !55
  %153 = zext i32 %152 to i64
  %154 = getelementptr inbounds i8, ptr %150, i64 %153
  %155 = getelementptr inbounds i8, ptr %0, i64 1904
  %156 = load i32, ptr %155, align 8, !tbaa !67
  %157 = sub i32 %156, %152
  %158 = call i32 @s2n_blob_init(ptr noundef nonnull %14, ptr noundef %154, i32 noundef %157) #8
  %159 = icmp sgt i32 %158, -1
  br i1 %159, label %160, label %442

160:                                              ; preds = %149
  %161 = call i32 @s2n_stuffer_init(ptr noundef nonnull %15, ptr noundef nonnull %14) #8
  %162 = icmp sgt i32 %161, -1
  br i1 %162, label %163, label %442

163:                                              ; preds = %160
  %164 = select i1 %.not219.not, i8 %1, i8 23
  %165 = call i32 @s2n_stuffer_write_uint8(ptr noundef nonnull %15, i8 noundef zeroext %164) #8
  %166 = icmp sgt i32 %165, -1
  br i1 %166, label %167, label %442

167:                                              ; preds = %163
  %168 = call i32 @s2n_record_write_protocol_version(ptr noundef nonnull %0, i8 noundef zeroext %164, ptr noundef nonnull %15)
  %169 = icmp sgt i32 %168, -1
  br i1 %169, label %170, label %442

170:                                              ; preds = %167
  %171 = load ptr, ptr %65, align 8, !tbaa !50
  %172 = load ptr, ptr %171, align 8, !tbaa !52
  %173 = load i32, ptr %172, align 8, !tbaa !58
  %174 = icmp eq i32 %173, 3
  br i1 %174, label %175, label %._crit_edge241

._crit_edge241:                                   ; preds = %170
  %.pre240.pre = load i16, ptr %12, align 2, !tbaa !57
  br label %189

175:                                              ; preds = %170
  %176 = load i8, ptr %35, align 4, !tbaa !38
  %177 = icmp ugt i8 %176, 31
  %178 = select i1 %177, i16 %.0184, i16 0
  %.0197 = add i16 %178, %109
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  store i32 0, ptr %16, align 4, !tbaa !43
  %179 = getelementptr inbounds i8, ptr %172, i64 40
  %180 = load ptr, ptr %179, align 8, !tbaa !60
  %181 = zext i8 %176 to i16
  %182 = call i32 %180(ptr noundef nonnull %.0193, ptr noundef nonnull %.0192, i8 noundef zeroext %1, i16 noundef zeroext %181, i16 noundef zeroext %.0197, ptr noundef nonnull %16) #8
  %183 = icmp sgt i32 %182, -1
  br i1 %183, label %184, label %.critedge

184:                                              ; preds = %175
  %185 = load i32, ptr %16, align 4, !tbaa !43
  %186 = load i16, ptr %12, align 2, !tbaa !57
  %187 = trunc i32 %185 to i16
  %188 = add i16 %186, %187
  store i16 %188, ptr %12, align 2, !tbaa !57
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  br label %189

189:                                              ; preds = %._crit_edge241, %184
  %.pre240 = phi i16 [ %.pre240.pre, %._crit_edge241 ], [ %188, %184 ]
  br i1 %.not219.not, label %192, label %190

190:                                              ; preds = %189
  %191 = add i16 %.pre240, 1
  store i16 %191, ptr %12, align 2, !tbaa !57
  br label %192

192:                                              ; preds = %190, %189
  %193 = phi i16 [ %191, %190 ], [ %.pre240, %189 ]
  %194 = phi i32 [ 16645, %190 ], [ 17413, %189 ]
  %195 = trunc nuw nsw i64 %108 to i32
  %196 = zext i8 %.0183 to i32
  %197 = add nuw nsw i32 %196, %195
  %198 = trunc i32 %197 to i16
  %199 = add i16 %193, %198
  %200 = zext i16 %199 to i32
  %201 = add nuw nsw i32 %200, 5
  %202 = icmp ugt i32 %201, %194
  br i1 %202, label %203, label %211

203:                                              ; preds = %192
  %204 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.18, ptr %204, align 8, !tbaa !40
  %205 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.18, i64 21), i32 noundef 47) #9
  %.not223 = icmp eq ptr %205, null
  %206 = getelementptr inbounds i8, ptr %205, i64 1
  %207 = select i1 %.not223, ptr getelementptr inbounds (i8, ptr @.str.18, i64 21), ptr %206
  %208 = getelementptr inbounds i8, ptr %204, i64 8
  store ptr %207, ptr %208, align 8, !tbaa !42
  %209 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653255, ptr %209, align 4, !tbaa !43
  %210 = call i32 @s2n_calculate_stacktrace() #8
  br label %442

211:                                              ; preds = %192
  %212 = call i32 @s2n_stuffer_write_uint16(ptr noundef nonnull %15, i16 noundef zeroext %199) #8
  %213 = icmp sgt i32 %212, -1
  br i1 %213, label %214, label %442

214:                                              ; preds = %211
  %215 = load ptr, ptr %65, align 8, !tbaa !50
  %216 = load ptr, ptr %215, align 8, !tbaa !52
  %217 = load i32, ptr %216, align 8, !tbaa !58
  switch i32 %217, label %321 [
    i32 2, label %218
    i32 1, label %294
    i32 3, label %294
  ]

218:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %17) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %17, i8 0, i64 40, i1 false)
  %219 = call i32 @s2n_blob_init(ptr noundef nonnull %7, ptr noundef nonnull %8, i32 noundef 16) #8
  %220 = icmp sgt i32 %219, -1
  br i1 %220, label %221, label %293

221:                                              ; preds = %218
  %222 = call i32 @s2n_stuffer_init(ptr noundef nonnull %17, ptr noundef nonnull %7) #8
  %223 = icmp sgt i32 %222, -1
  br i1 %223, label %224, label %293

224:                                              ; preds = %221
  %225 = load ptr, ptr %65, align 8, !tbaa !50
  %226 = getelementptr inbounds i8, ptr %225, i64 12
  %227 = load i32, ptr %226, align 4, !tbaa !54
  %228 = and i32 %227, 1
  %.not218 = icmp eq i32 %228, 0
  br i1 %.not218, label %243, label %229

229:                                              ; preds = %224
  %230 = call i32 @s2n_stuffer_write_bytes(ptr noundef nonnull %15, ptr noundef nonnull %.0192, i32 noundef 8) #8
  %231 = icmp sgt i32 %230, -1
  br i1 %231, label %232, label %293

232:                                              ; preds = %229
  %233 = load ptr, ptr %65, align 8, !tbaa !50
  %234 = load ptr, ptr %233, align 8, !tbaa !52
  %235 = getelementptr inbounds i8, ptr %234, i64 8
  %236 = load i8, ptr %235, align 8, !tbaa !60
  %237 = zext i8 %236 to i32
  %238 = call i32 @s2n_stuffer_write_bytes(ptr noundef nonnull %17, ptr noundef nonnull %.0196, i32 noundef %237) #8
  %239 = icmp sgt i32 %238, -1
  br i1 %239, label %240, label %293

240:                                              ; preds = %232
  %241 = call i32 @s2n_stuffer_write_bytes(ptr noundef nonnull %17, ptr noundef nonnull %.0192, i32 noundef 8) #8
  %242 = icmp sgt i32 %241, -1
  br i1 %242, label %275, label %293

243:                                              ; preds = %224
  %244 = and i32 %227, 2
  %245 = or disjoint i32 %244, %81
  %or.cond9.not = icmp eq i32 %245, 0
  br i1 %or.cond9.not, label %267, label %246

246:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  store i32 0, ptr %18, align 4
  %247 = call i32 @s2n_stuffer_write_bytes(ptr noundef nonnull %17, ptr noundef nonnull %18, i32 noundef 4) #8
  %248 = icmp sgt i32 %247, -1
  br i1 %248, label %249, label %.critedge225

249:                                              ; preds = %246
  %250 = call i32 @s2n_stuffer_write_bytes(ptr noundef nonnull %17, ptr noundef nonnull %.0192, i32 noundef 8) #8
  %251 = icmp sgt i32 %250, -1
  br i1 %251, label %.preheader235, label %.critedge225

.preheader235:                                    ; preds = %249
  %252 = load ptr, ptr %65, align 8, !tbaa !50
  %253 = load ptr, ptr %252, align 8, !tbaa !52
  %254 = getelementptr inbounds i8, ptr %253, i64 8
  %255 = load i8, ptr %254, align 8, !tbaa !60
  %.not238 = icmp eq i8 %255, 0
  br i1 %.not238, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader235, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader235 ]
  %256 = getelementptr inbounds [16 x i8], ptr %8, i64 0, i64 %indvars.iv
  %257 = load i8, ptr %256, align 1, !tbaa !60
  %258 = getelementptr inbounds i8, ptr %.0196, i64 %indvars.iv
  %259 = load i8, ptr %258, align 1, !tbaa !60
  %260 = xor i8 %259, %257
  store i8 %260, ptr %256, align 1, !tbaa !60
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %261 = load ptr, ptr %65, align 8, !tbaa !50
  %262 = load ptr, ptr %261, align 8, !tbaa !52
  %263 = getelementptr inbounds i8, ptr %262, i64 8
  %264 = load i8, ptr %263, align 8, !tbaa !60
  %265 = zext i8 %264 to i64
  %266 = icmp ult i64 %indvars.iv.next, %265
  br i1 %266, label %.lr.ph, label %._crit_edge, !llvm.loop !68

._crit_edge:                                      ; preds = %.lr.ph, %.preheader235
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  br label %275

267:                                              ; preds = %243
  %268 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.19, ptr %268, align 8, !tbaa !40
  %269 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.19, i64 21), i32 noundef 47) #9
  %.not220 = icmp eq ptr %269, null
  %270 = getelementptr inbounds i8, ptr %269, i64 1
  %271 = select i1 %.not220, ptr getelementptr inbounds (i8, ptr @.str.19, i64 21), ptr %270
  %272 = getelementptr inbounds i8, ptr %268, i64 8
  store ptr %271, ptr %272, align 8, !tbaa !42
  %273 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653230, ptr %273, align 4, !tbaa !43
  %274 = call i32 @s2n_calculate_stacktrace() #8
  br label %293

275:                                              ; preds = %._crit_edge, %240
  %276 = getelementptr inbounds i8, ptr %17, i64 28
  %277 = load i32, ptr %276, align 4, !tbaa !70
  %278 = getelementptr inbounds i8, ptr %17, i64 24
  %279 = load i32, ptr %278, align 8, !tbaa !71
  %280 = sub i32 %277, %279
  %281 = getelementptr inbounds i8, ptr %7, i64 8
  store i32 %280, ptr %281, align 8, !tbaa !72
  br i1 %.not219.not, label %290, label %282

282:                                              ; preds = %275
  %283 = add i16 %109, 1
  %284 = load ptr, ptr %65, align 8, !tbaa !50
  %285 = load ptr, ptr %284, align 8, !tbaa !52
  %286 = getelementptr inbounds i8, ptr %285, i64 10
  %287 = load i8, ptr %286, align 2, !tbaa !60
  %288 = call i32 @s2n_tls13_aead_aad_init(i16 noundef zeroext %283, i8 noundef zeroext %287, ptr noundef nonnull %10) #8
  %289 = call zeroext i1 @s2n_result_is_ok(i32 %288)
  br i1 %289, label %.critedge227, label %293

290:                                              ; preds = %275
  %291 = call i32 @s2n_aead_aad_init(ptr noundef nonnull %0, ptr noundef nonnull %.0192, i8 noundef zeroext %1, i16 noundef zeroext %109, ptr noundef nonnull %10) #8
  %292 = call zeroext i1 @s2n_result_is_ok(i32 %291)
  br i1 %292, label %.critedge227, label %293

.critedge227:                                     ; preds = %290, %282
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #8
  br label %321

.critedge225:                                     ; preds = %249, %246
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  br label %293

293:                                              ; preds = %290, %282, %.critedge225, %240, %232, %229, %221, %218, %267
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #8
  br label %442

294:                                              ; preds = %214, %214
  %295 = zext i8 %.0184.shrunk to i32
  %296 = call i32 @s2n_blob_init(ptr noundef nonnull %7, ptr noundef nonnull %.0196, i32 noundef %295) #8
  %297 = icmp sgt i32 %296, -1
  br i1 %297, label %298, label %442

298:                                              ; preds = %294
  %299 = load i8, ptr %35, align 4, !tbaa !38
  %300 = icmp ugt i8 %299, 31
  br i1 %300, label %301, label %321

301:                                              ; preds = %298
  %302 = call i32 @s2n_get_public_random_data(ptr noundef nonnull %7) #8
  %303 = call zeroext i1 @s2n_result_is_ok(i32 %302)
  br i1 %303, label %304, label %442

304:                                              ; preds = %301
  %305 = load ptr, ptr %65, align 8, !tbaa !50
  %306 = load ptr, ptr %305, align 8, !tbaa !52
  %307 = load i32, ptr %306, align 8, !tbaa !58
  %308 = icmp eq i32 %307, 3
  br i1 %308, label %309, label %318

309:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %19, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %20, i8 0, i64 16, i1 false)
  %310 = call i32 @s2n_blob_init(ptr noundef nonnull %19, ptr noundef nonnull %20, i32 noundef %295) #8
  %311 = icmp sgt i32 %310, -1
  br i1 %311, label %312, label %.critedge230

312:                                              ; preds = %309
  %313 = call i32 @s2n_get_public_random_data(ptr noundef nonnull %19) #8
  %314 = call zeroext i1 @s2n_result_is_ok(i32 %313)
  br i1 %314, label %315, label %.critedge230

315:                                              ; preds = %312
  %316 = call i32 @s2n_stuffer_write(ptr noundef nonnull %15, ptr noundef nonnull %19) #8
  %317 = icmp sgt i32 %316, -1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #8
  br i1 %317, label %321, label %442

318:                                              ; preds = %304
  %319 = call i32 @s2n_stuffer_write(ptr noundef nonnull %15, ptr noundef nonnull %7) #8
  %320 = icmp sgt i32 %319, -1
  br i1 %320, label %321, label %442

321:                                              ; preds = %214, %.critedge227, %298, %318, %315
  %322 = sext i32 %3 to i64
  %323 = trunc i64 %4 to i32
  %324 = call i32 @s2n_stuffer_writev_bytes(ptr noundef nonnull %15, ptr noundef %2, i64 noundef %322, i32 noundef %323, i32 noundef %195) #8
  %325 = icmp sgt i32 %324, -1
  br i1 %325, label %326, label %442

326:                                              ; preds = %321
  %327 = load ptr, ptr %15, align 8, !tbaa !73
  %328 = getelementptr inbounds i8, ptr %15, i64 28
  %329 = load i32, ptr %328, align 4, !tbaa !70
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %21, i8 0, i64 24, i1 false)
  %330 = call i32 @s2n_blob_slice(ptr noundef nonnull %14, ptr noundef nonnull %21, i32 noundef 0, i32 noundef 5) #8
  %331 = icmp sgt i32 %330, -1
  br i1 %331, label %332, label %441

332:                                              ; preds = %326
  %333 = zext i32 %329 to i64
  %334 = getelementptr inbounds i8, ptr %327, i64 %333
  %335 = sub nsw i64 0, %108
  %336 = getelementptr inbounds i8, ptr %334, i64 %335
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %22, i8 0, i64 24, i1 false)
  %337 = call i32 @s2n_blob_init(ptr noundef nonnull %22, ptr noundef %336, i32 noundef %195) #8
  %338 = icmp sgt i32 %337, -1
  br i1 %338, label %339, label %440

339:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #8
  store i32 0, ptr %23, align 4, !tbaa !43
  %340 = call i32 @s2n_record_write_mac(ptr noundef nonnull %0, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %15, ptr noundef nonnull %23)
  %341 = call zeroext i1 @s2n_result_is_ok(i32 %340)
  br i1 %341, label %342, label %439

342:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %24) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %24, i8 0, i64 24, i1 false)
  %343 = call i32 @s2n_blob_init(ptr noundef nonnull %24, ptr noundef nonnull %.0192, i32 noundef 8) #8
  %344 = icmp sgt i32 %343, -1
  br i1 %344, label %345, label %.loopexit

345:                                              ; preds = %342
  %346 = call i32 @s2n_increment_sequence_number(ptr noundef nonnull %24) #8
  %347 = icmp sgt i32 %346, -1
  br i1 %347, label %348, label %.loopexit

348:                                              ; preds = %345
  br i1 %.not219.not, label %352, label %349

349:                                              ; preds = %348
  %350 = call i32 @s2n_stuffer_write_uint8(ptr noundef nonnull %15, i8 noundef zeroext %1) #8
  %351 = icmp sgt i32 %350, -1
  br i1 %351, label %352, label %.loopexit

352:                                              ; preds = %349, %348
  %353 = load ptr, ptr %65, align 8, !tbaa !50
  %354 = load ptr, ptr %353, align 8, !tbaa !52
  %355 = load i32, ptr %354, align 8, !tbaa !58
  %356 = icmp eq i32 %355, 1
  br i1 %356, label %.preheader, label %.critedge232

357:                                              ; preds = %.preheader
  %358 = add nuw nsw i32 %.0181237, 1
  %exitcond.not = icmp eq i32 %.0181237, %196
  br i1 %exitcond.not, label %.critedge232, label %.preheader, !llvm.loop !74

.preheader:                                       ; preds = %352, %357
  %.0181237 = phi i32 [ %358, %357 ], [ 0, %352 ]
  %359 = call i32 @s2n_stuffer_write_uint8(ptr noundef nonnull %15, i8 noundef zeroext %.0183) #8
  %360 = icmp sgt i32 %359, -1
  br i1 %360, label %357, label %.loopexit

.critedge232:                                     ; preds = %357, %352
  %361 = call i32 @s2n_stuffer_rewrite(ptr noundef nonnull %15) #8
  %362 = icmp sgt i32 %361, -1
  br i1 %362, label %363, label %.loopexit

363:                                              ; preds = %.critedge232
  %364 = call i32 @s2n_stuffer_skip_write(ptr noundef nonnull %15, i32 noundef 5) #8
  %365 = icmp sgt i32 %364, -1
  br i1 %365, label %366, label %.loopexit

366:                                              ; preds = %363
  %367 = load i32, ptr %23, align 4, !tbaa !43
  %368 = add i32 %367, %195
  %369 = trunc i32 %368 to i16
  %370 = load ptr, ptr %65, align 8, !tbaa !50
  %371 = load ptr, ptr %370, align 8, !tbaa !52
  %372 = load i32, ptr %371, align 8, !tbaa !58
  switch i32 %372, label %403 [
    i32 2, label %373
    i32 1, label %388
    i32 3, label %400
  ]

373:                                              ; preds = %366
  %374 = getelementptr inbounds i8, ptr %371, i64 9
  %375 = load i8, ptr %374, align 1, !tbaa !60
  %376 = zext i8 %375 to i32
  %377 = call i32 @s2n_stuffer_skip_write(ptr noundef nonnull %15, i32 noundef %376) #8
  %378 = icmp sgt i32 %377, -1
  br i1 %378, label %379, label %.loopexit

379:                                              ; preds = %373
  %380 = load ptr, ptr %65, align 8, !tbaa !50
  %381 = load ptr, ptr %380, align 8, !tbaa !52
  %382 = getelementptr inbounds i8, ptr %381, i64 10
  %383 = load i8, ptr %382, align 2, !tbaa !60
  %384 = zext i8 %383 to i32
  %385 = add i32 %368, %384
  %386 = trunc i32 %385 to i16
  %.lobit = lshr exact i32 %81, 2
  %387 = trunc nuw nsw i32 %.lobit to i16
  %spec.select = add i16 %386, %387
  br label %403

388:                                              ; preds = %366
  %389 = load i8, ptr %35, align 4, !tbaa !38
  %390 = icmp ugt i8 %389, 31
  br i1 %390, label %391, label %396

391:                                              ; preds = %388
  %392 = getelementptr inbounds i8, ptr %7, i64 8
  %393 = load i32, ptr %392, align 8, !tbaa !72
  %394 = call i32 @s2n_stuffer_skip_write(ptr noundef nonnull %15, i32 noundef %393) #8
  %395 = icmp sgt i32 %394, -1
  br i1 %395, label %396, label %.loopexit

396:                                              ; preds = %391, %388
  %397 = add nuw nsw i32 %196, 1
  %398 = add i32 %397, %368
  %399 = trunc i32 %398 to i16
  br label %403

400:                                              ; preds = %366
  %401 = load i16, ptr %12, align 2, !tbaa !57
  %402 = add i16 %401, %369
  br label %403

403:                                              ; preds = %379, %396, %400, %366
  %.0 = phi i16 [ %369, %366 ], [ %402, %400 ], [ %399, %396 ], [ %spec.select, %379 ]
  %404 = getelementptr inbounds i8, ptr %15, i64 8
  %405 = load i32, ptr %404, align 8, !tbaa !75
  %406 = load i32, ptr %328, align 4, !tbaa !70
  %407 = sub i32 %405, %406
  %408 = zext i16 %.0 to i32
  %409 = icmp ult i32 %407, %408
  br i1 %409, label %410, label %418

410:                                              ; preds = %403
  %411 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.20, ptr %411, align 8, !tbaa !40
  %412 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.20, i64 21), i32 noundef 47) #9
  %.not222 = icmp eq ptr %412, null
  %413 = getelementptr inbounds i8, ptr %412, i64 1
  %414 = select i1 %.not222, ptr getelementptr inbounds (i8, ptr @.str.20, i64 21), ptr %413
  %415 = getelementptr inbounds i8, ptr %411, i64 8
  store ptr %414, ptr %415, align 8, !tbaa !42
  %416 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544389, ptr %416, align 4, !tbaa !43
  %417 = call i32 @s2n_calculate_stacktrace() #8
  br label %.loopexit

418:                                              ; preds = %403
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) #8
  %419 = call ptr @s2n_stuffer_raw_write(ptr noundef nonnull %15, i32 noundef %408) #8
  store ptr %419, ptr %25, align 8, !tbaa !76
  %420 = getelementptr inbounds i8, ptr %25, i64 8
  store i32 %408, ptr %420, align 8, !tbaa !72
  %421 = getelementptr inbounds i8, ptr %25, i64 12
  store i32 0, ptr %421, align 4, !tbaa !77
  %422 = getelementptr inbounds i8, ptr %25, i64 16
  %423 = load i8, ptr %422, align 8
  %424 = and i8 %423, -2
  store i8 %424, ptr %422, align 8
  %425 = call i32 @s2n_record_encrypt(ptr noundef nonnull %0, ptr noundef nonnull %.0195, ptr noundef nonnull %.0193, ptr noundef nonnull %7, ptr noundef nonnull %10, ptr noundef nonnull %25, ptr noundef nonnull %.0196, i16 noundef zeroext %.0184)
  %426 = icmp sgt i32 %425, -1
  br i1 %426, label %427, label %438

427:                                              ; preds = %418
  %428 = load i32, ptr %328, align 4, !tbaa !70
  %429 = getelementptr inbounds i8, ptr %15, i64 24
  %430 = load i32, ptr %429, align 8, !tbaa !71
  %431 = sub i32 %428, %430
  %432 = call i32 @s2n_stuffer_skip_write(ptr noundef nonnull %132, i32 noundef %431) #8
  %433 = icmp sgt i32 %432, -1
  br i1 %433, label %434, label %438

434:                                              ; preds = %427
  %435 = load i8, ptr %35, align 4, !tbaa !38
  %436 = icmp eq i8 %435, 34
  %or.cond12 = and i1 %38, %436
  br i1 %or.cond12, label %437, label %438

437:                                              ; preds = %434
  store ptr %32, ptr %31, align 8, !tbaa !5
  store ptr %34, ptr %33, align 8, !tbaa !37
  br label %438

438:                                              ; preds = %434, %437, %427, %418
  %.11 = phi i32 [ -1, %418 ], [ -1, %427 ], [ %195, %437 ], [ %195, %434 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #8
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader, %410, %438, %373, %391, %363, %.critedge232, %349, %345, %342
  %.13 = phi i32 [ -1, %342 ], [ -1, %345 ], [ -1, %349 ], [ -1, %.critedge232 ], [ -1, %363 ], [ -1, %410 ], [ %.11, %438 ], [ -1, %373 ], [ -1, %391 ], [ -1, %.preheader ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %24) #8
  br label %439

439:                                              ; preds = %339, %.loopexit
  %.14 = phi i32 [ %.13, %.loopexit ], [ -1, %339 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  br label %440

440:                                              ; preds = %332, %439
  %.15 = phi i32 [ %.14, %439 ], [ -1, %332 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  br label %441

441:                                              ; preds = %326, %440
  %.16 = phi i32 [ %.15, %440 ], [ -1, %326 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #8
  br label %442

.critedge230:                                     ; preds = %312, %309
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #8
  br label %442

.critedge:                                        ; preds = %175
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  br label %442

442:                                              ; preds = %163, %167, %.critedge, %321, %318, %.critedge230, %301, %294, %293, %211, %315, %441, %203, %160, %149
  %.19 = phi i32 [ -1, %149 ], [ -1, %160 ], [ -1, %163 ], [ -1, %167 ], [ -1, %.critedge ], [ -1, %203 ], [ %.16, %441 ], [ -1, %293 ], [ -1, %315 ], [ -1, %211 ], [ -1, %294 ], [ -1, %301 ], [ -1, %.critedge230 ], [ -1, %318 ], [ -1, %321 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  br label %443

443:                                              ; preds = %.thread, %105, %442
  %.20 = phi i32 [ %.19, %442 ], [ -1, %105 ], [ -1, %.thread ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %12) #8
  br label %444

444:                                              ; preds = %102, %443
  %.21 = phi i32 [ %.20, %443 ], [ -1, %102 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %11) #8
  br label %445

445:                                              ; preds = %78, %444, %94
  %.22 = phi i32 [ %.21, %444 ], [ -1, %94 ], [ -1, %78 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 13, ptr nonnull %9) #8
  br label %446

446:                                              ; preds = %70, %445, %42
  %.25 = phi i32 [ -1, %42 ], [ %.22, %445 ], [ -1, %70 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %447

447:                                              ; preds = %446, %28
  %.26 = phi i32 [ %29, %28 ], [ %.25, %446 ]
  ret i32 %.26
}

declare i32 @s2n_ktls_record_writev(ptr noundef, i8 noundef zeroext, ptr noundef, i32 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

; 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_blob_init(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

declare i32 @s2n_stuffer_init(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_write_uint8(ptr noundef, i8 noundef zeroext) local_unnamed_addr #3

declare i32 @s2n_stuffer_write_uint16(ptr noundef, i16 noundef zeroext) local_unnamed_addr #3

declare i32 @s2n_tls13_aead_aad_init(i16 noundef zeroext, i8 noundef zeroext, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_aead_aad_init(ptr noundef, ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_get_public_random_data(ptr noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_write(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_writev_bytes(ptr noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @s2n_blob_slice(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

declare i32 @s2n_increment_sequence_number(ptr noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_rewrite(ptr noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_skip_write(ptr noundef, i32 noundef) local_unnamed_addr #3

declare ptr @s2n_stuffer_raw_write(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @s2n_record_encrypt(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext) local_unnamed_addr #5

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { "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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 632}
!6 = !{!"s2n_connection", !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !8, i64 80, !8, i64 102, !8, i64 124, !7, i64 148, !7, i64 152, !11, i64 160, !12, i64 168, !12, 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, !10, i64 224, !10, i64 232, !13, i64 240, !10, i64 632, !10, i64 640, !14, i64 648, !21, i64 1144, !24, i64 1688, !10, i64 1752, !8, i64 1760, !7, i64 1764, !8, i64 1768, !27, i64 1776, !27, i64 1816, !27, i64 1856, !27, i64 1896, !7, i64 1936, !12, i64 1944, !8, i64 1952, !27, i64 1960, !8, i64 2000, !8, i64 2001, !8, i64 2002, !20, i64 2003, !28, i64 2004, !28, i64 2008, !29, i64 2016, !26, i64 2208, !7, i64 2212, !26, i64 2216, !12, i64 2224, !8, i64 2232, !12, i64 2240, !12, i64 2248, !12, i64 2256, !28, i64 2264, !28, i64 2268, !8, i64 2272, !8, i64 2528, !7, i64 2784, !19, i64 2792, !7, i64 2816, !19, i64 2824, !19, i64 2848, !19, i64 2872, !31, i64 2896, !33, i64 3704, !10, i64 3760, !10, i64 3768, !8, i64 3776, !7, i64 3780, !19, i64 3784, !7, i64 3808, !35, i64 3816, !8, i64 3848, !27, i64 3992, !19, i64 4032, !19, i64 4056, !20, i64 4080, !20, i64 4081, !20, i64 4082, !26, i64 4084, !26, i64 4086, !7, i64 4088, !7, i64 4092, !19, i64 4096, !7, i64 4120, !36, i64 4128, !28, i64 4176, !8, i64 4180, !8, i64 4181}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"s2n_timer", !12, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!"s2n_secrets", !8, i64 0, !7, i64 388}
!14 = !{!"s2n_kex_parameters", !15, i64 0, !16, i64 8, !8, i64 24, !16, i64 56, !17, i64 72, !17, i64 184, !8, i64 296, !18, i64 360, !19, i64 448, !19, i64 472}
!15 = !{!"s2n_dh_params", !10, i64 0}
!16 = !{!"s2n_ecc_evp_params", !10, i64 0, !10, i64 8}
!17 = !{!"s2n_kem_group_params", !10, i64 0, !18, i64 8, !16, i64 96}
!18 = !{!"s2n_kem_params", !10, i64 0, !19, i64 8, !19, i64 32, !19, i64 56, !20, i64 80}
!19 = !{!"s2n_blob", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16}
!20 = !{!"_Bool", !8, i64 0}
!21 = !{!"s2n_handshake_parameters", !22, i64 0, !22, i64 48, !19, i64 96, !7, i64 120, !23, i64 124, !10, i64 384, !10, i64 392, !10, i64 400, !8, i64 408, !8, i64 440, !8, i64 472, !8, i64 473, !8, i64 474, !8, i64 506}
!22 = !{!"s2n_pkey", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!23 = !{!"s2n_sig_scheme_list", !8, i64 0, !8, i64 256}
!24 = !{!"s2n_psk_parameters", !7, i64 0, !25, i64 8, !26, i64 40, !26, i64 42, !10, i64 48, !7, i64 56}
!25 = !{!"s2n_array", !19, i64 0, !7, i64 24, !7, i64 28}
!26 = !{!"short", !8, i64 0}
!27 = !{!"s2n_stuffer", !19, i64 0, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 36, !7, i64 36}
!28 = !{!"", !7, i64 0}
!29 = !{!"s2n_handshake", !27, i64 0, !10, i64 40, !8, i64 48, !8, i64 56, !8, i64 104, !8, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !7, i64 168, !30, i64 176, !7, i64 184, !7, i64 184, !7, i64 184, !7, i64 184, !7, i64 188}
!30 = !{!"s2n_offered_early_data", !10, i64 0}
!31 = !{!"s2n_client_hello", !19, i64 0, !32, i64 24, !19, i64 728, !19, i64 752, !19, i64 776, !8, i64 800, !8, i64 801, !7, i64 802, !7, i64 802, !7, i64 802, !7, i64 802, !7, i64 802, !7, i64 802, !7, i64 802}
!32 = !{!"", !8, i64 0, !19, i64 672, !26, i64 696}
!33 = !{!"s2n_x509_validator", !10, i64 0, !10, i64 8, !8, i64 16, !8, i64 17, !26, i64 18, !10, i64 24, !7, i64 32, !10, i64 40, !34, i64 48, !20, i64 52}
!34 = !{!"s2n_cert_validation_info", !7, i64 0, !7, i64 0}
!35 = !{!"s2n_ticket_fields", !19, i64 0, !7, i64 24}
!36 = !{!"s2n_post_handshake", !27, i64 0, !8, i64 40}
!37 = !{!6, !10, i64 640}
!38 = !{!6, !8, i64 220}
!39 = !{!6, !10, i64 224}
!40 = !{!41, !10, i64 0}
!41 = !{!"s2n_debug_info", !10, i64 0, !10, i64 8}
!42 = !{!41, !10, i64 8}
!43 = !{!7, !7, i64 0}
!44 = !{!6, !7, i64 148}
!45 = !{!46, !10, i64 0}
!46 = !{!"s2n_crypto_parameters", !10, i64 0, !47, i64 8, !47, i64 16, !48, i64 24, !48, i64 456, !8, i64 888, !8, i64 904, !8, i64 920, !8, i64 928}
!47 = !{!"s2n_session_key", !10, i64 0}
!48 = !{!"s2n_hmac_state", !7, i64 0, !26, i64 4, !7, i64 8, !26, i64 12, !8, i64 14, !49, i64 16, !49, i64 72, !49, i64 128, !49, i64 184, !8, i64 240, !8, i64 368}
!49 = !{!"s2n_hash_state", !10, i64 0, !7, i64 8, !8, i64 12, !12, i64 16, !8, i64 24}
!50 = !{!51, !10, i64 48}
!51 = !{!"s2n_cipher_suite", !7, i64 0, !10, i64 8, !10, i64 16, !8, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !8, i64 56, !8, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !8, i64 100}
!52 = !{!53, !10, i64 0}
!53 = !{!"s2n_record_algorithm", !10, i64 0, !7, i64 8, !7, i64 12, !12, i64 16}
!54 = !{!53, !7, i64 12}
!55 = !{!6, !7, i64 1924}
!56 = !{!6, !7, i64 1920}
!57 = !{!26, !26, i64 0}
!58 = !{!59, !7, i64 0}
!59 = !{!"s2n_cipher", !7, i64 0, !8, i64 8, !8, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96}
!60 = !{!8, !8, i64 0}
!61 = !{!6, !10, i64 1896}
!62 = !{!6, !10, i64 8}
!63 = !{!64, !7, i64 420}
!64 = !{!"s2n_config", !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 1, !7, i64 2, !7, i64 2, !7, i64 2, !7, i64 2, !10, i64 8, !10, i64 16, !65, i64 24, !19, i64 56, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !7, i64 128, !7, i64 132, !10, i64 136, !12, i64 144, !10, i64 152, !12, i64 160, !12, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !7, i64 224, !8, i64 228, !7, i64 232, !7, i64 236, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !8, i64 296, !8, i64 297, !66, i64 304, !26, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !7, i64 392, !7, i64 396, !7, i64 400, !10, i64 408, !7, i64 416, !7, i64 420, !10, i64 424, !10, i64 432, !7, i64 440, !19, i64 448}
!65 = !{!"certs_by_type", !8, i64 0}
!66 = !{!"s2n_x509_trust_store", !10, i64 0, !7, i64 8}
!67 = !{!6, !7, i64 1904}
!68 = distinct !{!68, !69}
!69 = !{!"llvm.loop.mustprogress"}
!70 = !{!27, !7, i64 28}
!71 = !{!27, !7, i64 24}
!72 = !{!19, !7, i64 8}
!73 = !{!27, !10, i64 0}
!74 = distinct !{!74, !69}
!75 = !{!27, !7, i64 8}
!76 = !{!19, !10, i64 0}
!77 = !{!19, !7, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass