	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_hw_up
_sky2_hw_up:                            ## @sky2_hw_up
	.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
	movq	32(%rdi), %r13
	movl	(%rdi), %r15d
	movq	24(%r13), %rax
	movq	%r15, %rcx
	xorq	$1, %rcx
	movq	(%rax,%rcx,8), %rbx
	callq	_tx_init
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	16(%r13), %edi
	movq	_PCI_CAP_ID_PCIX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_find_capability
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movslq	%eax, %rbx
	movq	_PCI_X_CMD@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%rbx, %rsi
	movq	%r13, %rdi
	callq	_sky2_pci_read16
	movq	_PCI_X_CMD_MAX_SPLIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	addq	(%r12), %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_sky2_pci_write16
LBB0_4:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_sky2_mac_init
	movq	_B2_E_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_sky2_read8
	testl	%eax, %eax
	jle	LBB0_12
## %bb.5:
	movl	%eax, %ebx
	leal	(,%rbx,4), %r12d
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_netdev_dbg
	cmpl	$3, %ebx
	ja	LBB0_7
## %bb.6:
	addl	%ebx, %ebx
	jmp	LBB0_8
LBB0_7:
	leal	-32(,%rbx,8), %eax
	cltq
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %rcx
	shrq	$32, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %ebx
	addl	$8, %ebx
LBB0_8:
	movq	_rxqaddr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	callq	_sky2_ramset
	movq	_txqaddr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %esi
	subl	%ebx, %r12d
	movq	%r13, %rdi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	callq	_sky2_ramset
	testq	%r15, %r15
	jne	LBB0_9
## %bb.10:
	movq	_Q_XS1@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_Q_XS2@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %edi
	movq	_RB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RB_ADDR
	movq	_RB_RST_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sky2_write8
LBB0_12:
	movq	_txqaddr@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	(%rax,%r15,4), %esi
	movq	%r13, %rdi
	callq	_sky2_qset
	movq	(%r13), %rax
	movq	_CHIP_ID_YUKON_EX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.13:
	movq	8(%r13), %rcx
	movq	_CHIP_REV_YU_EX_B0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.14:
	movq	(%rbx), %rax
	movl	(%rax,%r15,4), %edi
	movq	_Q_TEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_Q_ADDR
	movq	_F_TX_CHK_AUTO_OFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sky2_write32
	movq	(%r13), %rax
LBB0_15:
	movq	_CHIP_ID_YUKON_EC_U@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.16:
	movq	8(%r13), %rax
	movq	_CHIP_REV_YU_EC_U_A0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:
	movq	(%rbx), %rax
	movl	(%rax,%r15,4), %edi
	movq	_Q_AL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_Q_ADDR
	movq	_ECU_TXFF_LEV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sky2_write16
