	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv_swncq_dmafis
_nv_swncq_dmafis:                       ## @nv_swncq_dmafis
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	callq	___ata_bmdma_stop
	movq	%r14, %rdi
	callq	_nv_swncq_tag
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DPRINTK
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ata_qc_from_tag
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.1:
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	4(%rbx), %r12d
	movq	_ATA_PRD_TBL_SZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	(%rbx), %rdi
	imulq	%rax, %rdi
	addq	(%r15), %rdi
	movq	_ATA_DMA_TABLE_OFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_iowrite32
	movq	_ATA_DMA_CMD@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_ioread8
	movq	_ATA_DMA_WR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %edi
	testl	%r12d, %r12d
	cmovnel	%ecx, %edi
	movq	_ATA_DMA_START@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	callq	_iowrite8
	movl	$1, %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma setup tag 0x%x\n"

	.comm	_ATA_TFLAG_WRITE,4,2            ## @ATA_TFLAG_WRITE
	.comm	_ATA_PRD_TBL_SZ,4,2             ## @ATA_PRD_TBL_SZ
	.comm	_ATA_DMA_TABLE_OFS,8,3          ## @ATA_DMA_TABLE_OFS
	.comm	_ATA_DMA_CMD,8,3                ## @ATA_DMA_CMD
	.comm	_ATA_DMA_WR,4,2                 ## @ATA_DMA_WR
	.comm	_ATA_DMA_START,4,2              ## @ATA_DMA_START
	.no_dead_strip	_nv_swncq_dmafis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv_swncq_dmafis
_nv_swncq_dmafis:                       ; @nv_swncq_dmafis
	.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, x0
	ldr	x21, [x0, #8]
	bl	___ata_bmdma_stop
	mov	x0, x19
	bl	_nv_swncq_tag
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DPRINTK
	mov	x0, x19
	mov	x1, x20
	bl	_ata_qc_from_tag
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _ATA_TFLAG_WRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATA_TFLAG_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _ATA_PRD_TBL_SZ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATA_PRD_TBL_SZ@GOTPAGEOFF]
Lloh7:
	ldrsw	x9, [x9]
	ldp	w10, w21, [x20]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	madd	x0, x10, x9, x8
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _ATA_DMA_TABLE_OFS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ATA_DMA_TABLE_OFS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	x8, [x19]
Lloh11:
	adrp	x20, _ATA_DMA_CMD@GOTPAGE
Lloh12:
	ldr	x20, [x20, _ATA_DMA_CMD@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_ioread8
Lloh13:
	adrp	x8, _ATA_DMA_WR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATA_DMA_WR@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	bic	w9, w0, w8
	orr	w8, w8, w0
	tst	w22, w21
Lloh16:
	adrp	x10, _ATA_DMA_START@GOTPAGE
Lloh17:
	ldr	x10, [x10, _ATA_DMA_START@GOTPAGEOFF]
	csel	w8, w8, w9, eq
Lloh18:
	ldr	w9, [x10]
	orr	w0, w8, w9
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_iowrite8
	mov	w0, #1
LBB0_3:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma setup tag 0x%x\n"

	.comm	_ATA_TFLAG_WRITE,4,2            ; @ATA_TFLAG_WRITE
	.comm	_ATA_PRD_TBL_SZ,4,2             ; @ATA_PRD_TBL_SZ
	.comm	_ATA_DMA_TABLE_OFS,8,3          ; @ATA_DMA_TABLE_OFS
	.comm	_ATA_DMA_CMD,8,3                ; @ATA_DMA_CMD
	.comm	_ATA_DMA_WR,4,2                 ; @ATA_DMA_WR
	.comm	_ATA_DMA_START,4,2              ; @ATA_DMA_START
	.no_dead_strip	_nv_swncq_dmafis
.subsections_via_symbols
