	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dwc_get_residue
_dwc_get_residue:                       ## @dwc_get_residue
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_dwc_find_desc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_dwc_first_active
	cmpq	%rax, %rbx
	je	LBB0_3
## %bb.6:
	movq	(%rbx), %r14
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_3:
	movq	8(%rbx), %r14
	movq	_DW_DMA_IS_SOFT_LLP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	testq	%r14, %r14
	je	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	callq	_dwc_get_sent
	subq	%rax, %r14
LBB0_7:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DW_DMA_IS_SOFT_LLP,4,2         ## @DW_DMA_IS_SOFT_LLP
	.no_dead_strip	_dwc_get_residue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dwc_get_residue
_dwc_get_residue:                       ; @dwc_get_residue
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x20
	bl	_dwc_find_desc
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_dwc_first_active
	cmp	x20, x0
	b.eq	LBB0_3
; %bb.2:
	ldr	x20, [x20]
	b	LBB0_5
LBB0_3:
	ldr	x20, [x20, #8]
Lloh0:
	adrp	x8, _DW_DMA_IS_SOFT_LLP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DW_DMA_IS_SOFT_LLP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_bit
	cmp	x0, #0
	ccmp	x20, #0, #4, ne
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_dwc_get_sent
	sub	x20, x20, x0
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DW_DMA_IS_SOFT_LLP,4,2         ; @DW_DMA_IS_SOFT_LLP
	.no_dead_strip	_dwc_get_residue
.subsections_via_symbols
