	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_sysport_open
_bcm_sysport_open:                      ## @bcm_sysport_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	%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, %r14
	callq	_netdev_priv
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_umac_reset
	movq	%r13, %rdi
	callq	_topctrl_flush
	movq	_CMD_RX_EN@GOTPCREL(%rip), %rax
	movq	_CMD_TX_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_umac_enable_set
	movq	%r13, %rdi
	callq	_rbuf_init
	cmpl	$0, 20(%r13)
	je	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	callq	_gib_set_pad_extension
	jmp	LBB0_3
LBB0_1:
	movq	_UMAC_MAX_MTU_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_UMAC_MAX_FRAME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_umac_writel
LBB0_3:
	movl	12(%r14), %esi
	movq	%r14, %rdi
	callq	_bcm_sysport_set_features
	movl	8(%r14), %esi
	movq	%r13, %rdi
	callq	_umac_set_hw_addr
	movl	24(%r13), %r8d
	movl	28(%r13), %esi
	movq	_bcm_sysport_adj_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_of_phy_connect
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	$-1, (%r13)
	movl	$-1, 8(%r13)
	movq	%r13, %rdi
	callq	_bcm_sysport_mask_all_intrs
	movl	12(%r13), %edi
	movq	_bcm_sysport_rx_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %ecx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_28
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_29
LBB0_7:
	cmpl	$0, 20(%r13)
	je	LBB0_8
LBB0_10:
	cmpl	$0, (%r14)
	je	LBB0_15
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_bcm_sysport_init_tx_ring
	testl	%eax, %eax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jb	LBB0_12
LBB0_15:
	movq	_TDMA_LL_RAM_INIT_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TDMA_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_tdma_writel
	movq	%r13, %rdi
	callq	_bcm_sysport_init_rx_ring
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r12d
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_21
LBB0_8:
	movl	16(%r13), %edi
	movq	_bcm_sysport_tx_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %ecx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_27
LBB0_13:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	cmpl	$0, (%r14)
	jne	LBB0_23
	jmp	LBB0_25
LBB0_17:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_rdma_enable_set
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.18:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_tdma_enable_set
	testl	%eax, %eax
	je	LBB0_19
## %bb.20:
	movl	%eax, %r12d
	movq	_INTRL2_0_RDMA_MBDONE@GOTPCREL(%rip), %rax
	movq	_INTRL2_0_TX_RING_FULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intrl2_0_mask_set
LBB0_21:
	movq	%r13, %rdi
	callq	_bcm_sysport_fini_rx_ring
	cmpl	$0, (%r14)
	je	LBB0_25
LBB0_23:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_bcm_sysport_fini_tx_ring
	incl	%ebx
	cmpl	(%r14), %ebx
	jb	LBB0_24
LBB0_25:
	cmpl	$0, 20(%r13)
	jne	LBB0_27
## %bb.26:
	movl	16(%r13), %edi
	movq	%r14, %rsi
	callq	_free_irq
LBB0_27:
	movl	12(%r13), %edi
	movq	%r14, %rsi
	callq	_free_irq
LBB0_28:
	movq	%r15, %rdi
	callq	_phy_disconnect
LBB0_29:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_CMD_TX_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CMD_RX_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_umac_enable_set
	movq	%r14, %rdi
	callq	_bcm_sysport_netif_start
	movq	%r14, %rdi
	callq	_netif_tx_start_all_queues
	xorl	%r12d, %r12d
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_RX_EN,4,2                  ## @CMD_RX_EN
	.comm	_CMD_TX_EN,4,2                  ## @CMD_TX_EN
	.comm	_UMAC_MAX_MTU_SIZE,4,2          ## @UMAC_MAX_MTU_SIZE
	.comm	_UMAC_MAX_FRAME_LEN,4,2         ## @UMAC_MAX_FRAME_LEN
	.comm	_bcm_sysport_adj_link,4,2       ## @bcm_sysport_adj_link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not attach to PHY\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_bcm_sysport_rx_isr,4,2         ## @bcm_sysport_rx_isr
L_.str.1:                               ## @.str.1
	.asciz	"failed to request RX interrupt\n"

	.comm	_bcm_sysport_tx_isr,4,2         ## @bcm_sysport_tx_isr
L_.str.2:                               ## @.str.2
	.asciz	"failed to request TX interrupt\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to initialize TX ring %d\n"

	.comm	_TDMA_LL_RAM_INIT_BUSY,4,2      ## @TDMA_LL_RAM_INIT_BUSY
	.comm	_TDMA_STATUS,4,2                ## @TDMA_STATUS
L_.str.4:                               ## @.str.4
	.asciz	"failed to initialize RX ring\n"

	.comm	_INTRL2_0_RDMA_MBDONE,4,2       ## @INTRL2_0_RDMA_MBDONE
	.comm	_INTRL2_0_TX_RING_FULL,4,2      ## @INTRL2_0_TX_RING_FULL
	.no_dead_strip	_bcm_sysport_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_sysport_open
_bcm_sysport_open:                      ; @bcm_sysport_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	bl	_netdev_priv
	mov	x20, x0
	bl	_umac_reset
	mov	x0, x20
	bl	_topctrl_flush
Lloh0:
	adrp	x24, _CMD_RX_EN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _CMD_RX_EN@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x25, _CMD_TX_EN@GOTPAGE
