	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1xpsc_ac97_write
_au1xpsc_ac97_write:                    ## @au1xpsc_ac97_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	%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	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movq	_au1xpsc_ac97_workdata@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_PSC_AC97EVNT_CD@GOTPCREL(%rip), %rax
	movzwl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_AC97_EVNT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_au_writel
	xorl	%eax, %eax
	callq	_au_sync
	movq	_AC97_RW_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movzwl	%r15w, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%r13, %rdi
	callq	_mutex_lock
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_PSC_AC97CDC_INDX
	movl	%eax, %ebx
	orl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r13, %rdi
	callq	_AC97_CDC
	movzwl	%bx, %edi
	movl	%eax, %esi
	callq	_au_writel
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_au_sync
	movq	%r13, %rdi
	callq	_AC97_EVNT
	movl	%eax, %edi
	callq	_au_readl
	movq	_PSC_AC97EVNT_CD@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %r15d
	testw	%ax, %r15w
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$-1998, %r12d                   ## imm = 0xF832
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$2, %edi
	callq	_udelay
	movq	%r13, %rdi
	callq	_AC97_EVNT
	movl	%eax, %edi
	callq	_au_readl
	movq	_PSC_AC97EVNT_CD@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %r15d
	testw	%ax, %r15w
	sete	%bl
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	leal	1(%r12), %eax
	testl	%r12d, %r12d
	movl	%eax, %r12d
	jne	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_AC97_EVNT
	movzwl	%r15w, %edi
	movl	%eax, %esi
	callq	_au_writel
	xorl	%eax, %eax
	callq	_au_sync
	movq	%r13, %rdi
	callq	_mutex_unlock
	decl	%r14d
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	%bl, %bl
	jne	LBB0_1
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_au1xpsc_ac97_workdata,8,3      ## @au1xpsc_ac97_workdata
	.comm	_PSC_AC97EVNT_CD,2,1            ## @PSC_AC97EVNT_CD
	.comm	_AC97_RW_RETRIES,4,2            ## @AC97_RW_RETRIES
	.no_dead_strip	_au1xpsc_ac97_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1xpsc_ac97_write
_au1xpsc_ac97_write:                    ; @au1xpsc_ac97_write
	.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	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _au1xpsc_ac97_workdata@GOTPAGE
Lloh1:
	ldr	x8, [x8, _au1xpsc_ac97_workdata@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
Lloh3:
	adrp	x23, _PSC_AC97EVNT_CD@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PSC_AC97EVNT_CD@GOTPAGEOFF]
	ldrh	w22, [x23]
	mov	x0, x21
	bl	_AC97_EVNT
	mov	x1, x0
	mov	x0, x22
	bl	_au_writel
	bl	_au_sync
Lloh5:
	adrp	x8, _AC97_RW_RETRIES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AC97_RW_RETRIES@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x20
	bl	_PSC_AC97CDC_INDX
	orr	w22, w0, w19
	mov	x0, x21
	bl	_AC97_CDC
	mov	x1, x0
	mov	x0, x22
	bl	_au_writel
	bl	_au_sync
	mov	x0, x21
	bl	_AC97_EVNT
	bl	_au_readl
	ldrh	w22, [x23]
	tst	w22, w0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w25, #0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	w26, #-1998
LBB0_4:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	w0, #2
	bl	_udelay
	mov	x0, x21
	bl	_AC97_EVNT
	bl	_au_readl
	ldrh	w22, [x23]
	ands	w8, w22, w0
	cset	w25, eq
	cmp	w8, #0
	ccmp	w26, #0, #4, eq
	add	w26, w26, #1
	b.ne	LBB0_4
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	bl	_AC97_EVNT
	mov	x1, x0
	mov	x0, x22
	bl	_au_writel
	bl	_au_sync
	mov	x0, x21
	bl	_mutex_unlock
	subs	w24, w24, #1
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	tbnz	w25, #0, LBB0_1
LBB0_7:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_au1xpsc_ac97_workdata,8,3      ; @au1xpsc_ac97_workdata
	.comm	_PSC_AC97EVNT_CD,2,1            ; @PSC_AC97EVNT_CD
	.comm	_AC97_RW_RETRIES,4,2            ; @AC97_RW_RETRIES
	.no_dead_strip	_au1xpsc_ac97_write
.subsections_via_symbols
