	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_set_eeprom
_e1000_set_eeprom:                      ## @e1000_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	%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	%rdx, %r14
	movq	%rsi, %r13
	callq	_netdev_priv
	movl	8(%r13), %ebx
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movl	4(%rax), %eax
	shll	$16, %eax
	orl	(%r12), %eax
	cmpl	%eax, (%r13)
	jne	LBB0_4
## %bb.5:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %edi
	addl	%edi, %edi
	movl	4(%r13), %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movl	%r14d, %eax
	sarl	%r14d
	addl	%eax, %ebx
	decl	%ebx
	sarl	%ebx
	movl	4(%r13), %eax
	testb	$1, %al
	jne	LBB0_9
## %bb.8:
	movb	$1, %cl
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	movq	%r15, %rcx
	callq	_e1000_read_eeprom
	leaq	1(%r15), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	sete	%cl
	movl	4(%r13), %eax
LBB0_10:
	addl	8(%r13), %eax
	movl	%ebx, %edx
	subl	%r14d, %edx
	testb	$1, %al
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_13
## %bb.11:
	testb	%cl, %cl
	je	LBB0_13
## %bb.12:
	movslq	%edx, %rax
	leaq	(%r15,%rax,4), %rcx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_e1000_read_eeprom
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
LBB0_13:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	testl	%edx, %edx
	js	LBB0_14
## %bb.15:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leal	1(%rdx), %r14d
	movq	%r14, %r12
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_le16_to_cpus
	addq	$4, %rbx
	decq	%r12
	jne	LBB0_16
## %bb.17:
	movl	8(%r13), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	xorl	%ebx, %ebx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,4), %edi
	callq	_cpu_to_le16
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_18
	jmp	LBB0_19
LBB0_14:
	movl	8(%r13), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
LBB0_19:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	incl	%edx
	movq	%r12, %rdi
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r15, %rcx
	callq	_e1000_write_eeprom
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.20:
	movq	_EEPROM_CHECKSUM_REG@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jg	LBB0_22
## %bb.21:
	movq	%r12, %rdi
	callq	_e1000_update_eeprom_checksum
LBB0_22:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EEPROM_CHECKSUM_REG,4,2        ## @EEPROM_CHECKSUM_REG
	.no_dead_strip	_e1000_set_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_set_eeprom
_e1000_set_eeprom:                      ; @e1000_set_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	x22, x2
	mov	x23, x1
	bl	_netdev_priv
	ldr	w24, [x23, #8]
	cbz	w24, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w8, [x23]
	ldp	w9, w10, [x0]
	orr	w9, w9, w10, lsl #16
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [x19, #8]
	lsl	w0, w8, #1
	ldr	w25, [x23, #4]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x20, x0
	asr	w21, w25, #1
	add	w8, w24, w25
	sub	w8, w8, #1
	asr	w25, w8, #1
	ldr	w9, [x23, #4]
	tbnz	w9, #0, LBB0_10
; %bb.4:
	mov	w8, #1
	mov	x24, x20
	b	LBB0_11
LBB0_5:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _EFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	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
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	mov	x3, x20
	bl	_e1000_read_eeprom
	add	x24, x20, #1
	cmp	w0, #0
	cset	w8, eq
	ldr	w9, [x23, #4]
LBB0_11:
	ldr	w10, [x23, #8]
	add	w9, w10, w9
	sub	w26, w25, w21
	tbz	w9, #0, LBB0_14
; %bb.12:
	cbz	w8, LBB0_14
; %bb.13:
	add	x3, x20, w26, sxtw #2
	mov	x0, x19
	mov	x1, x25
	mov	w2, #1
	bl	_e1000_read_eeprom
LBB0_14:
	tbnz	w26, #31, LBB0_19
; %bb.15:
	add	w27, w26, #1
	mov	x28, x27
	mov	x25, x20
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	_le16_to_cpus
	add	x25, x25, #4
	subs	x28, x28, #1
	b.ne	LBB0_16
; %bb.17:
	ldr	w2, [x23, #8]
	mov	x0, x24
	mov	x1, x22
	bl	_memcpy
	mov	x22, x20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_cpu_to_le16
	str	w0, [x22], #4
	subs	x27, x27, #1
	b.ne	LBB0_18
	b	LBB0_20
LBB0_19:
	ldr	w2, [x23, #8]
	mov	x0, x24
	mov	x1, x22
	bl	_memcpy
LBB0_20:
	add	w2, w26, #1
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_e1000_write_eeprom
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.21:
Lloh9:
	adrp	x8, _EEPROM_CHECKSUM_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EEPROM_CHECKSUM_REG@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w21, w8
	b.gt	LBB0_23
; %bb.22:
	mov	x0, x19
	bl	_e1000_update_eeprom_checksum
LBB0_23:
	mov	x0, x20
	bl	_kfree
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EEPROM_CHECKSUM_REG,4,2        ; @EEPROM_CHECKSUM_REG
	.no_dead_strip	_e1000_set_eeprom
.subsections_via_symbols
