	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcmgenet_open
_bcmgenet_open:                         ## @bcmgenet_open
	.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
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_netif_dbg
	movl	4(%rbx), %edi
	callq	_clk_prepare_enable
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_GENET_POWER_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcmgenet_power_up
LBB0_2:
	movq	%rbx, %rdi
	callq	_bcmgenet_umac_reset
	movq	%rbx, %rdi
	callq	_init_umac
	movq	_UMAC_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcmgenet_umac_readl
	movq	_CMD_CRC_FWD@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, (%rbx)
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_bcmgenet_set_hw_addr
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	movq	_EXT_EXT_PWR_MGMT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_bcmgenet_ext_readl
	movq	_EXT_ENERGY_DET_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_bcmgenet_ext_writel
LBB0_4:
	movq	%rbx, %rdi
	callq	_bcmgenet_dma_disable
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_bcmgenet_init_dma
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	cmpq	$0, 8(%rbx)
	je	LBB0_16
LBB0_15:
	movq	_GENET_POWER_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcmgenet_power_down
LBB0_16:
	movl	4(%rbx), %edi
	callq	_clk_disable_unprepare
LBB0_17:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_bcmgenet_enable_dma
	movq	%rbx, %rdi
	callq	_bcmgenet_hfb_init
	movl	16(%rbx), %edi
	movq	_bcmgenet_isr0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	(%r14), %ecx
	movq	%rbx, %r8
	callq	_request_irq
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movl	20(%rbx), %edi
	movq	_bcmgenet_isr1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movl	(%r14), %ecx
	movq	%rbx, %r8
	callq	_request_irq
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	callq	_bcmgenet_mii_probe
	testl	%eax, %eax
	je	LBB0_18
