	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ca8210_spi_transfer_complete
_ca8210_spi_transfer_complete:          ## @ca8210_spi_transfer_complete
	.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
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %r15
	movq	_CA8210_SPI_BUF_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%r13), %rax
	movq	(%rax), %rdx
	movq	_SPI_NACK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_1
LBB0_3:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	8(%r13), %rsi
	movq	(%rsi), %rax
	movq	_SPI_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	8(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.5:
	movq	%r13, %rdi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_1:
	movq	_SPI_IDLE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_10
## %bb.2:
	cmpq	%rcx, 8(%rax)
	je	LBB0_3
	jmp	LBB0_14
LBB0_6:
	cmpl	$4, (%r15)
	jl	LBB0_9
## %bb.7:
	movq	8(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	%r13, %rdi
	callq	_kfree
	movq	8(%r15), %rdi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ca8210_remove                  ## TAILCALL
LBB0_10:
	movq	8(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r13), %rax
	cmpq	$-1, 8(%rax)
	jl	LBB0_13
## %bb.11:
	movq	$-1, %rbx
	leaq	L_.str.5(%rip), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	movq	8(%rax,%rbx,8), %rdx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r13), %rax
	incq	%rbx
	cmpq	%rbx, 8(%rax)
	jge	LBB0_12
LBB0_13:
	movq	%r13, %rdi
	callq	_ca8210_rx_done
LBB0_14:
	leaq	4(%r15), %rdi
	callq	_complete
	movq	%r13, %rdi
	callq	_kfree
	movl	$0, (%r15)
	jmp	LBB0_15
LBB0_9:
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_memcpy
	movq	%r13, %rdi
	callq	_kfree
	movq	8(%r15), %rdi
	movl	(%r12), %edx
	movq	%r14, %rsi
	callq	_ca8210_spi_transfer
	incl	(%r15)
	movq	8(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_info
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CA8210_SPI_BUF_SIZE,4,2        ## @CA8210_SPI_BUF_SIZE
	.comm	_SPI_NACK,8,3                   ## @SPI_NACK
	.comm	_SPI_IDLE,8,3                   ## @SPI_IDLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ca8210 was busy during attempted write\n"

L_.str.1:                               ## @.str.1
	.asciz	"IRQ servicing NACKd, dropping transfer\n"

L_.str.2:                               ## @.str.2
	.asciz	"too many retries!\n"

L_.str.3:                               ## @.str.3
	.asciz	"retried spi write\n"

L_.str.4:                               ## @.str.4
	.asciz	"READ CMD DURING TX\n"

L_.str.5:                               ## @.str.5
	.asciz	"%#03x\n"

	.no_dead_strip	_ca8210_spi_transfer_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ca8210_spi_transfer_complete
_ca8210_spi_transfer_complete:          ; @ca8210_spi_transfer_complete
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x21, [x0, #16]
Lloh3:
	adrp	x22, _CA8210_SPI_BUF_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CA8210_SPI_BUF_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x0]
	ldr	x10, [x8]
Lloh7:
	adrp	x9, _SPI_NACK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SPI_NACK@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x23, _SPI_IDLE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _SPI_IDLE@GOTPAGEOFF]
	cmp	x10, x9
	b.ne	LBB0_4
LBB0_1:
	ldr	x0, [x21, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	ldr	x1, [x19, #8]
	ldr	x8, [x1]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	ldr	x0, [x21, #8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	ldur	x8, [x29, #-56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.3:
	mov	x0, x19
	sub	sp, x29, #48
	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
	b	_kfree
LBB0_4:
	ldr	x11, [x23]
	cmp	x10, x11
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [x8, #8]
	cmp	x8, x9
	b.eq	LBB0_1
	b	LBB0_13
LBB0_6:
	ldr	w8, [x21]
	cmp	w8, #4
	b.lt	LBB0_14
; %bb.7:
	ldr	x0, [x21, #8]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_kfree
	ldr	x0, [x21, #8]
	ldur	x8, [x29, #-56]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.8:
	sub	sp, x29, #48
	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
	b	_ca8210_remove
LBB0_9:
	ldr	x0, [x21, #8]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cmn	x9, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x22, #0
Lloh26:
	adrp	x20, l_.str.5@PAGE
Lloh27:
	add	x20, x20, l_.str.5@PAGEOFF
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21, #8]
	ldr	x8, [x8, x22, lsl #3]
	str	x8, [sp, #-16]!
	mov	x1, x20
	bl	_dev_dbg
	add	sp, sp, #16
	add	x9, x22, #1
	ldr	x8, [x19]
	ldr	x10, [x8, #8]
	cmp	x10, x22
	mov	x22, x9
	b.ge	LBB0_11
LBB0_12:
	mov	x0, x19
	bl	_ca8210_rx_done
LBB0_13:
	add	x0, x21, #4
	bl	_complete
	mov	x0, x19
	bl	_kfree
	str	wzr, [x21]
	b	LBB0_15
LBB0_14:
	ldr	w2, [x22]
	mov	x0, x20
	bl	_memcpy
	mov	x0, x19
	bl	_kfree
	ldr	x0, [x21, #8]
	ldr	w2, [x22]
	mov	x1, x20
	bl	_ca8210_spi_transfer
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	ldr	x0, [x21, #8]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
LBB0_15:
	ldur	x8, [x29, #-56]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	sub	sp, x29, #48
	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
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_CA8210_SPI_BUF_SIZE,4,2        ; @CA8210_SPI_BUF_SIZE
	.comm	_SPI_NACK,8,3                   ; @SPI_NACK
	.comm	_SPI_IDLE,8,3                   ; @SPI_IDLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ca8210 was busy during attempted write\n"

l_.str.1:                               ; @.str.1
	.asciz	"IRQ servicing NACKd, dropping transfer\n"

l_.str.2:                               ; @.str.2
	.asciz	"too many retries!\n"

l_.str.3:                               ; @.str.3
	.asciz	"retried spi write\n"

l_.str.4:                               ; @.str.4
	.asciz	"READ CMD DURING TX\n"

l_.str.5:                               ; @.str.5
	.asciz	"%#03x\n"

	.no_dead_strip	_ca8210_spi_transfer_complete
.subsections_via_symbols
