	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ecdsa_generate_private_key
_ecdsa_generate_private_key:            ## @ecdsa_generate_private_key
	.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
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rdx, %r15
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.3:
	movq	%rsi, %rbx
	callq	_sshkey_ecdsa_bits_to_nid
	movl	%eax, (%rbx)
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movq	$0, (%r15)
	movl	%eax, %edi
	callq	_EC_KEY_new_by_curve_name
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_EC_KEY_generate_key
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.9:
	movq	_OPENSSL_EC_NAMED_CURVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_EC_KEY_set_asn1_flag
	movq	%r14, (%r15)
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_2:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_11
LBB0_4:
	movq	_SSH_ERR_KEY_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_8:
	movq	_SSH_ERR_LIBCRYPTO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_EC_KEY_free
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ## @SSH_ERR_INTERNAL_ERROR
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_KEY_LENGTH,4,2         ## @SSH_ERR_KEY_LENGTH
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ## @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_OPENSSL_EC_NAMED_CURVE,4,2     ## @OPENSSL_EC_NAMED_CURVE
	.no_dead_strip	_ecdsa_generate_private_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ecdsa_generate_private_key
_ecdsa_generate_private_key:            ; @ecdsa_generate_private_key
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x1, LBB0_6
; %bb.1:
	mov	x19, x2
	cbz	x2, LBB0_6
; %bb.2:
	mov	x20, x1
	bl	_sshkey_ecdsa_bits_to_nid
	str	w0, [x20]
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.3:
	str	xzr, [x19]
	bl	_EC_KEY_new_by_curve_name
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.4:
	mov	x0, x20
	bl	_EC_KEY_generate_key
	cmp	w0, #1
	b.ne	LBB0_9
; %bb.5:
Lloh0:
	adrp	x8, _OPENSSL_EC_NAMED_CURVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OPENSSL_EC_NAMED_CURVE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_EC_KEY_set_asn1_flag
	mov	w21, #0
	str	x20, [x19]
	mov	x20, #0
	b	LBB0_11
LBB0_6:
Lloh3:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	b	LBB0_12
LBB0_7:
Lloh6:
	adrp	x8, _SSH_ERR_KEY_LENGTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSH_ERR_KEY_LENGTH@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	b	LBB0_12
LBB0_8:
Lloh9:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGEOFF]
LBB0_10:
	ldr	w21, [x8]
LBB0_11:
	mov	x0, x20
	bl	_EC_KEY_free
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ; @SSH_ERR_INTERNAL_ERROR
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_KEY_LENGTH,4,2         ; @SSH_ERR_KEY_LENGTH
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ; @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_OPENSSL_EC_NAMED_CURVE,4,2     ; @OPENSSL_EC_NAMED_CURVE
	.no_dead_strip	_ecdsa_generate_private_key
.subsections_via_symbols
