	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netsec_netdev_init
_netsec_netdev_init:                    ## @netsec_netdev_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_netdev_priv
	movq	%rax, %r14
	movq	_DESC_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BUILD_BUG_ON_NOT_POWER_OF_2
	movq	_NETSEC_RING_TX@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_netsec_alloc_dring
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_NETSEC_RING_RX@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_netsec_alloc_dring
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	movq	_MII_BMCR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	callq	_netsec_phy_read
	movq	_BMCR_PDOWN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	movl	(%rbx), %edx
	movl	%eax, %ecx
	callq	_netsec_phy_write
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_netsec_reset_hardware
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_netsec_free_dring
LBB0_5:
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_netsec_free_dring
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%r15), %rdi
	shlq	$2, %rdi
	addq	(%r14), %rdi
	callq	_spin_lock_init
	movq	(%r12), %rdi
	shlq	$2, %rdi
	addq	(%r14), %rdi
	callq	_spin_lock_init
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_DESC_NUM,4,2                   ## @DESC_NUM
	.comm	_NETSEC_RING_TX,8,3             ## @NETSEC_RING_TX
	.comm	_NETSEC_RING_RX,8,3             ## @NETSEC_RING_RX
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_PDOWN,4,2                 ## @BMCR_PDOWN
	.no_dead_strip	_netsec_netdev_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netsec_netdev_init
_netsec_netdev_init:                    ; @netsec_netdev_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _DESC_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DESC_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_BUILD_BUG_ON_NOT_POWER_OF_2
Lloh3:
	adrp	x21, _NETSEC_RING_TX@GOTPAGE
Lloh4:
	ldr	x21, [x21, _NETSEC_RING_TX@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_netsec_alloc_dring
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.1:
Lloh5:
	adrp	x22, _NETSEC_RING_RX@GOTPAGE
Lloh6:
	ldr	x22, [x22, _NETSEC_RING_RX@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	bl	_netsec_alloc_dring
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.2:
	ldp	w1, w0, [x19, #8]
Lloh7:
	adrp	x20, _MII_BMCR@GOTPAGE
Lloh8:
	ldr	x20, [x20, _MII_BMCR@GOTPAGEOFF]
	ldr	w2, [x20]
	bl	_netsec_phy_read
Lloh9:
	adrp	x8, _BMCR_PDOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BMCR_PDOWN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w3, w8, w0
	ldp	w1, w0, [x19, #8]
	ldr	w2, [x20]
	bl	_netsec_phy_write
	mov	x0, x19
	mov	w1, #1
	bl	_netsec_reset_hardware
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.3:
	ldr	x1, [x22]
	mov	x0, x19
	bl	_netsec_free_dring
LBB0_4:
	ldr	x1, [x21]
	mov	x0, x19
	bl	_netsec_free_dring
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x8, x9, lsl #2
	bl	_spin_lock_init
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x8, x9, lsl #2
	bl	_spin_lock_init
	b	LBB0_5
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DESC_NUM,4,2                   ; @DESC_NUM
	.comm	_NETSEC_RING_TX,8,3             ; @NETSEC_RING_TX
	.comm	_NETSEC_RING_RX,8,3             ; @NETSEC_RING_RX
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_PDOWN,4,2                 ; @BMCR_PDOWN
	.no_dead_strip	_netsec_netdev_init
.subsections_via_symbols
