	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cw1200_spi_memcpy_fromio
_cw1200_spi_memcpy_fromio:              ## @cw1200_spi_memcpy_fromio
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movq	%rdi, %r15
	leaq	-44(%rbp), %rax
	movq	%rax, -96(%rbp)
	movl	$4, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movl	%ecx, -64(%rbp)
	movq	%rdx, -56(%rbp)
	movl	%esi, %edi
	callq	_SDIO_TO_SPI_ADDR
	shll	$12, %eax
	movq	_SET_READ@GOTPCREL(%rip), %rcx
	movl	%r14d, %edi
	sarl	%edi
	orl	%eax, %edi
	orl	(%rcx), %edi
	movl	%edi, -44(%rbp)
	callq	_cpu_to_le16
	movl	%eax, -44(%rbp)
	movl	%eax, %edi
	callq	_swab16
	movl	%eax, -44(%rbp)
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_spi_message_init
	leaq	-96(%rbp), %rdi
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	leaq	-72(%rbp), %rdi
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	(%r15), %rdi
	movq	%r12, %rsi
	callq	_spi_sync
	movl	%eax, %r15d
	testl	%r14d, %r14d
	jle	LBB0_3
## %bb.1:
	incl	%r14d
	shrl	%r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %edi
	callq	_swab16
	movl	%eax, (%r13,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_2
LBB0_3:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_READ,4,2                   ## @SET_READ
	.no_dead_strip	_cw1200_spi_memcpy_fromio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cw1200_spi_memcpy_fromio
_cw1200_spi_memcpy_fromio:              ; @cw1200_spi_memcpy_fromio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x3
	mov	x19, x2
	mov	x21, x0
	sub	x8, x29, #36
	stp	x2, x8, [sp, #24]
	mov	w8, #4
	str	w8, [sp, #40]
	str	xzr, [sp, #48]
	str	xzr, [sp, #8]
	str	w3, [sp, #16]
	mov	x0, x1
	bl	_SDIO_TO_SPI_ADDR
	lsl	w8, w0, #12
Lloh0:
	adrp	x9, _SET_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SET_READ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w8, w8, w20, asr #1
	orr	w0, w8, w9
	stur	w0, [x29, #-36]
	bl	_cpu_to_le16
	stur	w0, [x29, #-36]
	bl	_swab16
	stur	w0, [x29, #-36]
	sub	x0, x29, #40
	bl	_spi_message_init
	add	x0, sp, #32
	sub	x1, x29, #40
	bl	_spi_message_add_tail
	add	x0, sp, #8
	sub	x1, x29, #40
	bl	_spi_message_add_tail
	ldr	x0, [x21]
	sub	x1, x29, #40
	bl	_spi_sync
	mov	x21, x0
	cmp	w20, #1
	b.lt	LBB0_3
; %bb.1:
	add	w8, w20, #1
	lsr	w20, w8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_swab16
	str	w0, [x19], #4
	subs	x20, x20, #1
	b.ne	LBB0_2
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_READ,4,2                   ; @SET_READ
	.no_dead_strip	_cw1200_spi_memcpy_fromio
.subsections_via_symbols
