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

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

%struct.s2n_debug_info = type { ptr, ptr }
%struct.s2n_result = type { i32 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%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 }

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_post_handshake_process(ptr noundef, ptr noundef, i8 noundef zeroext) #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: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) #4

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

20:                                               ; preds = %1
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %55, label %23

23:                                               ; preds = %20
  br label %24

24:                                               ; preds = %23
  br label %25

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

34:                                               ; preds = %25
  %35 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %36 = getelementptr inbounds %struct.s2n_debug_info, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %37, i64 21
  %39 = call ptr @strrchr(ptr noundef %38, i32 noundef 47) #7
  %40 = getelementptr inbounds i8, ptr %39, i64 1
  br label %46

41:                                               ; preds = %25
  %42 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %43 = getelementptr inbounds %struct.s2n_debug_info, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %44, i64 21
  br label %46

46:                                               ; preds = %41, %34
  %47 = phi ptr [ %40, %34 ], [ %45, %41 ]
  %48 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %49 = getelementptr inbounds %struct.s2n_debug_info, ptr %48, i32 0, i32 1
  store ptr %47, ptr %49, align 8, !tbaa !11
  %50 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %50, align 4, !tbaa !12
  %51 = call i32 @s2n_calculate_stacktrace()
  br label %52

52:                                               ; preds = %46
  %53 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %53, align 4, !tbaa !14
  br label %594

54:                                               ; No predecessors!
  br label %55

55:                                               ; preds = %54, %20
  br label %56

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.s2n_connection, ptr %57, i32 0, i32 40
  store ptr %58, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.s2n_connection, ptr %59, i32 0, i32 93
  %61 = getelementptr inbounds %struct.s2n_post_handshake, ptr %60, i32 0, i32 0
  store ptr %61, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  store i8 0, ptr %6, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %62

62:                                               ; preds = %56
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = call i32 @s2n_stuffer_reread(ptr noundef %63)
  %65 = icmp sgt i32 %64, -1
  br i1 %65, label %68, label %66

66:                                               ; preds = %62
  %67 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %67, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

68:                                               ; preds = %62
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.s2n_stuffer, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.s2n_blob, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  %75 = icmp eq ptr %74, null
  br i1 %75, label %76, label %101

76:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 24, i1 false)
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.s2n_connection, ptr %78, i32 0, i32 93
  %80 = getelementptr inbounds %struct.s2n_post_handshake, ptr %79, i32 0, i32 1
  %81 = getelementptr inbounds [4 x i8], ptr %80, i64 0, i64 0
  %82 = call i32 @s2n_blob_init(ptr noundef %9, ptr noundef %81, i32 noundef 4)
  %83 = icmp sgt i32 %82, -1
  br i1 %83, label %86, label %84

84:                                               ; preds = %77
  %85 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %85, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %98

86:                                               ; preds = %77
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = call i32 @s2n_stuffer_init(ptr noundef %90, ptr noundef %9)
  %92 = icmp sgt i32 %91, -1
  br i1 %92, label %95, label %93

93:                                               ; preds = %89
  %94 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %94, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %98

95:                                               ; preds = %89
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  store i32 0, ptr %8, align 4
  br label %98

98:                                               ; preds = %97, %93, %84
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  %99 = load i32, ptr %8, align 4
  switch i32 %99, label %593 [
    i32 0, label %100
  ]

100:                                              ; preds = %98
  br label %101

101:                                              ; preds = %100, %70
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.s2n_stuffer, ptr %102, i32 0, i32 2
  %104 = load i32, ptr %103, align 4, !tbaa !20
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.s2n_stuffer, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 8, !tbaa !21
  %108 = sub i32 %104, %107
  %109 = icmp ult i32 %108, 4
  br i1 %109, label %110, label %154

110:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.s2n_stuffer, ptr %111, i32 0, i32 2
  %113 = load i32, ptr %112, align 4, !tbaa !20
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.s2n_stuffer, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 8, !tbaa !21
  %117 = sub i32 %113, %116
  %118 = sub i32 4, %117
  store i32 %118, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %119 = load i32, ptr %10, align 4, !tbaa !12
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.s2n_stuffer, ptr %120, i32 0, i32 2
  %122 = load i32, ptr %121, align 4, !tbaa !20
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.s2n_stuffer, ptr %123, i32 0, i32 1
  %125 = load i32, ptr %124, align 8, !tbaa !21
  %126 = sub i32 %122, %125
  %127 = icmp ult i32 %119, %126
  br i1 %127, label %128, label %130

128:                                              ; preds = %110
  %129 = load i32, ptr %10, align 4, !tbaa !12
  br label %138

130:                                              ; preds = %110
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.s2n_stuffer, ptr %131, i32 0, i32 2
  %133 = load i32, ptr %132, align 4, !tbaa !20
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.s2n_stuffer, ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 8, !tbaa !21
  %137 = sub i32 %133, %136
  br label %138

138:                                              ; preds = %130, %128
  %139 = phi i32 [ %129, %128 ], [ %137, %130 ]
  store i32 %139, ptr %11, align 4, !tbaa !12
  br label %140

140:                                              ; preds = %138
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = load i32, ptr %11, align 4, !tbaa !12
  %144 = call i32 @s2n_stuffer_copy(ptr noundef %141, ptr noundef %142, i32 noundef %143)
  %145 = icmp sgt i32 %144, -1
  br i1 %145, label %148, label %146

146:                                              ; preds = %140
  %147 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %147, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %151

148:                                              ; preds = %140
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  store i32 0, ptr %8, align 4
  br label %151

151:                                              ; preds = %150, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  %152 = load i32, ptr %8, align 4
  switch i32 %152, label %593 [
    i32 0, label %153
  ]

153:                                              ; preds = %151
  br label %154

154:                                              ; preds = %153, %101
  br label %155

155:                                              ; preds = %154
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.s2n_stuffer, ptr %156, i32 0, i32 2
  %158 = load i32, ptr %157, align 4, !tbaa !20
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.s2n_stuffer, ptr %159, i32 0, i32 1
  %161 = load i32, ptr %160, align 8, !tbaa !21
  %162 = sub i32 %158, %161
  %163 = icmp uge i32 %162, 4
  br i1 %163, label %198, label %164

