	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_3c505_dma
_check_3c505_dma:                       ## @check_3c505_dma
	.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
	callq	_netdev_priv
	cmpq	$0, 24(%rax)
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	40(%rbx), %rsi
	addq	$10, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	(%r14), %edi
	movl	4(%r14), %r15d
	cmpq	$0, 32(%rbx)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r12
	cmoveq	%rax, %r12
	callq	_get_dma_residue
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_pr_err
	movq	%rbx, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %r12
	movl	(%r14), %edi
	callq	_disable_dma
	movq	%r12, %rdi
	callq	_release_dma_lock
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	decq	%rax
	movq	%rax, 8(%rbx)
LBB0_4:
	movq	_DMAE@GOTPCREL(%rip), %rax
	movq	_TCEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_DIR@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	notl	%edi
	andl	(%rbx), %edi
	movq	%r14, %rsi
	callq	_outb_control
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,4,2                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: DMA %s timed out, %d bytes left\n"

L_.str.1:                               ## @.str.1
	.asciz	"download"

L_.str.2:                               ## @.str.2
	.asciz	"upload"

	.comm	_DMAE,4,2                       ## @DMAE
	.comm	_TCEN,4,2                       ## @TCEN
	.comm	_DIR,4,2                        ## @DIR
	.no_dead_strip	_check_3c505_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_3c505_dma
_check_3c505_dma:                       ; @check_3c505_dma
	.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
	bl	_netdev_priv
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x20, #40]
	add	x1, x8, #10
	bl	_time_after
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x20, #32]
Lloh3:
	adrp	x9, l_.str.1@PAGE
Lloh4:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh5:
	adrp	x10, l_.str.2@PAGE
Lloh6:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x21, x10, x9, eq
	ldp	w0, w22, [x19]
	bl	_get_dma_residue
	mov	x3, x0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_pr_err
	add	x21, x20, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	stp	xzr, xzr, [x20, #16]
	bl	_claim_dma_lock
	mov	x22, x0
	ldr	w0, [x19]
	bl	_disable_dma
	mov	x0, x22
	bl	_release_dma_lock
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
; %bb.3:
	sub	x8, x8, #1
	str	x8, [x20, #8]
LBB0_4:
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _DMAE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMAE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _TCEN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _TCEN@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh15:
	adrp	x10, _DIR@GOTPAGE
Lloh16:
	ldr	x10, [x10, _DIR@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w0, w8, w9
	mov	x1, x19
	bl	_outb_control
	mov	x0, x21
	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
	b	_spin_unlock_irqrestore
LBB0_5:
	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 AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,4,2                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: DMA %s timed out, %d bytes left\n"

l_.str.1:                               ; @.str.1
	.asciz	"download"

l_.str.2:                               ; @.str.2
	.asciz	"upload"

	.comm	_DMAE,4,2                       ; @DMAE
	.comm	_TCEN,4,2                       ; @TCEN
	.comm	_DIR,4,2                        ; @DIR
	.no_dead_strip	_check_3c505_dma
.subsections_via_symbols
