	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_split
_mlxsw_sp_port_split:                   ## @mlxsw_sp_port_split
	.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	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_mlxsw_core_driver_priv
	movq	%rax, %r12
	movq	_LOCAL_PORTS_IN_1X@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	_LOCAL_PORTS_IN_2X@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_GET
	movq	%rax, %r14
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_GET
	movq	%rax, %r13
	movq	8(%r12), %rax
	movq	(%rax,%r15,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.3:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rsi
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	cmpl	$2, %r14d
	je	LBB0_5
## %bb.4:
	cmpl	$4, %r14d
	jne	LBB0_11
LBB0_5:
	movq	16(%rbx), %rcx
	movq	_MLXSW_PORT_MODULE_MAX_WIDTH@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_12
## %bb.6:
	cmpl	$2, %r14d
	jne	LBB0_13
## %bb.7:
	leaq	(%r15,%r13), %rcx
	cmpq	$0, (%rax,%rcx,8)
	jne	LBB0_15
## %bb.8:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_21
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_10:
	movq	(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_11:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_err
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_16
LBB0_12:
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_netdev_err
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_16
LBB0_13:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_mlxsw_sp_cluster_base_port_get
	movq	%rax, %r15
	movq	8(%r12), %rax
	cmpq	$0, 8(%rax,%r15,8)
	jne	LBB0_15
## %bb.14:
	cmpq	$0, 24(%rax,%r15,8)
	je	LBB0_20
LBB0_15:
	movl	(%rbx), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_netdev_err
	leaq	L_.str.7(%rip), %rsi
LBB0_16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%ebx, %ebx
LBB0_18:
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_21:
	movl	%r14d, %r14d
	movq	%r15, %rbx
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_23 Depth=1
	addq	%r13, %rbx
	decq	%r14
	je	LBB0_25
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sp_port_created
	testq	%rax, %rax
	je	LBB0_22
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sp_port_remove
	jmp	LBB0_22
LBB0_25:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	movq	%r13, %r8
	callq	_mlxsw_sp_port_split_create
	testl	%eax, %eax
	je	LBB0_27
## %bb.26:
	movl	%eax, %ebx
	movq	(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_mlxsw_sp_port_unsplit_create
	jmp	LBB0_19
LBB0_27:
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_LOCAL_PORTS_IN_1X,4,2          ## @LOCAL_PORTS_IN_1X
	.comm	_LOCAL_PORTS_IN_2X,4,2          ## @LOCAL_PORTS_IN_2X
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port number \"%d\" does not exist\n"

L_.str.1:                               ## @.str.1
	.asciz	"Port number does not exist"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Port can only be split into 2 or 4 ports\n"

L_.str.3:                               ## @.str.3
	.asciz	"Port can only be split into 2 or 4 ports"

	.comm	_MLXSW_PORT_MODULE_MAX_WIDTH,8,3 ## @MLXSW_PORT_MODULE_MAX_WIDTH
L_.str.4:                               ## @.str.4
	.asciz	"Port cannot be split further\n"

L_.str.5:                               ## @.str.5
	.asciz	"Port cannot be split further"

L_.str.6:                               ## @.str.6
	.asciz	"Invalid split configuration\n"

L_.str.7:                               ## @.str.7
	.asciz	"Invalid split configuration"

L_.str.8:                               ## @.str.8
	.asciz	"Failed to create split ports\n"

	.no_dead_strip	_mlxsw_sp_port_split
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_port_split
_mlxsw_sp_port_split:                   ; @mlxsw_sp_port_split
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x3
	mov	x20, x2
	mov	x19, x1
	mov	x23, x0
	bl	_mlxsw_core_driver_priv
	mov	x21, x0
Lloh0:
	adrp	x24, _LOCAL_PORTS_IN_1X@GOTPAGE
Lloh1:
	ldr	x24, [x24, _LOCAL_PORTS_IN_1X@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x23
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_8
; %bb.1:
Lloh2:
	adrp	x26, _LOCAL_PORTS_IN_2X@GOTPAGE
Lloh3:
	ldr	x26, [x26, _LOCAL_PORTS_IN_2X@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x23
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_8
; %bb.2:
	ldr	w1, [x24]
	mov	x0, x23
	bl	_MLXSW_CORE_RES_GET
	mov	x25, x0
	ldr	w1, [x26]
	mov	x0, x23
	bl	_MLXSW_CORE_RES_GET
	ldr	x8, [x21, #8]
	ldr	x26, [x8, x19, lsl #3]
	cbz	x26, LBB0_9
; %bb.3:
	mov	x24, x0
	ldr	x23, [x26, #8]
	cmp	w20, #2
	b.eq	LBB0_5
; %bb.4:
	cmp	w20, #4
	b.ne	LBB0_10
LBB0_5:
	ldr	x9, [x26, #16]
Lloh4:
	adrp	x10, _MLXSW_PORT_MODULE_MAX_WIDTH@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MLXSW_PORT_MODULE_MAX_WIDTH@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.6:
	cmp	w20, #2
	b.ne	LBB0_12
; %bb.7:
	add	x9, x24, x19
	ldr	x8, [x8, x9, lsl #3]
	cbnz	x8, LBB0_14
	b	LBB0_19
LBB0_8:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
	ldr	x8, [x21]
	ldr	w0, [x8]
	str	x19, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_10:
	ldr	w0, [x26]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_11:
	ldr	w0, [x26]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_netdev_err
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_15
LBB0_12:
	mov	x0, x19
	bl	_mlxsw_sp_cluster_base_port_get
	ldr	x8, [x21, #8]
	add	x8, x8, x0, lsl #3
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_14
; %bb.13:
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_18
LBB0_14:
	ldr	w0, [x26]
Lloh21:
	adrp	x1, l_.str.6@PAGE
Lloh22:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_netdev_err
Lloh23:
	adrp	x1, l_.str.7@PAGE
Lloh24:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_15:
	mov	x0, x22
	bl	_NL_SET_ERR_MSG_MOD
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_17:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_18:
	mov	x19, x0
	mov	x24, x25
LBB0_19:
	mov	w25, w20
	mov	x22, x19
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	add	x22, x22, x24
	subs	x25, x25, #1
	b.eq	LBB0_23
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_mlxsw_sp_port_created
	cbz	x0, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_mlxsw_sp_port_remove
	b	LBB0_20
LBB0_23:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x3, x20
	mov	x4, x24
	bl	_mlxsw_sp_port_split_create
	mov	x22, x0
	cbz	w0, LBB0_17
; %bb.24:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str.8@PAGE
Lloh28:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_err
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_mlxsw_sp_port_unsplit_create
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_LOCAL_PORTS_IN_1X,4,2          ; @LOCAL_PORTS_IN_1X
	.comm	_LOCAL_PORTS_IN_2X,4,2          ; @LOCAL_PORTS_IN_2X
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port number \"%d\" does not exist\n"

l_.str.1:                               ; @.str.1
	.asciz	"Port number does not exist"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Port can only be split into 2 or 4 ports\n"

l_.str.3:                               ; @.str.3
	.asciz	"Port can only be split into 2 or 4 ports"

	.comm	_MLXSW_PORT_MODULE_MAX_WIDTH,8,3 ; @MLXSW_PORT_MODULE_MAX_WIDTH
l_.str.4:                               ; @.str.4
	.asciz	"Port cannot be split further\n"

l_.str.5:                               ; @.str.5
	.asciz	"Port cannot be split further"

l_.str.6:                               ; @.str.6
	.asciz	"Invalid split configuration\n"

l_.str.7:                               ; @.str.7
	.asciz	"Invalid split configuration"

l_.str.8:                               ; @.str.8
	.asciz	"Failed to create split ports\n"

	.no_dead_strip	_mlxsw_sp_port_split
.subsections_via_symbols
