	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_ssc_shutdown
_atmel_ssc_shutdown:                    ## @atmel_ssc_shutdown
	.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	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	_ssc_info@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	movq	(%rax), %rax
	movq	(%rax), %rax
	imulq	$56, (%rax), %r13
	leaq	(%r12,%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r15
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%ebx, %ebx
	cmpq	%r14, %r15
	setne	%bl
	movq	48(%r12,%r13), %rax
	movq	(%rax,%rbx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	leaq	(%r12,%r13), %rax
	addq	$48, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	32(%r12,%r13), %rax
	movl	(%rax), %edi
	movq	_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rcx), %rax
	movl	(%rax), %edx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_ssc_writel
	cmpq	%r14, %r15
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r15
	cmoveq	%rax, %r15
	movq	32(%r12,%r13), %rax
	movl	(%rax), %edi
	movq	_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ssc_readl
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_debug
	xorps	%xmm0, %xmm0
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movups	%xmm0, (%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	$0, (%rax,%rbx,8)
LBB0_2:
	leaq	(%r12,%r13), %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movl	$-2, %eax
	movl	%ebx, %ecx
	roll	%cl, %eax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	andl	%eax, (%rbx)
	jne	LBB0_6
## %bb.3:
	cmpq	$0, 40(%r12,%r13)
	je	LBB0_5
## %bb.4:
	leaq	(%r12,%r13), %r14
	addq	$40, %r14
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	32(%r12,%r13), %rax
	movl	8(%rax), %edi
	callq	_clk_disable
	movq	32(%r12,%r13), %rax
	movl	4(%rax), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	$0, (%r14)
LBB0_5:
	movq	32(%r12,%r13), %rax
	movl	(%rax), %r14d
	movq	_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_CR_SWRST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SSC_BIT
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ssc_writel
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r12,%r13)
	movq	$0, 24(%r12,%r13)
LBB0_6:
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irq                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ssc_info,8,3                   ## @ssc_info
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ## @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_CR,4,2                         ## @CR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atmel_ssc_shutdown: %s disabled SSC_SR=0x%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"receive"

L_.str.2:                               ## @.str.2
	.asciz	"transmit"

	.comm	_SR,4,2                         ## @SR
L_.str.3:                               ## @.str.3
	.asciz	"atmel_ssc_dau: Stopping clock\n"

	.comm	_CR_SWRST,4,2                   ## @CR_SWRST
	.no_dead_strip	_atmel_ssc_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_ssc_shutdown
_atmel_ssc_shutdown:                    ; @atmel_ssc_shutdown
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	bl	_snd_pcm_substream_chip
Lloh0:
	adrp	x8, _ssc_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ssc_info@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x22, [x8]
	mov	w8, #56
	madd	x19, x22, x8, x21
	ldr	x25, [x20]
Lloh3:
	adrp	x8, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh5:
	ldr	x26, [x8]
	cmp	x25, x26
	cset	w20, ne
	mov	x23, x19
	ldr	x8, [x23, #48]!
	ldr	x24, [x8, w20, uxtw #3]
	cbz	x24, LBB0_2
; %bb.1:
	mov	w8, #56
	madd	x27, x22, x8, x21
	ldr	x8, [x27, #32]
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _CR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x8, [x24, #16]
	ldr	w2, [x8]
	bl	_ssc_writel
Lloh9:
	adrp	x8, l_.str.1@PAGE
Lloh10:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh11:
	adrp	x9, l_.str.2@PAGE
Lloh12:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x25, x26
	csel	x25, x9, x8, eq
	ldr	x8, [x27, #32]
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _SR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_ssc_readl
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x25, x0, [sp]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	stp	xzr, xzr, [x24]
	ldr	x8, [x23]
	str	xzr, [x8, x20, lsl #3]
LBB0_2:
	mov	w8, #1
	lsl	w23, w8, w20
	mov	w8, #56
	madd	x8, x22, x8, x21
	add	x20, x8, #4
	mov	x0, x20
	bl	_spin_lock_irq
	ldr	w8, [x19]
	bics	w8, w8, w23
	str	w8, [x19]
	b.ne	LBB0_6
; %bb.3:
	mov	w8, #56
	madd	x23, x22, x8, x21
	ldr	x8, [x23, #40]!
	cbz	x8, LBB0_5
; %bb.4:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_debug
	mov	w8, #56
	madd	x24, x22, x8, x21
	ldr	x8, [x24, #32]
	ldr	w0, [x8, #8]
	bl	_clk_disable
	ldr	x8, [x24, #32]
	ldr	w0, [x8, #4]
	mov	x1, x19
	bl	_free_irq
	str	xzr, [x23]
LBB0_5:
	mov	w8, #56
	madd	x22, x22, x8, x21
	ldr	x8, [x22, #32]
	ldr	w19, [x8]
Lloh20:
	adrp	x8, _CR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CR@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
Lloh23:
	adrp	x8, _CR_SWRST@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CR_SWRST@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_SSC_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_ssc_writel
	stp	xzr, xzr, [x22, #16]
	str	xzr, [x22, #8]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_spin_unlock_irq
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ssc_info,8,3                   ; @ssc_info
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ; @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_CR,4,2                         ; @CR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atmel_ssc_shutdown: %s disabled SSC_SR=0x%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"receive"

l_.str.2:                               ; @.str.2
	.asciz	"transmit"

	.comm	_SR,4,2                         ; @SR
l_.str.3:                               ; @.str.3
	.asciz	"atmel_ssc_dau: Stopping clock\n"

	.comm	_CR_SWRST,4,2                   ; @CR_SWRST
	.no_dead_strip	_atmel_ssc_shutdown
.subsections_via_symbols
