	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sja1105_adjust_port_config
_sja1105_adjust_port_config:            ## @sja1105_adjust_port_config
	.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
                                        ## kill: def $edx killed $edx def $rdx
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	leal	-128(%rdx), %eax
	cmpl	$4, %eax
	jae	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rcx
	movq	_BLK_IDX_XMII_PARAMS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	_BLK_IDX_MAC_CONFIG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	(%rcx,%rsi,8), %rdx
	cltq
	leaq	l_switch.table.sja1105_adjust_port_config(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movslq	%r14d, %r13
	movq	%r13, %rdi
	shlq	$4, %rdi
	leaq	(%rdx,%rdi), %rcx
	movl	%eax, 8(%rdx,%rdi)
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	$1, %r8d
	callq	_sja1105_dynamic_config_write
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax,%r13,8), %rax
	movq	_XMII_MODE_RGMII@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	%r12, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sja1105_clocking_setup_port    ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_IDX_MAC_CONFIG,8,3         ## @BLK_IDX_MAC_CONFIG
	.comm	_BLK_IDX_XMII_PARAMS,8,3        ## @BLK_IDX_XMII_PARAMS
	.comm	_SJA1105_SPEED_AUTO,4,2         ## @SJA1105_SPEED_AUTO
	.comm	_SJA1105_SPEED_10MBPS,4,2       ## @SJA1105_SPEED_10MBPS
	.comm	_SJA1105_SPEED_100MBPS,4,2      ## @SJA1105_SPEED_100MBPS
	.comm	_SJA1105_SPEED_1000MBPS,4,2     ## @SJA1105_SPEED_1000MBPS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid speed %iMbps\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to write MAC config: %d\n"

	.comm	_XMII_MODE_RGMII,8,3            ## @XMII_MODE_RGMII
	.no_dead_strip	_sja1105_adjust_port_config
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.sja1105_adjust_port_config
l_switch.table.sja1105_adjust_port_config:
	.quad	_SJA1105_SPEED_AUTO
	.quad	_SJA1105_SPEED_1000MBPS
	.quad	_SJA1105_SPEED_100MBPS
	.quad	_SJA1105_SPEED_10MBPS

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sja1105_adjust_port_config
_sja1105_adjust_port_config:            ; @sja1105_adjust_port_config
	.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
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
	sub	w8, w2, #128
	cmp	w8, #4
	b.hs	LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x9, _BLK_IDX_XMII_PARAMS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BLK_IDX_XMII_PARAMS@GOTPAGEOFF]
	ldr	x10, [x0]
Lloh2:
	ldr	x9, [x9]
	ldr	x23, [x10, x9, lsl #3]
Lloh3:
	adrp	x9, _BLK_IDX_MAC_CONFIG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BLK_IDX_MAC_CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x9]
	ldr	x9, [x10, x1, lsl #3]
Lloh6:
	adrp	x10, l_switch.table.sja1105_adjust_port_config@PAGE
Lloh7:
	add	x10, x10, l_switch.table.sja1105_adjust_port_config@PAGEOFF
	ldr	x8, [x10, w8, sxtw #3]
	ldr	w8, [x8]
	add	x3, x9, w19, sxtw #4
	str	w8, [x3, #8]
	mov	x2, x19
	mov	w4, #1
	bl	_sja1105_dynamic_config_write
	tbnz	w0, #31, LBB0_5
; %bb.2:
	sxtw	x8, w19
	ldr	x9, [x23]
	ldr	x8, [x9, x8, lsl #3]
Lloh8:
	adrp	x9, _XMII_MODE_RGMII@GOTPAGE
Lloh9:
	ldr	x9, [x9, _XMII_MODE_RGMII@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	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
	b	_sja1105_clocking_setup_port
LBB0_4:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_5:
	mov	x22, x0
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_dev_err
	b	LBB0_7
LBB0_6:
	mov	w22, #0
LBB0_7:
	mov	x0, x22
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_IDX_MAC_CONFIG,8,3         ; @BLK_IDX_MAC_CONFIG
	.comm	_BLK_IDX_XMII_PARAMS,8,3        ; @BLK_IDX_XMII_PARAMS
	.comm	_SJA1105_SPEED_AUTO,4,2         ; @SJA1105_SPEED_AUTO
	.comm	_SJA1105_SPEED_10MBPS,4,2       ; @SJA1105_SPEED_10MBPS
	.comm	_SJA1105_SPEED_100MBPS,4,2      ; @SJA1105_SPEED_100MBPS
	.comm	_SJA1105_SPEED_1000MBPS,4,2     ; @SJA1105_SPEED_1000MBPS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid speed %iMbps\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to write MAC config: %d\n"

	.comm	_XMII_MODE_RGMII,8,3            ; @XMII_MODE_RGMII
	.no_dead_strip	_sja1105_adjust_port_config
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.sja1105_adjust_port_config
l_switch.table.sja1105_adjust_port_config:
	.quad	_SJA1105_SPEED_AUTO
	.quad	_SJA1105_SPEED_1000MBPS
	.quad	_SJA1105_SPEED_100MBPS
	.quad	_SJA1105_SPEED_10MBPS

.subsections_via_symbols
