	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz9477_setup
_ksz9477_setup:                         ## @ksz9477_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movl	4(%rbx), %edx
	movl	8(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %esi
	callq	_devm_kcalloc
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_ksz9477_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_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_4:
	movq	_REG_SW_QM_CTRL__4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_UNICAST_VLAN_BOUNDARY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_ksz9477_cfg32
	movq	_REG_SW_MAC_CTRL_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_CHECK_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_ksz_cfg
	movq	_REG_SW_MAC_CTRL_1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_SW_LEGAL_PACKET_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	%r15, %rdi
	callq	_ksz9477_config_cpu_port
	movl	(%r12), %esi
	movq	_MULTICAST_STORM_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	_REG_SW_MAC_CTRL_5@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_OUT_RATE_LIMIT_QUEUE_BASED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	_REG_SW_MAC_CTRL_6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_MIB_COUNTER_FREEZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	_REG_SW_OPERATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	%rbx, %rdi
	callq	_ksz_init_mib_timer
LBB0_5:
	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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reset switch\n"

	.comm	_REG_SW_QM_CTRL__4,4,2          ## @REG_SW_QM_CTRL__4
	.comm	_UNICAST_VLAN_BOUNDARY,4,2      ## @UNICAST_VLAN_BOUNDARY
	.comm	_REG_SW_MAC_CTRL_0,4,2          ## @REG_SW_MAC_CTRL_0
	.comm	_SW_CHECK_LENGTH,4,2            ## @SW_CHECK_LENGTH
	.comm	_REG_SW_MAC_CTRL_1,4,2          ## @REG_SW_MAC_CTRL_1
	.comm	_SW_LEGAL_PACKET_DISABLE,4,2    ## @SW_LEGAL_PACKET_DISABLE
	.comm	_MULTICAST_STORM_DISABLE,4,2    ## @MULTICAST_STORM_DISABLE
	.comm	_REG_SW_MAC_CTRL_5,4,2          ## @REG_SW_MAC_CTRL_5
	.comm	_SW_OUT_RATE_LIMIT_QUEUE_BASED,4,2 ## @SW_OUT_RATE_LIMIT_QUEUE_BASED
	.comm	_REG_SW_MAC_CTRL_6,4,2          ## @REG_SW_MAC_CTRL_6
	.comm	_SW_MIB_COUNTER_FREEZE,4,2      ## @SW_MIB_COUNTER_FREEZE
	.comm	_REG_SW_OPERATION,4,2           ## @REG_SW_OPERATION
	.comm	_SW_START,4,2                   ## @SW_START
	.no_dead_strip	_ksz9477_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz9477_setup
_ksz9477_setup:                         ; @ksz9477_setup
	.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]
	ldp	w2, w0, [x19, #4]
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]
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_ksz9477_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_5
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _REG_SW_QM_CTRL__4@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_SW_QM_CTRL__4@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _UNICAST_VLAN_BOUNDARY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UNICAST_VLAN_BOUNDARY@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz9477_cfg32
Lloh14:
	adrp	x8, _REG_SW_MAC_CTRL_0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_SW_MAC_CTRL_0@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _SW_CHECK_LENGTH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SW_CHECK_LENGTH@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_ksz_cfg
Lloh20:
	adrp	x21, _REG_SW_MAC_CTRL_1@GOTPAGE
Lloh21:
	ldr	x21, [x21, _REG_SW_MAC_CTRL_1@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh22:
	adrp	x8, _SW_LEGAL_PACKET_DISABLE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SW_LEGAL_PACKET_DISABLE@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
	mov	x0, x20
	bl	_ksz9477_config_cpu_port
	ldr	w1, [x21]
Lloh25:
	adrp	x8, _MULTICAST_STORM_DISABLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MULTICAST_STORM_DISABLE@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
Lloh28:
	adrp	x8, _REG_SW_MAC_CTRL_5@GOTPAGE
Lloh29:
	ldr	x8, [x8, _REG_SW_MAC_CTRL_5@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _SW_OUT_RATE_LIMIT_QUEUE_BASED@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SW_OUT_RATE_LIMIT_QUEUE_BASED@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
Lloh34:
	adrp	x8, _REG_SW_MAC_CTRL_6@GOTPAGE
Lloh35:
	ldr	x8, [x8, _REG_SW_MAC_CTRL_6@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	adrp	x8, _SW_MIB_COUNTER_FREEZE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SW_MIB_COUNTER_FREEZE@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
Lloh40:
	adrp	x8, _REG_SW_OPERATION@GOTPAGE
Lloh41:
	ldr	x8, [x8, _REG_SW_OPERATION@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x8, _SW_START@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SW_START@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
	mov	x0, x19
	bl	_ksz_init_mib_timer
	mov	w21, #0
LBB0_5:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.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	_REG_SW_QM_CTRL__4,4,2          ; @REG_SW_QM_CTRL__4
	.comm	_UNICAST_VLAN_BOUNDARY,4,2      ; @UNICAST_VLAN_BOUNDARY
	.comm	_REG_SW_MAC_CTRL_0,4,2          ; @REG_SW_MAC_CTRL_0
	.comm	_SW_CHECK_LENGTH,4,2            ; @SW_CHECK_LENGTH
	.comm	_REG_SW_MAC_CTRL_1,4,2          ; @REG_SW_MAC_CTRL_1
	.comm	_SW_LEGAL_PACKET_DISABLE,4,2    ; @SW_LEGAL_PACKET_DISABLE
	.comm	_MULTICAST_STORM_DISABLE,4,2    ; @MULTICAST_STORM_DISABLE
	.comm	_REG_SW_MAC_CTRL_5,4,2          ; @REG_SW_MAC_CTRL_5
	.comm	_SW_OUT_RATE_LIMIT_QUEUE_BASED,4,2 ; @SW_OUT_RATE_LIMIT_QUEUE_BASED
	.comm	_REG_SW_MAC_CTRL_6,4,2          ; @REG_SW_MAC_CTRL_6
	.comm	_SW_MIB_COUNTER_FREEZE,4,2      ; @SW_MIB_COUNTER_FREEZE
	.comm	_REG_SW_OPERATION,4,2           ; @REG_SW_OPERATION
	.comm	_SW_START,4,2                   ; @SW_START
	.no_dead_strip	_ksz9477_setup
.subsections_via_symbols
