	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_span_init             ## -- Begin function mlxsw_sp_span_init
	.p2align	4, 0x90
_mlxsw_sp_span_init:                    ## @mlxsw_sp_span_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	%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	%rdi, %r12
	movl	16(%rdi), %edi
	movq	_MAX_SPAN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	16(%r12), %edi
	movl	(%rbx), %esi
	callq	_MLXSW_CORE_RES_GET
	movl	%eax, (%r12)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	xorl	%r14d, %r14d
	cmpl	$0, (%r12)
	jle	LBB0_8
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	movl	$0, (%r15)
	cmpl	$2, (%r12)
	jl	LBB0_8
## %bb.6:
	movl	$1, %ebx
	movl	$12, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %r13
	leaq	(%r15,%r13), %rdi
	callq	_INIT_LIST_HEAD
	movl	%ebx, (%r13,%rbx,8)
	incq	%rbx
	movslq	(%r12), %rax
	addq	$8, %r15
	cmpq	%rax, %rbx
	jl	LBB0_7
	jmp	LBB0_8
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SPAN,4,2                   ## @MAX_SPAN
	.comm	_EIO,4,2                        ## @EIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_span_init             ; -- Begin function mlxsw_sp_span_init
	.p2align	2
_mlxsw_sp_span_init:                    ; @mlxsw_sp_span_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]
Lloh0:
	adrp	x20, _MAX_SPAN@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MAX_SPAN@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_7
; %bb.1:
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
	bl	_MLXSW_CORE_RES_GET
	str	w0, [x19]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x20, x0
	add	x0, x0, #4
	bl	_INIT_LIST_HEAD
	mov	w0, #0
	str	wzr, [x20]
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.4:
	mov	w20, #1
	mov	w21, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x22, x8, x21
	add	x0, x22, #4
	bl	_INIT_LIST_HEAD
	str	w20, [x22]
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x21, x21, #8
	cmp	x20, x8
	b.lt	LBB0_5
LBB0_6:
	mov	w0, #0
	b	LBB0_10
LBB0_7:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SPAN,4,2                   ; @MAX_SPAN
	.comm	_EIO,4,2                        ; @EIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
