	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smc_ethtool_geteeprom
_smc_ethtool_geteeprom:                 ## @smc_ethtool_geteeprom
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	(%rsi), %ecx
	movl	4(%rsi), %r8d
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	movl	$1, %edi
	movq	%r15, %rsi
	movl	%r8d, %r9d
	xorl	%eax, %eax
	callq	_DBG
	movq	%r15, %rdi
	callq	_smc_ethtool_geteeprom_len
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%r13)
	jle	LBB0_7
## %bb.1:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r13), %r12d
	addq	%r14, %r12
	cmpl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	jg	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	sarl	%r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	leaq	-44(%rbp), %rdx
	callq	_smc_read_eeprom_word
	testl	%eax, %eax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %ecx
	xorl	%ebx, %ebx
	movl	$2, %edi
	movq	%r15, %rsi
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_DBG
	movl	-44(%rbp), %eax
	movzbl	%ah, %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx,%r14,4)
	movzbl	%al, %eax
	movl	%eax, 4(%rdx,%r14,4)
	addq	$2, %r14
	cmpl	%r14d, (%r13)
	jg	LBB0_2
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	movl	%eax, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reading %d bytes at %d(0x%x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Read 0x%x from 0x%x\n"

	.no_dead_strip	_smc_ethtool_geteeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smc_ethtool_geteeprom
_smc_ethtool_geteeprom:                 ; @smc_ethtool_geteeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldp	w3, w4, [x1]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	str	x4, [sp]
	mov	w0, #1
	mov	x1, x21
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_DBG
	mov	x0, x21
	bl	_smc_ethtool_geteeprom_len
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, x0
	mov	x25, #0
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, #4]
	add	x8, x25, x8
	cmp	w8, w22
	b.gt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	asr	w24, w8, #1
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x24
	bl	_smc_read_eeprom_word
	cbnz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w3, [sp, #12]
	mov	w0, #2
	mov	x1, x21
	mov	x2, x23
	mov	x4, x24
	bl	_DBG
	ldr	w8, [sp, #12]
	ubfx	w9, w8, #8, #8
	add	x10, x19, x25, lsl #2
	and	w8, w8, #0xff
	stp	w9, w8, [x10]
	add	x25, x25, #2
	ldr	w8, [x20]
	cmp	w8, w25
	b.gt	LBB0_2
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reading %d bytes at %d(0x%x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Read 0x%x from 0x%x\n"

	.no_dead_strip	_smc_ethtool_geteeprom
.subsections_via_symbols
