	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adma_intr_mmio
_adma_intr_mmio:                        ## @adma_intr_mmio
	.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
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r13
	xorl	%r12d, %r12d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_3
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_15:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_ata_qc_complete
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movl	(%r13), %eax
	cmpq	%rax, %r12
	jae	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%r12,8), %rbx
	movq	16(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	movq	_adma_state_mmio@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ata_qc_from_tag
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movq	_ATA_TFLAG_POLLING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_ata_sff_check_status
	movl	%eax, %ecx
	movq	_ATA_BUSY@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%rbx), %esi
	movl	12(%r15), %edx
	leaq	L_.str(%rip), %rdi
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	callq	_DPRINTK
	movq	_adma_state_idle@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, %r14d
	callq	_ac_err_mask
	orq	%rax, (%r15)
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_ata_ehi_clear_desc
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	callq	_ata_ehi_push_desc
	movq	(%r15), %rax
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_ata_port_abort
	jmp	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_ata_port_freeze
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_adma_state_mmio,8,3            ## @adma_state_mmio
	.comm	_ATA_TFLAG_POLLING,4,2          ## @ATA_TFLAG_POLLING
	.comm	_ATA_BUSY,4,2                   ## @ATA_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ata%u: protocol %d (dev_stat 0x%X)\n"

	.comm	_adma_state_idle,8,3            ## @adma_state_idle
L_.str.1:                               ## @.str.1
	.asciz	"status 0x%02X"

	.comm	_AC_ERR_DEV,8,3                 ## @AC_ERR_DEV
	.no_dead_strip	_adma_intr_mmio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adma_intr_mmio
_adma_intr_mmio:                        ; @adma_intr_mmio
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x0
	mov	x26, #0
	mov	w22, #0
Lloh0:
	adrp	x27, _adma_state_mmio@GOTPAGE
Lloh1:
	ldr	x27, [x27, _adma_state_mmio@GOTPAGEOFF]
Lloh2:
	adrp	x28, _ATA_TFLAG_POLLING@GOTPAGE
Lloh3:
	ldr	x28, [x28, _ATA_TFLAG_POLLING@GOTPAGEOFF]
Lloh4:
	adrp	x21, _ATA_BUSY@GOTPAGE
Lloh5:
	ldr	x21, [x21, _ATA_BUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	w22, #0
LBB0_3:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x24
	bl	_ata_qc_complete
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w22, #1
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x26, x26, #1
	ldr	w8, [x19]
	cmp	x26, x8
	b.hs	LBB0_3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x23, [x8, x26, lsl #3]
	ldr	x20, [x23, #16]
	cbz	x20, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x23, #4]
	mov	x0, x23
	bl	_ata_qc_from_tag
	cbz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x24, x0
	ldr	w8, [x0, #8]
	ldr	w9, [x28]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_ata_sff_check_status
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x25, x0
	ldr	w1, [x23, #8]
	ldr	w2, [x24, #12]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x25
	bl	_DPRINTK
Lloh8:
	adrp	x8, _adma_state_idle@GOTPAGE
Lloh9:
	ldr	x8, [x8, _adma_state_idle@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x20]
	mov	x0, x25
	bl	_ac_err_mask
	ldr	x8, [x24]
	orr	x8, x8, x0
	str	x8, [x24]
	cbz	x8, LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_ata_ehi_clear_desc
	mov	x0, x23
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x25
	bl	_ata_ehi_push_desc
	ldr	x8, [x24]
Lloh13:
	adrp	x9, _AC_ERR_DEV@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AC_ERR_DEV@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	mov	x0, x23
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_ata_port_abort
	b	LBB0_5
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_ata_port_freeze
	b	LBB0_5
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_adma_state_mmio,8,3            ; @adma_state_mmio
	.comm	_ATA_TFLAG_POLLING,4,2          ; @ATA_TFLAG_POLLING
	.comm	_ATA_BUSY,4,2                   ; @ATA_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ata%u: protocol %d (dev_stat 0x%X)\n"

	.comm	_adma_state_idle,8,3            ; @adma_state_idle
l_.str.1:                               ; @.str.1
	.asciz	"status 0x%02X"

	.comm	_AC_ERR_DEV,8,3                 ; @AC_ERR_DEV
	.no_dead_strip	_adma_intr_mmio
.subsections_via_symbols