Lloh3:
	ldr	x25, [x25, _CMD_TX_EN@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w1, w9, w8
	mov	x0, x20
	mov	w2, #0
	bl	_umac_enable_set
	mov	x0, x20
	bl	_rbuf_init
	ldr	w8, [x20, #20]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_gib_set_pad_extension
	b	LBB0_3
LBB0_2:
Lloh4:
	adrp	x8, _UMAC_MAX_MTU_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _UMAC_MAX_MTU_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _UMAC_MAX_FRAME_LEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UMAC_MAX_FRAME_LEN@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_umac_writel
LBB0_3:
	ldr	w1, [x19, #12]
	mov	x0, x19
	bl	_bcm_sysport_set_features
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_umac_set_hw_addr
Lloh10:
	adrp	x8, _bcm_sysport_adj_link@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bcm_sysport_adj_link@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	ldp	w4, w1, [x20, #24]
	mov	x0, x19
	mov	w3, #0
	bl	_of_phy_connect
	cbz	x0, LBB0_6
; %bb.4:
	mov	x21, x0
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x20]
	mov	w8, #-1
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_bcm_sysport_mask_all_intrs
	ldr	w0, [x20, #12]
Lloh13:
	adrp	x8, _bcm_sysport_rx_isr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _bcm_sysport_rx_isr@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w3, [x19, #4]
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	cbz	w0, LBB0_7
; %bb.5:
	mov	x22, x0
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_26
LBB0_6:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_27
LBB0_7:
	ldr	w8, [x20, #20]
	cbz	w8, LBB0_14
LBB0_8:
	ldr	w8, [x19]
	cbz	w8, LBB0_12
; %bb.9:
	mov	w23, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_bcm_sysport_init_tx_ring
	cbnz	w0, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w23, w23, #1
	ldr	w8, [x19]
	cmp	w23, w8
	b.lo	LBB0_10
LBB0_12:
Lloh23:
	adrp	x8, _TDMA_LL_RAM_INIT_BUSY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TDMA_LL_RAM_INIT_BUSY@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _TDMA_STATUS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TDMA_STATUS@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_tdma_writel
	mov	x0, x20
	bl	_bcm_sysport_init_rx_ring
	cbz	w0, LBB0_17
; %bb.13:
	mov	x22, x0
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_20
LBB0_14:
	ldr	w0, [x20, #16]
Lloh31:
	adrp	x8, _bcm_sysport_tx_isr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _bcm_sysport_tx_isr@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldr	w3, [x19, #4]
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	cbz	w0, LBB0_8
; %bb.15:
	mov	x22, x0
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_25
LBB0_16:
	mov	x22, x0
	str	x23, [sp]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	ldr	w8, [x19]
	cbnz	w8, LBB0_21
	b	LBB0_23
LBB0_17:
	mov	x0, x20
	mov	w1, #1
	bl	_rdma_enable_set
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.18:
	mov	x0, x20
	mov	w1, #1
	bl	_tdma_enable_set
	mov	x22, x0
	cbz	w0, LBB0_28
; %bb.19:
Lloh38:
	adrp	x8, _INTRL2_0_RDMA_MBDONE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _INTRL2_0_RDMA_MBDONE@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _INTRL2_0_TX_RING_FULL@GOTPAGE
Lloh42:
	ldr	x9, [x9, _INTRL2_0_TX_RING_FULL@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_intrl2_0_mask_set
LBB0_20:
	mov	x0, x20
	bl	_bcm_sysport_fini_rx_ring
	ldr	w8, [x19]
	cbz	w8, LBB0_23
LBB0_21:
	mov	w23, #0
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_bcm_sysport_fini_tx_ring
	add	w23, w23, #1
	ldr	w8, [x19]
	cmp	w23, w8
	b.lo	LBB0_22
LBB0_23:
	ldr	w8, [x20, #20]
	cbnz	w8, LBB0_25
; %bb.24:
	ldr	w0, [x20, #16]
	mov	x1, x19
	bl	_free_irq
LBB0_25:
	ldr	w0, [x20, #12]
	mov	x1, x19
	bl	_free_irq
LBB0_26:
	mov	x0, x21
	bl	_phy_disconnect
LBB0_27:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_28:
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w1, w9, w8
	mov	x0, x20
	mov	w2, #1
	bl	_umac_enable_set
	mov	x0, x19
	bl	_bcm_sysport_netif_start
	mov	x0, x19
	bl	_netif_tx_start_all_queues
	b	LBB0_27
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_RX_EN,4,2                  ; @CMD_RX_EN
	.comm	_CMD_TX_EN,4,2                  ; @CMD_TX_EN
	.comm	_UMAC_MAX_MTU_SIZE,4,2          ; @UMAC_MAX_MTU_SIZE
	.comm	_UMAC_MAX_FRAME_LEN,4,2         ; @UMAC_MAX_FRAME_LEN
	.comm	_bcm_sysport_adj_link,4,2       ; @bcm_sysport_adj_link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not attach to PHY\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_bcm_sysport_rx_isr,4,2         ; @bcm_sysport_rx_isr
l_.str.1:                               ; @.str.1
	.asciz	"failed to request RX interrupt\n"

	.comm	_bcm_sysport_tx_isr,4,2         ; @bcm_sysport_tx_isr
l_.str.2:                               ; @.str.2
	.asciz	"failed to request TX interrupt\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to initialize TX ring %d\n"

	.comm	_TDMA_LL_RAM_INIT_BUSY,4,2      ; @TDMA_LL_RAM_INIT_BUSY
	.comm	_TDMA_STATUS,4,2                ; @TDMA_STATUS
l_.str.4:                               ; @.str.4
	.asciz	"failed to initialize RX ring\n"

	.comm	_INTRL2_0_RDMA_MBDONE,4,2       ; @INTRL2_0_RDMA_MBDONE
	.comm	_INTRL2_0_TX_RING_FULL,4,2      ; @INTRL2_0_TX_RING_FULL
	.no_dead_strip	_bcm_sysport_open
.subsections_via_symbols
