	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eeprom_write
_eeprom_write:                          ## @eeprom_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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_EEPROM_ACCESS_ENABLE@GOTPCREL(%rip), %rax
	movq	_EEPROM_CHIP_SELECT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	orl	(%rax), %esi
	callq	_raise_gpio
	movq	_AT93C_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AT93C_WR_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_spi_reg
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_drop_gpio
	movl	$1, %edi
	callq	_udelay
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_raise_gpio
	movq	_AT93C_ERASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_spi_reg
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_drop_gpio
	movl	$1, %edi
	callq	_udelay
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_raise_gpio
	movl	$2, %edi
	callq	_mdelay
	movl	$-7, %r14d
	movq	_EEPROM_DATA_IN@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_mdelay
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_state_gpio
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r14), %eax
	testl	%r14d, %r14d
	movl	%eax, %r14d
	jne	LBB0_1
LBB0_3:
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_drop_gpio
	movl	$1, %edi
	callq	_udelay
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_raise_gpio
	movq	_AT93C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_spi_reg
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_spi_w
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_drop_gpio
	movl	$1, %edi
	callq	_udelay
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_raise_gpio
	movl	$2, %edi
	callq	_mdelay
	movl	$-7, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_mdelay
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_state_gpio
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_4
LBB0_6:
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_drop_gpio
	movl	$1, %edi
	callq	_udelay
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_raise_gpio
	movq	_AT93C_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AT93C_WR_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_spi_reg
	movl	(%r13), %esi
	movq	_EEPROM_ACCESS_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drop_gpio                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EEPROM_ACCESS_ENABLE,4,2       ## @EEPROM_ACCESS_ENABLE
	.comm	_EEPROM_CHIP_SELECT,4,2         ## @EEPROM_CHIP_SELECT
	.comm	_AT93C_CODE,4,2                 ## @AT93C_CODE
	.comm	_AT93C_WR_ON,4,2                ## @AT93C_WR_ON
	.comm	_AT93C_ERASE,4,2                ## @AT93C_ERASE
	.comm	_EEPROM_DATA_IN,4,2             ## @EEPROM_DATA_IN
	.comm	_AT93C_WRITE,4,2                ## @AT93C_WRITE
	.comm	_AT93C_WR_OFF,4,2               ## @AT93C_WR_OFF
	.no_dead_strip	_eeprom_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eeprom_write
_eeprom_write:                          ; @eeprom_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _EEPROM_ACCESS_ENABLE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EEPROM_ACCESS_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x23, _EEPROM_CHIP_SELECT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _EEPROM_CHIP_SELECT@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w1, w9, w8
	bl	_raise_gpio
Lloh4:
	adrp	x24, _AT93C_CODE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AT93C_CODE@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh6:
	adrp	x8, _AT93C_WR_ON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AT93C_WR_ON@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_spi_reg
	ldr	w1, [x23]
	mov	x0, x19
	bl	_drop_gpio
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x23]
	mov	x0, x19
	bl	_raise_gpio
Lloh9:
	adrp	x8, _AT93C_ERASE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AT93C_ERASE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_spi_reg
	ldr	w1, [x23]
	mov	x0, x19
	bl	_drop_gpio
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x23]
	mov	x0, x19
	bl	_raise_gpio
	mov	w0, #2
	bl	_mdelay
	mov	w0, #1
	bl	_mdelay
Lloh12:
	adrp	x25, _EEPROM_DATA_IN@GOTPAGE
Lloh13:
	ldr	x25, [x25, _EEPROM_DATA_IN@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_8
; %bb.1:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_8
; %bb.2:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_8
; %bb.3:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_8
; %bb.4:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_8
; %bb.5:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_8
; %bb.6:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_8
; %bb.7:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
LBB0_8:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_drop_gpio
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x23]
	mov	x0, x19
	bl	_raise_gpio
Lloh14:
	adrp	x8, _AT93C_WRITE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AT93C_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_spi_reg
	mov	x0, x19
	mov	x1, x20
	bl	_spi_w
	ldr	w1, [x23]
	mov	x0, x19
	bl	_drop_gpio
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x23]
	mov	x0, x19
	bl	_raise_gpio
	mov	w0, #2
	bl	_mdelay
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_16
; %bb.9:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_16
; %bb.10:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_16
; %bb.11:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_16
; %bb.12:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_16
; %bb.13:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_16
; %bb.14:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
	cbnz	w0, LBB0_16
; %bb.15:
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_state_gpio
LBB0_16:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_drop_gpio
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x23]
	mov	x0, x19
	bl	_raise_gpio
	ldr	w1, [x24]
Lloh17:
	adrp	x8, _AT93C_WR_OFF@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AT93C_WR_OFF@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_spi_reg
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w1, w9, w8
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_drop_gpio
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EEPROM_ACCESS_ENABLE,4,2       ; @EEPROM_ACCESS_ENABLE
	.comm	_EEPROM_CHIP_SELECT,4,2         ; @EEPROM_CHIP_SELECT
	.comm	_AT93C_CODE,4,2                 ; @AT93C_CODE
	.comm	_AT93C_WR_ON,4,2                ; @AT93C_WR_ON
	.comm	_AT93C_ERASE,4,2                ; @AT93C_ERASE
	.comm	_EEPROM_DATA_IN,4,2             ; @EEPROM_DATA_IN
	.comm	_AT93C_WRITE,4,2                ; @AT93C_WRITE
	.comm	_AT93C_WR_OFF,4,2               ; @AT93C_WR_OFF
	.no_dead_strip	_eeprom_write
.subsections_via_symbols
