	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_adma_get_residue
_tegra_adma_get_residue:                ## @tegra_adma_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
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_ADMA_CH_XFER_STATUS_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ADMA_CH_XFER_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tdma_ch_read
	movl	%eax, %ecx
	movl	(%rbx), %edx
	subl	%edx, %eax
	jae	LBB0_2
## %bb.1:
	addl	%ecx, %r15d
	movl	4(%rbx), %eax
	subl	%edx, %r15d
	addl	%r15d, %eax
	incl	%eax
	jmp	LBB0_3
LBB0_2:
	addl	4(%rbx), %eax
LBB0_3:
	movl	%eax, 4(%rbx)
	xorl	%edx, %edx
	divl	(%r14)
	movl	%ecx, (%rbx)
	movl	4(%r14), %eax
	imull	8(%r14), %edx
	subl	%edx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADMA_CH_XFER_STATUS_COUNT_MASK,4,2 ## @ADMA_CH_XFER_STATUS_COUNT_MASK
	.comm	_ADMA_CH_XFER_STATUS,4,2        ## @ADMA_CH_XFER_STATUS
	.no_dead_strip	_tegra_adma_get_residue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_adma_get_residue
_tegra_adma_get_residue:                ; @tegra_adma_get_residue
	.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	x20, [x0, #8]
Lloh0:
	adrp	x8, _ADMA_CH_XFER_STATUS_COUNT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADMA_CH_XFER_STATUS_COUNT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _ADMA_CH_XFER_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADMA_CH_XFER_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_tdma_ch_read
	ldr	w8, [x19]
	subs	w9, w0, w8
	b.hs	LBB0_2
; %bb.1:
	ldr	w9, [x19, #4]
	add	w10, w21, w0
	sub	w8, w10, w8
	add	w8, w8, w9
	add	w8, w8, #1
	b	LBB0_3
LBB0_2:
	ldr	w8, [x19, #4]
	add	w8, w9, w8
LBB0_3:
	str	w8, [x19, #4]
	ldp	w9, w10, [x20]
	udiv	w11, w8, w9
	msub	w8, w11, w9, w8
	str	w0, [x19]
	ldr	w9, [x20, #8]
	msub	w0, w9, w8, w10
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ADMA_CH_XFER_STATUS_COUNT_MASK,4,2 ; @ADMA_CH_XFER_STATUS_COUNT_MASK
	.comm	_ADMA_CH_XFER_STATUS,4,2        ; @ADMA_CH_XFER_STATUS
	.no_dead_strip	_tegra_adma_get_residue
.subsections_via_symbols
