	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz9477_switch_init
_ksz9477_switch_init:                   ## @ksz9477_switch_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
	movq	64(%rdi), %rax
	movq	_ksz9477_switch_ops@GOTPCREL(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_ksz9477_switch_chips@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movl	$32, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	(%r12), %rax
	cmpq	-32(%rdi,%r15), %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addq	$40, %r15
	cmpq	%rax, %rbx
	jl	LBB0_2
	jmp	LBB0_5
LBB0_4:
	movl	(%rdi,%r15), %eax
	movl	%eax, 60(%r12)
	movl	-4(%rdi,%r15), %eax
	movl	%eax, 56(%r12)
	movl	-24(%rdi,%r15), %eax
	movl	%eax, 8(%r12)
	movups	-20(%rdi,%r15), %xmm0
	movups	%xmm0, 40(%r12)
LBB0_5:
	movl	8(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.6:
	movl	$-1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	notl	%eax
	movl	%eax, 12(%r12)
	movq	_SWITCH_COUNTER_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12)
	movq	_TOTAL_SWITCH_COUNTER_NUM@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, 16(%r12)
	movl	20(%r12), %esi
	movl	32(%r12), %edi
	shll	$2, %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_devm_kzalloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	cmpl	$0, 20(%r12)
	jle	LBB0_16
## %bb.8:
	movq	%rax, %rdi
	movl	$8, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rbx, %rdi
	callq	_mutex_init
	movl	32(%r12), %edi
	movl	(%r14), %eax
	leal	4(,%rax,4), %esi
	movl	(%r15), %edx
	callq	_devm_kzalloc
	movq	24(%r12), %rdi
	movq	%rax, -8(%rdi,%rbx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	movslq	20(%r12), %rax
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_9
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_12:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ksz9477_switch_ops,4,2         ## @ksz9477_switch_ops
	.comm	_ksz9477_switch_chips,8,3       ## @ksz9477_switch_chips
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SWITCH_COUNTER_NUM,4,2         ## @SWITCH_COUNTER_NUM
	.comm	_TOTAL_SWITCH_COUNTER_NUM,4,2   ## @TOTAL_SWITCH_COUNTER_NUM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ksz9477_switch_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz9477_switch_init
_ksz9477_switch_init:                   ; @ksz9477_switch_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #64]
Lloh0:
	adrp	x9, _ksz9477_switch_ops@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ksz9477_switch_ops@GOTPAGEOFF]
	str	x9, [x8]
Lloh2:
	adrp	x20, _ksz9477_switch_chips@GOTPAGE
Lloh3:
	ldr	x20, [x20, _ksz9477_switch_chips@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, #0
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	x8, [x19]
	ldr	x9, [x0, x21]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	add	x21, x21, #40
	cmp	x22, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_13
LBB0_5:
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w8, w8
Lloh4:
	adrp	x9, _SWITCH_COUNTER_NUM@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SWITCH_COUNTER_NUM@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	str	w9, [x19, #36]
Lloh7:
	adrp	x20, _TOTAL_SWITCH_COUNTER_NUM@GOTPAGE
Lloh8:
	ldr	x20, [x20, _TOTAL_SWITCH_COUNTER_NUM@GOTPAGEOFF]
	ldr	w9, [x20]
	stp	w8, w9, [x19, #12]
	ldr	w8, [x19, #20]
	ldr	w0, [x19, #32]
	lsl	w1, w8, #2
Lloh9:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_devm_kzalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_11
; %bb.6:
	ldr	w8, [x19, #20]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x22, #0
	mov	x23, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x0, x22
	add	x0, x8, #8
	bl	_mutex_init
	ldr	w0, [x19, #32]
	ldr	w8, [x20]
	lsl	w8, w8, #2
	add	w1, w8, #4
	ldr	w2, [x21]
	bl	_devm_kzalloc
	mov	x8, x0
	ldr	x0, [x19, #24]
	str	x8, [x0, x22]
	cbz	x8, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19, #20]
	add	x22, x22, #16
	cmp	x23, x8
	b.lt	LBB0_8
LBB0_10:
	mov	w0, #0
	b	LBB0_15
LBB0_11:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
	add	x8, x0, x21
	ldur	d0, [x8, #28]
	str	d0, [x19, #56]
	ldr	w9, [x8, #8]
	str	w9, [x19, #8]
	ldur	q0, [x8, #12]
	stur	q0, [x19, #40]
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_5
LBB0_13:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ksz9477_switch_ops,4,2         ; @ksz9477_switch_ops
	.comm	_ksz9477_switch_chips,8,3       ; @ksz9477_switch_chips
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SWITCH_COUNTER_NUM,4,2         ; @SWITCH_COUNTER_NUM
	.comm	_TOTAL_SWITCH_COUNTER_NUM,4,2   ; @TOTAL_SWITCH_COUNTER_NUM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ksz9477_switch_init
.subsections_via_symbols
