	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_write_buf_irq_pref
_omap_write_buf_irq_pref:               ## @omap_write_buf_irq_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, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_mtd_to_omap
	cmpl	%r14d, (%r12)
	jge	LBB0_8
## %bb.1:
	movq	%rax, %r13
	movq	_OMAP_NAND_IO_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r13)
	movq	%r15, 32(%r13)
	movq	%r13, %rbx
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_init_completion
	movl	8(%r13), %edi
	movq	_PREFETCH_FIFOTHRESHOLD_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,2), %ecx
	leal	(%rax,%rax,2), %esi
	addl	$7, %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	sarl	$3, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movl	$1, %r8d
	movq	%r13, %r9
	callq	_omap_prefetch_enable
	testl	%eax, %eax
	je	LBB0_2
## %bb.6:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_7
## %bb.9:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_write_buf16               ## TAILCALL
LBB0_8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_write_buf_pref            ## TAILCALL
LBB0_2:
	movl	%r14d, (%r13)
	movl	24(%r13), %edi
	callq	_enable_irq
	movl	20(%r13), %edi
	callq	_enable_irq
	movq	%rbx, %rdi
	callq	_wait_for_completion
	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, %r14
	imulq	%rbx, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%r13), %edi
	callq	_readl
	movq	%rax, %rdi
	callq	_PREFETCH_STATUS_COUNT
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_cpu_relax
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%rbx), %rax
	cmpq	%r14, %rbx
	movq	%rax, %rbx
	jb	LBB0_3
LBB0_5:
	movl	8(%r13), %edi
	movq	%r13, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_prefetch_reset            ## TAILCALL
LBB0_7:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %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	_OMAP_NAND_IO_WRITE,4,2         ## @OMAP_NAND_IO_WRITE
	.comm	_PREFETCH_FIFOTHRESHOLD_MAX,4,2 ## @PREFETCH_FIFOTHRESHOLD_MAX
	.comm	_loops_per_jiffy,8,3            ## @loops_per_jiffy
	.comm	_OMAP_NAND_TIMEOUT_MS,4,2       ## @OMAP_NAND_TIMEOUT_MS
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.no_dead_strip	_omap_write_buf_irq_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_irq_pref
_omap_write_buf_irq_pref:               ; @omap_write_buf_irq_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	x20, x2
	mov	x21, x1
	mov	x23, x0
	bl	_nand_to_mtd
	mov	x22, x0
	bl	_mtd_to_omap
	ldr	w8, [x22]
	cmp	w8, w20
	b.ge	LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _OMAP_NAND_IO_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OMAP_NAND_IO_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #40]
	str	x21, [x0, #32]
	add	x23, x0, #16
	mov	x0, x23
	bl	_init_completion
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _PREFETCH_FIFOTHRESHOLD_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PREFETCH_FIFOTHRESHOLD_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #1
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #3
	mov	w2, #0
	mov	x3, x20
	mov	w4, #1
	mov	x5, x19
	bl	_omap_prefetch_enable
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w8, [x19, #4]
Lloh6:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	tst	w9, w8
	b.eq	LBB0_8
; %bb.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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_omap_write_buf16
LBB0_4:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	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_buf_pref
LBB0_5:
	str	w20, [x19]
	ldr	w0, [x19, #24]
	bl	_enable_irq
	ldr	w0, [x19, #20]
	bl	_enable_irq
	mov	x0, x23
	bl	_wait_for_completion
Lloh9:
	adrp	x8, _loops_per_jiffy@GOTPAGE
Lloh10:
	ldr	x8, [x8, _loops_per_jiffy@GOTPAGEOFF]
Lloh11:
	ldr	x20, [x8]
Lloh12:
	adrp	x8, _OMAP_NAND_TIMEOUT_MS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OMAP_NAND_TIMEOUT_MS@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x22, #0
	mul	x21, x0, x20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #12]
	bl	_readl
	bl	_PREFETCH_STATUS_COUNT
	mov	x20, x0
	bl	_cpu_relax
	cmp	x20, #0
	ccmp	x22, x21, #2, ne
	add	x22, x22, #1
	b.lo	LBB0_6
; %bb.7:
	ldr	w0, [x19, #8]
	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_8:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_NAND_IO_WRITE,4,2         ; @OMAP_NAND_IO_WRITE
	.comm	_PREFETCH_FIFOTHRESHOLD_MAX,4,2 ; @PREFETCH_FIFOTHRESHOLD_MAX
	.comm	_loops_per_jiffy,8,3            ; @loops_per_jiffy
	.comm	_OMAP_NAND_TIMEOUT_MS,4,2       ; @OMAP_NAND_TIMEOUT_MS
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.no_dead_strip	_omap_write_buf_irq_pref
.subsections_via_symbols
