	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ecx_priv_encode
_ecx_priv_encode:                       ## @ecx_priv_encode
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rsi), %rax
	movq	$0, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rax, -40(%rbp)
	movq	%rsi, %rdi
	callq	_KEYLEN
	movl	%eax, -48(%rbp)
	movq	$0, -56(%rbp)
	leaq	-56(%rbp), %rdi
	leaq	-32(%rbp), %rsi
	callq	_i2d_ASN1_OCTET_STRING
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_OBJ_nid2obj
	movq	_V_ASN1_UNDEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-32(%rbp), %r9
	movl	%r15d, (%rsp)
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_PKCS8_pkey_set0
	movl	%eax, %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jne	LBB0_8
## %bb.5:
	movq	-32(%rbp), %rdi
	movl	%r15d, %esi
	callq	_OPENSSL_clear_free
LBB0_6:
	movq	_EC_F_ECX_PRIV_ENCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_EC_F_ECX_PRIV_ENCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_INVALID_PRIVATE_KEY@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	callq	_ECerr
	xorl	%eax, %eax
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_ECX_PRIV_ENCODE,4,2       ## @EC_F_ECX_PRIV_ENCODE
	.comm	_EC_R_INVALID_PRIVATE_KEY,4,2   ## @EC_R_INVALID_PRIVATE_KEY
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_V_ASN1_UNDEF,4,2               ## @V_ASN1_UNDEF
	.no_dead_strip	_ecx_priv_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ecx_priv_encode
_ecx_priv_encode:                       ; @ecx_priv_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x1, #8]
	str	xzr, [sp]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x20, x1
	mov	x19, x0
	str	x8, [sp, #24]
	mov	x0, x1
	bl	_KEYLEN
	str	w0, [sp, #16]
	str	xzr, [sp, #8]
	add	x0, sp, #8
	mov	x1, sp
	bl	_i2d_ASN1_OCTET_STRING
	tbnz	w0, #31, LBB0_7
; %bb.3:
	mov	x21, x0
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_OBJ_nid2obj
	mov	x1, x0
Lloh0:
	adrp	x8, _V_ASN1_UNDEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V_ASN1_UNDEF@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	ldr	x5, [sp]
	mov	x0, x19
	mov	w2, #0
	mov	x4, #0
	mov	x6, x21
	bl	_PKCS8_pkey_set0
	cbz	w0, LBB0_6
; %bb.4:
	mov	w0, #1
	b	LBB0_9
LBB0_5:
Lloh3:
	adrp	x8, _EC_F_ECX_PRIV_ENCODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_F_ECX_PRIV_ENCODE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _EC_R_INVALID_PRIVATE_KEY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EC_R_INVALID_PRIVATE_KEY@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	x0, [sp]
	mov	x1, x21
	bl	_OPENSSL_clear_free
LBB0_7:
Lloh8:
	adrp	x8, _EC_F_ECX_PRIV_ENCODE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EC_F_ECX_PRIV_ENCODE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	bl	_ECerr
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_ECX_PRIV_ENCODE,4,2       ; @EC_F_ECX_PRIV_ENCODE
	.comm	_EC_R_INVALID_PRIVATE_KEY,4,2   ; @EC_R_INVALID_PRIVATE_KEY
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_V_ASN1_UNDEF,4,2               ; @V_ASN1_UNDEF
	.no_dead_strip	_ecx_priv_encode
.subsections_via_symbols
