	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_nand_irq
_omap_nand_irq:                         ## @omap_nand_irq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	movl	40(%rsi), %edi
	callq	_readl
	movl	%eax, %edi
	callq	_PREFETCH_STATUS_FIFO_CNT
	movl	%eax, %ebx
	andl	$65532, %ebx                    ## imm = 0xFFFC
	movq	(%r15), %rax
	movq	_OMAP_NAND_IO_WRITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	cmpl	%r14d, 8(%r15)
	je	LBB0_4
## %bb.2:
	movl	12(%r15), %eax
	testl	%eax, %eax
	movl	%ebx, %ecx
	cmovel	%eax, %ecx
	cmpl	%ebx, %eax
	movl	%ecx, %ebx
	cmovll	%eax, %ebx
	testl	%eax, %eax
	cmovel	%ecx, %ebx
	movl	36(%r15), %edi
	movq	24(%r15), %rsi
	movl	%ebx, %edx
	sarl	$2, %edx
	callq	_iowrite32_rep
	movslq	%ebx, %rax
	addq	%rax, 24(%r15)
	subl	%eax, 12(%r15)
	jmp	LBB0_5
LBB0_3:
	movl	32(%r15), %edi
	movq	24(%r15), %rsi
	movl	%ebx, %edx
	shrl	$2, %edx
	callq	_ioread32_rep
	movl	%ebx, %eax
	addq	%rax, 24(%r15)
	cmpl	%r14d, 8(%r15)
	jne	LBB0_5
LBB0_4:
	leaq	20(%r15), %rdi
	callq	_complete
	movl	16(%r15), %edi
	callq	_disable_irq_nosync
	movl	8(%r15), %edi
	callq	_disable_irq_nosync
LBB0_5:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_NAND_IO_WRITE,8,3         ## @OMAP_NAND_IO_WRITE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_omap_nand_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_nand_irq
_omap_nand_irq:                         ; @omap_nand_irq
	.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	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #40]
	bl	_readl
	bl	_PREFETCH_STATUS_FIFO_CNT
	and	w21, w0, #0xfffc
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _OMAP_NAND_IO_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OMAP_NAND_IO_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19, #8]
	cmp	w8, w20
	b.eq	LBB0_4
; %bb.2:
	ldr	w8, [x19, #12]
	cmp	w8, #0
	csel	w9, wzr, w21, eq
	cmp	w8, w21
	ccmp	w8, #0, #4, lt
	csel	w20, w8, w9, ne
	ldr	w0, [x19, #36]
	ldr	x1, [x19, #24]
	asr	w2, w20, #2
	bl	_iowrite32_rep
	ldr	x8, [x19, #24]
	add	x8, x8, w20, sxtw
	str	x8, [x19, #24]
	ldr	w8, [x19, #12]
	sub	w8, w8, w20
	str	w8, [x19, #12]
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19, #32]
	ldr	x1, [x19, #24]
	lsr	w2, w21, #2
	bl	_ioread32_rep
	ldr	x8, [x19, #24]
	add	x8, x8, w21, uxtw
	str	x8, [x19, #24]
	ldr	w8, [x19, #8]
	cmp	w8, w20
	b.ne	LBB0_5
LBB0_4:
	add	x0, x19, #20
	bl	_complete
	ldr	w0, [x19, #16]
	bl	_disable_irq_nosync
	ldr	w0, [x19, #8]
	bl	_disable_irq_nosync
LBB0_5:
Lloh3:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_NAND_IO_WRITE,8,3         ; @OMAP_NAND_IO_WRITE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_omap_nand_irq
.subsections_via_symbols
