	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv88e6xxx_register_switch
_mv88e6xxx_register_switch:             ## @mv88e6xxx_register_switch
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	callq	_mv88e6xxx_num_ports
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dsa_switch_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, 24(%rax)
	movq	%r14, 16(%rax)
	movq	_mv88e6xxx_switch_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_U8_MAX@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, 4(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_dev_set_drvdata
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dsa_register_switch            ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mv88e6xxx_switch_ops,4,2       ## @mv88e6xxx_switch_ops
	.comm	_U8_MAX,4,2                     ## @U8_MAX
	.no_dead_strip	_mv88e6xxx_register_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv88e6xxx_register_switch
_mv88e6xxx_register_switch:             ; @mv88e6xxx_register_switch
	.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	x20, x0
	ldr	x19, [x0, #8]
	bl	_mv88e6xxx_num_ports
	mov	x1, x0
	mov	x0, x19
	bl	_dsa_switch_alloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
	str	x20, [x0, #24]
Lloh0:
	adrp	x8, _mv88e6xxx_switch_ops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mv88e6xxx_switch_ops@GOTPAGEOFF]
	stp	x8, x19, [x0, #8]
	ldr	x8, [x20]
	ldr	w8, [x8]
	str	w8, [x0]
Lloh2:
	adrp	x9, _U8_MAX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _U8_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	mul	w8, w9, w8
	str	w8, [x0, #4]
	mov	x0, x19
	mov	x1, x21
	bl	_dev_set_drvdata
	mov	x0, x21
	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
	b	_dsa_register_switch
LBB0_2:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mv88e6xxx_switch_ops,4,2       ; @mv88e6xxx_switch_ops
	.comm	_U8_MAX,4,2                     ; @U8_MAX
	.no_dead_strip	_mv88e6xxx_register_switch
.subsections_via_symbols
