	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x9_62_create_key_exchange
_x9_62_create_key_exchange:             ## @x9_62_create_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$0, -32(%rbp)
	movl	(%rdi), %edi
	callq	_EC_GROUP_new_by_curve_name
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r15
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_x9_62_create_context
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	%r15, %rdi
	callq	_ecdh_gerenate_key
	movq	-32(%rbp), %rdi
	movq	%rax, 8(%rdi)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	callq	_x9_62_setup_pubkey
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_4:
	movq	_PTLS_ERROR_LIBRARY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_7
LBB0_3:
	movq	_PTLS_ERROR_LIBRARY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movq	%r15, %rdi
	callq	_EC_GROUP_free
LBB0_7:
	movq	-32(%rbp), %rdi
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.8:
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_x9_62_free_context
LBB0_10:
	xorl	%edi, %edi
LBB0_11:
	movq	%rdi, (%r14)
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTLS_ERROR_LIBRARY,4,2         ## @PTLS_ERROR_LIBRARY
	.no_dead_strip	_x9_62_create_key_exchange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x9_62_create_key_exchange
_x9_62_create_key_exchange:             ; @x9_62_create_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	x19, x1
	mov	x20, x0
	str	xzr, [sp, #8]
	ldr	w0, [x0]
	bl	_EC_GROUP_new_by_curve_name
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	add	x1, sp, #8
	mov	x0, x20
	bl	_x9_62_create_context
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x21
	bl	_ecdh_gerenate_key
	mov	x8, x0
	ldr	x0, [sp, #8]
	str	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.3:
	bl	_x9_62_setup_pubkey
	mov	x20, x0
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _PTLS_ERROR_LIBRARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTLS_ERROR_LIBRARY@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	x0, [sp, #8]
	cbnz	w20, LBB0_7
	b	LBB0_9
LBB0_5:
Lloh3:
	adrp	x8, _PTLS_ERROR_LIBRARY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PTLS_ERROR_LIBRARY@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
LBB0_6:
	mov	x0, x21
	bl	_EC_GROUP_free
	ldr	x0, [sp, #8]
	cbz	w20, LBB0_9
LBB0_7:
	cbz	x0, LBB0_9
; %bb.8:
	bl	_x9_62_free_context
	mov	x0, #0
LBB0_9:
	str	x0, [x19]
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PTLS_ERROR_LIBRARY,4,2         ; @PTLS_ERROR_LIBRARY
	.no_dead_strip	_x9_62_create_key_exchange
.subsections_via_symbols
