	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_get_nvram_directory
_bnxt_get_nvram_directory:              ## @bnxt_get_nvram_directory
	.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, %r15
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movq	$0, -72(%rbp)
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_nvm_get_dir_info
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	cmpl	$1, %r13d
	jg	LBB0_4
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movl	-52(%rbp), %eax
	movl	%eax, (%r15)
	movl	-48(%rbp), %eax
	movl	%eax, 4(%r15)
	addq	$8, %r15
	addl	$-2, %r13d
	movq	%r15, %rdi
	movl	$255, %esi
	movl	%r13d, %edx
	callq	_memset
	movslq	-52(%rbp), %rax
	movslq	-48(%rbp), %r12
	imulq	%rax, %r12
	movq	(%r14), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	movq	%r12, %rsi
	callq	_dma_alloc_coherent
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	_HWRM_NVM_GET_DIR_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$-1, %ecx
	movl	$-1, %r8d
	callq	_bnxt_hwrm_cmd_hdr_init
	movl	-44(%rbp), %edi
	callq	_cpu_to_le64
	movl	%eax, -72(%rbp)
	movq	_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_hwrm_send_message
	movl	%eax, %r12d
	testl	%eax, %eax
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	movl	%r13d, %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %rdx
	cmovaeq	%rax, %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_memcpy
LBB0_8:
	movq	(%r14), %rdi
	movl	-44(%rbp), %ecx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_dma_free_coherent
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma_alloc_coherent failure, length = %u\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HWRM_NVM_GET_DIR_ENTRIES,4,2   ## @HWRM_NVM_GET_DIR_ENTRIES
	.comm	_HWRM_CMD_TIMEOUT,4,2           ## @HWRM_CMD_TIMEOUT
	.no_dead_strip	_bnxt_get_nvram_directory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_get_nvram_directory
_bnxt_get_nvram_directory:              ; @bnxt_get_nvram_directory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x22, x2
	mov	x20, x1
	mov	x23, x0
	bl	_netdev_priv
	mov	x19, x0
	str	xzr, [sp, #8]
	add	x1, sp, #28
	add	x2, sp, #24
	mov	x0, x23
	bl	_nvm_get_dir_info
	mov	x25, x0
	cbnz	w0, LBB0_9
; %bb.1:
	cmp	w20, #1
	b.gt	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	ldp	w9, w8, [sp, #24]
	add	x21, x22, #8
	stp	w8, w9, [x22]
	sub	w22, w20, #2
	mov	x0, x21
	mov	w1, #255
	mov	x2, x22
	bl	_memset
	ldpsw	x9, x8, [sp, #24]
	mul	x20, x9, x8
	ldr	x0, [x19]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	add	x2, sp, #20
	mov	x1, x20
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_7
; %bb.4:
	mov	x24, x0
Lloh5:
	adrp	x8, _HWRM_NVM_GET_DIR_ENTRIES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HWRM_NVM_GET_DIR_ENTRIES@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w3, #-1
	mov	w4, #-1
	bl	_bnxt_hwrm_cmd_hdr_init
	ldr	w0, [sp, #20]
	bl	_cpu_to_le64
	str	w0, [sp, #8]
Lloh8:
	adrp	x8, _HWRM_CMD_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HWRM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	bl	_hwrm_send_message
	mov	x25, x0
	cbnz	w0, LBB0_6
; %bb.5:
	cmp	x22, x20
	csel	x2, x22, x20, lo
	mov	x0, x21
	mov	x1, x24
	bl	_memcpy
LBB0_6:
	ldr	x0, [x19]
	ldr	w3, [sp, #20]
	mov	x1, x20
	mov	x2, x24
	bl	_dma_free_coherent
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x20
	bl	_netdev_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_9:
	mov	x0, x25
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma_alloc_coherent failure, length = %u\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HWRM_NVM_GET_DIR_ENTRIES,4,2   ; @HWRM_NVM_GET_DIR_ENTRIES
	.comm	_HWRM_CMD_TIMEOUT,4,2           ; @HWRM_CMD_TIMEOUT
	.no_dead_strip	_bnxt_get_nvram_directory
.subsections_via_symbols