LBB0_18:
	movq	(%rbx), %rax
	movl	(%rax,%r15,4), %esi
	movl	24(%r14), %edx
	movq	16(%r14), %rcx
	decq	%rcx
	movq	%r13, %rdi
	callq	_sky2_prefetch_init
	movq	8(%r14), %rdi
	movl	(%rdi), %esi
	callq	_sky2_vlan_mode
	movq	8(%r14), %rdi
	callq	_netdev_update_features
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sky2_rx_start                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CAP_ID_PCIX,4,2            ## @PCI_CAP_ID_PCIX
	.comm	_PCI_X_CMD,8,3                  ## @PCI_X_CMD
	.comm	_PCI_X_CMD_MAX_SPLIT,4,2        ## @PCI_X_CMD_MAX_SPLIT
	.comm	_B2_E_0,4,2                     ## @B2_E_0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ram buffer %dK\n"

	.comm	_rxqaddr,8,3                    ## @rxqaddr
	.comm	_txqaddr,8,3                    ## @txqaddr
	.comm	_Q_XS1,4,2                      ## @Q_XS1
	.comm	_Q_XS2,4,2                      ## @Q_XS2
	.comm	_RB_CTRL,4,2                    ## @RB_CTRL
	.comm	_RB_RST_SET,4,2                 ## @RB_RST_SET
	.comm	_CHIP_ID_YUKON_EX,8,3           ## @CHIP_ID_YUKON_EX
	.comm	_CHIP_REV_YU_EX_B0,8,3          ## @CHIP_REV_YU_EX_B0
	.comm	_Q_TEST,4,2                     ## @Q_TEST
	.comm	_F_TX_CHK_AUTO_OFF,4,2          ## @F_TX_CHK_AUTO_OFF
	.comm	_CHIP_ID_YUKON_EC_U,8,3         ## @CHIP_ID_YUKON_EC_U
	.comm	_CHIP_REV_YU_EC_U_A0,8,3        ## @CHIP_REV_YU_EC_U_A0
	.comm	_Q_AL,4,2                       ## @Q_AL
	.comm	_ECU_TXFF_LEV,4,2               ## @ECU_TXFF_LEV
	.no_dead_strip	_sky2_hw_up
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sky2_hw_up
_sky2_hw_up:                            ; @sky2_hw_up
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x20, [x0, #32]
	ldr	w21, [x0]
	ldr	x8, [x20, #24]
	eor	x9, x21, #0x1
	ldr	x22, [x8, x9, lsl #3]
	bl	_tx_init
	cbz	x22, LBB0_4
; %bb.1:
	mov	x0, x22
	bl	_netif_running
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x20, #16]
Lloh0:
	adrp	x8, _PCI_CAP_ID_PCIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_CAP_ID_PCIX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pci_find_capability
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_4
; %bb.3:
	sxtw	x22, w0
Lloh3:
	adrp	x23, _PCI_X_CMD@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PCI_X_CMD@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x1, x8, x22
	mov	x0, x20
	bl	_sky2_pci_read16
Lloh5:
	adrp	x8, _PCI_X_CMD_MAX_SPLIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_X_CMD_MAX_SPLIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	x8, [x23]
	add	x1, x8, x22
	mov	x0, x20
	bl	_sky2_pci_write16
LBB0_4:
	mov	x0, x20
	mov	x1, x21
	bl	_sky2_mac_init
Lloh8:
	adrp	x8, _B2_E_0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _B2_E_0@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sky2_read8
Lloh11:
	adrp	x24, _txqaddr@GOTPAGE
Lloh12:
	ldr	x24, [x24, _txqaddr@GOTPAGEOFF]
	cmp	w0, #0
	b.le	LBB0_6
; %bb.5:
	mov	x22, x0
	lsl	w23, w0, #2
	ldr	x0, [x19, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_netdev_dbg
	lsl	w8, w22, #3
	sub	w8, w8, #32
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	add	w8, w8, #8
	lsl	w9, w22, #1
	cmp	w22, #3
	csel	w22, w8, w9, hi
Lloh15:
	adrp	x8, _rxqaddr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _rxqaddr@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	lsl	x25, x21, #2
	ldr	w1, [x8, x25]
	mov	x0, x20
	mov	w2, #0
	mov	x3, x22
	bl	_sky2_ramset
	ldr	x8, [x24]
	ldr	w1, [x8, x25]
	sub	w3, w23, w22
	mov	x0, x20
	mov	x2, x22
	bl	_sky2_ramset
Lloh18:
	adrp	x8, _Q_XS1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _Q_XS1@GOTPAGEOFF]
Lloh20:
	adrp	x9, _Q_XS2@GOTPAGE
Lloh21:
	ldr	x9, [x9, _Q_XS2@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x8, x9, eq
	ldr	w0, [x8]
Lloh22:
	adrp	x8, _RB_CTRL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RB_CTRL@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_RB_ADDR
	mov	x1, x0
Lloh25:
	adrp	x8, _RB_RST_SET@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RB_RST_SET@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sky2_write8
LBB0_6:
	ldr	x8, [x24]
	ldr	w1, [x8, x21, lsl #2]
	mov	x0, x20
	bl	_sky2_qset
	ldr	x8, [x20]
Lloh28:
	adrp	x9, _CHIP_ID_YUKON_EX@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CHIP_ID_YUKON_EX@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	ldr	x9, [x20, #8]
Lloh31:
	adrp	x10, _CHIP_REV_YU_EX_B0@GOTPAGE
Lloh32:
	ldr	x10, [x10, _CHIP_REV_YU_EX_B0@GOTPAGEOFF]
Lloh33:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [x24]
	ldr	w0, [x8, x21, lsl #2]
Lloh34:
	adrp	x8, _Q_TEST@GOTPAGE
Lloh35:
	ldr	x8, [x8, _Q_TEST@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	bl	_Q_ADDR
	mov	x1, x0
Lloh37:
	adrp	x8, _F_TX_CHK_AUTO_OFF@GOTPAGE
Lloh38:
	ldr	x8, [x8, _F_TX_CHK_AUTO_OFF@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sky2_write32
	ldr	x8, [x20]
LBB0_9:
Lloh40:
	adrp	x9, _CHIP_ID_YUKON_EC_U@GOTPAGE
Lloh41:
	ldr	x9, [x9, _CHIP_ID_YUKON_EC_U@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	ldr	x8, [x20, #8]
Lloh43:
	adrp	x9, _CHIP_REV_YU_EC_U_A0@GOTPAGE
Lloh44:
	ldr	x9, [x9, _CHIP_REV_YU_EC_U_A0@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	ldr	x8, [x24]
	ldr	w0, [x8, x21, lsl #2]
Lloh46:
	adrp	x8, _Q_AL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _Q_AL@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	bl	_Q_ADDR
	mov	x1, x0
Lloh49:
	adrp	x8, _ECU_TXFF_LEV@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ECU_TXFF_LEV@GOTPAGEOFF]
Lloh51:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sky2_write16
LBB0_12:
	ldr	x8, [x24]
	ldr	w1, [x8, x21, lsl #2]
	ldr	w2, [x19, #24]
	ldr	x8, [x19, #16]
	sub	x3, x8, #1
	mov	x0, x20
	bl	_sky2_prefetch_init
	ldr	x0, [x19, #8]
	ldr	w1, [x0]
	bl	_sky2_vlan_mode
	ldr	x0, [x19, #8]
	bl	_netdev_update_features
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_sky2_rx_start
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CAP_ID_PCIX,4,2            ; @PCI_CAP_ID_PCIX
	.comm	_PCI_X_CMD,8,3                  ; @PCI_X_CMD
	.comm	_PCI_X_CMD_MAX_SPLIT,4,2        ; @PCI_X_CMD_MAX_SPLIT
	.comm	_B2_E_0,4,2                     ; @B2_E_0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ram buffer %dK\n"

	.comm	_rxqaddr,8,3                    ; @rxqaddr
	.comm	_txqaddr,8,3                    ; @txqaddr
	.comm	_Q_XS1,4,2                      ; @Q_XS1
	.comm	_Q_XS2,4,2                      ; @Q_XS2
	.comm	_RB_CTRL,4,2                    ; @RB_CTRL
	.comm	_RB_RST_SET,4,2                 ; @RB_RST_SET
	.comm	_CHIP_ID_YUKON_EX,8,3           ; @CHIP_ID_YUKON_EX
	.comm	_CHIP_REV_YU_EX_B0,8,3          ; @CHIP_REV_YU_EX_B0
	.comm	_Q_TEST,4,2                     ; @Q_TEST
	.comm	_F_TX_CHK_AUTO_OFF,4,2          ; @F_TX_CHK_AUTO_OFF
	.comm	_CHIP_ID_YUKON_EC_U,8,3         ; @CHIP_ID_YUKON_EC_U
	.comm	_CHIP_REV_YU_EC_U_A0,8,3        ; @CHIP_REV_YU_EC_U_A0
	.comm	_Q_AL,4,2                       ; @Q_AL
	.comm	_ECU_TXFF_LEV,4,2               ; @ECU_TXFF_LEV
	.no_dead_strip	_sky2_hw_up
.subsections_via_symbols
