	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_pcm_channel_set_period ## -- Begin function cs46xx_dsp_pcm_channel_set_period
	.p2align	4, 0x90
_cs46xx_dsp_pcm_channel_set_period:     ## @cs46xx_dsp_pcm_channel_set_period
	.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, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movl	(%rax), %esi
	shll	$2, %esi
	callq	_snd_cs46xx_peek
	movq	_DMA_RQ_C1_SOURCE_SIZE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$255, %ebx
	jle	LBB0_1
## %bb.5:
	cmpl	$1023, %ebx                     ## imm = 0x3FF
	jg	LBB0_9
## %bb.6:
	cmpl	$256, %ebx                      ## imm = 0x100
	je	LBB0_16
## %bb.7:
	cmpl	$512, %ebx                      ## imm = 0x200
	jne	LBB0_15
## %bb.8:
	movq	_DMA_RQ_C1_SOURCE_MOD256@GOTPCREL(%rip), %rdx
	jmp	LBB0_17
LBB0_1:
	cmpl	$32, %ebx
	je	LBB0_14
## %bb.2:
	cmpl	$64, %ebx
	je	LBB0_13
## %bb.3:
	cmpl	$128, %ebx
	jne	LBB0_15
## %bb.4:
	movq	_DMA_RQ_C1_SOURCE_MOD64@GOTPCREL(%rip), %rdx
	jmp	LBB0_17
LBB0_9:
	cmpl	$2048, %ebx                     ## imm = 0x800
	je	LBB0_10
## %bb.11:
	cmpl	$1024, %ebx                     ## imm = 0x400
	jne	LBB0_15
## %bb.12:
	movq	_DMA_RQ_C1_SOURCE_MOD512@GOTPCREL(%rip), %rdx
	jmp	LBB0_17
LBB0_16:
	movq	_DMA_RQ_C1_SOURCE_MOD128@GOTPCREL(%rip), %rdx
	jmp	LBB0_17
LBB0_14:
	movq	_DMA_RQ_C1_SOURCE_MOD16@GOTPCREL(%rip), %rdx
	jmp	LBB0_17
LBB0_10:
	movq	_DMA_RQ_C1_SOURCE_MOD1024@GOTPCREL(%rip), %rdx
	jmp	LBB0_17
LBB0_15:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_snd_printdd
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_13:
	movq	_DMA_RQ_C1_SOURCE_MOD32@GOTPCREL(%rip), %rdx
LBB0_17:
	notl	%ecx
	andl	%ecx, %eax
	orl	(%rdx), %eax
	movq	(%r15), %rcx
	movl	(%rcx), %esi
	shll	$2, %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_snd_cs46xx_poke
	xorl	%eax, %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_RQ_C1_SOURCE_SIZE_MASK,4,2 ## @DMA_RQ_C1_SOURCE_SIZE_MASK
	.comm	_DMA_RQ_C1_SOURCE_MOD1024,4,2   ## @DMA_RQ_C1_SOURCE_MOD1024
	.comm	_DMA_RQ_C1_SOURCE_MOD512,4,2    ## @DMA_RQ_C1_SOURCE_MOD512
	.comm	_DMA_RQ_C1_SOURCE_MOD256,4,2    ## @DMA_RQ_C1_SOURCE_MOD256
	.comm	_DMA_RQ_C1_SOURCE_MOD128,4,2    ## @DMA_RQ_C1_SOURCE_MOD128
	.comm	_DMA_RQ_C1_SOURCE_MOD64,4,2     ## @DMA_RQ_C1_SOURCE_MOD64
	.comm	_DMA_RQ_C1_SOURCE_MOD32,4,2     ## @DMA_RQ_C1_SOURCE_MOD32
	.comm	_DMA_RQ_C1_SOURCE_MOD16,4,2     ## @DMA_RQ_C1_SOURCE_MOD16
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"period size (%d) not supported by HW\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_pcm_channel_set_period ; -- Begin function cs46xx_dsp_pcm_channel_set_period
	.p2align	2
