	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rave_sp_eeprom_page_access
_rave_sp_eeprom_page_access:            ## @rave_sp_eeprom_page_access
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %eax
	movl	%esi, %r12d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	_RAVE_SP_EEPROM_PAGE_SIZE@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%eax, %r13d
	movl	%edx, %ebx
	movl	$8, %eax
	subq	%rbx, %rax
	xorl	%edi, %edi
	cmpq	%r8, %rax
	setb	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_2:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	_RAVE_SP_EEPROM_WRITE@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_5
## %bb.3:
	movq	_RAVE_SP_EEPROM_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rcx
	movq	%r13, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_rave_sp_eeprom_io
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	leaq	(,%rbx,4), %rdi
	addq	-56(%rbp), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_memcpy
LBB0_5:
	leaq	-56(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_rave_sp_eeprom_io
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	_RAVE_SP_EEPROM_READ@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	%r12d, (%rax)
	jne	LBB0_8
## %bb.7:
	shlq	$2, %rbx
	addq	-56(%rbp), %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_memcpy
LBB0_8:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RAVE_SP_EEPROM_PAGE_SIZE,4,2   ## @RAVE_SP_EEPROM_PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RAVE_SP_EEPROM_WRITE,4,2       ## @RAVE_SP_EEPROM_WRITE
	.comm	_RAVE_SP_EEPROM_READ,4,2        ## @RAVE_SP_EEPROM_READ
	.no_dead_strip	_rave_sp_eeprom_page_access
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rave_sp_eeprom_page_access
_rave_sp_eeprom_page_access:            ; @rave_sp_eeprom_page_access
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x20, x3
	mov	x21, x1
	mov	x22, x0
	mov	w8, #8
Lloh0:
	adrp	x9, _RAVE_SP_EEPROM_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RAVE_SP_EEPROM_PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	udiv	w23, w2, w9
	msub	w24, w23, w9, w2
	sub	x8, x8, x24
	cmp	x8, x4
	cset	w0, lo
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
Lloh6:
	adrp	x8, _RAVE_SP_EEPROM_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RAVE_SP_EEPROM_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.3:
Lloh9:
	adrp	x8, _RAVE_SP_EEPROM_READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RAVE_SP_EEPROM_READ@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	x0, x22
	mov	x2, x23
	bl	_rave_sp_eeprom_io
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	x8, [sp, #8]
	add	x0, x8, x24, lsl #2
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
LBB0_5:
	add	x3, sp, #8
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_rave_sp_eeprom_io
	cbnz	w0, LBB0_9
; %bb.6:
Lloh12:
	adrp	x8, _RAVE_SP_EEPROM_READ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RAVE_SP_EEPROM_READ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [sp, #8]
	add	x1, x8, x24, lsl #2
	mov	x0, x20
	mov	x2, x19
	bl	_memcpy
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RAVE_SP_EEPROM_PAGE_SIZE,4,2   ; @RAVE_SP_EEPROM_PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RAVE_SP_EEPROM_WRITE,4,2       ; @RAVE_SP_EEPROM_WRITE
	.comm	_RAVE_SP_EEPROM_READ,4,2        ; @RAVE_SP_EEPROM_READ
	.no_dead_strip	_rave_sp_eeprom_page_access
.subsections_via_symbols
