	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_unsplit
_mlxsw_sp_port_unsplit:                 ## @mlxsw_sp_port_unsplit
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_mlxsw_core_driver_priv
	movq	%rax, %r13
	movq	_LOCAL_PORTS_IN_1X@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_LOCAL_PORTS_IN_2X@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_MLXSW_CORE_RES_GET
	movq	%rax, %rbx
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_MLXSW_CORE_RES_GET
	movq	%rax, %r12
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	cmpl	$0, 12(%rax)
	je	LBB0_7
## %bb.9:
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_mlxsw_sp_cluster_base_port_get
	leaq	2(%rax), %r14
	cmpq	%r15, %r14
	cmovaq	%rax, %r14
	xorl	%ecx, %ecx
	cmpq	$1, -48(%rbp)                   ## 8-byte Folded Reload
	sete	%cl
	leal	2(%rcx,%rcx), %r15d
	cmoveq	%rbx, %r12
	cmoveq	%rax, %r14
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rbx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	%r12, %rbx
	decq	%r15
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sp_port_created
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sp_port_remove
	jmp	LBB0_12
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_13:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_mlxsw_sp_port_unsplit_create
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_5:
	movq	(%r13), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	callq	_dev_err
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_7:
	movl	8(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_err
	leaq	L_.str.3(%rip), %rsi
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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 was not split\n"

L_.str.3:                               ## @.str.3
	.asciz	"Port was not split"

	.no_dead_strip	_mlxsw_sp_port_unsplit
.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_unsplit
_mlxsw_sp_port_unsplit:                 ; @mlxsw_sp_port_unsplit
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_mlxsw_core_driver_priv
	mov	x19, x0
Lloh0:
	adrp	x23, _LOCAL_PORTS_IN_1X@GOTPAGE
Lloh1:
	ldr	x23, [x23, _LOCAL_PORTS_IN_1X@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x22
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_8
; %bb.1:
Lloh2:
	adrp	x24, _LOCAL_PORTS_IN_2X@GOTPAGE
Lloh3:
	ldr	x24, [x24, _LOCAL_PORTS_IN_2X@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x22
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_8
; %bb.2:
	ldr	w1, [x23]
	mov	x0, x22
	bl	_MLXSW_CORE_RES_GET
	mov	x23, x0
	ldr	w1, [x24]
	mov	x0, x22
	bl	_MLXSW_CORE_RES_GET
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	cbz	x8, LBB0_10
; %bb.3:
	ldr	w9, [x8, #12]
	cbz	w9, LBB0_11
; %bb.4:
	ldr	x22, [x8]
	mov	w8, #2
	mov	w9, #4
	cmp	x22, #1
	csel	x23, x23, x0, eq
	csel	w20, w9, w8, eq
	mov	x0, x21
	bl	_mlxsw_sp_cluster_base_port_get
	add	x8, x0, #2
	cmp	x8, x21
	ccmp	x22, #1, #4, ls
	csel	x21, x0, x8, eq
	mov	x24, x20
	mov	x22, x21
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, x23
	subs	x24, x24, #1
	b.eq	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_mlxsw_sp_port_created
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_mlxsw_sp_port_remove
	b	LBB0_5
LBB0_8:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_mlxsw_sp_port_unsplit_create
	mov	w0, #0
	b	LBB0_14
LBB0_10:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
	ldr	w0, [x8, #8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_12:
	mov	x0, x20
	bl	_NL_SET_ERR_MSG_MOD
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.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 was not split\n"

l_.str.3:                               ; @.str.3
	.asciz	"Port was not split"

	.no_dead_strip	_mlxsw_sp_port_unsplit
.subsections_via_symbols
