	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1e_set_eeprom
_atl1e_set_eeprom:                      ## @atl1e_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r13
	callq	_netdev_priv
	movl	8(%r13), %r12d
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.1:
	movq	%rax, %r15
	movl	4(%rax), %eax
	shll	$16, %eax
	orl	(%r15), %eax
	cmpl	%eax, (%r13)
	jne	LBB0_10
## %bb.2:
	movl	4(%r13), %r14d
	movq	_AT_EEPROM_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %ebx
	movq	%rax, %rdi
	testb	$3, %bl
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.4:
	movl	%r14d, %esi
	andl	$-4, %esi
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_atl1e_read_eeprom
	testl	%eax, %eax
	je	LBB0_14
## %bb.5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	4(%rax), %rdi
	movl	4(%r13), %ebx
LBB0_6:
	movl	%r14d, %ecx
	sarl	$2, %r14d
	leal	(%r12,%rcx), %esi
	decl	%esi
	movl	%esi, %r12d
	sarl	$2, %r12d
	movl	8(%r13), %edx
	addl	%edx, %ebx
	testb	$3, %bl
	je	LBB0_15
## %bb.7:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	andl	$-4, %esi
	movl	%r12d, %ebx
	subl	%r14d, %ebx
	movslq	%ebx, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdx
	movq	%r15, %rdi
	callq	_atl1e_read_eeprom
	testl	%eax, %eax
	je	LBB0_14
## %bb.8:
	movl	8(%r13), %edx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_9:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_15:
	movl	%r12d, %ebx
	subl	%r14d, %ebx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_16:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	testl	%ebx, %ebx
	js	LBB0_21
## %bb.17:
	subl	%r14d, %r12d
	incl	%r12d
	shll	$2, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_atl1e_write_eeprom
	testl	%eax, %eax
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	addl	$4, %r14d
	cmpq	%rbx, %r12
	jne	LBB0_18
LBB0_21:
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_22:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_23:
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AT_EEPROM_LEN,4,2              ## @AT_EEPROM_LEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_atl1e_set_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1e_set_eeprom
_atl1e_set_eeprom:                      ; @atl1e_set_eeprom
	.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	x21, x2
	mov	x22, x1
	bl	_netdev_priv
	ldr	w24, [x22, #8]
	cbz	w24, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w8, [x22]
	ldp	w9, w10, [x0]
	orr	w9, w9, w10, lsl #16
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.2:
	ldr	w26, [x22, #4]
Lloh0:
	adrp	x8, _AT_EEPROM_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AT_EEPROM_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x19, x0
	ldr	w8, [x22, #4]
	tst	w8, #0x3
	b.eq	LBB0_11
; %bb.4:
	and	w1, w26, #0xfffffffc
	mov	x0, x20
	mov	x2, x19
	bl	_atl1e_read_eeprom
	cbz	w0, LBB0_21
; %bb.5:
	add	x23, x19, #4
	ldr	w8, [x22, #4]
	b	LBB0_12
LBB0_6:
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x20
	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
	ret
LBB0_11:
	mov	x23, x19
LBB0_12:
	asr	w25, w26, #2
	add	w9, w24, w26
	sub	w9, w9, #1
	asr	w24, w9, #2
	ldr	w2, [x22, #8]
	add	w8, w2, w8
	tst	w8, #0x3
	b.eq	LBB0_15
; %bb.13:
	and	w1, w9, #0xfffffffc
	sub	w26, w24, w25
	add	x2, x19, w26, sxtw #2
	mov	x0, x20
	bl	_atl1e_read_eeprom
	cbz	w0, LBB0_21
; %bb.14:
	ldr	w2, [x22, #8]
	b	LBB0_16
LBB0_15:
	sub	w26, w24, w25
LBB0_16:
	mov	x0, x23
	mov	x1, x21
	bl	_memcpy
	tbnz	w26, #31, LBB0_20
; %bb.17:
	sub	w8, w24, w25
	add	w22, w8, #1
	lsl	w21, w25, #2
	mov	x23, x19
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x21
	bl	_atl1e_write_eeprom
	cbz	w0, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	add	w21, w21, #4
	add	x23, x23, #4
	subs	x22, x22, #1
	b.ne	LBB0_18
LBB0_20:
	mov	w20, #0
	b	LBB0_22
LBB0_21:
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_22:
	mov	x0, x19
	bl	_kfree
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AT_EEPROM_LEN,4,2              ; @AT_EEPROM_LEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_atl1e_set_eeprom
.subsections_via_symbols
