	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_run_channel0
_sdma_run_channel0:                     ## @sdma_run_channel0
	.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
	xorl	%esi, %esi
	callq	_sdma_enable_channel
	movq	_SDMA_H_STATSTOP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movl	$500, %r8d                      ## imm = 0x1F4
	callq	_readl_relaxed_poll_timeout_atomic
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movq	_SDMA_H_CONFIG@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	movq	_SDMA_H_CONFIG_CSM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %edi
	jne	LBB0_4
## %bb.3:
	orl	%eax, %edi
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	callq	_writel_relaxed
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_H_STATSTOP,8,3            ## @SDMA_H_STATSTOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout waiting for CH0 ready\n"

	.comm	_SDMA_H_CONFIG,8,3              ## @SDMA_H_CONFIG
	.comm	_SDMA_H_CONFIG_CSM,4,2          ## @SDMA_H_CONFIG_CSM
	.no_dead_strip	_sdma_run_channel0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_run_channel0
_sdma_run_channel0:                     ; @sdma_run_channel0
	.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
	mov	w1, #0
	bl	_sdma_enable_channel
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _SDMA_H_STATSTOP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SDMA_H_STATSTOP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w2, #1
	mov	w3, #1
	mov	w4, #500
	bl	_readl_relaxed_poll_timeout_atomic
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	ldr	x8, [x19]
Lloh5:
	adrp	x21, _SDMA_H_CONFIG@GOTPAGE
Lloh6:
	ldr	x21, [x21, _SDMA_H_CONFIG@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh7:
	adrp	x8, _SDMA_H_CONFIG_CSM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SDMA_H_CONFIG_CSM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:
	orr	w0, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel_relaxed
LBB0_4:
	mov	x0, x20
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_H_STATSTOP,8,3            ; @SDMA_H_STATSTOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout waiting for CH0 ready\n"

	.comm	_SDMA_H_CONFIG,8,3              ; @SDMA_H_CONFIG
	.comm	_SDMA_H_CONFIG_CSM,4,2          ; @SDMA_H_CONFIG_CSM
	.no_dead_strip	_sdma_run_channel0
.subsections_via_symbols
