	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfin_ata_host_intr
_bfin_ata_host_intr:                    ## @bfin_ata_host_intr
	.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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %ecx
	movl	20(%rdi), %esi
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_VPRINTK
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_10
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_4
## %bb.3:
	movq	16(%r15), %rax
	movq	_ATA_DFLAG_CDB_INTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_10
	jmp	LBB0_4
LBB0_5:
	movq	8(%r15), %rax
	movq	_ATA_PROT_DMA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_ATAPI_PROT_DMA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_7:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movl	%eax, %r13d
	movl	20(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_VPRINTK
	movq	_ATA_DMA_INTR@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_4
## %bb.8:
	movq	8(%rbx), %rax
	movq	%r15, %rdi
	callq	*40(%rax)
	movq	_ATA_DMA_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%r13d, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_AC_ERR_HOST_BUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movq	_HSM_ST_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_10:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	_ATA_BUSY@GOTPCREL(%rip), %r14
	movl	$1, %r12d
	testl	%eax, (%r14)
	jne	LBB0_16
## %bb.11:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*16(%rax)
	movl	%eax, %r13d
	movl	(%r14), %edi
	andl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_16
## %bb.12:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*32(%rax)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_ata_sff_hsm_move
	movl	(%r15), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	8(%r15), %rax
	movq	_ATA_PROT_DMA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.14:
	movq	_ATAPI_PROT_DMA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_15:
	addq	$24, %rbx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_ata_ehi_push_desc
	jmp	LBB0_16
LBB0_4:
	incl	16(%rbx)
	xorl	%r12d, %r12d
LBB0_16:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ata%u: protocol %d task_state %d\n"

	.comm	_ATA_DFLAG_CDB_INTR,4,2         ## @ATA_DFLAG_CDB_INTR
	.comm	_ATA_PROT_DMA,8,3               ## @ATA_PROT_DMA
	.comm	_ATAPI_PROT_DMA,8,3             ## @ATAPI_PROT_DMA
L_.str.1:                               ## @.str.1
	.asciz	"ata%u: host_stat 0x%X\n"

	.comm	_ATA_DMA_INTR,4,2               ## @ATA_DMA_INTR
	.comm	_ATA_DMA_ERR,4,2                ## @ATA_DMA_ERR
	.comm	_AC_ERR_HOST_BUS,4,2            ## @AC_ERR_HOST_BUS
	.comm	_HSM_ST_ERR,4,2                 ## @HSM_ST_ERR
	.comm	_ATA_BUSY,4,2                   ## @ATA_BUSY
L_.str.2:                               ## @.str.2
	.asciz	"BMDMA stat 0x%x"

	.comm	_KERN_WARNING,4,2               ## @KERN_WARNING
	.no_dead_strip	_bfin_ata_host_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfin_ata_host_intr
_bfin_ata_host_intr:                    ; @bfin_ata_host_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x19, x0
	ldr	w1, [x0, #20]
	ldr	w2, [x20, #8]
	ldr	w8, [x0]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_VPRINTK
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_8
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.3:
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _ATA_DFLAG_CDB_INTR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATA_DFLAG_CDB_INTR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
	b	LBB0_12
LBB0_4:
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _ATA_PROT_DMA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATA_PROT_DMA@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _ATAPI_PROT_DMA@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ATAPI_PROT_DMA@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x21, x0
	ldr	w1, [x19, #20]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_VPRINTK
Lloh13:
	adrp	x8, _ATA_DMA_INTR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATA_DMA_INTR@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_12
; %bb.6:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #40]
	mov	x0, x20
	blr	x8
Lloh16:
	adrp	x8, _ATA_DMA_ERR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ATA_DMA_ERR@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	and	w0, w8, w21
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.7:
Lloh19:
	adrp	x8, _AC_ERR_HOST_BUS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AC_ERR_HOST_BUS@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
Lloh22:
	adrp	x8, _HSM_ST_ERR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HSM_ST_ERR@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_9
LBB0_8:
	mov	w21, #0
LBB0_9:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
Lloh25:
	adrp	x23, _ATA_BUSY@GOTPAGE
Lloh26:
	ldr	x23, [x23, _ATA_BUSY@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_11
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	mov	x0, x19
	blr	x8
	mov	x22, x0
	ldr	w8, [x23]
	and	w0, w8, w0
	bl	_unlikely
	cbz	x0, LBB0_14
LBB0_11:
	mov	w0, #1
	b	LBB0_13
LBB0_12:
	mov	w0, #0
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #32]
	mov	x0, x19
	blr	x8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	w3, #0
	bl	_ata_sff_hsm_move
	ldr	w0, [x20]
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.15:
	ldr	x8, [x20, #8]
Lloh27:
	adrp	x9, _ATA_PROT_DMA@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ATA_PROT_DMA@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.16:
Lloh30:
	adrp	x9, _ATAPI_PROT_DMA@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ATAPI_PROT_DMA@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_17:
	add	x0, x19, #24
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_ata_ehi_push_desc
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ata%u: protocol %d task_state %d\n"

	.comm	_ATA_DFLAG_CDB_INTR,4,2         ; @ATA_DFLAG_CDB_INTR
	.comm	_ATA_PROT_DMA,8,3               ; @ATA_PROT_DMA
	.comm	_ATAPI_PROT_DMA,8,3             ; @ATAPI_PROT_DMA
l_.str.1:                               ; @.str.1
	.asciz	"ata%u: host_stat 0x%X\n"

	.comm	_ATA_DMA_INTR,4,2               ; @ATA_DMA_INTR
	.comm	_ATA_DMA_ERR,4,2                ; @ATA_DMA_ERR
	.comm	_AC_ERR_HOST_BUS,4,2            ; @AC_ERR_HOST_BUS
	.comm	_HSM_ST_ERR,4,2                 ; @HSM_ST_ERR
	.comm	_ATA_BUSY,4,2                   ; @ATA_BUSY
l_.str.2:                               ; @.str.2
	.asciz	"BMDMA stat 0x%x"

	.comm	_KERN_WARNING,4,2               ; @KERN_WARNING
	.no_dead_strip	_bfin_ata_host_intr
.subsections_via_symbols