164:                                              ; preds = %155
  br label %165

165:                                              ; preds = %164
  br label %166

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

175:                                              ; preds = %166
  %176 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %177 = getelementptr inbounds %struct.s2n_debug_info, ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !9
  %179 = getelementptr inbounds i8, ptr %178, i64 21
  %180 = call ptr @strrchr(ptr noundef %179, i32 noundef 47) #7
  %181 = getelementptr inbounds i8, ptr %180, i64 1
  br label %187

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

187:                                              ; preds = %182, %175
  %188 = phi ptr [ %181, %175 ], [ %186, %182 ]
  %189 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %190 = getelementptr inbounds %struct.s2n_debug_info, ptr %189, i32 0, i32 1
  store ptr %188, ptr %190, align 8, !tbaa !11
  %191 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 201326592, ptr %191, align 4, !tbaa !12
  %192 = call i32 @s2n_calculate_stacktrace()
  br label %193

193:                                              ; preds = %187
  br label %194

194:                                              ; preds = %193
  %195 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %195, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

196:                                              ; No predecessors!
  br label %197

197:                                              ; preds = %196
  br label %198

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

199:                                              ; preds = %198
  br label %200

200:                                              ; preds = %199
  br label %201

201:                                              ; preds = %200
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = call i32 @s2n_handshake_parse_header(ptr noundef %202, ptr noundef %6, ptr noundef %7)
  %204 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  store i32 %203, ptr %204, align 4
  %205 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  %206 = load i32, ptr %205, align 4
  %207 = call zeroext i1 @s2n_result_is_ok(i32 %206)
  br i1 %207, label %210, label %208

208:                                              ; preds = %201
  %209 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %209, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

210:                                              ; preds = %201
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %7, align 4, !tbaa !12
  %215 = icmp eq i32 %214, 0
  br i1 %215, label %259, label %216

216:                                              ; preds = %213
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.s2n_stuffer, ptr %217, i32 0, i32 2
  %219 = load i32, ptr %218, align 4, !tbaa !20
  %220 = load ptr, ptr %4, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.s2n_stuffer, ptr %220, i32 0, i32 1
  %222 = load i32, ptr %221, align 8, !tbaa !21
  %223 = sub i32 %219, %222
  %224 = icmp ne i32 %223, 0
  br i1 %224, label %259, label %225

225:                                              ; preds = %216
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226
  %228 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %229 = getelementptr inbounds %struct.s2n_debug_info, ptr %228, i32 0, i32 0
  store ptr @.str.5, ptr %229, align 8, !tbaa !9
  %230 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %231 = getelementptr inbounds %struct.s2n_debug_info, ptr %230, i32 0, i32 0
  %232 = load ptr, ptr %231, align 8, !tbaa !9
  %233 = getelementptr inbounds i8, ptr %232, i64 21
  %234 = call ptr @strrchr(ptr noundef %233, i32 noundef 47) #7
  %235 = icmp ne ptr %234, null
  br i1 %235, label %236, label %243

236:                                              ; preds = %227
  %237 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %238 = getelementptr inbounds %struct.s2n_debug_info, ptr %237, i32 0, i32 0
  %239 = load ptr, ptr %238, align 8, !tbaa !9
  %240 = getelementptr inbounds i8, ptr %239, i64 21
  %241 = call ptr @strrchr(ptr noundef %240, i32 noundef 47) #7
  %242 = getelementptr inbounds i8, ptr %241, i64 1
  br label %248

243:                                              ; preds = %227
  %244 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %245 = getelementptr inbounds %struct.s2n_debug_info, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !9
  %247 = getelementptr inbounds i8, ptr %246, i64 21
  br label %248

248:                                              ; preds = %243, %236
  %249 = phi ptr [ %242, %236 ], [ %247, %243 ]
  %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 1
  store ptr %249, ptr %251, align 8, !tbaa !11
  %252 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 201326592, ptr %252, align 4, !tbaa !12
  %253 = call i32 @s2n_calculate_stacktrace()
  br label %254

254:                                              ; preds = %248
  br label %255

255:                                              ; preds = %254
  %256 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %256, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

257:                                              ; No predecessors!
  br label %258

258:                                              ; preds = %257
  br label %259

259:                                              ; preds = %258, %216, %213
  br label %260

260:                                              ; preds = %259
  br label %261

261:                                              ; preds = %260
  br label %262

262:                                              ; preds = %261
  %263 = load i32, ptr %7, align 4, !tbaa !12
  %264 = icmp ule i32 %263, 65536
  br i1 %264, label %299, label %265

265:                                              ; preds = %262
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266
  %268 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %269 = getelementptr inbounds %struct.s2n_debug_info, ptr %268, i32 0, i32 0
  store ptr @.str.6, ptr %269, align 8, !tbaa !9
  %270 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %271 = getelementptr inbounds %struct.s2n_debug_info, ptr %270, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !9
  %273 = getelementptr inbounds i8, ptr %272, i64 21
  %274 = call ptr @strrchr(ptr noundef %273, i32 noundef 47) #7
  %275 = icmp ne ptr %274, null
  br i1 %275, label %276, label %283

276:                                              ; preds = %267
  %277 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %278 = getelementptr inbounds %struct.s2n_debug_info, ptr %277, i32 0, i32 0
  %279 = load ptr, ptr %278, align 8, !tbaa !9
  %280 = getelementptr inbounds i8, ptr %279, i64 21
  %281 = call ptr @strrchr(ptr noundef %280, i32 noundef 47) #7
  %282 = getelementptr inbounds i8, ptr %281, i64 1
  br label %288

283:                                              ; preds = %267
  %284 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %285 = getelementptr inbounds %struct.s2n_debug_info, ptr %284, i32 0, i32 0
  %286 = load ptr, ptr %285, align 8, !tbaa !9
  %287 = getelementptr inbounds i8, ptr %286, i64 21
  br label %288

