	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function receive_n_bytes
_receive_n_bytes:                       ## @receive_n_bytes
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsi, %rax
	subq	8(%rdi), %rax
	movq	16(%rdi), %r13
	sarq	$2, %rax
	movslq	%edx, %rbx
	addq	%rbx, %rax
	movslq	(%rdi), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setg	%dil
	callq	_BUG_ON
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	$1, -64(%rbp)
	movq	%r14, -56(%rbp)
	movl	%ebx, -60(%rbp)
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_spi_message_init
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_spi_sync_locked
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_2:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spi transfer failed: %d\n"

	.no_dead_strip	_receive_n_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function receive_n_bytes
_receive_n_bytes:                       ; @receive_n_bytes
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldp	x8, x22, [x0, #8]
	sub	x8, x1, x8
	asr	x8, x8, #2
	add	x8, x8, w2, sxtw
	ldrsw	x9, [x0]
	cmp	x8, x9
	cset	w0, gt
	bl	_BUG_ON
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	w8, #1
	str	x21, [sp, #24]
	stp	w8, w20, [sp, #16]
	add	x0, sp, #8
	bl	_spi_message_init
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_spi_message_add_tail
	ldr	w0, [x22]
	add	x1, sp, #8
	bl	_spi_sync_locked
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_2:
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spi transfer failed: %d\n"

	.no_dead_strip	_receive_n_bytes
.subsections_via_symbols
