; LLVM IR from aws/s2n-tls :: tls (s2n_server_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_pkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.s2n_result = type { i32 }
%struct.s2n_connection = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [22 x i8], [22 x i8], [22 x i8], i32, i32, %struct.s2n_timer, i64, i64, [32 x i8], i8, i8, i8, i8, i8, i8, i8, ptr, ptr, %struct.s2n_secrets, ptr, ptr, %struct.s2n_kex_parameters, %struct.s2n_handshake_parameters, %struct.s2n_psk_parameters, ptr, i8, i32, [5 x i8], %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, i32, i64, [2 x i8], %struct.s2n_stuffer, i8, i8, i8, i8, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, %struct.s2n_handshake, i16, i32, i16, i64, i8, i64, i64, i64, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, [256 x i8], [256 x i8], i32, %struct.s2n_blob, i32, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_client_hello, %struct.s2n_x509_validator, ptr, ptr, i8, i32, %struct.s2n_blob, i32, %struct.s2n_ticket_fields, [138 x i8], %struct.s2n_stuffer, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8, i16, i16, i32, i32, %struct.s2n_blob, i32, %struct.s2n_post_handshake, %struct.s2n_atomic_flag, i8, i8 }
%struct.s2n_timer = type { i64 }
%struct.s2n_secrets = type { %union.anon, i32 }
%union.anon = type { %struct.s2n_tls13_secrets }
%struct.s2n_tls13_secrets = type { [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], i32 }
%struct.s2n_kex_parameters = type { %struct.s2n_dh_params, %struct.s2n_ecc_evp_params, [4 x ptr], %struct.s2n_ecc_evp_params, %struct.s2n_kem_group_params, %struct.s2n_kem_group_params, [8 x ptr], %struct.s2n_kem_params, %struct.s2n_blob, %struct.s2n_blob }
%struct.s2n_dh_params = type { ptr }
%struct.s2n_ecc_evp_params = type { ptr, ptr }
%struct.s2n_kem_group_params = type { ptr, %struct.s2n_kem_params, %struct.s2n_ecc_evp_params }
%struct.s2n_kem_params = type { ptr, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8 }
%struct.s2n_handshake_parameters = type { %struct.s2n_pkey, %struct.s2n_pkey, %struct.s2n_blob, i32, %struct.s2n_sig_scheme_list, ptr, ptr, ptr, [4 x ptr], [4 x ptr], i8, i8, [32 x i8], [32 x i8] }
%struct.s2n_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 [91 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 [91 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_server_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 %struct.s2n_pkey, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.s2n_blob, align 8
  %11 = alloca %struct.s2n_result, align 4
  %12 = 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
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.s2n_connection, ptr %13, i32 0, i32 52
  %15 = getelementptr inbounds %struct.s2n_handshake, ptr %14, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %15, i64 40, i1 false), !tbaa.struct !9
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.s2n_connection, ptr %16, i32 0, i32 23
  %18 = load i8, ptr %17, align 4, !tbaa !13
  %19 = zext i8 %18 to i32
  %20 = icmp eq i32 %19, 34
  br i1 %20, label %21, label %72

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

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

25:                                               ; preds = %22
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %69

26:                                               ; preds = %22
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  br label %29

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

33:                                               ; preds = %29
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %37 = getelementptr inbounds %struct.s2n_debug_info, ptr %36, i32 0, i32 0
  store ptr @.str, ptr %37, align 8, !tbaa !41
  %38 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %39 = getelementptr inbounds %struct.s2n_debug_info, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !41
  %41 = getelementptr inbounds i8, ptr %40, i64 21
  %42 = call ptr @strrchr(ptr noundef %41, i32 noundef 47) #9
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %51

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

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

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

62:                                               ; preds = %56
  br label %63

63:                                               ; preds = %62
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %69

64:                                               ; No predecessors!
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65, %29
  br label %67

67:                                               ; preds = %66
  br label %68

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

69:                                               ; preds = %68, %63, %25
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #8
  %70 = load i32, ptr %6, align 4
  switch i32 %70, label %225 [
    i32 0, label %71
  ]

71:                                               ; preds = %69
  br label %72

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

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

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

77:                                               ; preds = %73
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  br label %80

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

88:                                               ; preds = %80
  %89 = load i32, ptr %7, align 4, !tbaa !10
  %90 = icmp ult i32 %89, 3
  br i1 %90, label %91, label %124

91:                                               ; preds = %88, %80
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92
  %94 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %95 = getelementptr inbounds %struct.s2n_debug_info, ptr %94, i32 0, i32 0
  store ptr @.str.1, ptr %95, align 8, !tbaa !41
  %96 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %97 = getelementptr inbounds %struct.s2n_debug_info, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !41
  %99 = getelementptr inbounds i8, ptr %98, i64 21
  %100 = call ptr @strrchr(ptr noundef %99, i32 noundef 47) #9
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %109

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

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

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

120:                                              ; preds = %114
  br label %121

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

122:                                              ; No predecessors!
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123, %88
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #8
  br label %127

127:                                              ; preds = %126
  %128 = call i32 @s2n_pkey_zero_init(ptr noundef %8)
  %129 = icmp sgt i32 %128, -1
  br i1 %129, label %131, label %130

130:                                              ; preds = %127
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %223

131:                                              ; preds = %127
  br label %132

132:                                              ; preds = %131
  br label %133

133:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 24, i1 false)
  %134 = load i32, ptr %7, align 4, !tbaa !10
  %135 = getelementptr inbounds %struct.s2n_blob, ptr %10, i32 0, i32 1
  store i32 %134, ptr %135, align 8, !tbaa !46
  %136 = load i32, ptr %7, align 4, !tbaa !10
  %137 = call ptr @s2n_stuffer_raw_read(ptr noundef %4, i32 noundef %136)
  %138 = getelementptr inbounds %struct.s2n_blob, ptr %10, i32 0, i32 0
  store ptr %137, ptr %138, align 8, !tbaa !47
  br label %139

