	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcxhr_init_board
_pcxhr_init_board:                      ## @pcxhr_init_board
	.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	%rdi, %r14
	cmpq	$0, 32(%rdi)
	setne	%cl
	movl	(%rdi), %r12d
	shll	%cl, %r12d
	movq	_PCXHR_PLAYBACK_STREAMS@GOTPCREL(%rip), %r15
	movl	(%r15), %r13d
	imull	4(%rdi), %r13d
	callq	_pcxhr_enable_dsp
	movq	_CMD_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_pcxhr_init_rmh
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pcxhr_send_msg
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	-64(%rbp), %rax
	movl	(%rax), %edx
	movq	_MASK_FIRST_FIELD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	andl	%edx, %ecx
	movl	4(%r14), %edi
	addl	%edi, %edi
	cmpl	%edi, %ecx
	jne	LBB0_2
## %bb.3:
	movq	_FIELD_SIZE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	addb	%cl, %cl
	sarl	%cl, %edx
	andl	%esi, %edx
	movl	(%r14), %ecx
	addl	%ecx, %ecx
	cmpl	%ecx, %edx
	jl	LBB0_2
## %bb.4:
	addl	%r12d, %r13d
	movl	4(%rax), %ecx
	movl	%ecx, %edx
	andl	$95, %edx
	cmpl	%r13d, %edx
	jl	LBB0_2
## %bb.5:
	shrl	$7, %ecx
	andl	$95, %ecx
	cmpl	(%r15), %ecx
	jge	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	8(%rax), %esi
	movl	12(%rax), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_snd_printdd
	movq	_CMD_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_pcxhr_init_rmh
	movl	8(%r14), %eax
	movq	-56(%rbp), %rcx
	orl	%eax, (%rcx)
	movl	$8388608, %eax                  ## imm = 0x800000
	addl	12(%r14), %eax
	movl	%eax, 4(%rcx)
	movl	$2, -48(%rbp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pcxhr_send_msg
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	-64(%rbp), %rax
	movl	(%rax), %eax
	movzbl	%ah, %edx
	movzbl	%al, %ecx
	shrl	$16, %eax
	movzbl	%al, %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_snd_printdd
	movq	-64(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	cmpq	$0, 24(%r14)
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_hr222_sub_init
	jmp	LBB0_10
LBB0_9:
	movq	%r14, %rdi
	callq	_pcxhr_sub_init
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_PCXHR_PLAYBACK_STREAMS,4,2     ## @PCXHR_PLAYBACK_STREAMS
	.comm	_CMD_SUPPORTED,4,2              ## @CMD_SUPPORTED
	.comm	_MASK_FIRST_FIELD,4,2           ## @MASK_FIRST_FIELD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FIELD_SIZE,4,2                 ## @FIELD_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"supported formats : playback=%x capture=%x\n"

	.comm	_CMD_VERSION,4,2                ## @CMD_VERSION
L_.str.1:                               ## @.str.1
	.asciz	"PCXHR DSP version is %d.%d.%d\n"

	.no_dead_strip	_pcxhr_init_board
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcxhr_init_board
_pcxhr_init_board:                      ; @pcxhr_init_board
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	ldr	x8, [x0, #32]
	cmp	x8, #0
	cset	w21, ne
	ldp	w22, w23, [x0]
Lloh0:
	adrp	x20, _PCXHR_PLAYBACK_STREAMS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PCXHR_PLAYBACK_STREAMS@GOTPAGEOFF]
	ldr	w24, [x20]
	bl	_pcxhr_enable_dsp
Lloh2:
	adrp	x8, _CMD_SUPPORTED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMD_SUPPORTED@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_pcxhr_init_rmh
	add	x1, sp, #8
	mov	x0, x19
	bl	_pcxhr_send_msg
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
Lloh5:
	adrp	x10, _MASK_FIRST_FIELD@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MASK_FIRST_FIELD@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	and	w11, w10, w9
	ldr	w12, [x19, #4]
	cmp	w11, w12, lsl #1
	b.ne	LBB0_5
; %bb.2:
Lloh8:
	adrp	x11, _FIELD_SIZE@GOTPAGE
Lloh9:
	ldr	x11, [x11, _FIELD_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	lsl	w11, w11, #1
	asr	w9, w9, w11
	and	w9, w9, w10
	ldr	w10, [x19]
	cmp	w9, w10, lsl #1
	b.lt	LBB0_5
; %bb.3:
	lsl	w9, w22, w21
	madd	w11, w24, w23, w9
	ldr	w9, [x8, #4]
	mov	w10, #95
	and	w12, w9, w10
	cmp	w12, w11
	b.lt	LBB0_5
; %bb.4:
	and	w9, w10, w9, lsr #7
	ldr	w10, [x20]
	cmp	w9, w10
	b.ge	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	ldp	w1, w2, [x8, #8]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
Lloh16:
	adrp	x8, _CMD_VERSION@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CMD_VERSION@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_pcxhr_init_rmh
	ldr	w8, [x19, #8]
	ldr	x9, [sp, #16]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	ldr	w8, [x19, #12]
	add	w8, w8, #2048, lsl #12          ; =8388608
	str	w8, [x9, #4]
	mov	w8, #2
	str	w8, [sp, #24]
	add	x1, sp, #8
	mov	x0, x19
	bl	_pcxhr_send_msg
	cbnz	w0, LBB0_6
; %bb.8:
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ubfx	w1, w8, #16, #8
	ubfx	w2, w8, #8, #8
	and	w8, w8, #0xff
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_snd_printdd
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_hr222_sub_init
	b	LBB0_6
LBB0_10:
	mov	x0, x19
	bl	_pcxhr_sub_init
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PCXHR_PLAYBACK_STREAMS,4,2     ; @PCXHR_PLAYBACK_STREAMS
	.comm	_CMD_SUPPORTED,4,2              ; @CMD_SUPPORTED
	.comm	_MASK_FIRST_FIELD,4,2           ; @MASK_FIRST_FIELD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FIELD_SIZE,4,2                 ; @FIELD_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"supported formats : playback=%x capture=%x\n"

	.comm	_CMD_VERSION,4,2                ; @CMD_VERSION
l_.str.1:                               ; @.str.1
	.asciz	"PCXHR DSP version is %d.%d.%d\n"

	.no_dead_strip	_pcxhr_init_board
.subsections_via_symbols
