	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshkey_ecdsa_key_to_nid        ## -- Begin function sshkey_ecdsa_key_to_nid
	.p2align	4, 0x90
_sshkey_ecdsa_key_to_nid:               ## @sshkey_ecdsa_key_to_nid
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_NID_X9_62_prime256v1@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, -60(%rbp)
	movq	_NID_secp384r1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	$-1, -52(%rbp)
	callq	_EC_KEY_get0_group
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_EC_GROUP_get_curve_name
	movl	%eax, %r13d
	testl	%eax, %eax
	jg	LBB0_11
## %bb.1:
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movl	$-1, %r13d
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	cmpl	$-1, %r12d
	je	LBB0_7
## %bb.3:
	leaq	-56(%rbp), %r14
	movl	%r12d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	callq	_EC_GROUP_new_by_curve_name
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_EC_GROUP_cmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_EC_GROUP_free
	movl	(%r14), %r13d
	addq	$4, %r14
	cmpl	$-1, %r13d
	jne	LBB0_4
LBB0_7:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_CTX_free
LBB0_10:
	movl	$-1, %r13d
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_CTX_free
	movq	_OPENSSL_EC_NAMED_CURVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_EC_GROUP_set_asn1_flag
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_EC_KEY_set_group
	cmpl	$1, %eax
	je	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	callq	_EC_GROUP_free
	jmp	LBB0_10
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NID_X9_62_prime256v1,4,2       ## @NID_X9_62_prime256v1
	.comm	_NID_secp384r1,4,2              ## @NID_secp384r1
	.comm	_OPENSSL_EC_NAMED_CURVE,4,2     ## @OPENSSL_EC_NAMED_CURVE
	.comm	_NID_secp521r1,4,2              ## @NID_secp521r1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshkey_ecdsa_key_to_nid        ; -- Begin function sshkey_ecdsa_key_to_nid
	.p2align	2
_sshkey_ecdsa_key_to_nid:               ; @sshkey_ecdsa_key_to_nid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _NID_X9_62_prime256v1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NID_X9_62_prime256v1@GOTPAGEOFF]
Lloh5:
	adrp	x9, _NID_secp384r1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NID_secp384r1@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
Lloh8:
	ldr	w8, [x9]
	stp	w23, w8, [sp, #12]
	mov	w8, #-1
	str	w8, [sp, #20]
	bl	_EC_KEY_get0_group
	mov	x21, x0
	bl	_EC_GROUP_get_curve_name
	mov	x20, x0
	cmp	w0, #0
	b.gt	LBB0_9
; %bb.1:
	bl	_BN_CTX_new
	cbz	x0, LBB0_8
; %bb.2:
	mov	x22, x0
	cmn	w23, #1
	b.eq	LBB0_7
; %bb.3:
	add	x8, sp, #12
	add	x24, x8, #4
	mov	x20, x23
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_EC_GROUP_new_by_curve_name
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	bl	_EC_GROUP_cmp
	cbz	x0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_EC_GROUP_free
	ldr	w20, [x24], #4
	cmn	w20, #1
	b.ne	LBB0_4
LBB0_7:
	mov	x0, x22
	bl	_BN_CTX_free
LBB0_8:
	mov	w20, #-1
LBB0_9:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.10:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	mov	x0, x22
	bl	_BN_CTX_free
Lloh12:
	adrp	x8, _OPENSSL_EC_NAMED_CURVE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OPENSSL_EC_NAMED_CURVE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_EC_GROUP_set_asn1_flag
	mov	x0, x19
	mov	x1, x23
	bl	_EC_KEY_set_group
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.12:
	mov	x0, x23
	bl	_EC_GROUP_free
	b	LBB0_8
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_NID_X9_62_prime256v1,4,2       ; @NID_X9_62_prime256v1
	.comm	_NID_secp384r1,4,2              ; @NID_secp384r1
	.comm	_OPENSSL_EC_NAMED_CURVE,4,2     ; @OPENSSL_EC_NAMED_CURVE
	.comm	_NID_secp521r1,4,2              ; @NID_secp521r1
.subsections_via_symbols
