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

; 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_blob = type { ptr, i32, i32, i8 }
%struct.s2n_result = type { i32 }
%struct.s2n_connection = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [22 x i8], [22 x i8], [22 x i8], i32, i32, %struct.s2n_timer, i64, i64, [32 x i8], i8, i8, i8, i8, i8, i8, i8, ptr, ptr, %struct.s2n_secrets, ptr, ptr, %struct.s2n_kex_parameters, %struct.s2n_handshake_parameters, %struct.s2n_psk_parameters, ptr, i8, i32, [5 x i8], %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, i32, i64, [2 x i8], %struct.s2n_stuffer, i8, i8, i8, i8, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, %struct.s2n_handshake, i16, i32, i16, i64, i8, i64, i64, i64, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, [256 x i8], [256 x i8], i32, %struct.s2n_blob, i32, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_client_hello, %struct.s2n_x509_validator, ptr, ptr, i8, i32, %struct.s2n_blob, i32, %struct.s2n_ticket_fields, [138 x i8], %struct.s2n_stuffer, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8, i16, i16, i32, i32, %struct.s2n_blob, i32, %struct.s2n_post_handshake, %struct.s2n_atomic_flag, i8, i8 }
%struct.s2n_timer = type { i64 }
%struct.s2n_secrets = type { %union.anon, i32 }
%union.anon = type { %struct.s2n_tls13_secrets }
%struct.s2n_tls13_secrets = type { [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], i32 }
%struct.s2n_kex_parameters = type { %struct.s2n_dh_params, %struct.s2n_ecc_evp_params, [4 x ptr], %struct.s2n_ecc_evp_params, %struct.s2n_kem_group_params, %struct.s2n_kem_group_params, [8 x ptr], %struct.s2n_kem_params, %struct.s2n_blob, %struct.s2n_blob }
%struct.s2n_dh_params = type { ptr }
%struct.s2n_ecc_evp_params = type { ptr, ptr }
%struct.s2n_kem_group_params = type { ptr, %struct.s2n_kem_params, %struct.s2n_ecc_evp_params }
%struct.s2n_kem_params = type { ptr, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8 }
%struct.s2n_handshake_parameters = type { %struct.s2n_pkey, %struct.s2n_pkey, %struct.s2n_blob, i32, %struct.s2n_sig_scheme_list, ptr, ptr, ptr, [4 x ptr], [4 x ptr], i8, i8, [32 x i8], [32 x i8] }
%struct.s2n_pkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.s2n_sig_scheme_list = type { [128 x i16], i8 }
%struct.s2n_psk_parameters = type { i32, %struct.s2n_array, i16, i16, ptr, i32 }
%struct.s2n_array = type { %struct.s2n_blob, i32, i32 }
%struct.s2n_handshake = type { %struct.s2n_stuffer, ptr, [8 x i8], [48 x i8], [48 x i8], i8, i32, i32, i32, i32, %struct.s2n_offered_early_data, i8, i32 }
%struct.s2n_offered_early_data = type { ptr }
%struct.s2n_client_hello = type { %struct.s2n_blob, %struct.s2n_parsed_extensions_list, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8 }
%struct.s2n_parsed_extensions_list = type { [21 x %struct.s2n_parsed_extension], %struct.s2n_blob, i16 }
%struct.s2n_parsed_extension = type { %struct.s2n_blob, i16, i16, i8 }
%struct.s2n_x509_validator = type { ptr, ptr, i8, i8, i16, ptr, i32, ptr, %struct.s2n_cert_validation_info, i8 }
%struct.s2n_cert_validation_info = type { i8, [3 x i8] }
%struct.s2n_ticket_fields = type { %struct.s2n_blob, i32 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_post_handshake = type { %struct.s2n_stuffer, [4 x i8] }
%struct.s2n_atomic_flag = type { i32 }
%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 }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.5 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [85 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() #2

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

declare i32 @s2n_stuffer_free(ptr noundef) #2

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

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

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

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

declare i32 @s2n_connection_apply_error_blinding(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @s2n_recv_impl(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #5 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %struct.s2n_blob, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.s2n_result, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca %struct.s2n_result, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %struct.s2n_result, align 4
  %21 = alloca %struct.s2n_result, align 4
  %22 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %4
  %24 = load i64, ptr %8, align 8, !tbaa !9
  %25 = icmp sge i64 %24, 0
  br i1 %25, label %57, label %26

26:                                               ; preds = %23
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  %29 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %30 = getelementptr inbounds %struct.s2n_debug_info, ptr %29, i32 0, i32 0
  store ptr @.str.5, ptr %30, align 8, !tbaa !11
  %31 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %32 = getelementptr inbounds %struct.s2n_debug_info, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds i8, ptr %33, i64 21
  %35 = call ptr @strrchr(ptr noundef %34, i32 noundef 47) #7
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %44

37:                                               ; preds = %28
  %38 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %39 = getelementptr inbounds %struct.s2n_debug_info, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds i8, ptr %40, i64 21
  %42 = call ptr @strrchr(ptr noundef %41, i32 noundef 47) #7
  %43 = getelementptr inbounds i8, ptr %42, i64 1
  br label %49

44:                                               ; preds = %28
  %45 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %46 = getelementptr inbounds %struct.s2n_debug_info, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %47, i64 21
  br label %49

49:                                               ; preds = %44, %37
  %50 = phi ptr [ %43, %37 ], [ %48, %44 ]
  %51 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %52 = getelementptr inbounds %struct.s2n_debug_info, ptr %51, i32 0, i32 1
  store ptr %50, ptr %52, align 8, !tbaa !13
  %53 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %53, align 4, !tbaa !14
  %54 = call i32 @s2n_calculate_stacktrace()
  br label %55

55:                                               ; preds = %49
  store i64 -1, ptr %5, align 8
  br label %506

56:                                               ; No predecessors!
  br label %57

57:                                               ; preds = %56, %23
  br label %58

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %59 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %59, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store i64 0, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 24, i1 false)
  br label %60

60:                                               ; preds = %58
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = call i32 @s2n_blob_init(ptr noundef %12, ptr noundef %61, i32 noundef 0)
  %63 = icmp sgt i32 %62, -1
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %505

65:                                               ; preds = %60
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %68, align 4, !tbaa !14
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call zeroext i1 @s2n_connection_check_io_status(ptr noundef %69, i32 noundef 1)
  br i1 %70, label %113, label %71

71:                                               ; preds = %67
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.s2n_connection, ptr %73, i32 0, i32 51
  %75 = call zeroext i1 @s2n_atomic_flag_test(ptr noundef %74)
  br i1 %75, label %109, label %76

76:                                               ; preds = %72
  br label %77

77:                                               ; preds = %76
  br label %78

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

87:                                               ; preds = %78
  %88 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %89 = getelementptr inbounds %struct.s2n_debug_info, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !11
  %91 = getelementptr inbounds i8, ptr %90, i64 21
  %92 = call ptr @strrchr(ptr noundef %91, i32 noundef 47) #7
  %93 = getelementptr inbounds i8, ptr %92, i64 1
  br label %99

94:                                               ; preds = %78
  %95 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %96 = getelementptr inbounds %struct.s2n_debug_info, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !11
  %98 = getelementptr inbounds i8, ptr %97, i64 21
  br label %99

99:                                               ; preds = %94, %87
  %100 = phi ptr [ %93, %87 ], [ %98, %94 ]
  %101 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %102 = getelementptr inbounds %struct.s2n_debug_info, ptr %101, i32 0, i32 1
  store ptr %100, ptr %102, align 8, !tbaa !13
  %103 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 134217728, ptr %103, align 4, !tbaa !14
  %104 = call i32 @s2n_calculate_stacktrace()
  br label %105

105:                                              ; preds = %99
  br label %106

106:                                              ; preds = %105
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %505

107:                                              ; No predecessors!
  br label %108

108:                                              ; preds = %107
  br label %109

109:                                              ; preds = %108, %72
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %112, align 4, !tbaa !14
  store i64 0, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %505

113:                                              ; preds = %67
  br label %114

114:                                              ; preds = %113
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = call zeroext i1 @s2n_connection_is_quic_enabled(ptr noundef %115)
  br i1 %116, label %117, label %150

117:                                              ; preds = %114
  br label %118

118:                                              ; preds = %117
  br label %119

119:                                              ; preds = %118
  %120 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %121 = getelementptr inbounds %struct.s2n_debug_info, ptr %120, i32 0, i32 0
  store ptr @.str.7, ptr %121, align 8, !tbaa !11
  %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 0
  %124 = load ptr, ptr %123, align 8, !tbaa !11
  %125 = getelementptr inbounds i8, ptr %124, i64 21
  %126 = call ptr @strrchr(ptr noundef %125, i32 noundef 47) #7
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %135

128:                                              ; preds = %119
  %129 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %130 = getelementptr inbounds %struct.s2n_debug_info, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !11
  %132 = getelementptr inbounds i8, ptr %131, i64 21
  %133 = call ptr @strrchr(ptr noundef %132, i32 noundef 47) #7
  %134 = getelementptr inbounds i8, ptr %133, i64 1
  br label %140

135:                                              ; preds = %119
  %136 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %137 = getelementptr inbounds %struct.s2n_debug_info, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !11
  %139 = getelementptr inbounds i8, ptr %138, i64 21
  br label %140

140:                                              ; preds = %135, %128
  %141 = phi ptr [ %134, %128 ], [ %139, %135 ]
  %142 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %143 = getelementptr inbounds %struct.s2n_debug_info, ptr %142, i32 0, i32 1
  store ptr %141, ptr %143, align 8, !tbaa !13
  %144 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762107, ptr %144, align 4, !tbaa !14
  %145 = call i32 @s2n_calculate_stacktrace()
  br label %146

146:                                              ; preds = %140
  br label %147

147:                                              ; preds = %146
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %505

148:                                              ; No predecessors!
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149, %114
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = call i32 @s2n_early_data_validate_recv(ptr noundef %154)
  %156 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  store i32 %155, ptr %156, align 4
  %157 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  %158 = load i32, ptr %157, align 4
  %159 = call zeroext i1 @s2n_result_is_ok(i32 %158)
  br i1 %159, label %161, label %160

160:                                              ; preds = %153
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %505

161:                                              ; preds = %153
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %489, %487, %163
  %165 = load i64, ptr %10, align 8, !tbaa !9
  %166 = icmp ne i64 %165, 0
  br i1 %166, label %167, label %170

167:                                              ; preds = %164
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = call zeroext i1 @s2n_connection_check_io_status(ptr noundef %168, i32 noundef 1)
  br label %170

170:                                              ; preds = %167, %164
  %171 = phi i1 [ false, %164 ], [ %169, %167 ]
  br i1 %171, label %172, label %490

172:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #8
  store i8 0, ptr %16, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = call i32 @s2n_read_full_record(ptr noundef %173, ptr noundef %16, ptr noundef %15)
  store i32 %174, ptr %17, align 4, !tbaa !14
  %175 = load i32, ptr %17, align 4, !tbaa !14
  %176 = icmp slt i32 %175, 0
  br i1 %176, label %177, label %227

177:                                              ; preds = %172
  %178 = load i64, ptr %11, align 8, !tbaa !9
  %179 = icmp ne i64 %178, 0
  br i1 %179, label %180, label %189

180:                                              ; preds = %177
  %181 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %182 = load i32, ptr %181, align 4, !tbaa !14
  %183 = icmp eq i32 %182, 134217728
  br i1 %183, label %188, label %184

184:                                              ; preds = %180
  %185 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %186 = load i32, ptr %185, align 4, !tbaa !14
  %187 = icmp eq i32 %186, 201326592
  br i1 %187, label %188, label %189

188:                                              ; preds = %184, %180
  store i32 25, ptr %13, align 4
  br label %487

189:                                              ; preds = %184, %177
  %190 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %191 = load i32, ptr %190, align 4, !tbaa !14
  %192 = icmp ne i32 %191, 201326592
  br i1 %192, label %193, label %223

193:                                              ; preds = %189
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = call i32 @s2n_allowed_to_cache_connection(ptr noundef %194)
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %223

197:                                              ; preds = %193
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.s2n_connection, ptr %198, i32 0, i32 19
  %200 = load i8, ptr %199, align 8, !tbaa !17
  %201 = zext i8 %200 to i32
  %202 = icmp ne i32 %201, 0
  br i1 %202, label %203, label %223

203:                                              ; preds = %197
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.s2n_connection, ptr %204, i32 0, i32 1
  %206 = load ptr, ptr %205, align 8, !tbaa !44
  %207 = getelementptr inbounds %struct.s2n_config, ptr %206, i32 0, i32 22
  %208 = load ptr, ptr %207, align 8, !tbaa !45
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.s2n_connection, ptr %210, i32 0, i32 1
  %212 = load ptr, ptr %211, align 8, !tbaa !44
  %213 = getelementptr inbounds %struct.s2n_config, ptr %212, i32 0, i32 23
  %214 = load ptr, ptr %213, align 8, !tbaa !49
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.s2n_connection, ptr %215, i32 0, i32 18
  %217 = getelementptr inbounds [32 x i8], ptr %216, i64 0, i64 0
  %218 = load ptr, ptr %6, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.s2n_connection, ptr %218, i32 0, i32 19
  %220 = load i8, ptr %219, align 8, !tbaa !17
  %221 = zext i8 %220 to i64
  %222 = call i32 %208(ptr noundef %209, ptr noundef %214, ptr noundef %217, i64 noundef %221)
  br label %223

223:                                              ; preds = %203, %197, %193, %189
  br label %224

224:                                              ; preds = %223
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %487

225:                                              ; No predecessors!
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226, %172
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %15, align 4, !tbaa !14
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %231, label %264

231:                                              ; preds = %228
  br label %232

232:                                              ; preds = %231
  br label %233

233:                                              ; preds = %232
  %234 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %235 = getelementptr inbounds %struct.s2n_debug_info, ptr %234, i32 0, i32 0
  store ptr @.str.8, ptr %235, align 8, !tbaa !11
  %236 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %237 = getelementptr inbounds %struct.s2n_debug_info, ptr %236, i32 0, i32 0
  %238 = load ptr, ptr %237, align 8, !tbaa !11
  %239 = getelementptr inbounds i8, ptr %238, i64 21
  %240 = call ptr @strrchr(ptr noundef %239, i32 noundef 47) #7
  %241 = icmp ne ptr %240, null
  br i1 %241, label %242, label %249

242:                                              ; preds = %233
  %243 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %244 = getelementptr inbounds %struct.s2n_debug_info, ptr %243, i32 0, i32 0
  %245 = load ptr, ptr %244, align 8, !tbaa !11
  %246 = getelementptr inbounds i8, ptr %245, i64 21
  %247 = call ptr @strrchr(ptr noundef %246, i32 noundef 47) #7
  %248 = getelementptr inbounds i8, ptr %247, i64 1
  br label %254

249:                                              ; preds = %233
  %250 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %251 = getelementptr inbounds %struct.s2n_debug_info, ptr %250, i32 0, i32 0
  %252 = load ptr, ptr %251, align 8, !tbaa !11
  %253 = getelementptr inbounds i8, ptr %252, i64 21
  br label %254

254:                                              ; preds = %249, %242
  %255 = phi ptr [ %248, %242 ], [ %253, %249 ]
  %256 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %257 = getelementptr inbounds %struct.s2n_debug_info, ptr %256, i32 0, i32 1
  store ptr %255, ptr %257, align 8, !tbaa !13
  %258 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %258, align 4, !tbaa !14
  %259 = call i32 @s2n_calculate_stacktrace()
  br label %260

260:                                              ; preds = %254
  br label %261

261:                                              ; preds = %260
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %487

262:                                              ; No predecessors!
  br label %263

263:                                              ; preds = %262
  br label %264

264:                                              ; preds = %263, %228
  br label %265

265:                                              ; preds = %264
  br label %266

266:                                              ; preds = %265
  %267 = load i8, ptr %16, align 1, !tbaa !16
  %268 = zext i8 %267 to i32
  %269 = icmp ne i32 %268, 22
  br i1 %269, label %270, label %333

270:                                              ; preds = %266
  br label %271

271:                                              ; preds = %270
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.s2n_connection, ptr %272, i32 0, i32 93
  %274 = getelementptr inbounds %struct.s2n_post_handshake, ptr %273, i32 0, i32 0
  %275 = getelementptr inbounds %struct.s2n_stuffer, ptr %274, i32 0, i32 3
  %276 = load i32, ptr %275, align 8, !tbaa !50
  %277 = icmp eq i32 %276, 0
  br i1 %277, label %311, label %278

278:                                              ; preds = %271
  br label %279

279:                                              ; preds = %278
  br label %280

280:                                              ; preds = %279
  %281 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %282 = getelementptr inbounds %struct.s2n_debug_info, ptr %281, i32 0, i32 0
  store ptr @.str.9, ptr %282, align 8, !tbaa !11
  %283 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %284 = getelementptr inbounds %struct.s2n_debug_info, ptr %283, i32 0, i32 0
  %285 = load ptr, ptr %284, align 8, !tbaa !11
  %286 = getelementptr inbounds i8, ptr %285, i64 21
  %287 = call ptr @strrchr(ptr noundef %286, i32 noundef 47) #7
  %288 = icmp ne ptr %287, null
  br i1 %288, label %289, label %296

289:                                              ; preds = %280
  %290 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %291 = getelementptr inbounds %struct.s2n_debug_info, ptr %290, i32 0, i32 0
  %292 = load ptr, ptr %291, align 8, !tbaa !11
  %293 = getelementptr inbounds i8, ptr %292, i64 21
  %294 = call ptr @strrchr(ptr noundef %293, i32 noundef 47) #7
  %295 = getelementptr inbounds i8, ptr %294, i64 1
  br label %301

296:                                              ; preds = %280
  %297 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %298 = getelementptr inbounds %struct.s2n_debug_info, ptr %297, i32 0, i32 0
  %299 = load ptr, ptr %298, align 8, !tbaa !11
  %300 = getelementptr inbounds i8, ptr %299, i64 21
  br label %301

301:                                              ; preds = %296, %289
  %302 = phi ptr [ %295, %289 ], [ %300, %296 ]
  %303 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %304 = getelementptr inbounds %struct.s2n_debug_info, ptr %303, i32 0, i32 1
  store ptr %302, ptr %304, align 8, !tbaa !13
  %305 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %305, align 4, !tbaa !14
  %306 = call i32 @s2n_calculate_stacktrace()
  br label %307

307:                                              ; preds = %301
  br label %308

308:                                              ; preds = %307
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %487

309:                                              ; No predecessors!
  br label %310

310:                                              ; preds = %309
  br label %311

311:                                              ; preds = %310, %271
  br label %312

312:                                              ; preds = %311
  br label %313

313:                                              ; preds = %312
  %314 = load ptr, ptr %6, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.s2n_connection, ptr %314, i32 0, i32 93
  %316 = getelementptr inbounds %struct.s2n_post_handshake, ptr %315, i32 0, i32 0
  %317 = getelementptr inbounds %struct.s2n_stuffer, ptr %316, i32 0, i32 0
  %318 = getelementptr inbounds %struct.s2n_blob, ptr %317, i32 0, i32 0
  %319 = load ptr, ptr %318, align 8, !tbaa !51
  %320 = icmp eq ptr %319, null
  br i1 %320, label %332, label %321

321:                                              ; preds = %313
  br label %322

322:                                              ; preds = %321
  %323 = load ptr, ptr %6, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.s2n_connection, ptr %323, i32 0, i32 93
  %325 = getelementptr inbounds %struct.s2n_post_handshake, ptr %324, i32 0, i32 0
  %326 = call i32 @s2n_stuffer_free(ptr noundef %325)
  %327 = icmp sgt i32 %326, -1
  br i1 %327, label %329, label %328

328:                                              ; preds = %322
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %487

329:                                              ; preds = %322
  br label %330

330:                                              ; preds = %329
  br label %331

331:                                              ; preds = %330
  br label %332

332:                                              ; preds = %331, %313
  br label %333

333:                                              ; preds = %332, %266
  %334 = load i8, ptr %16, align 1, !tbaa !16
  %335 = zext i8 %334 to i32
  %336 = icmp ne i32 %335, 23
  br i1 %336, label %337, label %397

337:                                              ; preds = %333
  %338 = load i8, ptr %16, align 1, !tbaa !16
  %339 = zext i8 %338 to i32
  switch i32 %339, label %385 [
    i32 21, label %340
    i32 22, label %349
  ]

340:                                              ; preds = %337
  br label %341

341:                                              ; preds = %340
  %342 = load ptr, ptr %6, align 8, !tbaa !5
  %343 = call i32 @s2n_process_alert_fragment(ptr noundef %342)
  %344 = icmp sgt i32 %343, -1
  br i1 %344, label %346, label %345

345:                                              ; preds = %341
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %487

346:                                              ; preds = %341
  br label %347

347:                                              ; preds = %346
  br label %348

348:                                              ; preds = %347
  br label %385

349:                                              ; preds = %337
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %350 = load ptr, ptr %6, align 8, !tbaa !5
  %351 = call i32 @s2n_post_handshake_recv(ptr noundef %350)
  %352 = getelementptr inbounds %struct.s2n_result, ptr %18, i32 0, i32 0
  store i32 %351, ptr %352, align 4
  %353 = getelementptr inbounds %struct.s2n_result, ptr %18, i32 0, i32 0
  %354 = load i32, ptr %353, align 4
  %355 = call zeroext i1 @s2n_result_is_error(i32 %354)
  br i1 %355, label %356, label %382

356:                                              ; preds = %349
  %357 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %358 = load i32, ptr %357, align 4, !tbaa !14
  %359 = icmp ne i32 %358, 201326592
  br i1 %359, label %360, label %382

360:                                              ; preds = %356
  br label %361

361:                                              ; preds = %360
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %362 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %362, ptr %19, align 8, !tbaa !5
  br label %363

363:                                              ; preds = %361
  %364 = getelementptr inbounds %struct.s2n_result, ptr %18, i32 0, i32 0
  %365 = load i32, ptr %364, align 4
  %366 = call zeroext i1 @s2n_result_is_ok(i32 %365)
  br i1 %366, label %368, label %367

367:                                              ; preds = %363
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %375

368:                                              ; preds = %363
  br label %369

369:                                              ; preds = %368
  br label %370

370:                                              ; preds = %369
  %371 = load ptr, ptr %19, align 8, !tbaa !5
  %372 = icmp ne ptr %371, null
  br i1 %372, label %373, label %374

373:                                              ; preds = %370
  store ptr null, ptr %19, align 8, !tbaa !5
  br label %374

374:                                              ; preds = %373, %370
  store i32 0, ptr %13, align 4
  br label %375

375:                                              ; preds = %374, %367
  %376 = call i32 @s2n_connection_apply_error_blinding(ptr noundef %19)
  %377 = getelementptr inbounds %struct.s2n_result, ptr %20, i32 0, i32 0
  store i32 %376, ptr %377, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %378 = load i32, ptr %13, align 4
  switch i32 %378, label %383 [
    i32 0, label %379
  ]

379:                                              ; preds = %375
  br label %380

380:                                              ; preds = %379
  br label %381

381:                                              ; preds = %380
  br label %382

382:                                              ; preds = %381, %356, %349
  store i32 42, ptr %13, align 4
  br label %383

383:                                              ; preds = %382, %375
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  %384 = load i32, ptr %13, align 4
  switch i32 %384, label %487 [
    i32 42, label %385
  ]

385:                                              ; preds = %383, %348, %337
  br label %386

386:                                              ; preds = %385
  %387 = load ptr, ptr %6, align 8, !tbaa !5
  %388 = call i32 @s2n_record_wipe(ptr noundef %387)
  %389 = getelementptr inbounds %struct.s2n_result, ptr %21, i32 0, i32 0
  store i32 %388, ptr %389, align 4
  %390 = getelementptr inbounds %struct.s2n_result, ptr %21, i32 0, i32 0
  %391 = load i32, ptr %390, align 4
  %392 = call zeroext i1 @s2n_result_is_ok(i32 %391)
  br i1 %392, label %394, label %393

393:                                              ; preds = %386
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %487

394:                                              ; preds = %386
  br label %395

395:                                              ; preds = %394
  br label %396

396:                                              ; preds = %395
  store i32 24, ptr %13, align 4
  br label %487, !llvm.loop !52

397:                                              ; preds = %333
  %398 = load i64, ptr %10, align 8, !tbaa !9
  %399 = load ptr, ptr %6, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.s2n_connection, ptr %399, i32 0, i32 40
  %401 = getelementptr inbounds %struct.s2n_stuffer, ptr %400, i32 0, i32 2
  %402 = load i32, ptr %401, align 4, !tbaa !54
  %403 = load ptr, ptr %6, align 8, !tbaa !5
  %404 = getelementptr inbounds %struct.s2n_connection, ptr %403, i32 0, i32 40
  %405 = getelementptr inbounds %struct.s2n_stuffer, ptr %404, i32 0, i32 1
  %406 = load i32, ptr %405, align 8, !tbaa !55
  %407 = sub i32 %402, %406
  %408 = zext i32 %407 to i64
  %409 = icmp ult i64 %398, %408
  br i1 %409, label %410, label %412

410:                                              ; preds = %397
  %411 = load i64, ptr %10, align 8, !tbaa !9
  br label %423

412:                                              ; preds = %397
  %413 = load ptr, ptr %6, align 8, !tbaa !5
  %414 = getelementptr inbounds %struct.s2n_connection, ptr %413, i32 0, i32 40
  %415 = getelementptr inbounds %struct.s2n_stuffer, ptr %414, i32 0, i32 2
  %416 = load i32, ptr %415, align 4, !tbaa !54
  %417 = load ptr, ptr %6, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct.s2n_connection, ptr %417, i32 0, i32 40
  %419 = getelementptr inbounds %struct.s2n_stuffer, ptr %418, i32 0, i32 1
  %420 = load i32, ptr %419, align 8, !tbaa !55
  %421 = sub i32 %416, %420
  %422 = zext i32 %421 to i64
  br label %423

423:                                              ; preds = %412, %410
  %424 = phi i64 [ %411, %410 ], [ %422, %412 ]
  %425 = trunc i64 %424 to i32
  %426 = getelementptr inbounds %struct.s2n_blob, ptr %12, i32 0, i32 1
  store i32 %425, ptr %426, align 8, !tbaa !56
  br label %427

427:                                              ; preds = %423
  %428 = load ptr, ptr %6, align 8, !tbaa !5
  %429 = getelementptr inbounds %struct.s2n_connection, ptr %428, i32 0, i32 40
  %430 = call i32 @s2n_stuffer_erase_and_read(ptr noundef %429, ptr noundef %12)
  %431 = icmp sgt i32 %430, -1
  br i1 %431, label %433, label %432

432:                                              ; preds = %427
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %487

433:                                              ; preds = %427
  br label %434

434:                                              ; preds = %433
  br label %435

435:                                              ; preds = %434
  %436 = getelementptr inbounds %struct.s2n_blob, ptr %12, i32 0, i32 1
  %437 = load i32, ptr %436, align 8, !tbaa !56
  %438 = zext i32 %437 to i64
  %439 = load i64, ptr %11, align 8, !tbaa !9
  %440 = add nsw i64 %439, %438
  store i64 %440, ptr %11, align 8, !tbaa !9
  %441 = getelementptr inbounds %struct.s2n_blob, ptr %12, i32 0, i32 1
  %442 = load i32, ptr %441, align 8, !tbaa !56
  %443 = getelementptr inbounds %struct.s2n_blob, ptr %12, i32 0, i32 0
  %444 = load ptr, ptr %443, align 8, !tbaa !57
  %445 = zext i32 %442 to i64
  %446 = getelementptr inbounds i8, ptr %444, i64 %445
  store ptr %446, ptr %443, align 8, !tbaa !57
  %447 = getelementptr inbounds %struct.s2n_blob, ptr %12, i32 0, i32 1
  %448 = load i32, ptr %447, align 8, !tbaa !56
  %449 = zext i32 %448 to i64
  %450 = load i64, ptr %10, align 8, !tbaa !9
  %451 = sub i64 %450, %449
  store i64 %451, ptr %10, align 8, !tbaa !9
  %452 = load ptr, ptr %6, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.s2n_connection, ptr %452, i32 0, i32 40
  %454 = getelementptr inbounds %struct.s2n_stuffer, ptr %453, i32 0, i32 2
  %455 = load i32, ptr %454, align 4, !tbaa !54
  %456 = load ptr, ptr %6, align 8, !tbaa !5
  %457 = getelementptr inbounds %struct.s2n_connection, ptr %456, i32 0, i32 40
  %458 = getelementptr inbounds %struct.s2n_stuffer, ptr %457, i32 0, i32 1
  %459 = load i32, ptr %458, align 8, !tbaa !55
  %460 = sub i32 %455, %459
  %461 = icmp eq i32 %460, 0
  br i1 %461, label %462, label %474

462:                                              ; preds = %435
  br label %463

463:                                              ; preds = %462
  %464 = load ptr, ptr %6, align 8, !tbaa !5
  %465 = call i32 @s2n_record_wipe(ptr noundef %464)
  %466 = getelementptr inbounds %struct.s2n_result, ptr %22, i32 0, i32 0
  store i32 %465, ptr %466, align 4
  %467 = getelementptr inbounds %struct.s2n_result, ptr %22, i32 0, i32 0
  %468 = load i32, ptr %467, align 4
  %469 = call zeroext i1 @s2n_result_is_ok(i32 %468)
  br i1 %469, label %471, label %470

470:                                              ; preds = %463
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %487

471:                                              ; preds = %463
  br label %472

472:                                              ; preds = %471
  br label %473

473:                                              ; preds = %472
  br label %474

474:                                              ; preds = %473, %435
  %475 = load i64, ptr %11, align 8, !tbaa !9
  %476 = icmp ne i64 %475, 0
  br i1 %476, label %477, label %486

477:                                              ; preds = %474
  %478 = load ptr, ptr %6, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.s2n_connection, ptr %478, i32 0, i32 1
  %480 = load ptr, ptr %479, align 8, !tbaa !44
  %481 = load i32, ptr %480, align 8
  %482 = lshr i32 %481, 14
  %483 = and i32 %482, 1
  %484 = icmp ne i32 %483, 0
  br i1 %484, label %486, label %485

485:                                              ; preds = %477
  store i32 25, ptr %13, align 4
  br label %487

486:                                              ; preds = %477, %474
  store i32 0, ptr %13, align 4
  br label %487

487:                                              ; preds = %486, %485, %470, %432, %396, %393, %383, %345, %328, %308, %261, %224, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  %488 = load i32, ptr %13, align 4
  switch i32 %488, label %505 [
    i32 0, label %489
    i32 25, label %490
    i32 24, label %164
  ]

489:                                              ; preds = %487
  br label %164, !llvm.loop !52

490:                                              ; preds = %487, %170
  %491 = load ptr, ptr %6, align 8, !tbaa !5
  %492 = getelementptr inbounds %struct.s2n_connection, ptr %491, i32 0, i32 40
  %493 = getelementptr inbounds %struct.s2n_stuffer, ptr %492, i32 0, i32 2
  %494 = load i32, ptr %493, align 4, !tbaa !54
  %495 = load ptr, ptr %6, align 8, !tbaa !5
  %496 = getelementptr inbounds %struct.s2n_connection, ptr %495, i32 0, i32 40
  %497 = getelementptr inbounds %struct.s2n_stuffer, ptr %496, i32 0, i32 1
  %498 = load i32, ptr %497, align 8, !tbaa !55
  %499 = sub i32 %494, %498
  %500 = icmp eq i32 %499, 0
  br i1 %500, label %501, label %503

501:                                              ; preds = %490
  %502 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %502, align 4, !tbaa !14
  br label %503

503:                                              ; preds = %501, %490
  %504 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %504, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %505

505:                                              ; preds = %503, %487, %160, %147, %111, %106, %64
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %506

506:                                              ; preds = %505, %55
  %507 = load i64, ptr %5, align 8
  ret i64 %507
}

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

declare zeroext i1 @s2n_connection_check_io_status(ptr noundef, i32 noundef) #2

declare zeroext i1 @s2n_atomic_flag_test(ptr noundef) #2

declare zeroext i1 @s2n_connection_is_quic_enabled(ptr noundef) #2

declare i32 @s2n_early_data_validate_recv(ptr noundef) #2

declare i32 @s2n_allowed_to_cache_connection(ptr noundef) #2

declare i32 @s2n_process_alert_fragment(ptr noundef) #2

declare i32 @s2n_post_handshake_recv(ptr noundef) #2

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

declare i32 @s2n_record_wipe(ptr noundef) #2

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

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

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

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


; 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_blob = type { ptr, i32, i32, i8 }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [85 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

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

declare i32 @s2n_stuffer_free(ptr noundef) local_unnamed_addr #2

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

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

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

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

declare i32 @s2n_connection_apply_error_blinding(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i64 @s2n_recv_impl(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #5 {
  %5 = alloca %struct.s2n_blob, align 8
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = icmp sgt i64 %2, -1
  br i1 %9, label %18, label %10

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

18:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  %19 = call i32 @s2n_blob_init(ptr noundef nonnull %5, ptr noundef %1, i32 noundef 0) #9
  %20 = icmp sgt i32 %19, -1
  br i1 %20, label %21, label %156

21:                                               ; preds = %18
  store i32 1, ptr %3, align 4, !tbaa !11
  %22 = call zeroext i1 @s2n_connection_check_io_status(ptr noundef %0, i32 noundef 1) #9
  br i1 %22, label %35, label %23

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %0, i64 2008
  %25 = call zeroext i1 @s2n_atomic_flag_test(ptr noundef nonnull %24) #9
  br i1 %25, label %34, label %26

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

34:                                               ; preds = %23
  store i32 0, ptr %3, align 4, !tbaa !11
  br label %156

35:                                               ; preds = %21
  %36 = call zeroext i1 @s2n_connection_is_quic_enabled(ptr noundef %0) #9
  br i1 %36, label %37, label %45

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

45:                                               ; preds = %35
  %46 = call i32 @s2n_early_data_validate_recv(ptr noundef %0) #9
  %47 = call zeroext i1 @s2n_result_is_ok(i32 %46)
  br i1 %47, label %.preheader, label %156

.preheader:                                       ; preds = %45
  %.not78113 = icmp eq i64 %2, 0
  br i1 %.not78113, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %48 = getelementptr inbounds i8, ptr %0, i64 4128
  %49 = getelementptr inbounds i8, ptr %0, i64 4160
  %50 = getelementptr inbounds i8, ptr %0, i64 1856
  %51 = getelementptr inbounds i8, ptr %0, i64 1884
  %52 = getelementptr inbounds i8, ptr %0, i64 1880
  %53 = getelementptr inbounds i8, ptr %5, i64 8
  %54 = getelementptr inbounds i8, ptr %0, i64 8
  %55 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  br label %56

56:                                               ; preds = %.lr.ph, %select.unfold
  %.060115 = phi i64 [ %2, %.lr.ph ], [ %.161, %select.unfold ]
  %.062114 = phi i64 [ 0, %.lr.ph ], [ %.163, %select.unfold ]
  %57 = call zeroext i1 @s2n_connection_check_io_status(ptr noundef %0, i32 noundef 1) #9
  br i1 %57, label %58, label %.critedge

58:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 0, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #9
  store i8 0, ptr %7, align 1, !tbaa !13
  %59 = call i32 @s2n_read_full_record(ptr noundef %0, ptr noundef nonnull %7, ptr noundef nonnull %6)
  %60 = icmp slt i32 %59, 0
  br i1 %60, label %61, label %78

61:                                               ; preds = %58
  %.not87 = icmp ne i64 %.062114, 0
  %.pre = load i32, ptr %55, align 4
  %62 = and i32 %.pre, -67108865
  %or.cond = icmp eq i32 %62, 134217728
  %or.cond131 = select i1 %.not87, i1 %or.cond, i1 false
  br i1 %or.cond131, label %.thread103, label %63

63:                                               ; preds = %61
  %.not88 = icmp eq i32 %.pre, 201326592
  br i1 %.not88, label %.thread98, label %64

64:                                               ; preds = %63
  %65 = call i32 @s2n_allowed_to_cache_connection(ptr noundef %0) #9
  %.not89 = icmp eq i32 %65, 0
  br i1 %.not89, label %.thread98, label %66

66:                                               ; preds = %64
  %67 = getelementptr inbounds i8, ptr %0, i64 216
  %68 = load i8, ptr %67, align 8, !tbaa !14
  %.not90 = icmp eq i8 %68, 0
  br i1 %.not90, label %.thread98, label %69

69:                                               ; preds = %66
  %70 = load ptr, ptr %54, align 8, !tbaa !42
  %71 = getelementptr inbounds i8, ptr %70, i64 208
  %72 = load ptr, ptr %71, align 8, !tbaa !43
  %73 = getelementptr inbounds i8, ptr %70, i64 216
  %74 = load ptr, ptr %73, align 8, !tbaa !47
  %75 = getelementptr inbounds i8, ptr %0, i64 184
  %76 = zext i8 %68 to i64
  %77 = call i32 %72(ptr noundef nonnull %0, ptr noundef %74, ptr noundef nonnull %75, i64 noundef %76) #9
  br label %.thread98

78:                                               ; preds = %58
  %79 = load i32, ptr %6, align 4, !tbaa !11
  %.not79 = icmp eq i32 %79, 0
  br i1 %.not79, label %87, label %80

80:                                               ; preds = %78
  %81 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.8, ptr %81, align 8, !tbaa !5
  %82 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.8, i64 21), i32 noundef 47) #8
  %.not86 = icmp eq ptr %82, null
  %83 = getelementptr inbounds i8, ptr %82, i64 1
  %84 = select i1 %.not86, ptr getelementptr inbounds (i8, ptr @.str.8, i64 21), ptr %83
  %85 = getelementptr inbounds i8, ptr %81, i64 8
  store ptr %84, ptr %85, align 8, !tbaa !10
  store i32 335544322, ptr %55, align 4, !tbaa !11
  %86 = call i32 @s2n_calculate_stacktrace() #9
  br label %.thread98

87:                                               ; preds = %78
  %88 = load i8, ptr %7, align 1, !tbaa !13
  %.not80 = icmp eq i8 %88, 22
  br i1 %.not80, label %.thread, label %89

89:                                               ; preds = %87
  %90 = load i32, ptr %49, align 8, !tbaa !48
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %99, label %92

92:                                               ; preds = %89
  %93 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.9, ptr %93, align 8, !tbaa !5
  %94 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.9, i64 21), i32 noundef 47) #8
  %.not81 = icmp eq ptr %94, null
  %95 = getelementptr inbounds i8, ptr %94, i64 1
  %96 = select i1 %.not81, ptr getelementptr inbounds (i8, ptr @.str.9, i64 21), ptr %95
  %97 = getelementptr inbounds i8, ptr %93, i64 8
  store ptr %96, ptr %97, align 8, !tbaa !10
  store i32 335544322, ptr %55, align 4, !tbaa !11
  %98 = call i32 @s2n_calculate_stacktrace() #9
  br label %.thread98

