	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsa_priv_encode
_rsa_priv_encode:                       ## @rsa_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	%rsi, %rbx
	movq	%rdi, %r14
	movq	$0, -48(%rbp)
	leaq	-40(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_rsa_param_encode
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.1:
	movl	8(%rbx), %edi
	leaq	-48(%rbp), %rsi
	callq	_i2d_RSAPrivateKey
	testl	%eax, %eax
	jle	LBB0_3
## %bb.2:
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_OBJ_nid2obj
	movl	-28(%rbp), %ecx
	movq	-40(%rbp), %r8
	movq	-48(%rbp), %r9
	movl	%r15d, (%rsp)
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_PKCS8_pkey_set0
	movl	%eax, %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jne	LBB0_4
LBB0_3:
	movq	_RSA_F_RSA_PRIV_ENCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RSAerr
	movq	-40(%rbp), %rdi
	callq	_ASN1_STRING_free
	xorl	%eax, %eax
LBB0_4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RSA_F_RSA_PRIV_ENCODE,4,2      ## @RSA_F_RSA_PRIV_ENCODE
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_rsa_priv_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsa_priv_encode
_rsa_priv_encode:                       ; @rsa_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	x20, x1
	mov	x19, x0
	str	xzr, [sp, #24]
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x20
	bl	_rsa_param_encode
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x20, #8]
	add	x1, sp, #24
	bl	_i2d_RSAPrivateKey
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_OBJ_nid2obj
	mov	x1, x0
	ldr	w3, [sp, #12]
	ldp	x4, x5, [sp, #16]
	mov	x0, x19
	mov	w2, #0
	mov	x6, x21
	bl	_PKCS8_pkey_set0
	cbz	w0, LBB0_4
; %bb.3:
	mov	w0, #1
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _RSA_F_RSA_PRIV_ENCODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RSA_F_RSA_PRIV_ENCODE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_RSAerr
	ldr	x0, [sp, #16]
	bl	_ASN1_STRING_free
	mov	w0, #0
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RSA_F_RSA_PRIV_ENCODE,4,2      ; @RSA_F_RSA_PRIV_ENCODE
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_rsa_priv_encode
.subsections_via_symbols
