	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mlxsw_sx_port_ib_create
___mlxsw_sx_port_ib_create:             ## @__mlxsw_sx_port_ib_create
	.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, %r13
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, 16(%rax)
	movq	%r12, (%rax)
	movq	%r13, 8(%rax)
	movq	%rax, %rdi
	callq	_mlxsw_sx_port_system_port_mapping_set
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movq	16(%r14), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_15
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_16
LBB0_4:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mlxsw_sx_port_swid_set
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movq	16(%r14), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_15
LBB0_6:
	incq	%r13
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_mlxsw_sx_port_ib_port_set
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_14
LBB0_8:
	movq	_MLXSW_REG_PTYS_IB_SPEED_EDR@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	decq	%r15
	movl	$3, %edi
	callq	_BIT
	leaq	-1(%rax), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mlxsw_sx_port_ib_speed_set
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_14
LBB0_10:
	movq	_MLXSW_IB_DEFAULT_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mlxsw_sx_port_mtu_ib_set
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_14
LBB0_12:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mlxsw_sx_port_admin_status_set
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
LBB0_14:
	movq	16(%r14), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	callq	_dev_err
	movq	_MLXSW_PORT_SWID_DISABLED_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mlxsw_sx_port_swid_set
LBB0_15:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_16:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	8(%r14), %edi
	movq	(%rbx), %rsi
	movq	%rbx, %rdx
	callq	_mlxsw_core_port_ib_set
	movq	(%r14), %rax
	movq	%rbx, (%rax,%r12,8)
	xorl	%r15d, %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port %d: Failed to set system port mapping\n"

L_.str.1:                               ## @.str.1
	.asciz	"Port %d: Failed to set SWID\n"

L_.str.2:                               ## @.str.2
	.asciz	"Port %d: Failed to set IB port\n"

	.comm	_MLXSW_REG_PTYS_IB_SPEED_EDR,8,3 ## @MLXSW_REG_PTYS_IB_SPEED_EDR
L_.str.3:                               ## @.str.3
	.asciz	"Port %d: Failed to set speed\n"

	.comm	_MLXSW_IB_DEFAULT_MTU,4,2       ## @MLXSW_IB_DEFAULT_MTU
L_.str.4:                               ## @.str.4
	.asciz	"Port %d: Failed to set MTU\n"

L_.str.5:                               ## @.str.5
	.asciz	"Port %d: Failed to change admin state to UP\n"

	.comm	_MLXSW_PORT_SWID_DISABLED_PORT,4,2 ## @MLXSW_PORT_SWID_DISABLED_PORT
	.no_dead_strip	___mlxsw_sx_port_ib_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mlxsw_sx_port_ib_create
___mlxsw_sx_port_ib_create:             ; @__mlxsw_sx_port_ib_create
	.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	x23, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	stp	x23, x20, [x0, #8]
	str	x22, [x0]
	bl	_mlxsw_sx_port_system_port_mapping_set
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	ldr	x2, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_15
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_4:
	mov	x0, x19
	mov	w1, #1
	bl	_mlxsw_sx_port_swid_set
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	ldr	x2, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_15
LBB0_6:
	add	x1, x23, #1
	mov	x0, x19
	bl	_mlxsw_sx_port_ib_port_set
	cbz	w0, LBB0_8
; %bb.7:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_8:
Lloh12:
	adrp	x8, _MLXSW_REG_PTYS_IB_SPEED_EDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLXSW_REG_PTYS_IB_SPEED_EDR@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	sub	x21, x8, #1
	mov	w0, #3
	bl	_BIT
	sub	x2, x0, #1
	mov	x0, x19
	mov	x1, x21
	bl	_mlxsw_sx_port_ib_speed_set
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_10:
Lloh17:
	adrp	x8, _MLXSW_IB_DEFAULT_MTU@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLXSW_IB_DEFAULT_MTU@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mlxsw_sx_port_mtu_ib_set
	cbz	w0, LBB0_12
; %bb.11:
	mov	x21, x0
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	bl	_mlxsw_sx_port_admin_status_set
	mov	x21, x0
	cbz	w0, LBB0_17
; %bb.13:
Lloh22:
	adrp	x1, l_.str.5@PAGE
Lloh23:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_14:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	ldr	x2, [x19]
	bl	_dev_err
Lloh24:
	adrp	x8, _MLXSW_PORT_SWID_DISABLED_PORT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MLXSW_PORT_SWID_DISABLED_PORT@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mlxsw_sx_port_swid_set
LBB0_15:
	mov	x0, x19
	bl	_kfree
LBB0_16:
	mov	x0, x21
	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
LBB0_17:
	ldr	w0, [x20, #8]
	ldr	x1, [x19]
	mov	x2, x19
	bl	_mlxsw_core_port_ib_set
	ldr	x8, [x20]
	str	x19, [x8, x22, lsl #3]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port %d: Failed to set system port mapping\n"

l_.str.1:                               ; @.str.1
	.asciz	"Port %d: Failed to set SWID\n"

l_.str.2:                               ; @.str.2
	.asciz	"Port %d: Failed to set IB port\n"

	.comm	_MLXSW_REG_PTYS_IB_SPEED_EDR,8,3 ; @MLXSW_REG_PTYS_IB_SPEED_EDR
l_.str.3:                               ; @.str.3
	.asciz	"Port %d: Failed to set speed\n"

	.comm	_MLXSW_IB_DEFAULT_MTU,4,2       ; @MLXSW_IB_DEFAULT_MTU
l_.str.4:                               ; @.str.4
	.asciz	"Port %d: Failed to set MTU\n"

l_.str.5:                               ; @.str.5
	.asciz	"Port %d: Failed to change admin state to UP\n"

	.comm	_MLXSW_PORT_SWID_DISABLED_PORT,4,2 ; @MLXSW_PORT_SWID_DISABLED_PORT
	.no_dead_strip	___mlxsw_sx_port_ib_create
.subsections_via_symbols
