	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_cm9761
_patch_cm9761:                          ## @patch_cm9761
	.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	_AC97_HAS_NO_PCM_VOL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%rdi)
	movq	_AC97_MASTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$34824, %edx                    ## imm = 0x8808
	callq	_snd_ac97_write_cache
	movq	_AC97_PCM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$34824, %edx                    ## imm = 0x8808
	callq	_snd_ac97_write_cache
	movw	$0, 8(%rbx)
	movq	(%rbx), %rax
	movq	_AC97_ID_CM9761_82@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_AC97_INT_PAGING@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	movl	(%r15), %esi
	movzwl	%ax, %r14d
	movl	%r14d, %edx
	andl	$-16, %edx
	orl	$1, %edx
	movq	%rbx, %rdi
	callq	_snd_ac97_write_cache
	movq	%rbx, %rdi
	movl	$96, %esi
	callq	_snd_ac97_read
                                        ## kill: def $ax killed $ax def $eax
	andl	$1, %eax
	movw	%ax, 8(%rbx)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_snd_ac97_write_cache
	jmp	LBB0_4
LBB0_2:
	movq	_AC97_ID_CM9761_83@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movw	$2, 8(%rbx)
LBB0_4:
	movq	_patch_cm9761_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	_AC97_EI_SPDIF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
	movq	_AC97_EXTENDED_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1472, %edx                     ## imm = 0x5C0
	callq	_snd_ac97_write_cache
	movq	_AC97_CM9761_SPDIF_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_snd_ac97_write_cache
	movq	_SNDRV_PCM_RATE_48000@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	movq	_AC97_RATES_SPDIF@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	_AC97_CM9761_MULTI_CHAN@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
                                        ## kill: def $ax killed $ax def $eax
	orl	$16, %eax
	movl	(%r14), %esi
	movzwl	%ax, %edx
	movq	%rbx, %rdi
	callq	_snd_ac97_write_cache
	movq	%rbx, %rdi
	movl	$112, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_snd_ac97_write_cache
	movq	%rbx, %rdi
	movl	$114, %esi
	movl	$32, %edx
	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	_AC97_HAS_NO_PCM_VOL,4,2        ## @AC97_HAS_NO_PCM_VOL
	.comm	_AC97_MASTER,4,2                ## @AC97_MASTER
	.comm	_AC97_PCM,4,2                   ## @AC97_PCM
	.comm	_AC97_ID_CM9761_82,8,3          ## @AC97_ID_CM9761_82
	.comm	_AC97_INT_PAGING,4,2            ## @AC97_INT_PAGING
	.comm	_AC97_ID_CM9761_83,8,3          ## @AC97_ID_CM9761_83
	.comm	_patch_cm9761_ops,4,2           ## @patch_cm9761_ops
	.comm	_AC97_EI_SPDIF,4,2              ## @AC97_EI_SPDIF
	.comm	_AC97_EXTENDED_STATUS,4,2       ## @AC97_EXTENDED_STATUS
	.comm	_AC97_CM9761_SPDIF_CTRL,4,2     ## @AC97_CM9761_SPDIF_CTRL
	.comm	_SNDRV_PCM_RATE_48000,4,2       ## @SNDRV_PCM_RATE_48000
	.comm	_AC97_RATES_SPDIF,8,3           ## @AC97_RATES_SPDIF
	.comm	_AC97_CM9761_MULTI_CHAN,4,2     ## @AC97_CM9761_MULTI_CHAN
	.no_dead_strip	_patch_cm9761
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_cm9761
_patch_cm9761:                          ; @patch_cm9761
	.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
