	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xonar_ds_handle_hp_jack
_xonar_ds_handle_hp_jack:               ## @xonar_ds_handle_hp_jack
	.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	%rdi, %r14
	movq	8(%rdi), %r15
	callq	_mutex_lock
	movq	_OXYGEN_GPIO_DATA@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_oxygen_read16
	movl	%eax, %ebx
	movq	_GPIO_DS_HP_DETECT@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	(%r12), %esi
	movq	_GPIO_DS_OUTPUT_FRONTLR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	cmovel	%ebx, %edx
	movq	%r14, %rdi
	callq	_oxygen_write16_masked
	movq	(%r15), %rax
	movq	_WM8766_DAC_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movl	(%rax,%rsi,4), %eax
	movq	_WM8766_MUTEALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %edx
	testl	%ebx, %ebx
	cmovnel	%ecx, %edx
	movq	%r14, %rdi
	callq	_wm8766_write_cached
	xorl	%esi, %esi
	movl	8(%r15), %edi
	testl	%ebx, %ebx
	jne	LBB0_2
## %bb.1:
	movq	_SND_JACK_HEADPHONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_2:
	callq	_snd_jack_report
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OXYGEN_GPIO_DATA,4,2           ## @OXYGEN_GPIO_DATA
	.comm	_GPIO_DS_HP_DETECT,4,2          ## @GPIO_DS_HP_DETECT
	.comm	_GPIO_DS_OUTPUT_FRONTLR,4,2     ## @GPIO_DS_OUTPUT_FRONTLR
	.comm	_WM8766_DAC_CTRL,8,3            ## @WM8766_DAC_CTRL
	.comm	_WM8766_MUTEALL,4,2             ## @WM8766_MUTEALL
	.comm	_SND_JACK_HEADPHONE,4,2         ## @SND_JACK_HEADPHONE
	.no_dead_strip	_xonar_ds_handle_hp_jack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xonar_ds_handle_hp_jack
_xonar_ds_handle_hp_jack:               ; @xonar_ds_handle_hp_jack
	.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
	ldr	x21, [x0, #8]
	bl	_mutex_lock
Lloh0:
	adrp	x22, _OXYGEN_GPIO_DATA@GOTPAGE
Lloh1:
	ldr	x22, [x22, _OXYGEN_GPIO_DATA@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_oxygen_read16
	mov	x20, x0
Lloh2:
	adrp	x8, _GPIO_DS_HP_DETECT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GPIO_DS_HP_DETECT@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _GPIO_DS_OUTPUT_FRONTLR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GPIO_DS_OUTPUT_FRONTLR@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	tst	w23, w0
	csel	w2, wzr, w3, eq
	mov	x0, x19
	bl	_oxygen_write16_masked
	tst	w23, w20
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _WM8766_DAC_CTRL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WM8766_DAC_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x9]
	ldr	w8, [x8, x1, lsl #2]
Lloh11:
	adrp	x9, _WM8766_MUTEALL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WM8766_MUTEALL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	bic	w10, w8, w9
	orr	w8, w9, w8
	csel	w2, w8, w10, eq
	mov	x0, x19
	bl	_wm8766_write_cached
	tst	w23, w20
	ldr	w0, [x21, #8]
Lloh14:
	adrp	x8, _SND_JACK_HEADPHONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SND_JACK_HEADPHONE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	csel	w1, w8, wzr, eq
	bl	_snd_jack_report
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_OXYGEN_GPIO_DATA,4,2           ; @OXYGEN_GPIO_DATA
	.comm	_GPIO_DS_HP_DETECT,4,2          ; @GPIO_DS_HP_DETECT
	.comm	_GPIO_DS_OUTPUT_FRONTLR,4,2     ; @GPIO_DS_OUTPUT_FRONTLR
	.comm	_WM8766_DAC_CTRL,8,3            ; @WM8766_DAC_CTRL
	.comm	_WM8766_MUTEALL,4,2             ; @WM8766_MUTEALL
	.comm	_SND_JACK_HEADPHONE,4,2         ; @SND_JACK_HEADPHONE
	.no_dead_strip	_xonar_ds_handle_hp_jack
.subsections_via_symbols
