	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_write_client_key_exchange
_tls_write_client_key_exchange:         ## @tls_write_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	4(%rdi), %edi
	callq	_tls_get_cipher_suite
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_TLS_KEY_X_NULL@GOTPCREL(%rip), %rax
LBB0_2:
	movq	(%rax), %r12
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r15
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	_TLS_RECORD_HEADER_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %r14
	movq	_TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15,%r14,4)
	leaq	(%r15,%r14,4), %rax
	addq	$16, %rax
	movq	%rax, -48(%rbp)
	movq	_TLS_KEY_X_DH_anon@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_6
## %bb.3:
	movq	_TLS_KEY_X_DHE_RSA@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_6
## %bb.4:
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_tlsv1_key_x_rsa
	testq	%rax, %rax
	jns	LBB0_7
	jmp	LBB0_10
LBB0_6:
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_tlsv1_key_x_dh
	testq	%rax, %rax
	js	LBB0_10
LBB0_7:
	leaq	4(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %r12
	leaq	(%r15,%r14,4), %r13
	leaq	(%r15,%r14,4), %rdi
	addq	$4, %rdi
	movq	-48(%rbp), %rsi
	subq	%rdi, %rsi
	shrq	$2, %rsi
	addl	$-3, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_WPA_PUT_BE24
	movq	_TLS_CONTENT_TYPE_HANDSHAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subq	%r15, %rbx
	shrq	$2, %rbx
	movq	-48(%rbp), %r9
	subq	%r13, %r9
	shrq	$2, %r9
	leaq	-72(%rbp), %rax
	movq	%rax, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%ebx, %ecx
	movq	%r13, %r8
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_tlsv1_record_send
	testq	%rax, %rax
	js	LBB0_9
## %bb.8:
	movq	-72(%rbp), %rax
	leaq	(%r15,%rax,4), %rdx
	movq	%rdx, -48(%rbp)
	subq	%r13, %rdx
	shrq	$2, %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_tls_verify_hash_add
	movq	-48(%rbp), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_tls_alert
LBB0_10:
	movl	$-1, %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_KEY_X_NULL,8,3             ## @TLS_KEY_X_NULL
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TLSv1: Send ClientKeyExchange"

	.comm	_TLS_RECORD_HEADER_LEN,4,2      ## @TLS_RECORD_HEADER_LEN
	.comm	_TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE,4,2 ## @TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE
	.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	_TLS_CONTENT_TYPE_HANDSHAKE,4,2 ## @TLS_CONTENT_TYPE_HANDSHAKE
L_.str.1:                               ## @.str.1
	.asciz	"TLSv1: Failed to create a record"

	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ## @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_INTERNAL_ERROR,4,2   ## @TLS_ALERT_INTERNAL_ERROR
	.no_dead_strip	_tls_write_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_write_client_key_exchange
_tls_write_client_key_exchange:         ; @tls_write_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	x24, x2
	mov	x20, x1
	mov	x19, x0
	mov	x21, x0
	ldr	w0, [x21, #4]!
	bl	_tls_get_cipher_suite
Lloh0:
	adrp	x8, _TLS_KEY_X_NULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLS_KEY_X_NULL@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x0, eq
	ldr	x26, [x8]
	ldr	x22, [x20]
Lloh2:
	adrp	x25, _MSG_DEBUG@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
Lloh6:
	adrp	x8, _TLS_RECORD_HEADER_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TLS_RECORD_HEADER_LEN@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	add	x23, x22, x8, lsl #2
Lloh9:
	adrp	x8, _TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	x9, x23
	str	w8, [x9], #16
	str	x9, [sp, #8]
Lloh12:
	adrp	x8, _TLS_KEY_X_DH_anon@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TLS_KEY_X_DH_anon@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _TLS_KEY_X_DHE_RSA@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TLS_KEY_X_DHE_RSA@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x26, x8
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x24
	ccmp	x26, x9, #4, ne
	b.ne	LBB0_2
; %bb.1:
	bl	_tlsv1_key_x_dh
	tbz	x0, #63, LBB0_3
	b	LBB0_6
LBB0_2:
	bl	_tlsv1_key_x_rsa
	tbnz	x0, #63, LBB0_6
LBB0_3:
	add	x0, x23, #4
	ldr	x8, [sp, #8]
	sub	x8, x8, x0
	lsr	x8, x8, #2
	sub	w1, w8, #3
	bl	_WPA_PUT_BE24
Lloh18:
	adrp	x8, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	sub	x8, x24, x22
	lsr	x3, x8, #2
	ldr	x8, [sp, #8]
	sub	x8, x8, x23
	lsr	x5, x8, #2
	mov	x6, sp
	mov	x0, x21
	mov	x2, x22
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	x4, x23
                                        ; kill: def $w5 killed $w5 killed $x5
	bl	_tlsv1_record_send
	tbnz	x0, #63, LBB0_5
; %bb.4:
	ldr	x8, [sp]
	add	x8, x22, x8, lsl #2
	str	x8, [sp, #8]
	sub	x8, x8, x23
	lsr	x2, x8, #2
	mov	x0, x19
	mov	x1, x23
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_tls_verify_hash_add
	mov	w0, #0
	ldr	x8, [sp, #8]
	str	x8, [x20]
	b	LBB0_7
LBB0_5:
	ldr	w0, [x25]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
Lloh23:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _TLS_ALERT_INTERNAL_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TLS_ALERT_INTERNAL_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tls_alert
LBB0_6:
	mov	w0, #-1
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_KEY_X_NULL,8,3             ; @TLS_KEY_X_NULL
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TLSv1: Send ClientKeyExchange"

	.comm	_TLS_RECORD_HEADER_LEN,4,2      ; @TLS_RECORD_HEADER_LEN
	.comm	_TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE,4,2 ; @TLS_HANDSHAKE_TYPE_CLIENT_KEY_EXCHANGE
	.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	_TLS_CONTENT_TYPE_HANDSHAKE,4,2 ; @TLS_CONTENT_TYPE_HANDSHAKE
l_.str.1:                               ; @.str.1
	.asciz	"TLSv1: Failed to create a record"

	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ; @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_INTERNAL_ERROR,4,2   ; @TLS_ALERT_INTERNAL_ERROR
	.no_dead_strip	_tls_write_client_key_exchange
.subsections_via_symbols
