	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxd2880_spi_read_ts
_cxd2880_spi_read_ts:                   ## @cxd2880_spi_read_ts
	.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
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movl	%edx, %ebx
	testl	%edx, %edx
	je	LBB0_3
## %bb.5:
	cmpl	$65536, %ebx                    ## imm = 0x10000
	jl	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rdi
LBB0_4:
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rdi, %r14
	movl	$16, -52(%rbp)
	movl	%ebx, %eax
	sarl	$8, %eax
	movl	%eax, -48(%rbp)
	movl	%ebx, -44(%rbp)
	leaq	-120(%rbp), %r12
	movq	%r12, %rdi
	callq	_spi_message_init
	movl	$3, -112(%rbp)
	leaq	-52(%rbp), %rax
	movq	%rax, -104(%rbp)
	leaq	-112(%rbp), %rdi
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	imull	$188, %ebx, %eax
	leaq	-88(%rbp), %rdi
	movl	%eax, -88(%rbp)
	movq	%r15, -72(%rbp)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_spi_sync
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid arg\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"packet num > 0xffff\n"

L_.str.2:                               ## @.str.2
	.asciz	"spi_write_then_read failed\n"

	.no_dead_strip	_cxd2880_spi_read_ts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxd2880_spi_read_ts
_cxd2880_spi_read_ts:                   ; @cxd2880_spi_read_ts
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
	str	q0, [sp, #16]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_5
; %bb.2:
	mov	x21, x2
	cbz	w2, LBB0_5
; %bb.3:
	cmp	w21, #16, lsl #12               ; =65536
	b.lt	LBB0_9
; %bb.4:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
LBB0_6:
	bl	_pr_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.8:
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_9:
	mov	x19, x0
	mov	w8, #16
	asr	w9, w21, #8
	stp	w8, w9, [x29, #-52]
	stur	w21, [x29, #-44]
	add	x0, sp, #8
	bl	_spi_message_init
	mov	w8, #3
	str	w8, [sp, #16]
	sub	x8, x29, #52
	str	x8, [sp, #24]
	add	x22, sp, #16
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_spi_message_add_tail
	mov	w8, #188
	mul	w8, w21, w8
	add	x0, x22, #24
	str	w8, [sp, #40]
	str	x20, [sp, #56]
	add	x1, sp, #8
	bl	_spi_message_add_tail
	add	x1, sp, #8
	mov	x0, x19
	bl	_spi_sync
	mov	x19, x0
	cbz	w0, LBB0_7
; %bb.10:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	b	LBB0_7
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid arg\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"packet num > 0xffff\n"

l_.str.2:                               ; @.str.2
	.asciz	"spi_write_then_read failed\n"

	.no_dead_strip	_cxd2880_spi_read_ts
.subsections_via_symbols
