	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_hwrm_nvm_req
_bnxt_hwrm_nvm_req:                     ## @bnxt_hwrm_nvm_req
	.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	%r8, %r12
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_BNXT_VF
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	_nvm_params@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	jle	LBB0_2
## %bb.5:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	$24, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	cmpq	%rbx, -24(%rdi,%r12)
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	callq	_ARRAY_SIZE
	cltq
	addq	$32, %r12
	cmpq	%rax, %r15
	jl	LBB0_6
## %bb.9:
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $rbx
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	jmp	LBB0_10
LBB0_2:
	xorl	%r15d, %r15d
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $rbx
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	jmp	LBB0_11
LBB0_7:
	movq	-16(%rdi,%r12), %rbx
	movl	-8(%rdi,%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-4(%rdi,%r12), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	(%rdi,%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_10:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jne	LBB0_13
## %bb.12:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_13:
	movq	_BNXT_NVM_PORT_CFG@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_15
## %bb.14:
	movl	16(%r13), %r15d
	jmp	LBB0_17
LBB0_15:
	movq	_BNXT_NVM_FUNC_CFG@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpq	(%rax), %rbx
	jne	LBB0_17
## %bb.16:
	movl	20(%r13), %r15d
	movq	_BNXT_FIRST_PF_FID@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_17:
	movq	8(%r13), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %rdx
	movl	$4, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movq	%rax, %r14
	movl	-56(%rbp), %edi
	callq	_cpu_to_le64
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 40(%rbx)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movq	%rax, 32(%rbx)
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movq	%rax, 24(%rbx)
	movl	%r15d, %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%rbx)
	testl	%r15d, %r15d
	je	LBB0_21
## %bb.20:
	movl	$1, %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%rbx)
LBB0_21:
	movq	(%rbx), %r15
	movq	_HWRM_NVM_SET_VARIABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	cmpq	%rax, %r15
	je	LBB0_22
## %bb.23:
	movq	_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_hwrm_send_message_silent
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.24:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_bnxt_copy_from_nvm_data
	xorl	%ebx, %ebx
	jmp	LBB0_25
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_bnxt_copy_to_nvm_data
	movq	_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_hwrm_send_message
	movl	%eax, %ebx
LBB0_25:
	movq	8(%r13), %rdi
	movl	-56(%rbp), %ecx
	movl	$4, %esi
	movq	%r14, %rdx
	callq	_dma_free_coherent
	movq	_EACCES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_27
## %bb.26:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_nvm_params,8,3                 ## @nvm_params
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_BNXT_NVM_PORT_CFG,8,3          ## @BNXT_NVM_PORT_CFG
	.comm	_BNXT_NVM_FUNC_CFG,8,3          ## @BNXT_NVM_FUNC_CFG
	.comm	_BNXT_FIRST_PF_FID,4,2          ## @BNXT_FIRST_PF_FID
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HWRM_NVM_SET_VARIABLE,4,2      ## @HWRM_NVM_SET_VARIABLE
	.comm	_HWRM_CMD_TIMEOUT,4,2           ## @HWRM_CMD_TIMEOUT
	.comm	_EACCES,4,2                     ## @EACCES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PF does not have admin privileges to modify NVM config\n"

	.no_dead_strip	_bnxt_hwrm_nvm_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_hwrm_nvm_req
_bnxt_hwrm_nvm_req:                     ; @bnxt_hwrm_nvm_req
	.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, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	bl	_BNXT_VF
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_23
LBB0_2:
Lloh2:
	adrp	x25, _nvm_params@GOTPAGE
Lloh3:
	ldr	x25, [x25, _nvm_params@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x24, #0
	mov	x27, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	x8, [x0, x24]
	cmp	x8, x23
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	bl	_ARRAY_SIZE
	add	x24, x24, #32
	cmp	x27, w0, sxtw
	b.lt	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	w27, #0
LBB0_7:
                                        ; implicit-def: $w26
                                        ; implicit-def: $w23
                                        ; implicit-def: $x28
                                        ; implicit-def: $w24
	b	LBB0_9
LBB0_8:
	add	x8, x0, x24
	ldr	x28, [x8, #8]
	ldp	w23, w26, [x8, #16]
	ldr	w24, [x8, #24]
LBB0_9:
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w27, w0
	b.ne	LBB0_11
; %bb.10:
Lloh4:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_23
LBB0_11:
Lloh6:
	adrp	x8, _BNXT_NVM_PORT_CFG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BNXT_NVM_PORT_CFG@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x28, x8
	b.ne	LBB0_13
; %bb.12:
	ldr	w27, [x19, #16]
	b	LBB0_16
LBB0_13:
Lloh9:
	adrp	x8, _BNXT_NVM_FUNC_CFG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BNXT_NVM_FUNC_CFG@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x28, x8
	b.ne	LBB0_15
; %bb.14:
	ldr	w8, [x19, #20]
Lloh12:
	adrp	x9, _BNXT_FIRST_PF_FID@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BNXT_FIRST_PF_FID@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	sub	w27, w8, w9
	b	LBB0_16
LBB0_15:
	mov	w27, #0
LBB0_16:
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	w1, #4
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_22
; %bb.17:
	mov	x25, x0
	ldr	w0, [sp, #12]
	bl	_cpu_to_le64
	str	w0, [x22, #40]
	mov	x0, x23
	bl	_cpu_to_le16
	str	x0, [x22, #32]
	mov	x0, x26
	bl	_cpu_to_le16
	str	x0, [x22, #24]
	mov	x0, x27
	bl	_cpu_to_le16
	str	x0, [x22, #16]
	cbz	w27, LBB0_19
; %bb.18:
	mov	w0, #1
	bl	_cpu_to_le16
	str	x0, [x22, #8]
LBB0_19:
	ldr	x26, [x22]
Lloh18:
	adrp	x8, _HWRM_NVM_SET_VARIABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HWRM_NVM_SET_VARIABLE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	cmp	x26, x0
	b.eq	LBB0_25
; %bb.20:
Lloh21:
	adrp	x8, _HWRM_CMD_TIMEOUT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HWRM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_hwrm_send_message_silent
	mov	x21, x0
	cbnz	w0, LBB0_26
; %bb.21:
	mov	x0, x20
	mov	x1, x25
	mov	x2, x23
	mov	x3, x24
	bl	_bnxt_copy_from_nvm_data
	b	LBB0_26
LBB0_22:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_24:
	mov	x0, x21
	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_25:
	mov	x0, x25
	mov	x1, x20
	mov	x2, x23
	mov	x3, x24
	bl	_bnxt_copy_to_nvm_data
Lloh26:
	adrp	x8, _HWRM_CMD_TIMEOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HWRM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh28:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_hwrm_send_message
	mov	x21, x0
LBB0_26:
	ldr	x0, [x19, #8]
	ldr	w3, [sp, #12]
	mov	w1, #4
	mov	x2, x25
	bl	_dma_free_coherent
Lloh29:
	adrp	x8, _EACCES@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmn	w21, w8
	b.ne	LBB0_24
; %bb.27:
	ldr	w0, [x19]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_24
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_nvm_params,8,3                 ; @nvm_params
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_BNXT_NVM_PORT_CFG,8,3          ; @BNXT_NVM_PORT_CFG
	.comm	_BNXT_NVM_FUNC_CFG,8,3          ; @BNXT_NVM_FUNC_CFG
	.comm	_BNXT_FIRST_PF_FID,4,2          ; @BNXT_FIRST_PF_FID
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HWRM_NVM_SET_VARIABLE,4,2      ; @HWRM_NVM_SET_VARIABLE
	.comm	_HWRM_CMD_TIMEOUT,4,2           ; @HWRM_CMD_TIMEOUT
	.comm	_EACCES,4,2                     ; @EACCES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PF does not have admin privileges to modify NVM config\n"

	.no_dead_strip	_bnxt_hwrm_nvm_req
.subsections_via_symbols