288:                                              ; preds = %283, %276
  %289 = phi ptr [ %282, %276 ], [ %287, %283 ]
  %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 1
  store ptr %289, ptr %291, align 8, !tbaa !11
  %292 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %292, align 4, !tbaa !12
  %293 = call i32 @s2n_calculate_stacktrace()
  br label %294

294:                                              ; preds = %288
  br label %295

295:                                              ; preds = %294
  %296 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %296, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

297:                                              ; No predecessors!
  br label %298

298:                                              ; preds = %297
  br label %299

299:                                              ; preds = %298, %262
  br label %300

300:                                              ; preds = %299
  br label %301

301:                                              ; preds = %300
  %302 = load ptr, ptr %5, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.s2n_stuffer, ptr %302, i32 0, i32 2
  %304 = load i32, ptr %303, align 4, !tbaa !20
  %305 = load ptr, ptr %5, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.s2n_stuffer, ptr %305, i32 0, i32 1
  %307 = load i32, ptr %306, align 8, !tbaa !21
  %308 = sub i32 %304, %307
  %309 = icmp eq i32 %308, 0
  br i1 %309, label %310, label %365

310:                                              ; preds = %301
  %311 = load ptr, ptr %4, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.s2n_stuffer, ptr %311, i32 0, i32 2
  %313 = load i32, ptr %312, align 4, !tbaa !20
  %314 = load ptr, ptr %4, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.s2n_stuffer, ptr %314, i32 0, i32 1
  %316 = load i32, ptr %315, align 8, !tbaa !21
  %317 = sub i32 %313, %316
  %318 = load i32, ptr %7, align 4, !tbaa !12
  %319 = icmp uge i32 %317, %318
  br i1 %319, label %320, label %365

320:                                              ; preds = %310
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #8
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 24, i1 false)
  br label %321

321:                                              ; preds = %320
  %322 = load ptr, ptr %4, align 8, !tbaa !5
  %323 = load i32, ptr %7, align 4, !tbaa !12
  %324 = call ptr @s2n_stuffer_raw_read(ptr noundef %322, i32 noundef %323)
  %325 = load i32, ptr %7, align 4, !tbaa !12
  %326 = call i32 @s2n_blob_init(ptr noundef %14, ptr noundef %324, i32 noundef %325)
  %327 = icmp sgt i32 %326, -1
  br i1 %327, label %330, label %328

328:                                              ; preds = %321
  %329 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %329, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %364

330:                                              ; preds = %321
  br label %331

331:                                              ; preds = %330
  br label %332

332:                                              ; preds = %331
  br label %333

333:                                              ; preds = %332
  %334 = call i32 @s2n_stuffer_init(ptr noundef %13, ptr noundef %14)
  %335 = icmp sgt i32 %334, -1
  br i1 %335, label %338, label %336

336:                                              ; preds = %333
  %337 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %337, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %364

338:                                              ; preds = %333
  br label %339

339:                                              ; preds = %338
  br label %340

340:                                              ; preds = %339
  br label %341

341:                                              ; preds = %340
  %342 = load i32, ptr %7, align 4, !tbaa !12
  %343 = call i32 @s2n_stuffer_skip_write(ptr noundef %13, i32 noundef %342)
  %344 = icmp sgt i32 %343, -1
  br i1 %344, label %347, label %345

345:                                              ; preds = %341
  %346 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %346, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %364

347:                                              ; preds = %341
  br label %348

348:                                              ; preds = %347
  br label %349

349:                                              ; preds = %348
  br label %350

350:                                              ; preds = %349
  %351 = load ptr, ptr %3, align 8, !tbaa !5
  %352 = load i8, ptr %6, align 1, !tbaa !16
  %353 = call i32 @s2n_post_handshake_process(ptr noundef %351, ptr noundef %13, i8 noundef zeroext %352)
  %354 = getelementptr inbounds %struct.s2n_result, ptr %15, i32 0, i32 0
  store i32 %353, ptr %354, align 4
  %355 = getelementptr inbounds %struct.s2n_result, ptr %15, i32 0, i32 0
  %356 = load i32, ptr %355, align 4
  %357 = call zeroext i1 @s2n_result_is_ok(i32 %356)
  br i1 %357, label %360, label %358

358:                                              ; preds = %350
  %359 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %359, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %364

360:                                              ; preds = %350
  br label %361

361:                                              ; preds = %360
  br label %362

362:                                              ; preds = %361
  %363 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 0, ptr %363, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %364

364:                                              ; preds = %362, %358, %345, %336, %328
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #8
  br label %593

365:                                              ; preds = %310, %301
  %366 = load ptr, ptr %5, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.s2n_stuffer, ptr %366, i32 0, i32 0
  %368 = getelementptr inbounds %struct.s2n_blob, ptr %367, i32 0, i32 1
  %369 = load i32, ptr %368, align 8, !tbaa !22
  %370 = load ptr, ptr %5, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.s2n_stuffer, ptr %370, i32 0, i32 2
  %372 = load i32, ptr %371, align 4, !tbaa !20
  %373 = sub i32 %369, %372
  %374 = load i32, ptr %7, align 4, !tbaa !12
  %375 = icmp ult i32 %373, %374
  br i1 %375, label %376, label %475

376:                                              ; preds = %365
  br label %377

377:                                              ; preds = %376
  %378 = load ptr, ptr %3, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.s2n_connection, ptr %378, i32 0, i32 13
  %380 = load i32, ptr %379, align 4, !tbaa !23
  %381 = icmp eq i32 %380, 1
  br i1 %381, label %416, label %382

382:                                              ; preds = %377
  br label %383

383:                                              ; preds = %382
  br label %384

384:                                              ; preds = %383
  %385 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %386 = getelementptr inbounds %struct.s2n_debug_info, ptr %385, i32 0, i32 0
  store ptr @.str.7, ptr %386, align 8, !tbaa !9
  %387 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %388 = getelementptr inbounds %struct.s2n_debug_info, ptr %387, i32 0, i32 0
  %389 = load ptr, ptr %388, align 8, !tbaa !9
  %390 = getelementptr inbounds i8, ptr %389, i64 21
  %391 = call ptr @strrchr(ptr noundef %390, i32 noundef 47) #7
  %392 = icmp ne ptr %391, null
  br i1 %392, label %393, label %400

393:                                              ; preds = %384
  %394 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %395 = getelementptr inbounds %struct.s2n_debug_info, ptr %394, i32 0, i32 0
  %396 = load ptr, ptr %395, align 8, !tbaa !9
  %397 = getelementptr inbounds i8, ptr %396, i64 21
  %398 = call ptr @strrchr(ptr noundef %397, i32 noundef 47) #7
  %399 = getelementptr inbounds i8, ptr %398, i64 1
  br label %405

400:                                              ; preds = %384
  %401 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %402 = getelementptr inbounds %struct.s2n_debug_info, ptr %401, i32 0, i32 0
  %403 = load ptr, ptr %402, align 8, !tbaa !9
  %404 = getelementptr inbounds i8, ptr %403, i64 21
  br label %405

405:                                              ; preds = %400, %393
  %406 = phi ptr [ %399, %393 ], [ %404, %400 ]
  %407 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %408 = getelementptr inbounds %struct.s2n_debug_info, ptr %407, i32 0, i32 1
  store ptr %406, ptr %408, align 8, !tbaa !11
  %409 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %409, align 4, !tbaa !12
  %410 = call i32 @s2n_calculate_stacktrace()
  br label %411

411:                                              ; preds = %405
  br label %412

412:                                              ; preds = %411
  %413 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %413, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

414:                                              ; No predecessors!
  br label %415

415:                                              ; preds = %414
  br label %416

416:                                              ; preds = %415, %377
  br label %417

417:                                              ; preds = %416
  br label %418

418:                                              ; preds = %417
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %419 = load i32, ptr %7, align 4, !tbaa !12
  %420 = add i32 %419, 4
  store i32 %420, ptr %16, align 4, !tbaa !12
  %421 = load ptr, ptr %5, align 8, !tbaa !5
  %422 = getelementptr inbounds %struct.s2n_stuffer, ptr %421, i32 0, i32 4
  %423 = load i8, ptr %422, align 4
  %424 = and i8 %423, 1
  %425 = zext i8 %424 to i32
  %426 = icmp ne i32 %425, 0
  br i1 %426, label %427, label %438

427:                                              ; preds = %418
  br label %428

428:                                              ; preds = %427
  %429 = load ptr, ptr %5, align 8, !tbaa !5
  %430 = load i32, ptr %16, align 4, !tbaa !12
  %431 = call i32 @s2n_stuffer_resize(ptr noundef %429, i32 noundef %430)
  %432 = icmp sgt i32 %431, -1
  br i1 %432, label %435, label %433

433:                                              ; preds = %428
  %434 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %434, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %472

435:                                              ; preds = %428
  br label %436

436:                                              ; preds = %435
  br label %437

437:                                              ; preds = %436
  br label %471

438:                                              ; preds = %418
  br label %439

439:                                              ; preds = %438
  %440 = load ptr, ptr %5, align 8, !tbaa !5
  %441 = load i32, ptr %16, align 4, !tbaa !12
  %442 = call i32 @s2n_stuffer_growable_alloc(ptr noundef %440, i32 noundef %441)
  %443 = icmp sgt i32 %442, -1
  br i1 %443, label %446, label %444

444:                                              ; preds = %439
  %445 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %445, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %472

446:                                              ; preds = %439
  br label %447

447:                                              ; preds = %446
  br label %448

448:                                              ; preds = %447
  br label %449

449:                                              ; preds = %448
  %450 = load ptr, ptr %5, align 8, !tbaa !5
  %451 = load ptr, ptr %3, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct.s2n_connection, ptr %451, i32 0, i32 93
  %453 = getelementptr inbounds %struct.s2n_post_handshake, ptr %452, i32 0, i32 1
  %454 = getelementptr inbounds [4 x i8], ptr %453, i64 0, i64 0
  %455 = call i32 @s2n_stuffer_write_bytes(ptr noundef %450, ptr noundef %454, i32 noundef 4)
  %456 = icmp sgt i32 %455, -1
  br i1 %456, label %459, label %457

457:                                              ; preds = %449
  %458 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %458, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %472

459:                                              ; preds = %449
  br label %460

460:                                              ; preds = %459
  br label %461

461:                                              ; preds = %460
  br label %462

462:                                              ; preds = %461
  %463 = load ptr, ptr %5, align 8, !tbaa !5
  %464 = call i32 @s2n_stuffer_skip_read(ptr noundef %463, i32 noundef 4)
  %465 = icmp sgt i32 %464, -1
  br i1 %465, label %468, label %466

466:                                              ; preds = %462
  %467 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %467, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %472

468:                                              ; preds = %462
  br label %469

469:                                              ; preds = %468
  br label %470

470:                                              ; preds = %469
  br label %471

471:                                              ; preds = %470, %437
  store i32 0, ptr %8, align 4
  br label %472

472:                                              ; preds = %471, %466, %457, %444, %433
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  %473 = load i32, ptr %8, align 4
  switch i32 %473, label %593 [
    i32 0, label %474
  ]

474:                                              ; preds = %472
  br label %475

475:                                              ; preds = %474, %365
  %476 = load ptr, ptr %5, align 8, !tbaa !5
  %477 = getelementptr inbounds %struct.s2n_stuffer, ptr %476, i32 0, i32 2
  %478 = load i32, ptr %477, align 4, !tbaa !20
  %479 = load ptr, ptr %5, align 8, !tbaa !5
  %480 = getelementptr inbounds %struct.s2n_stuffer, ptr %479, i32 0, i32 1
  %481 = load i32, ptr %480, align 8, !tbaa !21
  %482 = sub i32 %478, %481
  %483 = load i32, ptr %7, align 4, !tbaa !12
  %484 = icmp ult i32 %482, %483
  br i1 %484, label %485, label %530

485:                                              ; preds = %475
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %486 = load i32, ptr %7, align 4, !tbaa !12
  %487 = load ptr, ptr %5, align 8, !tbaa !5
  %488 = getelementptr inbounds %struct.s2n_stuffer, ptr %487, i32 0, i32 2
  %489 = load i32, ptr %488, align 4, !tbaa !20
  %490 = load ptr, ptr %5, align 8, !tbaa !5
  %491 = getelementptr inbounds %struct.s2n_stuffer, ptr %490, i32 0, i32 1
  %492 = load i32, ptr %491, align 8, !tbaa !21
  %493 = sub i32 %489, %492
  %494 = sub i32 %486, %493
  store i32 %494, ptr %17, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %495 = load i32, ptr %17, align 4, !tbaa !12
  %496 = load ptr, ptr %4, align 8, !tbaa !5
  %497 = getelementptr inbounds %struct.s2n_stuffer, ptr %496, i32 0, i32 2
  %498 = load i32, ptr %497, align 4, !tbaa !20
  %499 = load ptr, ptr %4, align 8, !tbaa !5
  %500 = getelementptr inbounds %struct.s2n_stuffer, ptr %499, i32 0, i32 1
  %501 = load i32, ptr %500, align 8, !tbaa !21
  %502 = sub i32 %498, %501
  %503 = icmp ult i32 %495, %502
  br i1 %503, label %504, label %506

504:                                              ; preds = %485
  %505 = load i32, ptr %17, align 4, !tbaa !12
  br label %514

506:                                              ; preds = %485
  %507 = load ptr, ptr %4, align 8, !tbaa !5
  %508 = getelementptr inbounds %struct.s2n_stuffer, ptr %507, i32 0, i32 2
  %509 = load i32, ptr %508, align 4, !tbaa !20
  %510 = load ptr, ptr %4, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct.s2n_stuffer, ptr %510, i32 0, i32 1
  %512 = load i32, ptr %511, align 8, !tbaa !21
  %513 = sub i32 %509, %512
  br label %514

514:                                              ; preds = %506, %504
  %515 = phi i32 [ %505, %504 ], [ %513, %506 ]
  store i32 %515, ptr %18, align 4, !tbaa !12
  br label %516

516:                                              ; preds = %514
  %517 = load ptr, ptr %4, align 8, !tbaa !5
  %518 = load ptr, ptr %5, align 8, !tbaa !5
  %519 = load i32, ptr %18, align 4, !tbaa !12
  %520 = call i32 @s2n_stuffer_copy(ptr noundef %517, ptr noundef %518, i32 noundef %519)
  %521 = icmp sgt i32 %520, -1
  br i1 %521, label %524, label %522

522:                                              ; preds = %516
  %523 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %523, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %527

524:                                              ; preds = %516
  br label %525

525:                                              ; preds = %524
  br label %526

526:                                              ; preds = %525
  store i32 0, ptr %8, align 4
  br label %527

527:                                              ; preds = %526, %522
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  %528 = load i32, ptr %8, align 4
  switch i32 %528, label %593 [
    i32 0, label %529
  ]

529:                                              ; preds = %527
  br label %530

530:                                              ; preds = %529, %475
  br label %531

531:                                              ; preds = %530
  %532 = load ptr, ptr %5, align 8, !tbaa !5
  %533 = getelementptr inbounds %struct.s2n_stuffer, ptr %532, i32 0, i32 2
  %534 = load i32, ptr %533, align 4, !tbaa !20
  %535 = load ptr, ptr %5, align 8, !tbaa !5
  %536 = getelementptr inbounds %struct.s2n_stuffer, ptr %535, i32 0, i32 1
  %537 = load i32, ptr %536, align 8, !tbaa !21
  %538 = sub i32 %534, %537
  %539 = load i32, ptr %7, align 4, !tbaa !12
  %540 = icmp eq i32 %538, %539
  br i1 %540, label %575, label %541

541:                                              ; preds = %531
  br label %542

542:                                              ; preds = %541
  br label %543

543:                                              ; preds = %542
  %544 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %545 = getelementptr inbounds %struct.s2n_debug_info, ptr %544, i32 0, i32 0
  store ptr @.str.8, ptr %545, align 8, !tbaa !9
  %546 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %547 = getelementptr inbounds %struct.s2n_debug_info, ptr %546, i32 0, i32 0
  %548 = load ptr, ptr %547, align 8, !tbaa !9
  %549 = getelementptr inbounds i8, ptr %548, i64 21
  %550 = call ptr @strrchr(ptr noundef %549, i32 noundef 47) #7
  %551 = icmp ne ptr %550, null
  br i1 %551, label %552, label %559

552:                                              ; preds = %543
  %553 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %554 = getelementptr inbounds %struct.s2n_debug_info, ptr %553, i32 0, i32 0
  %555 = load ptr, ptr %554, align 8, !tbaa !9
  %556 = getelementptr inbounds i8, ptr %555, i64 21
  %557 = call ptr @strrchr(ptr noundef %556, i32 noundef 47) #7
  %558 = getelementptr inbounds i8, ptr %557, i64 1
  br label %564

559:                                              ; preds = %543
  %560 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %561 = getelementptr inbounds %struct.s2n_debug_info, ptr %560, i32 0, i32 0
  %562 = load ptr, ptr %561, align 8, !tbaa !9
  %563 = getelementptr inbounds i8, ptr %562, i64 21
  br label %564

564:                                              ; preds = %559, %552
  %565 = phi ptr [ %558, %552 ], [ %563, %559 ]
  %566 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %567 = getelementptr inbounds %struct.s2n_debug_info, ptr %566, i32 0, i32 1
  store ptr %565, ptr %567, align 8, !tbaa !11
  %568 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 201326592, ptr %568, align 4, !tbaa !12
  %569 = call i32 @s2n_calculate_stacktrace()
  br label %570

570:                                              ; preds = %564
  br label %571

571:                                              ; preds = %570
  %572 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %572, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

573:                                              ; No predecessors!
  br label %574

574:                                              ; preds = %573
  br label %575

575:                                              ; preds = %574, %531
  br label %576

576:                                              ; preds = %575
  br label %577

577:                                              ; preds = %576
  br label %578

