	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_process_certificate
_tls_process_certificate:               ## @tls_process_certificate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_TLS_CONTENT_TYPE_HANDSHAKE@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	(%rcx), %r15
	cmpq	$3, %r15
	ja	LBB0_5
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
LBB0_4:
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_UNEXPECTED_MESSAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movq	%rdx, %r12
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	8(%rdx), %rdi
	movq	(%rdx), %rbx
	callq	_WPA_GET_BE24
	movq	%rax, %r13
	addq	$-4, %r15
	cmpq	%r15, %rax
	jbe	LBB0_12
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
LBB0_7:
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_DECODE_ERROR@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %edx
	movq	%rbx, %rdi
LBB0_9:
	callq	_tlsv1_server_alert
LBB0_10:
	movl	$-1, %eax
LBB0_11:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_15
## %bb.13:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 24(%rbx)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_19
## %bb.14:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	jmp	LBB0_4
LBB0_15:
	movq	_TLS_HANDSHAKE_TYPE_CERTIFICATE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_18
## %bb.16:
	leaq	L_.str.5(%rip), %rsi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	cmpq	$2, %r13
	jg	LBB0_20
## %bb.17:
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	jmp	LBB0_32
LBB0_18:
	leaq	L_.str.4(%rip), %rsi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_UNEXPECTED_MESSAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_19:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tls_process_client_key_exchange ## TAILCALL
LBB0_20:
	leaq	32(%r12), %rdi
	leaq	4(%r13), %rbx
	callq	_WPA_GET_BE24
	leaq	-56(,%rbx,8), %rcx
	sarq	$3, %rcx
	cmpq	%rax, %rcx
	jne	LBB0_31
## %bb.21:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	cmpq	$4, %r13
	jb	LBB0_34
## %bb.22:
	leaq	(%r12,%r13,8), %r15
	addq	$32, %r15
	addq	$56, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$16, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_24 Depth=1
	incq	%rbx
	leaq	(%r12,%r13,8), %r12
	movq	%rax, %r14
	movq	%rcx, %r13
	cmpq	%r15, %r12
	jae	LBB0_35
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rax
	subq	%r12, %rax
	cmpq	$23, %rax
	jle	LBB0_43
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_WPA_GET_BE24
	movq	%rax, %r13
	addq	$24, %r12
	movq	%r15, %rcx
	subq	%r12, %rcx
	sarq	$3, %rcx
	cmpq	%rax, %rcx
	jb	LBB0_44
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	testq	%rbx, %rbx
	jne	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edi
	callq	_crypto_public_key_free
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	callq	_tls_parse_cert
	testq	%rax, %rax
	jne	LBB0_42
LBB0_28:                                ##   in Loop: Header=BB0_24 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_x509_certificate_parse
	testq	%rax, %rax
	je	LBB0_42
## %bb.29:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	%rax, %rcx
	testq	%r14, %r14
	je	LBB0_23
## %bb.30:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	%rax, 8(%r14)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_31:
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
LBB0_32:
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_DECODE_ERROR@GOTPCREL(%rip), %rax
LBB0_33:
	movl	(%rax), %edx
	movq	%r14, %rdi
	jmp	LBB0_9
LBB0_34:
	xorl	%ecx, %ecx
LBB0_35:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	leaq	-52(%rbp), %rdx
	movq	%rcx, %r14
	movq	%rcx, %rsi
	xorl	%ecx, %ecx
	callq	_x509_certificate_chain_validate
	testq	%rax, %rax
	js	LBB0_40
## %bb.36:
	testq	%r14, %r14
	je	LBB0_39
## %bb.37:
	movq	_X509_EXT_EXT_KEY_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_39
## %bb.38:
	movq	_X509_EXT_KEY_USAGE_ANY@GOTPCREL(%rip), %rax
	movq	_X509_EXT_KEY_USAGE_CLIENT_AUTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, 4(%r14)
	je	LBB0_48
