	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_openssl_create_key_exchange ## -- Begin function ptls_openssl_create_key_exchange
	.p2align	4, 0x90
_ptls_openssl_create_key_exchange:      ## @ptls_openssl_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, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_EVP_PKEY_id
	cmpl	$132, %eax
	jne	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_EVP_PKEY_get1_EC_KEY
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_EC_KEY_get0_group
	movl	%eax, %edi
	callq	_EC_GROUP_get_curve_name
	cmpl	$130, %eax
	jne	LBB0_5
## %bb.2:
	movq	_ptls_openssl_secp256r1@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_x9_62_init_key
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_EC_KEY_free
	jmp	LBB0_7
LBB0_5:
	movq	%r15, %rdi
	callq	_EC_KEY_free
LBB0_6:
	movq	_PTLS_ERROR_INCOMPATIBLE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ptls_openssl_secp256r1,4,2     ## @ptls_openssl_secp256r1
	.comm	_PTLS_ERROR_INCOMPATIBLE_KEY,4,2 ## @PTLS_ERROR_INCOMPATIBLE_KEY
	.comm	_ptls_openssl_secp384r1,4,2     ## @ptls_openssl_secp384r1
	.comm	_ptls_openssl_secp521r1,4,2     ## @ptls_openssl_secp521r1
	.comm	_ptls_openssl_x25519,4,2        ## @ptls_openssl_x25519
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_openssl_create_key_exchange ; -- Begin function ptls_openssl_create_key_exchange
	.p2align	2
_ptls_openssl_create_key_exchange:      ; @ptls_openssl_create_key_exchange
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_EVP_PKEY_id
	cmp	w0, #132
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_EVP_PKEY_get1_EC_KEY
	mov	x20, x0
	bl	_EC_KEY_get0_group
	bl	_EC_GROUP_get_curve_name
	cmp	w0, #130
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, _ptls_openssl_secp256r1@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ptls_openssl_secp256r1@GOTPAGEOFF]
	mov	x1, x19
	mov	x2, x20
	bl	_x9_62_init_key
	mov	x19, x0
	cbz	w0, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_EC_KEY_free
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_EC_KEY_free
LBB0_5:
Lloh2:
	adrp	x8, _PTLS_ERROR_INCOMPATIBLE_KEY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PTLS_ERROR_INCOMPATIBLE_KEY@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ptls_openssl_secp256r1,4,2     ; @ptls_openssl_secp256r1
	.comm	_PTLS_ERROR_INCOMPATIBLE_KEY,4,2 ; @PTLS_ERROR_INCOMPATIBLE_KEY
	.comm	_ptls_openssl_secp384r1,4,2     ; @ptls_openssl_secp384r1
	.comm	_ptls_openssl_secp521r1,4,2     ; @ptls_openssl_secp521r1
	.comm	_ptls_openssl_x25519,4,2        ; @ptls_openssl_x25519
.subsections_via_symbols