139:                                              ; preds = %133
  %140 = getelementptr inbounds %struct.s2n_blob, ptr %10, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !47
  %142 = icmp ne ptr %141, null
  br i1 %142, label %176, label %143

143:                                              ; preds = %139
  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 %222

174:                                              ; No predecessors!
  br label %175

175:                                              ; preds = %174
  br label %176

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

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.s2n_connection, ptr %180, i32 0, i32 72
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.s2n_blob, ptr %10, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !47
  %185 = getelementptr inbounds %struct.s2n_blob, ptr %10, i32 0, i32 1
  %186 = load i32, ptr %185, align 8, !tbaa !46
  %187 = call i32 @s2n_x509_validator_validate_cert_chain(ptr noundef %181, ptr noundef %182, ptr noundef %184, i32 noundef %186, ptr noundef %9, ptr noundef %8)
  %188 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  store i32 %187, ptr %188, align 4
  %189 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  %190 = load i32, ptr %189, align 4
  %191 = call zeroext i1 @s2n_result_is_ok(i32 %190)
  br i1 %191, label %193, label %192

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

193:                                              ; preds = %179
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194
  br label %196

196:                                              ; preds = %195
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = load i32, ptr %9, align 4, !tbaa !10
  %199 = call i32 @s2n_is_cert_type_valid_for_auth(ptr noundef %197, i32 noundef %198)
  %200 = icmp sgt i32 %199, -1
  br i1 %200, label %202, label %201

201:                                              ; preds = %196
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %222

202:                                              ; preds = %196
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %9, align 4, !tbaa !10
  %207 = call i32 @s2n_pkey_setup_for_type(ptr noundef %8, i32 noundef %206)
  %208 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  store i32 %207, ptr %208, align 4
  %209 = getelementptr inbounds %struct.s2n_result, ptr %12, i32 0, i32 0
  %210 = load i32, ptr %209, align 4
  %211 = call zeroext i1 @s2n_result_is_ok(i32 %210)
  br i1 %211, label %213, label %212

212:                                              ; preds = %205
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %222

213:                                              ; preds = %205
  br label %214

214:                                              ; preds = %213
  br label %215

