	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_span_inspected_port_add
_mlxsw_sp_span_inspected_port_add:      ## @mlxsw_sp_span_inspected_port_add
	.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
	movl	%ecx, %r13d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %r14
	movq	_MLXSW_REG_SBIB_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.1:
	cmpl	$0, 8(%r14)
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rdi
	addq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %rdx
	movl	%r13d, %ecx
	callq	_mlxsw_sp_span_entry_bound_port_find
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movslq	8(%r14), %rax
	addq	$4, %rbx
	cmpq	%rax, %r12
	jl	LBB0_4
LBB0_6:
	movq	_MLXSW_SP_SPAN_EGRESS@GOTPCREL(%rip), %rcx
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, (%rcx)
	jne	LBB0_9
## %bb.7:
	movq	8(%r15), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mlxsw_sp_span_mtu_to_buffsize
	movl	(%r15), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_mlxsw_reg_sbib_pack
	movl	(%r14), %r12d
	movq	_sbib@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%r12d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_mlxsw_reg_write
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_16
LBB0_9:
	testl	%r13d, %r13d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	$1, %ecx
	callq	_mlxsw_sp_span_inspected_port_bind
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
LBB0_11:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.18:
	movl	(%r15), %ecx
	movl	%ecx, 12(%rax)
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movl	%r13d, 4(%rax)
	addq	$8, %rax
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_list_add_tail
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_5:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%r13d, %r13d
	je	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_mlxsw_sp_span_inspected_port_bind
LBB0_14:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movq	_MLXSW_SP_SPAN_EGRESS@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_16
## %bb.15:
	movl	(%r15), %esi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mlxsw_reg_sbib_pack
	movl	(%r14), %r14d
	movq	_sbib@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%r14d, %edi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_mlxsw_reg_write
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.17:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_SBIB_LEN,4,2         ## @MLXSW_REG_SBIB_LEN
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_MLXSW_SP_SPAN_EGRESS,4,2       ## @MLXSW_SP_SPAN_EGRESS
	.comm	_sbib,4,2                       ## @sbib
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not create shared buffer for mirroring\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlxsw_sp_span_inspected_port_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_span_inspected_port_add
_mlxsw_sp_span_inspected_port_add:      ; @mlxsw_sp_span_inspected_port_add
	.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
	sub	sp, sp, #16
	mov	x24, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x19, [x0, #16]
Lloh3:
	adrp	x8, _MLXSW_REG_SBIB_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_REG_SBIB_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	cbz	w3, LBB0_5
; %bb.1:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x25, #0
	mov	x26, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x25
	mov	x1, x22
	mov	x2, x21
	mov	x3, x24
	bl	_mlxsw_sp_span_entry_bound_port_find
	cbnz	x0, LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x19, #8]
	add	x25, x25, #4
	cmp	x26, x8
	b.lt	LBB0_3
LBB0_5:
Lloh8:
	adrp	x26, _MLXSW_SP_SPAN_EGRESS@GOTPAGE
Lloh9:
	ldr	x26, [x26, _MLXSW_SP_SPAN_EGRESS@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, w22
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [x21, #8]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mlxsw_sp_span_mtu_to_buffsize
	mov	x2, x0
	ldr	w1, [x21]
	mov	x0, x20
	bl	_mlxsw_reg_sbib_pack
	ldr	w25, [x19]
Lloh10:
	adrp	x8, _sbib@GOTPAGE
Lloh11:
	ldr	x8, [x8, _sbib@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x25
	mov	x2, x20
	bl	_mlxsw_reg_write
	cbz	w0, LBB0_8
; %bb.7:
	mov	x25, x0
	ldr	x0, [x21, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_17
LBB0_8:
	cbz	w24, LBB0_10
; %bb.9:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	mov	w3, #1
	bl	_mlxsw_sp_span_inspected_port_bind
	mov	x25, x0
	cbnz	w0, LBB0_15
LBB0_10:
Lloh15:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.11:
	ldr	w8, [x21]
	str	w8, [x0, #12]
	stp	w22, w24, [x0], #8
	mov	x1, x23
	bl	_list_add_tail
	mov	w25, #0
	b	LBB0_17
LBB0_12:
Lloh18:
	adrp	x8, _EEXIST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_17
LBB0_13:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w25, w8
	cbz	w24, LBB0_15
; %bb.14:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	mov	w3, #0
	bl	_mlxsw_sp_span_inspected_port_bind
LBB0_15:
	ldr	w8, [x26]
	cmp	w8, w22
	b.ne	LBB0_17
; %bb.16:
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #0
	bl	_mlxsw_reg_sbib_pack
	ldr	w19, [x19]
Lloh24:
	adrp	x8, _sbib@GOTPAGE
Lloh25:
	ldr	x8, [x8, _sbib@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_mlxsw_reg_write
LBB0_17:
	ldur	x8, [x29, #-72]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x25
	sub	sp, x29, #64
	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
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_SBIB_LEN,4,2         ; @MLXSW_REG_SBIB_LEN
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_MLXSW_SP_SPAN_EGRESS,4,2       ; @MLXSW_SP_SPAN_EGRESS
	.comm	_sbib,4,2                       ; @sbib
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not create shared buffer for mirroring\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlxsw_sp_span_inspected_port_add
.subsections_via_symbols
