	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PKCS8_encrypt                  ## -- Begin function PKCS8_encrypt
	.p2align	4, 0x90
_PKCS8_encrypt:                         ## @PKCS8_encrypt
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movq	%r8, %r13
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r14
	movl	16(%rbp), %esi
	cmpl	$-1, %edi
	je	LBB0_1
## %bb.2:
	movl	%edi, %ebx
	movq	_EVP_PBE_TYPE_PRF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_EVP_PBE_find
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movl	16(%rbp), %esi
	movq	%r13, %rdx
	movl	%r12d, %ecx
	xorl	%r8d, %r8d
	movl	%ebx, %r9d
	callq	_PKCS5_pbe2_set_iv
	jmp	LBB0_5
LBB0_1:
	movq	%r14, %rdi
	movq	%r13, %rdx
	movl	%r12d, %ecx
	callq	_PKCS5_pbe2_set
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	callq	_ERR_clear_error
	movl	%ebx, %edi
	movl	16(%rbp), %esi
	movq	%r13, %rdx
	movl	%r12d, %ecx
	callq	_PKCS5_pbe_set
LBB0_5:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	24(%rbp), %rdx
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rcx
	callq	_PKCS8_set0_pbe
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	callq	_X509_ALGOR_free
	jmp	LBB0_9
LBB0_6:
	movq	_PKCS12_F_PKCS8_ENCRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_ASN1_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PKCS12err
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVP_PBE_TYPE_PRF,4,2           ## @EVP_PBE_TYPE_PRF
	.comm	_PKCS12_F_PKCS8_ENCRYPT,4,2     ## @PKCS12_F_PKCS8_ENCRYPT
	.comm	_ERR_R_ASN1_LIB,4,2             ## @ERR_R_ASN1_LIB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PKCS8_encrypt                  ; -- Begin function PKCS8_encrypt
	.p2align	2
_PKCS8_encrypt:                         ; @PKCS8_encrypt
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x7
	mov	x24, x6
	mov	x22, x5
	mov	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x26, x1
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x25, x0
Lloh0:
	adrp	x8, _EVP_PBE_TYPE_PRF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVP_PBE_TYPE_PRF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x25
	mov	x2, #0
	mov	x3, #0
	mov	w4, #0
	bl	_EVP_PBE_find
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x26
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, #0
	mov	x5, x25
	bl	_PKCS5_pbe2_set_iv
	mov	x22, x0
	cbnz	x0, LBB0_4
	b	LBB0_7
LBB0_3:
	mov	x0, x26
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	bl	_PKCS5_pbe2_set
	mov	x22, x0
	cbz	x0, LBB0_7
LBB0_4:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	bl	_PKCS8_set0_pbe
	cbnz	x0, LBB0_9
; %bb.5:
	mov	x0, x22
	bl	_X509_ALGOR_free
	b	LBB0_8
LBB0_6:
	bl	_ERR_clear_error
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	bl	_PKCS5_pbe_set
	mov	x22, x0
	cbnz	x0, LBB0_4
LBB0_7:
Lloh3:
	adrp	x8, _PKCS12_F_PKCS8_ENCRYPT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PKCS12_F_PKCS8_ENCRYPT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _ERR_R_ASN1_LIB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERR_R_ASN1_LIB@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_PKCS12err
LBB0_8:
	mov	x0, #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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EVP_PBE_TYPE_PRF,4,2           ; @EVP_PBE_TYPE_PRF
	.comm	_PKCS12_F_PKCS8_ENCRYPT,4,2     ; @PKCS12_F_PKCS8_ENCRYPT
	.comm	_ERR_R_ASN1_LIB,4,2             ; @ERR_R_ASN1_LIB
.subsections_via_symbols
