	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sja1105_init_mii_settings
_sja1105_init_mii_settings:             ## @sja1105_init_mii_settings
	.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	%rsi, %r15
	movq	(%rdi), %r13
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_BLK_IDX_XMII_PARAMS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,2), %rbx
	leaq	(,%rbx,8), %r14
	addq	%r13, %r14
	cmpq	$0, 8(%r13,%rbx,8)
	je	LBB0_2
## %bb.1:
	movq	(%r14), %rdi
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_2:
	movq	_SJA1105_MAX_XMII_PARAMS_COUNT@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	16(%r13,%rbx,8), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_kcalloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	(%r12), %rax
	movq	%rax, 8(%r14)
	movq	_SJA1105_NUM_PORTS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_16
## %bb.5:
	xorl	%r12d, %r12d
	movq	_XMII_MODE_RGMII@GOTPCREL(%rip), %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r14), %eax
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx,%r12,4)
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%r15,%r12,8), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jge	LBB0_16
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%r12,8), %edi
	leal	-129(%rdi), %eax
	cmpl	$4, %eax
	jb	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$128, %edi
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$133, %edi
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_XMII_MODE_MII@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_XMII_MODE_RMII@GOTPCREL(%rip), %rax
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_phy_modes
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_15
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_IDX_XMII_PARAMS,8,3        ## @BLK_IDX_XMII_PARAMS
	.comm	_SJA1105_MAX_XMII_PARAMS_COUNT,8,3 ## @SJA1105_MAX_XMII_PARAMS_COUNT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SJA1105_NUM_PORTS,4,2          ## @SJA1105_NUM_PORTS
	.comm	_XMII_MODE_MII,4,2              ## @XMII_MODE_MII
	.comm	_XMII_MODE_RMII,4,2             ## @XMII_MODE_RMII
	.comm	_XMII_MODE_RGMII,4,2            ## @XMII_MODE_RGMII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported PHY mode %s!\n"

	.no_dead_strip	_sja1105_init_mii_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sja1105_init_mii_settings
_sja1105_init_mii_settings:             ; @sja1105_init_mii_settings
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	ldp	x20, x19, [x0]
Lloh0:
	adrp	x8, _BLK_IDX_XMII_PARAMS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLK_IDX_XMII_PARAMS@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	mov	w8, #24
	madd	x23, x24, x8, x20
	mov	x22, x23
	ldr	x8, [x22, #8]!
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x0, [x23]
	bl	_kfree
	str	xzr, [x22]
LBB0_2:
Lloh3:
	adrp	x25, _SJA1105_MAX_XMII_PARAMS_COUNT@GOTPAGE
Lloh4:
	ldr	x25, [x25, _SJA1105_MAX_XMII_PARAMS_COUNT@GOTPAGEOFF]
	ldr	x0, [x25]
	mov	w8, #24
	madd	x8, x24, x8, x20
	ldr	x8, [x8, #16]
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_kcalloc
	str	x0, [x23]
	cbz	x0, LBB0_15
; %bb.3:
	ldr	x8, [x25]
	str	x8, [x22]
Lloh8:
	adrp	x22, _SJA1105_NUM_PORTS@GOTPAGE
Lloh9:
	ldr	x22, [x22, _SJA1105_NUM_PORTS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.4:
	mov	x20, x0
	mov	x23, #0
	add	x24, x21, #4
Lloh10:
	adrp	x25, _XMII_MODE_RGMII@GOTPAGE
Lloh11:
	ldr	x25, [x25, _XMII_MODE_RGMII@GOTPAGEOFF]
Lloh12:
	adrp	x26, _XMII_MODE_RMII@GOTPAGE
Lloh13:
	ldr	x26, [x26, _XMII_MODE_RMII@GOTPAGEOFF]
Lloh14:
	adrp	x27, _XMII_MODE_MII@GOTPAGE
Lloh15:
	ldr	x27, [x27, _XMII_MODE_MII@GOTPAGEOFF]
Lloh16:
	adrp	x21, l_.str@PAGE
Lloh17:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x25]
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x20, #8]
	str	w8, [x9, x23, lsl #2]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x24], #8
	ldr	x9, [x20]
	str	w8, [x9, x23, lsl #2]
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_14
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w0, [x24, #-4]
	sub	w8, w0, #129
	cmp	w8, #4
	b.lo	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	w0, #128
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w0, #133
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x27]
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x26]
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_phy_modes
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_dev_err
	b	LBB0_7
LBB0_14:
	mov	w0, #0
	b	LBB0_16
LBB0_15:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_IDX_XMII_PARAMS,8,3        ; @BLK_IDX_XMII_PARAMS
	.comm	_SJA1105_MAX_XMII_PARAMS_COUNT,8,3 ; @SJA1105_MAX_XMII_PARAMS_COUNT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SJA1105_NUM_PORTS,4,2          ; @SJA1105_NUM_PORTS
	.comm	_XMII_MODE_MII,4,2              ; @XMII_MODE_MII
	.comm	_XMII_MODE_RMII,4,2             ; @XMII_MODE_RMII
	.comm	_XMII_MODE_RGMII,4,2            ; @XMII_MODE_RGMII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported PHY mode %s!\n"

	.no_dead_strip	_sja1105_init_mii_settings
.subsections_via_symbols
