	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wrcodec
_wrcodec:                               ## @wrcodec
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_POLL_COUNT@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	jle	LBB0_1
## %bb.2:
	movq	_PSC_AC97STAT@GOTPCREL(%rip), %r15
	movq	_PSC_AC97STAT_CP@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_au_readl
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_au_sync
	testl	%ebx, (%r12)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r14d
	movl	(%r13), %eax
	cmpl	%eax, %r14d
	jl	LBB0_3
	jmp	LBB0_6
LBB0_1:
	xorl	%r14d, %r14d
LBB0_6:
	cmpl	%eax, %r14d
	jne	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_8:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_PSC_AC97CDC_INDX
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	orl	%eax, %edi
	movq	_PSC_AC97CDC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_au_writel
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_au_sync
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.9:
	movq	_PSC_AC97STAT@GOTPCREL(%rip), %r14
	movq	_PSC_AC97STAT_CP@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_au_readl
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_au_sync
	testl	%r15d, (%r12)
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jl	LBB0_10
LBB0_13:
	cmpl	%eax, %ebx
	jne	LBB0_15
LBB0_14:
	leaq	L_.str(%rip), %rdi
	callq	_err
	movl	(%r13), %eax
LBB0_15:
	testl	%eax, %eax
	jle	LBB0_16
## %bb.17:
	movq	_PSC_AC97EVNT@GOTPCREL(%rip), %r15
	movq	_PSC_AC97EVNT_CD@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_au_readl
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_au_sync
	testl	%r14d, (%r12)
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	incl	%ebx
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jl	LBB0_18
	jmp	LBB0_21
LBB0_16:
	xorl	%ebx, %ebx
LBB0_21:
	cmpl	%eax, %ebx
	jne	LBB0_23
LBB0_22:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
LBB0_23:
	movq	_PSC_AC97EVNT_CD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PSC_AC97EVNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_au_writel
	xorl	%eax, %eax
	callq	_au_sync
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_4:
	movl	(%r13), %eax
	cmpl	%eax, %r14d
	je	LBB0_7
	jmp	LBB0_8
LBB0_11:
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	je	LBB0_14
	jmp	LBB0_15
LBB0_19:
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	je	LBB0_22
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_POLL_COUNT,4,2                 ## @POLL_COUNT
	.comm	_PSC_AC97STAT,4,2               ## @PSC_AC97STAT
	.comm	_PSC_AC97STAT_CP,4,2            ## @PSC_AC97STAT_CP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrcodec: codec cmd pending expired!"

	.comm	_PSC_AC97CDC,4,2                ## @PSC_AC97CDC
	.comm	_PSC_AC97EVNT,4,2               ## @PSC_AC97EVNT
	.comm	_PSC_AC97EVNT_CD,4,2            ## @PSC_AC97EVNT_CD
L_.str.1:                               ## @.str.1
	.asciz	"wrcodec: read cmdwait expired!"

	.no_dead_strip	_wrcodec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wrcodec
_wrcodec:                               ; @wrcodec
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x23, _POLL_COUNT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _POLL_COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _PSC_AC97STAT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PSC_AC97STAT@GOTPAGEOFF]
Lloh4:
	adrp	x25, _PSC_AC97STAT_CP@GOTPAGE
Lloh5:
	ldr	x25, [x25, _PSC_AC97STAT_CP@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w26, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_au_readl
	mov	x22, x0
	bl	_au_sync
	ldr	w8, [x25]
	tst	w8, w22
	b.eq	LBB0_22
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w26, w26, #1
	ldr	w8, [x23]
	cmp	w26, w8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w26, #0
LBB0_5:
	cmp	w26, w8
	b.ne	LBB0_7
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_7:
	mov	x0, x21
	bl	_PSC_AC97CDC_INDX
	orr	w0, w0, w20
Lloh8:
	adrp	x8, _PSC_AC97CDC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PSC_AC97CDC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_au_writel
	bl	_au_sync
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.8:
	mov	w21, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_au_readl
	mov	x20, x0
	bl	_au_sync
	ldr	w8, [x25]
	tst	w8, w20
	b.eq	LBB0_23
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w21, w21, #1
	ldr	w8, [x23]
	cmp	w21, w8
	b.lt	LBB0_9
	b	LBB0_12
LBB0_11:
	mov	w21, #0
LBB0_12:
	cmp	w21, w8
	b.ne	LBB0_14
LBB0_13:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
	ldr	w8, [x23]
LBB0_14:
Lloh13:
	adrp	x21, _PSC_AC97EVNT@GOTPAGE
Lloh14:
	ldr	x21, [x21, _PSC_AC97EVNT@GOTPAGEOFF]
Lloh15:
	adrp	x22, _PSC_AC97EVNT_CD@GOTPAGE
Lloh16:
	ldr	x22, [x22, _PSC_AC97EVNT_CD@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.15:
	mov	w24, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_au_readl
	mov	x20, x0
	bl	_au_sync
	ldr	w8, [x22]
	tst	w8, w20
	b.ne	LBB0_24
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.lt	LBB0_16
	b	LBB0_19
LBB0_18:
	mov	w24, #0
LBB0_19:
	cmp	w24, w8
	b.ne	LBB0_21
LBB0_20:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_err
LBB0_21:
	ldr	w0, [x22]
	ldr	w1, [x21]
	bl	_au_writel
	bl	_au_sync
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_22:
	ldr	w8, [x23]
	cmp	w26, w8
	b.eq	LBB0_6
	b	LBB0_7
LBB0_23:
	ldr	w8, [x23]
	cmp	w21, w8
	b.eq	LBB0_13
	b	LBB0_14
LBB0_24:
	ldr	w8, [x23]
	cmp	w24, w8
	b.eq	LBB0_20
	b	LBB0_21
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_POLL_COUNT,4,2                 ; @POLL_COUNT
	.comm	_PSC_AC97STAT,4,2               ; @PSC_AC97STAT
	.comm	_PSC_AC97STAT_CP,4,2            ; @PSC_AC97STAT_CP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrcodec: codec cmd pending expired!"

	.comm	_PSC_AC97CDC,4,2                ; @PSC_AC97CDC
	.comm	_PSC_AC97EVNT,4,2               ; @PSC_AC97EVNT
	.comm	_PSC_AC97EVNT_CD,4,2            ; @PSC_AC97EVNT_CD
l_.str.1:                               ; @.str.1
	.asciz	"wrcodec: read cmdwait expired!"

	.no_dead_strip	_wrcodec
.subsections_via_symbols
