	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxt5066_update_speaker
_cxt5066_update_speaker:                ## @cxt5066_update_speaker
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movl	16(%rbx), %esi
	movq	8(%rbx), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_snd_printdd
	movq	%rbx, %rdi
	callq	_hp_port_a_present
	xorl	%r15d, %r15d
	movl	$0, %edx
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	xorl	%edx, %edx
	cmpq	$0, 8(%rbx)
	je	LBB0_3
## %bb.2:
	movq	_PIN_HP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_3:
	movq	%r14, %rdi
	movl	$25, %esi
	callq	_snd_hda_set_pin_ctl
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.4:
	movl	(%rbx), %r15d
LBB0_5:
	cmpq	$0, 32(%rbx)
	jne	LBB0_7
## %bb.6:
	cmpq	$0, 24(%rbx)
	je	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	callq	_hp_port_a_present
	xorl	%edx, %edx
	testq	%rax, %rax
	cmovel	%r15d, %edx
LBB0_9:
	movq	%r14, %rdi
	movl	$28, %esi
	callq	_snd_hda_set_pin_ctl
	xorl	%edx, %edx
	cmpl	$0, 16(%rbx)
	jne	LBB0_12
## %bb.10:
	xorl	%edx, %edx
	cmpq	$0, 8(%rbx)
	je	LBB0_12
## %bb.11:
	movq	_PIN_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_12:
	movq	%r14, %rdi
	movl	$31, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_hda_set_pin_ctl            ## TAILCALL
LBB0_8:
	movq	%rbx, %rdi
	callq	_hp_port_d_present
	testl	%eax, %eax
	cmovel	%eax, %r15d
	movl	%r15d, %edx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CXT5066: update speaker, hp_present=%d, cur_eapd=%d\n"

	.comm	_PIN_HP,4,2                     ## @PIN_HP
	.comm	_PIN_OUT,4,2                    ## @PIN_OUT
	.no_dead_strip	_cxt5066_update_speaker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxt5066_update_speaker
_cxt5066_update_speaker:                ; @cxt5066_update_speaker
	.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	x19, x0
	ldr	x20, [x0]
	ldr	w1, [x20, #16]
	ldr	x2, [x20, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
	mov	x0, x20
	bl	_hp_port_a_present
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x9, _PIN_HP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PIN_HP@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w2, wzr, w9, eq
	b	LBB0_3
LBB0_2:
	mov	w2, #0
LBB0_3:
	mov	x0, x19
	mov	w1, #25
	bl	_snd_hda_set_pin_ctl
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w21, [x20]
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_7
	b	LBB0_6
LBB0_5:
	mov	w21, #0
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_7
LBB0_6:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_12
LBB0_7:
	mov	x0, x20
	bl	_hp_port_a_present
	cmp	x0, #0
	csel	w2, w21, wzr, eq
LBB0_8:
	mov	x0, x19
	mov	w1, #28
	bl	_snd_hda_set_pin_ctl
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_10
; %bb.9:
	mov	w2, #0
	b	LBB0_11
LBB0_10:
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _PIN_OUT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PIN_OUT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w2, wzr, w9, eq
LBB0_11:
	mov	x0, x19
	mov	w1, #31
	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
	b	_snd_hda_set_pin_ctl
LBB0_12:
	mov	x0, x20
	bl	_hp_port_d_present
	cmp	w0, #0
	csel	w2, wzr, w21, eq
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CXT5066: update speaker, hp_present=%d, cur_eapd=%d\n"

	.comm	_PIN_HP,4,2                     ; @PIN_HP
	.comm	_PIN_OUT,4,2                    ; @PIN_OUT
	.no_dead_strip	_cxt5066_update_speaker
.subsections_via_symbols
