	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_set_warpcore_loopback
_bnx2x_set_warpcore_loopback:           ## @bnx2x_set_warpcore_loopback
	.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	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rsi), %r14
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rsi), %edx
	movq	(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	callq	_DP
	movq	(%rbx), %rax
	movq	_SPEED_10000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_2
## %bb.1:
	movq	_SUPPORTED_20000baseKR2_Full@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_5
LBB0_2:
	movq	_MDIO_REG_BANK_AER_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MDIO_AER_BLOCK_AER_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	callq	_CL22_WR_OVER_CL45
	movq	_MDIO_WC_DEVAD@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_MDIO_WC_REG_XGXSBLK0_XGXSCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$16, %r8d
	callq	_bnx2x_cl45_read_or_write
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_bnx2x_get_warpcore_lane
	movl	%eax, %r12d
	movl	(%r13), %edx
	movq	_MDIO_WC_REG_XGXSBLK1_LANECTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %r8
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_cl45_read
	movl	-44(%rbp), %r8d
	btsl	%r12d, %r8d
	movl	%r8d, -44(%rbp)
	movq	_FLAGS_WC_DUAL_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%rbx)
	je	LBB0_4
## %bb.3:
	movl	$2, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	orl	%eax, %r8d
	movl	%r8d, -44(%rbp)
LBB0_4:
	movl	(%r13), %edx
	movq	_MDIO_WC_REG_XGXSBLK1_LANECTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_cl45_write
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_set_aer_mmd
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_MDIO_WC_DEVAD@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$16384, %r8d                    ## imm = 0x4000
	callq	_bnx2x_cl45_read_or_write
	movl	(%r15), %edx
	movq	_MDIO_WC_REG_IEEE0BLK_MIICNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bnx2x_cl45_read_or_write       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting Warpcore loopback type %x, speed %d\n"

	.comm	_SPEED_10000,8,3                ## @SPEED_10000
	.comm	_SUPPORTED_20000baseKR2_Full,4,2 ## @SUPPORTED_20000baseKR2_Full
	.comm	_MDIO_REG_BANK_AER_BLOCK,4,2    ## @MDIO_REG_BANK_AER_BLOCK
	.comm	_MDIO_AER_BLOCK_AER_REG,4,2     ## @MDIO_AER_BLOCK_AER_REG
	.comm	_MDIO_WC_DEVAD,4,2              ## @MDIO_WC_DEVAD
	.comm	_MDIO_WC_REG_XGXSBLK0_XGXSCONTROL,4,2 ## @MDIO_WC_REG_XGXSBLK0_XGXSCONTROL
	.comm	_MDIO_WC_REG_XGXSBLK1_LANECTRL2,4,2 ## @MDIO_WC_REG_XGXSBLK1_LANECTRL2
	.comm	_FLAGS_WC_DUAL_MODE,4,2         ## @FLAGS_WC_DUAL_MODE
	.comm	_MDIO_WC_REG_COMBO_IEEE0_MIICTRL,4,2 ## @MDIO_WC_REG_COMBO_IEEE0_MIICTRL
	.comm	_MDIO_WC_REG_IEEE0BLK_MIICNTL,4,2 ## @MDIO_WC_REG_IEEE0BLK_MIICNTL
	.no_dead_strip	_bnx2x_set_warpcore_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_set_warpcore_loopback
