	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _read_write
__read_write:                           ## @_read_write
	.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
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movl	%edi, %r14d
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_memcpy
	jmp	LBB0_5
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_3:
	movq	%rsi, %rbx
LBB0_5:
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	movl	$16, %esi
	callq	_bzero
	movq	%rbx, -48(%rbp)
	movl	%r15d, -56(%rbp)
	movq	_SPIGENIOC_TRANSFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	movq	%r13, %rdx
	callq	_ioctl
	movq	%rax, %r14
	sarq	$63, %r14
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.6:
	testq	%rax, %rax
	js	LBB0_15
## %bb.7:
	testl	%r15d, %r15d
	jle	LBB0_15
## %bb.8:
	movq	_reversebits@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r15d, %r9d
	leaq	-1(%r9), %rdi
	movl	%r9d, %r8d
	andl	$3, %r8d
	cmpq	$3, %rdi
	jae	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	jmp	LBB0_12
LBB0_10:
	andl	$-4, %r9d
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%rdi,8), %rdx
	movq	8(%rbx,%rdi,8), %rsi
	movq	(%rcx,%rdx,8), %rdx
	movq	%rdx, (%rbx,%rdi,8)
	movq	(%rcx,%rsi,8), %rdx
	movq	%rdx, 8(%rbx,%rdi,8)
	movq	16(%rbx,%rdi,8), %rdx
	movq	(%rcx,%rdx,8), %rdx
	movq	%rdx, 16(%rbx,%rdi,8)
	movq	24(%rbx,%rdi,8), %rdx
	movq	(%rcx,%rdx,8), %rdx
	movq	%rdx, 24(%rbx,%rdi,8)
	addq	$4, %rdi
	cmpq	%rdi, %r9
	jne	LBB0_11
LBB0_12:
	testq	%r8, %r8
	je	LBB0_15
## %bb.13:
	leaq	(%rbx,%rdi,8), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rdi,8), %rdx
	movq	(%rcx,%rdx,8), %rdx
	movq	%rdx, (%rsi,%rdi,8)
	incq	%rdi
	cmpq	%rdi, %r8
	jne	LBB0_14
LBB0_15:
	testq	%rax, %rax
	jns	LBB0_17
## %bb.16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_17:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPIGENIOC_TRANSFER,4,2         ## @SPIGENIOC_TRANSFER
	.comm	_reversebits,8,3                ## @reversebits
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error performing SPI transaction, errno=%d\n"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	__read_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _read_write
__read_write:                           ; @_read_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	w3, LBB0_3
; %bb.1:
	mov	x22, x4
	mov	x21, x3
	mov	x19, x2
	mov	x20, x0
	cbz	x2, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x2, x21
	bl	_memcpy
	b	LBB0_5
LBB0_3:
	mov	w20, #0
	b	LBB0_12
LBB0_4:
	mov	x19, x1
LBB0_5:
	mov	x0, sp
	mov	w1, #16
	bl	_bzero
	str	x19, [sp, #8]
	str	w21, [sp]
Lloh0:
	adrp	x8, _SPIGENIOC_TRANSFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPIGENIOC_TRANSFER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x20
	bl	_ioctl
	asr	x20, x0, #63
	cbz	w22, LBB0_10
; %bb.6:
	tbnz	x0, #63, LBB0_10
; %bb.7:
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.8:
Lloh3:
	adrp	x8, _reversebits@GOTPAGE
Lloh4:
	ldr	x8, [x8, _reversebits@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	w9, w21
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19]
	ldr	x10, [x8, x10, lsl #3]
	str	x10, [x19], #8
	subs	x9, x9, #1
	b.ne	LBB0_9
LBB0_10:
	tbz	x0, #63, LBB0_12
; %bb.11:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SPIGENIOC_TRANSFER,4,2         ; @SPIGENIOC_TRANSFER
	.comm	_reversebits,8,3                ; @reversebits
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error performing SPI transaction, errno=%d\n"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	__read_write
.subsections_via_symbols
