	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1xpsc_i2s_stop
_au1xpsc_i2s_stop:                      ## @au1xpsc_i2s_stop
	.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, %r12d
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_I2SPCR_STOP
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_I2S_PCR
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_au_writel
	xorl	%eax, %eax
	callq	_au_sync
	movq	$-1000000, %rbx                 ## imm = 0xFFF0BDC0
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_I2S_STAT
	movl	%eax, %edi
	callq	_au_readl
	movq	%rax, %r15
	movl	%r12d, %edi
	callq	_I2SSTAT_BUSY
	testq	%r15, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	1(%rbx), %rax
	testq	%rbx, %rbx
	movq	%rax, %rbx
	jne	LBB0_1
LBB0_3:
	movq	%r14, %rdi
	callq	_I2S_STAT
	movl	%eax, %edi
	callq	_au_readl
	movq	_PSC_I2SSTAT_TB@GOTPCREL(%rip), %rcx
	movq	_PSC_I2SSTAT_RB@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	orq	(%rcx), %rdx
	testq	%rax, %rdx
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_I2S_CFG
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_au_writel
	xorl	%eax, %eax
	callq	_au_sync
	movq	_PSC_CTRL_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_PSC_CTRL
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_au_writel
	xorl	%eax, %eax
	callq	_au_sync
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSC_I2SSTAT_TB,8,3             ## @PSC_I2SSTAT_TB
	.comm	_PSC_I2SSTAT_RB,8,3             ## @PSC_I2SSTAT_RB
	.comm	_PSC_CTRL_SUSPEND,4,2           ## @PSC_CTRL_SUSPEND
	.no_dead_strip	_au1xpsc_i2s_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1xpsc_i2s_stop
_au1xpsc_i2s_stop:                      ; @au1xpsc_i2s_stop
	.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
	mov	x0, x1
	bl	_I2SPCR_STOP
	mov	x21, x0
	mov	x0, x19
	bl	_I2S_PCR
	mov	x1, x0
	mov	x0, x21
	bl	_au_writel
	bl	_au_sync
	mov	x8, #-16960
	movk	x8, #65520, lsl #16
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x8
	mov	x0, x19
	bl	_I2S_STAT
	bl	_au_readl
	mov	x21, x0
	mov	x0, x20
	bl	_I2SSTAT_BUSY
	tst	x0, x21
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x8, x22, #1
	cbnz	x22, LBB0_1
LBB0_3:
	mov	x0, x19
	bl	_I2S_STAT
	bl	_au_readl
Lloh0:
	adrp	x8, _PSC_I2SSTAT_TB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSC_I2SSTAT_TB@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PSC_I2SSTAT_RB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PSC_I2SSTAT_RB@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	orr	x8, x9, x8
	tst	x8, x0
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_I2S_CFG
	mov	x1, x0
	mov	w0, #0
	bl	_au_writel
	bl	_au_sync
Lloh6:
	adrp	x8, _PSC_CTRL_SUSPEND@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PSC_CTRL_SUSPEND@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_PSC_CTRL
	mov	x1, x0
	mov	x0, x20
	bl	_au_writel
	bl	_au_sync
LBB0_5:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PSC_I2SSTAT_TB,8,3             ; @PSC_I2SSTAT_TB
	.comm	_PSC_I2SSTAT_RB,8,3             ; @PSC_I2SSTAT_RB
	.comm	_PSC_CTRL_SUSPEND,4,2           ; @PSC_CTRL_SUSPEND
	.no_dead_strip	_au1xpsc_i2s_stop
.subsections_via_symbols
