	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssl_set_pkey
_ssl_set_pkey:                          ## @ssl_set_pkey
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ssl_cert_lookup_by_pkey
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	(%r14), %rax
	movq	-24(%rbp), %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.2:
	callq	_X509_get0_pubkey
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_EVP_PKEY_copy_parameters
	xorl	%eax, %eax
	callq	_ERR_clear_error
	movq	%rbx, %rdi
	callq	_EVP_PKEY_id
	movq	_EVP_PKEY_RSA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_EVP_PKEY_get0_RSA
	movl	%eax, %edi
	callq	_RSA_flags
	movq	_RSA_METHOD_FLAG_NO_CHECK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
LBB0_5:
	movq	(%r14), %rax
	movq	-24(%rbp), %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rdi
	movq	%rbx, %rsi
	callq	_X509_check_private_key
	testl	%eax, %eax
	je	LBB0_12
LBB0_6:
	movq	(%r14), %rax
	movq	-24(%rbp), %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rdi
	callq	_EVP_PKEY_free
	movq	%rbx, %rdi
	callq	_EVP_PKEY_up_ref
	movq	(%r14), %rax
	movq	-24(%rbp), %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rdx
	movq	%rbx, (%rax,%rcx)
	movq	%rdx, 8(%r14)
	movl	$1, %eax
	jmp	LBB0_11
LBB0_7:
	movq	_SSL_F_SSL_SET_PKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SSL_R_UNKNOWN_CERTIFICATE_TYPE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_SSL_F_SSL_SET_PKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	callq	_SSLerr
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	movq	(%r14), %rax
	movq	-24(%rbp), %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rdi
	callq	_X509_free
	movq	(%r14), %rax
	movq	-24(%rbp), %rcx
	shlq	$4, %rcx
	movq	$0, 8(%rax,%rcx)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL_F_SSL_SET_PKEY,4,2         ## @SSL_F_SSL_SET_PKEY
	.comm	_SSL_R_UNKNOWN_CERTIFICATE_TYPE,4,2 ## @SSL_R_UNKNOWN_CERTIFICATE_TYPE
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_EVP_PKEY_RSA,8,3               ## @EVP_PKEY_RSA
	.comm	_RSA_METHOD_FLAG_NO_CHECK,4,2   ## @RSA_METHOD_FLAG_NO_CHECK
	.no_dead_strip	_ssl_set_pkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssl_set_pkey
_ssl_set_pkey:                          ; @ssl_set_pkey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	add	x1, sp, #8
	mov	x0, x20
	bl	_ssl_cert_lookup_by_pkey
	cbz	x0, LBB0_7
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	add	x8, x8, x9, lsl #4
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_6
; %bb.2:
	bl	_X509_get0_pubkey
	cbz	x0, LBB0_8
; %bb.3:
	mov	x1, x20
	bl	_EVP_PKEY_copy_parameters
	bl	_ERR_clear_error
	mov	x0, x20
	bl	_EVP_PKEY_id
Lloh0:
	adrp	x8, _EVP_PKEY_RSA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVP_PKEY_RSA@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_EVP_PKEY_get0_RSA
	bl	_RSA_flags
Lloh3:
	adrp	x8, _RSA_METHOD_FLAG_NO_CHECK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RSA_METHOD_FLAG_NO_CHECK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_6
LBB0_5:
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	add	x8, x8, x9, lsl #4
	ldr	x0, [x8, #8]
	mov	x1, x20
	bl	_X509_check_private_key
	cbz	w0, LBB0_11
LBB0_6:
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	lsl	x9, x9, #4
	ldr	x0, [x8, x9]
	bl	_EVP_PKEY_free
	mov	x0, x20
	bl	_EVP_PKEY_up_ref
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	add	x8, x8, x9, lsl #4
	str	x20, [x8]
	str	x8, [x19, #8]
	mov	w0, #1
	b	LBB0_10
LBB0_7:
Lloh6:
	adrp	x8, _SSL_F_SSL_SET_PKEY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSL_F_SSL_SET_PKEY@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _SSL_R_UNKNOWN_CERTIFICATE_TYPE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSL_R_UNKNOWN_CERTIFICATE_TYPE@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x8, _SSL_F_SSL_SET_PKEY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSL_F_SSL_SET_PKEY@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	bl	_SSLerr
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	add	x8, x8, x9, lsl #4
	ldr	x0, [x8, #8]
	bl	_X509_free
	mov	w0, #0
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	add	x8, x8, x9, lsl #4
	str	xzr, [x8, #8]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL_F_SSL_SET_PKEY,4,2         ; @SSL_F_SSL_SET_PKEY
	.comm	_SSL_R_UNKNOWN_CERTIFICATE_TYPE,4,2 ; @SSL_R_UNKNOWN_CERTIFICATE_TYPE
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_EVP_PKEY_RSA,8,3               ; @EVP_PKEY_RSA
	.comm	_RSA_METHOD_FLAG_NO_CHECK,4,2   ; @RSA_METHOD_FLAG_NO_CHECK
	.no_dead_strip	_ssl_set_pkey
.subsections_via_symbols