LBB0_39:
	movq	%r14, %rdi
	callq	_x509_certificate_chain_free
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	_CLIENT_KEY_EXCHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_40:
	movl	-52(%rbp), %edx
	leaq	L_.str.12(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	movl	-52(%rbp), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_46
## %bb.41:
	cltq
	leaq	l_switch.table.tls_process_certificate(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_47
LBB0_42:
	leaq	L_.str.11(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_BAD_CERTIFICATE@GOTPCREL(%rip), %rax
	jmp	LBB0_45
LBB0_43:
	leaq	L_.str.8(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_DECODE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_tlsv1_server_alert
	movq	%r13, %rdi
	jmp	LBB0_50
LBB0_44:
	leaq	L_.str.9(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_DECODE_ERROR@GOTPCREL(%rip), %rax
LBB0_45:
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_tlsv1_server_alert
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_50
LBB0_46:
	movq	_TLS_ALERT_BAD_CERTIFICATE@GOTPCREL(%rip), %rax
LBB0_47:
	movl	(%rax), %edx
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_49
LBB0_48:
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_BAD_CERTIFICATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_49:
	movq	%rbx, %rdi
	callq	_tlsv1_server_alert
	movq	%r14, %rdi
LBB0_50:
	callq	_x509_certificate_chain_free
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_CONTENT_TYPE_HANDSHAKE,8,3 ## @TLS_CONTENT_TYPE_HANDSHAKE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Expected Handshake; received content type 0x%x"

	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ## @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_UNEXPECTED_MESSAGE,4,2 ## @TLS_ALERT_UNEXPECTED_MESSAGE
L_.str.1:                               ## @.str.1
	.asciz	"Too short Certificate message (len=%lu)"

	.comm	_TLS_ALERT_DECODE_ERROR,4,2     ## @TLS_ALERT_DECODE_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"Unexpected Certificate message length (len=%lu != left=%lu)"

	.comm	_TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE,8,3 ## @TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE
L_.str.3:                               ## @.str.3
	.asciz	"Client did not include Certificate"

	.comm	_TLS_HANDSHAKE_TYPE_CERTIFICATE,8,3 ## @TLS_HANDSHAKE_TYPE_CERTIFICATE
L_.str.4:                               ## @.str.4
	.asciz	"Received unexpected handshake message %d (expected Certificate/ClientKeyExchange)"

L_.str.5:                               ## @.str.5
	.asciz	"Received Certificate (certificate_list len %lu)"

L_.str.6:                               ## @.str.6
	.asciz	"Too short Certificate (left=%lu)"

L_.str.7:                               ## @.str.7
	.asciz	"Unexpected certificate_list length (len=%lu left=%lu)"

L_.str.8:                               ## @.str.8
	.asciz	"Failed to parse certificate_list"

L_.str.9:                               ## @.str.9
	.asciz	"Unexpected certificate length (len=%lu left=%lu)"

L_.str.10:                              ## @.str.10
	.asciz	"Certificate %lu (len %lu)"

L_.str.11:                              ## @.str.11
	.asciz	"Failed to parse the certificate"

	.comm	_TLS_ALERT_BAD_CERTIFICATE,4,2  ## @TLS_ALERT_BAD_CERTIFICATE
L_.str.12:                              ## @.str.12
	.asciz	"Server certificate chain validation failed (reason=%d)"

	.comm	_TLS_ALERT_UNSUPPORTED_CERTIFICATE,4,2 ## @TLS_ALERT_UNSUPPORTED_CERTIFICATE
	.comm	_TLS_ALERT_CERTIFICATE_REVOKED,4,2 ## @TLS_ALERT_CERTIFICATE_REVOKED
	.comm	_TLS_ALERT_CERTIFICATE_EXPIRED,4,2 ## @TLS_ALERT_CERTIFICATE_EXPIRED
	.comm	_TLS_ALERT_CERTIFICATE_UNKNOWN,4,2 ## @TLS_ALERT_CERTIFICATE_UNKNOWN
	.comm	_TLS_ALERT_UNKNOWN_CA,4,2       ## @TLS_ALERT_UNKNOWN_CA
	.comm	_X509_EXT_EXT_KEY_USAGE,4,2     ## @X509_EXT_EXT_KEY_USAGE
	.comm	_X509_EXT_KEY_USAGE_ANY,4,2     ## @X509_EXT_KEY_USAGE_ANY
	.comm	_X509_EXT_KEY_USAGE_CLIENT_AUTH,4,2 ## @X509_EXT_KEY_USAGE_CLIENT_AUTH
	.comm	_CLIENT_KEY_EXCHANGE,4,2        ## @CLIENT_KEY_EXCHANGE
	.no_dead_strip	_tls_process_certificate
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.tls_process_certificate
l_switch.table.tls_process_certificate:
	.quad	_TLS_ALERT_UNSUPPORTED_CERTIFICATE
	.quad	_TLS_ALERT_UNKNOWN_CA
	.quad	_TLS_ALERT_CERTIFICATE_UNKNOWN
	.quad	_TLS_ALERT_CERTIFICATE_REVOKED
	.quad	_TLS_ALERT_CERTIFICATE_EXPIRED

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_process_certificate
_tls_process_certificate:               ; @tls_process_certificate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x3
	ldr	x25, [x3]
	cmp	x25, #3
	b.hi	LBB0_5
; %bb.2:
	str	x25, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_3:
	str	x23, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_tlsv1_server_log
Lloh7:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _TLS_ALERT_UNEXPECTED_MESSAGE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TLS_ALERT_UNEXPECTED_MESSAGE@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	mov	x22, x2
	add	x0, x2, #8
	mov	x24, x2
	ldr	x26, [x24], #32
	bl	_WPA_GET_BE24
	mov	x21, x0
	sub	x25, x25, #4
	cmp	x0, x25
	b.ls	LBB0_11
; %bb.6:
	stp	x21, x25, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_tlsv1_server_log
Lloh14:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _TLS_ALERT_DECODE_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TLS_ALERT_DECODE_ERROR@GOTPAGEOFF]
LBB0_8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tlsv1_server_alert
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
Lloh19:
	adrp	x8, _TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x26, x8
	b.ne	LBB0_14
; %bb.12:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_18
; %bb.13:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_14:
Lloh24:
	adrp	x8, _TLS_HANDSHAKE_TYPE_CERTIFICATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TLS_HANDSHAKE_TYPE_CERTIFICATE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x26, x8
	b.ne	LBB0_17
; %bb.15:
	str	x21, [sp]
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_tlsv1_server_log
	cmp	x21, #2
	b.gt	LBB0_19
; %bb.16:
	str	x25, [sp]
Lloh29:
	adrp	x1, l_.str.6@PAGE
Lloh30:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_7
LBB0_17:
	str	x26, [sp]
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_4
LBB0_18:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	x3, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_tls_process_client_key_exchange
LBB0_19:
	add	x23, x21, #4
	mov	x0, x24
	bl	_WPA_GET_BE24
	lsl	x8, x23, #3
	sub	x8, x8, #56
	asr	x8, x8, #3
	cmp	x8, x0
	b.ne	LBB0_30
; %bb.20:
	cmp	x21, #4
	str	x23, [sp, #16]                  ; 8-byte Folded Spill
	b.lo	LBB0_31
; %bb.21:
	mov	x27, #0
	mov	x21, #0
	mov	x28, #0
	add	x24, x22, x23, lsl #3
	add	x26, x22, #56
	add	x23, x19, #16
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x28, x28, #1
	add	x26, x26, x25, lsl #3
	mov	x27, x0
	mov	x21, x22
	cmp	x26, x24
	b.hs	LBB0_32
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	sub	x8, x24, x26
	cmp	x8, #23
	b.le	LBB0_40
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	x0, x26
	bl	_WPA_GET_BE24
	mov	x25, x0
	add	x26, x26, #24
	sub	x8, x24, x26
	asr	x8, x8, #3
	cmp	x8, x0
	b.lo	LBB0_41
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	stp	x28, x25, [sp]
	mov	x0, x19
Lloh33:
	adrp	x1, l_.str.10@PAGE
Lloh34:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_tlsv1_server_log
	cbnz	x28, LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	w0, [x23]
	bl	_crypto_public_key_free
	mov	x0, x26
	mov	x1, x25
	mov	x2, x23
	bl	_tls_parse_cert
	cbnz	x0, LBB0_39
LBB0_27:                                ;   in Loop: Header=BB0_23 Depth=1
	mov	x0, x26
	mov	x1, x25
	bl	_x509_certificate_parse
	cbz	x0, LBB0_39
; %bb.28:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	x22, x0
	cbz	x27, LBB0_22
; %bb.29:                               ;   in Loop: Header=BB0_23 Depth=1
	str	x0, [x27, #8]
	mov	x22, x21
	b	LBB0_22
LBB0_30:
	stp	x0, x8, [sp]
Lloh35:
	adrp	x1, l_.str.7@PAGE
Lloh36:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_7
LBB0_31:
	mov	x22, #0
LBB0_32:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	add	x2, sp, #28
	mov	x1, x22
	mov	w3, #0
	bl	_x509_certificate_chain_validate
	tbnz	x0, #63, LBB0_37
; %bb.33:
	cbz	x22, LBB0_36
; %bb.34:
	ldr	w8, [x22]
Lloh37:
	adrp	x9, _X509_EXT_EXT_KEY_USAGE@GOTPAGE
Lloh38:
	ldr	x9, [x9, _X509_EXT_EXT_KEY_USAGE@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_36
; %bb.35:
	ldr	w8, [x22, #4]
Lloh40:
	adrp	x9, _X509_EXT_KEY_USAGE_ANY@GOTPAGE
Lloh41:
	ldr	x9, [x9, _X509_EXT_KEY_USAGE_ANY@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
Lloh43:
	adrp	x10, _X509_EXT_KEY_USAGE_CLIENT_AUTH@GOTPAGE
Lloh44:
	ldr	x10, [x10, _X509_EXT_KEY_USAGE_CLIENT_AUTH@GOTPAGEOFF]
Lloh45:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_46
LBB0_36:
	mov	x0, x22
	bl	_x509_certificate_chain_free
	mov	w0, #0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x8, [x20]
Lloh46:
	adrp	x8, _CLIENT_KEY_EXCHANGE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _CLIENT_KEY_EXCHANGE@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_10
LBB0_37:
	ldr	w8, [sp, #28]
	str	x8, [sp]
Lloh49:
	adrp	x1, l_.str.12@PAGE
Lloh50:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x19
	bl	_tlsv1_server_log
	ldr	w8, [sp, #28]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_44
; %bb.38:
Lloh51:
	adrp	x9, l_switch.table.tls_process_certificate@PAGE
Lloh52:
	add	x9, x9, l_switch.table.tls_process_certificate@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_45
LBB0_39:
Lloh53:
	adrp	x1, l_.str.11@PAGE
Lloh54:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x19
	bl	_tlsv1_server_log
Lloh55:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh56:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
Lloh58:
	adrp	x8, _TLS_ALERT_BAD_CERTIFICATE@GOTPAGE
Lloh59:
	ldr	x8, [x8, _TLS_ALERT_BAD_CERTIFICATE@GOTPAGEOFF]
	b	LBB0_43
LBB0_40:
Lloh60:
	adrp	x1, l_.str.8@PAGE
Lloh61:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_42
LBB0_41:
	stp	x25, x8, [sp]
Lloh62:
	adrp	x1, l_.str.9@PAGE
Lloh63:
	add	x1, x1, l_.str.9@PAGEOFF
LBB0_42:
	mov	x0, x19
	bl	_tlsv1_server_log
Lloh64:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh65:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh66:
	ldr	w1, [x8]
Lloh67:
	adrp	x8, _TLS_ALERT_DECODE_ERROR@GOTPAGE
Lloh68:
	ldr	x8, [x8, _TLS_ALERT_DECODE_ERROR@GOTPAGEOFF]
LBB0_43:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tlsv1_server_alert
	mov	x0, x21
	b	LBB0_48
LBB0_44:
Lloh69:
	adrp	x8, _TLS_ALERT_BAD_CERTIFICATE@GOTPAGE
Lloh70:
	ldr	x8, [x8, _TLS_ALERT_BAD_CERTIFICATE@GOTPAGEOFF]
LBB0_45:
	ldr	w2, [x8]
Lloh71:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh72:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh73:
	ldr	w1, [x8]
	b	LBB0_47
LBB0_46:
Lloh74:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh75:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh76:
	ldr	w1, [x8]
Lloh77:
	adrp	x8, _TLS_ALERT_BAD_CERTIFICATE@GOTPAGE
Lloh78:
	ldr	x8, [x8, _TLS_ALERT_BAD_CERTIFICATE@GOTPAGEOFF]
Lloh79:
	ldr	w2, [x8]
LBB0_47:
	mov	x0, x19
	bl	_tlsv1_server_alert
	mov	x0, x22
LBB0_48:
	bl	_x509_certificate_chain_free
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_CONTENT_TYPE_HANDSHAKE,8,3 ; @TLS_CONTENT_TYPE_HANDSHAKE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Expected Handshake; received content type 0x%x"

	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ; @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_UNEXPECTED_MESSAGE,4,2 ; @TLS_ALERT_UNEXPECTED_MESSAGE
l_.str.1:                               ; @.str.1
	.asciz	"Too short Certificate message (len=%lu)"

	.comm	_TLS_ALERT_DECODE_ERROR,4,2     ; @TLS_ALERT_DECODE_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"Unexpected Certificate message length (len=%lu != left=%lu)"

	.comm	_TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE,8,3 ; @TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE
l_.str.3:                               ; @.str.3
	.asciz	"Client did not include Certificate"

	.comm	_TLS_HANDSHAKE_TYPE_CERTIFICATE,8,3 ; @TLS_HANDSHAKE_TYPE_CERTIFICATE
l_.str.4:                               ; @.str.4
	.asciz	"Received unexpected handshake message %d (expected Certificate/ClientKeyExchange)"

l_.str.5:                               ; @.str.5
	.asciz	"Received Certificate (certificate_list len %lu)"

l_.str.6:                               ; @.str.6
	.asciz	"Too short Certificate (left=%lu)"

l_.str.7:                               ; @.str.7
	.asciz	"Unexpected certificate_list length (len=%lu left=%lu)"

l_.str.8:                               ; @.str.8
	.asciz	"Failed to parse certificate_list"

l_.str.9:                               ; @.str.9
	.asciz	"Unexpected certificate length (len=%lu left=%lu)"

l_.str.10:                              ; @.str.10
	.asciz	"Certificate %lu (len %lu)"

l_.str.11:                              ; @.str.11
	.asciz	"Failed to parse the certificate"

	.comm	_TLS_ALERT_BAD_CERTIFICATE,4,2  ; @TLS_ALERT_BAD_CERTIFICATE
l_.str.12:                              ; @.str.12
	.asciz	"Server certificate chain validation failed (reason=%d)"

	.comm	_TLS_ALERT_UNSUPPORTED_CERTIFICATE,4,2 ; @TLS_ALERT_UNSUPPORTED_CERTIFICATE
	.comm	_TLS_ALERT_CERTIFICATE_REVOKED,4,2 ; @TLS_ALERT_CERTIFICATE_REVOKED
	.comm	_TLS_ALERT_CERTIFICATE_EXPIRED,4,2 ; @TLS_ALERT_CERTIFICATE_EXPIRED
	.comm	_TLS_ALERT_CERTIFICATE_UNKNOWN,4,2 ; @TLS_ALERT_CERTIFICATE_UNKNOWN
	.comm	_TLS_ALERT_UNKNOWN_CA,4,2       ; @TLS_ALERT_UNKNOWN_CA
	.comm	_X509_EXT_EXT_KEY_USAGE,4,2     ; @X509_EXT_EXT_KEY_USAGE
	.comm	_X509_EXT_KEY_USAGE_ANY,4,2     ; @X509_EXT_KEY_USAGE_ANY
	.comm	_X509_EXT_KEY_USAGE_CLIENT_AUTH,4,2 ; @X509_EXT_KEY_USAGE_CLIENT_AUTH
	.comm	_CLIENT_KEY_EXCHANGE,4,2        ; @CLIENT_KEY_EXCHANGE
	.no_dead_strip	_tls_process_certificate
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.tls_process_certificate
l_switch.table.tls_process_certificate:
	.quad	_TLS_ALERT_UNSUPPORTED_CERTIFICATE
	.quad	_TLS_ALERT_UNKNOWN_CA
	.quad	_TLS_ALERT_CERTIFICATE_UNKNOWN
	.quad	_TLS_ALERT_CERTIFICATE_REVOKED
	.quad	_TLS_ALERT_CERTIFICATE_EXPIRED

.subsections_via_symbols
