	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ali_codec_write
_snd_ali_codec_write:                   ## @snd_ali_codec_write
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	callq	_snd_ali_printk
	movq	_AC97_GPIO_STATUS@GOTPCREL(%rip), %rax
	cmpw	%bx, (%rax)
	jne	LBB0_2
## %bb.1:
	movzwl	%r15w, %ebx
	movq	_ALI_AC97_GPIO_DATA_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_ALI_AC97_GPIO_ENABLE@GOTPCREL(%rip), %rax
	orw	(%rax), %bx
	movq	_ALI_AC97_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ALI_REG
	movzwl	%bx, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_outl                           ## TAILCALL
LBB0_2:
	movl	(%r12), %esi
	movzwl	%bx, %edx
	movzwl	%r15w, %ecx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_ali_codec_poke             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"codec_write: reg=%xh data=%xh.\n"

	.comm	_AC97_GPIO_STATUS,2,1           ## @AC97_GPIO_STATUS
	.comm	_ALI_AC97_GPIO_DATA_SHIFT,2,1   ## @ALI_AC97_GPIO_DATA_SHIFT
	.comm	_ALI_AC97_GPIO_ENABLE,2,1       ## @ALI_AC97_GPIO_ENABLE
	.comm	_ALI_AC97_GPIO,4,2              ## @ALI_AC97_GPIO
	.no_dead_strip	_snd_ali_codec_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ali_codec_write
_snd_ali_codec_write:                   ; @snd_ali_codec_write
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_ali_printk
Lloh2:
	adrp	x8, _AC97_GPIO_STATUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AC97_GPIO_STATUS@GOTPAGEOFF]
	ldrh	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _ALI_AC97_GPIO_DATA_SHIFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ALI_AC97_GPIO_DATA_SHIFT@GOTPAGEOFF]
	ldrh	w8, [x8]
	lsl	w8, w20, w8
Lloh6:
	adrp	x9, _ALI_AC97_GPIO_ENABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ALI_AC97_GPIO_ENABLE@GOTPAGEOFF]
	and	w8, w8, #0xffff
	ldrh	w9, [x9]
	orr	w20, w9, w8
Lloh8:
	adrp	x8, _ALI_AC97_GPIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ALI_AC97_GPIO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ALI_REG
	mov	x1, x0
	mov	x0, x20
	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	_outl
LBB0_2:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	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_ali_codec_poke
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"codec_write: reg=%xh data=%xh.\n"

	.comm	_AC97_GPIO_STATUS,2,1           ; @AC97_GPIO_STATUS
	.comm	_ALI_AC97_GPIO_DATA_SHIFT,2,1   ; @ALI_AC97_GPIO_DATA_SHIFT
	.comm	_ALI_AC97_GPIO_ENABLE,2,1       ; @ALI_AC97_GPIO_ENABLE
	.comm	_ALI_AC97_GPIO,4,2              ; @ALI_AC97_GPIO
	.no_dead_strip	_snd_ali_codec_write
.subsections_via_symbols
