	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs4215_setctrl
_cs4215_setctrl:                        ## @cs4215_setctrl
	.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
	movq	%rdi, %r13
	movl	$1, %esi
	callq	_cs4215_setdata
	movl	$125, %edi
	callq	_udelay
	movq	_D_ENPIO@GOTPCREL(%rip), %rax
	movq	_D_PIO1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	cmpq	$0, 24(%r13)
	jne	LBB0_1
## %bb.2:
	movq	_D_PIO2@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_D_PIO0@GOTPCREL(%rip), %rax
LBB0_3:
	orl	(%rax), %r14d
	movq	_REG2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	40(%r13), %rsi
	movl	%r14d, %edi
	callq	_sbus_writel
	movq	_D_MM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dprintk
	movl	$34, %edi
	callq	_udelay
	leaq	32(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_REG0@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	40(%r13), %rdi
	callq	_sbus_readl
	movq	_D_C@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r12), %rsi
	addq	40(%r13), %rsi
	callq	_sbus_writel
	movq	_CHImaster@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$128, %edx
	callq	_reset_chi
	movq	16(%r13), %r9
	movq	%r13, %rdi
	movl	$17, %esi
	movl	$16, %edx
	movl	$16, %ecx
	movl	$32, %r8d
	callq	_link_time_slot
	movq	16(%r13), %r9
	movq	%r13, %rdi
	movl	$18, %esi
	movl	$16, %edx
	movl	$16, %ecx
	movl	$8, %r8d
	callq	_link_time_slot
	movq	16(%r13), %r9
	addq	$48, %r9
	movq	%r13, %rdi
	movl	$19, %esi
	movl	$18, %edx
	movl	$16, %ecx
	movl	$8, %r8d
	callq	_link_time_slot
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_CS4215_CLB@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	notl	%edx
	movq	8(%r13), %rax
	andl	(%rax), %edx
	movl	%edx, (%rax)
	movq	%r13, %rdi
	movl	$17, %esi
	callq	_xmit_fixed
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r12), %rdi
	addq	40(%r13), %rdi
	callq	_sbus_readl
	orl	(%rbx), %eax
	movq	(%r12), %rsi
	addq	40(%r13), %rsi
	movl	%eax, %edi
	callq	_sbus_writel
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$228, %eax
	andl	(%r13), %eax
	cmpl	$32, %eax
	je	LBB0_8
## %bb.4:
	movl	$-10, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep_interruptible
	movl	(%r13), %edx
	movl	%edx, %eax
	andl	$228, %eax
	incl	%ebx
	cmpl	$32, %eax
	jne	LBB0_5
## %bb.6:
	testl	%ebx, %ebx
	je	LBB0_7
LBB0_8:
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movl	$19, %esi
	xorl	%edx, %edx
	callq	_recv_fixed
	movq	8(%r13), %rax
	movl	(%rax), %edx
	orl	(%r15), %edx
	movl	%edx, (%rax)
	movq	%r13, %rdi
	movl	$17, %esi
	callq	_xmit_fixed
	movl	$250, %edi
	callq	_udelay
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_cs4215_setdata
	jmp	LBB0_9
LBB0_7:
	movq	_D_MM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dprintk
	movl	$-1, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D_ENPIO,4,2                    ## @D_ENPIO
	.comm	_D_PIO1,4,2                     ## @D_PIO1
	.comm	_D_PIO0,4,2                     ## @D_PIO0
	.comm	_D_PIO2,4,2                     ## @D_PIO2
	.comm	_REG2,8,3                       ## @REG2
	.comm	_D_MM,4,2                       ## @D_MM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cs4215_setctrl: reg2=0x%x\n"

	.comm	_REG0,8,3                       ## @REG0
	.comm	_D_C,4,2                        ## @D_C
	.comm	_CHImaster,4,2                  ## @CHImaster
	.comm	_CS4215_CLB,4,2                 ## @CS4215_CLB
L_.str.1:                               ## @.str.1
	.asciz	"CS4215 didn't respond to CLB (0x%02x)\n"

	.no_dead_strip	_cs4215_setctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs4215_setctrl
_cs4215_setctrl:                        ; @cs4215_setctrl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	mov	w1, #1
	bl	_cs4215_setdata
	mov	w0, #125
	bl	_udelay
