	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_config_write
_sdma_config_write:                     ## @sdma_config_write
	.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	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_to_sdma_chan
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_2
## %bb.1:
	movl	20(%rbx), %ecx
	movl	%ecx, 12(%rax)
	movl	4(%rbx), %ecx
	movl	(%rbx), %edx
	jmp	LBB0_5
LBB0_2:
	movq	_DMA_DEV_TO_DEV@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_4
## %bb.3:
	movl	20(%rbx), %ecx
	movl	%ecx, 16(%rax)
	movl	16(%rbx), %ecx
	movl	%ecx, 12(%rax)
	movq	_SDMA_WATERMARK_LEVEL_LWML@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rbx), %ecx
	movl	%ecx, (%rax)
	movl	8(%rbx), %edx
	shll	$16, %edx
	movq	_SDMA_WATERMARK_LEVEL_HWML@GOTPCREL(%rip), %rsi
	andl	(%rsi), %edx
	orl	%ecx, %edx
	movl	%edx, (%rax)
	movl	12(%rbx), %ecx
	jmp	LBB0_6
LBB0_4:
	movl	16(%rbx), %ecx
	movl	%ecx, 12(%rax)
	movl	12(%rbx), %ecx
	movl	8(%rbx), %edx
LBB0_5:
	imull	%ecx, %edx
	movl	%edx, (%rax)
LBB0_6:
	movl	%ecx, 4(%rax)
	movl	%r15d, 8(%rax)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdma_config_channel            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_DEV_TO_MEM,4,2             ## @DMA_DEV_TO_MEM
	.comm	_DMA_DEV_TO_DEV,4,2             ## @DMA_DEV_TO_DEV
	.comm	_SDMA_WATERMARK_LEVEL_LWML,4,2  ## @SDMA_WATERMARK_LEVEL_LWML
	.comm	_SDMA_WATERMARK_LEVEL_HWML,4,2  ## @SDMA_WATERMARK_LEVEL_HWML
	.no_dead_strip	_sdma_config_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_config_write
_sdma_config_write:                     ; @sdma_config_write
	.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, x2
	mov	x21, x1
	mov	x20, x0
	bl	_to_sdma_chan
Lloh0:
	adrp	x8, _DMA_DEV_TO_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x21, #20]
	str	w8, [x0, #12]
	ldp	w9, w8, [x21]
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _DMA_DEV_TO_DEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_DEV_TO_DEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.3:
	ldr	d0, [x21, #16]
	stur	d0, [x0, #12]
Lloh6:
	adrp	x8, _SDMA_WATERMARK_LEVEL_LWML@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDMA_WATERMARK_LEVEL_LWML@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh8:
	ldr	w8, [x8]
	and	w9, w8, w9
	str	w9, [x0]
Lloh9:
	adrp	x8, _SDMA_WATERMARK_LEVEL_HWML@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDMA_WATERMARK_LEVEL_HWML@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x8]
	ldp	w11, w8, [x21, #8]
	and	w10, w10, w11, lsl #16
	orr	w9, w10, w9
	b	LBB0_6
LBB0_4:
	ldr	w8, [x21, #16]
	str	w8, [x0, #12]
	ldp	w9, w8, [x21, #8]
LBB0_5:
	mul	w9, w8, w9
LBB0_6:
	stp	w9, w8, [x0]
	str	w19, [x0, #8]
	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
	b	_sdma_config_channel
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_DEV_TO_MEM,4,2             ; @DMA_DEV_TO_MEM
	.comm	_DMA_DEV_TO_DEV,4,2             ; @DMA_DEV_TO_DEV
	.comm	_SDMA_WATERMARK_LEVEL_LWML,4,2  ; @SDMA_WATERMARK_LEVEL_LWML
	.comm	_SDMA_WATERMARK_LEVEL_HWML,4,2  ; @SDMA_WATERMARK_LEVEL_HWML
	.no_dead_strip	_sdma_config_write
.subsections_via_symbols
