	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netsec_start_gmac
_netsec_start_gmac:                     ## @netsec_start_gmac
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movl	$0, -28(%rbp)
	movq	(%rax), %rax
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_NETSEC_GMAC_MCR_REG_CST@GOTPCREL(%rip), %rax
	movq	_NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
LBB0_2:
	movq	_GMAC_REG_MCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_netsec_mac_write
	testq	%rax, %rax
	jne	LBB0_17
## %bb.3:
	movq	_GMAC_REG_BMR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_NETSEC_GMAC_BMR_REG_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_netsec_mac_write
	testq	%rax, %rax
	je	LBB0_4
LBB0_17:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_18:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_usleep_range
	movl	(%r14), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_netsec_mac_read
	testl	%eax, %eax
	jne	LBB0_19
## %bb.5:
	movq	_NETSEC_GMAC_BMR_REG_SWR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -28(%rbp)
	je	LBB0_7
## %bb.6:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_7:
	movq	_MAC_REG_DESC_SOFT_RST@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_netsec_write
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_netsec_wait_while_busy
	testq	%rax, %rax
	jne	LBB0_17
## %bb.8:
	movq	_MAC_REG_DESC_INIT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_netsec_write
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_netsec_wait_while_busy
	testq	%rax, %rax
	jne	LBB0_17
## %bb.9:
	movl	(%r14), %esi
	movq	_NETSEC_GMAC_BMR_REG_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_netsec_mac_write
	testq	%rax, %rax
	jne	LBB0_17
## %bb.10:
	movq	_GMAC_REG_RDLAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NETSEC_GMAC_RDLAR_REG_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_netsec_mac_write
	testq	%rax, %rax
	jne	LBB0_17
## %bb.11:
	movq	_GMAC_REG_TDLAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NETSEC_GMAC_TDLAR_REG_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_netsec_mac_write
	testq	%rax, %rax
	jne	LBB0_17
## %bb.12:
	movq	_GMAC_REG_MFFR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-2147483647, %edx              ## imm = 0x80000001
	callq	_netsec_mac_write
	testq	%rax, %rax
	jne	LBB0_17
## %bb.13:
	movq	%rbx, %rdi
	callq	_netsec_mac_update_to_phy_state
	testl	%eax, %eax
	jne	LBB0_19
## %bb.14:
	movq	_GMAC_REG_OMR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_netsec_mac_read
	testl	%eax, %eax
	jne	LBB0_19
## %bb.15:
	movq	_NETSEC_GMAC_OMR_REG_SR@GOTPCREL(%rip), %rax
	movl	-28(%rbp), %ecx
	orl	(%rax), %ecx
	movq	_NETSEC_GMAC_OMR_REG_ST@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -28(%rbp)
	movq	_NETSEC_REG_NRM_RX_INTEN_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_netsec_write
	movq	_NETSEC_REG_NRM_TX_INTEN_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_netsec_write
	movq	8(%rbx), %rdi
	movq	%rbx, %rsi
	callq	_netsec_et_set_coalesce
	movl	(%r14), %esi
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_netsec_mac_write
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	xorl	%eax, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_NETSEC_GMAC_MCR_REG_CST,4,2    ## @NETSEC_GMAC_MCR_REG_CST
	.comm	_NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON,4,2 ## @NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON
	.comm	_GMAC_REG_MCR,4,2               ## @GMAC_REG_MCR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_GMAC_REG_BMR,4,2               ## @GMAC_REG_BMR
	.comm	_NETSEC_GMAC_BMR_REG_RESET,4,2  ## @NETSEC_GMAC_BMR_REG_RESET
	.comm	_NETSEC_GMAC_BMR_REG_SWR,4,2    ## @NETSEC_GMAC_BMR_REG_SWR
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_MAC_REG_DESC_SOFT_RST,4,2      ## @MAC_REG_DESC_SOFT_RST
	.comm	_MAC_REG_DESC_INIT,4,2          ## @MAC_REG_DESC_INIT
	.comm	_NETSEC_GMAC_BMR_REG_COMMON,4,2 ## @NETSEC_GMAC_BMR_REG_COMMON
	.comm	_GMAC_REG_RDLAR,4,2             ## @GMAC_REG_RDLAR
	.comm	_NETSEC_GMAC_RDLAR_REG_COMMON,4,2 ## @NETSEC_GMAC_RDLAR_REG_COMMON
	.comm	_GMAC_REG_TDLAR,4,2             ## @GMAC_REG_TDLAR
	.comm	_NETSEC_GMAC_TDLAR_REG_COMMON,4,2 ## @NETSEC_GMAC_TDLAR_REG_COMMON
	.comm	_GMAC_REG_MFFR,4,2              ## @GMAC_REG_MFFR
	.comm	_GMAC_REG_OMR,4,2               ## @GMAC_REG_OMR
	.comm	_NETSEC_GMAC_OMR_REG_SR,4,2     ## @NETSEC_GMAC_OMR_REG_SR
	.comm	_NETSEC_GMAC_OMR_REG_ST,4,2     ## @NETSEC_GMAC_OMR_REG_ST
	.comm	_NETSEC_REG_NRM_RX_INTEN_CLR,4,2 ## @NETSEC_REG_NRM_RX_INTEN_CLR
	.comm	_NETSEC_REG_NRM_TX_INTEN_CLR,4,2 ## @NETSEC_REG_NRM_TX_INTEN_CLR
	.no_dead_strip	_netsec_start_gmac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netsec_start_gmac
