	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_mac
_reset_mac:                             ## @reset_mac
	.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	%rdi, %r15
	movl	$8, -44(%rbp)
	movq	_EthCtrl1@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$8, %edx
	callq	_set_register
	movq	_REG_TIMEOUT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_get_registers
	testb	$8, -44(%rbp)
	je	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_3
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
	cmpl	(%r14), %ebx
	je	LBB0_12
	jmp	LBB0_13
LBB0_4:
	movq	_loopback@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
LBB0_11:
	cmpl	(%r14), %ebx
	jne	LBB0_13
LBB0_12:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_18
LBB0_5:
	movq	_mii_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.6:
	movq	_HAS_HOME_PNA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_8
## %bb.7:
	movq	_Gpio1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$52, %edx
	jmp	LBB0_9
LBB0_8:
	movq	_Gpio1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$38, %edx
LBB0_9:
	callq	_set_register
	movq	_Gpio0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	%r15, %rdi
	callq	_set_register
	movl	(%r12), %esi
	movq	_DEFAULT_GPIO_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_set_register
	cmpl	(%r14), %ebx
	je	LBB0_12
LBB0_13:
	movq	_usb_dev_id@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	8(%r15), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_VENDOR_LINKSYS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.14:
	movq	_VENDOR_DLINK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_15:
	movq	_Gpio0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	$36, %edx
	callq	_set_register
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	$38, %edx
	callq	_set_register
	movq	(%r14), %rax
	movq	8(%r15), %rcx
	movq	(%rax,%rcx,8), %rax
LBB0_16:
	movq	_VENDOR_ELCON@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:
	leaq	-48(%rbp), %rbx
	movq	%r15, %rdi
	movl	$3, %esi
	movl	$27, %edx
	movq	%rbx, %rcx
	callq	_read_mii_word
	orb	$4, -48(%rbp)
	movq	%r15, %rdi
	movl	$3, %esi
	movl	$27, %edx
	movq	%rbx, %rcx
	callq	_write_mii_word
LBB0_18:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EthCtrl1,4,2                   ## @EthCtrl1
	.comm	_REG_TIMEOUT,4,2                ## @REG_TIMEOUT
	.comm	_loopback,8,3                   ## @loopback
	.comm	_mii_mode,8,3                   ## @mii_mode
	.comm	_HAS_HOME_PNA,4,2               ## @HAS_HOME_PNA
	.comm	_Gpio1,4,2                      ## @Gpio1
	.comm	_Gpio0,4,2                      ## @Gpio0
	.comm	_DEFAULT_GPIO_SET,4,2           ## @DEFAULT_GPIO_SET
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_usb_dev_id,8,3                 ## @usb_dev_id
	.comm	_VENDOR_LINKSYS,8,3             ## @VENDOR_LINKSYS
	.comm	_VENDOR_DLINK,8,3               ## @VENDOR_DLINK
	.comm	_VENDOR_ELCON,8,3               ## @VENDOR_ELCON
	.no_dead_strip	_reset_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_mac
_reset_mac:                             ; @reset_mac
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	mov	w8, #8
	str	w8, [sp, #12]
Lloh0:
	adrp	x22, _EthCtrl1@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EthCtrl1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #8
	bl	_set_register
Lloh2:
	adrp	x20, _REG_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _REG_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #1
	bl	_get_registers
	ldrb	w8, [sp, #12]
	tbz	w8, #3, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w21, w21, #1
	ldr	w8, [x20]
	cmp	w21, w8
	b.lt	LBB0_2
	b	LBB0_11
LBB0_4:
	mov	w21, #0
	b	LBB0_11
LBB0_5:
Lloh4:
	adrp	x8, _loopback@GOTPAGE
Lloh5:
	ldr	x8, [x8, _loopback@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbnz	x8, LBB0_11
; %bb.6:
Lloh7:
	adrp	x8, _mii_mode@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mii_mode@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _HAS_HOME_PNA@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HAS_HOME_PNA@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh13:
	adrp	x8, _Gpio1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _Gpio1@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #52
	b	LBB0_10
LBB0_9:
Lloh16:
	adrp	x8, _Gpio1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _Gpio1@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #38
LBB0_10:
	bl	_set_register
Lloh19:
	adrp	x22, _Gpio0@GOTPAGE
Lloh20:
	ldr	x22, [x22, _Gpio0@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_set_register
	ldr	w1, [x22]
Lloh21:
	adrp	x8, _DEFAULT_GPIO_SET@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DEFAULT_GPIO_SET@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_set_register
LBB0_11:
	ldr	w8, [x20]
	cmp	w21, w8
	b.ne	LBB0_13
; %bb.12:
Lloh24:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_13:
Lloh27:
	adrp	x20, _usb_dev_id@GOTPAGE
Lloh28:
	ldr	x20, [x20, _usb_dev_id@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
Lloh29:
	adrp	x9, _VENDOR_LINKSYS@GOTPAGE
Lloh30:
	ldr	x9, [x9, _VENDOR_LINKSYS@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
Lloh32:
	adrp	x10, _VENDOR_DLINK@GOTPAGE
Lloh33:
	ldr	x10, [x10, _VENDOR_DLINK@GOTPAGEOFF]
Lloh34:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_15
; %bb.14:
Lloh35:
	adrp	x21, _Gpio0@GOTPAGE
Lloh36:
	ldr	x21, [x21, _Gpio0@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #36
	bl	_set_register
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #38
	bl	_set_register
	ldr	x8, [x20]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
LBB0_15:
Lloh37:
	adrp	x9, _VENDOR_ELCON@GOTPAGE
Lloh38:
	ldr	x9, [x9, _VENDOR_ELCON@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	add	x3, sp, #8
	mov	x0, x19
	mov	w1, #3
	mov	w2, #27
	bl	_read_mii_word
	ldr	w8, [sp, #8]
	orr	w8, w8, #0x4
	str	w8, [sp, #8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w1, #3
	mov	w2, #27
	bl	_write_mii_word
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_EthCtrl1,4,2                   ; @EthCtrl1
	.comm	_REG_TIMEOUT,4,2                ; @REG_TIMEOUT
	.comm	_loopback,8,3                   ; @loopback
	.comm	_mii_mode,8,3                   ; @mii_mode
	.comm	_HAS_HOME_PNA,4,2               ; @HAS_HOME_PNA
	.comm	_Gpio1,4,2                      ; @Gpio1
	.comm	_Gpio0,4,2                      ; @Gpio0
	.comm	_DEFAULT_GPIO_SET,4,2           ; @DEFAULT_GPIO_SET
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_usb_dev_id,8,3                 ; @usb_dev_id
	.comm	_VENDOR_LINKSYS,8,3             ; @VENDOR_LINKSYS
	.comm	_VENDOR_DLINK,8,3               ; @VENDOR_DLINK
	.comm	_VENDOR_ELCON,8,3               ; @VENDOR_ELCON
	.no_dead_strip	_reset_mac
.subsections_via_symbols
