	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_alc650
_patch_alc650:                          ## @patch_alc650
	.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, %rbx
	movq	_patch_alc650_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rdi)
	movq	_AC97_ALC650_REVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_snd_ac97_read
	andl	$63, %eax
	cmpl	$2, %eax
	ja	LBB0_2
## %bb.1:
	movl	$1095517984, (%rbx)             ## imm = 0x414C4720
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_2:
	cmpl	$15, %eax
	ja	LBB0_4
## %bb.3:
	movl	$1095517985, (%rbx)             ## imm = 0x414C4721
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_4:
	cmpl	$31, %eax
	ja	LBB0_6
## %bb.5:
	movl	$1095517986, (%rbx)             ## imm = 0x414C4722
	jmp	LBB0_9
LBB0_6:
	cmpl	$48, %eax
	jae	LBB0_7
## %bb.8:
	movl	$1095517987, (%rbx)             ## imm = 0x414C4723
LBB0_9:
	movl	$1, %eax
	jmp	LBB0_10
LBB0_7:
	movl	(%rbx), %ecx
	andl	$-2, %ecx
	xorl	%eax, %eax
	cmpl	$1095517986, %ecx               ## imm = 0x414C4722
	sete	%al
LBB0_10:
	movl	%eax, 12(%rbx)
	movq	_AC97_ALC650_GPIO_STATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_snd_ac97_read
	orl	$32768, %eax                    ## imm = 0x8000
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_snd_ac97_write_cache
	movq	_AC97_ALC650_CLOCK@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	cmpl	$0, 12(%rbx)
	je	LBB0_14
## %bb.11:
	cmpl	$4163, 4(%rbx)                  ## imm = 0x1043
	jne	LBB0_13
## %bb.12:
	cmpl	$4355, 8(%rbx)                  ## imm = 0x1103
	jne	LBB0_13
LBB0_14:
	andl	$65532, %eax                    ## imm = 0xFFFC
	jmp	LBB0_15
LBB0_13:
	orl	$3, %eax
	movzwl	%ax, %eax
LBB0_15:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_snd_ac97_write_cache
	movq	_AC97_ALC650_MULTICH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_snd_ac97_write_cache
	movq	_AC97_ALC650_GPIO_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_snd_ac97_read
	orl	$1, %eax
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_snd_ac97_write_cache
	movl	(%r15), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_snd_ac97_read
                                        ## kill: def $eax killed $eax def $rax
	andl	$-273, %eax                     ## imm = 0xFEEF
	leal	256(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	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
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_patch_alc650_ops,4,2           ## @patch_alc650_ops
	.comm	_AC97_ALC650_REVISION,4,2       ## @AC97_ALC650_REVISION
	.comm	_AC97_ALC650_GPIO_STATUS,4,2    ## @AC97_ALC650_GPIO_STATUS
	.comm	_AC97_ALC650_CLOCK,4,2          ## @AC97_ALC650_CLOCK
	.comm	_AC97_ALC650_MULTICH,4,2        ## @AC97_ALC650_MULTICH
	.comm	_AC97_ALC650_GPIO_SETUP,4,2     ## @AC97_ALC650_GPIO_SETUP
	.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_alc650
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_alc650
_patch_alc650:                          ; @patch_alc650
	.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
	mov	w20, #18210
	movk	w20, #16716, lsl #16
Lloh0:
	adrp	x8, _patch_alc650_ops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _patch_alc650_ops@GOTPAGEOFF]
	str	x8, [x0, #16]
Lloh2:
	adrp	x8, _AC97_ALC650_REVISION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AC97_ALC650_REVISION@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_snd_ac97_read
	and	w8, w0, #0x3f
	cmp	w8, #2
	b.hi	LBB0_2
; %bb.1:
	mov	w8, #0
	sub	w9, w20, #2
	str	w9, [x19]
	b	LBB0_10
LBB0_2:
	cmp	w8, #15
	b.hi	LBB0_4
; %bb.3:
	mov	w8, #0
	sub	w9, w20, #1
	str	w9, [x19]
	b	LBB0_10
LBB0_4:
	cmp	w8, #31
	b.hi	LBB0_6
; %bb.5:
	str	w20, [x19]
	b	LBB0_8
LBB0_6:
	cmp	w8, #48
	b.hs	LBB0_9
; %bb.7:
	add	w8, w20, #1
	str	w8, [x19]
LBB0_8:
	mov	w8, #1
	b	LBB0_10
LBB0_9:
	ldr	w8, [x19]
	and	w8, w8, #0xfffffffe
	cmp	w8, w20
	cset	w8, eq
LBB0_10:
	str	w8, [x19, #12]
Lloh5:
	adrp	x21, _AC97_ALC650_GPIO_STATUS@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AC97_ALC650_GPIO_STATUS@GOTPAGEOFF]
	ldr	w20, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_read
	orr	w2, w0, #0x8000
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_write_cache
Lloh7:
	adrp	x20, _AC97_ALC650_CLOCK@GOTPAGE
Lloh8:
	ldr	x20, [x20, _AC97_ALC650_CLOCK@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_ac97_read
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_13
; %bb.11:
	ldr	w8, [x19, #4]
	mov	w9, #4163
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.12:
	ldr	w8, [x19, #8]
	mov	w9, #4355
	cmp	w8, w9
	b.ne	LBB0_14
LBB0_13:
	and	w2, w0, #0xfffc
	b	LBB0_15
LBB0_14:
	and	w8, w0, #0xfffc
	orr	w2, w8, #0x3
LBB0_15:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_ac97_write_cache
Lloh9:
	adrp	x8, _AC97_ALC650_MULTICH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AC97_ALC650_MULTICH@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_ac97_write_cache
Lloh12:
	adrp	x8, _AC97_ALC650_GPIO_SETUP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AC97_ALC650_GPIO_SETUP@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_read
	orr	w2, w0, #0x1
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_write_cache
	ldr	w20, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_read
	and	w8, w0, #0xffffffef
	orr	w2, w8, #0x100
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_write_cache
Lloh15:
	adrp	x8, _AC97_ALC650_SURR_DAC_VOL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AC97_ALC650_SURR_DAC_VOL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2056
	bl	_snd_ac97_write_cache
Lloh18:
	adrp	x8, _AC97_ALC650_LFE_DAC_VOL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AC97_ALC650_LFE_DAC_VOL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2056
	bl	_snd_ac97_write_cache
	mov	w0, #0
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_patch_alc650_ops,4,2           ; @patch_alc650_ops
	.comm	_AC97_ALC650_REVISION,4,2       ; @AC97_ALC650_REVISION
	.comm	_AC97_ALC650_GPIO_STATUS,4,2    ; @AC97_ALC650_GPIO_STATUS
	.comm	_AC97_ALC650_CLOCK,4,2          ; @AC97_ALC650_CLOCK
	.comm	_AC97_ALC650_MULTICH,4,2        ; @AC97_ALC650_MULTICH
	.comm	_AC97_ALC650_GPIO_SETUP,4,2     ; @AC97_ALC650_GPIO_SETUP
	.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_alc650
.subsections_via_symbols
