	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cns3xxx_spi_txrx
_cns3xxx_spi_txrx:                      ## @cns3xxx_spi_txrx
	.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	%rsi, %r15
	movq	%rdi, %r14
	callq	_to_hw
	movq	%rax, %r12
	movq	(%r15), %rdx
	movq	8(%r15), %rcx
	movl	16(%r15), %r8d
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movups	(%r15), %xmm0
	movups	%xmm0, (%r12)
	movl	16(%r15), %eax
	movl	%eax, 16(%r12)
	movq	$0, 32(%r12)
	movq	24(%r15), %rax
	movq	%rax, 24(%r12)
	leaq	20(%r12), %rdi
	callq	_init_completion
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	cmpl	$2, 16(%r12)
	jl	LBB0_8
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %r13d
	leaq	-48(%rbp), %rbx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%rax,%r13,4), %ecx
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	4(%r14), %esi
	movq	(%r12), %rax
	movl	-4(%rax,%r13,4), %ecx
	movq	%r12, %rdi
	xorl	%edx, %edx
	movq	%rbx, %r8
	callq	_cns3xxx_spi_tx_rx
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %ecx
	movl	%ecx, -4(%rax,%r13,4)
	movq	%r14, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movslq	16(%r12), %rax
	decq	%rax
	cmpq	%rax, %r13
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rax
	incl	%r15d
	incq	%r13
	jmp	LBB0_3
LBB0_12:
	cmpq	$0, 8(%r12)
	je	LBB0_19
## %bb.13:
	xorl	%ebx, %ebx
	cmpl	$2, 16(%r12)
	jl	LBB0_17
## %bb.14:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %r15
	leaq	L_.str.2(%rip), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$255, %ecx
	movq	%r15, %r8
	callq	_cns3xxx_spi_tx_rx
	movl	-48(%rbp), %ecx
	movq	8(%r12), %rax
	movl	%ecx, (%rax,%rbx,4)
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	incq	%rbx
	movslq	16(%r12), %rax
	decq	%rax
	cmpq	%rax, %rbx
	jl	LBB0_15
## %bb.16:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_17:
	xorl	%edx, %edx
	cmpq	$0, 24(%r15)
	setne	%dl
	movl	4(%r14), %esi
	leaq	-48(%rbp), %r8
	movq	%r12, %rdi
	movl	$255, %ecx
	callq	_cns3xxx_spi_tx_rx
	movl	-48(%rbp), %ecx
	movq	8(%r12), %rax
	movl	%ebx, %edx
	movl	%ecx, (%rax,%rdx,4)
	jmp	LBB0_18
LBB0_7:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_8:
	cmpq	$0, 24(%r15)
	movl	4(%r14), %esi
	movq	(%r12), %rax
	movl	%r13d, %ebx
	movl	(%rax,%rbx,4), %ecx
	leaq	-48(%rbp), %r8
	movq	%r12, %rdi
	je	LBB0_11
## %bb.9:
	movl	$1, %edx
	callq	_cns3xxx_spi_tx_rx
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.10:
	movl	-48(%rbp), %ecx
	movl	%ecx, (%rax,%rbx,4)
LBB0_18:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_19
LBB0_11:
	xorl	%edx, %edx
	callq	_cns3xxx_spi_tx_rx
LBB0_19:
	movl	16(%r12), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"txrx: tx %p, rx %p, len %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"[SPI_CNS3XXX_DEBUG] hw->tx[%02d]: 0x%02x\n"

L_.str.2:                               ## @.str.2
	.asciz	"[SPI_CNS3XXX_DEBUG] hw->rx[%02d]: 0x%02x\n"

	.no_dead_strip	_cns3xxx_spi_txrx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cns3xxx_spi_txrx
