	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_get_eeprom
_niu_get_eeprom:                        ## @niu_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	callq	_netdev_priv
	movq	8(%rbx), %r13
	testq	%r13, %r13
	js	LBB0_1
## %bb.2:
	movq	(%rbx), %r12
	movq	(%rax), %rcx
	movq	%rcx, %rax
	subq	%r12, %rax
	jle	LBB0_1
## %bb.3:
	leaq	(%r12,%r13), %rdx
	cmpq	%rcx, %rdx
	jle	LBB0_5
## %bb.4:
	movq	%rax, 8(%rbx)
	movq	%rax, %r13
LBB0_5:
	movq	%r12, %r14
	andq	$3, %r14
	je	LBB0_7
## %bb.6:
	movl	$4, %ebx
	subq	%r14, %rbx
	cmpq	%r13, %rbx
	cmovgeq	%r13, %rbx
	movq	%r12, %rax
	andq	$-4, %rax
	leaq	3(%rax), %rdi
	testq	%rax, %rax
	cmovnsq	%rax, %rdi
	sarq	$2, %rdi
	callq	_ESPC_NCR
	movl	%eax, %edi
	callq	_nr64
	movq	%rax, -48(%rbp)
	leaq	(%r14,%rbp), %rsi
	addq	$-48, %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_memcpy
	leaq	(%r15,%rbx,4), %r15
	subq	%rbx, %r13
	addq	%rbx, %r12
LBB0_7:
	cmpq	$4, %r13
	jl	LBB0_8
## %bb.9:
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leaq	3(%r12), %rdi
	testq	%r12, %r12
	cmovnsq	%r12, %rdi
	sarq	$2, %rdi
	callq	_ESPC_NCR
	movl	%eax, %edi
	callq	_nr64
	movq	%rax, -48(%rbp)
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	xorl	%eax, %eax
	callq	_memcpy
	addq	$16, %r15
	leaq	-4(%r13), %rbx
	addq	$4, %r12
	cmpq	$7, %r13
	movq	%rbx, %r13
	ja	LBB0_10
## %bb.11:
	testq	%rbx, %rbx
	je	LBB0_12
LBB0_13:
	leaq	3(%r12), %rdi
	testq	%r12, %r12
	cmovnsq	%r12, %rdi
	sarq	$2, %rdi
	callq	_ESPC_NCR
	movl	%eax, %edi
	callq	_nr64
	movq	%rax, -48(%rbp)
	xorl	%r14d, %r14d
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_memcpy
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r13, %rbx
	testq	%rbx, %rbx
	jne	LBB0_13
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_niu_get_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_get_eeprom
_niu_get_eeprom:                        ; @niu_get_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x2
	mov	x20, x1
	bl	_netdev_priv
	ldr	x22, [x20, #8]
	tbnz	x22, #63, LBB0_12
; %bb.1:
	ldr	x21, [x20]
	ldr	x9, [x0]
	subs	x8, x9, x21
	b.le	LBB0_12
; %bb.2:
	add	x10, x22, x21
	cmp	x10, x9
	b.le	LBB0_4
; %bb.3:
	str	x8, [x20, #8]
	mov	x22, x8
LBB0_4:
	ands	x20, x21, #0x3
	b.eq	LBB0_6
; %bb.5:
	mov	w8, #4
	sub	x8, x8, x20
	cmp	x8, x22
	csel	x23, x8, x22, lt
	ands	x8, x21, #0xfffffffffffffffc
	orr	x9, x8, #0x3
	csel	x8, x9, x8, lt
	asr	x0, x8, #2
	bl	_ESPC_NCR
	bl	_nr64
	str	x0, [sp, #24]
	add	x8, sp, #24
	orr	x8, x8, x20
	stp	x8, x23, [sp]
	mov	x0, x19
	bl	_memcpy
	add	x19, x19, x23, lsl #2
	sub	x22, x22, x23
	add	x21, x23, x21
LBB0_6:
	cmp	x22, #4
	b.lt	LBB0_14
; %bb.7:
	mov	w20, #4
	add	x23, sp, #24
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x21, #3
	cmp	x21, #0
	csel	x8, x8, x21, lt
	asr	x0, x8, #2
	bl	_ESPC_NCR
	bl	_nr64
	str	x0, [sp, #24]
	stp	x23, x20, [sp]
	mov	x0, x19
	bl	_memcpy
	add	x19, x19, #16
	sub	x24, x22, #4
	add	x21, x21, #4
	cmp	x22, #7
	mov	x22, x24
	b.hi	LBB0_8
; %bb.9:
	cbz	x24, LBB0_11
LBB0_10:
	add	x8, x21, #3
	cmp	x21, #0
	csel	x8, x8, x21, lt
	asr	x0, x8, #2
	bl	_ESPC_NCR
	bl	_nr64
	str	x0, [sp, #24]
	add	x8, sp, #24
	stp	x8, x24, [sp]
	mov	x0, x19
	bl	_memcpy
LBB0_11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	add	sp, sp, #96
	ret
LBB0_14:
	mov	x24, x22
	cbnz	x24, LBB0_10
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_niu_get_eeprom
.subsections_via_symbols
