	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvdimm_probe
_nvdimm_probe:                          ## @nvdimm_probe
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_nvdimm_security_setup_events
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_nvdimm_check_config_data
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_ENOTTY@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmovnel	%eax, %ebx
	jmp	LBB0_20
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_20
LBB0_4:
	movq	%r15, %rdi
	callq	_nvdimm_clear_locked
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_dev_set_drvdata
	movq	%r15, %rdi
	callq	_dev_name
	movl	%eax, 40(%r14)
	movq	$-1, (%r14)
	movq	$0, 32(%r14)
	movl	$-1, 24(%r14)
	movq	%r15, 16(%r14)
	movq	%r15, %rdi
	callq	_get_device
	movq	%r14, %rdi
	addq	$12, %rdi
	callq	_kref_init
	movq	%r15, %rdi
	callq	_nvdimm_security_unlock
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
LBB0_8:
	movq	%r14, %rdi
	callq	_nvdimm_init_nsarea
	movl	%eax, %ebx
	movq	_EACCES@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	addl	%ebx, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_nvdimm_set_locked
	jmp	LBB0_11
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_10:
	testl	%ebx, %ebx
	jne	LBB0_19
LBB0_11:
	movq	%r14, %rdi
	callq	_nd_label_data_init
	movl	%eax, %ebx
	movl	(%r12), %eax
	addl	%ebx, %eax
	jne	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_nvdimm_set_locked
LBB0_13:
	testl	%ebx, %ebx
	je	LBB0_14
LBB0_19:
	movq	%r14, %rdi
	callq	_put_ndd
LBB0_20:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	8(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_nvdimm_bus_lock
	cmpl	$0, (%r14)
	js	LBB0_17
## %bb.15:
	movq	%r14, %rdi
	callq	_nd_label_reserve_dpa
	testl	%eax, %eax
	je	LBB0_16
## %bb.18:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_nvdimm_bus_unlock
	jmp	LBB0_19
LBB0_16:
	movq	%r15, %rdi
	callq	_nvdimm_set_aliasing
LBB0_17:
	movq	%r15, %rdi
	callq	_nvdimm_bus_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"security event setup failed: %d\n"

	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"failed to unlock dimm: %d\n"

	.comm	_EACCES,4,2                     ## @EACCES
L_.str.2:                               ## @.str.2
	.asciz	"config data size: %d\n"

	.no_dead_strip	_nvdimm_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvdimm_probe
_nvdimm_probe:                          ; @nvdimm_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_nvdimm_security_setup_events
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_nvdimm_check_config_data
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	csel	w21, wzr, w0, eq
	b	LBB0_15
LBB0_3:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_15
LBB0_4:
	mov	x0, x19
	bl	_nvdimm_clear_locked
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
	mov	x0, x19
	bl	_dev_name
	str	w0, [x20, #40]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x20]
	str	xzr, [x20, #32]
	mov	w8, #-1
	str	w8, [x20, #24]
	str	x19, [x20, #16]
	mov	x0, x19
	bl	_get_device
	add	x0, x20, #12
	bl	_kref_init
	mov	x0, x19
	bl	_nvdimm_security_unlock
	tbz	w0, #31, LBB0_7
; %bb.6:
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_7:
	mov	x0, x20
	bl	_nvdimm_init_nsarea
Lloh10:
	adrp	x22, _EACCES@GOTPAGE
Lloh11:
	ldr	x22, [x22, _EACCES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmn	w0, w8
	b.ne	LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_nvdimm_set_locked
	b	LBB0_11
LBB0_9:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_10:
	mov	x21, x0
	cbnz	w0, LBB0_14
LBB0_11:
	mov	x0, x20
	bl	_nd_label_data_init
	mov	x21, x0
	ldr	w8, [x22]
	cmn	w0, w8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_nvdimm_set_locked
LBB0_13:
	cbz	w21, LBB0_16
LBB0_14:
	mov	x0, x20
	bl	_put_ndd
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldr	w2, [x20, #8]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x0, x19
	bl	_nvdimm_bus_lock
	ldr	w8, [x20]
	tbnz	w8, #31, LBB0_20
; %bb.17:
	mov	x0, x20
	bl	_nd_label_reserve_dpa
	cbz	w0, LBB0_19
; %bb.18:
	mov	x21, x0
	mov	x0, x19
	bl	_nvdimm_bus_unlock
	b	LBB0_14
LBB0_19:
	mov	x0, x19
	bl	_nvdimm_set_aliasing
LBB0_20:
	mov	x0, x19
	bl	_nvdimm_bus_unlock
	mov	w21, #0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"security event setup failed: %d\n"

	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"failed to unlock dimm: %d\n"

	.comm	_EACCES,4,2                     ; @EACCES
l_.str.2:                               ; @.str.2
	.asciz	"config data size: %d\n"

	.no_dead_strip	_nvdimm_probe
.subsections_via_symbols
