	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efx_mcdi_bist
_efx_mcdi_bist:                         ## @efx_mcdi_bist
	.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	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$256, %edi                      ## imm = 0x100
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_MC_CMD_START_BIST_OUT_LEN@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
	callq	_BUILD_BUG_ON
	movq	_START_BIST_IN_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_MCDI_SET_DWORD
	movq	_MC_CMD_START_BIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MC_CMD_START_BIST_IN_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	$0, (%rsp)
	movq	%r13, %rdi
	movq	%r15, %rdx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_efx_mcdi_rpc
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_15:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_16
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	$100, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movq	_MC_CMD_POLL_BIST_IN_LEN@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	setne	%dil
	callq	_BUILD_BUG_ON
	movq	_MC_CMD_POLL_BIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	movl	$256, %r9d                      ## imm = 0x100
	callq	_efx_mcdi_rpc
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_POLL_BIST_OUT_RESULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_MCDI_DWORD
	movq	%rax, %r14
	movq	_MC_CMD_POLL_BIST_RUNNING@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$100, %edi
	callq	_msleep
	decl	%r12d
	jne	LBB0_4
## %bb.8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_5:
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_9:
	movq	_MC_CMD_POLL_BIST_PASSED@GOTPCREL(%rip), %r12
	xorl	%eax, %eax
	cmpq	(%r12), %r14
	sete	%al
	addl	%eax, %eax
	decl	%eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	(%r13), %rax
	movq	_PHY_TYPE_SFT9001B@GOTPCREL(%rip), %rcx
	movl	$1, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.10:
	movq	_MC_CMD_PHY_BIST_CABLE_SHORT@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_MC_CMD_PHY_BIST_CABLE_LONG@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_15
LBB0_12:
	movq	_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_MCDI_PTR
	movl	$9, %ebx
	cmpq	(%r12), %r14
	jne	LBB0_15
## %bb.13:
	movq	%rax, %r13
	movq	-64(%rbp), %rax
	movq	_MC_CMD_POLL_BIST_OUT_SFT9001_LEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_15
## %bb.14:
	movl	(%r13), %edi
	movq	_EFX_DWORD_0@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_EFX_DWORD_FIELD
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, 4(%r12)
	movl	4(%r13), %edi
	movl	(%r14), %esi
	callq	_EFX_DWORD_FIELD
	movl	%eax, 8(%r12)
	movl	8(%r13), %edi
	movl	(%r14), %esi
	callq	_EFX_DWORD_FIELD
	movl	%eax, 12(%r12)
	movl	12(%r13), %edi
	movl	(%r14), %esi
	callq	_EFX_DWORD_FIELD
	movl	%eax, 16(%r12)
	movl	16(%r13), %edi
	movl	(%r14), %esi
	callq	_EFX_DWORD_FIELD
	movl	%eax, 20(%r12)
	movl	20(%r13), %edi
	movl	(%r14), %esi
	callq	_EFX_DWORD_FIELD
	movl	%eax, 24(%r12)
	movl	24(%r13), %edi
	movl	(%r14), %esi
	callq	_EFX_DWORD_FIELD
	movl	%eax, 28(%r12)
	movl	28(%r13), %edi
	movl	(%r14), %esi
	callq	_EFX_DWORD_FIELD
	movl	%eax, 32(%r12)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MC_CMD_START_BIST_OUT_LEN,8,3  ## @MC_CMD_START_BIST_OUT_LEN
	.comm	_START_BIST_IN_TYPE,4,2         ## @START_BIST_IN_TYPE
	.comm	_MC_CMD_START_BIST,4,2          ## @MC_CMD_START_BIST
	.comm	_MC_CMD_START_BIST_IN_LEN,4,2   ## @MC_CMD_START_BIST_IN_LEN
	.comm	_MC_CMD_POLL_BIST_IN_LEN,8,3    ## @MC_CMD_POLL_BIST_IN_LEN
	.comm	_MC_CMD_POLL_BIST,4,2           ## @MC_CMD_POLL_BIST
	.comm	_POLL_BIST_OUT_RESULT,4,2       ## @POLL_BIST_OUT_RESULT
	.comm	_MC_CMD_POLL_BIST_RUNNING,8,3   ## @MC_CMD_POLL_BIST_RUNNING
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_MC_CMD_POLL_BIST_PASSED,8,3    ## @MC_CMD_POLL_BIST_PASSED
	.comm	_PHY_TYPE_SFT9001B,8,3          ## @PHY_TYPE_SFT9001B
	.comm	_MC_CMD_PHY_BIST_CABLE_SHORT,4,2 ## @MC_CMD_PHY_BIST_CABLE_SHORT
	.comm	_MC_CMD_PHY_BIST_CABLE_LONG,4,2 ## @MC_CMD_PHY_BIST_CABLE_LONG
	.comm	_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A,4,2 ## @POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A
	.comm	_MC_CMD_POLL_BIST_OUT_SFT9001_LEN,8,3 ## @MC_CMD_POLL_BIST_OUT_SFT9001_LEN
	.comm	_EFX_DWORD_0,4,2                ## @EFX_DWORD_0
	.no_dead_strip	_efx_mcdi_bist
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efx_mcdi_bist
_efx_mcdi_bist:                         ; @efx_mcdi_bist
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #256
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _MC_CMD_START_BIST_OUT_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MC_CMD_START_BIST_OUT_LEN@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, ne
	bl	_BUILD_BUG_ON
Lloh6:
	adrp	x8, _START_BIST_IN_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _START_BIST_IN_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_MCDI_SET_DWORD
Lloh9:
	adrp	x8, _MC_CMD_START_BIST@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MC_CMD_START_BIST@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _MC_CMD_START_BIST_IN_LEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MC_CMD_START_BIST_IN_LEN@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x2, x19
	mov	x4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_efx_mcdi_rpc
	mov	x23, x0
	cbz	w0, LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_kfree
	b	LBB0_4
LBB0_3:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	str	x20, [sp]                       ; 8-byte Folded Spill
	mov	w25, #100
Lloh18:
	adrp	x26, _MC_CMD_POLL_BIST_IN_LEN@GOTPAGE
Lloh19:
	ldr	x26, [x26, _MC_CMD_POLL_BIST_IN_LEN@GOTPAGEOFF]
Lloh20:
	adrp	x27, _MC_CMD_POLL_BIST@GOTPAGE
Lloh21:
	ldr	x27, [x27, _MC_CMD_POLL_BIST@GOTPAGEOFF]
Lloh22:
	adrp	x28, _POLL_BIST_OUT_RESULT@GOTPAGE
Lloh23:
	ldr	x28, [x28, _POLL_BIST_OUT_RESULT@GOTPAGEOFF]
Lloh24:
	adrp	x20, _MC_CMD_POLL_BIST_RUNNING@GOTPAGE
Lloh25:
	ldr	x20, [x20, _MC_CMD_POLL_BIST_RUNNING@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	cmp	x8, #0
	cset	w0, ne
	bl	_BUILD_BUG_ON
	ldr	w1, [x27]
	add	x6, sp, #8
	mov	x0, x22
	mov	x2, #0
	mov	w3, #0
	mov	x4, x19
	mov	w5, #256
	bl	_efx_mcdi_rpc
	cbnz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x28]
	mov	x0, x19
	bl	_MCDI_DWORD
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #100
	bl	_msleep
	subs	w25, w25, #1
	b.ne	LBB0_6
; %bb.9:
Lloh26:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_2
LBB0_10:
	mov	x23, x0
	b	LBB0_2
LBB0_11:
	mov	x24, x0
Lloh29:
	adrp	x20, _MC_CMD_POLL_BIST_PASSED@GOTPAGE
Lloh30:
	ldr	x20, [x20, _MC_CMD_POLL_BIST_PASSED@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	mov	w23, #1
	cneg	w8, w23, ne
	ldr	x25, [sp]                       ; 8-byte Folded Reload
	str	w8, [x25]
	ldr	x8, [x22]
Lloh31:
	adrp	x9, _PHY_TYPE_SFT9001B@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PHY_TYPE_SFT9001B@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.12:
Lloh34:
	adrp	x8, _MC_CMD_PHY_BIST_CABLE_SHORT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MC_CMD_PHY_BIST_CABLE_SHORT@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _MC_CMD_PHY_BIST_CABLE_LONG@GOTPAGE
Lloh38:
	ldr	x9, [x9, _MC_CMD_PHY_BIST_CABLE_LONG@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	b.ne	LBB0_17
; %bb.13:
Lloh40:
	adrp	x8, _POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A@GOTPAGE
Lloh41:
	ldr	x8, [x8, _POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_MCDI_PTR
	ldr	x8, [x20]
	cmp	x24, x8
	b.ne	LBB0_16
; %bb.14:
	ldr	x8, [sp, #8]
Lloh43:
	adrp	x9, _MC_CMD_POLL_BIST_OUT_SFT9001_LEN@GOTPAGE
Lloh44:
	ldr	x9, [x9, _MC_CMD_POLL_BIST_OUT_SFT9001_LEN@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lo	LBB0_16
; %bb.15:
	mov	x21, x0
	ldr	w0, [x0]
Lloh46:
	adrp	x22, _EFX_DWORD_0@GOTPAGE
Lloh47:
	ldr	x22, [x22, _EFX_DWORD_0@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_EFX_DWORD_FIELD
	str	w0, [x25, #4]
	ldr	w0, [x21, #4]
	ldr	w1, [x22]
	bl	_EFX_DWORD_FIELD
	str	w0, [x25, #8]
	ldr	w0, [x21, #8]
	ldr	w1, [x22]
	bl	_EFX_DWORD_FIELD
	str	w0, [x25, #12]
	ldr	w0, [x21, #12]
	ldr	w1, [x22]
	bl	_EFX_DWORD_FIELD
	str	w0, [x25, #16]
	ldr	w0, [x21, #16]
	ldr	w1, [x22]
	bl	_EFX_DWORD_FIELD
	str	w0, [x25, #20]
	ldr	w0, [x21, #20]
	ldr	w1, [x22]
	bl	_EFX_DWORD_FIELD
	str	w0, [x25, #24]
	ldr	w0, [x21, #24]
	ldr	w1, [x22]
	bl	_EFX_DWORD_FIELD
	str	w0, [x25, #28]
	ldr	w0, [x21, #28]
	ldr	w1, [x22]
	bl	_EFX_DWORD_FIELD
	str	w0, [x25, #32]
LBB0_16:
	mov	w23, #9
	b	LBB0_2
LBB0_17:
	mov	w23, #1
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MC_CMD_START_BIST_OUT_LEN,8,3  ; @MC_CMD_START_BIST_OUT_LEN
	.comm	_START_BIST_IN_TYPE,4,2         ; @START_BIST_IN_TYPE
	.comm	_MC_CMD_START_BIST,4,2          ; @MC_CMD_START_BIST
	.comm	_MC_CMD_START_BIST_IN_LEN,4,2   ; @MC_CMD_START_BIST_IN_LEN
	.comm	_MC_CMD_POLL_BIST_IN_LEN,8,3    ; @MC_CMD_POLL_BIST_IN_LEN
	.comm	_MC_CMD_POLL_BIST,4,2           ; @MC_CMD_POLL_BIST
	.comm	_POLL_BIST_OUT_RESULT,4,2       ; @POLL_BIST_OUT_RESULT
	.comm	_MC_CMD_POLL_BIST_RUNNING,8,3   ; @MC_CMD_POLL_BIST_RUNNING
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_MC_CMD_POLL_BIST_PASSED,8,3    ; @MC_CMD_POLL_BIST_PASSED
	.comm	_PHY_TYPE_SFT9001B,8,3          ; @PHY_TYPE_SFT9001B
	.comm	_MC_CMD_PHY_BIST_CABLE_SHORT,4,2 ; @MC_CMD_PHY_BIST_CABLE_SHORT
	.comm	_MC_CMD_PHY_BIST_CABLE_LONG,4,2 ; @MC_CMD_PHY_BIST_CABLE_LONG
	.comm	_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A,4,2 ; @POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A
	.comm	_MC_CMD_POLL_BIST_OUT_SFT9001_LEN,8,3 ; @MC_CMD_POLL_BIST_OUT_SFT9001_LEN
	.comm	_EFX_DWORD_0,4,2                ; @EFX_DWORD_0
	.no_dead_strip	_efx_mcdi_bist
.subsections_via_symbols