Lloh0:
	adrp	x8, _AC97_HAS_NO_PCM_VOL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC97_HAS_NO_PCM_VOL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x0, #40]
	orr	w8, w9, w8
	str	w8, [x0, #40]
Lloh3:
	adrp	x8, _AC97_MASTER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC97_MASTER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #34824
	bl	_snd_ac97_write_cache
Lloh6:
	adrp	x8, _AC97_PCM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AC97_PCM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #34824
	bl	_snd_ac97_write_cache
	strh	wzr, [x19, #8]
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _AC97_ID_CM9761_82@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AC97_ID_CM9761_82@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x21, _AC97_INT_PAGING@GOTPAGE
Lloh13:
	ldr	x21, [x21, _AC97_INT_PAGING@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_snd_ac97_read
	mov	x20, x0
	ldr	w1, [x21]
	and	w8, w0, #0xfff0
	orr	w2, w8, #0x1
	mov	x0, x19
	bl	_snd_ac97_write_cache
	mov	x0, x19
	mov	w1, #96
	bl	_snd_ac97_read
	and	w8, w0, #0x1
	strh	w8, [x19, #8]
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_snd_ac97_write_cache
	b	LBB0_4
LBB0_2:
Lloh14:
	adrp	x9, _AC97_ID_CM9761_83@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AC97_ID_CM9761_83@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #2
	strh	w8, [x19, #8]
LBB0_4:
Lloh17:
	adrp	x8, _patch_cm9761_ops@GOTPAGE
Lloh18:
	ldr	x8, [x8, _patch_cm9761_ops@GOTPAGEOFF]
	str	x8, [x19, #32]
Lloh19:
	adrp	x8, _AC97_EI_SPDIF@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AC97_EI_SPDIF@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
Lloh22:
	adrp	x8, _AC97_EXTENDED_STATUS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AC97_EXTENDED_STATUS@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1472
	bl	_snd_ac97_write_cache
Lloh25:
	adrp	x8, _AC97_CM9761_SPDIF_CTRL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AC97_CM9761_SPDIF_CTRL@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_snd_ac97_write_cache
Lloh28:
	adrp	x8, _SNDRV_PCM_RATE_48000@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SNDRV_PCM_RATE_48000@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
Lloh31:
	adrp	x10, _AC97_RATES_SPDIF@GOTPAGE
Lloh32:
	ldr	x10, [x10, _AC97_RATES_SPDIF@GOTPAGEOFF]
Lloh33:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
Lloh34:
	adrp	x20, _AC97_CM9761_MULTI_CHAN@GOTPAGE
Lloh35:
	ldr	x20, [x20, _AC97_CM9761_MULTI_CHAN@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_ac97_read
	orr	w2, w0, #0x10
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_ac97_write_cache
	mov	x0, x19
	mov	w1, #112
	mov	w2, #256
	bl	_snd_ac97_write_cache
	mov	x0, x19
	mov	w1, #114
	mov	w2, #32
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_HAS_NO_PCM_VOL,4,2        ; @AC97_HAS_NO_PCM_VOL
	.comm	_AC97_MASTER,4,2                ; @AC97_MASTER
	.comm	_AC97_PCM,4,2                   ; @AC97_PCM
	.comm	_AC97_ID_CM9761_82,8,3          ; @AC97_ID_CM9761_82
	.comm	_AC97_INT_PAGING,4,2            ; @AC97_INT_PAGING
	.comm	_AC97_ID_CM9761_83,8,3          ; @AC97_ID_CM9761_83
	.comm	_patch_cm9761_ops,4,2           ; @patch_cm9761_ops
	.comm	_AC97_EI_SPDIF,4,2              ; @AC97_EI_SPDIF
	.comm	_AC97_EXTENDED_STATUS,4,2       ; @AC97_EXTENDED_STATUS
	.comm	_AC97_CM9761_SPDIF_CTRL,4,2     ; @AC97_CM9761_SPDIF_CTRL
	.comm	_SNDRV_PCM_RATE_48000,4,2       ; @SNDRV_PCM_RATE_48000
	.comm	_AC97_RATES_SPDIF,8,3           ; @AC97_RATES_SPDIF
	.comm	_AC97_CM9761_MULTI_CHAN,4,2     ; @AC97_CM9761_MULTI_CHAN
	.no_dead_strip	_patch_cm9761
.subsections_via_symbols
