	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_get_link_params             ## -- Begin function t4_get_link_params
	.p2align	4, 0x90
_t4_get_link_params:                    ## @t4_get_link_params
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movl	4(%rax), %r14d
	leaq	-80(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_FW_PORT_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_CMD_OP_V
	movl	%eax, %ebx
	movq	_FW_CMD_REQUEST_F@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_FW_CMD_READ_F@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	8(%r15), %edi
	callq	_FW_PORT_CMD_PORTID_V
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	%rax, -48(%rbp)
	movq	_FW_CAPS16@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_1
## %bb.2:
	movq	_FW_PORT_ACTION_GET_PORT_INFO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_FW_PORT_ACTION_GET_PORT_INFO32@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_FW_PORT_CMD_ACTION_V
	movl	%eax, %ebx
	movq	-48(%rbp), %rax
	movq	%rax, 32(%rsp)
	movups	-80(%rbp), %xmm0
	movups	-64(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_FW_LEN16
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	%rax, -56(%rbp)
	movq	(%r15), %rdi
	movl	(%rdi), %esi
	movq	%r13, %rdx
	movl	$40, %ecx
	movq	%r13, %r8
	callq	_t4_wr_mbox
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movq	_FW_PORT_ACTION_GET_PORT_INFO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_6
## %bb.5:
	movl	-64(%rbp), %edi
	callq	_be32_to_cpu
	movq	_FW_PORT_CMD_LSTATUS_F@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	andl	%eax, %r13d
	movl	%eax, %edi
	callq	_lstatus_to_fwcap
	movq	%rax, %r14
	movl	-68(%rbp), %edi
	callq	_be16_to_cpu
	jmp	LBB0_7
LBB0_6:
	movl	-72(%rbp), %edi
	callq	_be32_to_cpu
	movq	%rax, %r13
	movq	_FW_PORT_CMD_LSTATUS32_F@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movl	-76(%rbp), %edi
	callq	_be32_to_cpu
	movq	%rax, %r14
	movl	-80(%rbp), %edi
	callq	_be32_to_cpu
	movq	%rax, %rdi
	callq	_FW_PORT_CMD_MTU32_G
LBB0_7:
	movl	%eax, %r15d
	xorl	%eax, %eax
	testl	%r13d, %r13d
	setne	%al
	movl	%eax, (%r12)
	movq	%r14, %rdi
	callq	_fwcap_to_speed
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
LBB0_8:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FW_PORT_CMD,4,2                ## @FW_PORT_CMD
	.comm	_FW_CMD_REQUEST_F,4,2           ## @FW_CMD_REQUEST_F
	.comm	_FW_CMD_READ_F,4,2              ## @FW_CMD_READ_F
	.comm	_FW_CAPS16,4,2                  ## @FW_CAPS16
	.comm	_FW_PORT_ACTION_GET_PORT_INFO,4,2 ## @FW_PORT_ACTION_GET_PORT_INFO
	.comm	_FW_PORT_ACTION_GET_PORT_INFO32,4,2 ## @FW_PORT_ACTION_GET_PORT_INFO32
	.comm	_FW_PORT_CMD_LSTATUS_F,4,2      ## @FW_PORT_CMD_LSTATUS_F
	.comm	_FW_PORT_CMD_LSTATUS32_F,4,2    ## @FW_PORT_CMD_LSTATUS32_F
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_get_link_params             ; -- Begin function t4_get_link_params
	.p2align	2
_t4_get_link_params:                    ; @t4_get_link_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x0]
	ldr	w23, [x8, #4]
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh0:
	adrp	x8, _FW_PORT_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FW_PORT_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_FW_CMD_OP_V
Lloh3:
	adrp	x8, _FW_CMD_REQUEST_F@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FW_CMD_REQUEST_F@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh6:
	adrp	x9, _FW_CMD_READ_F@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FW_CMD_READ_F@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w24, w8, w9
	ldr	w0, [x22, #8]
	bl	_FW_PORT_CMD_PORTID_V
	orr	w0, w24, w0
	bl	_cpu_to_be32
	str	x0, [sp, #72]
Lloh9:
	adrp	x8, _FW_CAPS16@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FW_CAPS16@GOTPAGEOFF]
Lloh11:
	adrp	x25, _FW_PORT_ACTION_GET_PORT_INFO@GOTPAGE
Lloh12:
	ldr	x25, [x25, _FW_PORT_ACTION_GET_PORT_INFO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _FW_PORT_ACTION_GET_PORT_INFO32@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FW_PORT_ACTION_GET_PORT_INFO32@GOTPAGEOFF]
	cmp	w23, w8
	csel	x8, x25, x9, eq
	ldr	w23, [x8]
	mov	x0, x23
	bl	_FW_PORT_CMD_ACTION_V
	mov	x24, x0
	ldur	q0, [sp, #40]
	ldur	q1, [sp, #56]
	stp	q0, q1, [sp]
	ldr	x8, [sp, #72]
	str	x8, [sp, #32]
	mov	x0, sp
	bl	_FW_LEN16
	orr	w0, w0, w24
	bl	_cpu_to_be32
	str	x0, [sp, #64]
	ldr	x0, [x22]
	ldr	w1, [x0]
	add	x2, sp, #40
	add	x4, sp, #40
	mov	w3, #40
	bl	_t4_wr_mbox
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x25]
	cmp	w23, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [sp, #56]
	bl	_be32_to_cpu
Lloh16:
	adrp	x8, _FW_PORT_CMD_LSTATUS_F@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FW_PORT_CMD_LSTATUS_F@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	and	w25, w8, w0
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_lstatus_to_fwcap
	mov	x23, x0
	ldr	w0, [sp, #52]
	bl	_be16_to_cpu
	b	LBB0_4
LBB0_3:
	ldr	w0, [sp, #48]
	bl	_be32_to_cpu
Lloh19:
	adrp	x8, _FW_PORT_CMD_LSTATUS32_F@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FW_PORT_CMD_LSTATUS32_F@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w25, w8, w0
	ldr	w0, [sp, #44]
	bl	_be32_to_cpu
	mov	x23, x0
	ldr	w0, [sp, #40]
	bl	_be32_to_cpu
	bl	_FW_PORT_CMD_MTU32_G
LBB0_4:
	mov	x24, x0
	cmp	w25, #0
	cset	w8, ne
	str	w8, [x21]
	mov	x0, x23
	bl	_fwcap_to_speed
	str	w0, [x20]
	str	w24, [x19]
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_FW_PORT_CMD,4,2                ; @FW_PORT_CMD
	.comm	_FW_CMD_REQUEST_F,4,2           ; @FW_CMD_REQUEST_F
	.comm	_FW_CMD_READ_F,4,2              ; @FW_CMD_READ_F
	.comm	_FW_CAPS16,4,2                  ; @FW_CAPS16
	.comm	_FW_PORT_ACTION_GET_PORT_INFO,4,2 ; @FW_PORT_ACTION_GET_PORT_INFO
	.comm	_FW_PORT_ACTION_GET_PORT_INFO32,4,2 ; @FW_PORT_ACTION_GET_PORT_INFO32
	.comm	_FW_PORT_CMD_LSTATUS_F,4,2      ; @FW_PORT_CMD_LSTATUS_F
	.comm	_FW_PORT_CMD_LSTATUS32_F,4,2    ; @FW_PORT_CMD_LSTATUS32_F
.subsections_via_symbols
