	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_mixart_hw_params
_snd_mixart_hw_params:                  ## @snd_mixart_hw_params
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_snd_pcm_substream_chip
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r14
	movq	16(%r12), %rax
	movq	8(%rax), %r13
	movq	%rbx, %rdi
	callq	_params_channels
	movl	%eax, %r15d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r13, %rbx
	callq	_params_format
	movl	%eax, %r13d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	movq	_MIXART_PCM_DIGITAL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_4
## %bb.1:
	movq	_MIXART_PCM_ANALOG@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpl	(%rcx), %eax
	setg	%sil
	movq	(%r12), %rax
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	8(%r12), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mixart_update_playback_stream_level
	jmp	LBB0_4
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mixart_update_capture_stream_level
LBB0_4:
	movl	%r15d, 4(%rbx)
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_mixart_set_format
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_params_buffer_bytes
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_snd_pcm_lib_malloc_pages
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_8
## %bb.7:
	movq	_MIXART_MAX_STREAM_PER_CARD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	imull	(%r9), %eax
	movq	_MIXART_PLAYBACK_STREAMS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MIXART_CAPTURE_STREAMS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	%ecx, %edx
	imull	(%rbx), %edx
	movq	(%r12), %rsi
	movq	_SNDRV_PCM_STREAM_CAPTURE@GOTPCREL(%rip), %r8
	xorl	%edi, %edi
	cmpq	(%r8), %rsi
	cmovel	%ecx, %edi
	movl	8(%r12), %r8d
	addl	%r8d, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	movq	8(%r9), %rcx
	movq	8(%rcx), %rdi
	movq	16(%r12), %rcx
	movl	4(%rcx), %edx
	movslq	%eax, %rsi
	movl	%edx, 4(%rdi,%rsi,8)
	movl	(%rcx), %ecx
	movl	%ecx, (%rdi,%rsi,8)
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_snd_printdd
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %r14d
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIXART_PCM_DIGITAL,4,2         ## @MIXART_PCM_DIGITAL
	.comm	_MIXART_PCM_ANALOG,4,2          ## @MIXART_PCM_ANALOG
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ## @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_MIXART_MAX_STREAM_PER_CARD,4,2 ## @MIXART_MAX_STREAM_PER_CARD
	.comm	_MIXART_PLAYBACK_STREAMS,4,2    ## @MIXART_PLAYBACK_STREAMS
	.comm	_MIXART_CAPTURE_STREAMS,4,2     ## @MIXART_CAPTURE_STREAMS
	.comm	_SNDRV_PCM_STREAM_CAPTURE,8,3   ## @SNDRV_PCM_STREAM_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"snd_mixart_hw_params(pcm %d) : dma_addr(%x) dma_bytes(%x) subs-number(%d)\n"

	.no_dead_strip	_snd_mixart_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_mixart_hw_params
_snd_mixart_hw_params:                  ; @snd_mixart_hw_params
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x1
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	x8, [x20, #16]
	ldr	x22, [x8, #8]
	mov	x0, x23
	bl	_params_channels
	mov	x24, x0
	mov	x0, x23
	bl	_params_format
	mov	x25, x0
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _MIXART_PCM_DIGITAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MIXART_PCM_DIGITAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _MIXART_PCM_ANALOG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MIXART_PCM_ANALOG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w1, gt
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w2, [x20, #8]
	mov	x0, x21
	bl	_mixart_update_playback_stream_level
	b	LBB0_4
LBB0_3:
	mov	x0, x21
	bl	_mixart_update_capture_stream_level
LBB0_4:
	str	w24, [x22, #4]
	mov	x0, x22
	mov	x1, x25
	bl	_mixart_set_format
	tbnz	w0, #31, LBB0_7
; %bb.5:
	mov	x0, x23
	bl	_params_buffer_bytes
	mov	x1, x0
	mov	x0, x20
	bl	_snd_pcm_lib_malloc_pages
	mov	x24, x0
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.6:
	ldr	w8, [x21]
Lloh9:
	adrp	x9, _MIXART_MAX_STREAM_PER_CARD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MIXART_MAX_STREAM_PER_CARD@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _MIXART_PLAYBACK_STREAMS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MIXART_PLAYBACK_STREAMS@GOTPAGEOFF]
	ldr	w11, [x22]
Lloh14:
	ldr	w10, [x10]
Lloh15:
	adrp	x12, _MIXART_CAPTURE_STREAMS@GOTPAGE
Lloh16:
	ldr	x12, [x12, _MIXART_CAPTURE_STREAMS@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	add	w12, w12, w10
	ldr	w4, [x20, #8]
	ldr	x13, [x20]
Lloh18:
	adrp	x14, _SNDRV_PCM_STREAM_CAPTURE@GOTPAGE
Lloh19:
	ldr	x14, [x14, _SNDRV_PCM_STREAM_CAPTURE@GOTPAGEOFF]
Lloh20:
	ldr	x14, [x14]
	cmp	x13, x14
	csel	w10, w10, wzr, eq
	madd	w8, w9, w8, w4
	madd	w8, w12, w11, w8
	add	w1, w8, w10
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #8]
	ldr	x9, [x20, #16]
	add	x8, x8, w1, sxtw #3
	ldp	w3, w2, [x9]
	stp	w3, w2, [x8]
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
	b	LBB0_8
LBB0_7:
	mov	x24, x0
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MIXART_PCM_DIGITAL,4,2         ; @MIXART_PCM_DIGITAL
	.comm	_MIXART_PCM_ANALOG,4,2          ; @MIXART_PCM_ANALOG
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ; @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_MIXART_MAX_STREAM_PER_CARD,4,2 ; @MIXART_MAX_STREAM_PER_CARD
	.comm	_MIXART_PLAYBACK_STREAMS,4,2    ; @MIXART_PLAYBACK_STREAMS
	.comm	_MIXART_CAPTURE_STREAMS,4,2     ; @MIXART_CAPTURE_STREAMS
	.comm	_SNDRV_PCM_STREAM_CAPTURE,8,3   ; @SNDRV_PCM_STREAM_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"snd_mixart_hw_params(pcm %d) : dma_addr(%x) dma_bytes(%x) subs-number(%d)\n"

	.no_dead_strip	_snd_mixart_hw_params
.subsections_via_symbols
