	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_mcp_get_flash_size         ## -- Begin function qed_mcp_get_flash_size
	.p2align	4, 0x90
_qed_mcp_get_flash_size:                ## @qed_mcp_get_flash_size
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_IS_VF
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movq	_MCP_REG_NVM_CFG4@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_qed_rd
	movq	_MCP_REG_NVM_CFG4_FLASH_SIZE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_MCP_REG_NVM_CFG4_FLASH_SIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_MCP_BYTES_PER_MBIT_SHIFT@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movl	%edx, (%r14)
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MCP_REG_NVM_CFG4,4,2           ## @MCP_REG_NVM_CFG4
	.comm	_MCP_REG_NVM_CFG4_FLASH_SIZE,4,2 ## @MCP_REG_NVM_CFG4_FLASH_SIZE
	.comm	_MCP_REG_NVM_CFG4_FLASH_SIZE_SHIFT,4,2 ## @MCP_REG_NVM_CFG4_FLASH_SIZE_SHIFT
	.comm	_MCP_BYTES_PER_MBIT_SHIFT,4,2   ## @MCP_BYTES_PER_MBIT_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_mcp_get_flash_size         ; -- Begin function qed_mcp_get_flash_size
	.p2align	2
_qed_mcp_get_flash_size:                ; @qed_mcp_get_flash_size
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_IS_VF
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _MCP_REG_NVM_CFG4@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCP_REG_NVM_CFG4@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_qed_rd
	mov	x8, x0
	mov	w0, #0
Lloh6:
	adrp	x9, _MCP_REG_NVM_CFG4_FLASH_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MCP_REG_NVM_CFG4_FLASH_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh9:
	adrp	x9, _MCP_REG_NVM_CFG4_FLASH_SIZE_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MCP_REG_NVM_CFG4_FLASH_SIZE_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _MCP_BYTES_PER_MBIT_SHIFT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MCP_BYTES_PER_MBIT_SHIFT@GOTPAGEOFF]
	asr	w8, w8, w9
Lloh14:
	ldr	w9, [x10]
	add	w8, w8, w9
	mov	w9, #1
	lsl	w8, w9, w8
	str	w8, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MCP_REG_NVM_CFG4,4,2           ; @MCP_REG_NVM_CFG4
	.comm	_MCP_REG_NVM_CFG4_FLASH_SIZE,4,2 ; @MCP_REG_NVM_CFG4_FLASH_SIZE
	.comm	_MCP_REG_NVM_CFG4_FLASH_SIZE_SHIFT,4,2 ; @MCP_REG_NVM_CFG4_FLASH_SIZE_SHIFT
	.comm	_MCP_BYTES_PER_MBIT_SHIFT,4,2   ; @MCP_BYTES_PER_MBIT_SHIFT
.subsections_via_symbols
