	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_cli_get_ecdh_params_from_cert
_ssl_cli_get_ecdh_params_from_cert:     ## @ssl_cli_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, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	_MBEDTLS_PK_ECKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mbedtls_pk_can_do
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_mbedtls_pk_ec
	movq	(%r14), %rdi
	movq	_MBEDTLS_ECDH_THEIRS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rsi
	callq	_mbedtls_ecdh_get_params
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_MBEDTLS_SSL_DEBUG_RET
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	%r14, %rdi
	callq	_ssl_check_server_ecdh_params
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_MBEDTLS_SSL_DEBUG_MSG
	movq	_MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"certificate required"

	.comm	_MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE,4,2 ## @MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE
	.comm	_MBEDTLS_PK_ECKEY,4,2           ## @MBEDTLS_PK_ECKEY
L_.str.1:                               ## @.str.1
	.asciz	"server key not ECDH capable"

	.comm	_MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH,4,2 ## @MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH
	.comm	_MBEDTLS_ECDH_THEIRS,4,2        ## @MBEDTLS_ECDH_THEIRS
L_.str.2:                               ## @.str.2
	.asciz	"mbedtls_ecdh_get_params"

L_.str.3:                               ## @.str.3
	.asciz	"bad server certificate (ECDH curve)"

	.comm	_MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE,4,2 ## @MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE
	.no_dead_strip	_ssl_cli_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_cli_get_ecdh_params_from_cert
_ssl_cli_get_ecdh_params_from_cert:     ; @ssl_cli_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
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_4
; %bb.1:
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_5
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_mbedtls_pk_ec
	mov	x1, x0
	ldr	x0, [x19]
Lloh3:
	adrp	x8, _MBEDTLS_ECDH_THEIRS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ECDH_THEIRS@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_mbedtls_ecdh_get_params
	cbz	w0, LBB0_6
; %bb.3:
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_MBEDTLS_SSL_DEBUG_RET
	b	LBB0_9
LBB0_4:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh10:
	adrp	x8, _MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh14:
	adrp	x8, _MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_ssl_check_server_ecdh_params
	cbz	x0, LBB0_10
; %bb.7:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_MBEDTLS_SSL_DEBUG_MSG
Lloh18:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE@GOTPAGEOFF]
LBB0_8:
	ldr	w20, [x8]
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w20, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"certificate required"

	.comm	_MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE,4,2 ; @MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE
	.comm	_MBEDTLS_PK_ECKEY,4,2           ; @MBEDTLS_PK_ECKEY
l_.str.1:                               ; @.str.1
	.asciz	"server key not ECDH capable"

	.comm	_MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH,4,2 ; @MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH
	.comm	_MBEDTLS_ECDH_THEIRS,4,2        ; @MBEDTLS_ECDH_THEIRS
l_.str.2:                               ; @.str.2
	.asciz	"mbedtls_ecdh_get_params"

l_.str.3:                               ; @.str.3
	.asciz	"bad server certificate (ECDH curve)"

	.comm	_MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE,4,2 ; @MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE
	.no_dead_strip	_ssl_cli_get_ecdh_params_from_cert
.subsections_via_symbols