_netsec_start_gmac:                     ; @netsec_start_gmac
	.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	w2, #0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	str	wzr, [sp, #12]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _NETSEC_GMAC_MCR_REG_CST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NETSEC_GMAC_MCR_REG_CST@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
LBB0_2:
Lloh9:
	adrp	x8, _GMAC_REG_MCR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GMAC_REG_MCR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_netsec_mac_write
	cbnz	x0, LBB0_4
; %bb.3:
Lloh12:
	adrp	x20, _GMAC_REG_BMR@GOTPAGE
Lloh13:
	ldr	x20, [x20, _GMAC_REG_BMR@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh14:
	adrp	x8, _NETSEC_GMAC_BMR_REG_RESET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NETSEC_GMAC_BMR_REG_RESET@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_netsec_mac_write
	cbz	x0, LBB0_7
LBB0_4:
Lloh17:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	mov	w0, #1000
	mov	w1, #5000
	bl	_usleep_range
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_netsec_mac_read
	cbnz	w0, LBB0_6
; %bb.8:
	ldr	w8, [sp, #12]
Lloh19:
	adrp	x9, _NETSEC_GMAC_BMR_REG_SWR@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NETSEC_GMAC_BMR_REG_SWR@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
Lloh22:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_5
LBB0_10:
Lloh24:
	adrp	x21, _MAC_REG_DESC_SOFT_RST@GOTPAGE
Lloh25:
	ldr	x21, [x21, _MAC_REG_DESC_SOFT_RST@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_netsec_write
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_netsec_wait_while_busy
	cbnz	x0, LBB0_4
; %bb.11:
Lloh26:
	adrp	x21, _MAC_REG_DESC_INIT@GOTPAGE
Lloh27:
	ldr	x21, [x21, _MAC_REG_DESC_INIT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_netsec_write
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_netsec_wait_while_busy
	cbnz	x0, LBB0_4
; %bb.12:
	ldr	w1, [x20]
Lloh28:
	adrp	x8, _NETSEC_GMAC_BMR_REG_COMMON@GOTPAGE
Lloh29:
	ldr	x8, [x8, _NETSEC_GMAC_BMR_REG_COMMON@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_netsec_mac_write
	cbnz	x0, LBB0_4
; %bb.13:
Lloh31:
	adrp	x8, _GMAC_REG_RDLAR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _GMAC_REG_RDLAR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _NETSEC_GMAC_RDLAR_REG_COMMON@GOTPAGE
Lloh35:
	ldr	x8, [x8, _NETSEC_GMAC_RDLAR_REG_COMMON@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_netsec_mac_write
	cbnz	x0, LBB0_4
; %bb.14:
Lloh37:
	adrp	x8, _GMAC_REG_TDLAR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _GMAC_REG_TDLAR@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x8, _NETSEC_GMAC_TDLAR_REG_COMMON@GOTPAGE
Lloh41:
	ldr	x8, [x8, _NETSEC_GMAC_TDLAR_REG_COMMON@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_netsec_mac_write
	cbnz	x0, LBB0_4
; %bb.15:
Lloh43:
	adrp	x8, _GMAC_REG_MFFR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _GMAC_REG_MFFR@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-2147483647
	bl	_netsec_mac_write
	cbnz	x0, LBB0_4
; %bb.16:
	mov	x0, x19
	bl	_netsec_mac_update_to_phy_state
	cbnz	w0, LBB0_6
; %bb.17:
Lloh46:
	adrp	x20, _GMAC_REG_OMR@GOTPAGE
Lloh47:
	ldr	x20, [x20, _GMAC_REG_OMR@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_netsec_mac_read
	cbnz	w0, LBB0_6
; %bb.18:
Lloh48:
	adrp	x8, _NETSEC_GMAC_OMR_REG_SR@GOTPAGE
Lloh49:
	ldr	x8, [x8, _NETSEC_GMAC_OMR_REG_SR@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
Lloh51:
	adrp	x9, _NETSEC_GMAC_OMR_REG_ST@GOTPAGE
Lloh52:
	ldr	x9, [x9, _NETSEC_GMAC_OMR_REG_ST@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #12]
Lloh54:
	adrp	x8, _NETSEC_REG_NRM_RX_INTEN_CLR@GOTPAGE
Lloh55:
	ldr	x8, [x8, _NETSEC_REG_NRM_RX_INTEN_CLR@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_netsec_write
Lloh57:
	adrp	x8, _NETSEC_REG_NRM_TX_INTEN_CLR@GOTPAGE
Lloh58:
	ldr	x8, [x8, _NETSEC_REG_NRM_TX_INTEN_CLR@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_netsec_write
	ldr	x0, [x19, #8]
	mov	x1, x19
	bl	_netsec_et_set_coalesce
	ldr	w1, [x20]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_netsec_mac_write
	cbnz	x0, LBB0_4
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_NETSEC_GMAC_MCR_REG_CST,4,2    ; @NETSEC_GMAC_MCR_REG_CST
	.comm	_NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON,4,2 ; @NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON
	.comm	_GMAC_REG_MCR,4,2               ; @GMAC_REG_MCR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_GMAC_REG_BMR,4,2               ; @GMAC_REG_BMR
	.comm	_NETSEC_GMAC_BMR_REG_RESET,4,2  ; @NETSEC_GMAC_BMR_REG_RESET
	.comm	_NETSEC_GMAC_BMR_REG_SWR,4,2    ; @NETSEC_GMAC_BMR_REG_SWR
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_MAC_REG_DESC_SOFT_RST,4,2      ; @MAC_REG_DESC_SOFT_RST
	.comm	_MAC_REG_DESC_INIT,4,2          ; @MAC_REG_DESC_INIT
	.comm	_NETSEC_GMAC_BMR_REG_COMMON,4,2 ; @NETSEC_GMAC_BMR_REG_COMMON
	.comm	_GMAC_REG_RDLAR,4,2             ; @GMAC_REG_RDLAR
	.comm	_NETSEC_GMAC_RDLAR_REG_COMMON,4,2 ; @NETSEC_GMAC_RDLAR_REG_COMMON
	.comm	_GMAC_REG_TDLAR,4,2             ; @GMAC_REG_TDLAR
	.comm	_NETSEC_GMAC_TDLAR_REG_COMMON,4,2 ; @NETSEC_GMAC_TDLAR_REG_COMMON
	.comm	_GMAC_REG_MFFR,4,2              ; @GMAC_REG_MFFR
	.comm	_GMAC_REG_OMR,4,2               ; @GMAC_REG_OMR
	.comm	_NETSEC_GMAC_OMR_REG_SR,4,2     ; @NETSEC_GMAC_OMR_REG_SR
	.comm	_NETSEC_GMAC_OMR_REG_ST,4,2     ; @NETSEC_GMAC_OMR_REG_ST
	.comm	_NETSEC_REG_NRM_RX_INTEN_CLR,4,2 ; @NETSEC_REG_NRM_RX_INTEN_CLR
	.comm	_NETSEC_REG_NRM_TX_INTEN_CLR,4,2 ; @NETSEC_REG_NRM_TX_INTEN_CLR
	.no_dead_strip	_netsec_start_gmac
.subsections_via_symbols