99:                                               ; preds = %89
  %100 = load ptr, ptr %48, align 8, !tbaa !49
  %101 = icmp eq ptr %100, null
  br i1 %101, label %105, label %102

102:                                              ; preds = %99
  %103 = call i32 @s2n_stuffer_free(ptr noundef nonnull %48) #9
  %104 = icmp sgt i32 %103, -1
  br i1 %104, label %._crit_edge, label %.thread98

._crit_edge:                                      ; preds = %102
  %.pr.pre = load i8, ptr %7, align 1, !tbaa !13
  br label %105

105:                                              ; preds = %._crit_edge, %99
  %.pr = phi i8 [ %.pr.pre, %._crit_edge ], [ %88, %99 ]
  switch i8 %.pr, label %.thread94 [
    i8 23, label %124
    i8 21, label %106
    i8 22, label %.thread
  ]

106:                                              ; preds = %105
  %107 = call i32 @s2n_process_alert_fragment(ptr noundef nonnull %0) #9
  %108 = icmp sgt i32 %107, -1
  br i1 %108, label %.thread94, label %.thread98

.thread:                                          ; preds = %87, %105
  %109 = call i32 @s2n_post_handshake_recv(ptr noundef %0) #9
  %110 = call zeroext i1 @s2n_result_is_error(i32 %109)
  %111 = load i32, ptr %55, align 4
  %112 = icmp ne i32 %111, 201326592
  %or.cond6 = select i1 %110, i1 %112, i1 false
  br i1 %or.cond6, label %113, label %.thread94

