	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cc2520_read_register
_cc2520_read_register:                  ## @cc2520_read_register
	.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	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	$0, -64(%rbp)
	movq	16(%rdi), %rax
	movq	%rax, -56(%rbp)
	movq	%rax, -48(%rbp)
	movl	$1, -88(%rbp)
	movq	%rdx, -80(%rbp)
	movq	$0, -72(%rbp)
	leaq	-40(%rbp), %r15
	movq	%r15, %rdi
	callq	_spi_message_init
	leaq	-64(%rbp), %rdi
	movq	%r15, %rsi
	callq	_spi_message_add_tail
	leaq	-88(%rbp), %rdi
	movq	%r15, %rsi
	callq	_spi_message_add_tail
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_CC2520_CMD_MEMORY_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r12), %rcx
	movslq	-64(%rbp), %rdx
	leal	1(%rdx), %esi
	movl	%esi, -64(%rbp)
	movl	%eax, (%rcx,%rdx,4)
	movslq	-64(%rbp), %rax
	leal	1(%rax), %edx
	movl	%edx, -64(%rbp)
	movl	%r14d, (%rcx,%rax,4)
	movq	8(%r12), %rdi
	movq	%r15, %rsi
	callq	_spi_sync
	movl	%eax, %r14d
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_dbg
	movl	-40(%rbp), %ebx
	testl	%ebx, %ebx
	cmovel	%r14d, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CC2520_CMD_MEMORY_READ,4,2     ## @CC2520_CMD_MEMORY_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spi status = %d\n"

	.no_dead_strip	_cc2520_read_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cc2520_read_register
_cc2520_read_register:                  ; @cc2520_read_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #32]
	ldr	x8, [x0, #16]
	stp	x8, x8, [sp, #40]
	mov	w8, #1
	str	w8, [sp, #8]
	stp	x2, xzr, [sp, #16]
	sub	x0, x29, #24
	bl	_spi_message_init
	add	x0, sp, #32
	sub	x1, x29, #24
	bl	_spi_message_add_tail
	add	x0, sp, #8
	sub	x1, x29, #24
	bl	_spi_message_add_tail
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _CC2520_CMD_MEMORY_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CC2520_CMD_MEMORY_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	ldrsw	x10, [sp, #32]
	add	w11, w10, #1
	str	w11, [sp, #32]
	str	w8, [x9, x10, lsl #2]
	ldrsw	x8, [sp, #32]
	add	w10, w8, #1
	str	w10, [sp, #32]
	str	w20, [x9, x8, lsl #2]
	ldr	x0, [x19, #8]
	sub	x1, x29, #24
	bl	_spi_sync
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	ldur	w8, [x29, #-24]
	cmp	w8, #0
	csel	w20, w20, w8, eq
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CC2520_CMD_MEMORY_READ,4,2     ; @CC2520_CMD_MEMORY_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spi status = %d\n"

	.no_dead_strip	_cc2520_read_register
.subsections_via_symbols
