	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz8795_setup
_ksz8795_setup:                         ## @ksz8795_setup
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movl	20(%r12), %edx
	movl	24(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %esi
	callq	_devm_kcalloc
	movl	%eax, 16(%r12)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_ksz8795_reset_switch
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_4:
	movq	_S_REPLACE_VID_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_SW_FLOW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	_S_LINK_AGING_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_LINK_AUTO_AGING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	8(%r12), %rax
	movl	(%rax), %edi
	movq	_REG_SW_CTRL_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_AGGR_BACKOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movq	8(%r12), %rax
	movl	(%rax), %edi
	movq	_REG_SW_CTRL_2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_UNICAST_VLAN_BOUNDARY@GOTPCREL(%rip), %rax
	movq	_NO_EXC_COLLISION_DROP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movq	%r15, %rdi
	callq	_ksz8795_config_cpu_port
	movl	(%rbx), %esi
	movq	_MULTICAST_STORM_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movl	(%r13), %esi
	movq	_SW_REPLACE_VID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_ksz_cfg
	movq	_S_MIRROR_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_MIRROR_RX_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_ksz_cfg
	movq	8(%r12), %rax
	movl	4(%rax), %edi
	movl	(%r13), %esi
	movq	_BROADCAST_STORM_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BROADCAST_STORM_VALUE@GOTPCREL(%rip), %rax
	movq	_BROADCAST_STORM_PROT_RATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	(%rax), %ecx
	movslq	%ecx, %rax
	imulq	$1374389535, %rax, %rcx         ## imm = 0x51EB851F
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$37, %rcx
	addl	%eax, %ecx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_regmap_update_bits
	movq	_VLAN_TABLE_ENTRIES@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_ksz8795_r_vlan_entries
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_6
LBB0_7:
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	-44(%rbp), %edi
	movq	_eth_stp_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ether_addr_copy
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -56(%rbp)
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_ksz8795_w_sta_mac_table
	movq	%r12, %rdi
	callq	_ksz_init_mib_timer
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	"failed to reset switch\n"

	.comm	_S_REPLACE_VID_CTRL,4,2         ## @S_REPLACE_VID_CTRL
	.comm	_SW_FLOW_CTRL,4,2               ## @SW_FLOW_CTRL
	.comm	_S_LINK_AGING_CTRL,4,2          ## @S_LINK_AGING_CTRL
	.comm	_SW_LINK_AUTO_AGING,4,2         ## @SW_LINK_AUTO_AGING
	.comm	_REG_SW_CTRL_1,4,2              ## @REG_SW_CTRL_1
	.comm	_SW_AGGR_BACKOFF,4,2            ## @SW_AGGR_BACKOFF
	.comm	_REG_SW_CTRL_2,4,2              ## @REG_SW_CTRL_2
	.comm	_UNICAST_VLAN_BOUNDARY,4,2      ## @UNICAST_VLAN_BOUNDARY
	.comm	_NO_EXC_COLLISION_DROP,4,2      ## @NO_EXC_COLLISION_DROP
	.comm	_MULTICAST_STORM_DISABLE,4,2    ## @MULTICAST_STORM_DISABLE
	.comm	_SW_REPLACE_VID,4,2             ## @SW_REPLACE_VID
	.comm	_S_MIRROR_CTRL,4,2              ## @S_MIRROR_CTRL
	.comm	_SW_MIRROR_RX_TX,4,2            ## @SW_MIRROR_RX_TX
	.comm	_BROADCAST_STORM_RATE,4,2       ## @BROADCAST_STORM_RATE
	.comm	_BROADCAST_STORM_VALUE,4,2      ## @BROADCAST_STORM_VALUE
	.comm	_BROADCAST_STORM_PROT_RATE,4,2  ## @BROADCAST_STORM_PROT_RATE
	.comm	_VLAN_TABLE_ENTRIES,4,2         ## @VLAN_TABLE_ENTRIES
	.comm	_eth_stp_addr,4,2               ## @eth_stp_addr
	.no_dead_strip	_ksz8795_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz8795_setup
_ksz8795_setup:                         ; @ksz8795_setup
	.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	x20, x0
	ldr	x19, [x0, #8]
	ldp	w2, w0, [x19, #20]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	w1, #4
	bl	_devm_kcalloc
	str	w0, [x19, #16]
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_ksz8795_reset_switch
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	w0, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_4:
Lloh8:
	adrp	x21, _S_REPLACE_VID_CTRL@GOTPAGE
Lloh9:
	ldr	x21, [x21, _S_REPLACE_VID_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh10:
	adrp	x8, _SW_FLOW_CTRL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SW_FLOW_CTRL@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
Lloh13:
	adrp	x8, _S_LINK_AGING_CTRL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _S_LINK_AGING_CTRL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _SW_LINK_AUTO_AGING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SW_LINK_AUTO_AGING@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _REG_SW_CTRL_1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _REG_SW_CTRL_1@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _SW_AGGR_BACKOFF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SW_AGGR_BACKOFF@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh25:
	adrp	x22, _REG_SW_CTRL_2@GOTPAGE
Lloh26:
	ldr	x22, [x22, _REG_SW_CTRL_2@GOTPAGEOFF]
Lloh27:
	adrp	x8, _UNICAST_VLAN_BOUNDARY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _UNICAST_VLAN_BOUNDARY@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _NO_EXC_COLLISION_DROP@GOTPAGE
Lloh31:
	ldr	x9, [x9, _NO_EXC_COLLISION_DROP@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x3, x2
	bl	_regmap_update_bits
	mov	x0, x20
	bl	_ksz8795_config_cpu_port
	ldr	w1, [x22]
Lloh33:
	adrp	x8, _MULTICAST_STORM_DISABLE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MULTICAST_STORM_DISABLE@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
	ldr	w1, [x21]
Lloh36:
	adrp	x8, _SW_REPLACE_VID@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SW_REPLACE_VID@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_ksz_cfg
Lloh39:
	adrp	x8, _S_MIRROR_CTRL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _S_MIRROR_CTRL@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x8, _SW_MIRROR_RX_TX@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SW_MIRROR_RX_TX@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_ksz_cfg
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	ldr	w1, [x21]
Lloh45:
	adrp	x8, _BROADCAST_STORM_RATE@GOTPAGE
Lloh46:
	ldr	x8, [x8, _BROADCAST_STORM_RATE@GOTPAGEOFF]
Lloh47:
	ldr	w2, [x8]
Lloh48:
	adrp	x8, _BROADCAST_STORM_VALUE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _BROADCAST_STORM_VALUE@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
Lloh51:
	adrp	x9, _BROADCAST_STORM_PROT_RATE@GOTPAGE
Lloh52:
	ldr	x9, [x9, _BROADCAST_STORM_PROT_RATE@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	mul	w8, w9, w8
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w3, w8, w9
	bl	_regmap_update_bits
Lloh54:
	adrp	x21, _VLAN_TABLE_ENTRIES@GOTPAGE
Lloh55:
	ldr	x21, [x21, _VLAN_TABLE_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w20, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ksz8795_r_vlan_entries
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_6
LBB0_7:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w0, [sp, #12]
Lloh56:
	adrp	x8, _eth_stp_addr@GOTPAGE
Lloh57:
	ldr	x8, [x8, _eth_stp_addr@GOTPAGEOFF]
Lloh58:
	ldr	w1, [x8]
	bl	_ether_addr_copy
	movi.2s	v0, #1
	str	d0, [sp]
	ldr	w8, [x19]
	str	w8, [sp, #8]
	mov	x2, sp
	mov	x0, x19
	mov	w1, #0
	bl	_ksz8795_w_sta_mac_table
	mov	x0, x19
	bl	_ksz_init_mib_timer
	mov	w21, #0
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.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	"failed to reset switch\n"

	.comm	_S_REPLACE_VID_CTRL,4,2         ; @S_REPLACE_VID_CTRL
	.comm	_SW_FLOW_CTRL,4,2               ; @SW_FLOW_CTRL
	.comm	_S_LINK_AGING_CTRL,4,2          ; @S_LINK_AGING_CTRL
	.comm	_SW_LINK_AUTO_AGING,4,2         ; @SW_LINK_AUTO_AGING
	.comm	_REG_SW_CTRL_1,4,2              ; @REG_SW_CTRL_1
	.comm	_SW_AGGR_BACKOFF,4,2            ; @SW_AGGR_BACKOFF
	.comm	_REG_SW_CTRL_2,4,2              ; @REG_SW_CTRL_2
	.comm	_UNICAST_VLAN_BOUNDARY,4,2      ; @UNICAST_VLAN_BOUNDARY
	.comm	_NO_EXC_COLLISION_DROP,4,2      ; @NO_EXC_COLLISION_DROP
	.comm	_MULTICAST_STORM_DISABLE,4,2    ; @MULTICAST_STORM_DISABLE
	.comm	_SW_REPLACE_VID,4,2             ; @SW_REPLACE_VID
	.comm	_S_MIRROR_CTRL,4,2              ; @S_MIRROR_CTRL
	.comm	_SW_MIRROR_RX_TX,4,2            ; @SW_MIRROR_RX_TX
	.comm	_BROADCAST_STORM_RATE,4,2       ; @BROADCAST_STORM_RATE
	.comm	_BROADCAST_STORM_VALUE,4,2      ; @BROADCAST_STORM_VALUE
	.comm	_BROADCAST_STORM_PROT_RATE,4,2  ; @BROADCAST_STORM_PROT_RATE
	.comm	_VLAN_TABLE_ENTRIES,4,2         ; @VLAN_TABLE_ENTRIES
	.comm	_eth_stp_addr,4,2               ; @eth_stp_addr
	.no_dead_strip	_ksz8795_setup
.subsections_via_symbols