113:                                              ; preds = %.thread
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  store ptr %0, ptr %8, align 8, !tbaa !50
  %114 = call zeroext i1 @s2n_result_is_ok(i32 %109)
  br i1 %114, label %115, label %120

115:                                              ; preds = %113
  %116 = load ptr, ptr %8, align 8, !tbaa !50
  %.not85 = icmp eq ptr %116, null
  br i1 %.not85, label %118, label %117

117:                                              ; preds = %115
  store ptr null, ptr %8, align 8, !tbaa !50
  br label %118

118:                                              ; preds = %115, %117
  %119 = call i32 @s2n_connection_apply_error_blinding(ptr noundef nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %.thread94

120:                                              ; preds = %113
  %121 = call i32 @s2n_connection_apply_error_blinding(ptr noundef nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %.thread98

.thread94:                                        ; preds = %.thread, %118, %105, %106
  %122 = call i32 @s2n_record_wipe(ptr noundef %0) #9
  %123 = call zeroext i1 @s2n_result_is_ok(i32 %122)
  br i1 %123, label %select.unfold, label %.thread98, !llvm.loop !51

124:                                              ; preds = %105
  %125 = load i32, ptr %51, align 4, !tbaa !53
  %126 = load i32, ptr %52, align 8, !tbaa !54
  %127 = sub i32 %125, %126
  %128 = zext i32 %127 to i64
  %.060. = call i64 @llvm.umin.i64(i64 %.060115, i64 %128)
  %129 = trunc nuw i64 %.060. to i32
  store i32 %129, ptr %53, align 8, !tbaa !55
  %130 = call i32 @s2n_stuffer_erase_and_read(ptr noundef nonnull %50, ptr noundef nonnull %5) #9
  %131 = icmp sgt i32 %130, -1
  br i1 %131, label %132, label %.thread98

132:                                              ; preds = %124
  %133 = load i32, ptr %53, align 8, !tbaa !55
  %134 = zext i32 %133 to i64
  %135 = add nsw i64 %.062114, %134
  %136 = load ptr, ptr %5, align 8, !tbaa !56
  %137 = getelementptr inbounds i8, ptr %136, i64 %134
  store ptr %137, ptr %5, align 8, !tbaa !56
  %138 = sub i64 %.060115, %134
  %139 = load i32, ptr %51, align 4, !tbaa !53
  %140 = load i32, ptr %52, align 8, !tbaa !54
  %141 = icmp eq i32 %139, %140
  br i1 %141, label %142, label %145

142:                                              ; preds = %132
  %143 = call i32 @s2n_record_wipe(ptr noundef nonnull %0) #9
  %144 = call zeroext i1 @s2n_result_is_ok(i32 %143)
  br i1 %144, label %145, label %.thread98

145:                                              ; preds = %142, %132
  %.not83 = icmp eq i64 %135, 0
  br i1 %.not83, label %select.unfold, label %146

146:                                              ; preds = %145
  %147 = load ptr, ptr %54, align 8, !tbaa !42
  %148 = load i32, ptr %147, align 8
  %149 = and i32 %148, 16384
  %.not84 = icmp eq i32 %149, 0
  br i1 %.not84, label %.thread103, label %select.unfold

.thread98:                                        ; preds = %102, %106, %.thread94, %124, %142, %80, %120, %92, %63, %64, %66, %69
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  br label %156

.thread103:                                       ; preds = %146, %61
  %.163.ph = phi i64 [ %.062114, %61 ], [ %135, %146 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  br label %.critedge

select.unfold:                                    ; preds = %.thread94, %145, %146
  %.163 = phi i64 [ %135, %146 ], [ 0, %145 ], [ %.062114, %.thread94 ]
  %.161 = phi i64 [ %138, %146 ], [ %138, %145 ], [ %.060115, %.thread94 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  %.not78 = icmp eq i64 %.161, 0
  br i1 %.not78, label %.critedge, label %56

.critedge:                                        ; preds = %56, %select.unfold, %.preheader, %.thread103
  %.264 = phi i64 [ %.163.ph, %.thread103 ], [ 0, %.preheader ], [ %.062114, %56 ], [ %.163, %select.unfold ]
  %150 = getelementptr inbounds i8, ptr %0, i64 1884
  %151 = load i32, ptr %150, align 4, !tbaa !53
  %152 = getelementptr inbounds i8, ptr %0, i64 1880
  %153 = load i32, ptr %152, align 8, !tbaa !54
  %154 = icmp eq i32 %151, %153
  br i1 %154, label %155, label %156

155:                                              ; preds = %.critedge
  store i32 0, ptr %3, align 4, !tbaa !11
  br label %156

156:                                              ; preds = %.thread98, %.critedge, %155, %45, %18, %37, %34, %26
  %.6 = phi i64 [ -1, %37 ], [ 0, %34 ], [ -1, %26 ], [ -1, %18 ], [ -1, %45 ], [ %.264, %155 ], [ %.264, %.critedge ], [ -1, %.thread98 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  br label %157

157:                                              ; preds = %156, %10
  %.7 = phi i64 [ %.6, %156 ], [ -1, %10 ]
  ret i64 %.7
}

; 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 zeroext i1 @s2n_connection_check_io_status(ptr noundef, i32 noundef) local_unnamed_addr #2

declare zeroext i1 @s2n_atomic_flag_test(ptr noundef) local_unnamed_addr #2

declare zeroext i1 @s2n_connection_is_quic_enabled(ptr noundef) local_unnamed_addr #2

declare i32 @s2n_early_data_validate_recv(ptr noundef) local_unnamed_addr #2

declare i32 @s2n_allowed_to_cache_connection(ptr noundef) local_unnamed_addr #2

declare i32 @s2n_process_alert_fragment(ptr noundef) local_unnamed_addr #2

declare i32 @s2n_post_handshake_recv(ptr noundef) local_unnamed_addr #2

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

declare i32 @s2n_record_wipe(ptr noundef) local_unnamed_addr #2

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

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

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass