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

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

%struct.s2n_debug_info = type { ptr, ptr }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_result = type { i32 }
%struct.s2n_pkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.s2n_connection = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [22 x i8], [22 x i8], [22 x i8], i32, i32, %struct.s2n_timer, i64, i64, [32 x i8], i8, i8, i8, i8, i8, i8, i8, ptr, ptr, %struct.s2n_secrets, ptr, ptr, %struct.s2n_kex_parameters, %struct.s2n_handshake_parameters, %struct.s2n_psk_parameters, ptr, i8, i32, [5 x i8], %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, i32, i64, [2 x i8], %struct.s2n_stuffer, i8, i8, i8, i8, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, %struct.s2n_handshake, i16, i32, i16, i64, i8, i64, i64, i64, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, [256 x i8], [256 x i8], i32, %struct.s2n_blob, i32, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_client_hello, %struct.s2n_x509_validator, ptr, ptr, i8, i32, %struct.s2n_blob, i32, %struct.s2n_ticket_fields, [138 x i8], %struct.s2n_stuffer, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8, i16, i16, i32, i32, %struct.s2n_blob, i32, %struct.s2n_post_handshake, %struct.s2n_atomic_flag, i8, i8 }
%struct.s2n_timer = type { i64 }
%struct.s2n_secrets = type { %union.anon, 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_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 }

@.str = external hidden unnamed_addr constant [92 x i8], align 1
@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [92 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_client_cert_recv(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %struct.s2n_stuffer, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %struct.s2n_blob, align 8
  %10 = alloca %struct.s2n_result, align 4
  %11 = alloca %struct.s2n_pkey, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.s2n_result, align 4
  %14 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #8
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.s2n_connection, ptr %15, i32 0, i32 52
  %17 = getelementptr inbounds %struct.s2n_handshake, ptr %16, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %17, i64 40, i1 false), !tbaa.struct !9
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.s2n_connection, ptr %18, i32 0, i32 23
  %20 = load i8, ptr %19, align 4, !tbaa !13
  %21 = zext i8 %20 to i32
  %22 = icmp eq i32 %21, 34
  br i1 %22, label %23, label %74

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #8
  store i8 0, ptr %5, align 1, !tbaa !12
  br label %24

24:                                               ; preds = %23
  %25 = call i32 @s2n_stuffer_read_uint8(ptr noundef %4, ptr noundef %5)
  %26 = icmp sgt i32 %25, -1
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %71

28:                                               ; preds = %24
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load i8, ptr %5, align 1, !tbaa !12
  %33 = zext i8 %32 to i32
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %68

35:                                               ; preds = %31
  br label %36

36:                                               ; preds = %35
  br label %37

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

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

53:                                               ; preds = %37
  %54 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %55 = getelementptr inbounds %struct.s2n_debug_info, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !41
  %57 = getelementptr inbounds i8, ptr %56, i64 21
  br label %58

58:                                               ; preds = %53, %46
  %59 = phi ptr [ %52, %46 ], [ %57, %53 ]
  %60 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %61 = getelementptr inbounds %struct.s2n_debug_info, ptr %60, i32 0, i32 1
  store ptr %59, ptr %61, align 8, !tbaa !43
  %62 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %62, align 4, !tbaa !10
  %63 = call i32 @s2n_calculate_stacktrace()
  br label %64

64:                                               ; preds = %58
  br label %65

65:                                               ; preds = %64
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %71

66:                                               ; No predecessors!
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67, %31
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  store i32 0, ptr %6, align 4
  br label %71

71:                                               ; preds = %70, %65, %27
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #8
  %72 = load i32, ptr %6, align 4
  switch i32 %72, label %286 [
    i32 0, label %73
  ]

73:                                               ; preds = %71
  br label %74

74:                                               ; preds = %73, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !10
  br label %75

75:                                               ; preds = %74
  %76 = call i32 @s2n_stuffer_read_uint24(ptr noundef %4, ptr noundef %7)
  %77 = icmp sgt i32 %76, -1
  br i1 %77, label %79, label %78

78:                                               ; preds = %75
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %285

79:                                               ; preds = %75
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %7, align 4, !tbaa !10
  %84 = getelementptr inbounds %struct.s2n_stuffer, ptr %4, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !44
  %86 = getelementptr inbounds %struct.s2n_stuffer, ptr %4, i32 0, i32 1
  %87 = load i32, ptr %86, align 8, !tbaa !45
  %88 = sub i32 %85, %87
  %89 = icmp ule i32 %83, %88
  br i1 %89, label %123, label %90

90:                                               ; preds = %82
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  %93 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %94 = getelementptr inbounds %struct.s2n_debug_info, ptr %93, i32 0, i32 0
  store ptr @.str.1, ptr %94, align 8, !tbaa !41
  %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 !41
  %98 = getelementptr inbounds i8, ptr %97, i64 21
  %99 = call ptr @strrchr(ptr noundef %98, i32 noundef 47) #9
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %108

101:                                              ; preds = %92
  %102 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %103 = getelementptr inbounds %struct.s2n_debug_info, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !41
  %105 = getelementptr inbounds i8, ptr %104, i64 21
  %106 = call ptr @strrchr(ptr noundef %105, i32 noundef 47) #9
  %107 = getelementptr inbounds i8, ptr %106, i64 1
  br label %113

108:                                              ; preds = %92
  %109 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %110 = getelementptr inbounds %struct.s2n_debug_info, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !41
  %112 = getelementptr inbounds i8, ptr %111, i64 21
  br label %113

113:                                              ; preds = %108, %101
  %114 = phi ptr [ %107, %101 ], [ %112, %108 ]
  %115 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %116 = getelementptr inbounds %struct.s2n_debug_info, ptr %115, i32 0, i32 1
  store ptr %114, ptr %116, align 8, !tbaa !43
  %117 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %117, align 4, !tbaa !10
  %118 = call i32 @s2n_calculate_stacktrace()
  br label %119

119:                                              ; preds = %113
  br label %120

120:                                              ; preds = %119
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %285

121:                                              ; No predecessors!
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122, %82
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %7, align 4, !tbaa !10
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %137

128:                                              ; preds = %125
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = call i32 @s2n_conn_set_handshake_no_client_cert(ptr noundef %130)
  %132 = icmp sgt i32 %131, -1
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %285

134:                                              ; preds = %129
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %285

137:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %138 = load i32, ptr %7, align 4, !tbaa !10
  %139 = call ptr @s2n_stuffer_raw_read(ptr noundef %4, i32 noundef %138)
  store ptr %139, ptr %8, align 8, !tbaa !5
  br label %140

140:                                              ; preds = %137
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %176, label %143

143:                                              ; preds = %140
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  %146 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %147 = getelementptr inbounds %struct.s2n_debug_info, ptr %146, i32 0, i32 0
  store ptr @.str.2, ptr %147, align 8, !tbaa !41
  %148 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %149 = getelementptr inbounds %struct.s2n_debug_info, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !41
  %151 = getelementptr inbounds i8, ptr %150, i64 21
  %152 = call ptr @strrchr(ptr noundef %151, i32 noundef 47) #9
  %153 = icmp ne ptr %152, null
  br i1 %153, label %154, label %161

154:                                              ; preds = %145
  %155 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %156 = getelementptr inbounds %struct.s2n_debug_info, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !41
  %158 = getelementptr inbounds i8, ptr %157, i64 21
  %159 = call ptr @strrchr(ptr noundef %158, i32 noundef 47) #9
  %160 = getelementptr inbounds i8, ptr %159, i64 1
  br label %166

161:                                              ; preds = %145
  %162 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %163 = getelementptr inbounds %struct.s2n_debug_info, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !41
  %165 = getelementptr inbounds i8, ptr %164, i64 21
  br label %166

166:                                              ; preds = %161, %154
  %167 = phi ptr [ %160, %154 ], [ %165, %161 ]
  %168 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %169 = getelementptr inbounds %struct.s2n_debug_info, ptr %168, i32 0, i32 1
  store ptr %167, ptr %169, align 8, !tbaa !43
  %170 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %170, align 4, !tbaa !10
  %171 = call i32 @s2n_calculate_stacktrace()
  br label %172

172:                                              ; preds = %166
  br label %173

173:                                              ; preds = %172
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %284

174:                                              ; No predecessors!
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175, %140
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  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 %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  %181 = load i32, ptr %7, align 4, !tbaa !10
  %182 = call i32 @s2n_blob_init(ptr noundef %9, ptr noundef %180, i32 noundef %181)
  %183 = icmp sgt i32 %182, -1
  br i1 %183, label %185, label %184

184:                                              ; preds = %179
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %283

185:                                              ; preds = %179
  br label %186

186:                                              ; preds = %185
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = call i32 @s2n_client_cert_chain_store(ptr noundef %189, ptr noundef %9)
  %191 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  store i32 %190, ptr %191, align 4
  %192 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  %193 = load i32, ptr %192, align 4
  %194 = call zeroext i1 @s2n_result_is_ok(i32 %193)
  br i1 %194, label %228, label %195

195:                                              ; preds = %188
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  %198 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %199 = getelementptr inbounds %struct.s2n_debug_info, ptr %198, i32 0, i32 0
  store ptr @.str.3, ptr %199, align 8, !tbaa !41
  %200 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %201 = getelementptr inbounds %struct.s2n_debug_info, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !41
  %203 = getelementptr inbounds i8, ptr %202, i64 21
  %204 = call ptr @strrchr(ptr noundef %203, i32 noundef 47) #9
  %205 = icmp ne ptr %204, null
  br i1 %205, label %206, label %213

206:                                              ; preds = %197
  %207 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %208 = getelementptr inbounds %struct.s2n_debug_info, ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !41
  %210 = getelementptr inbounds i8, ptr %209, i64 21
  %211 = call ptr @strrchr(ptr noundef %210, i32 noundef 47) #9
  %212 = getelementptr inbounds i8, ptr %211, i64 1
  br label %218

213:                                              ; preds = %197
  %214 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %215 = getelementptr inbounds %struct.s2n_debug_info, ptr %214, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8, !tbaa !41
  %217 = getelementptr inbounds i8, ptr %216, i64 21
  br label %218

218:                                              ; preds = %213, %206
  %219 = phi ptr [ %212, %206 ], [ %217, %213 ]
  %220 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %221 = getelementptr inbounds %struct.s2n_debug_info, ptr %220, i32 0, i32 1
  store ptr %219, ptr %221, align 8, !tbaa !43
  %222 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %222, align 4, !tbaa !10
  %223 = call i32 @s2n_calculate_stacktrace()
  br label %224

224:                                              ; preds = %218
  br label %225

225:                                              ; preds = %224
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %283

226:                                              ; No predecessors!
  br label %227

227:                                              ; preds = %226
  br label %228

228:                                              ; preds = %227, %188
  br label %229

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #8
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 48, i1 false)
  br label %231

231:                                              ; preds = %230
  %232 = call i32 @s2n_pkey_zero_init(ptr noundef %11)
  %233 = icmp sgt i32 %232, -1
  br i1 %233, label %235, label %234

234:                                              ; preds = %231
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %282

235:                                              ; preds = %231
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 -1, ptr %12, align 4, !tbaa !10
  br label %238

238:                                              ; preds = %237
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.s2n_connection, ptr %239, i32 0, i32 72
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = load ptr, ptr %8, align 8, !tbaa !5
  %243 = load i32, ptr %7, align 4, !tbaa !10
  %244 = call i32 @s2n_x509_validator_validate_cert_chain(ptr noundef %240, ptr noundef %241, ptr noundef %242, i32 noundef %243, ptr noundef %12, ptr noundef %11)
  %245 = getelementptr inbounds %struct.s2n_result, ptr %13, i32 0, i32 0
  store i32 %244, ptr %245, align 4
  %246 = getelementptr inbounds %struct.s2n_result, ptr %13, i32 0, i32 0
  %247 = load i32, ptr %246, align 4
  %248 = call zeroext i1 @s2n_result_is_ok(i32 %247)
  br i1 %248, label %250, label %249

249:                                              ; preds = %238
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %281

250:                                              ; preds = %238
  br label %251

251:                                              ; preds = %250
  br label %252

252:                                              ; preds = %251
  %253 = load i32, ptr %12, align 4, !tbaa !10
  %254 = load ptr, ptr %3, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.s2n_connection, ptr %254, i32 0, i32 32
  %256 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %255, i32 0, i32 3
  store i32 %253, ptr %256, align 8, !tbaa !46
  br label %257

257:                                              ; preds = %252
  %258 = load i32, ptr %12, align 4, !tbaa !10
  %259 = call i32 @s2n_pkey_setup_for_type(ptr noundef %11, i32 noundef %258)
  %260 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  store i32 %259, ptr %260, align 4
  %261 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  %262 = load i32, ptr %261, align 4
  %263 = call zeroext i1 @s2n_result_is_ok(i32 %262)
  br i1 %263, label %265, label %264

264:                                              ; preds = %257
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %281

265:                                              ; preds = %257
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267
  %269 = call i32 @s2n_pkey_check_key_exists(ptr noundef %11)
  %270 = icmp sgt i32 %269, -1
  br i1 %270, label %272, label %271

271:                                              ; preds = %268
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %281

272:                                              ; preds = %268
  br label %273

273:                                              ; preds = %272
  br label %274

274:                                              ; preds = %273
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.s2n_connection, ptr %275, i32 0, i32 32
  %277 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %276, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %277, ptr align 8 %11, i64 48, i1 false), !tbaa.struct !47
  %278 = load ptr, ptr %3, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.s2n_connection, ptr %278, i32 0, i32 52
  %280 = getelementptr inbounds %struct.s2n_handshake, ptr %279, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %280, ptr align 8 %4, i64 40, i1 false), !tbaa.struct !9
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %281

281:                                              ; preds = %274, %271, %264, %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %282

282:                                              ; preds = %281, %234
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #8
  br label %283

283:                                              ; preds = %282, %225, %184
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  br label %284

284:                                              ; preds = %283, %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %285

285:                                              ; preds = %284, %136, %133, %120, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %286

286:                                              ; preds = %285, %71
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #8
  %287 = load i32, ptr %2, align 4
  ret i32 %287
}

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

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

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

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

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

declare i32 @s2n_calculate_stacktrace() #3

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

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

declare i32 @s2n_conn_set_handshake_no_client_cert(ptr noundef) #3

declare ptr @s2n_stuffer_raw_read(ptr noundef, i32 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

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

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

declare i32 @s2n_pkey_zero_init(ptr noundef) #3

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

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

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

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

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


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

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

@.str = external hidden unnamed_addr constant [92 x i8], align 1
@_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.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [92 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_client_cert_recv(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca %struct.s2n_stuffer, align 8
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca %struct.s2n_blob, align 8
  %6 = alloca %struct.s2n_pkey, align 8
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #8
  %8 = getelementptr inbounds i8, ptr %0, i64 2016
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(40) %8, i64 40, i1 false), !tbaa.struct !5
  %9 = getelementptr inbounds i8, ptr %0, i64 220
  %10 = load i8, ptr %9, align 4, !tbaa !13
  %11 = icmp eq i8 %10, 34
  br i1 %11, label %12, label %26

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #8
  store i8 0, ptr %3, align 1, !tbaa !12
  %13 = call i32 @s2n_stuffer_read_uint8(ptr noundef nonnull %2, ptr noundef nonnull %3) #8
  %14 = icmp sgt i32 %13, -1
  br i1 %14, label %15, label %.critedge

15:                                               ; preds = %12
  %16 = load i8, ptr %3, align 1, !tbaa !12
  %.not = icmp eq i8 %16, 0
  br i1 %.not, label %25, label %17

17:                                               ; preds = %15
  %18 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str, ptr %18, align 8, !tbaa !41
  %19 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str, i64 21), i32 noundef 47) #9
  %.not21 = icmp eq ptr %19, null
  %20 = getelementptr inbounds i8, ptr %19, i64 1
  %21 = select i1 %.not21, ptr getelementptr inbounds (i8, ptr @.str, i64 21), ptr %20
  %22 = getelementptr inbounds i8, ptr %18, i64 8
  store ptr %21, ptr %22, align 8, !tbaa !43
  %23 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %23, align 4, !tbaa !10
  %24 = call i32 @s2n_calculate_stacktrace() #8
  br label %.critedge

25:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  br label %26

26:                                               ; preds = %25, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !10
  %27 = call i32 @s2n_stuffer_read_uint24(ptr noundef nonnull %2, ptr noundef nonnull %4) #8
  %28 = icmp sgt i32 %27, -1
  br i1 %28, label %29, label %94

29:                                               ; preds = %26
  %30 = load i32, ptr %4, align 4, !tbaa !10
  %31 = getelementptr inbounds i8, ptr %2, i64 28
  %32 = load i32, ptr %31, align 4, !tbaa !44
  %33 = getelementptr inbounds i8, ptr %2, i64 24
  %34 = load i32, ptr %33, align 8, !tbaa !45
  %35 = sub i32 %32, %34
  %.not22 = icmp ugt i32 %30, %35
  br i1 %.not22, label %36, label %44

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

44:                                               ; preds = %29
  %45 = icmp eq i32 %30, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %44
  %47 = call i32 @s2n_conn_set_handshake_no_client_cert(ptr noundef nonnull %0) #8
  %.lobit = ashr i32 %47, 31
  br label %94

48:                                               ; preds = %44
  %49 = call ptr @s2n_stuffer_raw_read(ptr noundef nonnull %2, i32 noundef %30) #8
  %.not24 = icmp eq ptr %49, null
  br i1 %.not24, label %50, label %58

50:                                               ; preds = %48
  %51 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.2, ptr %51, align 8, !tbaa !41
  %52 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.2, i64 21), i32 noundef 47) #9
  %.not25 = icmp eq ptr %52, null
  %53 = getelementptr inbounds i8, ptr %52, i64 1
  %54 = select i1 %.not25, ptr getelementptr inbounds (i8, ptr @.str.2, i64 21), ptr %53
  %55 = getelementptr inbounds i8, ptr %51, i64 8
  store ptr %54, ptr %55, align 8, !tbaa !43
  %56 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %56, align 4, !tbaa !10
  %57 = call i32 @s2n_calculate_stacktrace() #8
  br label %94

58:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  %59 = load i32, ptr %4, align 4, !tbaa !10
  %60 = call i32 @s2n_blob_init(ptr noundef nonnull %5, ptr noundef nonnull %49, i32 noundef %59) #8
  %61 = icmp sgt i32 %60, -1
  br i1 %61, label %62, label %93

62:                                               ; preds = %58
  %63 = call i32 @s2n_client_cert_chain_store(ptr noundef nonnull %0, ptr noundef nonnull %5)
  %64 = call zeroext i1 @s2n_result_is_ok(i32 %63)
  br i1 %64, label %73, label %65

65:                                               ; preds = %62
  %66 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.3, ptr %66, align 8, !tbaa !41
  %67 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.3, i64 21), i32 noundef 47) #9
  %.not26 = icmp eq ptr %67, null
  %68 = getelementptr inbounds i8, ptr %67, i64 1
  %69 = select i1 %.not26, ptr getelementptr inbounds (i8, ptr @.str.3, i64 21), ptr %68
  %70 = getelementptr inbounds i8, ptr %66, i64 8
  store ptr %69, ptr %70, align 8, !tbaa !43
  %71 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544322, ptr %71, align 4, !tbaa !10
  %72 = call i32 @s2n_calculate_stacktrace() #8
  br label %93

73:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %6, i8 0, i64 48, i1 false)
  %74 = call i32 @s2n_pkey_zero_init(ptr noundef nonnull %6) #8
  %75 = icmp sgt i32 %74, -1
  br i1 %75, label %76, label %92

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 -1, ptr %7, align 4, !tbaa !10
  %77 = getelementptr inbounds i8, ptr %0, i64 3704
  %78 = load i32, ptr %4, align 4, !tbaa !10
  %79 = call i32 @s2n_x509_validator_validate_cert_chain(ptr noundef nonnull %77, ptr noundef nonnull %0, ptr noundef nonnull %49, i32 noundef %78, ptr noundef nonnull %7, ptr noundef nonnull %6) #8
  %80 = call zeroext i1 @s2n_result_is_ok(i32 %79)
  br i1 %80, label %81, label %91

81:                                               ; preds = %76
  %82 = load i32, ptr %7, align 4, !tbaa !10
  %83 = getelementptr inbounds i8, ptr %0, i64 1264
  store i32 %82, ptr %83, align 8, !tbaa !46
  %84 = call i32 @s2n_pkey_setup_for_type(ptr noundef nonnull %6, i32 noundef %82) #8
  %85 = call zeroext i1 @s2n_result_is_ok(i32 %84)
  br i1 %85, label %86, label %91

86:                                               ; preds = %81
  %87 = call i32 @s2n_pkey_check_key_exists(ptr noundef nonnull %6) #8
  %88 = icmp sgt i32 %87, -1
  br i1 %88, label %89, label %91

89:                                               ; preds = %86
  %90 = getelementptr inbounds i8, ptr %0, i64 1192
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %90, ptr noundef nonnull align 8 dereferenceable(48) %6, i64 48, i1 false), !tbaa.struct !47
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(40) %2, i64 40, i1 false), !tbaa.struct !5
  br label %91

91:                                               ; preds = %86, %81, %76, %89
  %.1 = phi i32 [ 0, %89 ], [ -1, %76 ], [ -1, %81 ], [ -1, %86 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %92

92:                                               ; preds = %73, %91
  %.2 = phi i32 [ %.1, %91 ], [ -1, %73 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  br label %93

93:                                               ; preds = %58, %92, %65
  %.3 = phi i32 [ %.2, %92 ], [ -1, %65 ], [ -1, %58 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %94

94:                                               ; preds = %50, %93, %46, %26, %36
  %.5 = phi i32 [ -1, %36 ], [ -1, %26 ], [ %.lobit, %46 ], [ %.3, %93 ], [ -1, %50 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %95

.critedge:                                        ; preds = %12, %17
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  br label %95

95:                                               ; preds = %.critedge, %94
  %.6 = phi i32 [ %.5, %94 ], [ -1, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #8
  ret i32 %.6
}

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

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

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

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

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

declare i32 @s2n_calculate_stacktrace() 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) #1

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

declare i32 @s2n_conn_set_handshake_no_client_cert(ptr noundef) local_unnamed_addr #3

declare ptr @s2n_stuffer_raw_read(ptr noundef, i32 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

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

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

declare i32 @s2n_pkey_zero_init(ptr noundef) local_unnamed_addr #3

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

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

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

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

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


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