_bnx2x_set_warpcore_loopback:           ; @bnx2x_set_warpcore_loopback
	.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	x21, x1
	mov	x19, x0
	ldr	x20, [x1, #8]
Lloh0:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x1]
	ldr	x3, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _SPEED_10000@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SPEED_10000@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.1:
	ldr	w8, [x19, #8]
Lloh8:
	adrp	x9, _SUPPORTED_20000baseKR2_Full@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SUPPORTED_20000baseKR2_Full@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
LBB0_2:
Lloh11:
	adrp	x8, _MDIO_REG_BANK_AER_BLOCK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MDIO_REG_BANK_AER_BLOCK@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x8, _MDIO_AER_BLOCK_AER_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MDIO_AER_BLOCK_AER_REG@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w4, #0
	bl	_CL22_WR_OVER_CL45
Lloh17:
	adrp	x23, _MDIO_WC_DEVAD@GOTPAGE
Lloh18:
	ldr	x23, [x23, _MDIO_WC_DEVAD@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh19:
	adrp	x8, _MDIO_WC_REG_XGXSBLK0_XGXSCONTROL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MDIO_WC_REG_XGXSBLK0_XGXSCONTROL@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w4, #16
	bl	_bnx2x_cl45_read_or_write
	mov	x0, x19
	mov	x1, x21
	bl	_bnx2x_get_warpcore_lane
	mov	x22, x0
	ldr	w2, [x23]
Lloh22:
	adrp	x24, _MDIO_WC_REG_XGXSBLK1_LANECTRL2@GOTPAGE
Lloh23:
	ldr	x24, [x24, _MDIO_WC_REG_XGXSBLK1_LANECTRL2@GOTPAGEOFF]
	ldr	w3, [x24]
	add	x4, sp, #12
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_read
	mov	w8, #1
	lsl	w8, w8, w22
	ldr	w9, [sp, #12]
	orr	w4, w9, w8
	str	w4, [sp, #12]
	ldr	w8, [x19, #12]
Lloh24:
	adrp	x9, _FLAGS_WC_DUAL_MODE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _FLAGS_WC_DUAL_MODE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	w8, #2
	lsl	w8, w8, w22
	orr	w4, w4, w8
	str	w4, [sp, #12]
LBB0_4:
	ldr	w2, [x23]
	ldr	w3, [x24]
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_write
	mov	x0, x21
	mov	x1, x19
	bl	_bnx2x_set_aer_mmd
	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_5:
Lloh27:
	adrp	x21, _MDIO_WC_DEVAD@GOTPAGE
Lloh28:
	ldr	x21, [x21, _MDIO_WC_DEVAD@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh29:
	adrp	x8, _MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPAGEOFF]
Lloh31:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w4, #16384
	bl	_bnx2x_cl45_read_or_write
	ldr	w2, [x21]
Lloh32:
	adrp	x8, _MDIO_WC_REG_IEEE0BLK_MIICNTL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MDIO_WC_REG_IEEE0BLK_MIICNTL@GOTPAGEOFF]
Lloh34:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w4, #1
	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
	b	_bnx2x_cl45_read_or_write
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting Warpcore loopback type %x, speed %d\n"

	.comm	_SPEED_10000,8,3                ; @SPEED_10000
	.comm	_SUPPORTED_20000baseKR2_Full,4,2 ; @SUPPORTED_20000baseKR2_Full
	.comm	_MDIO_REG_BANK_AER_BLOCK,4,2    ; @MDIO_REG_BANK_AER_BLOCK
	.comm	_MDIO_AER_BLOCK_AER_REG,4,2     ; @MDIO_AER_BLOCK_AER_REG
	.comm	_MDIO_WC_DEVAD,4,2              ; @MDIO_WC_DEVAD
	.comm	_MDIO_WC_REG_XGXSBLK0_XGXSCONTROL,4,2 ; @MDIO_WC_REG_XGXSBLK0_XGXSCONTROL
	.comm	_MDIO_WC_REG_XGXSBLK1_LANECTRL2,4,2 ; @MDIO_WC_REG_XGXSBLK1_LANECTRL2
	.comm	_FLAGS_WC_DUAL_MODE,4,2         ; @FLAGS_WC_DUAL_MODE
	.comm	_MDIO_WC_REG_COMBO_IEEE0_MIICTRL,4,2 ; @MDIO_WC_REG_COMBO_IEEE0_MIICTRL
	.comm	_MDIO_WC_REG_IEEE0BLK_MIICNTL,4,2 ; @MDIO_WC_REG_IEEE0BLK_MIICNTL
	.no_dead_strip	_bnx2x_set_warpcore_loopback
.subsections_via_symbols