215:                                              ; preds = %214
  %216 = load ptr, ptr %3, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.s2n_connection, ptr %216, i32 0, i32 32
  %218 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %217, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %218, ptr align 8 %8, i64 48, i1 false), !tbaa.struct !48
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.s2n_connection, ptr %219, i32 0, i32 52
  %221 = getelementptr inbounds %struct.s2n_handshake, ptr %220, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %221, 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 %222

222:                                              ; preds = %215, %212, %201, %192, %173
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %223

223:                                              ; preds = %222, %130
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  br label %224

224:                                              ; preds = %223, %121, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %225

225:                                              ; preds = %224, %69
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #8
  %226 = load i32, ptr %2, align 4
  ret i32 %226
}

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

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

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

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

declare i32 @s2n_pkey_setup_for_type(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 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 = !{!23, !11, i64 8}
!47 = !{!23, !6, i64 0}
!48 = !{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 [91 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 [91 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_server_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_pkey, align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #7
  %7 = 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) %7, i64 40, i1 false), !tbaa.struct !5
  %8 = getelementptr inbounds i8, ptr %0, i64 220
  %9 = load i8, ptr %8, align 4, !tbaa !13
  %10 = icmp eq i8 %9, 34
  br i1 %10, label %11, label %25

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

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

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

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

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

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

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

45:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #7
  %46 = call i32 @s2n_pkey_zero_init(ptr noundef nonnull %5) #7
  %47 = icmp sgt i32 %46, -1
  br i1 %47, label %48, label %74

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %49 = load i32, ptr %4, align 4, !tbaa !10
  %50 = call ptr @s2n_stuffer_raw_read(ptr noundef nonnull %2, i32 noundef %49) #7
  %.not17 = icmp eq ptr %50, null
  br i1 %.not17, label %51, label %59

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

59:                                               ; preds = %48
  %60 = getelementptr inbounds i8, ptr %0, i64 3704
  %61 = call i32 @s2n_x509_validator_validate_cert_chain(ptr noundef nonnull %60, ptr noundef nonnull %0, ptr noundef nonnull %50, i32 noundef %49, ptr noundef nonnull %6, ptr noundef nonnull %5) #7
  %62 = call zeroext i1 @s2n_result_is_ok(i32 %61)
  br i1 %62, label %63, label %73

63:                                               ; preds = %59
  %64 = load i32, ptr %6, align 4, !tbaa !10
  %65 = call i32 @s2n_is_cert_type_valid_for_auth(ptr noundef nonnull %0, i32 noundef %64) #7
  %66 = icmp sgt i32 %65, -1
  br i1 %66, label %67, label %73

67:                                               ; preds = %63
  %68 = load i32, ptr %6, align 4, !tbaa !10
  %69 = call i32 @s2n_pkey_setup_for_type(ptr noundef nonnull %5, i32 noundef %68) #7
  %70 = call zeroext i1 @s2n_result_is_ok(i32 %69)
  br i1 %70, label %71, label %73

71:                                               ; preds = %67
  %72 = getelementptr inbounds i8, ptr %0, i64 1144
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %72, ptr noundef nonnull align 8 dereferenceable(48) %5, i64 48, i1 false), !tbaa.struct !46
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %2, i64 40, i1 false), !tbaa.struct !5
  br label %73

73:                                               ; preds = %67, %63, %59, %71, %51
  %.1 = phi i32 [ 0, %71 ], [ -1, %51 ], [ -1, %59 ], [ -1, %63 ], [ -1, %67 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %74

74:                                               ; preds = %45, %73
  %.2 = phi i32 [ %.1, %73 ], [ -1, %45 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  br label %75

75:                                               ; preds = %25, %74, %37
  %.3 = phi i32 [ -1, %37 ], [ %.2, %74 ], [ -1, %25 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %76

.critedge:                                        ; preds = %11, %16
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %76

76:                                               ; preds = %.critedge, %75
  %.4 = phi i32 [ %.3, %75 ], [ -1, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #7
  ret i32 %.4
}

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

declare ptr @s2n_stuffer_raw_read(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 #6

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

declare i32 @s2n_pkey_setup_for_type(ptr noundef, i32 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 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{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 = !{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,ReassociatePass,SROAPass,SimplifyCFGPass