	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mlxsw_sib_port_create
___mlxsw_sib_port_create:               ## @__mlxsw_sib_port_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, %rbx
	movq	%rsi, %r15
	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, %r13
	movq	%r14, 16(%rax)
	movq	%r15, (%rax)
	movq	%rbx, 8(%rax)
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_mlxsw_sib_port_swid_set
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	movq	16(%r14), %rax
	movl	(%rax), %edi
	movq	(%r13), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_4:
	incq	%rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sib_port_set
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_6:
	movq	_MLXSW_REG_PTYS_IB_SPEED_EDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	decq	%rbx
	movl	$3, %edi
	callq	_BIT
	leaq	-1(%rax), %rdx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sib_port_speed_set
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_12
LBB0_8:
	movq	_MLXSW_IB_DEFAULT_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_mlxsw_sib_port_mtu_set
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
LBB0_10:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_mlxsw_sib_port_admin_status_set
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movl	%eax, %r12d
	leaq	L_.str.4(%rip), %rsi
LBB0_12:
	movq	16(%r14), %rax
	movl	(%rax), %edi
	movq	(%r13), %rdx
	callq	_dev_err
	movq	_MLXSW_PORT_SWID_DISABLED_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_mlxsw_sib_port_swid_set
LBB0_13:
	movq	%r13, %rdi
	callq	_kfree
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	8(%r14), %edi
	movq	(%r13), %rsi
	movq	%r13, %rdx
	callq	_mlxsw_core_port_ib_set
	movq	(%r14), %rax
	movq	%r13, (%rax,%r15,8)
	xorl	%r12d, %r12d
	jmp	LBB0_14
	.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 SWID\n"

L_.str.1:                               ## @.str.1
	.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.2:                               ## @.str.2
	.asciz	"Port %d: Failed to set speed\n"

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

L_.str.4:                               ## @.str.4
	.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_sib_port_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mlxsw_sib_port_create
___mlxsw_sib_port_create:               ; @__mlxsw_sib_port_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]
	mov	w1, #0
	bl	_mlxsw_sib_port_swid_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_13
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_4:
	add	x1, x23, #1
	mov	x0, x19
	bl	_mlxsw_sib_port_set
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_6:
Lloh10:
	adrp	x8, _MLXSW_REG_PTYS_IB_SPEED_EDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MLXSW_REG_PTYS_IB_SPEED_EDR@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	sub	x21, x8, #1
	mov	w0, #3
	bl	_BIT
	sub	x2, x0, #1
	mov	x0, x19
	mov	x1, x21
	bl	_mlxsw_sib_port_speed_set
	cbz	w0, LBB0_8
; %bb.7:
	mov	x21, x0
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_8:
Lloh15:
	adrp	x8, _MLXSW_IB_DEFAULT_MTU@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLXSW_IB_DEFAULT_MTU@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mlxsw_sib_port_mtu_set
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	x0, x19
	mov	w1, #1
	bl	_mlxsw_sib_port_admin_status_set
	mov	x21, x0
	cbz	w0, LBB0_15
; %bb.11:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_12:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	ldr	x2, [x19]
	bl	_dev_err
Lloh22:
	adrp	x8, _MLXSW_PORT_SWID_DISABLED_PORT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MLXSW_PORT_SWID_DISABLED_PORT@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mlxsw_sib_port_swid_set
LBB0_13:
	mov	x0, x19
	bl	_kfree
LBB0_14:
	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_15:
	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_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.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 SWID\n"

l_.str.1:                               ; @.str.1
	.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.2:                               ; @.str.2
	.asciz	"Port %d: Failed to set speed\n"

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

l_.str.4:                               ; @.str.4
	.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_sib_port_create
.subsections_via_symbols
