	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs5345_g_ctrl
_cs5345_g_ctrl:                         ## @cs5345_g_ctrl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	movq	_V4L2_CID_AUDIO_MUTE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	$4, %esi
	callq	_cs5345_read
	shrl	$3, %eax
	andl	$1, %eax
	jmp	LBB0_5
LBB0_2:
	movq	_V4L2_CID_AUDIO_VOLUME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movl	$7, %esi
	callq	_cs5345_read
                                        ## kill: def $eax killed $eax def $rax
	andl	$63, %eax
	xorl	%ecx, %ecx
	cmpl	$32, %eax
	setb	%cl
	shll	$6, %ecx
	addl	%ecx, %eax
	addl	$-64, %eax
LBB0_5:
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CID_AUDIO_MUTE,8,3        ## @V4L2_CID_AUDIO_MUTE
	.comm	_V4L2_CID_AUDIO_VOLUME,8,3      ## @V4L2_CID_AUDIO_VOLUME
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cs5345_g_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs5345_g_ctrl
_cs5345_g_ctrl:                         ; @cs5345_g_ctrl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _V4L2_CID_AUDIO_MUTE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_CID_AUDIO_MUTE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w1, #4
	bl	_cs5345_read
	mov	x8, x0
	mov	w0, #0
	ubfx	w8, w8, #3, #1
	str	w8, [x19, #8]
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x9, _V4L2_CID_AUDIO_VOLUME@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_CID_AUDIO_VOLUME@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w1, #7
	bl	_cs5345_read
	mov	x8, x0
	mov	w0, #0
	and	w9, w8, #0x3f
	mov	w10, #-64
	cmp	w9, #31
	csel	w9, w10, wzr, hi
	bfxil	w9, w8, #0, #6
	str	w9, [x19, #8]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CID_AUDIO_MUTE,8,3        ; @V4L2_CID_AUDIO_MUTE
	.comm	_V4L2_CID_AUDIO_VOLUME,8,3      ; @V4L2_CID_AUDIO_VOLUME
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cs5345_g_ctrl
.subsections_via_symbols