Lloh0:
	adrp	x8, _D_ENPIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_ENPIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _D_PIO1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _D_PIO1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _D_PIO0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _D_PIO0@GOTPAGEOFF]
	ldr	x10, [x19, #24]
Lloh8:
	adrp	x11, _D_PIO2@GOTPAGE
Lloh9:
	ldr	x11, [x11, _D_PIO2@GOTPAGEOFF]
	cmp	x10, #0
	csel	x9, x11, x9, eq
	ldr	w9, [x9]
	orr	w20, w8, w9
	ldr	x8, [x19, #40]
Lloh10:
	adrp	x9, _REG2@GOTPAGE
Lloh11:
	ldr	x9, [x9, _REG2@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_sbus_writel
Lloh13:
	adrp	x21, _D_MM@GOTPAGE
Lloh14:
	ldr	x21, [x21, _D_MM@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dprintk
	mov	w0, #34
	bl	_udelay
	add	x20, x19, #32
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #40]
Lloh17:
	adrp	x22, _REG0@GOTPAGE
Lloh18:
	ldr	x22, [x22, _REG0@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_sbus_readl
Lloh19:
	adrp	x23, _D_C@GOTPAGE
Lloh20:
	ldr	x23, [x23, _D_C@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w0, w0, w8
	ldr	x8, [x19, #40]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_sbus_writel
Lloh21:
	adrp	x8, _CHImaster@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CHImaster@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #128
	bl	_reset_chi
	ldr	x5, [x19, #16]
	mov	x0, x19
	mov	w1, #17
	mov	w2, #16
	mov	w3, #16
	mov	w4, #32
	bl	_link_time_slot
	ldr	x5, [x19, #16]
	mov	x0, x19
	mov	w1, #18
	mov	w2, #16
	mov	w3, #16
	mov	w4, #8
	bl	_link_time_slot
	ldr	x8, [x19, #16]
	add	x5, x8, #48
	mov	x0, x19
	mov	w1, #19
	mov	w2, #18
	mov	w3, #16
	mov	w4, #8
	bl	_link_time_slot
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh24:
	adrp	x24, _CS4215_CLB@GOTPAGE
Lloh25:
	ldr	x24, [x24, _CS4215_CLB@GOTPAGEOFF]
	ldr	w8, [x24]
	ldr	x9, [x19, #8]
	ldr	w10, [x9]
	bic	w2, w10, w8
	str	w2, [x9]
	mov	x0, x19
	mov	w1, #17
	bl	_xmit_fixed
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #40]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_sbus_readl
	ldr	w8, [x23]
	orr	w0, w8, w0
	ldr	x8, [x19, #40]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_sbus_writel
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19]
	mov	w20, #228
	and	w8, w8, w20
	cmp	w8, #32
	b.eq	LBB0_4
; %bb.1:
	mov	w22, #-10
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_msleep_interruptible
	ldr	w2, [x19]
	and	w8, w2, w20
	add	w22, w22, #1
	cmp	w8, #32
	b.ne	LBB0_2
; %bb.3:
	cbz	w22, LBB0_5
LBB0_4:
	mov	x0, x19
	mov	w1, #19
	mov	x2, #0
	bl	_recv_fixed
	ldr	w8, [x24]
	ldr	x9, [x19, #8]
	ldr	w10, [x9]
	orr	w2, w10, w8
	str	w2, [x9]
	mov	x0, x19
	mov	w1, #17
	bl	_xmit_fixed
	mov	w0, #250
	bl	_udelay
	mov	x0, x19
	mov	w1, #0
	bl	_cs4215_setdata
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x21]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dprintk
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_D_ENPIO,4,2                    ; @D_ENPIO
	.comm	_D_PIO1,4,2                     ; @D_PIO1
	.comm	_D_PIO0,4,2                     ; @D_PIO0
	.comm	_D_PIO2,4,2                     ; @D_PIO2
	.comm	_REG2,8,3                       ; @REG2
	.comm	_D_MM,4,2                       ; @D_MM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cs4215_setctrl: reg2=0x%x\n"

	.comm	_REG0,8,3                       ; @REG0
	.comm	_D_C,4,2                        ; @D_C
	.comm	_CHImaster,4,2                  ; @CHImaster
	.comm	_CS4215_CLB,4,2                 ; @CS4215_CLB
l_.str.1:                               ; @.str.1
	.asciz	"CS4215 didn't respond to CLB (0x%02x)\n"

	.no_dead_strip	_cs4215_setctrl
.subsections_via_symbols