_cs46xx_dsp_pcm_channel_set_period:     ; @cs46xx_dsp_pcm_channel_set_period
	.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, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
	ldr	w8, [x8]
	lsl	w1, w8, #2
	bl	_snd_cs46xx_peek
Lloh0:
	adrp	x8, _DMA_RQ_C1_SOURCE_SIZE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_RQ_C1_SOURCE_SIZE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, #255
	b.le	LBB0_5
; %bb.1:
	cmp	w21, #1023
	b.gt	LBB0_9
; %bb.2:
	cmp	w21, #256
	b.eq	LBB0_12
; %bb.3:
	cmp	w21, #512
	b.ne	LBB0_15
; %bb.4:
Lloh3:
	adrp	x9, _DMA_RQ_C1_SOURCE_MOD256@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_RQ_C1_SOURCE_MOD256@GOTPAGEOFF]
	b	LBB0_17
LBB0_5:
	cmp	w21, #32
	b.eq	LBB0_13
; %bb.6:
	cmp	w21, #64
	b.eq	LBB0_16
; %bb.7:
	cmp	w21, #128
	b.ne	LBB0_15
; %bb.8:
Lloh5:
	adrp	x9, _DMA_RQ_C1_SOURCE_MOD64@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DMA_RQ_C1_SOURCE_MOD64@GOTPAGEOFF]
	b	LBB0_17
LBB0_9:
	cmp	w21, #2048
	b.eq	LBB0_14
; %bb.10:
	cmp	w21, #1024
	b.ne	LBB0_15
; %bb.11:
Lloh7:
	adrp	x9, _DMA_RQ_C1_SOURCE_MOD512@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DMA_RQ_C1_SOURCE_MOD512@GOTPAGEOFF]
	b	LBB0_17
LBB0_12:
Lloh9:
	adrp	x9, _DMA_RQ_C1_SOURCE_MOD128@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_RQ_C1_SOURCE_MOD128@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
Lloh11:
	adrp	x9, _DMA_RQ_C1_SOURCE_MOD16@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DMA_RQ_C1_SOURCE_MOD16@GOTPAGEOFF]
	b	LBB0_17
LBB0_14:
Lloh13:
	adrp	x9, _DMA_RQ_C1_SOURCE_MOD1024@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DMA_RQ_C1_SOURCE_MOD1024@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_snd_printdd
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_16:
Lloh20:
	adrp	x9, _DMA_RQ_C1_SOURCE_MOD32@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DMA_RQ_C1_SOURCE_MOD32@GOTPAGEOFF]
LBB0_17:
	bic	w8, w0, w8
	ldr	w9, [x9]
	orr	w2, w9, w8
	ldr	x8, [x20]
	ldr	w8, [x8]
	lsl	w1, w8, #2
	mov	x0, x19
	bl	_snd_cs46xx_poke
	mov	w0, #0
LBB0_18:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_RQ_C1_SOURCE_SIZE_MASK,4,2 ; @DMA_RQ_C1_SOURCE_SIZE_MASK
	.comm	_DMA_RQ_C1_SOURCE_MOD1024,4,2   ; @DMA_RQ_C1_SOURCE_MOD1024
	.comm	_DMA_RQ_C1_SOURCE_MOD512,4,2    ; @DMA_RQ_C1_SOURCE_MOD512
	.comm	_DMA_RQ_C1_SOURCE_MOD256,4,2    ; @DMA_RQ_C1_SOURCE_MOD256
	.comm	_DMA_RQ_C1_SOURCE_MOD128,4,2    ; @DMA_RQ_C1_SOURCE_MOD128
	.comm	_DMA_RQ_C1_SOURCE_MOD64,4,2     ; @DMA_RQ_C1_SOURCE_MOD64
	.comm	_DMA_RQ_C1_SOURCE_MOD32,4,2     ; @DMA_RQ_C1_SOURCE_MOD32
	.comm	_DMA_RQ_C1_SOURCE_MOD16,4,2     ; @DMA_RQ_C1_SOURCE_MOD16
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"period size (%d) not supported by HW\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
