	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_alc655
_patch_alc655:                          ## @patch_alc655
	.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	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_AC97_ID_ALC658@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movl	$1, 20(%rbx)
	movq	_AC97_ALC650_REVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	andl	$63, %eax
	cmpl	$2, %eax
	jne	LBB0_3
## %bb.2:
	movq	_AC97_ID_ALC658D@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	$2, 20(%rbx)
LBB0_3:
	movq	_patch_alc655_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movq	_AC97_INT_PAGING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AC97_PAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AC97_PAGE_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_snd_ac97_update_bits
	movq	%rbx, %rdi
	movl	$122, %esi
	callq	_snd_ac97_read
	cmpl	$0, 20(%rbx)
	je	LBB0_5
## %bb.4:
	andl	$-3, %eax
	jmp	LBB0_15
LBB0_5:
	cmpl	$5218, 8(%rbx)                  ## imm = 0x1462
	jne	LBB0_9
## %bb.6:
	movl	12(%rbx), %ecx
	cmpl	$352, %ecx                      ## imm = 0x160
	jle	LBB0_7
## %bb.10:
	cmpl	$353, %ecx                      ## imm = 0x161
	je	LBB0_13
## %bb.11:
	cmpl	$1137, %ecx                     ## imm = 0x471
	je	LBB0_13
## %bb.12:
	cmpl	$849, %ecx                      ## imm = 0x351
	je	LBB0_13
	jmp	LBB0_9
LBB0_7:
	cmpl	$97, %ecx
	je	LBB0_13
## %bb.8:
	cmpl	$305, %ecx                      ## imm = 0x131
	jne	LBB0_9
LBB0_13:
	andl	$-3, %eax
	jmp	LBB0_14
LBB0_9:
	orl	$2, %eax
LBB0_14:
	movq	_AC97_EI_SPDIF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 16(%rbx)
LBB0_15:
	andl	$-4097, %eax                    ## imm = 0xEFFF
	movq	%rbx, %rdi
	movl	$122, %esi
	movl	%eax, %edx
	callq	_snd_ac97_write_cache
	movq	_AC97_ALC650_MULTICH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_snd_ac97_write_cache
	movq	_AC97_ALC650_SURR_DAC_VOL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2056, %edx                     ## imm = 0x808
	callq	_snd_ac97_write_cache
	movq	_AC97_ALC650_LFE_DAC_VOL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2056, %edx                     ## imm = 0x808
	callq	_snd_ac97_write_cache
	movq	(%rbx), %rax
	movq	_AC97_ID_ALC658D@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	movl	$116, %esi
	movl	$2048, %edx                     ## imm = 0x800
	movl	$2048, %ecx                     ## imm = 0x800
	callq	_snd_ac97_update_bits
