	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_fdma_ch_sta_update
_st_fdma_ch_sta_update:                 ## @st_fdma_ch_sta_update
	.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	%rsi, %r15
	movq	%rdi, %rbx
	movl	16(%rdi), %r14d
	movq	8(%rdi), %r12
	movq	_FDMA_CH_CMD_OFST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fchan_read
	movq	_FDMA_INT_STA_ERR@GOTPCREL(%rip), %rcx
	testq	%r15, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_FDMA_CH_CMD_ERR_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movq	%rax, %rcx
	callq	_dev_warn
	movq	_DMA_ERROR@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_FDMA_CH_CMD_STA_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	cmpq	$129, %rax
	je	LBB0_3
## %bb.4:
	cmpq	$128, %rax
	jne	LBB0_7
## %bb.5:
	movq	_DMA_IN_PROGRESS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_DMA_PAUSED@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_FDMA_CH_CMD_OFST,4,2           ## @FDMA_CH_CMD_OFST
	.comm	_FDMA_CH_CMD_ERR_MASK,8,3       ## @FDMA_CH_CMD_ERR_MASK
	.comm	_FDMA_CH_CMD_STA_MASK,8,3       ## @FDMA_CH_CMD_STA_MASK
	.comm	_FDMA_INT_STA_ERR,8,3           ## @FDMA_INT_STA_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chan:%d, error:%ld\n"

	.comm	_DMA_ERROR,4,2                  ## @DMA_ERROR
	.comm	_DMA_PAUSED,4,2                 ## @DMA_PAUSED
	.comm	_DMA_IN_PROGRESS,4,2            ## @DMA_IN_PROGRESS
	.no_dead_strip	_st_fdma_ch_sta_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st_fdma_ch_sta_update
_st_fdma_ch_sta_update:                 ; @st_fdma_ch_sta_update
	.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	x21, x1
	mov	x19, x0
	ldr	w20, [x0, #16]
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x8, _FDMA_CH_CMD_OFST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FDMA_CH_CMD_OFST@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_fchan_read
Lloh3:
	adrp	x8, _FDMA_INT_STA_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FDMA_INT_STA_ERR@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	tst	x8, x21
	b.eq	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _FDMA_CH_CMD_ERR_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FDMA_CH_CMD_ERR_MASK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	and	x3, x8, x0
	ldr	w0, [x22]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_warn
Lloh11:
	adrp	x8, _DMA_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_ERROR@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	str	w8, [x19]
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
LBB0_4:
Lloh13:
	adrp	x8, _FDMA_CH_CMD_STA_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FDMA_CH_CMD_STA_MASK@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	and	x8, x8, x0
	cmp	x8, #129
	b.eq	LBB0_7
; %bb.5:
	cmp	x8, #128
	b.ne	LBB0_3
; %bb.6:
Lloh16:
	adrp	x8, _DMA_IN_PROGRESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DMA_IN_PROGRESS@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
Lloh18:
	adrp	x8, _DMA_PAUSED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DMA_PAUSED@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_FDMA_CH_CMD_OFST,4,2           ; @FDMA_CH_CMD_OFST
	.comm	_FDMA_CH_CMD_ERR_MASK,8,3       ; @FDMA_CH_CMD_ERR_MASK
	.comm	_FDMA_CH_CMD_STA_MASK,8,3       ; @FDMA_CH_CMD_STA_MASK
	.comm	_FDMA_INT_STA_ERR,8,3           ; @FDMA_INT_STA_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chan:%d, error:%ld\n"

	.comm	_DMA_ERROR,4,2                  ; @DMA_ERROR
	.comm	_DMA_PAUSED,4,2                 ; @DMA_PAUSED
	.comm	_DMA_IN_PROGRESS,4,2            ; @DMA_IN_PROGRESS
	.no_dead_strip	_st_fdma_ch_sta_update
.subsections_via_symbols
