	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_send_client_key_exchange
_tls_send_client_key_exchange:          ## @tls_send_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
	pushq	%rax
	.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, %r15
	movq	$0, (%rsi)
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_tls_client_cert_chain_der_len
	movq	%rax, %rbx
	addq	$2000, %rbx                     ## imm = 0x7D0
	jmp	LBB0_3
LBB0_2:
	movl	$2000, %ebx                     ## imm = 0x7D0
LBB0_3:
	movq	%rbx, %rdi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	movq	%rax, %r13
	movq	%rax, -48(%rbp)
	leaq	(%rax,%rbx,4), %r12
	cmpq	$0, 16(%r15)
	je	LBB0_6
## %bb.5:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_tls_write_client_certificate
	testq	%rax, %rax
	js	LBB0_14
LBB0_6:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_tls_write_client_key_exchange
	testq	%rax, %rax
	js	LBB0_14
## %bb.7:
	cmpq	$0, 16(%r15)
	je	LBB0_11
## %bb.8:
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_tls_write_client_certificate_verify
	testq	%rax, %rax
	js	LBB0_14
LBB0_11:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_tls_write_client_change_cipher_spec
	testq	%rax, %rax
	js	LBB0_14
## %bb.12:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_tls_write_client_finished
	testq	%rax, %rax
	js	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rax
	subq	%r13, %rax
	sarq	$2, %rax
	movq	%rax, (%r14)
	movq	_SERVER_CHANGE_CIPHER_SPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	jmp	LBB0_16
LBB0_14:
	movq	%r13, %rdi
	callq	_os_free
LBB0_15:
	xorl	%r13d, %r13d
LBB0_16:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERVER_CHANGE_CIPHER_SPEC,4,2  ## @SERVER_CHANGE_CIPHER_SPEC
	.no_dead_strip	_tls_send_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_send_client_key_exchange
_tls_send_client_key_exchange:          ; @tls_send_client_key_exchange
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	str	xzr, [x1]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_tls_client_cert_chain_der_len
	add	x22, x0, #2000
	b	LBB0_3
LBB0_2:
	mov	w22, #2000
LBB0_3:
	mov	x0, x22
	bl	_os_malloc
	mov	x21, x0
	cbz	x0, LBB0_15
; %bb.4:
	str	x21, [sp, #8]
	add	x22, x21, x22, lsl #2
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.5:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x22
	bl	_tls_write_client_certificate
	tbnz	x0, #63, LBB0_14
LBB0_6:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x22
	bl	_tls_write_client_key_exchange
	tbnz	x0, #63, LBB0_14
; %bb.7:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_11
; %bb.8:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_11
; %bb.9:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.10:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x22
	bl	_tls_write_client_certificate_verify
	tbnz	x0, #63, LBB0_14
LBB0_11:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x22
	bl	_tls_write_client_change_cipher_spec
	tbnz	x0, #63, LBB0_14
; %bb.12:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x22
	bl	_tls_write_client_finished
	tbnz	x0, #63, LBB0_14
; %bb.13:
	ldr	x8, [sp, #8]
	sub	x8, x8, x21
	asr	x8, x8, #2
	str	x8, [x20]
Lloh0:
	adrp	x8, _SERVER_CHANGE_CIPHER_SPEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SERVER_CHANGE_CIPHER_SPEC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_15
LBB0_14:
	mov	x0, x21
	bl	_os_free
	mov	x21, #0
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SERVER_CHANGE_CIPHER_SPEC,4,2  ; @SERVER_CHANGE_CIPHER_SPEC
	.no_dead_strip	_tls_send_client_key_exchange
.subsections_via_symbols
