	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan78xx_ethtool_set_eeprom
_lan78xx_ethtool_set_eeprom:            ## @lan78xx_ethtool_set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	callq	_netdev_priv
	movq	%rax, %r15
	movl	(%rax), %edi
	callq	_usb_autopm_get_interface
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	(%r12), %rax
	movq	_LAN78XX_EEPROM_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	8(%r12), %edx
	movl	12(%r12), %esi
	movq	%r15, %rdi
	movq	%r14, %rcx
	callq	_lan78xx_write_raw_eeprom
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_3:
	movq	_LAN78XX_OTP_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.4:
	cmpl	$0, 12(%r12)
	jne	LBB0_9
## %bb.5:
	cmpl	$512, 8(%r12)                   ## imm = 0x200
	jne	LBB0_9
## %bb.6:
	movq	(%r14), %rax
	movq	_OTP_INDICATOR_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$512, %edx                      ## imm = 0x200
	movq	%r14, %rcx
	callq	_lan78xx_write_raw_otp
	jmp	LBB0_8
LBB0_9:
	movl	(%r15), %edi
	callq	_usb_autopm_put_interface
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LAN78XX_EEPROM_MAGIC,8,3       ## @LAN78XX_EEPROM_MAGIC
	.comm	_LAN78XX_OTP_MAGIC,8,3          ## @LAN78XX_OTP_MAGIC
	.comm	_OTP_INDICATOR_1,8,3            ## @OTP_INDICATOR_1
	.no_dead_strip	_lan78xx_ethtool_set_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan78xx_ethtool_set_eeprom
_lan78xx_ethtool_set_eeprom:            ; @lan78xx_ethtool_set_eeprom
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_netdev_priv
	mov	x19, x0
	ldr	w0, [x0]
	bl	_usb_autopm_get_interface
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _LAN78XX_EEPROM_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LAN78XX_EEPROM_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldp	w2, w1, [x21, #8]
	mov	x0, x19
	mov	x3, x20
	bl	_lan78xx_write_raw_eeprom
LBB0_3:
	mov	x22, x0
	b	LBB0_10
LBB0_4:
Lloh3:
	adrp	x9, _LAN78XX_OTP_MAGIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LAN78XX_OTP_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
	ldr	w8, [x21, #12]
	cbnz	w8, LBB0_9
; %bb.6:
	ldr	w8, [x21, #8]
	cmp	w8, #512
	b.ne	LBB0_9
; %bb.7:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _OTP_INDICATOR_1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _OTP_INDICATOR_1@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #512
	mov	x3, x20
	bl	_lan78xx_write_raw_otp
	b	LBB0_3
LBB0_9:
	mov	w22, #0
LBB0_10:
	ldr	w0, [x19]
	bl	_usb_autopm_put_interface
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LAN78XX_EEPROM_MAGIC,8,3       ; @LAN78XX_EEPROM_MAGIC
	.comm	_LAN78XX_OTP_MAGIC,8,3          ; @LAN78XX_OTP_MAGIC
	.comm	_OTP_INDICATOR_1,8,3            ; @OTP_INDICATOR_1
	.no_dead_strip	_lan78xx_ethtool_set_eeprom
.subsections_via_symbols
