	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gbe_open
_gbe_open:                              ## @gbe_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	24(%rdi), %r13
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_switch_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_id_ver@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_GBE_REG_ADDR
	movl	%eax, %edi
	callq	_readl
	movl	%eax, %ebx
	movl	4(%r13), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_GBE_MAJOR_VERSION
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_GBE_MINOR_VERSION
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_GBE_RTL_VERSION
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_GBE_IDENT
	leaq	L_.str(%rip), %rsi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	movl	%eax, %r9d
	callq	_dev_dbg
	movq	%r13, %rdi
	callq	_IS_SS_ID_XGBE
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_IS_SS_ID_MU
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_SWITCH_TO_PORT_IN_TAGINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
LBB0_3:
	xorl	%eax, %eax
	cmpq	$0, 8(%r13)
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	cmovnel	%eax, %r8d
	movl	%r8d, (%r15)
	movl	4(%r13), %edi
	movl	12(%r15), %edx
	movl	4(%r15), %r9d
	movl	8(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_gbe_slave_stop
	movq	_switch_regs@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_ptype@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_GBE_REG_ADDR
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_writel
	movq	_GBE_CTL_P0_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_IS_SS_ID_MU
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ETH_SW_CTL_P0_TX_CRC_REMOVE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_ETH_SW_CAN_REMOVE_ETH_FCS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_5:
	movl	(%r14), %esi
	movq	_control@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_GBE_REG_ADDR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	movl	(%r13), %ebx
	movl	(%r14), %esi
	movq	_stat_port_en@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_GBE_REG_ADDR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r15, %rdi
	callq	_gbe_slave_open
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	callq	_gbe_slave_stop
	jmp	LBB0_8
LBB0_6:
	movq	_GBE_TXHOOK_ORDER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_gbe_txhook@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rcx
	callq	_netcp_register_txhook
	movq	_GBE_RXHOOK_ORDER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_gbe_rxhook@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r15, %rcx
	callq	_netcp_register_rxhook
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	$1, 4(%rsi)
	movq	%r13, %rdi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_netcp_ethss_update_link_state
	movq	%r13, %rdi
	callq	_gbe_register_cpts
LBB0_8:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_switch_regs,4,2                ## @switch_regs
	.comm	_id_ver,4,2                     ## @id_ver
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"initializing gbe version %d.%d (%d) GBE identification value 0x%x\n"

	.comm	_SWITCH_TO_PORT_IN_TAGINFO,4,2  ## @SWITCH_TO_PORT_IN_TAGINFO
L_.str.1:                               ## @.str.1
	.asciz	"opened TX channel %s: %p with to port %d, flags %d\n"

	.comm	_ptype,4,2                      ## @ptype
	.comm	_GBE_CTL_P0_ENABLE,4,2          ## @GBE_CTL_P0_ENABLE
	.comm	_ETH_SW_CTL_P0_TX_CRC_REMOVE,4,2 ## @ETH_SW_CTL_P0_TX_CRC_REMOVE
	.comm	_ETH_SW_CAN_REMOVE_ETH_FCS,4,2  ## @ETH_SW_CAN_REMOVE_ETH_FCS
	.comm	_control,4,2                    ## @control
	.comm	_stat_port_en,4,2               ## @stat_port_en
	.comm	_GBE_TXHOOK_ORDER,4,2           ## @GBE_TXHOOK_ORDER
	.comm	_gbe_txhook,4,2                 ## @gbe_txhook
	.comm	_GBE_RXHOOK_ORDER,4,2           ## @GBE_RXHOOK_ORDER
	.comm	_gbe_rxhook,4,2                 ## @gbe_rxhook
	.no_dead_strip	_gbe_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gbe_open
_gbe_open:                              ; @gbe_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
	ldr	x19, [x0, #24]
	str	x1, [sp]                        ; 8-byte Folded Spill
	mov	x0, x1
	bl	_netdev_priv
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x22, [x21, #16]
	ldr	w23, [x22]
Lloh0:
	adrp	x20, _switch_regs@GOTPAGE
Lloh1:
	ldr	x20, [x20, _switch_regs@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _id_ver@GOTPAGE
Lloh3:
	ldr	x8, [x8, _id_ver@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_GBE_REG_ADDR
	bl	_readl
	mov	x24, x0
	ldr	w25, [x19, #4]
	bl	_GBE_MAJOR_VERSION
	mov	x26, x0
	mov	x0, x24
	bl	_GBE_MINOR_VERSION
	mov	x27, x0
	mov	x0, x24
	bl	_GBE_RTL_VERSION
	mov	x28, x0
	mov	x0, x24
	bl	_GBE_IDENT
	mov	x5, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x25
	mov	x2, x26
	mov	x3, x27
	mov	x4, x28
	bl	_dev_dbg
	mov	x0, x19
	bl	_IS_SS_ID_XGBE
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_IS_SS_ID_MU
	cbz	x0, LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _SWITCH_TO_PORT_IN_TAGINFO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SWITCH_TO_PORT_IN_TAGINFO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x21, #4]
LBB0_3:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	csel	w4, w23, wzr, eq
	str	w4, [x21]
	ldr	w0, [x19, #4]
	ldp	w3, w2, [x21, #8]
	ldr	w5, [x21, #4]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	x0, x21
	bl	_gbe_slave_stop
	ldr	w1, [x20]
Lloh12:
	adrp	x8, _ptype@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ptype@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_GBE_REG_ADDR
	mov	x1, x0
	mov	w0, #0
	bl	_writel
Lloh15:
	adrp	x8, _GBE_CTL_P0_ENABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GBE_CTL_P0_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w24, [x8]
	mov	x0, x19
	bl	_IS_SS_ID_MU
	cbz	x0, LBB0_5
; %bb.4:
Lloh18:
	adrp	x8, _ETH_SW_CTL_P0_TX_CRC_REMOVE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETH_SW_CTL_P0_TX_CRC_REMOVE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w24, w8, w24
Lloh21:
	adrp	x8, _ETH_SW_CAN_REMOVE_ETH_FCS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ETH_SW_CAN_REMOVE_ETH_FCS@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
LBB0_5:
	ldr	w1, [x20]
Lloh24:
	adrp	x8, _control@GOTPAGE
Lloh25:
	ldr	x8, [x8, _control@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_GBE_REG_ADDR
	mov	x1, x0
	mov	x0, x24
	bl	_writel
	ldr	w24, [x19]
	ldr	w1, [x20]
Lloh27:
	adrp	x8, _stat_port_en@GOTPAGE
Lloh28:
	ldr	x8, [x8, _stat_port_en@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_GBE_REG_ADDR
	mov	x1, x0
	mov	x0, x24
	bl	_writel
	mov	x0, x21
	bl	_gbe_slave_open
	mov	x24, x0
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_gbe_slave_stop
	b	LBB0_8
LBB0_7:
Lloh30:
	adrp	x8, _GBE_TXHOOK_ORDER@GOTPAGE
Lloh31:
	ldr	x8, [x8, _GBE_TXHOOK_ORDER@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x8, _gbe_txhook@GOTPAGE
Lloh34:
	ldr	x8, [x8, _gbe_txhook@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x20
	mov	x3, x21
	bl	_netcp_register_txhook
Lloh36:
	adrp	x8, _GBE_RXHOOK_ORDER@GOTPAGE
Lloh37:
	ldr	x8, [x8, _GBE_RXHOOK_ORDER@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x8, _gbe_rxhook@GOTPAGE
Lloh40:
	ldr	x8, [x8, _gbe_rxhook@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x21
	bl	_netcp_register_rxhook
	mov	w8, #1
	str	w8, [x22, #4]
	mov	x0, x19
	mov	x1, x22
	ldr	x2, [sp]                        ; 8-byte Folded Reload
	bl	_netcp_ethss_update_link_state
	mov	x0, x19
	bl	_gbe_register_cpts
LBB0_8:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_switch_regs,4,2                ; @switch_regs
	.comm	_id_ver,4,2                     ; @id_ver
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"initializing gbe version %d.%d (%d) GBE identification value 0x%x\n"

	.comm	_SWITCH_TO_PORT_IN_TAGINFO,4,2  ; @SWITCH_TO_PORT_IN_TAGINFO
l_.str.1:                               ; @.str.1
	.asciz	"opened TX channel %s: %p with to port %d, flags %d\n"

	.comm	_ptype,4,2                      ; @ptype
	.comm	_GBE_CTL_P0_ENABLE,4,2          ; @GBE_CTL_P0_ENABLE
	.comm	_ETH_SW_CTL_P0_TX_CRC_REMOVE,4,2 ; @ETH_SW_CTL_P0_TX_CRC_REMOVE
	.comm	_ETH_SW_CAN_REMOVE_ETH_FCS,4,2  ; @ETH_SW_CAN_REMOVE_ETH_FCS
	.comm	_control,4,2                    ; @control
	.comm	_stat_port_en,4,2               ; @stat_port_en
	.comm	_GBE_TXHOOK_ORDER,4,2           ; @GBE_TXHOOK_ORDER
	.comm	_gbe_txhook,4,2                 ; @gbe_txhook
	.comm	_GBE_RXHOOK_ORDER,4,2           ; @GBE_RXHOOK_ORDER
	.comm	_gbe_rxhook,4,2                 ; @gbe_rxhook
	.no_dead_strip	_gbe_open
.subsections_via_symbols
