	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eckey_priv_encode
_eckey_priv_encode:                     ## @eckey_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	leaq	-40(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	callq	_eckey_param2type
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	leaq	-36(%rbp), %r15
	movq	%r15, %rdi
	callq	_EC_KEY_get_enc_flags
	movq	_EC_PKEY_NO_PARAMETERS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_EC_KEY_set_enc_flags
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_i2d_ECPrivateKey
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_OPENSSL_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	%rax, -56(%rbp)
	leaq	-36(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_i2d_ECPrivateKey
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	_NID_X9_62_id_ecPublicKey@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OBJ_nid2obj
	movl	-40(%rbp), %ecx
	movq	-48(%rbp), %r8
	movl	%r12d, (%rsp)
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	movq	%r15, %r9
	callq	_PKCS8_pkey_set0
	movl	$1, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movq	%r15, %rdi
	callq	_OPENSSL_free
	jmp	LBB0_11
LBB0_1:
	movq	_EC_F_ECKEY_PRIV_ENCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_DECODE_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_EC_F_ECKEY_PRIV_ENCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_EC_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	jmp	LBB0_12
LBB0_6:
	movq	_EC_F_ECKEY_PRIV_ENCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_8:
	movq	%r15, %rdi
	callq	_OPENSSL_free
	movq	_EC_F_ECKEY_PRIV_ENCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_EC_LIB@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	callq	_ECerr
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_ECKEY_PRIV_ENCODE,4,2     ## @EC_F_ECKEY_PRIV_ENCODE
	.comm	_EC_R_DECODE_ERROR,4,2          ## @EC_R_DECODE_ERROR
	.comm	_EC_PKEY_NO_PARAMETERS,4,2      ## @EC_PKEY_NO_PARAMETERS
	.comm	_ERR_R_EC_LIB,4,2               ## @ERR_R_EC_LIB
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_NID_X9_62_id_ecPublicKey,4,2   ## @NID_X9_62_id_ecPublicKey
	.no_dead_strip	_eckey_priv_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eckey_priv_encode
_eckey_priv_encode:                     ; @eckey_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
	mov	x19, x0
	ldr	x8, [x1]
	ldr	w8, [x8]
	str	w8, [sp, #28]
	add	x0, sp, #12
	mov	x1, sp
	add	x2, sp, #28
	bl	_eckey_param2type
	cbz	w0, LBB0_6
; %bb.1:
	add	x0, sp, #28
	bl	_EC_KEY_get_enc_flags
Lloh0:
	adrp	x8, _EC_PKEY_NO_PARAMETERS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_PKEY_NO_PARAMETERS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w1, w8, w0
	add	x0, sp, #28
	bl	_EC_KEY_set_enc_flags
	add	x0, sp, #28
	mov	x1, #0
	bl	_i2d_ECPrivateKey
	cbz	w0, LBB0_9
; %bb.2:
	mov	x21, x0
	bl	_OPENSSL_malloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x20, x0
	str	x0, [sp, #16]
	add	x0, sp, #28
	add	x1, sp, #16
	bl	_i2d_ECPrivateKey
	cbz	w0, LBB0_8
; %bb.4:
Lloh3:
	adrp	x8, _NID_X9_62_id_ecPublicKey@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NID_X9_62_id_ecPublicKey@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_OBJ_nid2obj
	mov	x1, x0
	ldr	w3, [sp, #12]
	ldr	x4, [sp]
	mov	x0, x19
	mov	w2, #0
	mov	x5, x20
	mov	x6, x21
	bl	_PKCS8_pkey_set0
	cbz	w0, LBB0_13
; %bb.5:
	mov	w0, #1
	b	LBB0_12
LBB0_6:
Lloh6:
	adrp	x8, _EC_F_ECKEY_PRIV_ENCODE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EC_F_ECKEY_PRIV_ENCODE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _EC_R_DECODE_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EC_R_DECODE_ERROR@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh11:
	adrp	x8, _EC_F_ECKEY_PRIV_ENCODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EC_F_ECKEY_PRIV_ENCODE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_OPENSSL_free
LBB0_9:
Lloh16:
	adrp	x8, _EC_F_ECKEY_PRIV_ENCODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EC_F_ECKEY_PRIV_ENCODE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _ERR_R_EC_LIB@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERR_R_EC_LIB@GOTPAGEOFF]
LBB0_10:
	ldr	w1, [x8]
	bl	_ECerr
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
LBB0_13:
	mov	x0, x20
	bl	_OPENSSL_free
	b	LBB0_11
	.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
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_ECKEY_PRIV_ENCODE,4,2     ; @EC_F_ECKEY_PRIV_ENCODE
	.comm	_EC_R_DECODE_ERROR,4,2          ; @EC_R_DECODE_ERROR
	.comm	_EC_PKEY_NO_PARAMETERS,4,2      ; @EC_PKEY_NO_PARAMETERS
	.comm	_ERR_R_EC_LIB,4,2               ; @ERR_R_EC_LIB
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_NID_X9_62_id_ecPublicKey,4,2   ; @NID_X9_62_id_ecPublicKey
	.no_dead_strip	_eckey_priv_encode
.subsections_via_symbols
