	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxd2880_spi_device_write
_cxd2880_spi_device_write:              ## @cxd2880_spi_device_write
	.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
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.2:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movq	(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_4
## %bb.5:
	leaq	-64(%rbp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	%r15, -56(%rbp)
	movq	%r14, -64(%rbp)
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	callq	_spi_message_init
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_spi_message_add_tail
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_spi_sync
	testl	%eax, %eax
	jns	LBB0_8
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_cxd2880_spi_device_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxd2880_spi_device_write
_cxd2880_spi_device_write:              ; @cxd2880_spi_device_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x2
	cbz	x2, LBB0_6
; %bb.2:
	mov	x20, x1
	cbz	x1, LBB0_6
; %bb.3:
	ldr	x21, [x0]
	cbz	x21, LBB0_6
; %bb.4:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	stp	x19, x20, [sp, #8]
	add	x0, sp, #24
	bl	_spi_message_init
	add	x0, sp, #8
	add	x1, sp, #24
	bl	_spi_message_add_tail
	ldr	w0, [x21]
	add	x1, sp, #24
	bl	_spi_sync
	mov	x8, x0
	mov	w0, #0
	tbz	w8, #31, LBB0_8
; %bb.5:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_cxd2880_spi_device_write
.subsections_via_symbols
