	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bf5xx_nand_dma_write_buf
_bf5xx_nand_dma_write_buf:              ## @bf5xx_nand_dma_write_buf
	.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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_mtd_to_nand_info
	movq	8(%rax), %rcx
	xorl	%ebx, %ebx
	cmpw	$0, (%rcx)
	setne	%bl
	shll	$8, %ebx
	addl	$256, %ebx                      ## imm = 0x100
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	movq	%r14, %rcx
	movl	%r15d, %r8d
	callq	_dev_dbg
	movq	%r12, %rdi
	movq	%r14, %rsi
	cmpl	%r15d, %ebx
	jne	LBB0_2
## %bb.1:
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bf5xx_nand_dma_rw              ## TAILCALL
LBB0_2:
	movl	%r15d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bf5xx_nand_write_buf           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mtd->%p, buf->%p, len %d\n"

	.no_dead_strip	_bf5xx_nand_dma_write_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bf5xx_nand_dma_write_buf
_bf5xx_nand_dma_write_buf:              ; @bf5xx_nand_dma_write_buf
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_mtd_to_nand_info
	ldr	x8, [x0, #8]
	ldrh	w8, [x8]
	mov	w9, #512
	mov	w10, #256
	cmp	w8, #0
	csel	w22, w10, w9, eq
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x19
	mov	x4, x20
	bl	_dev_dbg
	mov	x0, x21
	mov	x1, x19
	cmp	w22, w20
	b.ne	LBB0_2
; %bb.1:
	mov	w2, #0
	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
	b	_bf5xx_nand_dma_rw
LBB0_2:
	mov	x2, x20
	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
	b	_bf5xx_nand_write_buf
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mtd->%p, buf->%p, len %d\n"

	.no_dead_strip	_bf5xx_nand_dma_write_buf
.subsections_via_symbols
