	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cns3xxx_spi_tx                 ## -- Begin function cns3xxx_spi_tx
	.p2align	4, 0x90
_cns3xxx_spi_tx:                        ## @cns3xxx_spi_tx
	.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	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_cns3xxx_spi_bus_idle
	testl	%eax, %eax
	je	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_cns3xxx_spi_tx_buffer_empty
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_SPI_TRANSMIT_CONTROL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	$-8, %ecx
	andl	$3, %r12d
	andl	$1, %r15d
	leal	(%r12,%r15,4), %edx
	orl	%ecx, %edx
	movl	%edx, (%rax)
	movq	_SPI_TRANSMIT_BUFFER_REG@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	movl	$1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_TRANSMIT_CONTROL_REG,4,2   ## @SPI_TRANSMIT_CONTROL_REG
	.comm	_SPI_TRANSMIT_BUFFER_REG,4,2    ## @SPI_TRANSMIT_BUFFER_REG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cns3xxx_spi_tx                 ; -- Begin function cns3xxx_spi_tx
	.p2align	2
_cns3xxx_spi_tx:                        ; @cns3xxx_spi_tx
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_cns3xxx_spi_bus_idle
	cbz	w0, LBB0_1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_cns3xxx_spi_tx_buffer_empty
	cbz	w0, LBB0_2
; %bb.3:
Lloh0:
	adrp	x8, _SPI_TRANSMIT_CONTROL_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_TRANSMIT_CONTROL_REG@GOTPAGEOFF]
	ldr	w9, [x8]
	and	w9, w9, #0xfffffff8
	and	w10, w21, #0x3
	bfi	w10, w20, #2, #1
	orr	w9, w10, w9
	str	w9, [x8]
Lloh2:
	adrp	x8, _SPI_TRANSMIT_BUFFER_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPI_TRANSMIT_BUFFER_REG@GOTPAGEOFF]
Lloh4:
	str	w19, [x8]
	mov	w0, #1
	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 AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_TRANSMIT_CONTROL_REG,4,2   ; @SPI_TRANSMIT_CONTROL_REG
	.comm	_SPI_TRANSMIT_BUFFER_REG,4,2    ; @SPI_TRANSMIT_BUFFER_REG
.subsections_via_symbols
