	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmnand_write_buf
_brcmnand_write_buf:                    ## @brcmnand_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	callq	_nand_get_controller_data
	cmpl	$128, (%rax)
	jne	LBB0_5
## %bb.1:
	testl	%r15d, %r15d
	jle	LBB0_4
## %bb.2:
	movq	%rax, %r12
	movl	%r15d, %r15d
	leaq	-1(%r15), %rbx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_LL_OP_WR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%r14,%rax,4), %edx
	leaq	1(%rax), %r13
	xorl	%ecx, %ecx
	cmpq	%rax, %rbx
	sete	%cl
	movq	%r12, %rdi
	callq	_brcmnand_low_level_op
	movq	%r13, %rax
	cmpq	%r13, %r15
	jne	LBB0_3
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BUG                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LL_OP_WR,4,2                   ## @LL_OP_WR
	.no_dead_strip	_brcmnand_write_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmnand_write_buf
_brcmnand_write_buf:                    ; @brcmnand_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	x21, x2
	mov	x19, x1
	bl	_nand_get_controller_data
	ldr	w8, [x0]
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.1:
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x20, x0
	mov	w21, w21
Lloh0:
	adrp	x22, _LL_OP_WR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LL_OP_WR@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	ldr	w2, [x19], #4
	subs	x21, x21, #1
	cset	w3, eq
	mov	x0, x20
	bl	_brcmnand_low_level_op
	cbnz	x21, LBB0_3
LBB0_4:
	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_5:
	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	_BUG
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_LL_OP_WR,4,2                   ; @LL_OP_WR
	.no_dead_strip	_brcmnand_write_buf
.subsections_via_symbols