## %bb.11:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	20(%rbx), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	jmp	LBB0_12
LBB0_7:
	movl	%eax, %r15d
	movl	16(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_13
LBB0_9:
	movl	%eax, %r15d
	movl	20(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_12:
	movl	16(%rbx), %edi
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_13:
	movq	%rbx, %rdi
	callq	_bcmgenet_dma_teardown
	movq	%rbx, %rdi
	callq	_bcmgenet_fini_dma
	cmpq	$0, 8(%rbx)
	jne	LBB0_15
	jmp	LBB0_16
LBB0_18:
	movq	%r14, %rdi
	callq	_bcmgenet_netif_start
	movq	%r14, %rdi
	callq	_netif_tx_start_all_queues
	xorl	%r15d, %r15d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bcmgenet_open\n"

	.comm	_GENET_POWER_PASSIVE,4,2        ## @GENET_POWER_PASSIVE
	.comm	_UMAC_CMD,4,2                   ## @UMAC_CMD
	.comm	_CMD_CRC_FWD,4,2                ## @CMD_CRC_FWD
	.comm	_EXT_EXT_PWR_MGMT,4,2           ## @EXT_EXT_PWR_MGMT
	.comm	_EXT_ENERGY_DET_MASK,4,2        ## @EXT_ENERGY_DET_MASK
L_.str.1:                               ## @.str.1
	.asciz	"failed to initialize DMA\n"

	.comm	_bcmgenet_isr0,4,2              ## @bcmgenet_isr0
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.2:                               ## @.str.2
	.asciz	"can't request IRQ %d\n"

	.comm	_bcmgenet_isr1,4,2              ## @bcmgenet_isr1
L_.str.3:                               ## @.str.3
	.asciz	"failed to connect to PHY\n"

	.no_dead_strip	_bcmgenet_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcmgenet_open
_bcmgenet_open:                         ; @bcmgenet_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _ifup@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	x2, x20
	bl	_netif_dbg
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x23, _GENET_POWER_PASSIVE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _GENET_POWER_PASSIVE@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bcmgenet_power_up
LBB0_2:
	mov	x0, x19
	bl	_bcmgenet_umac_reset
	mov	x0, x19
	bl	_init_umac
Lloh7:
	adrp	x8, _UMAC_CMD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UMAC_CMD@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bcmgenet_umac_readl
Lloh10:
	adrp	x8, _CMD_CRC_FWD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CMD_CRC_FWD@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	str	w8, [x19]
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_bcmgenet_set_hw_addr
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh13:
	adrp	x21, _EXT_EXT_PWR_MGMT@GOTPAGE
Lloh14:
	ldr	x21, [x21, _EXT_EXT_PWR_MGMT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bcmgenet_ext_readl
Lloh15:
	adrp	x8, _EXT_ENERGY_DET_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EXT_ENERGY_DET_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x21]
	mov	x0, x19
	bl	_bcmgenet_ext_writel
LBB0_4:
	mov	x0, x19
	bl	_bcmgenet_dma_disable
	mov	x22, x0
	mov	x0, x19
	bl	_bcmgenet_init_dma
	cbz	w0, LBB0_9
; %bb.5:
	mov	x21, x0
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
LBB0_6:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bcmgenet_power_down
LBB0_7:
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
LBB0_8:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_9:
	mov	x0, x19
	mov	x1, x22
	bl	_bcmgenet_enable_dma
	mov	x0, x19
	bl	_bcmgenet_hfb_init
Lloh20:
	adrp	x8, _bcmgenet_isr0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _bcmgenet_isr0@GOTPAGEOFF]
	ldr	w0, [x19, #16]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x22, _IRQF_SHARED@GOTPAGE
Lloh24:
	ldr	x22, [x22, _IRQF_SHARED@GOTPAGEOFF]
	ldr	w2, [x22]
	ldr	w3, [x20]
	mov	x4, x19
	bl	_request_irq
	tbnz	w0, #31, LBB0_13
; %bb.10:
	ldr	w0, [x19, #20]
Lloh25:
	adrp	x8, _bcmgenet_isr1@GOTPAGE
Lloh26:
	ldr	x8, [x8, _bcmgenet_isr1@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	w2, [x22]
	ldr	w3, [x20]
	mov	x4, x19
	bl	_request_irq
	tbnz	w0, #31, LBB0_14
; %bb.11:
	mov	x0, x20
	bl	_bcmgenet_mii_probe
	mov	x21, x0
	cbz	w0, LBB0_17
; %bb.12:
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	w0, [x19, #20]
	mov	x1, x19
	bl	_free_irq
	b	LBB0_15
LBB0_13:
	mov	x21, x0
	ldr	w8, [x19, #16]
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	b	LBB0_16
LBB0_14:
	mov	x21, x0
	ldr	w8, [x19, #20]
	str	x8, [sp]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
LBB0_15:
	ldr	w0, [x19, #16]
	mov	x1, x19
	bl	_free_irq
LBB0_16:
	mov	x0, x19
	bl	_bcmgenet_dma_teardown
	mov	x0, x19
	bl	_bcmgenet_fini_dma
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_6
	b	LBB0_7
LBB0_17:
	mov	x0, x20
	bl	_bcmgenet_netif_start
	mov	x0, x20
	bl	_netif_tx_start_all_queues
	b	LBB0_8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bcmgenet_open\n"

	.comm	_GENET_POWER_PASSIVE,4,2        ; @GENET_POWER_PASSIVE
	.comm	_UMAC_CMD,4,2                   ; @UMAC_CMD
	.comm	_CMD_CRC_FWD,4,2                ; @CMD_CRC_FWD
	.comm	_EXT_EXT_PWR_MGMT,4,2           ; @EXT_EXT_PWR_MGMT
	.comm	_EXT_ENERGY_DET_MASK,4,2        ; @EXT_ENERGY_DET_MASK
l_.str.1:                               ; @.str.1
	.asciz	"failed to initialize DMA\n"

	.comm	_bcmgenet_isr0,4,2              ; @bcmgenet_isr0
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.2:                               ; @.str.2
	.asciz	"can't request IRQ %d\n"

	.comm	_bcmgenet_isr1,4,2              ; @bcmgenet_isr1
l_.str.3:                               ; @.str.3
	.asciz	"failed to connect to PHY\n"

	.no_dead_strip	_bcmgenet_open
.subsections_via_symbols
