	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_write_buf_pref
_omap_write_buf_pref:                   ## @omap_write_buf_pref
	.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, %r13
	callq	_nand_to_mtd
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_mtd_to_omap
	movq	%rax, %r14
	testb	$1, %r15b
	je	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	movl	12(%r14), %esi
	callq	_writeb
	addq	$4, %r13
	decl	%r15d
LBB0_2:
	movl	(%r14), %edi
	movq	_PREFETCH_FIFOTHRESHOLD_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	movl	$1, %r8d
	movq	%r14, %r9
	callq	_omap_prefetch_enable
	testl	%eax, %eax
	je	LBB0_3
## %bb.8:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_9
## %bb.16:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_write_buf16               ## TAILCALL
LBB0_3:
	testl	%r15d, %r15d
	jne	LBB0_11
LBB0_4:
	movq	_loops_per_jiffy@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_OMAP_NAND_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	imulq	%rbx, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	4(%r14), %edi
	callq	_readl
	movq	%rax, %rdi
	callq	_PREFETCH_STATUS_COUNT
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%rbx), %rax
	cmpq	%r15, %rbx
	movq	%rax, %rbx
	jb	LBB0_5
LBB0_7:
	movl	(%r14), %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_prefetch_reset            ## TAILCALL
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r15d, %eax
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_4
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movl	4(%r14), %edi
	callq	_readl
	movl	%eax, %edi
	callq	_PREFETCH_STATUS_FIFO_CNT
	cmpl	$2, %eax
	jl	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%eax, %r12d
	sarl	%r12d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %edi
	addq	$4, %r13
	movl	12(%r14), %esi
	callq	_iowrite16
	leal	-2(%r15), %eax
	cmpl	%r12d, %ebx
	jge	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	incl	%ebx
	cmpl	$2, %r15d
	movl	%eax, %r15d
	jne	LBB0_14
	jmp	LBB0_10
LBB0_9:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_write_buf8                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PREFETCH_FIFOTHRESHOLD_MAX,4,2 ## @PREFETCH_FIFOTHRESHOLD_MAX
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_loops_per_jiffy,8,3            ## @loops_per_jiffy
	.comm	_OMAP_NAND_TIMEOUT_MS,4,2       ## @OMAP_NAND_TIMEOUT_MS
	.no_dead_strip	_omap_write_buf_pref
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_write_buf_pref
_omap_write_buf_pref:                   ; @omap_write_buf_pref
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x20, x1
	bl	_nand_to_mtd
	mov	x22, x0
	bl	_mtd_to_omap
	mov	x19, x0
	tbz	w21, #0, LBB0_2
; %bb.1:
	ldr	w0, [x20], #4
	ldr	w1, [x19, #12]
	bl	_writeb
	sub	w21, w21, #1
LBB0_2:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _PREFETCH_FIFOTHRESHOLD_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PREFETCH_FIFOTHRESHOLD_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	mov	x3, x21
	mov	w4, #1
	mov	x5, x19
	bl	_omap_prefetch_enable
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	tst	w9, w8
	b.eq	LBB0_15
; %bb.4:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_omap_write_buf16
LBB0_5:
	cbnz	w21, LBB0_11
LBB0_6:
Lloh6:
	adrp	x8, _loops_per_jiffy@GOTPAGE
Lloh7:
	ldr	x8, [x8, _loops_per_jiffy@GOTPAGEOFF]
Lloh8:
	ldr	x20, [x8]
Lloh9:
	adrp	x8, _OMAP_NAND_TIMEOUT_MS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OMAP_NAND_TIMEOUT_MS@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x21, #0
	mul	x20, x0, x20
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	bl	_cpu_relax
	ldr	w0, [x19, #4]
	bl	_readl
	bl	_PREFETCH_STATUS_COUNT
	cmp	x0, #0
	ccmp	x21, x20, #2, ne
	add	x21, x21, #1
	b.lo	LBB0_7
; %bb.8:
	ldr	w0, [x19]
	mov	x1, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_omap_prefetch_reset
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, x21
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x21, x8
	cbz	w8, LBB0_6
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	w0, [x19, #4]
	bl	_readl
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_PREFETCH_STATUS_FIFO_CNT
	cmp	w0, #2
	b.lt	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	asr	w22, w0, #1
	mov	w23, #1
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x20], #4
	ldr	w1, [x19, #12]
	bl	_iowrite16
	sub	w8, w21, #2
	cmp	w23, w22
	b.ge	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	add	w23, w23, #1
	cmp	w21, #2
	mov	x21, x8
	b.ne	LBB0_13
	b	LBB0_10
LBB0_15:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_omap_write_buf8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PREFETCH_FIFOTHRESHOLD_MAX,4,2 ; @PREFETCH_FIFOTHRESHOLD_MAX
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_loops_per_jiffy,8,3            ; @loops_per_jiffy
	.comm	_OMAP_NAND_TIMEOUT_MS,4,2       ; @OMAP_NAND_TIMEOUT_MS
	.no_dead_strip	_omap_write_buf_pref
.subsections_via_symbols
