	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function speaker_mode_put
_speaker_mode_put:                      ## @speaker_mode_put
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	movq	_WM9081_POWER_MANAGEMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_snd_soc_read
	movl	%eax, %r15d
	movq	_WM9081_ANALOGUE_SPEAKER_2@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_snd_soc_read
	movq	(%rbx), %rcx
	movl	(%rcx), %edx
	movq	_WM9081_SPK_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%esi, %esi
	testl	%eax, %ecx
	setne	%sil
	xorl	%ebx, %ebx
	cmpl	%esi, %edx
	je	LBB0_7
## %bb.1:
	movq	_WM9081_SPK_ENA@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_3:
	movq	_WM9081_SPK_INV_MUTE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	_WM9081_OUT_SPK_CTRL@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	testl	%edx, %edx
	je	LBB0_5
## %bb.4:
	orl	%esi, %edi
	notl	%edi
	andl	%edi, %eax
	orl	%ecx, %eax
	jmp	LBB0_6
LBB0_5:
	orl	%eax, %esi
	orl	%edi, %esi
	notl	%ecx
	andl	%esi, %ecx
	movl	%ecx, %eax
LBB0_6:
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_snd_soc_write
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WM9081_POWER_MANAGEMENT,4,2    ## @WM9081_POWER_MANAGEMENT
	.comm	_WM9081_ANALOGUE_SPEAKER_2,4,2  ## @WM9081_ANALOGUE_SPEAKER_2
	.comm	_WM9081_SPK_MODE,4,2            ## @WM9081_SPK_MODE
	.comm	_WM9081_SPK_ENA,4,2             ## @WM9081_SPK_ENA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WM9081_SPK_INV_MUTE,4,2        ## @WM9081_SPK_INV_MUTE
	.comm	_WM9081_OUT_SPK_CTRL,4,2        ## @WM9081_OUT_SPK_CTRL
	.no_dead_strip	_speaker_mode_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function speaker_mode_put
_speaker_mode_put:                      ; @speaker_mode_put
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	bl	_snd_kcontrol_chip
	mov	x19, x0
Lloh0:
	adrp	x8, _WM9081_POWER_MANAGEMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WM9081_POWER_MANAGEMENT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_snd_soc_read
	mov	x20, x0
Lloh3:
	adrp	x22, _WM9081_ANALOGUE_SPEAKER_2@GOTPAGE
Lloh4:
	ldr	x22, [x22, _WM9081_ANALOGUE_SPEAKER_2@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_snd_soc_read
	ldr	x8, [x21]
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _WM9081_SPK_MODE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WM9081_SPK_MODE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w0
	cset	w10, ne
	cmp	w8, w10
	b.eq	LBB0_4
; %bb.1:
Lloh8:
	adrp	x10, _WM9081_SPK_ENA@GOTPAGE
Lloh9:
	ldr	x10, [x10, _WM9081_SPK_ENA@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w20
	b.eq	LBB0_3
; %bb.2:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
Lloh14:
	adrp	x10, _WM9081_SPK_INV_MUTE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _WM9081_SPK_INV_MUTE@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
Lloh17:
	adrp	x11, _WM9081_OUT_SPK_CTRL@GOTPAGE
Lloh18:
	ldr	x11, [x11, _WM9081_OUT_SPK_CTRL@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	orr	w12, w10, w0
	orr	w12, w12, w11
	bic	w12, w12, w9
	orr	w10, w11, w10
	bic	w10, w0, w10
	orr	w9, w10, w9
	cmp	w8, #0
	csel	w2, w12, w9, eq
	ldr	w1, [x22]
	mov	x0, x19
	bl	_snd_soc_write
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_WM9081_POWER_MANAGEMENT,4,2    ; @WM9081_POWER_MANAGEMENT
	.comm	_WM9081_ANALOGUE_SPEAKER_2,4,2  ; @WM9081_ANALOGUE_SPEAKER_2
	.comm	_WM9081_SPK_MODE,4,2            ; @WM9081_SPK_MODE
	.comm	_WM9081_SPK_ENA,4,2             ; @WM9081_SPK_ENA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WM9081_SPK_INV_MUTE,4,2        ; @WM9081_SPK_INV_MUTE
	.comm	_WM9081_OUT_SPK_CTRL,4,2        ; @WM9081_OUT_SPK_CTRL
	.no_dead_strip	_speaker_mode_put
.subsections_via_symbols