578:                                              ; preds = %577
  %579 = load ptr, ptr %3, align 8, !tbaa !5
  %580 = load ptr, ptr %5, align 8, !tbaa !5
  %581 = load i8, ptr %6, align 1, !tbaa !16
  %582 = call i32 @s2n_post_handshake_process(ptr noundef %579, ptr noundef %580, i8 noundef zeroext %581)
  %583 = getelementptr inbounds %struct.s2n_result, ptr %19, i32 0, i32 0
  store i32 %582, ptr %583, align 4
  %584 = getelementptr inbounds %struct.s2n_result, ptr %19, i32 0, i32 0
  %585 = load i32, ptr %584, align 4
  %586 = call zeroext i1 @s2n_result_is_ok(i32 %585)
  br i1 %586, label %589, label %587

587:                                              ; preds = %578
  %588 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 -1, ptr %588, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

589:                                              ; preds = %578
  br label %590

590:                                              ; preds = %589
  br label %591

591:                                              ; preds = %590
  %592 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  store i32 0, ptr %592, align 4, !tbaa !14
  store i32 1, ptr %8, align 4
  br label %593

593:                                              ; preds = %591, %587, %571, %527, %472, %412, %364, %295, %255, %208, %194, %151, %98, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %594

594:                                              ; preds = %593, %52
  %595 = getelementptr inbounds %struct.s2n_result, ptr %2, i32 0, i32 0
  %596 = load i32, ptr %595, align 4
  ret i32 %596
}

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

declare i32 @s2n_stuffer_reread(ptr 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_init(ptr noundef, ptr noundef) #3

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

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

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

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

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

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

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

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

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

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


; 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 }
%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.3 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [95 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_post_handshake_process(ptr noundef, ptr noundef, i8 noundef zeroext) 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: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_post_handshake_message_recv(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca i8, align 1
  %3 = alloca i32, align 4
  %4 = alloca %struct.s2n_blob, align 8
  %5 = alloca %struct.s2n_stuffer, align 8
  %6 = alloca %struct.s2n_blob, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %15

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

15:                                               ; preds = %1
  %16 = getelementptr inbounds i8, ptr %0, i64 1856
  %17 = getelementptr inbounds i8, ptr %0, i64 4128
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #9
  store i8 0, ptr %2, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 0, ptr %3, align 4, !tbaa !11
  %18 = tail call i32 @s2n_stuffer_reread(ptr noundef nonnull %17) #9
  %19 = icmp sgt i32 %18, -1
  br i1 %19, label %20, label %174

20:                                               ; preds = %15
  %21 = load ptr, ptr %17, align 8, !tbaa !14
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %30

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  %24 = getelementptr inbounds i8, ptr %0, i64 4168
  %25 = call i32 @s2n_blob_init(ptr noundef nonnull %4, ptr noundef nonnull %24, i32 noundef 4) #9
  %26 = icmp sgt i32 %25, -1
  br i1 %26, label %27, label %.critedge

27:                                               ; preds = %23
  %28 = call i32 @s2n_stuffer_init(ptr noundef nonnull %17, ptr noundef nonnull %4) #9
  %29 = icmp sgt i32 %28, -1
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  br i1 %29, label %30, label %174

30:                                               ; preds = %27, %20
  %31 = getelementptr inbounds i8, ptr %0, i64 4156
  %32 = load i32, ptr %31, align 4, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %0, i64 4152
  %34 = load i32, ptr %33, align 8, !tbaa !18
  %35 = sub i32 %32, %34
  %36 = icmp ult i32 %35, 4
  br i1 %36, label %37, label %.thread108

37:                                               ; preds = %30
  %38 = sub nuw nsw i32 4, %35
  %39 = getelementptr inbounds i8, ptr %0, i64 1884
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %0, i64 1880
  %42 = load i32, ptr %41, align 8, !tbaa !18
  %43 = sub i32 %40, %42
  %.93 = call i32 @llvm.umin.i32(i32 %38, i32 %43)
  %44 = call i32 @s2n_stuffer_copy(ptr noundef nonnull %16, ptr noundef nonnull %17, i32 noundef %.93) #9
  %45 = icmp sgt i32 %44, -1
  br i1 %45, label %46, label %174

46:                                               ; preds = %37
  %.pre = load i32, ptr %31, align 4, !tbaa !17
  %.pre100 = load i32, ptr %33, align 8, !tbaa !18
  %.pre105 = sub i32 %.pre, %.pre100
  %47 = icmp ugt i32 %.pre105, 3
  br i1 %47, label %.thread108, label %48

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

.thread108:                                       ; preds = %30, %46
  %56 = call i32 @s2n_handshake_parse_header(ptr noundef nonnull %17, ptr noundef nonnull %2, ptr noundef nonnull %3) #9
  %57 = call zeroext i1 @s2n_result_is_ok(i32 %56)
  br i1 %57, label %58, label %174

58:                                               ; preds = %.thread108
  %59 = load i32, ptr %3, align 4, !tbaa !11
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %.thread, label %61

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %0, i64 1884
  %63 = load i32, ptr %62, align 4, !tbaa !17
  %64 = getelementptr inbounds i8, ptr %0, i64 1880
  %65 = load i32, ptr %64, align 8, !tbaa !18
  %.not86 = icmp eq i32 %63, %65
  br i1 %.not86, label %66, label %74

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

74:                                               ; preds = %61
  %75 = icmp ult i32 %59, 65537
  br i1 %75, label %.thread, label %76

76:                                               ; preds = %74
  %77 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.6, ptr %77, align 8, !tbaa !5
  %78 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.6, i64 21), i32 noundef 47) #8
  %.not88 = icmp eq ptr %78, null
  %79 = getelementptr inbounds i8, ptr %78, i64 1
  %80 = select i1 %.not88, ptr getelementptr inbounds (i8, ptr @.str.6, i64 21), ptr %79
  %81 = getelementptr inbounds i8, ptr %77, i64 8
  store ptr %80, ptr %81, align 8, !tbaa !10
  %82 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %82, align 4, !tbaa !11
  %83 = call i32 @s2n_calculate_stacktrace() #9
  br label %174

