	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function security_disable
_security_disable:                      ## @security_disable
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_walk_to_nvdimm_bus
	movq	%rax, %rdi
	callq	_lockdep_assert_held
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	cmpq	$0, (%r15)
	je	LBB0_3
## %bb.5:
	movq	%r15, %rdi
	callq	_check_security_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	_NVDIMM_BASE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_nvdimm_get_user_key_payload
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	8(%r15), %rcx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	*(%rcx)
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	callq	_key_serial
	testl	%ebx, %ebx
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rdx, %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	-40(%rbp), %rdi
	callq	_nvdimm_put_key
	movq	_NVDIMM_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_nvdimm_security_flags
	movq	%rax, (%r15)
	jmp	LBB0_9
LBB0_3:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ENOKEY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_NVDIMM_BASE_KEY,4,2            ## @NVDIMM_BASE_KEY
	.comm	_ENOKEY,4,2                     ## @ENOKEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"key: %d disable: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"success"

L_.str.2:                               ## @.str.2
	.asciz	"fail"

	.comm	_NVDIMM_USER,4,2                ## @NVDIMM_USER
	.no_dead_strip	_security_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function security_disable
_security_disable:                      ; @security_disable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x1
	mov	x19, x0
	add	x20, x0, #16
	mov	x0, x20
	bl	_walk_to_nvdimm_bus
	bl	_lockdep_assert_held
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_check_security_state
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.4:
Lloh0:
	adrp	x8, _NVDIMM_BASE_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVDIMM_BASE_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_nvdimm_get_user_key_payload
	cbz	x0, LBB0_9
; %bb.5:
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x21, x0
	ldr	x0, [sp, #8]
	bl	_key_serial
	mov	x2, x0
Lloh3:
	adrp	x8, l_.str.2@PAGE
Lloh4:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w21, #0
	csel	x3, x9, x8, eq
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x0, [sp, #8]
	bl	_nvdimm_put_key
Lloh9:
	adrp	x8, _NVDIMM_USER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVDIMM_USER@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_nvdimm_security_flags
	str	x0, [x19]
	b	LBB0_8
LBB0_6:
Lloh12:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
Lloh14:
	adrp	x8, _ENOKEY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOKEY@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_NVDIMM_BASE_KEY,4,2            ; @NVDIMM_BASE_KEY
	.comm	_ENOKEY,4,2                     ; @ENOKEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"key: %d disable: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"success"

l_.str.2:                               ; @.str.2
	.asciz	"fail"

	.comm	_NVDIMM_USER,4,2                ; @NVDIMM_USER
	.no_dead_strip	_security_disable
.subsections_via_symbols
