	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc95xx_write_eeprom
_smsc95xx_write_eeprom:                 ## @smsc95xx_write_eeprom
	.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, %r14
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r13
	xorl	%edi, %edi
	testq	%r13, %r13
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_BUG_ON
	movq	%r13, %rdi
	callq	_smsc95xx_eeprom_confirm_not_busy
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	_E2P_CMD_BUSY_@GOTPCREL(%rip), %rcx
	movq	_E2P_CMD_EWEN_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%rcx), %edx
	movq	_E2P_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_smsc95xx_write_reg
	movq	%r13, %rdi
	callq	_smsc95xx_wait_eeprom
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	testl	%r12d, %r12d
	jle	LBB0_6
## %bb.3:
	movl	%r12d, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r15,%r12), %ebx
	movl	(%r14,%r12,4), %edx
	movq	_E2P_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_smsc95xx_write_reg
	movq	_E2P_CMD_WRITE_@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_E2P_CMD_BUSY_@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_E2P_CMD_ADDR_@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	orl	%eax, %ebx
	movq	_E2P_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_smsc95xx_write_reg
	movq	%r13, %rdi
	callq	_smsc95xx_wait_eeprom
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	cmpq	%r12, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_4
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E2P_CMD_BUSY_,4,2              ## @E2P_CMD_BUSY_
	.comm	_E2P_CMD_EWEN_,4,2              ## @E2P_CMD_EWEN_
	.comm	_E2P_CMD,4,2                    ## @E2P_CMD
	.comm	_E2P_DATA,4,2                   ## @E2P_DATA
	.comm	_E2P_CMD_WRITE_,4,2             ## @E2P_CMD_WRITE_
	.comm	_E2P_CMD_ADDR_,4,2              ## @E2P_CMD_ADDR_
	.no_dead_strip	_smsc95xx_write_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc95xx_write_eeprom
_smsc95xx_write_eeprom:                 ; @smsc95xx_write_eeprom
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	cmp	x19, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, x21
	bl	_smsc95xx_eeprom_confirm_not_busy
	cbnz	w0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x23, _E2P_CMD_BUSY_@GOTPAGE
Lloh1:
	ldr	x23, [x23, _E2P_CMD_BUSY_@GOTPAGEOFF]
Lloh2:
	adrp	x8, _E2P_CMD_EWEN_@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E2P_CMD_EWEN_@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh4:
	ldr	w8, [x8]
	orr	w2, w8, w9
Lloh5:
	adrp	x24, _E2P_CMD@GOTPAGE
Lloh6:
	ldr	x24, [x24, _E2P_CMD@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_smsc95xx_write_reg
	mov	x0, x21
	bl	_smsc95xx_wait_eeprom
	tbnz	w0, #31, LBB0_7
; %bb.2:
	cmp	w22, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w22, w22
Lloh7:
	adrp	x25, _E2P_DATA@GOTPAGE
Lloh8:
	ldr	x25, [x25, _E2P_DATA@GOTPAGEOFF]
Lloh9:
	adrp	x26, _E2P_CMD_WRITE_@GOTPAGE
Lloh10:
	ldr	x26, [x26, _E2P_CMD_WRITE_@GOTPAGEOFF]
Lloh11:
	adrp	x27, _E2P_CMD_ADDR_@GOTPAGE
Lloh12:
	ldr	x27, [x27, _E2P_CMD_ADDR_@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19]
	ldr	w1, [x25]
	mov	x0, x21
	bl	_smsc95xx_write_reg
	ldr	w8, [x23]
	ldr	w9, [x26]
	orr	w8, w9, w8
	ldr	w9, [x27]
	and	w9, w9, w20
	orr	w2, w8, w9
	ldr	w1, [x24]
	mov	x0, x21
	bl	_smsc95xx_write_reg
	mov	x0, x21
	bl	_smsc95xx_wait_eeprom
	tbnz	w0, #31, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w20, w20, #1
	add	x19, x19, #4
	subs	x22, x22, #1
	b.ne	LBB0_4
LBB0_6:
	mov	w0, #0
LBB0_7:
	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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_E2P_CMD_BUSY_,4,2              ; @E2P_CMD_BUSY_
	.comm	_E2P_CMD_EWEN_,4,2              ; @E2P_CMD_EWEN_
	.comm	_E2P_CMD,4,2                    ; @E2P_CMD
	.comm	_E2P_DATA,4,2                   ; @E2P_DATA
	.comm	_E2P_CMD_WRITE_,4,2             ; @E2P_CMD_WRITE_
	.comm	_E2P_CMD_ADDR_,4,2              ; @E2P_CMD_ADDR_
	.no_dead_strip	_smsc95xx_write_eeprom
.subsections_via_symbols
