	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x25519_key_exchange
_x25519_key_exchange:                   ## @x25519_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	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_X25519_KEY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	cmpl	%ebx, %r12d
	jne	LBB0_1
## %bb.3:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r13
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	shrq	$32, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_x25519_create_keypair
	xorl	%r15d, %r15d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%ebx, %edx
	movq	%r14, %rcx
	movq	%r13, %r8
	callq	_x25519_derive_secret
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	jmp	LBB0_8
LBB0_1:
	movq	_PTLS_ALERT_DECRYPT_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_PTLS_ERROR_NO_MEMORY@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %r15d
	xorl	%r13d, %r13d
LBB0_8:
	leal	(,%r12,4), %esi
	movq	%r14, %rdi
	callq	_ptls_clear_memory
	testq	%r13, %r13
	je	LBB0_11
## %bb.9:
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.10:
	movq	_X25519_KEY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ptls_clear_memory
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_X25519_KEY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ptls_iovec_init
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_8
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_X25519_KEY_SIZE,4,2            ## @X25519_KEY_SIZE
	.comm	_PTLS_ALERT_DECRYPT_ERROR,4,2   ## @PTLS_ALERT_DECRYPT_ERROR
	.comm	_PTLS_ERROR_NO_MEMORY,4,2       ## @PTLS_ERROR_NO_MEMORY
	.no_dead_strip	_x25519_key_exchange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x25519_key_exchange
_x25519_key_exchange:                   ; @x25519_key_exchange
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x24, _X25519_KEY_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _X25519_KEY_SIZE@GOTPAGEOFF]
	ldr	w25, [x24]
	lsl	x8, x25, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	cmp	w25, w23
	b.ne	LBB0_4
; %bb.1:
	mov	x0, x23
	bl	_malloc
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.2:
	lsr	x23, x23, #32
	mov	x0, x19
	mov	x1, x20
	bl	_x25519_create_keypair
	mov	x0, x22
	mov	x1, #0
	mov	x2, x23
	mov	x3, x19
	mov	x4, x20
	bl	_x25519_derive_secret
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_ptls_iovec_init
	str	x0, [x21]
	b	LBB0_7
LBB0_4:
	mov	x20, #0
Lloh7:
	adrp	x8, _PTLS_ALERT_DECRYPT_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PTLS_ALERT_DECRYPT_ERROR@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _PTLS_ERROR_NO_MEMORY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PTLS_ERROR_NO_MEMORY@GOTPAGEOFF]
LBB0_6:
	ldr	w22, [x8]
LBB0_7:
	lsl	w1, w25, #2
	mov	x0, x19
	bl	_ptls_clear_memory
	cbz	x20, LBB0_10
; %bb.8:
	cbz	w22, LBB0_10
; %bb.9:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_ptls_clear_memory
LBB0_10:
	ldur	x8, [x29, #-72]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x22
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_X25519_KEY_SIZE,4,2            ; @X25519_KEY_SIZE
	.comm	_PTLS_ALERT_DECRYPT_ERROR,4,2   ; @PTLS_ALERT_DECRYPT_ERROR
	.comm	_PTLS_ERROR_NO_MEMORY,4,2       ; @PTLS_ERROR_NO_MEMORY
	.no_dead_strip	_x25519_key_exchange
.subsections_via_symbols