_cns3xxx_spi_txrx:                      ; @cns3xxx_spi_txrx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x1
	mov	x20, x0
	bl	_to_hw
	mov	x19, x0
	ldp	x8, x9, [x21]
	ldr	w10, [x21, #16]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x8, [x21]
	str	x8, [x19]
	ldr	x8, [x21, #8]
	str	x8, [x19, #8]
	ldr	w8, [x21, #16]
	str	w8, [x19, #16]
	str	xzr, [x19, #32]
	ldr	x8, [x21, #24]
	str	x8, [x19, #24]
	add	x0, x19, #20
	bl	_init_completion
	ldr	x8, [x19]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w9, [x19, #16]
	cmp	w9, #2
	b.lt	LBB0_12
; %bb.2:
	mov	x24, #0
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh4:
	adrp	x23, l_.str.2@PAGE
Lloh5:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x25, x24, #2
	ldr	w8, [x8, x25]
	stp	x24, x8, [sp]
	mov	x0, x20
	mov	x1, x22
	bl	_dev_dbg
	ldr	w1, [x20, #4]
	ldr	x8, [x19]
	ldr	w3, [x8, x25]
	add	x4, sp, #24
	mov	x0, x19
	mov	w2, #0
	bl	_cns3xxx_spi_tx_rx
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [sp, #24]
	str	w9, [x8, x24, lsl #2]
	stp	x24, x9, [sp]
	mov	x0, x20
	mov	x1, x23
	bl	_dev_dbg
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x24, #1
	ldrsw	x8, [x19, #16]
	sub	x8, x8, #1
	cmp	x9, x8
	b.ge	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	mov	x24, x9
	b	LBB0_3
LBB0_7:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_21
; %bb.8:
	ldr	w8, [x19, #16]
	cmp	w8, #2
	b.lt	LBB0_18
; %bb.9:
	mov	x23, #0
Lloh6:
	adrp	x22, l_.str.2@PAGE
Lloh7:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20, #4]
	add	x4, sp, #24
	mov	x0, x19
	mov	w2, #0
	mov	w3, #255
	bl	_cns3xxx_spi_tx_rx
	ldr	x8, [sp, #24]
	ldr	x9, [x19, #8]
	str	w8, [x9, x23, lsl #2]
	stp	x23, x8, [sp]
	mov	x0, x20
	mov	x1, x22
	bl	_dev_dbg
	add	x23, x23, #1
	ldrsw	x8, [x19, #16]
	sub	x8, x8, #1
	cmp	x23, x8
	b.lt	LBB0_10
; %bb.11:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	b	LBB0_19
LBB0_12:
	mov	w22, #0
	b	LBB0_14
LBB0_13:
	add	w22, w24, #1
LBB0_14:
	ldr	x8, [x21, #24]
	ldr	w1, [x20, #4]
	ldr	x9, [x19]
	ldr	w3, [x9, w22, uxtw #2]
	add	x4, sp, #24
	mov	x0, x19
	cbz	x8, LBB0_17
; %bb.15:
	mov	w2, #1
	bl	_cns3xxx_spi_tx_rx
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_21
; %bb.16:
	mov	w9, w22
	ldr	x10, [sp, #24]
	str	w10, [x8, x9, lsl #2]
	stp	x9, x10, [sp]
	b	LBB0_20
LBB0_17:
	mov	w2, #0
	bl	_cns3xxx_spi_tx_rx
	b	LBB0_21
LBB0_18:
	mov	w23, #0
LBB0_19:
	ldr	x8, [x21, #24]
	cmp	x8, #0
	cset	w2, ne
	ldr	w1, [x20, #4]
	add	x4, sp, #24
	mov	x0, x19
	mov	w3, #255
	bl	_cns3xxx_spi_tx_rx
	ldr	x8, [sp, #24]
	ldr	x9, [x19, #8]
	str	w8, [x9, w23, uxtw #2]
	stp	x23, x8, [sp]
LBB0_20:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
LBB0_21:
	ldr	w0, [x19, #16]
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"txrx: tx %p, rx %p, len %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"[SPI_CNS3XXX_DEBUG] hw->tx[%02d]: 0x%02x\n"

l_.str.2:                               ; @.str.2
	.asciz	"[SPI_CNS3XXX_DEBUG] hw->rx[%02d]: 0x%02x\n"

	.no_dead_strip	_cns3xxx_spi_txrx
.subsections_via_symbols
