	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stac9766_ac97_read
_stac9766_ac97_read:                    ## @stac9766_ac97_read
	.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	%esi, %ebx
	movq	%rdi, %r14
	movq	_AC97_STAC_PAGE0@GOTPCREL(%rip), %r15
	cmpl	%esi, (%r15)
	jae	LBB0_2
## %bb.1:
	movq	_AC97_INT_PAGING@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_stac9766_ac97_write
	movq	_soc_ac97_ops@GOTPCREL(%rip), %rax
	movl	8(%r14), %edi
	subl	(%r15), %ebx
	movl	%ebx, %esi
	callq	*(%rax)
	movl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_stac9766_ac97_write
	movl	%ebx, %eax
	jmp	LBB0_10
LBB0_2:
	movq	(%r14), %r15
	movl	%ebx, %r12d
	shrl	%r12d
	movq	_stac9766_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r12d
	jae	LBB0_3
## %bb.4:
	movq	_AC97_RESET@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_11
## %bb.5:
	movq	_AC97_GPIO_STATUS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_11
## %bb.6:
	movq	_AC97_INT_PAGING@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_11
## %bb.7:
	movq	_AC97_VENDOR_ID1@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_11
## %bb.8:
	movq	_AC97_VENDOR_ID2@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_11
## %bb.9:
	movl	%r12d, %eax
	movl	(%r15,%rax,4), %eax
	jmp	LBB0_10
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_soc_ac97_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%r14), %edi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_STAC_PAGE0,4,2            ## @AC97_STAC_PAGE0
	.comm	_AC97_INT_PAGING,4,2            ## @AC97_INT_PAGING
	.comm	_soc_ac97_ops,8,3               ## @soc_ac97_ops
	.comm	_stac9766_reg,4,2               ## @stac9766_reg
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AC97_RESET,4,2                 ## @AC97_RESET
	.comm	_AC97_GPIO_STATUS,4,2           ## @AC97_GPIO_STATUS
	.comm	_AC97_VENDOR_ID1,4,2            ## @AC97_VENDOR_ID1
	.comm	_AC97_VENDOR_ID2,4,2            ## @AC97_VENDOR_ID2
	.no_dead_strip	_stac9766_ac97_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stac9766_ac97_read
_stac9766_ac97_read:                    ; @stac9766_ac97_read
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _AC97_STAC_PAGE0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AC97_STAC_PAGE0@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w1
	b.hs	LBB0_2
; %bb.1:
Lloh2:
	adrp	x22, _AC97_INT_PAGING@GOTPAGE
Lloh3:
	ldr	x22, [x22, _AC97_INT_PAGING@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_stac9766_ac97_write
Lloh4:
	adrp	x8, _soc_ac97_ops@GOTPAGE
Lloh5:
	ldr	x8, [x8, _soc_ac97_ops@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	w0, [x19, #8]
	ldr	w9, [x21]
	sub	w1, w20, w9
	blr	x8
	mov	x20, x0
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #1
	bl	_stac9766_ac97_write
	mov	x0, x20
	b	LBB0_7
LBB0_2:
	ldr	x21, [x19]
	lsr	w22, w20, #1
Lloh7:
	adrp	x8, _stac9766_reg@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stac9766_reg@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	cmp	w22, w0
	b.hs	LBB0_5
; %bb.3:
Lloh10:
	adrp	x8, _AC97_RESET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AC97_RESET@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _AC97_GPIO_STATUS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AC97_GPIO_STATUS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _AC97_INT_PAGING@GOTPAGE
Lloh17:
	ldr	x10, [x10, _AC97_INT_PAGING@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
Lloh19:
	adrp	x11, _AC97_VENDOR_ID1@GOTPAGE
Lloh20:
	ldr	x11, [x11, _AC97_VENDOR_ID1@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
Lloh22:
	adrp	x12, _AC97_VENDOR_ID2@GOTPAGE
Lloh23:
	ldr	x12, [x12, _AC97_VENDOR_ID2@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	ccmp	w10, w20, #4, ne
	ccmp	w11, w20, #4, ne
	ccmp	w12, w20, #4, ne
	b.ne	LBB0_6
; %bb.4:
Lloh25:
	adrp	x8, _soc_ac97_ops@GOTPAGE
Lloh26:
	ldr	x8, [x8, _soc_ac97_ops@GOTPAGEOFF]
Lloh27:
	ldr	x2, [x8]
	ldr	w0, [x19, #8]
	mov	x1, 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
	br	x2
LBB0_5:
Lloh28:
	adrp	x8, _EIO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	ldr	w0, [x21, w22, uxtw #2]
LBB0_7:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_STAC_PAGE0,4,2            ; @AC97_STAC_PAGE0
	.comm	_AC97_INT_PAGING,4,2            ; @AC97_INT_PAGING
	.comm	_soc_ac97_ops,8,3               ; @soc_ac97_ops
	.comm	_stac9766_reg,4,2               ; @stac9766_reg
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AC97_RESET,4,2                 ; @AC97_RESET
	.comm	_AC97_GPIO_STATUS,4,2           ; @AC97_GPIO_STATUS
	.comm	_AC97_VENDOR_ID1,4,2            ; @AC97_VENDOR_ID1
	.comm	_AC97_VENDOR_ID2,4,2            ; @AC97_VENDOR_ID2
	.no_dead_strip	_stac9766_ac97_read
.subsections_via_symbols
