	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsu_dma_get_status             ## -- Begin function hsu_dma_get_status
	.p2align	4, 0x90
_hsu_dma_get_status:                    ## @hsu_dma_get_status
	.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), %rax
	cmpw	%si, (%rax)
	jbe	LBB0_1
## %bb.3:
	movq	%rdx, %r14
	movzwl	%si, %ebx
	shlq	$2, %rbx
	addq	8(%rax), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_HSU_CH_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hsu_chan_readl
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_HSU_CH_SR_DESCE_ANY@GOTPCREL(%rip), %rax
	movq	_HSU_CH_SR_CDESC_ANY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	notl	%ebx
	andl	%r15d, %ebx
	je	LBB0_4
## %bb.5:
	movq	_HSU_CH_SR_DESCTO_ANY@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%ebx, %ecx
	je	LBB0_7
## %bb.6:
	movl	$2, %edi
	callq	_udelay
	movl	(%r15), %ecx
LBB0_7:
	notl	%ecx
	xorl	%eax, %eax
	andl	%ecx, %ebx
	movl	%ebx, (%r14)
	sete	%al
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HSU_CH_SR,4,2                  ## @HSU_CH_SR
	.comm	_HSU_CH_SR_DESCE_ANY,4,2        ## @HSU_CH_SR_DESCE_ANY
	.comm	_HSU_CH_SR_CDESC_ANY,4,2        ## @HSU_CH_SR_CDESC_ANY
	.comm	_EIO,4,2                        ## @EIO
	.comm	_HSU_CH_SR_DESCTO_ANY,4,2       ## @HSU_CH_SR_DESCTO_ANY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsu_dma_get_status             ; -- Begin function hsu_dma_get_status
	.p2align	2
_hsu_dma_get_status:                    ; @hsu_dma_get_status
	.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
	ldr	x8, [x0]
	ldrh	w9, [x8]
	cmp	w9, w1
	b.ls	LBB0_5
; %bb.1:
	mov	x19, x2
	ldr	x8, [x8, #8]
	add	x20, x8, w1, uxtw #2
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _HSU_CH_SR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HSU_CH_SR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_hsu_chan_readl
	mov	x21, x0
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh3:
	adrp	x8, _HSU_CH_SR_DESCE_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HSU_CH_SR_DESCE_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _HSU_CH_SR_CDESC_ANY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HSU_CH_SR_CDESC_ANY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	w20, w21, w8
	b.eq	LBB0_6
; %bb.2:
Lloh9:
	adrp	x21, _HSU_CH_SR_DESCTO_ANY@GOTPAGE
Lloh10:
	ldr	x21, [x21, _HSU_CH_SR_DESCTO_ANY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #2
	bl	_udelay
	ldr	w8, [x21]
LBB0_4:
	bics	w8, w20, w8
	str	w8, [x19]
	cset	w0, eq
	b	LBB0_8
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HSU_CH_SR,4,2                  ; @HSU_CH_SR
	.comm	_HSU_CH_SR_DESCE_ANY,4,2        ; @HSU_CH_SR_DESCE_ANY
	.comm	_HSU_CH_SR_CDESC_ANY,4,2        ; @HSU_CH_SR_CDESC_ANY
	.comm	_EIO,4,2                        ; @EIO
	.comm	_HSU_CH_SR_DESCTO_ANY,4,2       ; @HSU_CH_SR_DESCTO_ANY
.subsections_via_symbols