LBB0_17:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_ID_ALC658,8,3             ## @AC97_ID_ALC658
	.comm	_AC97_ALC650_REVISION,4,2       ## @AC97_ALC650_REVISION
	.comm	_AC97_ID_ALC658D,8,3            ## @AC97_ID_ALC658D
	.comm	_patch_alc655_ops,4,2           ## @patch_alc655_ops
	.comm	_AC97_INT_PAGING,4,2            ## @AC97_INT_PAGING
	.comm	_AC97_PAGE_MASK,4,2             ## @AC97_PAGE_MASK
	.comm	_AC97_PAGE_VENDOR,4,2           ## @AC97_PAGE_VENDOR
	.comm	_AC97_EI_SPDIF,4,2              ## @AC97_EI_SPDIF
	.comm	_AC97_ALC650_MULTICH,4,2        ## @AC97_ALC650_MULTICH
	.comm	_AC97_ALC650_SURR_DAC_VOL,4,2   ## @AC97_ALC650_SURR_DAC_VOL
	.comm	_AC97_ALC650_LFE_DAC_VOL,4,2    ## @AC97_ALC650_LFE_DAC_VOL
	.no_dead_strip	_patch_alc655
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_alc655
_patch_alc655:                          ; @patch_alc655
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AC97_ID_ALC658@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AC97_ID_ALC658@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x20, _AC97_ID_ALC658D@GOTPAGE
Lloh4:
	ldr	x20, [x20, _AC97_ID_ALC658D@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	w8, #1
	str	w8, [x19, #20]
Lloh5:
	adrp	x8, _AC97_ALC650_REVISION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AC97_ALC650_REVISION@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_ac97_read
	and	w8, w0, #0x3f
	cmp	w8, #2
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x20]
	str	x8, [x19]
	mov	w8, #2
	str	w8, [x19, #20]
LBB0_3:
Lloh8:
	adrp	x8, _patch_alc655_ops@GOTPAGE
Lloh9:
	ldr	x8, [x8, _patch_alc655_ops@GOTPAGEOFF]
	str	x8, [x19, #24]
Lloh10:
	adrp	x8, _AC97_INT_PAGING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AC97_INT_PAGING@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _AC97_PAGE_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AC97_PAGE_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _AC97_PAGE_VENDOR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AC97_PAGE_VENDOR@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_snd_ac97_update_bits
	mov	x0, x19
	mov	w1, #122
	bl	_snd_ac97_read
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_5
; %bb.4:
	and	w8, w0, #0xfffffffd
	b	LBB0_15
LBB0_5:
	ldr	w8, [x19, #8]
	mov	w9, #5218
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.6:
	ldr	w8, [x19, #12]
	cmp	w8, #352
	b.le	LBB0_10
; %bb.7:
	cmp	w8, #353
	b.eq	LBB0_12
; %bb.8:
	cmp	w8, #1137
	b.eq	LBB0_12
; %bb.9:
	cmp	w8, #849
	b.eq	LBB0_12
	b	LBB0_13
LBB0_10:
	cmp	w8, #97
	b.eq	LBB0_12
; %bb.11:
	cmp	w8, #305
	b.ne	LBB0_13
LBB0_12:
	and	w8, w0, #0xfffffffd
	b	LBB0_14
LBB0_13:
	orr	w8, w0, #0x2
LBB0_14:
Lloh19:
	adrp	x9, _AC97_EI_SPDIF@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AC97_EI_SPDIF@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	ldr	w10, [x19, #16]
	orr	w9, w10, w9
	str	w9, [x19, #16]
LBB0_15:
	and	w2, w8, #0xffffefff
	mov	x0, x19
	mov	w1, #122
	bl	_snd_ac97_write_cache
Lloh22:
	adrp	x8, _AC97_ALC650_MULTICH@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AC97_ALC650_MULTICH@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32768
	bl	_snd_ac97_write_cache
Lloh25:
	adrp	x8, _AC97_ALC650_SURR_DAC_VOL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AC97_ALC650_SURR_DAC_VOL@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2056
	bl	_snd_ac97_write_cache
Lloh28:
	adrp	x8, _AC97_ALC650_LFE_DAC_VOL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AC97_ALC650_LFE_DAC_VOL@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2056
	bl	_snd_ac97_write_cache
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x19
	mov	w1, #116
	mov	w2, #2048
	mov	w3, #2048
	bl	_snd_ac97_update_bits
LBB0_17:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_ID_ALC658,8,3             ; @AC97_ID_ALC658
	.comm	_AC97_ALC650_REVISION,4,2       ; @AC97_ALC650_REVISION
	.comm	_AC97_ID_ALC658D,8,3            ; @AC97_ID_ALC658D
	.comm	_patch_alc655_ops,4,2           ; @patch_alc655_ops
	.comm	_AC97_INT_PAGING,4,2            ; @AC97_INT_PAGING
	.comm	_AC97_PAGE_MASK,4,2             ; @AC97_PAGE_MASK
	.comm	_AC97_PAGE_VENDOR,4,2           ; @AC97_PAGE_VENDOR
	.comm	_AC97_EI_SPDIF,4,2              ; @AC97_EI_SPDIF
	.comm	_AC97_ALC650_MULTICH,4,2        ; @AC97_ALC650_MULTICH
	.comm	_AC97_ALC650_SURR_DAC_VOL,4,2   ; @AC97_ALC650_SURR_DAC_VOL
	.comm	_AC97_ALC650_LFE_DAC_VOL,4,2    ; @AC97_ALC650_LFE_DAC_VOL
	.no_dead_strip	_patch_alc655
.subsections_via_symbols
