	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1251_spi_read
_wl1251_spi_read:                       ## @wl1251_spi_read
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	$0, (%rdi)
	movq	_WSPI_CMD_READ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rdi)
	movq	_WSPI_CMD_BYTE_LENGTH_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	%r14, %rdi
	shlq	%cl, %rdi
	movq	_WSPI_CMD_BYTE_LENGTH@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rdi
	movq	%rdx, %r15
	movq	_WSPI_CMD_BYTE_ADDR@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	movslq	%esi, %rcx
	orq	%rax, %rcx
	orq	%rdi, %rcx
	movq	%rcx, (%rbx)
	leaq	-144(%rbp), %r12
	movq	%r12, %rdi
	callq	_spi_message_init
	leaq	-128(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
	movq	%rbx, -128(%rbp)
	movl	$4, -120(%rbp)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	leaq	-104(%rbp), %rdi
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -88(%rbp)
	movq	_WL1251_BUSY_WORD_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	leaq	-80(%rbp), %rdi
	movq	%r15, -64(%rbp)
	movl	%r14d, -72(%rbp)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	%rbx, %rdi
	callq	_wl_to_spi
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_spi_sync
	movq	_DEBUG_SPI@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	$8, %ecx
	movq	%rbx, %rdx
	callq	_wl1251_dump
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_wl1251_dump
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WSPI_CMD_READ,8,3              ## @WSPI_CMD_READ
	.comm	_WSPI_CMD_BYTE_LENGTH_OFFSET,8,3 ## @WSPI_CMD_BYTE_LENGTH_OFFSET
	.comm	_WSPI_CMD_BYTE_LENGTH,8,3       ## @WSPI_CMD_BYTE_LENGTH
	.comm	_WSPI_CMD_BYTE_ADDR,4,2         ## @WSPI_CMD_BYTE_ADDR
	.comm	_WL1251_BUSY_WORD_LEN,4,2       ## @WL1251_BUSY_WORD_LEN
	.comm	_DEBUG_SPI,4,2                  ## @DEBUG_SPI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spi_read cmd -> "

L_.str.1:                               ## @.str.1
	.asciz	"spi_read buf <- "

	.no_dead_strip	_wl1251_spi_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1251_spi_read
_wl1251_spi_read:                       ; @wl1251_spi_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x22, [x0, #8]
	str	xzr, [x0]
Lloh3:
	adrp	x8, _WSPI_CMD_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WSPI_CMD_READ@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x0]
Lloh6:
	adrp	x9, _WSPI_CMD_BYTE_LENGTH_OFFSET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WSPI_CMD_BYTE_LENGTH_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	lsl	x9, x3, x9
Lloh9:
	adrp	x10, _WSPI_CMD_BYTE_LENGTH@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WSPI_CMD_BYTE_LENGTH@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	and	x9, x9, x10
Lloh12:
	adrp	x10, _WSPI_CMD_BYTE_ADDR@GOTPAGE
Lloh13:
	ldr	x10, [x10, _WSPI_CMD_BYTE_ADDR@GOTPAGEOFF]
	orr	x8, x9, x8
Lloh14:
	ldr	w9, [x10]
	and	w9, w9, w1
	sxtw	x9, w9
	orr	x8, x8, x9
	str	x8, [x0]
	add	x0, sp, #8
	bl	_spi_message_init
	add	x23, sp, #16
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #72
	bl	_memset
	str	x21, [sp, #16]
	mov	w8, #4
	str	w8, [sp, #24]
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_spi_message_add_tail
	add	x0, x23, #24
	str	x22, [sp, #56]
Lloh15:
	adrp	x8, _WL1251_BUSY_WORD_LEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WL1251_BUSY_WORD_LEN@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [sp, #48]
	add	x1, sp, #8
	bl	_spi_message_add_tail
	add	x0, x23, #48
	str	x20, [sp, #80]
	str	w19, [sp, #72]
	add	x1, sp, #8
	bl	_spi_message_add_tail
	mov	x0, x21
	bl	_wl_to_spi
	add	x1, sp, #8
	bl	_spi_sync
Lloh18:
	adrp	x22, _DEBUG_SPI@GOTPAGE
Lloh19:
	ldr	x22, [x22, _DEBUG_SPI@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	w3, #8
	bl	_wl1251_dump
	ldr	w0, [x22]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_wl1251_dump
	ldur	x8, [x29, #-56]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WSPI_CMD_READ,8,3              ; @WSPI_CMD_READ
	.comm	_WSPI_CMD_BYTE_LENGTH_OFFSET,8,3 ; @WSPI_CMD_BYTE_LENGTH_OFFSET
	.comm	_WSPI_CMD_BYTE_LENGTH,8,3       ; @WSPI_CMD_BYTE_LENGTH
	.comm	_WSPI_CMD_BYTE_ADDR,4,2         ; @WSPI_CMD_BYTE_ADDR
	.comm	_WL1251_BUSY_WORD_LEN,4,2       ; @WL1251_BUSY_WORD_LEN
	.comm	_DEBUG_SPI,4,2                  ; @DEBUG_SPI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spi_read cmd -> "

l_.str.1:                               ; @.str.1
	.asciz	"spi_read buf <- "

	.no_dead_strip	_wl1251_spi_read
.subsections_via_symbols
