	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_warpcore_set_sgmii_speed
_bnx2x_warpcore_set_sgmii_speed:        ## @bnx2x_warpcore_set_sgmii_speed
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	(%rsi), %r14
	movq	_MDIO_WC_DEVAD@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_MDIO_WC_REG_RX66_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$-24577, %r8d                   ## imm = 0x9FFF
	callq	_bnx2x_cl45_read_and_write
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_warpcore_set_lpi_passthrough
	testq	%r12, %r12
	jne	LBB0_2
## %bb.1:
	movl	(%r13), %eax
	movq	_SPEED_AUTO_NEG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
LBB0_2:
	movl	(%r15), %edx
	movq	_MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$4096, %r8d                     ## imm = 0x1000
	callq	_bnx2x_cl45_read_or_write
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP
LBB0_13:
	movl	(%r15), %edx
	movq	_MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_read
	movl	$65354, %eax                    ## imm = 0xFF4A
	andl	-48(%rbp), %eax
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	movl	$1, %r8d
	cmovel	%eax, %r8d
	movl	%r8d, -48(%rbp)
	movl	(%r15), %edx
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_write
	movl	(%r15), %edx
	movq	_MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	leaq	-52(%rbp), %r8
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_read
	movl	(%r15), %edx
	movl	(%rbx), %ecx
	movl	-52(%rbp), %r8d
	andl	$-5, %r8d
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_write
	movl	(%r15), %edx
	movl	(%rbx), %ecx
	movl	-52(%rbp), %r8d
	orl	$4, %r8d
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_write
	movl	(%r15), %edx
	movl	(%r12), %ecx
	movl	-48(%rbp), %r8d
	orl	$16, %r8d
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_write
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r15), %edx
	movq	_MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	-44(%rbp), %r8
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_read
	movl	$52927, %r8d                    ## imm = 0xCEBF
	andl	-44(%rbp), %r8d
	movl	%r8d, -44(%rbp)
	movl	(%r13), %edx
	cmpl	$128, %edx
	je	LBB0_8
## %bb.4:
	cmpl	$130, %edx
	je	LBB0_10
## %bb.5:
	cmpl	$129, %edx
	jne	LBB0_7
## %bb.6:
	orl	$8192, %r8d                     ## imm = 0x2000
	jmp	LBB0_9
LBB0_8:
	orl	$64, %r8d
LBB0_9:
	movl	%r8d, -44(%rbp)
LBB0_10:
	movq	8(%r13), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	orl	$256, %r8d                      ## imm = 0x100
	movl	%r8d, -44(%rbp)