.thread:                                          ; preds = %58, %74
  %84 = load i32, ptr %31, align 4, !tbaa !17
  %85 = load i32, ptr %33, align 8, !tbaa !18
  %86 = icmp eq i32 %84, %85
  br i1 %86, label %87, label %110

87:                                               ; preds = %.thread
  %88 = getelementptr inbounds i8, ptr %0, i64 1884
  %89 = load i32, ptr %88, align 4, !tbaa !17
  %90 = getelementptr inbounds i8, ptr %0, i64 1880
  %91 = load i32, ptr %90, align 8, !tbaa !18
  %92 = sub i32 %89, %91
  %.not89 = icmp ult i32 %92, %59
  br i1 %.not89, label %110, label %93

93:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %5, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  %94 = call ptr @s2n_stuffer_raw_read(ptr noundef nonnull %16, i32 noundef %59) #9
  %95 = load i32, ptr %3, align 4, !tbaa !11
  %96 = call i32 @s2n_blob_init(ptr noundef nonnull %6, ptr noundef %94, i32 noundef %95) #9
  %97 = icmp sgt i32 %96, -1
  br i1 %97, label %98, label %109

98:                                               ; preds = %93
  %99 = call i32 @s2n_stuffer_init(ptr noundef nonnull %5, ptr noundef nonnull %6) #9
  %100 = icmp sgt i32 %99, -1
  br i1 %100, label %101, label %109

101:                                              ; preds = %98
  %102 = load i32, ptr %3, align 4, !tbaa !11
  %103 = call i32 @s2n_stuffer_skip_write(ptr noundef nonnull %5, i32 noundef %102) #9
  %104 = icmp sgt i32 %103, -1
  br i1 %104, label %105, label %109

105:                                              ; preds = %101
  %106 = load i8, ptr %2, align 1, !tbaa !13
  %107 = call i32 @s2n_post_handshake_process(ptr noundef nonnull %0, ptr noundef nonnull %5, i8 noundef zeroext %106)
  %108 = call zeroext i1 @s2n_result_is_ok(i32 %107)
  %not. = xor i1 %108, true
  %.94 = sext i1 %not. to i32
  br label %109

