	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_srv_get_ecdh_params_from_cert
_ssl_srv_get_ecdh_params_from_cert:     ## @ssl_srv_get_ecdh_params_from_cert
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_mbedtls_ssl_own_key
	movq	_MBEDTLS_PK_ECKEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_mbedtls_pk_can_do
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %r14
	movq	%rbx, %rdi
	callq	_mbedtls_ssl_own_key
	movl	(%rax), %edi
	callq	_mbedtls_pk_ec
	movq	_MBEDTLS_ECDH_OURS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mbedtls_ecdh_get_params
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_MBEDTLS_SSL_DEBUG_RET
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_PK_ECKEY,4,2           ## @MBEDTLS_PK_ECKEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"server key not ECDH capable"

	.comm	_MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH,4,2 ## @MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH
	.comm	_MBEDTLS_ECDH_OURS,4,2          ## @MBEDTLS_ECDH_OURS
L_.str.1:                               ## @.str.1
	.asciz	"mbedtls_ecdh_get_params"

	.no_dead_strip	_ssl_srv_get_ecdh_params_from_cert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssl_srv_get_ecdh_params_from_cert
_ssl_srv_get_ecdh_params_from_cert:     ; @ssl_srv_get_ecdh_params_from_cert
	.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	x19, x0
	bl	_mbedtls_ssl_own_key
Lloh0:
	adrp	x8, _MBEDTLS_PK_ECKEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_PK_ECKEY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mbedtls_pk_can_do
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x20, [x19]
	mov	x0, x19
	bl	_mbedtls_ssl_own_key
	ldr	w0, [x0]
	bl	_mbedtls_pk_ec
	mov	x1, x0
Lloh3:
	adrp	x8, _MBEDTLS_ECDH_OURS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ECDH_OURS@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_mbedtls_ecdh_get_params
	mov	x19, x0
	cbz	w0, LBB0_4
; %bb.2:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_MBEDTLS_SSL_DEBUG_RET
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh10:
	adrp	x8, _MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_PK_ECKEY,4,2           ; @MBEDTLS_PK_ECKEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"server key not ECDH capable"

	.comm	_MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH,4,2 ; @MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH
	.comm	_MBEDTLS_ECDH_OURS,4,2          ; @MBEDTLS_ECDH_OURS
l_.str.1:                               ; @.str.1
	.asciz	"mbedtls_ecdh_get_params"

	.no_dead_strip	_ssl_srv_get_ecdh_params_from_cert
.subsections_via_symbols
