	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_cf_interrupt
_octeon_cf_interrupt:                   ## @octeon_cf_interrupt
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	leaq	4(%rsi), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTK
	cmpl	$0, (%rbx)
	jle	LBB0_1
## %bb.2:
	xorl	%r13d, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %edi
	callq	_CVMX_MIO_BOOT_DMA_INTX
	movl	$1, %esi
	movl	%eax, %edi
	callq	_cvmx_write_csr
	movl	8(%r12), %edi
	addq	$4, %r12
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_queue_delayed_work
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	incq	%r13
	movslq	(%rbx), %rax
	cmpq	%rax, %r13
	jge	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	(%rax,%r13,8), %rbx
	movq	8(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rax
	movq	(%rax), %r15
	movl	(%r15), %edi
	callq	_CVMX_MIO_BOOT_DMA_INTX
	movl	%eax, %edi
	callq	_cvmx_read_csr
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r15), %edi
	callq	_CVMX_MIO_BOOT_DMA_CFGX
	movl	%eax, %edi
	callq	_cvmx_read_csr
	movq	%rax, %r12
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ata_qc_from_tag
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r14
	movq	_ATA_TFLAG_POLLING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -80(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	callq	_sg_is_last
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	$1, (%r12)
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	cmpl	$0, (%r12)
	je	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %edi
	callq	_ioread8
	movq	_ATA_DRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_ATA_BUSY@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_octeon_cf_dma_finished
	orl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_14
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	callq	_sg_next
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_octeon_cf_dma_start
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_14
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_15:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	leaq	L_.str.1(%rip), %rdi
	callq	_DPRINTK
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IRQ_RETVAL                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ENTER\n"

	.comm	_ATA_TFLAG_POLLING,4,2          ## @ATA_TFLAG_POLLING
	.comm	_ATA_BUSY,4,2                   ## @ATA_BUSY
	.comm	_ATA_DRQ,4,2                    ## @ATA_DRQ
L_.str.1:                               ## @.str.1
	.asciz	"EXIT\n"

	.no_dead_strip	_octeon_cf_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_cf_interrupt
_octeon_cf_interrupt:                   ; @octeon_cf_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	add	x0, x1, #4
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x26, #0
	mov	w21, #0
Lloh2:
	adrp	x27, _ATA_TFLAG_POLLING@GOTPAGE
Lloh3:
	ldr	x27, [x27, _ATA_TFLAG_POLLING@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19]
	bl	_CVMX_MIO_BOOT_DMA_INTX
	mov	w21, #1
	mov	w1, #1
	bl	_cvmx_write_csr
	ldr	w0, [x28, #8]
	add	x1, x28, #4
	mov	w2, #1
	bl	_queue_delayed_work
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x20]
	cmp	x26, x8
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x22, [x8, x26, lsl #3]
	ldp	x28, x8, [x22, #8]
	ldr	x19, [x8]
	ldr	w0, [x19]
	bl	_CVMX_MIO_BOOT_DMA_INTX
	bl	_cvmx_read_csr
	mov	x24, x0
	ldr	w0, [x19]
	bl	_CVMX_MIO_BOOT_DMA_CFGX
	bl	_cvmx_read_csr
	mov	x25, x0
	ldr	w1, [x22, #4]
	mov	x0, x22
	bl	_ata_qc_from_tag
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
	ldr	w8, [x0, #4]
	ldr	w9, [x27]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w24, #0
	ccmp	w25, #0, #0, ne
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x28]
	cbnz	w8, LBB0_10
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	bl	_sg_is_last
	cbz	w0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #1
	str	w8, [x28]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22]
	bl	_ioread8
Lloh4:
	adrp	x8, _ATA_BUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ATA_BUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _ATA_DRQ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ATA_DRQ@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w0
	b.ne	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_octeon_cf_dma_finished
	orr	w21, w0, w21
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	bl	_sg_next
	str	w0, [x23]
	mov	x0, x23
	bl	_octeon_cf_dma_start
	mov	w21, #1
	b	LBB0_3
LBB0_13:
	mov	w21, #0
LBB0_14:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_spin_unlock_irqrestore
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTK
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_IRQ_RETVAL
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ENTER\n"

	.comm	_ATA_TFLAG_POLLING,4,2          ; @ATA_TFLAG_POLLING
	.comm	_ATA_BUSY,4,2                   ; @ATA_BUSY
	.comm	_ATA_DRQ,4,2                    ; @ATA_DRQ
l_.str.1:                               ; @.str.1
	.asciz	"EXIT\n"

	.no_dead_strip	_octeon_cf_interrupt
.subsections_via_symbols
