	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_wss_pcm                    ## -- Begin function snd_wss_pcm
	.p2align	4, 0x90
_snd_wss_pcm:                           ## @snd_wss_pcm
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %edx
	movq	%rdi, %r15
	movl	32(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %r9
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_snd_pcm_new
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-48(%rbp), %rdi
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_wss_playback_ops@GOTPCREL(%rip), %rdx
	callq	_snd_pcm_set_ops
	movq	-48(%rbp), %rdi
	movq	_SNDRV_PCM_STREAM_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_wss_capture_ops@GOTPCREL(%rip), %rdx
	callq	_snd_pcm_set_ops
	movq	-48(%rbp), %rax
	movq	%r15, 8(%rax)
	movl	$0, 4(%rax)
	cmpq	$0, 24(%r15)
	je	LBB0_3
## %bb.4:
	movq	_SNDRV_PCM_INFO_HALF_DUPLEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_3:
	xorl	%ecx, %ecx
LBB0_5:
	movq	(%r15), %rdx
	movq	_WSS_HW_INTERWAVE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_7
## %bb.6:
	movq	_SNDRV_PCM_INFO_JOINT_DUPLEX@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 4(%rax)
LBB0_7:
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_snd_wss_chip_id
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_strcpy
	movq	-48(%rbp), %r12
	movq	_SNDRV_DMA_TYPE_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_snd_dma_isa_data
	movl	$131072, %r8d                   ## imm = 0x20000
	cmpl	$3, 8(%r15)
	jg	LBB0_9
## %bb.8:
	xorl	%r8d, %r8d
	cmpl	$4, 12(%r15)
	setge	%r8b
	shll	$16, %r8d
	addl	$65536, %r8d                    ## imm = 0x10000
LBB0_9:
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_snd_pcm_lib_preallocate_pages_for_all
	movq	-48(%rbp), %rax
	movq	%rax, 16(%r15)
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	movq	%rax, (%r14)
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WSS"

	.comm	_SNDRV_PCM_STREAM_PLAYBACK,4,2  ## @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_snd_wss_playback_ops,4,2       ## @snd_wss_playback_ops
	.comm	_SNDRV_PCM_STREAM_CAPTURE,4,2   ## @SNDRV_PCM_STREAM_CAPTURE
	.comm	_snd_wss_capture_ops,4,2        ## @snd_wss_capture_ops
	.comm	_SNDRV_PCM_INFO_HALF_DUPLEX,4,2 ## @SNDRV_PCM_INFO_HALF_DUPLEX
	.comm	_WSS_HW_INTERWAVE,8,3           ## @WSS_HW_INTERWAVE
	.comm	_SNDRV_PCM_INFO_JOINT_DUPLEX,4,2 ## @SNDRV_PCM_INFO_JOINT_DUPLEX
	.comm	_SNDRV_DMA_TYPE_DEV,4,2         ## @SNDRV_DMA_TYPE_DEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_wss_pcm                    ; -- Begin function snd_wss_pcm
	.p2align	2
_snd_wss_pcm:                           ; @snd_wss_pcm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x2, x1
	mov	x20, x0
	ldr	w0, [x0, #32]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x5, sp, #8
	mov	w3, #1
	mov	w4, #1
	bl	_snd_pcm_new
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	x0, [sp, #8]
Lloh2:
	adrp	x8, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, _snd_wss_playback_ops@GOTPAGE
Lloh6:
	ldr	x2, [x2, _snd_wss_playback_ops@GOTPAGEOFF]
	bl	_snd_pcm_set_ops
	ldr	x0, [sp, #8]
Lloh7:
	adrp	x8, _SNDRV_PCM_STREAM_CAPTURE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SNDRV_PCM_STREAM_CAPTURE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, _snd_wss_capture_ops@GOTPAGE
Lloh11:
	ldr	x2, [x2, _snd_wss_capture_ops@GOTPAGEOFF]
	bl	_snd_pcm_set_ops
	ldr	x8, [sp, #8]
	str	x20, [x8, #8]
	str	wzr, [x8, #4]
	ldr	x9, [x20, #24]
	cbz	x9, LBB0_3
; %bb.2:
Lloh12:
	adrp	x9, _SNDRV_PCM_INFO_HALF_DUPLEX@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SNDRV_PCM_INFO_HALF_DUPLEX@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	str	w9, [x8, #4]
LBB0_3:
	ldr	x10, [x20]
Lloh15:
	adrp	x11, _WSS_HW_INTERWAVE@GOTPAGE
Lloh16:
	ldr	x11, [x11, _WSS_HW_INTERWAVE@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	cmp	x10, x11
	b.eq	LBB0_5
; %bb.4:
Lloh18:
	adrp	x10, _SNDRV_PCM_INFO_JOINT_DUPLEX@GOTPAGE
Lloh19:
	ldr	x10, [x10, _SNDRV_PCM_INFO_JOINT_DUPLEX@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w9, w9, w10
	str	w9, [x8, #4]
LBB0_5:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_snd_wss_chip_id
	mov	x1, x0
	mov	x0, x21
	bl	_strcpy
	ldr	x21, [sp, #8]
Lloh21:
	adrp	x8, _SNDRV_DMA_TYPE_DEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SNDRV_DMA_TYPE_DEV@GOTPAGEOFF]
Lloh23:
	ldr	w22, [x8]
	bl	_snd_dma_isa_data
	mov	x2, x0
	ldr	w8, [x20, #8]
	mov	w4, #131072
	cmp	w8, #3
	b.gt	LBB0_7
; %bb.6:
	ldr	w8, [x20, #12]
	mov	w9, #65536
	cmp	w8, #3
	csel	w4, w4, w9, gt
LBB0_7:
	mov	x0, x21
	mov	x1, x22
	mov	w3, #65536
	bl	_snd_pcm_lib_preallocate_pages_for_all
	ldr	x8, [sp, #8]
	str	x8, [x20, #16]
	mov	w0, #0
	cbz	x19, LBB0_9
; %bb.8:
	str	x8, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WSS"

	.comm	_SNDRV_PCM_STREAM_PLAYBACK,4,2  ; @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_snd_wss_playback_ops,4,2       ; @snd_wss_playback_ops
	.comm	_SNDRV_PCM_STREAM_CAPTURE,4,2   ; @SNDRV_PCM_STREAM_CAPTURE
	.comm	_snd_wss_capture_ops,4,2        ; @snd_wss_capture_ops
	.comm	_SNDRV_PCM_INFO_HALF_DUPLEX,4,2 ; @SNDRV_PCM_INFO_HALF_DUPLEX
	.comm	_WSS_HW_INTERWAVE,8,3           ; @WSS_HW_INTERWAVE
	.comm	_SNDRV_PCM_INFO_JOINT_DUPLEX,4,2 ; @SNDRV_PCM_INFO_JOINT_DUPLEX
	.comm	_SNDRV_DMA_TYPE_DEV,4,2         ; @SNDRV_DMA_TYPE_DEV
.subsections_via_symbols
