	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lbs_ethtool_get_eeprom
_lbs_ethtool_get_eeprom:                ## @lbs_ethtool_get_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rax
	movq	8(%rsi), %rdi
	movq	(%rsi), %rcx
	addq	%rdi, %rcx
	movq	_LBS_EEPROM_LEN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jg	LBB0_2
## %bb.1:
	movq	_LBS_EEPROM_READ_LEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rdi
	jle	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %rbx
	movq	(%rax), %r15
	subl	%ecx, %edi
	addl	$40, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	%rax, -32(%rbp)
	movq	_CMD_ACT_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -40(%rbp)
	movl	(%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -48(%rbp)
	movl	8(%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	_CMD_802_11_EEPROM_ACCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	callq	_lbs_cmd_with_response
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	-64(%rbp), %esi
	movl	8(%rbx), %edx
	movq	%r14, %rdi
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_LBS_EEPROM_LEN,8,3             ## @LBS_EEPROM_LEN
	.comm	_LBS_EEPROM_READ_LEN,4,2        ## @LBS_EEPROM_READ_LEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CMD_ACT_GET,4,2                ## @CMD_ACT_GET
	.comm	_CMD_802_11_EEPROM_ACCESS,4,2   ## @CMD_802_11_EEPROM_ACCESS
	.no_dead_strip	_lbs_ethtool_get_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lbs_ethtool_get_eeprom
_lbs_ethtool_get_eeprom:                ; @lbs_ethtool_get_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	ldp	x9, x8, [x1]
Lloh0:
	adrp	x10, _LBS_EEPROM_LEN@GOTPAGE
Lloh1:
	ldr	x10, [x10, _LBS_EEPROM_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	add	x9, x8, x9
	cmp	x9, x10
	b.gt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _LBS_EEPROM_READ_LEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LBS_EEPROM_READ_LEN@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #96
	ret
LBB0_4:
	mov	x19, x2
	mov	x20, x1
	ldr	x21, [x0]
	sub	w8, w8, w9
	add	w0, w8, #40
	bl	_cpu_to_le16
	str	x0, [sp, #40]
Lloh9:
	adrp	x8, _CMD_ACT_GET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CMD_ACT_GET@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [sp, #32]
	ldr	w0, [x20]
	bl	_cpu_to_le16
	str	x0, [sp, #24]
	ldr	w0, [x20, #8]
	bl	_cpu_to_le16
	str	x0, [sp, #16]
Lloh12:
	adrp	x8, _CMD_802_11_EEPROM_ACCESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CMD_802_11_EEPROM_ACCESS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	bl	_lbs_cmd_with_response
	cbnz	w0, LBB0_3
; %bb.5:
	ldr	w1, [sp, #8]
	ldr	w2, [x20, #8]
	mov	x0, x19
	bl	_memcpy
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LBS_EEPROM_LEN,8,3             ; @LBS_EEPROM_LEN
	.comm	_LBS_EEPROM_READ_LEN,4,2        ; @LBS_EEPROM_READ_LEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CMD_ACT_GET,4,2                ; @CMD_ACT_GET
	.comm	_CMD_802_11_EEPROM_ACCESS,4,2   ; @CMD_802_11_EEPROM_ACCESS
	.no_dead_strip	_lbs_ethtool_get_eeprom
.subsections_via_symbols
