	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_ad1985
_patch_ad1985:                          ## @patch_ad1985
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_patch_ad1881
	movq	_patch_ad1985_build_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	_AC97_AD_MISC@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	movq	_AC97_AD198X_LOSEL@GOTPCREL(%rip), %rcx
	orw	(%rcx), %ax
	movq	_AC97_AD198X_HPSEL@GOTPCREL(%rip), %rcx
	orw	(%rcx), %ax
	movl	(%r14), %esi
	movq	_AC97_AD198X_MSPLT@GOTPCREL(%rip), %rcx
	orw	(%rcx), %ax
	movq	_AC97_AD198X_AC97NC@GOTPCREL(%rip), %rcx
	orw	(%rcx), %ax
	movzwl	%ax, %edx
	movq	%rbx, %rdi
	callq	_snd_ac97_write_cache
	movq	_AC97_STEREO_MUTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_ad1985_update_jacks
	movq	_AC97_EI_REV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%rbx), %eax
	movq	_AC97_EI_REV_23@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_patch_ad1985_build_ops,4,2     ## @patch_ad1985_build_ops
	.comm	_AC97_AD_MISC,4,2               ## @AC97_AD_MISC
	.comm	_AC97_AD198X_LOSEL,2,1          ## @AC97_AD198X_LOSEL
	.comm	_AC97_AD198X_HPSEL,2,1          ## @AC97_AD198X_HPSEL
	.comm	_AC97_AD198X_MSPLT,2,1          ## @AC97_AD198X_MSPLT
	.comm	_AC97_AD198X_AC97NC,2,1         ## @AC97_AD198X_AC97NC
	.comm	_AC97_STEREO_MUTES,4,2          ## @AC97_STEREO_MUTES
	.comm	_AC97_EI_REV_MASK,4,2           ## @AC97_EI_REV_MASK
	.comm	_AC97_EI_REV_23,4,2             ## @AC97_EI_REV_23
	.no_dead_strip	_patch_ad1985
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_ad1985
_patch_ad1985:                          ; @patch_ad1985
	.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, x0
	bl	_patch_ad1881
Lloh0:
	adrp	x8, _patch_ad1985_build_ops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _patch_ad1985_build_ops@GOTPAGEOFF]
	str	x8, [x19, #8]
Lloh2:
	adrp	x20, _AC97_AD_MISC@GOTPAGE
Lloh3:
	ldr	x20, [x20, _AC97_AD_MISC@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_ac97_read
	ldr	w1, [x20]
Lloh4:
	adrp	x8, _AC97_AD198X_LOSEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AC97_AD198X_LOSEL@GOTPAGEOFF]
	ldrh	w8, [x8]
	orr	w8, w8, w0
Lloh6:
	adrp	x9, _AC97_AD198X_HPSEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AC97_AD198X_HPSEL@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w8, w8, w9
Lloh8:
	adrp	x9, _AC97_AD198X_MSPLT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AC97_AD198X_MSPLT@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w8, w8, w9
Lloh10:
	adrp	x9, _AC97_AD198X_AC97NC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AC97_AD198X_AC97NC@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_snd_ac97_write_cache
Lloh12:
	adrp	x8, _AC97_STEREO_MUTES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AC97_STEREO_MUTES@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_ad1985_update_jacks
	ldr	w8, [x19]
Lloh15:
	adrp	x9, _AC97_EI_REV_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AC97_EI_REV_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh18:
	adrp	x9, _AC97_EI_REV_23@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AC97_EI_REV_23@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_patch_ad1985_build_ops,4,2     ; @patch_ad1985_build_ops
	.comm	_AC97_AD_MISC,4,2               ; @AC97_AD_MISC
	.comm	_AC97_AD198X_LOSEL,2,1          ; @AC97_AD198X_LOSEL
	.comm	_AC97_AD198X_HPSEL,2,1          ; @AC97_AD198X_HPSEL
	.comm	_AC97_AD198X_MSPLT,2,1          ; @AC97_AD198X_MSPLT
	.comm	_AC97_AD198X_AC97NC,2,1         ; @AC97_AD198X_AC97NC
	.comm	_AC97_STEREO_MUTES,4,2          ; @AC97_STEREO_MUTES
	.comm	_AC97_EI_REV_MASK,4,2           ; @AC97_EI_REV_MASK
	.comm	_AC97_EI_REV_23,4,2             ; @AC97_EI_REV_23
	.no_dead_strip	_patch_ad1985
.subsections_via_symbols
