	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_audio_set_io              ## -- Begin function cx18_audio_set_io
	.p2align	4, 0x90
_cx18_audio_set_io:                     ## @cx18_audio_set_io
	.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	%rdi, %r12
	movq	_CX18_F_I_RADIO_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	20(%r12), %rsi
	callq	_test_bit
	movq	8(%r12), %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	addq	$16, %rbx
	jmp	LBB0_3
LBB0_2:
	movq	(%r12), %rax
	shlq	$4, %rax
	addq	8(%rbx), %rax
	movq	%rax, %rbx
LBB0_3:
	movl	16(%r12), %edi
	movq	_audio@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_s_routing@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	8(%rbx), %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_v4l2_subdev_call
	movq	8(%r12), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movl	(%r15), %ecx
	movl	(%rbx), %r8d
	movl	$0, (%rsp)
	movq	%r12, %rdi
	xorl	%r9d, %r9d
	callq	_cx18_call_hw_err
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	_CX18_AUDIO_ENABLE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_cx18_read_reg
	movq	_CX18_AI1_MUX_MASK@GOTPCREL(%rip), %r9
	movl	(%r9), %r8d
	movl	%r8d, %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	_CX18_AI1_MUX_843_I2S@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, %r15d
	cmpl	$128, %esi
	jne	LBB0_6
## %bb.5:
	movq	_CX18_AI1_MUX_I2S2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_6:
	cmpl	$129, %esi
	movq	_CX18_AI1_MUX_I2S1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovel	%ecx, %r15d
	orl	%edx, %r15d
	cmpl	%eax, %r15d
	jne	LBB0_8
## %bb.7:
	andl	$-2, %esi
	cmpl	$128, %esi
	cmovel	%edi, %ecx
	orl	%edx, %ecx
	movl	%ecx, %esi
	orl	$2816, %esi                     ## imm = 0xB00
	movl	(%r13), %edx
	movq	%r12, %rdi
	movq	%r9, %rbx
	callq	_cx18_write_reg_expect
	movl	(%rbx), %r8d
LBB0_8:
	movl	%r15d, %esi
	orl	$2816, %esi                     ## imm = 0xB00
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	callq	_cx18_write_reg_expect
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CX18_F_I_RADIO_USER,4,2        ## @CX18_F_I_RADIO_USER
	.comm	_audio,4,2                      ## @audio
	.comm	_s_routing,4,2                  ## @s_routing
	.comm	_CX18_AUDIO_ENABLE,4,2          ## @CX18_AUDIO_ENABLE
	.comm	_CX18_AI1_MUX_MASK,4,2          ## @CX18_AI1_MUX_MASK
	.comm	_CX18_AI1_MUX_I2S1,4,2          ## @CX18_AI1_MUX_I2S1
	.comm	_CX18_AI1_MUX_I2S2,4,2          ## @CX18_AI1_MUX_I2S2
	.comm	_CX18_AI1_MUX_843_I2S,4,2       ## @CX18_AI1_MUX_843_I2S
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_audio_set_io              ; -- Begin function cx18_audio_set_io
	.p2align	2
_cx18_audio_set_io:                     ; @cx18_audio_set_io
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _CX18_F_I_RADIO_USER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CX18_F_I_RADIO_USER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #20
	bl	_test_bit
	ldr	x8, [x19, #8]
	cbz	x0, LBB0_2
; %bb.1:
	add	x21, x8, #16
	b	LBB0_3
LBB0_2:
	ldr	x8, [x8, #8]
	ldr	x9, [x19]
	add	x21, x8, x9, lsl #4
LBB0_3:
Lloh3:
	adrp	x20, _audio@GOTPAGE
Lloh4:
	ldr	x20, [x20, _audio@GOTPAGEOFF]
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
Lloh5:
	adrp	x22, _s_routing@GOTPAGE
Lloh6:
	ldr	x22, [x22, _s_routing@GOTPAGEOFF]
	ldr	w2, [x22]
	ldr	w3, [x21, #8]
	mov	w4, #0
	mov	w5, #0
	bl	_v4l2_subdev_call
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	ldr	w2, [x20]
	ldr	w3, [x22]
	ldr	w4, [x21]
	mov	x0, x19
	mov	w5, #0
	mov	w6, #0
	bl	_cx18_call_hw_err
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.4:
Lloh7:
	adrp	x22, _CX18_AUDIO_ENABLE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _CX18_AUDIO_ENABLE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_cx18_read_reg
Lloh9:
	adrp	x23, _CX18_AI1_MUX_MASK@GOTPAGE
Lloh10:
	ldr	x23, [x23, _CX18_AI1_MUX_MASK@GOTPAGEOFF]
	ldr	w4, [x23]
	bic	w8, w0, w4
	ldr	w9, [x21]
Lloh11:
	adrp	x10, _CX18_AI1_MUX_I2S1@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CX18_AI1_MUX_I2S1@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _CX18_AI1_MUX_I2S2@GOTPAGE
Lloh15:
	ldr	x11, [x11, _CX18_AI1_MUX_I2S2@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x11]
Lloh17:
	adrp	x11, _CX18_AI1_MUX_843_I2S@GOTPAGE
Lloh18:
	ldr	x11, [x11, _CX18_AI1_MUX_843_I2S@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	cmp	w9, #128
	csel	w12, w12, w11, eq
	cmp	w9, #129
	csel	w12, w10, w12, eq
	orr	w21, w12, w8
	cmp	w21, w0
	b.ne	LBB0_6
; %bb.5:
	and	w9, w9, #0xfffffffe
	cmp	w9, #128
	csel	w9, w11, w10, eq
	orr	w3, w9, w8
	mov	w8, #2816
	orr	w1, w3, w8
	ldr	w2, [x22]
	mov	x0, x19
	bl	_cx18_write_reg_expect
	ldr	w4, [x23]
LBB0_6:
	mov	w8, #2816
	orr	w1, w21, w8
	ldr	w2, [x22]
	mov	x0, x19
	mov	x3, x21
	bl	_cx18_write_reg_expect
LBB0_7:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CX18_F_I_RADIO_USER,4,2        ; @CX18_F_I_RADIO_USER
	.comm	_audio,4,2                      ; @audio
	.comm	_s_routing,4,2                  ; @s_routing
	.comm	_CX18_AUDIO_ENABLE,4,2          ; @CX18_AUDIO_ENABLE
	.comm	_CX18_AI1_MUX_MASK,4,2          ; @CX18_AI1_MUX_MASK
	.comm	_CX18_AI1_MUX_I2S1,4,2          ; @CX18_AI1_MUX_I2S1
	.comm	_CX18_AI1_MUX_I2S2,4,2          ; @CX18_AI1_MUX_I2S2
	.comm	_CX18_AI1_MUX_843_I2S,4,2       ; @CX18_AI1_MUX_843_I2S
.subsections_via_symbols
