	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spinand_create_dirmap
_spinand_create_dirmap:                 ## @spinand_create_dirmap
	.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, %r14d
	movq	%rdi, %r15
	callq	_spinand_to_nand
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_nanddev_page_size
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_nanddev_per_page_oobsize
	addq	%r12, %rax
	movq	%rax, -40(%rbp)
	movl	(%rbx), %edi
	callq	_fls
	movl	%r14d, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movl	%edx, -48(%rbp)
	movq	24(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	8(%r15), %rsi
	movq	(%rsi), %rdi
	leaq	-48(%rbp), %rdx
	callq	_devm_spi_mem_dirmap_create
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	(%r15), %rax
	movl	%r14d, %r14d
	shlq	$4, %r14
	movq	%rbx, 8(%rax,%r14)
	movq	16(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	8(%r15), %rsi
	movq	(%rsi), %rdi
	leaq	-48(%rbp), %rdx
	callq	_devm_spi_mem_dirmap_create
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	%rbx, %rdi
	callq	_PTR_ERR
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%r15), %rax
	movq	%rbx, (%rax,%r14)
	xorl	%eax, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_spinand_create_dirmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spinand_create_dirmap
_spinand_create_dirmap:                 ; @spinand_create_dirmap
	.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	x20, x1
	mov	x19, x0
	bl	_spinand_to_nand
	mov	x21, x0
	bl	_nanddev_page_size
	mov	x22, x0
	mov	x0, x21
	bl	_nanddev_per_page_oobsize
	add	x8, x0, x22
	str	x8, [sp, #8]
	ldr	w0, [x21]
	bl	_fls
	lsl	w8, w20, w0
	str	w8, [sp]
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	str	w8, [sp, #4]
	ldr	x1, [x19, #8]
	ldr	x0, [x1]
	mov	x2, sp
	bl	_devm_spi_mem_dirmap_create
	mov	x21, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	add	x8, x8, w20, uxtw #4
	str	x21, [x8, #8]
	ldp	x1, x8, [x19, #8]
	ldr	w8, [x8]
	str	w8, [sp, #4]
	ldr	x0, [x1]
	mov	x2, sp
	bl	_devm_spi_mem_dirmap_create
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
LBB0_2:
	mov	x0, x21
	bl	_PTR_ERR
LBB0_3:
	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_4:
	mov	w8, w20
	ldr	x9, [x19]
	lsl	x8, x8, #4
	str	x21, [x9, x8]
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_spinand_create_dirmap
.subsections_via_symbols
