	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b53_switch_detect              ## -- Begin function b53_switch_detect
	.p2align	4, 0x90
_b53_switch_detect:                     ## @b53_switch_detect
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_B53_MGMT_PAGE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_B53_DEVICE_ID@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-36(%rbp), %rcx
	callq	_b53_read8
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movl	-36(%rbp), %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	jb	LBB0_10
## %bb.2:
	testl	%edx, %edx
	jne	LBB0_5
## %bb.3:
	movq	_B53_VLAN_PAGE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_B53_VLAN_TABLE_ACCESS_25@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$15, %ecx
	callq	_b53_write16
	movl	(%r15), %esi
	movl	(%r12), %edx
	leaq	-40(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_b53_read16
	cmpl	$15, -40(%rbp)
	jne	LBB0_8
## %bb.4:
	movq	_BCM5325_DEVICE_ID@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movl	(%r14), %esi
	movl	(%r15), %edx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_b53_read32
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movl	-44(%rbp), %edx
	leal	-131(%rdx), %eax
	cmpl	$8, %eax
	jb	LBB0_10
## %bb.7:
	movl	-36(%rbp), %esi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_8:
	movq	_BCM5365_DEVICE_ID@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edx
LBB0_10:
	movl	%edx, (%rbx)
	movslq	%edx, %rax
	movq	_BCM5325_DEVICE_ID@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_12
## %bb.11:
	movq	_B53_STAT_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_B53_REV_ID_25@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movl	(%r14), %esi
	movq	_B53_REV_ID@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %edx
	leaq	4(%rbx), %rcx
	movq	%rbx, %rdi
	callq	_b53_read8
LBB0_14:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B53_MGMT_PAGE,4,2              ## @B53_MGMT_PAGE
	.comm	_B53_DEVICE_ID,4,2              ## @B53_DEVICE_ID
	.comm	_B53_VLAN_PAGE,4,2              ## @B53_VLAN_PAGE
	.comm	_B53_VLAN_TABLE_ACCESS_25,4,2   ## @B53_VLAN_TABLE_ACCESS_25
	.comm	_BCM5325_DEVICE_ID,8,3          ## @BCM5325_DEVICE_ID
	.comm	_BCM5365_DEVICE_ID,4,2          ## @BCM5365_DEVICE_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported switch detected (BCM53%02x/BCM%x)\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_B53_STAT_PAGE,4,2              ## @B53_STAT_PAGE
	.comm	_B53_REV_ID_25,4,2              ## @B53_REV_ID_25
	.comm	_B53_REV_ID,4,2                 ## @B53_REV_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b53_switch_detect              ; -- Begin function b53_switch_detect
	.p2align	2
_b53_switch_detect:                     ; @b53_switch_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _B53_MGMT_PAGE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _B53_MGMT_PAGE@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _B53_DEVICE_ID@GOTPAGE
Lloh3:
	ldr	x21, [x21, _B53_DEVICE_ID@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, sp, #4
	bl	_b53_read8
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	w2, [sp, #4]
	sub	w8, w2, #128
	cmp	w8, #3
	b.lo	LBB0_10
; %bb.2:
	cbnz	w2, LBB0_5
; %bb.3:
Lloh4:
	adrp	x21, _B53_VLAN_PAGE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _B53_VLAN_PAGE@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh6:
	adrp	x22, _B53_VLAN_TABLE_ACCESS_25@GOTPAGE
Lloh7:
	ldr	x22, [x22, _B53_VLAN_TABLE_ACCESS_25@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	mov	w3, #15
	bl	_b53_write16
	ldr	w1, [x21]
	ldr	w2, [x22]
	add	x3, sp, #8
	mov	x0, x19
	bl	_b53_read16
	ldr	w8, [sp, #8]
	cmp	w8, #15
	b.ne	LBB0_8
; %bb.4:
Lloh8:
	adrp	x8, _BCM5325_DEVICE_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BCM5325_DEVICE_ID@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	ldr	w1, [x20]
	ldr	w2, [x21]
	add	x3, sp, #12
	mov	x0, x19
	bl	_b53_read32
	cbnz	w0, LBB0_14
; %bb.6:
	ldr	w2, [sp, #12]
	sub	w8, w2, #131
	cmp	w8, #8
	b.lo	LBB0_10
; %bb.7:
	ldr	w1, [sp, #4]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_8:
Lloh15:
	adrp	x8, _BCM5365_DEVICE_ID@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BCM5365_DEVICE_ID@GOTPAGEOFF]
LBB0_9:
	ldr	w2, [x8]
LBB0_10:
	str	w2, [x19]
Lloh17:
	adrp	x8, _BCM5325_DEVICE_ID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BCM5325_DEVICE_ID@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x8, w2, sxtw
	b.ne	LBB0_12
; %bb.11:
Lloh20:
	adrp	x8, _B53_STAT_PAGE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _B53_STAT_PAGE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _B53_REV_ID_25@GOTPAGE
Lloh24:
	ldr	x8, [x8, _B53_REV_ID_25@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
	ldr	w1, [x20]
Lloh25:
	adrp	x8, _B53_REV_ID@GOTPAGE
Lloh26:
	ldr	x8, [x8, _B53_REV_ID@GOTPAGEOFF]
LBB0_13:
	ldr	w2, [x8]
	add	x3, x19, #4
	mov	x0, x19
	bl	_b53_read8
LBB0_14:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_B53_MGMT_PAGE,4,2              ; @B53_MGMT_PAGE
	.comm	_B53_DEVICE_ID,4,2              ; @B53_DEVICE_ID
	.comm	_B53_VLAN_PAGE,4,2              ; @B53_VLAN_PAGE
	.comm	_B53_VLAN_TABLE_ACCESS_25,4,2   ; @B53_VLAN_TABLE_ACCESS_25
	.comm	_BCM5325_DEVICE_ID,8,3          ; @BCM5325_DEVICE_ID
	.comm	_BCM5365_DEVICE_ID,4,2          ; @BCM5365_DEVICE_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported switch detected (BCM53%02x/BCM%x)\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_B53_STAT_PAGE,4,2              ; @B53_STAT_PAGE
	.comm	_B53_REV_ID_25,4,2              ; @B53_REV_ID_25
	.comm	_B53_REV_ID,4,2                 ; @B53_REV_ID
.subsections_via_symbols