LBB0_12:
	movl	(%r15), %edx
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_write
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	(%r13), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP
	movl	(%r15), %edx
	movl	(%r12), %ecx
	leaq	-44(%rbp), %r8
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_cl45_read
	movl	(%rbx), %edi
	movl	-44(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP
	jmp	LBB0_13
LBB0_7:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_WC_DEVAD,4,2              ## @MDIO_WC_DEVAD
	.comm	_MDIO_WC_REG_RX66_CONTROL,4,2   ## @MDIO_WC_REG_RX66_CONTROL
	.comm	_SPEED_AUTO_NEG,4,2             ## @SPEED_AUTO_NEG
	.comm	_MDIO_WC_REG_COMBO_IEEE0_MIICTRL,4,2 ## @MDIO_WC_REG_COMBO_IEEE0_MIICTRL
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set SGMII AUTONEG\n"

L_.str.1:                               ## @.str.1
	.asciz	"Speed not supported: 0x%x\n"

	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
L_.str.2:                               ## @.str.2
	.asciz	"set SGMII force speed %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"  (readback) %x\n"

	.comm	_MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1,4,2 ## @MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1
	.comm	_MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X2,4,2 ## @MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X2
	.no_dead_strip	_bnx2x_warpcore_set_sgmii_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_warpcore_set_sgmii_speed
_bnx2x_warpcore_set_sgmii_speed:        ; @bnx2x_warpcore_set_sgmii_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x20, [x1]
Lloh0:
	adrp	x24, _MDIO_WC_DEVAD@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MDIO_WC_DEVAD@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh2:
	adrp	x8, _MDIO_WC_REG_RX66_CONTROL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MDIO_WC_REG_RX66_CONTROL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w4, #-24577
	bl	_bnx2x_cl45_read_and_write
	mov	x0, x19
	mov	x1, x23
	bl	_bnx2x_warpcore_set_lpi_passthrough
	cbnz	x22, LBB0_2
; %bb.1:
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _SPEED_AUTO_NEG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SPEED_AUTO_NEG@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
LBB0_2:
	ldr	w2, [x24]
Lloh8:
	adrp	x8, _MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w4, #4096
	bl	_bnx2x_cl45_read_or_write
Lloh11:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	bl	_DP
	ldr	w2, [x24]
Lloh16:
	adrp	x22, _MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1@GOTPAGE
Lloh17:
	ldr	x22, [x22, _MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1@GOTPAGEOFF]
	ldr	w3, [x22]
	add	x4, sp, #24
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_read
	ldr	w8, [sp, #24]
	mov	w9, #65354
	and	w8, w8, w9
	cmp	x21, #0
	csinc	w4, w8, wzr, eq
	str	w4, [sp, #24]
	ldr	w2, [x24]
	ldr	w3, [x22]
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_write
	ldr	w2, [x24]
Lloh18:
	adrp	x21, _MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X2@GOTPAGE
Lloh19:
	ldr	x21, [x21, _MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X2@GOTPAGEOFF]
	ldr	w3, [x21]
	add	x4, sp, #20
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_read
	ldr	w2, [x24]
	ldr	w3, [x21]
	ldr	w8, [sp, #20]
	and	w4, w8, #0xfffffffb
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_write
	ldr	w2, [x24]
	ldr	w3, [x21]
	ldr	w8, [sp, #20]
	orr	w4, w8, #0x4
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_write
	ldr	w2, [x24]
	ldr	w3, [x22]
	ldr	w8, [sp, #24]
	orr	w4, w8, #0x10
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_write
LBB0_4:
	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
	add	sp, sp, #96
	ret
LBB0_5:
	ldr	w2, [x24]
Lloh20:
	adrp	x22, _MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPAGE
Lloh21:
	ldr	x22, [x22, _MDIO_WC_REG_COMBO_IEEE0_MIICTRL@GOTPAGEOFF]
	ldr	w3, [x22]
	add	x4, sp, #28
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_read
	ldr	w8, [sp, #28]
	mov	w9, #52927
	and	w4, w8, w9
	str	w4, [sp, #28]
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #130
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_14
; %bb.8:
	orr	w4, w4, #0x2000
	b	LBB0_10
LBB0_9:
	orr	w4, w4, #0x40
LBB0_10:
	str	w4, [sp, #28]
LBB0_11:
	ldr	x8, [x19, #8]
Lloh22:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh23:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
	orr	w4, w4, #0x100
	str	w4, [sp, #28]
LBB0_13:
	ldr	w2, [x24]
	ldr	w3, [x22]
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_write
Lloh25:
	adrp	x23, _NETIF_MSG_LINK@GOTPAGE
Lloh26:
	ldr	x23, [x23, _NETIF_MSG_LINK@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DP
	ldr	w2, [x24]
	ldr	w3, [x22]
	add	x4, sp, #28
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_cl45_read
	ldr	w0, [x23]
	ldr	w8, [sp, #28]
	str	x8, [sp]
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_14:
Lloh31:
	adrp	x9, _NETIF_MSG_LINK@GOTPAGE
Lloh32:
	ldr	x9, [x9, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DP
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_WC_DEVAD,4,2              ; @MDIO_WC_DEVAD
	.comm	_MDIO_WC_REG_RX66_CONTROL,4,2   ; @MDIO_WC_REG_RX66_CONTROL
	.comm	_SPEED_AUTO_NEG,4,2             ; @SPEED_AUTO_NEG
	.comm	_MDIO_WC_REG_COMBO_IEEE0_MIICTRL,4,2 ; @MDIO_WC_REG_COMBO_IEEE0_MIICTRL
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set SGMII AUTONEG\n"

l_.str.1:                               ; @.str.1
	.asciz	"Speed not supported: 0x%x\n"

	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
l_.str.2:                               ; @.str.2
	.asciz	"set SGMII force speed %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"  (readback) %x\n"

	.comm	_MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1,4,2 ; @MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1
	.comm	_MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X2,4,2 ; @MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X2
	.no_dead_strip	_bnx2x_warpcore_set_sgmii_speed
.subsections_via_symbols
