	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_load_phy_fw                 ## -- Begin function t4_load_phy_fw
	.p2align	4, 0x90
_t4_load_phy_fw:                        ## @t4_load_phy_fw
	.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	%r9, %r13
	movq	%r8, %r12
	movq	%rdi, %r15
	movl	$0, -44(%rbp)
	testq	%rcx, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	je	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	*%rcx
	movl	%eax, %ebx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_t4_phy_fw_ver
	testl	%eax, %eax
	js	LBB0_15
## %bb.2:
	movl	-44(%rbp), %edx
	cmpl	%ebx, %edx
	jl	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_CH_WARN
	jmp	LBB0_16
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movq	_FW_PARAMS_MNEM_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_PARAMS_MNEM_V
	movl	%eax, %r14d
	movq	_FW_PARAMS_PARAM_DEV_PHYFW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_PARAMS_PARAM_X_V
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movl	8(%r15), %edi
	callq	_FW_PARAMS_PARAM_Y_V
	movl	%eax, %r14d
	movq	_FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_PARAMS_PARAM_Z_V
	orl	%r14d, %eax
	orl	%ebx, %eax
	movl	%eax, -52(%rbp)
	movl	%r13d, -48(%rbp)
	movl	(%r15), %edx
	movl	4(%r15), %esi
	subq	$8, %rsp
	leaq	-48(%rbp), %rax
	leaq	-52(%rbp), %r9
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	pushq	$1
	pushq	$1
	pushq	%rax
	callq	_t4_query_params_rw
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_15
## %bb.6:
	movl	-48(%rbp), %eax
	movzbl	%al, %ebx
                                        ## kill: def $eax killed $eax killed $rax
	sarl	$8, %eax
	movslq	%eax, %r14
	shlq	$16, %rbx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.7:
	callq	_spin_lock_bh
	movq	_T4_MEMORY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movq	%r14, %rdx
	movq	%rbx, %rcx
	movq	%r13, %r8
	movq	%r12, %r9
	pushq	%rax
	callq	_t4_memory_rw
	addq	$16, %rsp
	movl	%eax, %r14d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_bh
	testl	%r14d, %r14d
	jne	LBB0_16
	jmp	LBB0_11
LBB0_10:
	movq	_T4_MEMORY_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movq	%r14, %rdx
	movq	%rbx, %rcx
	movq	%r13, %r8
	movq	%r12, %r9
	pushq	%rax
	callq	_t4_memory_rw
	addq	$16, %rsp
	movl	%eax, %r14d
	testl	%r14d, %r14d
	jne	LBB0_16
LBB0_11:
	movq	_FW_PARAMS_MNEM_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_PARAMS_MNEM_V
	movl	%eax, %r14d
	movq	_FW_PARAMS_PARAM_DEV_PHYFW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_PARAMS_PARAM_X_V
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movl	8(%r15), %edi
	callq	_FW_PARAMS_PARAM_Y_V
	movl	%eax, %r14d
	movq	_FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FW_PARAMS_PARAM_Z_V
	orl	%r14d, %eax
	orl	%ebx, %eax
	movl	%eax, -52(%rbp)
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movl	$1, %r14d
	leaq	-52(%rbp), %r9
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	pushq	$30000                          ## imm = 0x7530
	leaq	-48(%rbp), %rax
	pushq	%rax
	callq	_t4_set_params_timeout
	addq	$16, %rsp
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_16
## %bb.12:
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_t4_phy_fw_ver
	testl	%eax, %eax
	js	LBB0_15
## %bb.13:
	movl	-44(%rbp), %edx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %edx
	je	LBB0_16
## %bb.14:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_CH_WARN
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_15:
	movl	%eax, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY Firmware already up-to-date, version %#x\n"

	.comm	_FW_PARAMS_MNEM_DEV,4,2         ## @FW_PARAMS_MNEM_DEV
	.comm	_FW_PARAMS_PARAM_DEV_PHYFW,4,2  ## @FW_PARAMS_PARAM_DEV_PHYFW
	.comm	_FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD,4,2 ## @FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD
	.comm	_T4_MEMORY_WRITE,4,2            ## @T4_MEMORY_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"PHY Firmware did not update: version on adapter %#x, version flashed %#x\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_load_phy_fw                 ; -- Begin function t4_load_phy_fw
	.p2align	2
_t4_load_phy_fw:                        ; @t4_load_phy_fw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x23, x5
	mov	x22, x4
	mov	x21, x3
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
	str	wzr, [sp, #20]
	cbz	x3, LBB0_4
; %bb.1:
	mov	x0, x22
	mov	x1, x23
	blr	x21
	mov	x20, x0
	add	x1, sp, #20
	mov	x0, x19
	bl	_t4_phy_fw_ver
	tbnz	w0, #31, LBB0_13
; %bb.2:
	ldr	w2, [sp, #20]
	cmp	w2, w20
	b.lt	LBB0_5
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_CH_WARN
	mov	w26, #0
	b	LBB0_14
LBB0_4:
	mov	w20, #0
LBB0_5:
Lloh2:
	adrp	x8, _FW_PARAMS_MNEM_DEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FW_PARAMS_MNEM_DEV@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_FW_PARAMS_MNEM_V
	mov	x26, x0
Lloh5:
	adrp	x8, _FW_PARAMS_PARAM_DEV_PHYFW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FW_PARAMS_PARAM_DEV_PHYFW@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_FW_PARAMS_PARAM_X_V
	orr	w26, w0, w26
	ldr	w0, [x19, #8]
	bl	_FW_PARAMS_PARAM_Y_V
	orr	w26, w26, w0
Lloh8:
	adrp	x28, _FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD@GOTPAGE
Lloh9:
	ldr	x28, [x28, _FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD@GOTPAGEOFF]
	ldr	w0, [x28]
	bl	_FW_PARAMS_PARAM_Z_V
	orr	w8, w26, w0
	stp	w23, w8, [sp, #24]
	ldp	w2, w1, [x19]
	mov	w8, #1
	str	w8, [sp]
	add	x5, sp, #28
	add	x6, sp, #24
	mov	x0, x19
	mov	w3, #0
	mov	w4, #1
	mov	w7, #1
	bl	_t4_query_params_rw
	tbnz	w0, #31, LBB0_13
; %bb.6:
	ldr	w8, [sp, #24]
	sbfx	x26, x8, #8, #24
	lsl	w8, w8, #16
	and	x27, x8, #0xff0000
	cbz	x24, LBB0_8
; %bb.7:
	mov	x0, x24
	bl	_spin_lock_bh
Lloh10:
	adrp	x8, _T4_MEMORY_WRITE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _T4_MEMORY_WRITE@GOTPAGEOFF]
Lloh12:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x1, x25
	mov	x2, x26
	mov	x3, x27
	mov	x4, x23
	mov	x5, x22
	bl	_t4_memory_rw
	mov	x26, x0
	mov	x0, x24
	bl	_spin_unlock_bh
	cbnz	w26, LBB0_14
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x8, _T4_MEMORY_WRITE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _T4_MEMORY_WRITE@GOTPAGEOFF]
Lloh15:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x1, x25
	mov	x2, x26
	mov	x3, x27
	mov	x4, x23
	mov	x5, x22
	bl	_t4_memory_rw
	mov	x26, x0
	cbnz	w26, LBB0_14
LBB0_9:
Lloh16:
	adrp	x8, _FW_PARAMS_MNEM_DEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FW_PARAMS_MNEM_DEV@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_FW_PARAMS_MNEM_V
	mov	x22, x0
Lloh19:
	adrp	x8, _FW_PARAMS_PARAM_DEV_PHYFW@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FW_PARAMS_PARAM_DEV_PHYFW@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_FW_PARAMS_PARAM_X_V
	orr	w22, w0, w22
	ldr	w0, [x19, #8]
	bl	_FW_PARAMS_PARAM_Y_V
	orr	w22, w22, w0
	ldr	w0, [x28]
	bl	_FW_PARAMS_PARAM_Z_V
	orr	w8, w22, w0
	str	w8, [sp, #28]
	ldp	w2, w1, [x19]
	mov	w26, #1
	add	x5, sp, #28
	add	x6, sp, #24
	mov	x0, x19
	mov	w3, #0
	mov	w4, #1
	mov	w7, #30000
	bl	_t4_set_params_timeout
	cbz	x21, LBB0_14
; %bb.10:
	add	x1, sp, #20
	mov	x0, x19
	bl	_t4_phy_fw_ver
	tbnz	w0, #31, LBB0_13
; %bb.11:
	ldr	w2, [sp, #20]
	cmp	w2, w20
	b.ne	LBB0_15
; %bb.12:
	mov	w26, #1
	b	LBB0_14
LBB0_13:
	mov	x26, x0
LBB0_14:
	mov	x0, x26
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
	str	x20, [sp]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_CH_WARN
Lloh24:
	adrp	x8, _ENXIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY Firmware already up-to-date, version %#x\n"

	.comm	_FW_PARAMS_MNEM_DEV,4,2         ; @FW_PARAMS_MNEM_DEV
	.comm	_FW_PARAMS_PARAM_DEV_PHYFW,4,2  ; @FW_PARAMS_PARAM_DEV_PHYFW
	.comm	_FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD,4,2 ; @FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD
	.comm	_T4_MEMORY_WRITE,4,2            ; @T4_MEMORY_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"PHY Firmware did not update: version on adapter %#x, version flashed %#x\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
.subsections_via_symbols
