	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stac9766_reset
_stac9766_reset:                        ## @stac9766_reset
	.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, %r14
	movq	_soc_ac97_ops@GOTPCREL(%rip), %r15
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%r14), %edi
	callq	*%rax
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_stac9766_ac97_read
	movq	_stac9766_reg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$1, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_7
LBB0_3:
	movl	(%r14), %edi
	callq	*8(%r15)
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	callq	*%rax
LBB0_5:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_stac9766_ac97_read
	movq	_stac9766_reg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_soc_ac97_ops,16,3              ## @soc_ac97_ops
	.comm	_stac9766_reg,8,3               ## @stac9766_reg
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_stac9766_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stac9766_reset
_stac9766_reset:                        ; @stac9766_reset
	.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	x21, _soc_ac97_ops@GOTPAGE
Lloh1:
	ldr	x21, [x21, _soc_ac97_ops@GOTPAGEOFF]
Lloh2:
	adrp	x20, _stac9766_reg@GOTPAGE
Lloh3:
	ldr	x20, [x20, _stac9766_reg@GOTPAGEOFF]
	cbz	w1, LBB0_4
; %bb.1:
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w0, [x19]
	blr	x8
	mov	x0, x19
	mov	w1, #0
	bl	_stac9766_ac97_read
	ldr	x8, [x20]
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #1
	b	LBB0_8
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	w0, [x19]
	blr	x8
	ldr	x8, [x21]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x19]
	blr	x8
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_stac9766_ac97_read
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x20]
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.7:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_soc_ac97_ops,16,3              ; @soc_ac97_ops
	.comm	_stac9766_reg,8,3               ; @stac9766_reg
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_stac9766_reset
.subsections_via_symbols
