	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mchp23k256_read
_mchp23k256_read:                       ## @mchp23k256_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	%r8, -136(%rbp)                 ## 8-byte Spill
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	%rdx, -128(%rbp)                ## 8-byte Spill
	movl	%esi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_to_mchp23k256_flash
	movq	%rax, %rbx
	movq	%rsp, -144(%rbp)                ## 8-byte Spill
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	_MAX_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	leaq	-104(%rbp), %r14
	movq	%r14, %rdi
	callq	_spi_message_init
	leaq	-96(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_MCHP23K256_CMD_READ@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r13)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r13, %rdx
	callq	_mchp23k256_addr2cmd
	movq	%r13, -96(%rbp)
	movq	%rbx, %rdi
	callq	_mchp23k256_cmdsz
	movq	%rax, -88(%rbp)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_spi_message_add_tail
	leaq	-72(%rbp), %rdi
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -56(%rbp)
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -64(%rbp)
	movq	%r14, %rsi
	callq	_spi_message_add_tail
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	4(%rbx), %edi
	movq	%r14, %rsi
	callq	_spi_sync
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	jne	LBB0_4
## %bb.1:
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_4
## %bb.2:
	movslq	-104(%rbp), %rax
	subq	-120(%rbp), %rax                ## 8-byte Folded Reload
	jbe	LBB0_4
## %bb.3:
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	addq	%rax, (%rcx)
LBB0_4:
	movq	-144(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CMD_SIZE,4,2               ## @MAX_CMD_SIZE
	.comm	_MCHP23K256_CMD_READ,1,0        ## @MCHP23K256_CMD_READ
	.no_dead_strip	_mchp23k256_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mchp23k256_read
_mchp23k256_read:                       ; @mchp23k256_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #80
	mov	x22, x4
	mov	x19, x3
	mov	x23, x2
	mov	x24, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_to_mchp23k256_flash
	mov	x21, x0
	mov	x26, sp
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x29, #-128]
	stur	q0, [x29, #-144]
Lloh3:
	adrp	x8, _MAX_CMD_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_CMD_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	x9, x20
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x25, x8, x9
	mov	sp, x25
	sub	x0, x29, #152
	bl	_spi_message_init
	sub	x27, x29, #144
	sub	x0, x29, #144
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh8:
	adrp	x8, _MCHP23K256_CMD_READ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MCHP23K256_CMD_READ@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [x25]
	mov	x0, x21
	mov	x1, x24
	mov	x2, x25
	bl	_mchp23k256_addr2cmd
	stur	x25, [x29, #-144]
	mov	x0, x21
	bl	_mchp23k256_cmdsz
	stur	x0, [x29, #-136]
	sub	x0, x29, #144
	sub	x1, x29, #152
	bl	_spi_message_add_tail
	add	x0, x27, #24
	stp	x23, x22, [x29, #-112]
	sub	x1, x29, #152
	bl	_spi_message_add_tail
	mov	x0, x21
	bl	_mutex_lock
	ldr	w0, [x21, #4]
	sub	x1, x29, #152
	bl	_spi_sync
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbnz	w22, LBB0_4
; %bb.1:
	cbz	x19, LBB0_4
; %bb.2:
	ldursw	x8, [x29, #-152]
	subs	x8, x8, x20
	b.ls	LBB0_4
; %bb.3:
	ldr	x9, [x19]
	add	x8, x8, x9
	str	x8, [x19]
LBB0_4:
	mov	sp, x26
	ldur	x8, [x29, #-88]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x22
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CMD_SIZE,4,2               ; @MAX_CMD_SIZE
	.comm	_MCHP23K256_CMD_READ,1,0        ; @MCHP23K256_CMD_READ
	.no_dead_strip	_mchp23k256_read
.subsections_via_symbols
