	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_nve_resources_query
_mlxsw_sp_nve_resources_query:          ## @mlxsw_sp_nve_resources_query
	.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	%rdi, %rbx
	movl	8(%rdi), %edi
	movq	_MAX_NVE_MC_ENTRIES_IPV4@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	movq	_MAX_NVE_MC_ENTRIES_IPV6@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	8(%rbx), %edi
	movl	(%r14), %esi
	callq	_MLXSW_CORE_RES_GET
	movq	(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	_MLXSW_SP_L3_PROTO_IPV4@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	8(%rbx), %edi
	movl	(%r15), %esi
	callq	_MLXSW_CORE_RES_GET
	movq	(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	_MLXSW_SP_L3_PROTO_IPV6@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NVE_MC_ENTRIES_IPV4,4,2    ## @MAX_NVE_MC_ENTRIES_IPV4
	.comm	_MAX_NVE_MC_ENTRIES_IPV6,4,2    ## @MAX_NVE_MC_ENTRIES_IPV6
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MLXSW_SP_L3_PROTO_IPV4,8,3     ## @MLXSW_SP_L3_PROTO_IPV4
	.comm	_MLXSW_SP_L3_PROTO_IPV6,8,3     ## @MLXSW_SP_L3_PROTO_IPV6
	.no_dead_strip	_mlxsw_sp_nve_resources_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_nve_resources_query
_mlxsw_sp_nve_resources_query:          ; @mlxsw_sp_nve_resources_query
	.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, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x21, _MAX_NVE_MC_ENTRIES_IPV4@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_NVE_MC_ENTRIES_IPV4@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x20, _MAX_NVE_MC_ENTRIES_IPV6@GOTPAGE
Lloh3:
	ldr	x20, [x20, _MAX_NVE_MC_ENTRIES_IPV6@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x19, #8]
	ldr	w1, [x21]
	bl	_MLXSW_CORE_RES_GET
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _MLXSW_SP_L3_PROTO_IPV4@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MLXSW_SP_L3_PROTO_IPV4@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh6:
	ldr	x9, [x9]
	str	w0, [x8, x9, lsl #2]
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
	bl	_MLXSW_CORE_RES_GET
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	ldr	x9, [x9]
Lloh7:
	adrp	x10, _MLXSW_SP_L3_PROTO_IPV6@GOTPAGE
Lloh8:
	ldr	x10, [x10, _MLXSW_SP_L3_PROTO_IPV6@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NVE_MC_ENTRIES_IPV4,4,2    ; @MAX_NVE_MC_ENTRIES_IPV4
	.comm	_MAX_NVE_MC_ENTRIES_IPV6,4,2    ; @MAX_NVE_MC_ENTRIES_IPV6
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MLXSW_SP_L3_PROTO_IPV4,8,3     ; @MLXSW_SP_L3_PROTO_IPV4
	.comm	_MLXSW_SP_L3_PROTO_IPV6,8,3     ; @MLXSW_SP_L3_PROTO_IPV6
	.no_dead_strip	_mlxsw_sp_nve_resources_query
.subsections_via_symbols
