	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ice1712_ac97_read
_snd_ice1712_ac97_read:                 ## @snd_ice1712_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	(%rdi), %r15
	xorl	%r14d, %r14d
	movq	_ICE1712_AC97_WRITE@GOTPCREL(%rip), %r12
	movq	_ICE1712_AC97_READ@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$65534, %r14d                   ## imm = 0xFFFE
	ja	LBB0_4
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	incl	%r14d
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_AC97_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ICEREG
	movl	%eax, %edi
	callq	_inb
	movl	%eax, %ebx
	movzbl	(%r13), %eax
	orb	(%r12), %al
	testb	%bl, %al
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_ICE1712_AC97_READY@GOTPCREL(%rip), %rax
	testb	%bl, (%rax)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$65535, %r14d                   ## imm = 0xFFFF
	jb	LBB0_6
LBB0_4:
	movq	_AC97_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ICEREG
	movzbl	-44(%rbp), %edi                 ## 1-byte Folded Reload
	movl	%eax, %esi
	callq	_outb
	movb	(%r13), %r14b
	orb	%bl, %r14b
	movq	_AC97_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ICEREG
	movzbl	%r14b, %edi
	movl	%eax, %esi
	callq	_outb
	movl	$65536, %ebx                    ## imm = 0x10000
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	_AC97_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ICEREG
	movl	%eax, %edi
	callq	_inb
	testb	%al, (%r13)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	decl	%ebx
	jne	LBB0_8
## %bb.10:
	movl	$65535, %eax                    ## imm = 0xFFFF
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_AC97_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ICEREG
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_inw                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_CMD,4,2                   ## @AC97_CMD
	.comm	_ICE1712_AC97_WRITE,1,0         ## @ICE1712_AC97_WRITE
	.comm	_ICE1712_AC97_READ,1,0          ## @ICE1712_AC97_READ
	.comm	_ICE1712_AC97_READY,1,0         ## @ICE1712_AC97_READY
	.comm	_AC97_INDEX,4,2                 ## @AC97_INDEX
	.comm	_AC97_DATA,4,2                  ## @AC97_DATA
	.no_dead_strip	_snd_ice1712_ac97_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ice1712_ac97_read
_snd_ice1712_ac97_read:                 ; @snd_ice1712_ac97_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	w24, #0
	ldr	x19, [x0]
Lloh0:
	adrp	x22, _AC97_CMD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AC97_CMD@GOTPAGEOFF]
Lloh2:
	adrp	x25, _ICE1712_AC97_WRITE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ICE1712_AC97_WRITE@GOTPAGEOFF]
Lloh4:
	adrp	x23, _ICE1712_AC97_READ@GOTPAGE
Lloh5:
	ldr	x23, [x23, _ICE1712_AC97_READ@GOTPAGEOFF]
	mov	w26, #65535
	mov	w27, #65534
Lloh6:
	adrp	x28, _ICE1712_AC97_READY@GOTPAGE
Lloh7:
	ldr	x28, [x28, _ICE1712_AC97_READY@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w8, [x28]
	and	w8, w8, w21
	cmp	w8, #0
	ccmp	w24, w26, #2, eq
	b.hs	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ICEREG
	bl	_inb
	mov	x21, x0
	ldrb	w8, [x25]
	ldrb	w9, [x23]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, w27
	b.ls	LBB0_2
LBB0_5:
Lloh8:
	adrp	x8, _AC97_INDEX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AC97_INDEX@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ICEREG
	mov	x1, x0
	and	w0, w20, #0xff
	bl	_outb
	ldrb	w8, [x23]
	orr	w20, w8, w21
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ICEREG
	mov	x1, x0
	mov	x0, x20
	bl	_outb
	mov	w20, #65536
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ICEREG
	bl	_inb
	ldrb	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	subs	w20, w20, #1
	b.ne	LBB0_6
; %bb.8:
	mov	w0, #65535
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh11:
	adrp	x8, _AC97_DATA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AC97_DATA@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ICEREG
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_inw
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_CMD,4,2                   ; @AC97_CMD
	.comm	_ICE1712_AC97_WRITE,1,0         ; @ICE1712_AC97_WRITE
	.comm	_ICE1712_AC97_READ,1,0          ; @ICE1712_AC97_READ
	.comm	_ICE1712_AC97_READY,1,0         ; @ICE1712_AC97_READY
	.comm	_AC97_INDEX,4,2                 ; @AC97_INDEX
	.comm	_AC97_DATA,4,2                  ; @AC97_DATA
	.no_dead_strip	_snd_ice1712_ac97_read
.subsections_via_symbols
