	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_sb_ports_init
_mlxsw_sp_sb_ports_init:                ## @mlxsw_sp_sb_ports_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	16(%rdi), %edi
	callq	_mlxsw_core_max_ports
	movl	%eax, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%eax, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	(%r12), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	(%r12), %rcx
	movq	%rax, 8(%rcx)
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.6:
	movq	(%rcx), %rsi
	movq	%r12, %rdi
	callq	_mlxsw_sp_sb_port_init
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	movl	%eax, %r14d
	xorl	%r15d, %r15d
	testl	%r15d, %r15d
	jne	LBB0_9
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_14:
	movl	%r15d, %ebx
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	incq	%r15
	cmpq	%rbx, %r15
	je	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	(%r12), %rax
	leaq	(,%r15,4), %rsi
	addq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_mlxsw_sp_sb_port_init
	testl	%eax, %eax
	je	LBB0_15
## %bb.17:
	movl	%eax, %r14d
	testl	%r15d, %r15d
	je	LBB0_11
LBB0_9:
	leal	1(%r15), %ebx
	decl	%r15d
	shlq	$2, %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	callq	_mlxsw_sp_sb_port_fini
	decl	%ebx
	addq	$-4, %r15
	cmpl	$1, %ebx
	jg	LBB0_10
LBB0_11:
	movq	(%r12), %rax
	movq	8(%rax), %rdi
	callq	_kfree
LBB0_12:
	movq	(%r12), %rax
	movq	(%rax), %rdi
	callq	_kfree
LBB0_13:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlxsw_sp_sb_ports_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_sb_ports_init
_mlxsw_sp_sb_ports_init:                ; @mlxsw_sp_sb_ports_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_mlxsw_core_max_ports
	mov	x21, x0
Lloh0:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #4
	bl	_kcalloc
	ldr	x8, [x19]
	str	x0, [x8]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x20]
	mov	w1, #4
	bl	_kcalloc
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x19]
	str	x0, [x8, #8]
	cbz	w21, LBB0_15
; %bb.3:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_mlxsw_sp_sb_port_init
	cbz	w0, LBB0_7
; %bb.4:
	mov	x20, x0
	mov	x22, #0
	cbnz	w22, LBB0_11
	b	LBB0_13
LBB0_5:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_16
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_14
LBB0_7:
	mov	x22, #0
	mov	w21, w21
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x22, #1
	cmp	x22, x21
	b.eq	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x1, x8, x22, lsl #2
	mov	x0, x19
	bl	_mlxsw_sp_sb_port_init
	cbz	w0, LBB0_8
; %bb.10:
	mov	x20, x0
	cbz	w22, LBB0_13
LBB0_11:
	add	w21, w22, #1
	sub	w8, w22, #1
	lsl	x22, x8, #2
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x0, x8, x22
	bl	_mlxsw_sp_sb_port_fini
	sub	w21, w21, #1
	sub	x22, x22, #4
	cmp	w21, #1
	b.gt	LBB0_12
LBB0_13:
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	bl	_kfree
LBB0_14:
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_kfree
	b	LBB0_16
LBB0_15:
	mov	w20, #0
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlxsw_sp_sb_ports_init
.subsections_via_symbols
