	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_process_client_key_exchange
_tls_process_client_key_exchange:       ## @tls_process_client_key_exchange
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_TLS_CONTENT_TYPE_HANDSHAKE@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	%rcx, %r14
	movq	(%rcx), %rbx
	cmpq	$3, %rbx
	ja	LBB0_5
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	jmp	LBB0_7
LBB0_3:
	movq	%rsi, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
LBB0_4:
	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_8
LBB0_5:
	movq	%rdx, %r15
	leaq	8(%rdx), %rdi
	movq	(%rdx), %r13
	callq	_WPA_GET_BE24
	movq	%rax, %rcx
	addq	$-4, %rbx
	cmpq	%rbx, %rax
	jbe	LBB0_11
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movq	%rcx, %rdx
	movq	%rbx, %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	%r12, %rdi
	callq	_tlsv1_server_alert
LBB0_9:
	movl	$-1, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_22
## %bb.12:
	leaq	32(%r15), %r13
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	%rcx, %rbx
	callq	_tlsv1_server_log
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rcx
	callq	_wpa_hexdump
	movl	4(%r12), %edi
	callq	_tls_get_cipher_suite
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	_TLS_KEY_X_NULL@GOTPCREL(%rip), %rax
LBB0_14:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r13,%rcx,8), %r13
	movq	(%rax), %rbx
	movq	_TLS_KEY_X_DH_anon@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_TLS_KEY_X_DHE_RSA@GOTPCREL(%rip), %rcx
	cmpq	%rax, %rbx
	je	LBB0_16
## %bb.15:
	movq	(%rcx), %rcx
	cmpq	%rcx, %rbx
	jne	LBB0_18
LBB0_16:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_tls_process_client_key_exchange_dh
	testq	%rax, %rax
	js	LBB0_9
## %bb.17:
	movq	_TLS_KEY_X_DH_anon@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_TLS_KEY_X_DHE_RSA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_18:
	cmpq	%rax, %rbx
	je	LBB0_21
## %bb.19:
	cmpq	%rcx, %rbx
	je	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_tls_process_client_key_exchange_rsa
	testq	%rax, %rax
	js	LBB0_9
LBB0_21:
	subq	%r15, %r13
	sarq	$3, %r13
	movq	%r13, (%r14)
	movq	_CERTIFICATE_VERIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_22:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movq	%r13, %rdx
	jmp	LBB0_4
	.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 ClientKeyExchange (Left=%lu)"

	.comm	_TLS_ALERT_DECODE_ERROR,4,2     ## @TLS_ALERT_DECODE_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"Mismatch in ClientKeyExchange 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	"Received unexpected handshake message %d (expected ClientKeyExchange)"

L_.str.4:                               ## @.str.4
	.asciz	"Received ClientKeyExchange"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.5:                               ## @.str.5
	.asciz	"TLSv1: ClientKeyExchange"

	.comm	_TLS_KEY_X_NULL,8,3             ## @TLS_KEY_X_NULL
	.comm	_TLS_KEY_X_DH_anon,8,3          ## @TLS_KEY_X_DH_anon
	.comm	_TLS_KEY_X_DHE_RSA,8,3          ## @TLS_KEY_X_DHE_RSA
	.comm	_CERTIFICATE_VERIFY,4,2         ## @CERTIFICATE_VERIFY
	.no_dead_strip	_tls_process_client_key_exchange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_process_client_key_exchange
_tls_process_client_key_exchange:       ; @tls_process_client_key_exchange
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	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	x1, [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	x21, x2
	add	x0, x2, #8
	mov	x22, x2
	ldr	x23, [x22], #32
	bl	_WPA_GET_BE24
	mov	x24, x0
	sub	x8, x25, #4
	cmp	x0, x8
	b.ls	LBB0_11
; %bb.6:
	stp	x24, x8, [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, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	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	x23, x8
	b.ne	LBB0_18
; %bb.12:
	add	x23, x22, x24, lsl #3
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_tlsv1_server_log
Lloh24:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x22
	mov	x3, x24
	bl	_wpa_hexdump
	ldr	w0, [x19, #4]
	bl	_tls_get_cipher_suite
Lloh29:
	adrp	x8, _TLS_KEY_X_NULL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TLS_KEY_X_NULL@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x0, eq
	ldr	x24, [x8]
Lloh31:
	adrp	x25, _TLS_KEY_X_DH_anon@GOTPAGE
Lloh32:
	ldr	x25, [x25, _TLS_KEY_X_DH_anon@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh33:
	adrp	x26, _TLS_KEY_X_DHE_RSA@GOTPAGE
Lloh34:
	ldr	x26, [x26, _TLS_KEY_X_DHE_RSA@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x24, x8
	ccmp	x24, x9, #4, ne
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_tls_process_client_key_exchange_dh
	tbnz	x0, #63, LBB0_9
; %bb.14:
	ldr	x8, [x25]
	ldr	x9, [x26]
LBB0_15:
	cmp	x24, x8
	ccmp	x24, x9, #4, ne
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_tls_process_client_key_exchange_rsa
	tbnz	x0, #63, LBB0_9
LBB0_17:
	mov	w0, #0
	sub	x8, x23, x21
	asr	x8, x8, #3
	str	x8, [x20]
Lloh35:
	adrp	x8, _CERTIFICATE_VERIFY@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CERTIFICATE_VERIFY@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_10
LBB0_18:
	str	x23, [sp]
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
	.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 AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.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 ClientKeyExchange (Left=%lu)"

	.comm	_TLS_ALERT_DECODE_ERROR,4,2     ; @TLS_ALERT_DECODE_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"Mismatch in ClientKeyExchange 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	"Received unexpected handshake message %d (expected ClientKeyExchange)"

l_.str.4:                               ; @.str.4
	.asciz	"Received ClientKeyExchange"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.5:                               ; @.str.5
	.asciz	"TLSv1: ClientKeyExchange"

	.comm	_TLS_KEY_X_NULL,8,3             ; @TLS_KEY_X_NULL
	.comm	_TLS_KEY_X_DH_anon,8,3          ; @TLS_KEY_X_DH_anon
	.comm	_TLS_KEY_X_DHE_RSA,8,3          ; @TLS_KEY_X_DHE_RSA
	.comm	_CERTIFICATE_VERIFY,4,2         ; @CERTIFICATE_VERIFY
	.no_dead_strip	_tls_process_client_key_exchange
.subsections_via_symbols
