	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc18xx_eeprom_gather_write
_lpc18xx_eeprom_gather_write:           ## @lpc18xx_eeprom_gather_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	(%rdi), %eax
	movq	_LPC18XX_EEPROM_PAGE_SIZE@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	cmpl	%esi, %eax
	jb	LBB0_2
## %bb.1:
	movl	%esi, %ebx
	movl	%esi, %ecx
	addq	%r15, %rcx
	cmpq	%rax, %rcx
	ja	LBB0_2
## %bb.3:
	movq	%rdx, %r12
	movq	%rdi, %r14
	movq	_LPC18XX_EEPROM_PWRDWN@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_LPC18XX_EEPROM_PWRDWN_NO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lpc18xx_eeprom_writel
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	testq	%r15, %r15
	je	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	%ebx, %esi
	addq	16(%r14), %rsi
	callq	_writel
	movq	%r14, %rdi
	callq	_lpc18xx_eeprom_busywait_until_prog
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r14), %rax
	addq	%rax, %r12
	addl	%eax, %ebx
	subq	%rax, %r15
	jne	LBB0_4
LBB0_6:
	movl	(%r13), %esi
	movq	_LPC18XX_EEPROM_PWRDWN_YES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_lpc18xx_eeprom_writel
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LPC18XX_EEPROM_PAGE_SIZE,4,2   ## @LPC18XX_EEPROM_PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LPC18XX_EEPROM_PWRDWN,4,2      ## @LPC18XX_EEPROM_PWRDWN
	.comm	_LPC18XX_EEPROM_PWRDWN_NO,4,2   ## @LPC18XX_EEPROM_PWRDWN_NO
	.comm	_LPC18XX_EEPROM_PWRDWN_YES,4,2  ## @LPC18XX_EEPROM_PWRDWN_YES
	.no_dead_strip	_lpc18xx_eeprom_gather_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc18xx_eeprom_gather_write
_lpc18xx_eeprom_gather_write:           ; @lpc18xx_eeprom_gather_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _LPC18XX_EEPROM_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LPC18XX_EEPROM_PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x0]
Lloh2:
	ldr	w8, [x8]
	add	x10, x3, w1, uxtw
	sub	w8, w9, w8
	cmp	w8, w1
	ccmp	x10, x8, #2, hs
	b.ls	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh6:
	adrp	x23, _LPC18XX_EEPROM_PWRDWN@GOTPAGE
Lloh7:
	ldr	x23, [x23, _LPC18XX_EEPROM_PWRDWN@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh8:
	adrp	x8, _LPC18XX_EEPROM_PWRDWN_NO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LPC18XX_EEPROM_PWRDWN_NO@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_lpc18xx_eeprom_writel
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	cbz	x20, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	x8, [x19, #16]
	add	x1, x8, w22, uxtw
	bl	_writel
	mov	x0, x19
	bl	_lpc18xx_eeprom_busywait_until_prog
	tbnz	w0, #31, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	add	x21, x21, x8
	add	w22, w22, w8
	subs	x20, x20, x8
	b.ne	LBB0_3
LBB0_5:
	ldr	w1, [x23]
Lloh11:
	adrp	x8, _LPC18XX_EEPROM_PWRDWN_YES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LPC18XX_EEPROM_PWRDWN_YES@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_lpc18xx_eeprom_writel
	mov	w0, #0
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_LPC18XX_EEPROM_PAGE_SIZE,4,2   ; @LPC18XX_EEPROM_PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LPC18XX_EEPROM_PWRDWN,4,2      ; @LPC18XX_EEPROM_PWRDWN
	.comm	_LPC18XX_EEPROM_PWRDWN_NO,4,2   ; @LPC18XX_EEPROM_PWRDWN_NO
	.comm	_LPC18XX_EEPROM_PWRDWN_YES,4,2  ; @LPC18XX_EEPROM_PWRDWN_YES
	.no_dead_strip	_lpc18xx_eeprom_gather_write
.subsections_via_symbols
