	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gbe_port_reset
_gbe_port_reset:                        ## @gbe_port_reset
	.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, %rbx
	movq	_SOFT_RESET@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_emac_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_soft_reset@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_GBE_REG_ADDR
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_writel
	movq	_DEVICE_EMACSL_RESET_POLL_COUNT@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jle	LBB0_5
## %bb.1:
	movq	_SOFT_RESET_MASK@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_emac_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_GBE_REG_ADDR
	movl	%eax, %edi
	callq	_readl
	andq	(%r15), %rax
	movq	_SOFT_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	cmpq	(%r14), %r12
	jl	LBB0_3
LBB0_5:
	movq	_GMACSL_RET_WARN_RESET_INCOMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOFT_RESET,8,3                 ## @SOFT_RESET
	.comm	_emac_regs,4,2                  ## @emac_regs
	.comm	_soft_reset,4,2                 ## @soft_reset
	.comm	_DEVICE_EMACSL_RESET_POLL_COUNT,8,3 ## @DEVICE_EMACSL_RESET_POLL_COUNT
	.comm	_SOFT_RESET_MASK,8,3            ## @SOFT_RESET_MASK
	.comm	_GMACSL_RET_WARN_RESET_INCOMPLETE,4,2 ## @GMACSL_RET_WARN_RESET_INCOMPLETE
	.no_dead_strip	_gbe_port_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gbe_port_reset
_gbe_port_reset:                        ; @gbe_port_reset
	.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	x19, x0
Lloh0:
	adrp	x21, _SOFT_RESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SOFT_RESET@GOTPAGEOFF]
	ldr	x20, [x21]
Lloh2:
	adrp	x22, _emac_regs@GOTPAGE
Lloh3:
	ldr	x22, [x22, _emac_regs@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh4:
	adrp	x23, _soft_reset@GOTPAGE
Lloh5:
	ldr	x23, [x23, _soft_reset@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_GBE_REG_ADDR
	mov	x1, x0
	mov	x0, x20
	bl	_writel
Lloh6:
	adrp	x20, _DEVICE_EMACSL_RESET_POLL_COUNT@GOTPAGE
Lloh7:
	ldr	x20, [x20, _DEVICE_EMACSL_RESET_POLL_COUNT@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x24, #0
Lloh8:
	adrp	x25, _SOFT_RESET_MASK@GOTPAGE
Lloh9:
	ldr	x25, [x25, _SOFT_RESET_MASK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_GBE_REG_ADDR
	bl	_readl
	ldr	x8, [x25]
	and	x8, x8, x0
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldr	x8, [x20]
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_4:
Lloh10:
	adrp	x8, _GMACSL_RET_WARN_RESET_INCOMPLETE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GMACSL_RET_WARN_RESET_INCOMPLETE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SOFT_RESET,8,3                 ; @SOFT_RESET
	.comm	_emac_regs,4,2                  ; @emac_regs
	.comm	_soft_reset,4,2                 ; @soft_reset
	.comm	_DEVICE_EMACSL_RESET_POLL_COUNT,8,3 ; @DEVICE_EMACSL_RESET_POLL_COUNT
	.comm	_SOFT_RESET_MASK,8,3            ; @SOFT_RESET_MASK
	.comm	_GMACSL_RET_WARN_RESET_INCOMPLETE,4,2 ; @GMACSL_RET_WARN_RESET_INCOMPLETE
	.no_dead_strip	_gbe_port_reset
.subsections_via_symbols
