	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function newpass_bag
_newpass_bag:                           ## @newpass_bag
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_PKCS12_SAFEBAG_get_nid
	movq	_NID_pkcs8ShroudedKeyBag@GOTPCREL(%rip), %rcx
	movl	$1, %r13d
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.1:
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	movl	$-1, %edx
	callq	_PKCS8_decrypt
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	movq	(%r15), %rdi
	xorl	%r13d, %r13d
	leaq	-64(%rbp), %rsi
	xorl	%edx, %edx
	callq	_X509_SIG_get0
	movq	-64(%rbp), %rdi
	leaq	-52(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_alg_get
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	-52(%rbp), %edi
	movl	-48(%rbp), %r9d
	movl	-44(%rbp), %eax
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movq	%r14, %rdx
	movl	$-1, %ecx
	xorl	%r8d, %r8d
	pushq	%r12
	pushq	%rax
	callq	_PKCS8_encrypt
	addq	$16, %rsp
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_PKCS8_PRIV_KEY_INFO_free
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	(%r15), %rdi
	callq	_X509_SIG_free
	movq	%r14, (%r15)
	movl	$1, %r13d
	jmp	LBB0_6
LBB0_2:
	xorl	%r13d, %r13d
LBB0_6:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NID_pkcs8ShroudedKeyBag,8,3    ## @NID_pkcs8ShroudedKeyBag
	.no_dead_strip	_newpass_bag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function newpass_bag
_newpass_bag:                           ; @newpass_bag
	.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, x2
	mov	x21, x1
	mov	x19, x0
	bl	_PKCS12_SAFEBAG_get_nid
Lloh0:
	adrp	x8, _NID_pkcs8ShroudedKeyBag@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NID_pkcs8ShroudedKeyBag@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.1:
	ldr	x0, [x19]
	mov	x1, x21
	mov	w2, #-1
	bl	_PKCS8_decrypt
	cbz	x0, LBB0_6
; %bb.2:
	mov	x21, x0
	ldr	x0, [x19]
	add	x1, sp, #8
	mov	x2, #0
	bl	_X509_SIG_get0
	ldr	x0, [sp, #8]
	add	x1, sp, #28
	add	x2, sp, #20
	add	x3, sp, #24
	bl	_alg_get
	cbz	w0, LBB0_6
; %bb.3:
	ldp	w5, w0, [sp, #24]
	ldr	w6, [sp, #20]
	mov	x1, #0
	mov	x2, x20
	mov	w3, #-1
	mov	x4, #0
	mov	x7, x21
	bl	_PKCS8_encrypt
	mov	x20, x0
	mov	x0, x21
	bl	_PKCS8_PRIV_KEY_INFO_free
	cbz	x20, LBB0_7
; %bb.4:
	ldr	x0, [x19]
	bl	_X509_SIG_free
	str	x20, [x19]
LBB0_5:
	mov	w0, #1
LBB0_6:
	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_7:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NID_pkcs8ShroudedKeyBag,8,3    ; @NID_pkcs8ShroudedKeyBag
	.no_dead_strip	_newpass_bag
.subsections_via_symbols