109:                                              ; preds = %105, %101, %98, %93
  %.sroa.067.4 = phi i32 [ -1, %93 ], [ -1, %98 ], [ -1, %101 ], [ %.94, %105 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #9
  br label %174

110:                                              ; preds = %87, %.thread
  %111 = getelementptr inbounds i8, ptr %0, i64 4136
  %112 = load i32, ptr %111, align 8, !tbaa !19
  %113 = sub i32 %112, %84
  %114 = icmp ult i32 %113, %59
  br i1 %114, label %115, label %.critedge96

115:                                              ; preds = %110
  %116 = getelementptr inbounds i8, ptr %0, i64 148
  %117 = load i32, ptr %116, align 4, !tbaa !20
  %118 = icmp eq i32 %117, 1
  br i1 %118, label %127, label %119

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

127:                                              ; preds = %115
  %128 = add nuw nsw i32 %59, 4
  %129 = getelementptr inbounds i8, ptr %0, i64 4164
  %130 = load i8, ptr %129, align 4
  %131 = and i8 %130, 1
  %.not91 = icmp eq i8 %131, 0
  br i1 %.not91, label %135, label %132

132:                                              ; preds = %127
  %133 = call i32 @s2n_stuffer_resize(ptr noundef nonnull %17, i32 noundef %128) #9
  %134 = icmp sgt i32 %133, -1
  br i1 %134, label %.critedge96, label %174

135:                                              ; preds = %127
  %136 = call i32 @s2n_stuffer_growable_alloc(ptr noundef nonnull %17, i32 noundef %128) #9
  %137 = icmp sgt i32 %136, -1
  br i1 %137, label %138, label %174

138:                                              ; preds = %135
  %139 = getelementptr inbounds i8, ptr %0, i64 4168
  %140 = call i32 @s2n_stuffer_write_bytes(ptr noundef nonnull %17, ptr noundef nonnull %139, i32 noundef 4) #9
  %141 = icmp sgt i32 %140, -1
  br i1 %141, label %142, label %174

142:                                              ; preds = %138
  %143 = call i32 @s2n_stuffer_skip_read(ptr noundef nonnull %17, i32 noundef 4) #9
  %144 = icmp sgt i32 %143, -1
  br i1 %144, label %.critedge96, label %174

.critedge96:                                      ; preds = %132, %142, %110
  %145 = load i32, ptr %31, align 4, !tbaa !17
  %146 = load i32, ptr %33, align 8, !tbaa !18
  %147 = sub i32 %145, %146
  %148 = load i32, ptr %3, align 4, !tbaa !11
  %149 = icmp ult i32 %147, %148
  br i1 %149, label %150, label %159

150:                                              ; preds = %.critedge96
  %151 = sub i32 %148, %147
  %152 = getelementptr inbounds i8, ptr %0, i64 1884
  %153 = load i32, ptr %152, align 4, !tbaa !17
  %154 = getelementptr inbounds i8, ptr %0, i64 1880
  %155 = load i32, ptr %154, align 8, !tbaa !18
  %156 = sub i32 %153, %155
  %.97 = call i32 @llvm.umin.i32(i32 %151, i32 %156)
  %157 = call i32 @s2n_stuffer_copy(ptr noundef nonnull %16, ptr noundef nonnull %17, i32 noundef %.97) #9
  %158 = icmp sgt i32 %157, -1
  br i1 %158, label %._crit_edge101, label %174

._crit_edge101:                                   ; preds = %150
  %.pre102 = load i32, ptr %31, align 4, !tbaa !17
  %.pre103 = load i32, ptr %33, align 8, !tbaa !18
  %.pre104 = load i32, ptr %3, align 4, !tbaa !11
  %.pre106 = sub i32 %.pre102, %.pre103
  br label %159

159:                                              ; preds = %._crit_edge101, %.critedge96
  %.pre-phi107 = phi i32 [ %.pre106, %._crit_edge101 ], [ %147, %.critedge96 ]
  %160 = phi i32 [ %.pre104, %._crit_edge101 ], [ %148, %.critedge96 ]
  %161 = icmp eq i32 %.pre-phi107, %160
  br i1 %161, label %170, label %162

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

170:                                              ; preds = %159
  %171 = load i8, ptr %2, align 1, !tbaa !13
  %172 = call i32 @s2n_post_handshake_process(ptr noundef nonnull %0, ptr noundef nonnull %17, i8 noundef zeroext %171)
  %173 = call zeroext i1 @s2n_result_is_ok(i32 %172)
  %not.99 = xor i1 %173, true
  %.98 = sext i1 %not.99 to i32
  br label %174

.critedge:                                        ; preds = %23
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  br label %174

174:                                              ; preds = %170, %132, %135, %138, %142, %.thread108, %.critedge, %15, %27, %37, %150, %162, %119, %109, %76, %66, %48
  %.sroa.067.8 = phi i32 [ %.sroa.067.4, %109 ], [ -1, %162 ], [ -1, %150 ], [ -1, %119 ], [ -1, %76 ], [ -1, %66 ], [ -1, %48 ], [ -1, %37 ], [ -1, %27 ], [ -1, %15 ], [ -1, %.critedge ], [ -1, %.thread108 ], [ -1, %142 ], [ -1, %138 ], [ -1, %135 ], [ -1, %132 ], [ %.98, %170 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #9
  br label %175

175:                                              ; preds = %174, %7
  %.sroa.067.9 = phi i32 [ %.sroa.067.8, %174 ], [ -1, %7 ]
  ret i32 %.sroa.067.9
}

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

declare i32 @s2n_stuffer_reread(ptr 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_init(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

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

declare i32 @s2n_stuffer_resize(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_write_bytes(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.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 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !7, i64 0}
!15 = !{!"s2n_stuffer", !16, i64 0, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 36, !12, i64 36}
!16 = !{!"s2n_blob", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!17 = !{!15, !12, i64 28}
!18 = !{!15, !12, i64 24}
!19 = !{!15, !12, i64 8}
!20 = !{!21, !12, i64 148}
!21 = !{!"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, !22, i64 160, !23, i64 168, !23, 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, !24, i64 240, !7, i64 632, !7, i64 640, !25, i64 648, !31, i64 1144, !34, i64 1688, !7, i64 1752, !8, i64 1760, !12, i64 1764, !8, i64 1768, !15, i64 1776, !15, i64 1816, !15, i64 1856, !15, i64 1896, !12, i64 1936, !23, i64 1944, !8, i64 1952, !15, i64 1960, !8, i64 2000, !8, i64 2001, !8, i64 2002, !30, i64 2003, !37, i64 2004, !37, i64 2008, !38, i64 2016, !36, i64 2208, !12, i64 2212, !36, i64 2216, !23, i64 2224, !8, i64 2232, !23, i64 2240, !23, i64 2248, !23, i64 2256, !37, i64 2264, !37, i64 2268, !8, i64 2272, !8, i64 2528, !12, i64 2784, !16, i64 2792, !12, i64 2816, !16, i64 2824, !16, i64 2848, !16, i64 2872, !40, i64 2896, !42, i64 3704, !7, i64 3760, !7, i64 3768, !8, i64 3776, !12, i64 3780, !16, i64 3784, !12, i64 3808, !44, i64 3816, !8, i64 3848, !15, i64 3992, !16, i64 4032, !16, i64 4056, !30, i64 4080, !30, i64 4081, !30, i64 4082, !36, i64 4084, !36, i64 4086, !12, i64 4088, !12, i64 4092, !16, i64 4096, !12, i64 4120, !45, i64 4128, !37, i64 4176, !8, i64 4180, !8, i64 4181}
!22 = !{!"s2n_timer", !23, i64 0}
!23 = !{!"long", !8, i64 0}
!24 = !{!"s2n_secrets", !8, i64 0, !12, i64 388}
!25 = !{!"s2n_kex_parameters", !26, i64 0, !27, i64 8, !8, i64 24, !27, i64 56, !28, i64 72, !28, i64 184, !8, i64 296, !29, i64 360, !16, i64 448, !16, i64 472}
!26 = !{!"s2n_dh_params", !7, i64 0}
!27 = !{!"s2n_ecc_evp_params", !7, i64 0, !7, i64 8}
!28 = !{!"s2n_kem_group_params", !7, i64 0, !29, i64 8, !27, i64 96}
!29 = !{!"s2n_kem_params", !7, i64 0, !16, i64 8, !16, i64 32, !16, i64 56, !30, i64 80}
!30 = !{!"_Bool", !8, i64 0}
!31 = !{!"s2n_handshake_parameters", !32, i64 0, !32, i64 48, !16, i64 96, !12, i64 120, !33, 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}
!32 = !{!"s2n_pkey", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!33 = !{!"s2n_sig_scheme_list", !8, i64 0, !8, i64 256}
!34 = !{!"s2n_psk_parameters", !12, i64 0, !35, i64 8, !36, i64 40, !36, i64 42, !7, i64 48, !12, i64 56}
!35 = !{!"s2n_array", !16, i64 0, !12, i64 24, !12, i64 28}
!36 = !{!"short", !8, i64 0}
!37 = !{!"", !12, i64 0}
!38 = !{!"s2n_handshake", !15, 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, !39, i64 176, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 188}
!39 = !{!"s2n_offered_early_data", !7, i64 0}
!40 = !{!"s2n_client_hello", !16, i64 0, !41, i64 24, !16, i64 728, !16, i64 752, !16, 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}
!41 = !{!"", !8, i64 0, !16, i64 672, !36, i64 696}
!42 = !{!"s2n_x509_validator", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 17, !36, i64 18, !7, i64 24, !12, i64 32, !7, i64 40, !43, i64 48, !30, i64 52}
!43 = !{!"s2n_cert_validation_info", !12, i64 0, !12, i64 0}
!44 = !{!"s2n_ticket_fields", !16, i64 0, !12, i64 24}
!45 = !{!"s2n_post_handshake", !15, i64 0, !8, i64 40}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass