	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_tunnel_add_shared_mac
_nfp_tunnel_add_shared_mac:             ## @nfp_tunnel_add_shared_mac
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movq	_NFP_MAX_MAC_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%rsi), %esi
	callq	_nfp_tunnel_lookup_offloaded_macs
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movl	(%r14), %edi
	callq	_nfp_tunnel_is_mac_idx_global
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	cmpq	$0, 24(%r14)
	je	LBB0_3
LBB0_4:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_nfp_tunnel_offloaded_macs_inc_ref_and_link
	xorl	%r12d, %r12d
	jmp	LBB0_25
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.15:
	movl	%ebx, %edi
	callq	_nfp_tunnel_get_mac_idx_from_phy_port_id
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_3:
	movq	%r13, %rdi
	callq	_nfp_flower_is_supported_bridge
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_NFP_TUN_PRE_TUN_IDX_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%r14), %ebx
	jne	LBB0_12
LBB0_7:
	movq	_NFP_MAX_MAC_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ida_simple_get
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_nfp_tunnel_get_global_mac_idx_from_ida
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_nfp_flower_is_supported_bridge
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_NFP_TUN_PRE_TUN_IDX_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	orl	%r12d, %ebx
	testq	%r14, %r14
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_12
LBB0_16:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%rax, %r14
	movl	16(%rax), %edi
	movl	(%r13), %esi
	callq	_ether_addr_copy
	leaq	12(%r14), %rdi
	callq	_INIT_LIST_HEAD
	leaq	4(%r12), %rdi
	movq	%r14, %rsi
	addq	$4, %rsi
	movq	_offloaded_macs_params@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_rhashtable_insert_fast
	testq	%rax, %rax
	je	LBB0_12
## %bb.19:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_20
LBB0_12:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %esi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	___nfp_tunnel_offload_mac
	testl	%eax, %eax
	je	LBB0_24
## %bb.13:
	movl	%eax, %r15d
	cmpl	$0, 8(%r14)
	jne	LBB0_21
## %bb.14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	4(%rax), %rdi
	leaq	4(%r14), %rsi
	movq	_offloaded_macs_params@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_rhashtable_remove_fast
LBB0_20:
	movq	%r14, %rdi
	callq	_kfree
LBB0_21:
	movl	%r15d, %r12d
	jmp	LBB0_22
LBB0_8:
	movl	%eax, %r12d
	jmp	LBB0_25
LBB0_17:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_22:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	_NFP_MAX_MAC_INDEX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	je	LBB0_25
## %bb.23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ida_simple_remove
	jmp	LBB0_25
LBB0_24:
	movl	%ebx, (%r14)
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_nfp_tunnel_offloaded_macs_inc_ref_and_link
LBB0_25:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_MAX_MAC_INDEX,4,2          ## @NFP_MAX_MAC_INDEX
	.comm	_NFP_TUN_PRE_TUN_IDX_BIT,4,2    ## @NFP_TUN_PRE_TUN_IDX_BIT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_offloaded_macs_params,4,2      ## @offloaded_macs_params
	.no_dead_strip	_nfp_tunnel_add_shared_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_tunnel_add_shared_mac
_nfp_tunnel_add_shared_mac:             ; @nfp_tunnel_add_shared_mac
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x3
	mov	x25, x2
	mov	x22, x1
	mov	x24, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x26, _NFP_MAX_MAC_INDEX@GOTPAGE
Lloh1:
	ldr	x26, [x26, _NFP_MAX_MAC_INDEX@GOTPAGEOFF]
	ldr	w20, [x26]
	ldr	w1, [x1]
	bl	_nfp_tunnel_lookup_offloaded_macs
	mov	x23, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w0, [x23]
	bl	_nfp_tunnel_is_mac_idx_global
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_6
LBB0_3:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_nfp_tunnel_offloaded_macs_inc_ref_and_link
	mov	w24, #0
	b	LBB0_22
LBB0_4:
	cbz	w25, LBB0_8
; %bb.5:
	mov	x0, x25
	bl	_nfp_tunnel_get_mac_idx_from_phy_port_id
	mov	x25, x0
	b	LBB0_10
LBB0_6:
	mov	x0, x22
	bl	_nfp_flower_is_supported_bridge
	cbz	x0, LBB0_3
; %bb.7:
	ldr	w8, [x23]
Lloh2:
	adrp	x9, _NFP_TUN_PRE_TUN_IDX_BIT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NFP_TUN_PRE_TUN_IDX_BIT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w25, w9, w8
	cbnz	w25, LBB0_13
LBB0_8:
	ldr	w2, [x26]
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_ida_simple_get
	mov	x20, x0
	tbnz	w0, #31, LBB0_17
; %bb.9:
	mov	x0, x20
	bl	_nfp_tunnel_get_global_mac_idx_from_ida
	mov	x25, x0
	mov	x0, x22
	bl	_nfp_flower_is_supported_bridge
Lloh8:
	adrp	x8, _NFP_TUN_PRE_TUN_IDX_BIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NFP_TUN_PRE_TUN_IDX_BIT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w25, w8, w25
	cbnz	x23, LBB0_13
LBB0_10:
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_18
; %bb.11:
	mov	x23, x0
	ldr	w0, [x0, #16]
	ldr	w1, [x22]
	bl	_ether_addr_copy
	add	x0, x23, #12
	bl	_INIT_LIST_HEAD
	add	x0, x19, #4
	add	x1, x23, #4
Lloh14:
	adrp	x8, _offloaded_macs_params@GOTPAGE
Lloh15:
	ldr	x8, [x8, _offloaded_macs_params@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_rhashtable_insert_fast
	cbz	x0, LBB0_13
; %bb.12:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_16
LBB0_13:
	ldr	w1, [x22]
	mov	x0, x24
	mov	x2, x25
	mov	w3, #0
	bl	___nfp_tunnel_offload_mac
	mov	x24, x0
	cbz	w0, LBB0_21
; %bb.14:
	ldr	w8, [x23, #8]
	cbnz	w8, LBB0_19
; %bb.15:
	add	x0, x19, #4
	add	x1, x23, #4
Lloh20:
	adrp	x8, _offloaded_macs_params@GOTPAGE
Lloh21:
	ldr	x8, [x8, _offloaded_macs_params@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	bl	_rhashtable_remove_fast
LBB0_16:
	mov	x0, x23
	bl	_kfree
	b	LBB0_19
LBB0_17:
	mov	x24, x20
	b	LBB0_22
LBB0_18:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_19:
	ldr	w8, [x26]
	cmp	w20, w8
	b.eq	LBB0_22
; %bb.20:
	mov	x0, x19
	mov	x1, x20
	bl	_ida_simple_remove
	b	LBB0_22
LBB0_21:
	str	w25, [x23]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_nfp_tunnel_offloaded_macs_inc_ref_and_link
LBB0_22:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_MAX_MAC_INDEX,4,2          ; @NFP_MAX_MAC_INDEX
	.comm	_NFP_TUN_PRE_TUN_IDX_BIT,4,2    ; @NFP_TUN_PRE_TUN_IDX_BIT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_offloaded_macs_params,4,2      ; @offloaded_macs_params
	.no_dead_strip	_nfp_tunnel_add_shared_mac
.subsections_via_symbols
